From 76759ab036458c54499a454399e19602b8ae6ce3 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 6 Jun 2000 04:18:26 +0000 Subject: [PATCH] XEmacs 21.2.34 "Molpe". --- CHANGES-beta | 8 + ChangeLog | 18 + configure | 1446 ++++++++++++++++++++---------------------- configure.in | 25 +- etc/Emacs.ad | 2 +- info/internals.info | 146 ++--- info/lispref.info | 1240 ++++++++++++++++++------------------ info/xemacs.info | 701 ++++++++++---------- info/xemacs.info-2 | 66 +- info/xemacs.info-3 | 594 ++++++++--------- info/xemacs.info-4 | 201 +++--- lib-src/ChangeLog | 13 + lib-src/config.values.in | 3 - lib-src/i.c | 2 +- lib-src/make-docfile.c | 75 ++- lisp/ChangeLog | 193 ++++++ lisp/custom-load.el | 6 +- lisp/faces.el | 40 +- lisp/files.el | 2 +- lisp/font-lock.el | 493 +++++++------- lisp/glyphs.el | 477 ++++++++++++-- lisp/gutter-items.el | 96 ++- lisp/gutter.el | 55 ++ lisp/keydefs.el | 23 +- lisp/loadhist.el | 19 +- lisp/menubar-items.el | 17 +- lisp/minibuf.el | 36 +- lisp/objects.el | 50 +- lisp/packages.el | 4 +- lisp/process.el | 2 +- lisp/setup-paths.el | 17 - lisp/simple.el | 22 + lisp/specifier.el | 80 ++- lisp/startup.el | 26 +- lisp/toolbar.el | 17 + lisp/update-elc.el | 20 +- lwlib/ChangeLog | 4 + man/ChangeLog | 28 + man/internals/internals.texi | 4 +- man/lispref/compile.texi | 2 +- man/lispref/databases.texi | 2 +- man/lispref/display.texi | 65 ++ man/lispref/extents.texi | 4 +- man/lispref/faces.texi | 84 +++ man/lispref/glyphs.texi | 372 ++++++++++- man/lispref/gutter.texi | 79 ++- man/lispref/modes.texi | 41 +- man/lispref/specifiers.texi | 65 +- man/lispref/toolbar.texi | 25 +- man/xemacs/basic.texi | 494 +++++++++------ man/xemacs/entering.texi | 169 +++-- man/xemacs/mini.texi | 28 +- man/xemacs/startup.texi | 10 - nt/ChangeLog | 8 + src/ChangeLog | 872 +++++++++++++++++++++++++ src/buffer.c | 76 ++- src/buffer.h | 5 + src/callproc.c | 6 +- src/cmdloop.c | 4 + src/config.h.in | 1 - src/console-msw.c | 313 ++++++++- src/console-msw.h | 15 +- src/console-stream.c | 30 - src/console.h | 6 +- src/device-msw.c | 7 - src/device.h | 2 + src/emacs.c | 452 +++++++++++-- src/eval.c | 6 +- src/event-Xt.c | 11 - src/event-msw.c | 460 ++++++++++++-- src/event-stream.c | 11 + src/fns.c | 5 +- src/frame-msw.c | 7 - src/frame.c | 17 +- src/frame.h | 5 +- src/frameslots.h | 3 + src/general.c | 26 +- src/glyphs-eimage.c | 9 +- src/glyphs-msw.c | 169 +++-- src/glyphs-msw.h | 11 +- src/glyphs-widget.c | 355 +++++++---- src/glyphs-x.c | 63 +- src/glyphs-x.h | 17 +- src/glyphs.c | 1332 +++++++++++++++++++------------------- src/glyphs.h | 231 ++++--- src/gui-msw.c | 15 +- src/gui-x.c | 18 +- src/gui.c | 8 +- src/gutter.c | 48 +- src/lisp.h | 35 +- src/nt.c | 182 +++++- src/nt.h | 69 +- src/ntheap.c | 45 +- src/ntheap.h | 24 - src/ntplay.c | 8 +- src/ntproc.c | 152 +---- src/objects-msw.c | 7 - src/objects.c | 40 +- src/paths.h.in | 9 - src/postgresql.c | 16 +- src/print.c | 32 +- src/process-nt.c | 324 +++++++++- src/process.c | 15 +- src/rangetab.c | 39 +- src/redisplay-msw.c | 46 +- src/redisplay-output.c | 109 ++-- src/redisplay-tty.c | 32 +- src/redisplay-x.c | 28 +- src/redisplay.c | 97 +-- src/s/cygwin32.h | 56 +- src/s/mingw32.h | 37 +- src/scrollbar.c | 60 +- src/specifier.c | 110 +++- src/specifier.h | 43 ++ src/toolbar-msw.c | 13 +- src/toolbar.c | 11 +- src/unexelf.c | 28 +- src/unexnt.c | 42 +- src/window.c | 68 +- src/window.h | 4 + tests/ChangeLog | 4 + tests/glyph-test.el | 6 +- version.sh | 4 +- 123 files changed, 9133 insertions(+), 4997 deletions(-) diff --git a/CHANGES-beta b/CHANGES-beta index b7c269e..5d382f6 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,3 +1,11 @@ +to 21.2.34 "Molpe" +-- Lots of changes to GUI, Windows, font-lock code, Ben Wing +-- Lots of changes to GUI, Windows code, Andy Piper +-- Various fixes, Karl Hegbloom +-- User manual documentation updates, Yoshiki Hayashi +-- Dumping fixes, Yoshiki Hayashi +-- Define C-x BS to backward-kill-sentence, Yoshiki Hayashi + to 21.2.33 "Melpomene" -- Yet more progress gauge and gutter redisplay fixes from Andy Piper -- glyph error checking from Andy Piper diff --git a/ChangeLog b/ChangeLog index 980b5a2..7fb99d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + +2000-05-15 Yoshiki Hayashi + + * configure.in: + Do not define DOUG_LEA_MALLOC when using other malloc scheme. + Remove unused variable use_minimal_tagbits. + +2000-05-02 Yoshiki Hayashi + + * configure.in: Remove lockdir. + +2000-04-15 Andy Piper + + * etc/Emacs.ad: add select-start() back into text translations. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/configure b/configure index e174b50..abe0359 100755 --- a/configure +++ b/configure @@ -240,7 +240,6 @@ sitemoduledir='${datadir}/${inststaticdir}/site-modules' pkgdir='${datadir}/${instvardir}/lisp' package_path='' etcdir='${datadir}/${instvardir}/etc' -lockdir='${statedir}/${inststaticdir}/lock' archlibdir='${datadir}/${instvardir}/${configuration}' docdir='${archlibdir}' with_prefix='yes' @@ -584,7 +583,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ - mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ + mandir | infodir | infopath | lispdir | etcdir | pkgdir | \ archlibdir | docdir | package_path ) if test "$valomitted" = "yes"; then if test "$#" = 0; then @@ -694,14 +693,6 @@ cat >> confdefs.h <<\EOF EOF } ;; - statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining LOCKDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define LOCKDIR_USER_DEFINED 1 -EOF -} - ;; docdir ) { test "$extra_verbose" = "yes" && cat << \EOF Defining DOCDIR_USER_DEFINED EOF @@ -838,7 +829,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:842: checking whether ln -s works" >&5 +echo "configure:833: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -1103,7 +1094,7 @@ EOF echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:1107: checking "host system type"" >&5 +echo "configure:1098: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1598,7 +1589,7 @@ xe_save_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1602: checking for $ac_word" >&5 +echo "configure:1593: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1625,7 +1616,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1629: checking for $ac_word" >&5 +echo "configure:1620: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1673,7 +1664,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1677: checking for $ac_word" >&5 +echo "configure:1668: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1702,7 +1693,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1715,12 +1706,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1719 "configure" +#line 1710 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1748,19 +1739,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1752: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1757: checking whether we are using GNU C" >&5 +echo "configure:1748: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1778,7 +1769,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1782: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1773: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1811,7 +1802,7 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1815: checking for $ac_word" >&5 +echo "configure:1806: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1838,7 +1829,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1842: checking for $ac_word" >&5 +echo "configure:1833: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1886,7 +1877,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1890: checking for $ac_word" >&5 +echo "configure:1881: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1915,7 +1906,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1919: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1928,12 +1919,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1932 "configure" +#line 1923 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1961,19 +1952,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1965: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1970: checking whether we are using GNU C" >&5 +echo "configure:1961: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1991,7 +1982,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1995: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1986: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2024,7 +2015,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2028: checking for $ac_word" >&5 +echo "configure:2019: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2051,7 +2042,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2055: checking for $ac_word" >&5 +echo "configure:2046: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2099,7 +2090,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2103: checking for $ac_word" >&5 +echo "configure:2094: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2128,7 +2119,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2132: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -2141,12 +2132,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 2145 "configure" +#line 2136 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2174,19 +2165,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2178: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2169: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2183: checking whether we are using GNU C" >&5 +echo "configure:2174: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2204,7 +2195,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2208: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2199: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2241,7 +2232,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2245: checking how to run the C preprocessor" >&5 +echo "configure:2236: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2254,13 +2245,13 @@ if test -z "$CPP"; then # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2271,13 +2262,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2288,13 +2279,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2320,9 +2311,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2324: checking for AIX" >&5 +echo "configure:2315: checking for AIX" >&5 cat > conftest.$ac_ext < $srcdir/conffoo.h <&6 -echo "configure:2355: checking for a working inclusion macro" >&5 +echo "configure:2346: checking for a working inclusion macro" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""direct" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining SMART_INCLUDE_INDIRECTIONS = 0 @@ -2380,7 +2371,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""simple" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining SMART_INCLUDE_INDIRECTIONS = 1 @@ -2408,7 +2399,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""double" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining SMART_INCLUDE_INDIRECTIONS = 2 @@ -2448,9 +2439,9 @@ rm -f $srcdir/conffoo.h echo $ac_n "checking for GNU libc""... $ac_c" 1>&6 -echo "configure:2452: checking for GNU libc" >&5 +echo "configure:2443: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2462,7 +2453,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2539,7 +2530,7 @@ EOF esac cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2787,7 +2778,7 @@ fi if test "$GCC" = "yes"; then echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6 -echo "configure:2791: checking for buggy gcc versions" >&5 +echo "configure:2782: checking for buggy gcc versions" >&5 GCC_VERSION=`$CC --version` case `uname -s`:`uname -m`:$GCC_VERSION in *:sun4*:2.8.1|*:sun4*:egcs-2.90.*) @@ -2910,7 +2901,7 @@ test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" && if test "$extra_v fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2914: checking for dynodump" >&5 +echo "configure:2905: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2948,12 +2939,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2952: checking for terminateAndUnload in -lC" >&5 +echo "configure:2943: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3072,7 +3063,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:3076: checking "for runtime libraries flag"" >&5 +echo "configure:3067: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -3094,14 +3085,14 @@ if test "$GCC" = "yes"; then done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -3202,57 +3193,11 @@ else doug_lea_malloc=no fi after_morecore_hook_exists=yes -echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:3207: checking for malloc_get_state" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char malloc_get_state(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state) -choke me -#else -malloc_get_state(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_malloc_get_state=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_malloc_get_state=no" -fi -rm -f conftest* - -if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -doug_lea_malloc=no -fi - echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:3253: checking for malloc_set_state" >&5 +echo "configure:3198: checking for malloc_set_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -3295,16 +3240,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:3299: checking whether __after_morecore_hook exists" >&5 +echo "configure:3244: checking whether __after_morecore_hook exists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3329,11 +3274,9 @@ elif test "$with_debug_malloc" = "yes" ; then - User chose to use Debugging Malloc." fi -if test "$doug_lea_malloc" = "yes" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" +if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then + GNU_MALLOC_reason=" - Using Doug Lea's new malloc from the GNU C Library." - fi { test "$extra_verbose" = "yes" && cat << \EOF Defining DOUG_LEA_MALLOC EOF @@ -3354,7 +3297,6 @@ EOF } fi - use_minimal_tagbits=yes fi @@ -3363,7 +3305,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3367: checking for $ac_word" >&5 +echo "configure:3309: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3418,7 +3360,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3422: checking for a BSD compatible install" >&5 +echo "configure:3364: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3472,7 +3414,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3476: checking for $ac_word" >&5 +echo "configure:3418: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3504,15 +3446,15 @@ for ac_hdr in a.out.h cygwin/version.h fcntl.h inttypes.h libgen.h l do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3508: checking for $ac_hdr" >&5 +echo "configure:3450: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3542,10 +3484,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3546: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3488: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3561,7 +3503,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3585,10 +3527,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3589: checking for ANSI C header files" >&5 +echo "configure:3531: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3596,7 +3538,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3613,7 +3555,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3631,7 +3573,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3649,7 +3591,7 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3660,7 +3602,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3686,10 +3628,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3690: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3632: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3698,7 +3640,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3722,10 +3664,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3726: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3668: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3737,7 +3679,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3762,9 +3704,9 @@ fi echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3766: checking for struct utimbuf" >&5 +echo "configure:3708: checking for struct utimbuf" >&5 cat > conftest.$ac_ext < @@ -3783,7 +3725,7 @@ int main() { static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3729: \"$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 @@ -3803,10 +3745,10 @@ fi rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3807: checking return type of signal handlers" >&5 +echo "configure:3749: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3823,7 +3765,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3845,10 +3787,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3849: checking for size_t" >&5 +echo "configure:3791: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3879,10 +3821,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3883: checking for pid_t" >&5 +echo "configure:3825: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3913,10 +3855,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3917: checking for uid_t in sys/types.h" >&5 +echo "configure:3859: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3952,10 +3894,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3956: checking for mode_t" >&5 +echo "configure:3898: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3986,10 +3928,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3990: checking for off_t" >&5 +echo "configure:3932: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4020,10 +3962,10 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:4024: checking for ssize_t" >&5 +echo "configure:3966: checking for ssize_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4055,9 +3997,9 @@ fi echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:4059: checking for struct timeval" >&5 +echo "configure:4001: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -4073,7 +4015,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -4095,10 +4037,10 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4099: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4041: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -4106,7 +4048,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4130,10 +4072,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:4134: checking for tm_zone in struct tm" >&5 +echo "configure:4076: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -4141,7 +4083,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -4164,10 +4106,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:4168: checking for tzname" >&5 +echo "configure:4110: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -4177,7 +4119,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4203,10 +4145,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4207: checking for working const" >&5 +echo "configure:4149: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4280,7 +4222,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4284: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4226: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4305,12 +4247,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4309: checking whether byte ordering is bigendian" >&5 +echo "configure:4251: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4321,11 +4263,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4336,7 +4278,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4353,7 +4295,7 @@ fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4393,10 +4335,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4397: checking size of short" >&5 +echo "configure:4339: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -4407,7 +4349,7 @@ main() exit(0); } EOF -if { (eval echo configure:4411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4435,10 +4377,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4439: checking size of int" >&5 +echo "configure:4381: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -4449,7 +4391,7 @@ main() exit(0); } EOF -if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4471,10 +4413,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4475: checking size of long" >&5 +echo "configure:4417: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -4485,7 +4427,7 @@ main() exit(0); } EOF -if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4507,10 +4449,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4511: checking size of long long" >&5 +echo "configure:4453: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4521,7 +4463,7 @@ main() exit(0); } EOF -if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4543,10 +4485,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4547: checking size of void *" >&5 +echo "configure:4489: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4557,7 +4499,7 @@ main() exit(0); } EOF -if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_void_p=`cat conftestval` else @@ -4580,7 +4522,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4584: checking for long file names" >&5 +echo "configure:4526: checking for long file names" >&5 ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: @@ -4626,10 +4568,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4630: checking for sin" >&5 +echo "configure:4572: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4670,12 +4612,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4674: checking for sin in -lm" >&5 +echo "configure:4616: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4730,14 +4672,14 @@ EOF cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4754,14 +4696,14 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4758: checking type of mail spool file locking" >&5 +echo "configure:4700: checking type of mail spool file locking" >&5 for ac_func in lockf flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4762: checking for $ac_func" >&5 +echo "configure:4704: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4857,12 +4799,12 @@ test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4861: checking for cma_open in -lpthreads" >&5 +echo "configure:4803: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4909,7 +4851,7 @@ fi esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4913: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4855: checking whether the -xildoff compiler flag is required" >&5 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then echo "$ac_t""no" 1>&6; @@ -4921,7 +4863,7 @@ fi if test "$opsys" = "sol2"; then if test "$os_release" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4925: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4867: checking for \"-z ignore\" linker flag" >&5 case "`ld -h 2>&1`" in *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6 ld_switch_site="-z ignore $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z ignore\" to \$ld_switch_site"; fi ;; @@ -4932,7 +4874,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:4936: checking "for specified window system"" >&5 +echo "configure:4878: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4965,7 +4907,7 @@ if test "$with_x11" != "no"; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4969: checking for X" >&5 +echo "configure:4911: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5025,12 +4967,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5099,14 +5041,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5215,17 +5157,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:5219: checking whether -R must be followed by a space" >&5 +echo "configure:5161: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -5241,14 +5183,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -5284,12 +5226,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5288: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5230: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5324,12 +5266,12 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:5328: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5270: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5369,10 +5311,10 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5373: checking for gethostbyname" >&5 +echo "configure:5315: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5416,12 +5358,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5420: checking for gethostbyname in -lnsl" >&5 +echo "configure:5362: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5462,10 +5404,10 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5466: checking for connect" >&5 +echo "configure:5408: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -5511,12 +5453,12 @@ fi xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5515: checking "$xe_msg_checking"" >&5 +echo "configure:5457: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5551,10 +5493,10 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:5555: checking for remove" >&5 +echo "configure:5497: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -5598,12 +5540,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5602: checking for remove in -lposix" >&5 +echo "configure:5544: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5638,10 +5580,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5642: checking for shmat" >&5 +echo "configure:5584: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5685,12 +5627,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5689: checking for shmat in -lipc" >&5 +echo "configure:5631: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5737,12 +5679,12 @@ fi xe_msg_checking="for IceConnectionNumber in -lICE" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5741: checking "$xe_msg_checking"" >&5 +echo "configure:5683: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5922,7 +5864,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5926: checking for X defines extracted by xmkmf" >&5 +echo "configure:5868: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5954,15 +5896,15 @@ EOF ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5958: checking for X11/Intrinsic.h" >&5 +echo "configure:5900: checking for X11/Intrinsic.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5986,12 +5928,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5990: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5932: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6027,12 +5969,12 @@ fi xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6031: checking "$xe_msg_checking"" >&5 +echo "configure:5973: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6070,12 +6012,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:6074: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:6016: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6109,12 +6051,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:6113: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:6055: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6148,14 +6090,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:6152: checking the version of X11 being used" >&5 +echo "configure:6094: checking the version of X11 being used" >&5 cat > conftest.$ac_ext < int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -6179,10 +6121,10 @@ EOF for ac_func in XConvertCase do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6183: checking for $ac_func" >&5 +echo "configure:6125: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6237,15 +6179,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6241: checking for $ac_hdr" >&5 +echo "configure:6183: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6276,7 +6218,7 @@ done echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:6280: checking for XFree86" >&5 +echo "configure:6222: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -6296,12 +6238,12 @@ EOF test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:6300: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:6242: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6351,19 +6293,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:6355: checking for main in -lXbsd" >&5 +echo "configure:6297: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6400,22 +6342,22 @@ fi fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:6404: checking for MS-Windows" >&5 +echo "configure:6346: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:6407: checking for main in -lgdi32" >&5 +echo "configure:6349: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6481,12 +6423,12 @@ EOF fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:6490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MSG_SELECT @@ -6561,7 +6503,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:6565: checking for WM_COMMAND option" >&5; +echo "configure:6507: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -6576,15 +6518,15 @@ fi test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:6580: checking for X11/Xauth.h" >&5 +echo "configure:6522: checking for X11/Xauth.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6607,12 +6549,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:6611: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6553: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6668,15 +6610,15 @@ if test "$with_tooltalk" != "no" ; then for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6672: checking for ${dir}tt_c.h" >&5 +echo "configure:6614: checking for ${dir}tt_c.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6712,12 +6654,12 @@ if test "$with_tooltalk" != "no" ; then xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6716: checking "$xe_msg_checking"" >&5 +echo "configure:6658: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6785,15 +6727,15 @@ fi test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6789: checking for Dt/Dt.h" >&5 +echo "configure:6731: checking for Dt/Dt.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6816,12 +6758,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6820: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6762: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6901,7 +6843,7 @@ EOF fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6905: checking if drag and drop API is needed" >&5 +echo "configure:6847: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6922,18 +6864,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:6926: checking for LDAP" >&5 +echo "configure:6868: checking for LDAP" >&5 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 -echo "configure:6929: checking for ldap.h" >&5 +echo "configure:6871: checking for ldap.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6956,15 +6898,15 @@ fi } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6960: checking for lber.h" >&5 +echo "configure:6902: checking for lber.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6988,12 +6930,12 @@ fi if test "$with_ldap" != "no"; then echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:6992: checking for ldap_search in -lldap" >&5 +echo "configure:6934: checking for ldap_search in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7029,12 +6971,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7033: checking "$xe_msg_checking"" >&5 +echo "configure:6975: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7070,12 +7012,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7074: checking "$xe_msg_checking"" >&5 +echo "configure:7016: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7111,12 +7053,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7115: checking "$xe_msg_checking"" >&5 +echo "configure:7057: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7178,10 +7120,10 @@ EOF for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7182: checking for $ac_func" >&5 +echo "configure:7124: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7234,7 +7176,7 @@ done fi echo "checking for PostgreSQL" 1>&6 -echo "configure:7238: checking for PostgreSQL" >&5 +echo "configure:7180: checking for PostgreSQL" >&5 postgres_h_path="" postgres_includes_found=no save_c_switch_site="$c_switch_site" @@ -7242,15 +7184,15 @@ save_c_switch_site="$c_switch_site" if test "$with_postgresql" != "no"; then ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7246: checking for libpq-fe.h" >&5 +echo "configure:7188: checking for libpq-fe.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7277,15 +7219,15 @@ if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ c_switch_site="$c_switch_site -I/usr/local/pgsql/include" ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7281: checking for libpq-fe.h" >&5 +echo "configure:7223: checking for libpq-fe.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7315,15 +7257,15 @@ if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ c_switch_site="$c_switch_site -I/usr/include/pgsql" ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7319: checking for libpq-fe.h" >&5 +echo "configure:7261: checking for libpq-fe.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7353,15 +7295,15 @@ if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ c_switch_site="$c_switch_site -I/usr/include/postgresql" ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7357: checking for libpq-fe.h" >&5 +echo "configure:7299: checking for libpq-fe.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7390,12 +7332,12 @@ fi if test "$postgres_includes_found" = "yes"; then echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6 -echo "configure:7394: checking for PQconnectdb in -lpq" >&5 +echo "configure:7336: checking for PQconnectdb in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7431,12 +7373,12 @@ fi if test "$with_postgresql" = "yes"; then echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6 -echo "configure:7435: checking for PQconnectStart in -lpq" >&5 +echo "configure:7377: checking for PQconnectStart in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7507,15 +7449,15 @@ fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:7511: checking for graphics libraries" >&5 +echo "configure:7453: checking for graphics libraries" >&5 xpm_problem="" if test -z "$with_xpm"; then echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:7516: checking for Xpm - no older than 3.4f" >&5 +echo "configure:7458: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < @@ -7524,7 +7466,7 @@ echo "configure:7516: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; xpm_status=$?; if test "$xpm_status" = "0"; then @@ -7566,17 +7508,17 @@ EOF libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:7570: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:7512: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -7602,15 +7544,15 @@ EOF test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:7606: checking for compface.h" >&5 +echo "configure:7548: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7633,12 +7575,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:7637: checking for UnGenFace in -lcompface" >&5 +echo "configure:7579: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7701,12 +7643,12 @@ EOF if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:7705: checking for inflate in -lc" >&5 +echo "configure:7647: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7736,12 +7678,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:7740: checking for inflate in -lz" >&5 +echo "configure:7682: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7771,12 +7713,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:7775: checking for inflate in -lgz" >&5 +echo "configure:7717: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7817,15 +7759,15 @@ fi test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:7821: checking for jpeglib.h" >&5 +echo "configure:7763: checking for jpeglib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7848,12 +7790,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:7852: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7794: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7900,10 +7842,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:7904: checking for pow" >&5 +echo "configure:7846: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -7947,15 +7889,15 @@ fi } test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7951: checking for png.h" >&5 +echo "configure:7893: checking for png.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7978,12 +7920,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:7982: checking for png_read_image in -lpng" >&5 +echo "configure:7924: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8017,10 +7959,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:8021: checking for workable png version information" >&5 +echo "configure:7963: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -8028,7 +7970,7 @@ echo "configure:8021: checking for workable png version information" >&5 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; png_status=$?; if test "$png_status" = "0"; then @@ -8071,15 +8013,15 @@ EOF test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:8075: checking for tiffio.h" >&5 +echo "configure:8017: checking for tiffio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8102,12 +8044,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:8106: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:8048: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8157,10 +8099,10 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:8161: checking for X11 graphics libraries" >&5 +echo "configure:8103: checking for X11 graphics libraries" >&5 echo "checking for the Athena widgets" 1>&6 -echo "configure:8164: checking for the Athena widgets" >&5 +echo "configure:8106: checking for the Athena widgets" >&5 case "$with_athena" in "xaw" | "") athena_variant=Xaw athena_3d=no ;; @@ -8174,12 +8116,12 @@ echo "configure:8164: checking for the Athena widgets" >&5 if test "$athena_3d" = "no"; then echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:8178: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 +echo "configure:8120: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8206,12 +8148,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:8210: checking for threeDClassRec in -l$athena_variant" >&5 +echo "configure:8152: checking for threeDClassRec in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8253,12 +8195,12 @@ fi else echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:8257: checking for threeDClassRec in -l$athena_variant" >&5 +echo "configure:8199: checking for threeDClassRec in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8287,12 +8229,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6 -echo "configure:8291: checking for threeDClassRec in -lXaw" >&5 +echo "configure:8233: checking for threeDClassRec in -lXaw" >&5 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8334,15 +8276,15 @@ fi if test "$athena_3d" = "no"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8338: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:8280: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8362,15 +8304,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6 -echo "configure:8366: checking for X11/Xaw/XawInit.h" >&5 +echo "configure:8308: checking for X11/Xaw/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8396,15 +8338,15 @@ fi else ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:8400: checking for X11/$athena_variant/XawInit.h" >&5 +echo "configure:8342: checking for X11/$athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8421,15 +8363,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8425: checking for X11/$athena_variant/ThreeD.h" >&5 +echo "configure:8367: checking for X11/$athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8457,15 +8399,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:8461: checking for $athena_variant/XawInit.h" >&5 +echo "configure:8403: checking for $athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8482,15 +8424,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8486: checking for $athena_variant/ThreeD.h" >&5 +echo "configure:8428: checking for $athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8519,15 +8461,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:8523: checking for X11/Xaw3d/XawInit.h" >&5 +echo "configure:8465: checking for X11/Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8544,15 +8486,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8548: checking for X11/Xaw3d/ThreeD.h" >&5 +echo "configure:8490: checking for X11/Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8584,15 +8526,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:8588: checking for Xaw3d/XawInit.h" >&5 +echo "configure:8530: checking for Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8609,15 +8551,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8613: checking for Xaw3d/ThreeD.h" >&5 +echo "configure:8555: checking for Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8649,15 +8591,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8653: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:8595: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8692,15 +8634,15 @@ fi ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:8696: checking for Xm/Xm.h" >&5 +echo "configure:8638: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8717,12 +8659,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:8721: checking for XmStringFree in -lXm" >&5 +echo "configure:8663: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8762,9 +8704,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:8766: checking for Lesstif" >&5 +echo "configure:8708: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -9097,7 +9039,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:9101: checking for Mule-related features" >&5 +echo "configure:9043: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -9122,15 +9064,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9126: checking for $ac_hdr" >&5 +echo "configure:9068: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9161,12 +9103,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:9165: checking for strerror in -lintl" >&5 +echo "configure:9107: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9210,18 +9152,18 @@ fi echo "checking for Mule input methods" 1>&6 -echo "configure:9214: checking for Mule input methods" >&5 +echo "configure:9156: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:9217: checking for XIM" >&5 +echo "configure:9159: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:9220: checking for XOpenIM in -lX11" >&5 +echo "configure:9162: checking for XOpenIM in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9256,12 +9198,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:9260: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:9202: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9337,15 +9279,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:9341: checking for XFontSet" >&5 +echo "configure:9283: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:9344: checking for XmbDrawString in -lX11" >&5 +echo "configure:9286: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9396,15 +9338,15 @@ EOF 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:9400: checking for wnn/jllib.h" >&5 +echo "configure:9342: checking for wnn/jllib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9429,10 +9371,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9433: checking for $ac_func" >&5 +echo "configure:9375: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9484,12 +9426,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:9488: checking for crypt in -lcrypt" >&5 +echo "configure:9430: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9535,12 +9477,12 @@ fi if test -z "$with_wnn" -o "$with_wnn" = "yes"; then echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:9539: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:9481: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9569,12 +9511,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:9573: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:9515: checking for jl_dic_list_e in -lwnn4" >&5 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn4 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9603,12 +9545,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:9607: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:9549: checking for jl_dic_list_e in -lwnn6" >&5 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9637,12 +9579,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:9641: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:9583: checking for dic_list_e in -lwnn6_fromsrc" >&5 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6_fromsrc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9701,12 +9643,12 @@ EOF if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:9705: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:9647: checking for jl_fi_dic_list in -l$libwnn" >&5 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -l$libwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9752,15 +9694,15 @@ EOF if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:9756: checking for canna/jrkanji.h" >&5 +echo "configure:9698: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9787,15 +9729,15 @@ fi c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:9791: checking for canna/jrkanji.h" >&5 +echo "configure:9733: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9823,15 +9765,15 @@ fi 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:9827: checking for canna/RK.h" >&5 +echo "configure:9769: checking for canna/RK.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9854,12 +9796,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:9858: checking for RkBgnBun in -lRKC" >&5 +echo "configure:9800: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9893,12 +9835,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:9897: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:9839: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9958,12 +9900,12 @@ if test "$need_motif" = "yes" ; then 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:9962: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:9904: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10060,10 +10002,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10064: checking for $ac_func" >&5 +echo "configure:10006: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10121,10 +10063,10 @@ extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10125: checking for $ac_func" >&5 +echo "configure:10067: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10183,12 +10125,12 @@ then echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:10187: checking for kstat_open in -lkstat" >&5 +echo "configure:10129: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10233,12 +10175,12 @@ fi echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:10237: checking for kvm_read in -lkvm" >&5 +echo "configure:10179: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10283,16 +10225,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:10287: checking whether netdb declares h_errno" >&5 +echo "configure:10229: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:10296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -10312,16 +10254,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:10316: checking for sigsetjmp" >&5 +echo "configure:10258: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:10325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10267: \"$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 @@ -10341,11 +10283,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:10345: checking whether localtime caches TZ" >&5 +echo "configure:10287: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -10380,7 +10322,7 @@ main() exit (0); } EOF -if { (eval echo configure:10384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -10410,9 +10352,9 @@ fi if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:10414: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:10356: checking whether gettimeofday accepts one or two arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -10455,19 +10397,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:10459: checking for inline" >&5 +echo "configure:10401: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -10507,17 +10449,17 @@ test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inli # 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:10511: checking for working alloca.h" >&5 +echo "configure:10453: checking for working alloca.h" >&5 cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:10521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -10541,10 +10483,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:10545: checking for alloca" >&5 +echo "configure:10487: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -10611,10 +10553,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:10615: checking whether alloca needs Cray hooks" >&5 +echo "configure:10557: checking whether alloca needs Cray hooks" >&5 cat > conftest.$ac_ext <&6 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:10642: checking for $ac_func" >&5 +echo "configure:10584: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10694,10 +10636,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:10698: checking stack direction for C alloca" >&5 +echo "configure:10640: checking stack direction for C alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -10745,15 +10687,15 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" && if test "$extra_verbos ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:10749: checking for vfork.h" >&5 +echo "configure:10691: checking for vfork.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10781,10 +10723,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:10785: checking for working vfork" >&5 +echo "configure:10727: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -10879,7 +10821,7 @@ main() { } } EOF -if { (eval echo configure:10883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -10905,10 +10847,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:10909: checking for working strcoll" >&5 +echo "configure:10851: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -10918,7 +10860,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:10922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -10946,10 +10888,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10950: checking for $ac_func" >&5 +echo "configure:10892: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11000,10 +10942,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:11004: checking whether getpgrp takes no argument" >&5 +echo "configure:10946: checking whether getpgrp takes no argument" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -11085,10 +11027,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11089: checking for working mmap" >&5 +echo "configure:11031: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -11121,7 +11063,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:11125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -11147,9 +11089,9 @@ test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no if test "$rel_alloc $have_mmap" = "default yes"; then if test "$doug_lea_malloc" = "yes"; then echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6 -echo "configure:11151: checking for M_MMAP_THRESHOLD" >&5 +echo "configure:11093: checking for M_MMAP_THRESHOLD" >&5 cat > conftest.$ac_ext < int main() { @@ -11161,7 +11103,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rel_alloc=no; echo "$ac_t""yes" 1>&6; else @@ -11186,15 +11128,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:11190: checking for termios.h" >&5 +echo "configure:11132: checking for termios.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11237,15 +11179,15 @@ else 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:11241: checking for termio.h" >&5 +echo "configure:11183: checking for termio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11277,10 +11219,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:11281: checking for socket" >&5 +echo "configure:11223: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -11318,15 +11260,15 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then 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:11322: checking for netinet/in.h" >&5 +echo "configure:11264: checking for netinet/in.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11343,15 +11285,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 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:11347: checking for arpa/inet.h" >&5 +echo "configure:11289: checking for arpa/inet.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11376,9 +11318,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:11380: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:11322: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -11389,7 +11331,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -11407,9 +11349,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:11411: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:11353: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -11419,7 +11361,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -11450,10 +11392,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:11454: checking for msgget" >&5 +echo "configure:11396: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -11491,15 +11433,15 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then 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:11495: checking for sys/ipc.h" >&5 +echo "configure:11437: checking for sys/ipc.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11516,15 +11458,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 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:11520: checking for sys/msg.h" >&5 +echo "configure:11462: checking for sys/msg.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11562,15 +11504,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:11566: checking for dirent.h" >&5 +echo "configure:11508: checking for dirent.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11597,15 +11539,15 @@ else 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:11601: checking for sys/dir.h" >&5 +echo "configure:11543: checking for sys/dir.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11638,15 +11580,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:11642: checking for nlist.h" >&5 +echo "configure:11584: checking for nlist.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11676,22 +11618,22 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:11680: checking "for sound support"" >&5 +echo "configure:11622: checking "for sound support"" >&5 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then 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:11687: checking for multimedia/audio_device.h" >&5 +echo "configure:11629: checking for multimedia/audio_device.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11739,12 +11681,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:11743: checking for ALopenport in -laudio" >&5 +echo "configure:11685: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11786,12 +11728,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:11790: checking for AOpenAudio in -lAlib" >&5 +echo "configure:11732: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11840,15 +11782,15 @@ fi 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:11844: checking for ${dir}/soundcard.h" >&5 +echo "configure:11786: checking for ${dir}/soundcard.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11902,15 +11844,15 @@ fi if test "$with_nas_sound" != "no"; then ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6 -echo "configure:11906: checking for audio/audiolib.h" >&5 +echo "configure:11848: checking for audio/audiolib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11928,12 +11870,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 -echo "configure:11932: checking for AuOpenServer in -laudio" >&5 +echo "configure:11874: checking for AuOpenServer in -laudio" >&5 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11983,7 +11925,7 @@ EOF fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -12014,7 +11956,7 @@ if test "$with_esd_sound" != "no"; then # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12018: checking for $ac_word" >&5 +echo "configure:11960: checking for $ac_word" >&5 if test -n "$have_esd_config"; then ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test. @@ -12043,10 +11985,10 @@ fi c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6 -echo "configure:12047: checking for esd_play_stream" >&5 +echo "configure:11989: checking for esd_play_stream" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_esd_play_stream=yes" else @@ -12120,7 +12062,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:12124: checking for TTY-related features" >&5 +echo "configure:12066: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -12136,12 +12078,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:12140: checking for tgetent in -lncurses" >&5 +echo "configure:12082: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12185,15 +12127,15 @@ EOF ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:12189: checking for ncurses/curses.h" >&5 +echo "configure:12131: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12215,15 +12157,15 @@ fi ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:12219: checking for ncurses/term.h" >&5 +echo "configure:12161: checking for ncurses/term.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12253,15 +12195,15 @@ fi 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:12257: checking for ncurses/curses.h" >&5 +echo "configure:12199: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12296,12 +12238,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:12300: checking for tgetent in -l$lib" >&5 +echo "configure:12242: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12343,12 +12285,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:12347: checking for tgetent in -lcurses" >&5 +echo "configure:12289: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12377,12 +12319,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:12381: checking for tgetent in -ltermcap" >&5 +echo "configure:12323: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12441,15 +12383,15 @@ EOF 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:12445: checking for gpm.h" >&5 +echo "configure:12387: checking for gpm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12472,12 +12414,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:12476: checking for Gpm_Open in -lgpm" >&5 +echo "configure:12418: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12538,20 +12480,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:12542: checking for database support" >&5 +echo "configure:12484: checking for database support" >&5 if test "$with_database_gdbm $with_database_dbm" != "no no"; then ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 -echo "configure:12547: checking for ndbm.h" >&5 +echo "configure:12489: checking for ndbm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12581,12 +12523,12 @@ fi if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:12585: checking for dbm_open in -lgdbm" >&5 +echo "configure:12527: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12625,10 +12567,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:12629: checking for dbm_open" >&5 +echo "configure:12571: checking for dbm_open" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -12670,12 +12612,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:12674: checking for dbm_open in -ldbm" >&5 +echo "configure:12616: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12727,10 +12669,10 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:12731: checking for Berkeley db.h" >&5 +echo "configure:12673: checking for Berkeley db.h" >&5 for header in "db/db.h" "db.h"; do cat > conftest.$ac_ext < @@ -12752,7 +12694,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_file="$header"; break else @@ -12768,9 +12710,9 @@ rm -f conftest* if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:12772: checking for Berkeley DB version" >&5 +echo "configure:12714: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -12789,10 +12731,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:12793: checking for $dbfunc" >&5 +echo "configure:12735: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$dbfunc=yes" else @@ -12834,12 +12776,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:12838: checking for $dbfunc in -ldb" >&5 +echo "configure:12780: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12914,12 +12856,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:12918: checking for SOCKSinit in -lsocks" >&5 +echo "configure:12860: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12985,19 +12927,19 @@ fi if test "$with_modules" != "no"; then echo "checking for module support" 1>&6 -echo "configure:12989: checking for module support" >&5 +echo "configure:12931: checking for module support" >&5 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:12993: checking for dlfcn.h" >&5 +echo "configure:12935: checking for dlfcn.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13015,12 +12957,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:13019: checking for dlopen in -ldl" >&5 +echo "configure:12961: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13050,12 +12992,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:13054: checking for dlopen in -lc" >&5 +echo "configure:12996: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13105,12 +13047,12 @@ EOF else echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:13109: checking for shl_load in -ldld" >&5 +echo "configure:13051: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13148,12 +13090,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:13152: checking for dld_init in -ldld" >&5 +echo "configure:13094: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13209,7 +13151,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:13213: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:13155: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -13237,9 +13179,9 @@ if test "$GCC" = "yes"; then XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:13241: checking checking whether we are using GNU C" >&5 +echo "configure:13183: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:13265: checking how to produce PIC code" >&5 +echo "configure:13207: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -13354,18 +13296,18 @@ if test -n "$dll_cflags"; then # Check to make sure the dll_cflags actually works. echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 -echo "configure:13358: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:13300: checking if PIC flag ${dll_cflags} really works" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $dll_cflags -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also @@ -13396,7 +13338,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:13400: checking if C compiler can produce shared libraries" >&5 +echo "configure:13342: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -13447,14 +13389,14 @@ if test -n "$xcldf"; then xe_libs= ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -13479,7 +13421,7 @@ if test -z "$LTLD"; then if test "$XEGCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:13483: checking for ld used by GCC" >&5 +echo "configure:13425: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -13504,7 +13446,7 @@ echo "configure:13483: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:13508: checking for GNU ld" >&5 +echo "configure:13450: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -13542,7 +13484,7 @@ ld_dynamic_link_flags= # Check to see if it really is or isn't GNU ld. echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 -echo "configure:13546: checking if the linker is GNU ld" >&5 +echo "configure:13488: checking if the linker is GNU ld" >&5 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LTLD -v 2>&1 &5; then xe_gnu_ld=yes @@ -13570,7 +13512,7 @@ else # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 -echo "configure:13574: checking whether the linker supports shared libraries" >&5 +echo "configure:13516: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -13785,10 +13727,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13789: checking for $ac_func" >&5 +echo "configure:13731: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13850,11 +13792,11 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:13800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -14150,17 +14092,6 @@ done -LOCKDIR=$lockdir -while true; do - case "$LOCKDIR" in - *\$* ) eval "LOCKDIR=$LOCKDIR" ;; - *) break ;; - esac -done - - - - DOCDIR=$docdir while true; do case "$DOCDIR" in @@ -14642,8 +14573,6 @@ test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." test "$with_socks" = yes && echo " Compiling in support for SOCKS." test "$with_dnet" = yes && echo " Compiling in support for DNET." test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." -test "$with_clash_detection" != "no" && \ - echo " Clash detection will use \"$lockdir\" for locking files." test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." test "$pdump" = yes && echo " Using the new portable dumper." test "$debug" = yes && echo " Compiling in support for extra debugging code." @@ -14834,9 +14763,6 @@ s%@SITEMODULEDIR@%$SITEMODULEDIR%g s%@etcdir@%$etcdir%g s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g s%@ETCDIR@%$ETCDIR%g -s%@lockdir@%$lockdir%g -s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g -s%@LOCKDIR@%$LOCKDIR%g s%@docdir@%$docdir%g s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g s%@DOCDIR@%$DOCDIR%g diff --git a/configure.in b/configure.in index ff22b3f..e02baf7 100644 --- a/configure.in +++ b/configure.in @@ -358,7 +358,6 @@ sitemoduledir='${datadir}/${inststaticdir}/site-modules' pkgdir='${datadir}/${instvardir}/lisp' package_path='' etcdir='${datadir}/${instvardir}/etc' -lockdir='${statedir}/${inststaticdir}/lock' archlibdir='${datadir}/${instvardir}/${configuration}' docdir='${archlibdir}' with_prefix='yes' @@ -746,7 +745,7 @@ The default is to autodetect all sound support."]) dnl Has the user specified one of the path options? prefix | exec_prefix | bindir | datadir | statedir | libdir | \ - mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ + mandir | infodir | infopath | lispdir | etcdir | pkgdir | \ archlibdir | docdir | package_path ) dnl If the value was omitted, get it from the next argument. if test "$valomitted" = "yes"; then @@ -774,7 +773,6 @@ The default is to autodetect all sound support."]) AC_DEFINE(LISPDIR_USER_DEFINED) AC_DEFINE(MODULEDIR_USER_DEFINED) AC_DEFINE(ETCDIR_USER_DEFINED) ;; - statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;; exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; esac @@ -2271,7 +2269,6 @@ else doug_lea_malloc=no fi after_morecore_hook_exists=yes -AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) AC_MSG_CHECKING(whether __after_morecore_hook exists) AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0], @@ -2292,18 +2289,15 @@ elif test "$with_debug_malloc" = "yes" ; then - User chose to use Debugging Malloc." fi -if test "$doug_lea_malloc" = "yes" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" +if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then + GNU_MALLOC_reason=" - Using Doug Lea's new malloc from the GNU C Library." - fi AC_DEFINE(DOUG_LEA_MALLOC) if test "$after_morecore_hook_exists" = "no" ; then GNU_MALLOC_reason=" - Using Doug Lea's new malloc from the Linux C Library." AC_DEFINE(_NO_MALLOC_WARNING_) fi - use_minimal_tagbits=yes fi dnl #### mcheck is broken in all versions of Linux libc and glibc. @@ -4361,17 +4355,6 @@ while true; do done AC_SUBST(ETCDIR) -AC_SUBST(lockdir) -AC_SUBST(LOCKDIR_USER_DEFINED) -LOCKDIR=$lockdir -while true; do - case "$LOCKDIR" in - *\$* ) eval "LOCKDIR=$LOCKDIR" ;; - *) break ;; - esac -done -AC_SUBST(LOCKDIR) - AC_SUBST(docdir) AC_SUBST(DOCDIR_USER_DEFINED) DOCDIR=$docdir @@ -4684,8 +4667,6 @@ test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." test "$with_socks" = yes && echo " Compiling in support for SOCKS." test "$with_dnet" = yes && echo " Compiling in support for DNET." test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." -test "$with_clash_detection" != "no" && \ - echo " Clash detection will use \"$lockdir\" for locking files." test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." test "$pdump" = yes && echo " Using the new portable dumper." test "$debug" = yes && echo " Compiling in support for extra debugging code." diff --git a/etc/Emacs.ad b/etc/Emacs.ad index 39ac03a..65773f1 100644 --- a/etc/Emacs.ad +++ b/etc/Emacs.ad @@ -267,7 +267,7 @@ Ctrlm: ArmAndActivate()\n ! Native Widget translations ! ======================= Emacs*Text*translations: #override\n\ - : widget-focus-in()\n + : widget-focus-in() select-start()\n ! XIM input method style ! ======================= diff --git a/info/internals.info b/info/internals.info index 976473c..32108ed 100644 --- a/info/internals.info +++ b/info/internals.info @@ -44,9 +44,9 @@ internals.info-2: 46628 internals.info-3: 94463 internals.info-4: 143504 internals.info-5: 193454 -internals.info-6: 243016 -internals.info-7: 286633 -internals.info-8: 335499 +internals.info-6: 243017 +internals.info-7: 286634 +internals.info-8: 335500  Tag Table: (Indirect) @@ -115,75 +115,75 @@ Node: Dumping228018 Node: Overview230239 Node: Data descriptions230809 Node: Dumping phase232814 -Node: Object inventory233216 -Node: Address allocation236070 -Node: The header237457 -Node: Data dumping237965 -Node: Pointers dumping238626 -Node: Reloading phase239844 -Node: Remaining issues241605 -Node: Events and the Event Loop242566 -Node: Introduction to Events243016 -Node: Main Loop244965 -Node: Specifics of the Event Gathering Mechanism248540 -Node: Specifics About the Emacs Event260993 -Node: The Event Stream Callback Routines261248 -Node: Other Event Loop Functions261493 -Node: Converting Events262633 -Node: Dispatching Events; The Command Builder263242 -Node: Evaluation; Stack Frames; Bindings263477 -Node: Evaluation263819 -Node: Dynamic Binding; The specbinding Stack; Unwind-Protects270374 -Node: Simple Special Forms272758 -Node: Catch and Throw273541 -Node: Symbols and Variables276116 -Node: Introduction to Symbols276380 -Node: Obarrays277448 -Node: Symbol Values280981 -Node: Buffers and Textual Representation283269 -Node: Introduction to Buffers283927 -Node: The Text in a Buffer286633 -Node: Buffer Lists293783 -Node: Markers and Extents295734 -Node: Bufbytes and Emchars297999 -Node: The Buffer Object298214 -Node: MULE Character Sets and Encodings301694 -Node: Character Sets302756 -Node: Encodings306241 -Node: Japanese EUC (Extended Unix Code)307308 -Node: JIS7308140 -Node: Internal Mule Encodings309490 -Node: Internal String Encoding311320 -Node: Internal Character Encoding313465 -Node: CCL315189 -Node: The Lisp Reader and Compiler321941 -Node: Lstreams322154 -Node: Creating an Lstream323185 -Node: Lstream Types324412 -Node: Lstream Functions324664 -Node: Lstream Methods328230 -Node: Consoles; Devices; Frames; Windows331372 -Node: Introduction to Consoles; Devices; Frames; Windows331687 -Node: Point334220 -Node: Window Hierarchy335499 -Node: The Window Object339947 -Node: The Redisplay Mechanism343384 -Node: Critical Redisplay Sections344176 -Node: Line Start Cache345163 -Node: Redisplay Piece by Piece348399 -Node: Extents350436 -Node: Introduction to Extents350970 -Node: Extent Ordering352112 -Node: Format of the Extent Info353353 -Node: Zero-Length Extents355240 -Node: Mathematics of Extent Ordering356638 -Node: Extent Fragments361395 -Node: Faces362481 -Node: Glyphs362597 -Node: Specifiers365614 -Node: Menus365743 -Node: Subprocesses368001 -Node: Interface to X Windows369977 -Node: Index370148 +Node: Object inventory233217 +Node: Address allocation236071 +Node: The header237458 +Node: Data dumping237966 +Node: Pointers dumping238627 +Node: Reloading phase239845 +Node: Remaining issues241606 +Node: Events and the Event Loop242567 +Node: Introduction to Events243017 +Node: Main Loop244966 +Node: Specifics of the Event Gathering Mechanism248541 +Node: Specifics About the Emacs Event260994 +Node: The Event Stream Callback Routines261249 +Node: Other Event Loop Functions261494 +Node: Converting Events262634 +Node: Dispatching Events; The Command Builder263243 +Node: Evaluation; Stack Frames; Bindings263478 +Node: Evaluation263820 +Node: Dynamic Binding; The specbinding Stack; Unwind-Protects270375 +Node: Simple Special Forms272759 +Node: Catch and Throw273542 +Node: Symbols and Variables276117 +Node: Introduction to Symbols276381 +Node: Obarrays277449 +Node: Symbol Values280982 +Node: Buffers and Textual Representation283270 +Node: Introduction to Buffers283928 +Node: The Text in a Buffer286634 +Node: Buffer Lists293784 +Node: Markers and Extents295735 +Node: Bufbytes and Emchars298000 +Node: The Buffer Object298215 +Node: MULE Character Sets and Encodings301695 +Node: Character Sets302757 +Node: Encodings306242 +Node: Japanese EUC (Extended Unix Code)307309 +Node: JIS7308141 +Node: Internal Mule Encodings309491 +Node: Internal String Encoding311321 +Node: Internal Character Encoding313466 +Node: CCL315190 +Node: The Lisp Reader and Compiler321942 +Node: Lstreams322155 +Node: Creating an Lstream323186 +Node: Lstream Types324413 +Node: Lstream Functions324665 +Node: Lstream Methods328231 +Node: Consoles; Devices; Frames; Windows331373 +Node: Introduction to Consoles; Devices; Frames; Windows331688 +Node: Point334221 +Node: Window Hierarchy335500 +Node: The Window Object339948 +Node: The Redisplay Mechanism343385 +Node: Critical Redisplay Sections344177 +Node: Line Start Cache345164 +Node: Redisplay Piece by Piece348400 +Node: Extents350437 +Node: Introduction to Extents350971 +Node: Extent Ordering352113 +Node: Format of the Extent Info353354 +Node: Zero-Length Extents355241 +Node: Mathematics of Extent Ordering356639 +Node: Extent Fragments361396 +Node: Faces362482 +Node: Glyphs362598 +Node: Specifiers365615 +Node: Menus365744 +Node: Subprocesses368002 +Node: Interface to X Windows369978 +Node: Index370149  End Tag Table diff --git a/info/lispref.info b/info/lispref.info index 320da86..d3cf890 100644 --- a/info/lispref.info +++ b/info/lispref.info @@ -63,41 +63,41 @@ lispref.info-9: 388779 lispref.info-10: 438231 lispref.info-11: 486459 lispref.info-12: 536231 -lispref.info-13: 584130 -lispref.info-14: 632353 -lispref.info-15: 680607 -lispref.info-16: 726799 -lispref.info-17: 775532 -lispref.info-18: 825530 -lispref.info-19: 875221 -lispref.info-20: 924062 -lispref.info-21: 972870 -lispref.info-22: 1019178 -lispref.info-23: 1068608 -lispref.info-24: 1117447 -lispref.info-25: 1162793 -lispref.info-26: 1210215 -lispref.info-27: 1255841 -lispref.info-28: 1305126 -lispref.info-29: 1352976 -lispref.info-30: 1401200 -lispref.info-31: 1450877 -lispref.info-32: 1499202 -lispref.info-33: 1548500 -lispref.info-34: 1589835 -lispref.info-35: 1636140 -lispref.info-36: 1685471 -lispref.info-37: 1733879 -lispref.info-38: 1782970 -lispref.info-39: 1832447 -lispref.info-40: 1880005 -lispref.info-41: 1924826 -lispref.info-42: 1962038 -lispref.info-43: 2006636 -lispref.info-44: 2053069 -lispref.info-45: 2093862 -lispref.info-46: 2143132 -lispref.info-47: 2156997 +lispref.info-13: 584131 +lispref.info-14: 632354 +lispref.info-15: 680608 +lispref.info-16: 726800 +lispref.info-17: 775533 +lispref.info-18: 825531 +lispref.info-19: 875222 +lispref.info-20: 924063 +lispref.info-21: 973599 +lispref.info-22: 1021180 +lispref.info-23: 1067504 +lispref.info-24: 1116677 +lispref.info-25: 1165729 +lispref.info-26: 1215204 +lispref.info-27: 1260830 +lispref.info-28: 1310115 +lispref.info-29: 1357965 +lispref.info-30: 1406189 +lispref.info-31: 1455866 +lispref.info-32: 1504191 +lispref.info-33: 1553489 +lispref.info-34: 1594822 +lispref.info-35: 1641127 +lispref.info-36: 1690344 +lispref.info-37: 1727314 +lispref.info-38: 1776244 +lispref.info-39: 1826065 +lispref.info-40: 1872992 +lispref.info-41: 1921089 +lispref.info-42: 1969206 +lispref.info-43: 2017513 +lispref.info-44: 2066217 +lispref.info-45: 2115779 +lispref.info-46: 2158365 +lispref.info-47: 2187578  Tag Table: (Indirect) @@ -327,589 +327,591 @@ Node: Hooks for Loading553011 Node: Byte Compilation553728 Node: Speed of Byte-Code555645 Node: Compilation Functions556852 -Node: Docs and Compilation563239 -Node: Dynamic Loading565892 -Node: Eval During Compile568256 -Node: Compiled-Function Objects569521 -Node: Disassembly574319 -Node: Debugging581573 -Node: Debugger582985 -Node: Error Debugging584130 -Node: Infinite Loops586883 -Node: Function Debugging588127 -Node: Explicit Debug590917 -Node: Using Debugger591688 -Node: Debugger Commands593550 -Node: Invoking the Debugger597867 -Node: Internals of Debugger601782 -Node: Syntax Errors606669 -Node: Excess Open607917 -Node: Excess Close609792 -Node: Compilation Errors611213 -Node: Edebug612501 -Node: Using Edebug614609 -Node: Instrumenting617306 -Node: Edebug Execution Modes620795 -Node: Jumping623905 -Node: Edebug Misc626248 -Node: Breakpoints627637 -Node: Global Break Condition630443 -Node: Embedded Breakpoints631398 -Node: Trapping Errors632353 -Node: Edebug Views634429 -Node: Edebug Eval636394 -Node: Eval List637571 -Node: Reading in Edebug640956 -Node: Printing in Edebug641755 -Node: Tracing643470 -Node: Coverage Testing645356 -Node: The Outside Context647397 -Node: Checking Whether to Stop648346 -Node: Edebug Display Update648993 -Node: Edebug Recursive Edit651016 -Node: Instrumenting Macro Calls652671 -Node: Specification List655153 -Node: Backtracking664564 -Node: Debugging Backquote666502 -Node: Specification Examples670208 -Node: Edebug Options672275 -Node: Read and Print677612 -Node: Streams Intro678589 -Node: Input Streams680607 -Node: Input Functions685508 -Node: Output Streams687568 -Node: Output Functions691619 -Node: Output Variables695919 -Node: Minibuffers700718 -Node: Intro to Minibuffers701870 -Node: Text from Minibuffer704058 -Node: Object from Minibuffer709144 -Node: Minibuffer History713239 -Node: Completion716218 -Node: Basic Completion718193 -Node: Minibuffer Completion723222 -Node: Completion Commands726799 -Node: High-Level Completion731456 -Node: Reading File Names736198 -Node: Programmed Completion739890 -Node: Yes-or-No Queries742272 -Node: Multiple Queries748009 -Node: Reading a Password752076 -Node: Minibuffer Misc753413 -Node: Command Loop758283 -Node: Command Overview759627 -Node: Defining Commands762905 -Node: Using Interactive763653 -Node: Interactive Codes768426 -Node: Interactive Examples774218 -Node: Interactive Call775532 -Node: Command Loop Info780933 -Node: Events785912 -Node: Event Types787372 -Node: Event Contents789295 -Node: Event Predicates793771 -Node: Accessing Mouse Event Positions795096 -Node: Frame-Level Event Position Info795795 -Node: Window-Level Event Position Info796835 -Node: Event Text Position Info798599 -Node: Event Glyph Position Info801091 -Node: Event Toolbar Position Info802414 -Node: Other Event Position Info803085 -Node: Accessing Other Event Info803494 -Node: Working With Events805114 -Node: Converting Events811102 -Node: Reading Input814054 -Node: Key Sequence Input815056 -Node: Reading One Event817010 -Node: Dispatching an Event819827 -Node: Quoted Character Input820278 -Node: Peeking and Discarding821626 -Node: Waiting825530 -Node: Quitting827838 -Node: Prefix Command Arguments832246 -Node: Recursive Editing837333 -Node: Disabling Commands842129 -Node: Command History844197 -Node: Keyboard Macros845934 -Node: Keymaps848151 -Node: Keymap Terminology849728 -Node: Format of Keymaps852657 -Node: Creating Keymaps853068 -Node: Inheritance and Keymaps855147 -Node: Key Sequences857519 -Node: Prefix Keys862315 -Node: Active Keymaps865900 -Node: Key Lookup875221 -Node: Functions for Key Lookup880384 -Node: Changing Key Bindings886081 -Node: Key Binding Commands892978 -Node: Scanning Keymaps895043 -Node: Other Keymap Functions903554 -Node: Menus904176 -Node: Menu Format904768 -Node: Menubar Format913414 -Node: Menubar914039 -Node: Modifying Menus917152 -Node: Menu Filters922166 -Node: Pop-Up Menus924062 -Node: Menu Accelerators926267 -Node: Creating Menu Accelerators927023 -Node: Keyboard Menu Traversal928383 -Node: Menu Accelerator Functions929110 -Node: Buffers Menu932187 -Node: Dialog Boxes933481 -Node: Dialog Box Format933648 -Node: Dialog Box Functions935073 -Node: Toolbar935470 -Node: Toolbar Intro935791 -Node: Toolbar Descriptor Format938200 -Node: Specifying the Toolbar942694 -Node: Other Toolbar Variables946299 -Node: Gutter950725 -Node: Gutter Intro951201 -Node: Gutter Descriptor Format953198 -Node: Specifying a Gutter957652 -Node: Other Gutter Variables961185 -Node: Common Gutter Widgets965570 -Node: Buffer Tabs966562 -Node: Progress Bars966703 -Node: Scrollbars966848 -Node: Drag and Drop966983 -Node: Supported Protocols968059 -Node: OffiX DND968562 -Node: CDE dt969569 -Node: MSWindows OLE970160 -Node: Loose ends970331 -Node: Drop Interface970723 -Node: Drag Interface971745 -Node: Modes971919 -Node: Major Modes972870 -Node: Major Mode Conventions975785 -Node: Example Major Modes981740 -Node: Auto Major Mode989773 -Node: Mode Help997221 -Node: Derived Modes998322 -Node: Minor Modes1000513 -Node: Minor Mode Conventions1001815 -Node: Keymaps and Minor Modes1004678 -Node: Modeline Format1005513 -Node: Modeline Data1007281 -Node: Modeline Variables1011551 -Node: %-Constructs1016267 -Node: Hooks1019178 -Node: Documentation1025940 -Node: Documentation Basics1027363 -Node: Accessing Documentation1030413 -Node: Keys in Documentation1036692 -Node: Describing Characters1040171 -Node: Help Functions1042520 -Node: Obsoleteness1048971 -Node: Files1051965 -Node: Visiting Files1053890 -Node: Visiting Functions1055395 -Node: Subroutines of Visiting1060442 -Node: Saving Buffers1062515 -Node: Reading from Files1068608 -Node: Writing to Files1070765 -Node: File Locks1073482 -Node: Information about Files1076535 -Node: Testing Accessibility1077296 -Node: Kinds of Files1081036 -Node: Truenames1082717 -Node: File Attributes1083719 -Node: Changing File Attributes1088858 -Node: File Names1094264 -Node: File Name Components1095873 -Node: Directory Names1098974 -Node: Relative File Names1102427 -Node: File Name Expansion1103505 -Node: Unique File Names1107412 -Node: File Name Completion1109027 -Node: User Name Completion1111688 -Node: Contents of Directories1113028 -Node: Create/Delete Dirs1116341 -Node: Magic File Names1117447 -Node: Partial Files1123077 -Node: Intro to Partial Files1123305 -Node: Creating a Partial File1124545 -Node: Detached Partial Files1125480 -Node: Format Conversion1126602 -Node: Files and MS-DOS1133118 -Node: Backups and Auto-Saving1135182 -Node: Backup Files1135857 -Node: Making Backups1137254 -Node: Rename or Copy1140003 -Node: Numbered Backups1142496 -Node: Backup Names1144731 -Node: Auto-Saving1148023 -Node: Reverting1156165 -Node: Buffers1159323 -Node: Buffer Basics1160740 -Node: Current Buffer1162793 -Node: Buffer Names1167481 -Node: Buffer File Name1170686 -Node: Buffer Modification1174805 -Node: Modification Time1176998 -Node: Read Only Buffers1180373 -Node: The Buffer List1182791 -Node: Creating Buffers1187621 -Node: Killing Buffers1189767 -Node: Indirect Buffers1193498 -Node: Windows1196070 -Node: Basic Windows1197548 -Node: Splitting Windows1200646 -Node: Deleting Windows1207535 -Node: Selecting Windows1210215 -Node: Cyclic Window Ordering1213344 -Node: Buffers and Windows1217968 -Node: Displaying Buffers1219809 -Node: Choosing Window1224985 -Node: Window Point1232701 -Node: Window Start1234747 -Node: Vertical Scrolling1239237 -Node: Horizontal Scrolling1245374 -Node: Size of Window1248883 -Node: Position of Window1253601 -Node: Resizing Windows1255841 -Node: Window Configurations1261270 -Node: Frames1264695 -Node: Creating Frames1267036 -Node: Frame Properties1268377 -Node: Property Access1269193 -Node: Initial Properties1270042 -Node: X Frame Properties1272528 -Node: Size and Position1277162 -Node: Frame Name1279158 -Node: Frame Titles1280072 -Node: Deleting Frames1281896 -Node: Finding All Frames1282496 -Node: Frames and Windows1284490 -Node: Minibuffers and Frames1286195 -Node: Input Focus1287113 -Node: Visibility of Frames1290190 -Node: Raising and Lowering1292109 -Node: Frame Configurations1294485 -Node: Frame Hooks1295079 -Node: Consoles and Devices1296884 -Node: Basic Console Functions1299627 -Node: Basic Device Functions1300050 -Node: Console Types and Device Classes1300766 -Node: Connecting to a Console or Device1302963 -Node: The Selected Console and Device1305126 -Node: Console and Device I/O1306152 -Node: Positions1306916 -Node: Point1307885 -Node: Motion1310975 -Node: Character Motion1311742 -Node: Word Motion1313979 -Node: Buffer End Motion1315480 -Node: Text Lines1316977 -Node: Screen Lines1321572 -Node: List Motion1325635 -Node: Skipping Characters1329043 -Node: Excursions1331262 -Node: Narrowing1334294 -Node: Markers1339619 -Node: Overview of Markers1340525 -Node: Predicates on Markers1345217 -Node: Creating Markers1346463 -Node: Information from Markers1350500 -Node: Changing Markers1351598 -Node: The Mark1352976 -Node: The Region1361470 -Node: Text1367156 -Node: Near Point1369855 -Node: Buffer Contents1374042 -Node: Comparing Text1375448 -Node: Insertion1376856 -Node: Commands for Insertion1380698 -Node: Deletion1383654 -Node: User-Level Deletion1387249 -Node: The Kill Ring1391410 -Node: Kill Ring Concepts1393584 -Node: Kill Functions1394638 -Node: Yank Commands1396543 -Node: Low-Level Kill Ring1398414 -Node: Internals of Kill Ring1401200 -Node: Undo1403980 -Node: Maintaining Undo1408309 -Node: Filling1410929 -Node: Margins1416923 -Node: Auto Filling1420852 -Node: Sorting1422033 -Node: Columns1431333 -Node: Indentation1433849 -Node: Primitive Indent1434628 -Node: Mode-Specific Indent1435872 -Node: Region Indent1438383 -Node: Relative Indent1441331 -Node: Indent Tabs1443713 -Node: Motion by Indent1445034 -Node: Case Changes1445813 -Node: Text Properties1449064 -Node: Examining Properties1450877 -Node: Changing Properties1452744 -Node: Property Search1456335 -Node: Special Properties1461046 -Node: Saving Properties1461327 -Node: Substitution1464469 -Node: Registers1467739 -Node: Transposition1470282 -Node: Change Hooks1471176 -Node: Transformations1473216 -Node: Searching and Matching1477601 -Node: String Search1478732 -Node: Regular Expressions1483456 -Node: Syntax of Regexps1484823 -Node: Regexp Example1499202 -Node: Regexp Search1501372 -Node: POSIX Regexps1507460 -Node: Search and Replace1509295 -Node: Match Data1512660 -Node: Simple Match Data1513790 -Node: Replacing Match1518055 -Node: Entire Match Data1520389 -Node: Saving Match Data1522380 -Node: Searching and Case1523761 -Node: Standard Regexps1525795 -Node: Syntax Tables1527993 -Node: Syntax Basics1529107 -Node: Syntax Descriptors1532079 -Node: Syntax Class Table1533929 -Node: Syntax Flags1539967 -Node: Syntax Table Functions1543184 -Node: Motion and Syntax1547048 -Node: Parsing Expressions1548500 -Node: Standard Syntax Tables1554569 -Node: Syntax Table Internals1555413 -Node: Abbrevs1556439 -Node: Abbrev Mode1558242 -Node: Abbrev Tables1558962 -Node: Defining Abbrevs1560495 -Node: Abbrev Files1562400 -Node: Abbrev Expansion1564173 -Node: Standard Abbrev Tables1568804 -Node: Extents1569963 -Node: Intro to Extents1571206 -Node: Creating and Modifying Extents1575200 -Node: Extent Endpoints1576707 -Node: Finding Extents1579970 -Node: Mapping Over Extents1583718 -Node: Extent Properties1589835 -Node: Detached Extents1599979 -Node: Extent Parents1601838 -Node: Duplicable Extents1603532 -Node: Extents and Events1606753 -Node: Atomic Extents1608660 -Node: Specifiers1609107 -Node: Introduction to Specifiers1611220 -Node: Specifiers In-Depth1613530 -Node: Specifier Instancing1618442 -Node: Specifier Types1621704 -Node: Adding Specifications1626778 -Node: Retrieving Specifications1636140 -Node: Specifier Tag Functions1639875 -Node: Specifier Instancing Functions1643109 -Node: Specifier Example1646516 -Node: Creating Specifiers1649672 -Node: Specifier Validation Functions1651921 -Node: Other Specification Functions1654305 -Node: Faces and Window-System Objects1658124 -Node: Faces1658448 -Node: Merging Faces1660065 -Node: Basic Face Functions1662026 -Node: Face Properties1664124 -Node: Face Convenience Functions1674366 -Node: Other Face Display Functions1677496 -Node: Fonts1678309 -Node: Font Specifiers1679010 -Node: Font Instances1679251 -Node: Font Instance Names1680218 -Node: Font Instance Size1681059 -Node: Font Instance Characteristics1682345 -Node: Font Convenience Functions1683514 -Node: Colors1684804 -Node: Color Specifiers1685244 -Node: Color Instances1685471 -Node: Color Instance Properties1686215 -Node: Color Convenience Functions1686841 -Node: Glyphs1687894 -Node: Glyph Functions1689486 -Node: Creating Glyphs1689893 -Node: Glyph Properties1691480 -Node: Glyph Convenience Functions1700647 -Node: Glyph Dimensions1704594 -Node: Images1705674 -Node: Image Specifiers1706123 -Node: Image Instantiator Conversion1717472 -Node: Image Instances1718837 -Node: Image Instance Types1719588 -Node: Image Instance Functions1722243 -Node: Glyph Types1726812 -Node: Mouse Pointer1728584 -Node: Redisplay Glyphs1731587 -Node: Subwindows1732620 -Node: Annotations1732863 -Node: Annotation Basics1733879 -Node: Annotation Primitives1737817 -Node: Annotation Properties1739146 -Node: Locating Annotations1742186 -Node: Margin Primitives1743023 -Node: Annotation Hooks1744917 -Node: Display1745577 -Node: Refresh Screen1746555 -Node: Truncation1748466 -Node: The Echo Area1750991 -Node: Warnings1757426 -Node: Invisible Text1761862 -Node: Selective Display1764441 -Node: Overlay Arrow1768567 -Node: Temporary Displays1769920 -Node: Blinking1774041 -Node: Usual Display1776226 -Node: Display Tables1778775 -Node: Display Table Format1779579 -Node: Active Display Table1781021 -Node: Character Descriptors1782213 -Node: Beeping1782970 -Node: Hash Tables1787736 -Node: Introduction to Hash Tables1788344 -Node: Working With Hash Tables1794367 -Node: Weak Hash Tables1795484 -Node: Range Tables1797283 -Node: Introduction to Range Tables1797972 -Node: Working With Range Tables1798403 -Node: Databases1799288 -Node: Connecting to a Database1799587 -Node: Working With a Database1800678 -Node: Other Database Functions1801536 -Node: Processes1802110 -Node: Subprocess Creation1804334 -Node: Synchronous Processes1807623 -Node: MS-DOS Subprocesses1814341 -Node: Asynchronous Processes1815415 -Node: Deleting Processes1819128 -Node: Process Information1820999 -Node: Input to Processes1824925 -Node: Signals to Processes1827215 -Node: Output from Processes1831635 -Node: Process Buffers1832447 -Node: Filter Functions1835314 -Node: Accepting Output1840884 -Node: Sentinels1842411 -Node: Process Window Size1845901 -Node: Transaction Queues1846250 -Node: Network1847948 -Node: System Interface1849782 -Node: Starting Up1851052 -Node: Start-up Summary1851646 -Node: Init File1855200 -Node: Terminal-Specific1857581 -Node: Command Line Arguments1860740 -Node: Getting Out1864229 -Node: Killing XEmacs1864798 -Node: Suspending XEmacs1866467 -Node: System Environment1869809 -Node: User Identification1876476 -Node: Time of Day1880005 -Node: Time Conversion1882792 -Node: Timers1887832 -Node: Terminal Input1890005 -Node: Input Modes1890508 -Node: Translating Input1892921 -Node: Recording Input1897086 -Node: Terminal Output1899186 -Node: Flow Control1902809 -Node: Batch Mode1906601 -Node: X-Windows1907983 -Node: X Selections1908854 -Node: X Server1911064 -Node: Resources1911515 -Node: Server Data1916824 -Node: Grabs1918031 -Node: X Miscellaneous1919611 -Node: ToolTalk Support1921996 -Node: XEmacs ToolTalk API Summary1922213 -Node: Sending Messages1923513 -Node: Example of Sending Messages1923764 -Node: Elisp Interface for Sending Messages1924826 -Node: Receiving Messages1931218 -Node: Example of Receiving Messages1931441 -Node: Elisp Interface for Receiving Messages1932277 -Node: LDAP Support1936102 -Node: Building XEmacs with LDAP support1936596 -Node: XEmacs LDAP API1937573 -Node: LDAP Variables1938625 -Node: The High-Level LDAP API1941225 -Node: The Low-Level LDAP API1944688 -Node: The LDAP Lisp Object1945519 -Node: Opening and Closing a LDAP Connection1946072 -Node: Low-level Operations on a LDAP Server1947872 -Node: LDAP Internationalization1950566 -Node: LDAP Internationalization Variables1951471 -Node: Encoder/Decoder Functions1953200 -Node: Syntax of Search Filters1954239 -Node: PostgreSQL Support1955537 -Node: Building XEmacs with PostgreSQL support1955932 -Node: XEmacs PostgreSQL libpq API1957199 -Node: libpq Lisp Variables1959074 -Node: libpq Lisp Symbols and DataTypes1962038 -Node: Synchronous Interface Functions1975278 -Node: Asynchronous Interface Functions1979769 -Node: Large Object Support1983270 -Node: Other libpq Functions1983897 -Node: Unimplemented libpq Functions1986932 -Node: XEmacs PostgreSQL libpq Examples1992251 -Node: Internationalization1998342 -Node: I18N Levels 1 and 21998685 -Node: I18N Level 31999391 -Node: Level 3 Basics1999672 -Node: Level 3 Primitives2000505 -Node: Dynamic Messaging2002111 -Node: Domain Specification2002574 -Node: Documentation String Extraction2004477 -Node: I18N Level 42005395 -Node: MULE2005587 -Node: Internationalization Terminology2006636 -Node: Charsets2018835 -Node: Charset Properties2019531 -Node: Basic Charset Functions2024246 -Node: Charset Property Functions2026427 -Node: Predefined Charsets2028469 -Node: MULE Characters2031389 -Node: Composite Characters2032236 -Node: Coding Systems2033496 -Node: Coding System Types2035636 -Node: ISO 20222039620 -Node: EOL Conversion2051897 -Node: Coding System Properties2053069 -Node: Basic Coding System Functions2057386 -Node: Coding System Property Functions2059420 -Node: Encoding and Decoding Text2059978 -Node: Detection of Textual Encoding2061114 -Node: Big5 and Shift-JIS Functions2062650 -Node: Predefined Coding Systems2063776 -Node: CCL2075870 -Node: CCL Syntax2078974 -Node: CCL Statements2080550 -Node: CCL Expressions2085198 -Node: Calling CCL2087737 -Node: CCL Examples2090726 -Node: Category Tables2090863 -Node: Tips2093221 -Node: Style Tips2093862 -Node: Compilation Tips2103381 -Node: Documentation Tips2105295 -Node: Comment Tips2110804 -Node: Library Headers2113806 -Node: Building XEmacs and Object Allocation2117778 -Node: Building XEmacs2118661 -Node: Pure Storage2124996 -Node: Garbage Collection2127784 -Node: Standard Errors2138923 -Node: Standard Buffer-Local Variables2143132 -Node: Standard Keymaps2145765 -Node: Standard Hooks2149497 -Node: Index2156997 +Node: Docs and Compilation563240 +Node: Dynamic Loading565893 +Node: Eval During Compile568257 +Node: Compiled-Function Objects569522 +Node: Disassembly574320 +Node: Debugging581574 +Node: Debugger582986 +Node: Error Debugging584131 +Node: Infinite Loops586884 +Node: Function Debugging588128 +Node: Explicit Debug590918 +Node: Using Debugger591689 +Node: Debugger Commands593551 +Node: Invoking the Debugger597868 +Node: Internals of Debugger601783 +Node: Syntax Errors606670 +Node: Excess Open607918 +Node: Excess Close609793 +Node: Compilation Errors611214 +Node: Edebug612502 +Node: Using Edebug614610 +Node: Instrumenting617307 +Node: Edebug Execution Modes620796 +Node: Jumping623906 +Node: Edebug Misc626249 +Node: Breakpoints627638 +Node: Global Break Condition630444 +Node: Embedded Breakpoints631399 +Node: Trapping Errors632354 +Node: Edebug Views634430 +Node: Edebug Eval636395 +Node: Eval List637572 +Node: Reading in Edebug640957 +Node: Printing in Edebug641756 +Node: Tracing643471 +Node: Coverage Testing645357 +Node: The Outside Context647398 +Node: Checking Whether to Stop648347 +Node: Edebug Display Update648994 +Node: Edebug Recursive Edit651017 +Node: Instrumenting Macro Calls652672 +Node: Specification List655154 +Node: Backtracking664565 +Node: Debugging Backquote666503 +Node: Specification Examples670209 +Node: Edebug Options672276 +Node: Read and Print677613 +Node: Streams Intro678590 +Node: Input Streams680608 +Node: Input Functions685509 +Node: Output Streams687569 +Node: Output Functions691620 +Node: Output Variables695920 +Node: Minibuffers700719 +Node: Intro to Minibuffers701871 +Node: Text from Minibuffer704059 +Node: Object from Minibuffer709145 +Node: Minibuffer History713240 +Node: Completion716219 +Node: Basic Completion718194 +Node: Minibuffer Completion723223 +Node: Completion Commands726800 +Node: High-Level Completion731457 +Node: Reading File Names736199 +Node: Programmed Completion739891 +Node: Yes-or-No Queries742273 +Node: Multiple Queries748010 +Node: Reading a Password752077 +Node: Minibuffer Misc753414 +Node: Command Loop758284 +Node: Command Overview759628 +Node: Defining Commands762906 +Node: Using Interactive763654 +Node: Interactive Codes768427 +Node: Interactive Examples774219 +Node: Interactive Call775533 +Node: Command Loop Info780934 +Node: Events785913 +Node: Event Types787373 +Node: Event Contents789296 +Node: Event Predicates793772 +Node: Accessing Mouse Event Positions795097 +Node: Frame-Level Event Position Info795796 +Node: Window-Level Event Position Info796836 +Node: Event Text Position Info798600 +Node: Event Glyph Position Info801092 +Node: Event Toolbar Position Info802415 +Node: Other Event Position Info803086 +Node: Accessing Other Event Info803495 +Node: Working With Events805115 +Node: Converting Events811103 +Node: Reading Input814055 +Node: Key Sequence Input815057 +Node: Reading One Event817011 +Node: Dispatching an Event819828 +Node: Quoted Character Input820279 +Node: Peeking and Discarding821627 +Node: Waiting825531 +Node: Quitting827839 +Node: Prefix Command Arguments832247 +Node: Recursive Editing837334 +Node: Disabling Commands842130 +Node: Command History844198 +Node: Keyboard Macros845935 +Node: Keymaps848152 +Node: Keymap Terminology849729 +Node: Format of Keymaps852658 +Node: Creating Keymaps853069 +Node: Inheritance and Keymaps855148 +Node: Key Sequences857520 +Node: Prefix Keys862316 +Node: Active Keymaps865901 +Node: Key Lookup875222 +Node: Functions for Key Lookup880385 +Node: Changing Key Bindings886082 +Node: Key Binding Commands892979 +Node: Scanning Keymaps895044 +Node: Other Keymap Functions903555 +Node: Menus904177 +Node: Menu Format904769 +Node: Menubar Format913415 +Node: Menubar914040 +Node: Modifying Menus917153 +Node: Menu Filters922167 +Node: Pop-Up Menus924063 +Node: Menu Accelerators926268 +Node: Creating Menu Accelerators927024 +Node: Keyboard Menu Traversal928384 +Node: Menu Accelerator Functions929111 +Node: Buffers Menu932188 +Node: Dialog Boxes933482 +Node: Dialog Box Format933649 +Node: Dialog Box Functions935074 +Node: Toolbar935471 +Node: Toolbar Intro935906 +Node: Creating Toolbar938306 +Node: Toolbar Descriptor Format939223 +Node: Specifying the Toolbar943720 +Node: Other Toolbar Variables947325 +Node: Gutter951751 +Node: Gutter Intro952340 +Node: Creating Gutter954343 +Node: Gutter Descriptor Format957225 +Node: Specifying a Gutter961682 +Node: Other Gutter Variables965215 +Node: Common Gutter Widgets969600 +Node: Buffer Tabs970592 +Node: Progress Bars970733 +Node: Scrollbars970878 +Node: Drag and Drop971013 +Node: Supported Protocols972089 +Node: OffiX DND972592 +Node: CDE dt973599 +Node: MSWindows OLE974190 +Node: Loose ends974361 +Node: Drop Interface974753 +Node: Drag Interface975775 +Node: Modes975949 +Node: Major Modes976900 +Node: Major Mode Conventions979815 +Node: Example Major Modes985770 +Node: Auto Major Mode993803 +Node: Mode Help1001251 +Node: Derived Modes1002352 +Node: Minor Modes1004543 +Node: Minor Mode Conventions1005845 +Node: Keymaps and Minor Modes1008708 +Node: Modeline Format1009543 +Node: Modeline Data1011311 +Node: Modeline Variables1016464 +Node: %-Constructs1021180 +Node: Hooks1024167 +Node: Documentation1030929 +Node: Documentation Basics1032352 +Node: Accessing Documentation1035402 +Node: Keys in Documentation1041681 +Node: Describing Characters1045160 +Node: Help Functions1047509 +Node: Obsoleteness1053960 +Node: Files1056954 +Node: Visiting Files1058879 +Node: Visiting Functions1060384 +Node: Subroutines of Visiting1065431 +Node: Saving Buffers1067504 +Node: Reading from Files1073597 +Node: Writing to Files1075754 +Node: File Locks1078471 +Node: Information about Files1081524 +Node: Testing Accessibility1082285 +Node: Kinds of Files1086025 +Node: Truenames1087706 +Node: File Attributes1088708 +Node: Changing File Attributes1093847 +Node: File Names1099253 +Node: File Name Components1100862 +Node: Directory Names1103963 +Node: Relative File Names1107416 +Node: File Name Expansion1108494 +Node: Unique File Names1112401 +Node: File Name Completion1114016 +Node: User Name Completion1116677 +Node: Contents of Directories1118017 +Node: Create/Delete Dirs1121330 +Node: Magic File Names1122436 +Node: Partial Files1128066 +Node: Intro to Partial Files1128294 +Node: Creating a Partial File1129534 +Node: Detached Partial Files1130469 +Node: Format Conversion1131591 +Node: Files and MS-DOS1138107 +Node: Backups and Auto-Saving1140171 +Node: Backup Files1140846 +Node: Making Backups1142243 +Node: Rename or Copy1144992 +Node: Numbered Backups1147485 +Node: Backup Names1149720 +Node: Auto-Saving1153012 +Node: Reverting1161154 +Node: Buffers1164312 +Node: Buffer Basics1165729 +Node: Current Buffer1167782 +Node: Buffer Names1172470 +Node: Buffer File Name1175675 +Node: Buffer Modification1179794 +Node: Modification Time1181987 +Node: Read Only Buffers1185362 +Node: The Buffer List1187780 +Node: Creating Buffers1192610 +Node: Killing Buffers1194756 +Node: Indirect Buffers1198487 +Node: Windows1201059 +Node: Basic Windows1202537 +Node: Splitting Windows1205635 +Node: Deleting Windows1212524 +Node: Selecting Windows1215204 +Node: Cyclic Window Ordering1218333 +Node: Buffers and Windows1222957 +Node: Displaying Buffers1224798 +Node: Choosing Window1229974 +Node: Window Point1237690 +Node: Window Start1239736 +Node: Vertical Scrolling1244226 +Node: Horizontal Scrolling1250363 +Node: Size of Window1253872 +Node: Position of Window1258590 +Node: Resizing Windows1260830 +Node: Window Configurations1266259 +Node: Frames1269684 +Node: Creating Frames1272025 +Node: Frame Properties1273366 +Node: Property Access1274182 +Node: Initial Properties1275031 +Node: X Frame Properties1277517 +Node: Size and Position1282151 +Node: Frame Name1284147 +Node: Frame Titles1285061 +Node: Deleting Frames1286885 +Node: Finding All Frames1287485 +Node: Frames and Windows1289479 +Node: Minibuffers and Frames1291184 +Node: Input Focus1292102 +Node: Visibility of Frames1295179 +Node: Raising and Lowering1297098 +Node: Frame Configurations1299474 +Node: Frame Hooks1300068 +Node: Consoles and Devices1301873 +Node: Basic Console Functions1304616 +Node: Basic Device Functions1305039 +Node: Console Types and Device Classes1305755 +Node: Connecting to a Console or Device1307952 +Node: The Selected Console and Device1310115 +Node: Console and Device I/O1311141 +Node: Positions1311905 +Node: Point1312874 +Node: Motion1315964 +Node: Character Motion1316731 +Node: Word Motion1318968 +Node: Buffer End Motion1320469 +Node: Text Lines1321966 +Node: Screen Lines1326561 +Node: List Motion1330624 +Node: Skipping Characters1334032 +Node: Excursions1336251 +Node: Narrowing1339283 +Node: Markers1344608 +Node: Overview of Markers1345514 +Node: Predicates on Markers1350206 +Node: Creating Markers1351452 +Node: Information from Markers1355489 +Node: Changing Markers1356587 +Node: The Mark1357965 +Node: The Region1366459 +Node: Text1372145 +Node: Near Point1374844 +Node: Buffer Contents1379031 +Node: Comparing Text1380437 +Node: Insertion1381845 +Node: Commands for Insertion1385687 +Node: Deletion1388643 +Node: User-Level Deletion1392238 +Node: The Kill Ring1396399 +Node: Kill Ring Concepts1398573 +Node: Kill Functions1399627 +Node: Yank Commands1401532 +Node: Low-Level Kill Ring1403403 +Node: Internals of Kill Ring1406189 +Node: Undo1408969 +Node: Maintaining Undo1413298 +Node: Filling1415918 +Node: Margins1421912 +Node: Auto Filling1425841 +Node: Sorting1427022 +Node: Columns1436322 +Node: Indentation1438838 +Node: Primitive Indent1439617 +Node: Mode-Specific Indent1440861 +Node: Region Indent1443372 +Node: Relative Indent1446320 +Node: Indent Tabs1448702 +Node: Motion by Indent1450023 +Node: Case Changes1450802 +Node: Text Properties1454053 +Node: Examining Properties1455866 +Node: Changing Properties1457733 +Node: Property Search1461324 +Node: Special Properties1466035 +Node: Saving Properties1466316 +Node: Substitution1469458 +Node: Registers1472728 +Node: Transposition1475271 +Node: Change Hooks1476165 +Node: Transformations1478205 +Node: Searching and Matching1482590 +Node: String Search1483721 +Node: Regular Expressions1488445 +Node: Syntax of Regexps1489812 +Node: Regexp Example1504191 +Node: Regexp Search1506361 +Node: POSIX Regexps1512449 +Node: Search and Replace1514284 +Node: Match Data1517649 +Node: Simple Match Data1518779 +Node: Replacing Match1523044 +Node: Entire Match Data1525378 +Node: Saving Match Data1527369 +Node: Searching and Case1528750 +Node: Standard Regexps1530784 +Node: Syntax Tables1532982 +Node: Syntax Basics1534096 +Node: Syntax Descriptors1537068 +Node: Syntax Class Table1538918 +Node: Syntax Flags1544956 +Node: Syntax Table Functions1548173 +Node: Motion and Syntax1552037 +Node: Parsing Expressions1553489 +Node: Standard Syntax Tables1559558 +Node: Syntax Table Internals1560402 +Node: Abbrevs1561428 +Node: Abbrev Mode1563231 +Node: Abbrev Tables1563951 +Node: Defining Abbrevs1565484 +Node: Abbrev Files1567389 +Node: Abbrev Expansion1569162 +Node: Standard Abbrev Tables1573793 +Node: Extents1574952 +Node: Intro to Extents1576195 +Node: Creating and Modifying Extents1580187 +Node: Extent Endpoints1581694 +Node: Finding Extents1584957 +Node: Mapping Over Extents1588705 +Node: Extent Properties1594822 +Node: Detached Extents1604966 +Node: Extent Parents1606825 +Node: Duplicable Extents1608519 +Node: Extents and Events1611740 +Node: Atomic Extents1613647 +Node: Specifiers1614094 +Node: Introduction to Specifiers1616207 +Node: Specifiers In-Depth1618517 +Node: Specifier Instancing1623429 +Node: Specifier Types1626691 +Node: Adding Specifications1631765 +Node: Retrieving Specifications1641127 +Node: Specifier Tag Functions1644862 +Node: Specifier Instancing Functions1648096 +Node: Specifier Example1651503 +Node: Creating Specifiers1654659 +Node: Specifier Validation Functions1658976 +Node: Other Specification Functions1661360 +Node: Faces and Window-System Objects1665179 +Node: Faces1665503 +Node: Merging Faces1667120 +Node: Basic Face Functions1669081 +Node: Face Properties1671179 +Node: Face Convenience Functions1681421 +Node: Other Face Display Functions1684551 +Node: Fonts1685364 +Node: Font Specifiers1686065 +Node: Font Instances1687250 +Node: Font Instance Names1688217 +Node: Font Instance Size1689058 +Node: Font Instance Characteristics1690344 +Node: Font Convenience Functions1691513 +Node: Colors1692803 +Node: Color Specifiers1693243 +Node: Color Instances1695601 +Node: Color Instance Properties1696345 +Node: Color Convenience Functions1696971 +Node: Glyphs1698024 +Node: Glyph Functions1699625 +Node: Creating Glyphs1700032 +Node: Glyph Properties1712671 +Node: Glyph Convenience Functions1721838 +Node: Glyph Dimensions1725785 +Node: Images1726865 +Node: Image Specifiers1727314 +Node: Image Instantiator Conversion1742660 +Node: Image Instances1744025 +Node: Image Instance Types1744776 +Node: Image Instance Functions1747539 +Node: Glyph Types1754590 +Node: Mouse Pointer1756362 +Node: Redisplay Glyphs1759365 +Node: Subwindows1760398 +Node: Annotations1760641 +Node: Annotation Basics1761657 +Node: Annotation Primitives1765595 +Node: Annotation Properties1766924 +Node: Locating Annotations1769964 +Node: Margin Primitives1770801 +Node: Annotation Hooks1772695 +Node: Display1773355 +Node: Refresh Screen1774333 +Node: Truncation1776244 +Node: The Echo Area1778769 +Node: Warnings1785204 +Node: Invisible Text1789640 +Node: Selective Display1792219 +Node: Overlay Arrow1796345 +Node: Temporary Displays1797698 +Node: Blinking1801819 +Node: Usual Display1804004 +Node: Display Tables1806553 +Node: Display Table Format1807357 +Node: Active Display Table1808799 +Node: Character Descriptors1812794 +Node: Beeping1813551 +Node: Hash Tables1818317 +Node: Introduction to Hash Tables1818925 +Node: Working With Hash Tables1824948 +Node: Weak Hash Tables1826065 +Node: Range Tables1827864 +Node: Introduction to Range Tables1828553 +Node: Working With Range Tables1828984 +Node: Databases1829869 +Node: Connecting to a Database1830168 +Node: Working With a Database1831259 +Node: Other Database Functions1832117 +Node: Processes1832691 +Node: Subprocess Creation1834915 +Node: Synchronous Processes1838204 +Node: MS-DOS Subprocesses1844922 +Node: Asynchronous Processes1845996 +Node: Deleting Processes1849709 +Node: Process Information1851580 +Node: Input to Processes1855506 +Node: Signals to Processes1857796 +Node: Output from Processes1862216 +Node: Process Buffers1863028 +Node: Filter Functions1865895 +Node: Accepting Output1871465 +Node: Sentinels1872992 +Node: Process Window Size1876482 +Node: Transaction Queues1876831 +Node: Network1878529 +Node: System Interface1880363 +Node: Starting Up1881633 +Node: Start-up Summary1882227 +Node: Init File1885781 +Node: Terminal-Specific1888162 +Node: Command Line Arguments1891321 +Node: Getting Out1894810 +Node: Killing XEmacs1895379 +Node: Suspending XEmacs1897048 +Node: System Environment1900390 +Node: User Identification1907057 +Node: Time of Day1910586 +Node: Time Conversion1913373 +Node: Timers1918413 +Node: Terminal Input1920586 +Node: Input Modes1921089 +Node: Translating Input1923502 +Node: Recording Input1927667 +Node: Terminal Output1929767 +Node: Flow Control1933390 +Node: Batch Mode1937182 +Node: X-Windows1938564 +Node: X Selections1939435 +Node: X Server1941645 +Node: Resources1942096 +Node: Server Data1947405 +Node: Grabs1948612 +Node: X Miscellaneous1950192 +Node: ToolTalk Support1952577 +Node: XEmacs ToolTalk API Summary1952794 +Node: Sending Messages1954094 +Node: Example of Sending Messages1954345 +Node: Elisp Interface for Sending Messages1955407 +Node: Receiving Messages1961799 +Node: Example of Receiving Messages1962022 +Node: Elisp Interface for Receiving Messages1962858 +Node: LDAP Support1966683 +Node: Building XEmacs with LDAP support1967177 +Node: XEmacs LDAP API1968154 +Node: LDAP Variables1969206 +Node: The High-Level LDAP API1971806 +Node: The Low-Level LDAP API1975269 +Node: The LDAP Lisp Object1976100 +Node: Opening and Closing a LDAP Connection1976653 +Node: Low-level Operations on a LDAP Server1978453 +Node: LDAP Internationalization1981147 +Node: LDAP Internationalization Variables1982052 +Node: Encoder/Decoder Functions1983781 +Node: Syntax of Search Filters1984820 +Node: PostgreSQL Support1986118 +Node: Building XEmacs with PostgreSQL support1986513 +Node: XEmacs PostgreSQL libpq API1987780 +Node: libpq Lisp Variables1989655 +Node: libpq Lisp Symbols and DataTypes1992619 +Node: Synchronous Interface Functions2005859 +Node: Asynchronous Interface Functions2010350 +Node: Large Object Support2013851 +Node: Other libpq Functions2014478 +Node: Unimplemented libpq Functions2017513 +Node: XEmacs PostgreSQL libpq Examples2022832 +Node: Internationalization2028923 +Node: I18N Levels 1 and 22029266 +Node: I18N Level 32029972 +Node: Level 3 Basics2030253 +Node: Level 3 Primitives2031086 +Node: Dynamic Messaging2032692 +Node: Domain Specification2033155 +Node: Documentation String Extraction2035058 +Node: I18N Level 42035976 +Node: MULE2036168 +Node: Internationalization Terminology2037217 +Node: Charsets2049416 +Node: Charset Properties2050112 +Node: Basic Charset Functions2054827 +Node: Charset Property Functions2057008 +Node: Predefined Charsets2059050 +Node: MULE Characters2061970 +Node: Composite Characters2062817 +Node: Coding Systems2064077 +Node: Coding System Types2066217 +Node: ISO 20222070201 +Node: EOL Conversion2082478 +Node: Coding System Properties2083650 +Node: Basic Coding System Functions2087967 +Node: Coding System Property Functions2090001 +Node: Encoding and Decoding Text2090559 +Node: Detection of Textual Encoding2091695 +Node: Big5 and Shift-JIS Functions2093231 +Node: Predefined Coding Systems2094357 +Node: CCL2106451 +Node: CCL Syntax2109555 +Node: CCL Statements2111131 +Node: CCL Expressions2115779 +Node: Calling CCL2118318 +Node: CCL Examples2121307 +Node: Category Tables2121444 +Node: Tips2123802 +Node: Style Tips2124443 +Node: Compilation Tips2133962 +Node: Documentation Tips2135876 +Node: Comment Tips2141385 +Node: Library Headers2144387 +Node: Building XEmacs and Object Allocation2148359 +Node: Building XEmacs2149242 +Node: Pure Storage2155577 +Node: Garbage Collection2158365 +Node: Standard Errors2169504 +Node: Standard Buffer-Local Variables2173713 +Node: Standard Keymaps2176346 +Node: Standard Hooks2180078 +Node: Index2187578  End Tag Table diff --git a/info/xemacs.info b/info/xemacs.info index 2aaa9bd..e7754f9 100644 --- a/info/xemacs.info +++ b/info/xemacs.info @@ -33,26 +33,26 @@ translation approved by the author instead of in the original English. Indirect: xemacs.info-1: 1350 xemacs.info-2: 48915 -xemacs.info-3: 96893 -xemacs.info-4: 145419 -xemacs.info-5: 193446 -xemacs.info-6: 243306 -xemacs.info-7: 290410 -xemacs.info-8: 339182 -xemacs.info-9: 388710 -xemacs.info-10: 438339 -xemacs.info-11: 485732 -xemacs.info-12: 535325 -xemacs.info-13: 582878 -xemacs.info-14: 632686 -xemacs.info-15: 677477 -xemacs.info-16: 727101 -xemacs.info-17: 775368 -xemacs.info-18: 825010 -xemacs.info-19: 849389 -xemacs.info-20: 881042 -xemacs.info-21: 930187 -xemacs.info-22: 972577 +xemacs.info-3: 98487 +xemacs.info-4: 147631 +xemacs.info-5: 197228 +xemacs.info-6: 246668 +xemacs.info-7: 296605 +xemacs.info-8: 343420 +xemacs.info-9: 392044 +xemacs.info-10: 441144 +xemacs.info-11: 489787 +xemacs.info-12: 539726 +xemacs.info-13: 581524 +xemacs.info-14: 631267 +xemacs.info-15: 680901 +xemacs.info-16: 730886 +xemacs.info-17: 780057 +xemacs.info-18: 826008 +xemacs.info-19: 856894 +xemacs.info-20: 888547 +xemacs.info-21: 937894 +xemacs.info-22: 980480  Tag Table: (Indirect) @@ -84,333 +84,338 @@ Node: Tools Menu90468 Node: Help Menu90959 Node: Menu Customization91360 Node: Entering Emacs95590 -Node: Exiting96893 -Node: Command Switches99984 -Node: Startup Paths109171 -Node: Basic116751 -Node: Blank Lines126229 -Node: Continuation Lines127655 -Node: Position Info129087 -Node: Arguments132220 -Node: Undo135357 -Node: Minibuffer138304 -Node: Minibuffer File140914 -Node: Minibuffer Edit142719 -Node: Completion145419 -Node: Completion Example147350 -Node: Completion Commands148444 -Node: Strict Completion151100 -Node: Completion Options152881 -Node: Minibuffer History154175 -Node: Repetition157359 -Node: M-x160192 -Node: Help165286 -Node: Help Summary166696 -Node: Key Help169482 -Node: Name Help170441 -Node: Apropos173086 -Node: Library Keywords176205 -Node: Help Mode178526 -Node: Misc Help179023 -Node: Mark182172 -Node: Setting Mark184026 -Node: Using Region187148 -Node: Marking Objects187885 -Node: Mark Ring189723 -Node: Mouse Selection191439 -Node: Additional Mouse Operations193446 -Node: Killing197650 -Node: Yanking203286 -Node: Kill Ring204089 -Node: Appending Kills205691 -Node: Earlier Kills207728 -Node: Using X Selections210341 -Node: X Clipboard Selection211591 -Node: X Selection Commands213768 -Node: X Cut Buffers214854 -Node: Active Regions216213 -Node: Accumulating Text220793 -Node: Rectangles223866 -Node: Registers227385 -Node: RegPos228839 -Node: RegText229995 -Node: RegRect231101 -Node: RegConfig231980 -Node: RegNumbers232920 -Node: RegFiles233638 -Node: Bookmarks234296 -Node: Display237668 -Node: Scrolling239163 -Node: Horizontal Scrolling243306 -Node: Selective Display244501 -Node: Display Vars245720 -Node: Search248398 -Node: Incremental Search249591 -Node: Non-Incremental Search258518 -Node: Word Search259960 -Node: Regexp Search261578 -Node: Regexps263114 -Node: Search Case273415 -Node: Replace274196 -Node: Unconditional Replace275144 -Node: Regexp Replace276279 -Node: Replacement and Case277214 -Node: Query Replace278194 -Node: Other Repeating Search281421 -Node: Fixit282676 -Node: Kill Errors283256 -Node: Transpose284589 -Node: Fixing Case286993 -Node: Spelling287639 -Node: Files289100 -Node: File Names290410 -Node: Visiting294747 -Node: Saving301433 -Node: Backup306356 -Node: Backup Names307752 -Node: Backup Deletion309235 -Node: Backup Copying310385 -Node: Interlocking312091 -Node: Reverting316219 -Node: Auto Save318131 -Node: Auto Save Files319098 -Node: Auto Save Control320939 -Node: Recover322777 -Node: Version Control323932 -Node: Concepts of VC325970 -Node: Editing with VC327580 -Node: Variables for Check-in/out332836 -Node: Log Entries334735 -Node: Change Logs and VC335915 -Node: Old Versions339182 -Node: VC Status341185 -Node: Renaming and VC342899 -Node: Snapshots343578 -Node: Making Snapshots344079 -Node: Snapshot Caveats345372 -Node: Version Headers347181 -Node: ListDir349880 -Node: Comparing Files351929 -Node: Dired353462 -Node: Dired Enter354133 -Node: Dired Edit354958 -Node: Dired Deletion356705 -Node: Dired Immed359928 -Node: Misc File Ops361204 -Node: Buffers363692 -Node: Select Buffer365850 -Node: List Buffers367645 -Node: Misc Buffer369403 -Node: Kill Buffer371046 -Node: Several Buffers372176 -Node: Windows376042 -Node: Basic Window376753 -Node: Split Window378472 -Node: Other Window380605 -Node: Pop Up Window383034 -Node: Change Window384539 -Node: Mule387447 -Node: Mule Intro388710 -Node: Language Environments389726 -Node: Input Methods391833 -Node: Select Input Method395553 -Node: Coding Systems397708 -Node: Recognize Coding401894 -Node: Specify Coding405220 -Node: Major Modes410151 -Node: Choosing Modes412370 -Node: Indentation414760 -Node: Indentation Commands416855 -Node: Tab Stops419584 -Node: Just Spaces421433 -Node: Text422248 -Node: Text Mode424231 -Node: Nroff Mode426310 -Node: TeX Mode427953 -Node: TeX Editing430205 -Node: TeX Print433639 -Node: Outline Mode436858 -Node: Outline Format438339 -Node: Outline Motion441139 -Node: Outline Visibility442692 -Node: Words445613 -Node: Sentences448560 -Node: Paragraphs450756 -Node: Pages453044 -Node: Filling455644 -Node: Auto Fill456215 -Node: Fill Commands458362 -Node: Fill Prefix460527 -Node: Case462715 -Node: Programs464743 -Node: Program Modes467292 -Node: Lists469524 -Node: Defuns475364 -Node: Grinding478017 -Node: Basic Indent478645 -Node: Multi-line Indent480666 -Node: Lisp Indent482282 -Node: C Indent485732 -Node: Matching490972 -Node: Comments492494 -Node: Balanced Editing498946 -Node: Lisp Completion499960 -Node: Documentation500975 -Node: Change Log502214 -Node: Tags504792 -Node: Tag Syntax506441 -Node: Create Tags Table510385 -Node: Etags Regexps514445 -Node: Select Tags Table519103 -Node: Find Tag522876 -Node: Tags Search525840 -Node: List Tags529296 -Node: Fortran530325 -Node: Fortran Motion531401 -Node: Fortran Indent532221 -Node: ForIndent Commands532906 -Node: ForIndent Num534051 -Node: ForIndent Conv535325 -Node: ForIndent Vars536101 -Node: Fortran Comments537269 -Node: Fortran Columns540867 -Node: Fortran Abbrev542290 -Node: Asm Mode543199 -Node: Running543751 -Node: Compilation544721 -Node: Lisp Modes549571 -Node: Lisp Libraries550844 -Node: Loading551398 -Node: Compiling Libraries555858 -Node: Mocklisp558749 -Node: Lisp Eval559426 -Node: Lisp Debug563066 -Node: Lisp Interaction568491 -Node: External Lisp569846 -Node: Packages571920 -Node: Package Terminology572661 -Node: Using Packages574019 -Node: Building Packages582878 -Node: Abbrevs585400 -Node: Defining Abbrevs587600 -Node: Expanding Abbrevs590047 -Node: Editing Abbrevs592749 -Node: Saving Abbrevs594622 -Node: Dynamic Abbrevs596562 -Node: Picture597864 -Node: Basic Picture600297 -Node: Insert in Picture602582 -Node: Tabs in Picture604004 -Node: Rectangles in Picture605525 -Node: Sending Mail607433 -Node: Mail Format609144 -Node: Mail Headers610494 -Node: Mail Mode616902 -Node: Reading Mail620515 -Node: Calendar/Diary622090 -Node: Calendar Motion623762 -Node: Calendar Unit Motion624645 -Node: Move to Beginning or End626968 -Node: Specified Dates628101 -Node: Scroll Calendar628989 -Node: Mark and Region630780 -Node: General Calendar632686 -Node: LaTeX Calendar634294 -Node: Holidays636308 -Node: Sunrise/Sunset639410 -Node: Lunar Phases642453 -Node: Other Calendars643838 -Node: Calendar Systems645325 -Node: To Other Calendar648436 -Node: From Other Calendar650427 -Node: Mayan Calendar652732 -Node: Diary655927 -Node: Diary Commands657676 -Node: Format of Diary File660982 -Node: Date Formats663852 -Node: Adding to Diary666426 -Node: Special Diary Entries668057 -Node: Calendar Customization673396 -Node: Calendar Customizing674258 -Node: Holiday Customizing677477 -Node: Date Display Format683945 -Node: Time Display Format684903 -Node: Daylight Savings686041 -Node: Diary Customizing689229 -Node: Hebrew/Islamic Entries693850 -Node: Fancy Diary Display697190 -Node: Included Diary Files699087 -Node: Sexp Diary Entries700068 -Node: Appt Customizing705158 -Node: Sorting706204 -Node: Shell711010 -Node: Single Shell712303 -Node: Interactive Shell713902 -Node: Shell Mode717667 -Node: Terminal emulator720158 -Node: Term Mode722467 -Node: Paging in Term723381 -Node: Narrowing724179 -Node: Hardcopy726129 -Node: Recursive Edit727101 -Node: Dissociated Press730088 -Node: CONX732651 -Node: Amusements733675 -Node: Emulation734155 -Node: Customization735999 -Node: Minor Modes737844 -Node: Variables739476 -Node: Examining741432 -Node: Easy Customization742893 -Node: Customization Groups743907 -Node: Changing an Option746836 -Node: Face Customization753092 -Node: Specific Customization754856 -Node: Edit Options757463 -Node: Locals759047 -Node: File Variables762226 -Node: Keyboard Macros766780 -Node: Basic Kbd Macro768951 -Node: Save Kbd Macro770883 -Node: Kbd Macro Query772552 -Node: Key Bindings774494 -Node: Keymaps775368 -Node: Rebinding779218 -Node: Interactive Rebinding779917 -Node: Programmatic Rebinding782109 -Node: Key Bindings Using Strings784916 -Node: Disabling786543 -Node: Syntax788315 -Node: Syntax Entry789196 -Node: Syntax Change793280 -Node: Init File795449 -Node: Init Syntax796954 -Node: Init Examples799306 -Node: Terminal Init803496 -Node: Audible Bell805206 -Node: Faces808637 -Node: Frame Components813479 -Node: X Resources813924 -Node: Geometry Resources815583 -Node: Iconic Resources818031 -Node: Resource List818503 -Node: Face Resources825010 -Node: Widgets828687 -Node: Menubar Resources829626 -Node: Quitting830559 -Node: Lossage833537 -Node: Stuck Recursive834181 -Node: Screen Garbled834887 -Node: Text Garbled836021 -Node: Unasked-for Search836660 -Node: Emergency Escape837445 -Node: Total Frustration839224 -Node: Bugs839855 -Node: Glossary849389 -Node: Manifesto881042 -Node: Key Index904518 -Node: Command Index930187 -Node: Variable Index972577 -Node: Concept Index988769 +Node: Exiting98487 +Node: Command Switches102960 +Node: Startup Paths112147 +Node: Basic119484 +Node: Inserting Text120892 +Node: Moving Point123888 +Node: Erasing127494 +Node: Basic Files128799 +Node: Basic Help130721 +Node: Blank Lines131316 +Node: Continuation Lines132892 +Node: Position Info134559 +Node: Arguments137975 +Node: Undo142074 +Node: Minibuffer145021 +Node: Minibuffer File147631 +Node: Minibuffer Edit149436 +Node: Completion152377 +Node: Completion Example154308 +Node: Completion Commands155403 +Node: Strict Completion158379 +Node: Completion Options160160 +Node: Minibuffer History161668 +Node: Repetition164852 +Node: M-x167697 +Node: Help172791 +Node: Help Summary174201 +Node: Key Help176987 +Node: Name Help177946 +Node: Apropos180591 +Node: Library Keywords183710 +Node: Help Mode186031 +Node: Misc Help186528 +Node: Mark189677 +Node: Setting Mark191531 +Node: Using Region194653 +Node: Marking Objects195390 +Node: Mark Ring197228 +Node: Mouse Selection198944 +Node: Additional Mouse Operations200951 +Node: Killing205155 +Node: Yanking210791 +Node: Kill Ring211594 +Node: Appending Kills213196 +Node: Earlier Kills215233 +Node: Using X Selections217846 +Node: X Clipboard Selection219096 +Node: X Selection Commands221273 +Node: X Cut Buffers222359 +Node: Active Regions223718 +Node: Accumulating Text228298 +Node: Rectangles231371 +Node: Registers234890 +Node: RegPos236344 +Node: RegText237500 +Node: RegRect238606 +Node: RegConfig239485 +Node: RegNumbers240425 +Node: RegFiles241143 +Node: Bookmarks241801 +Node: Display245173 +Node: Scrolling246668 +Node: Horizontal Scrolling250811 +Node: Selective Display252006 +Node: Display Vars253225 +Node: Search255903 +Node: Incremental Search257096 +Node: Non-Incremental Search266023 +Node: Word Search267465 +Node: Regexp Search269083 +Node: Regexps270619 +Node: Search Case280920 +Node: Replace281701 +Node: Unconditional Replace282649 +Node: Regexp Replace283784 +Node: Replacement and Case284719 +Node: Query Replace285699 +Node: Other Repeating Search288926 +Node: Fixit290181 +Node: Kill Errors290761 +Node: Transpose292094 +Node: Fixing Case294498 +Node: Spelling295144 +Node: Files296605 +Node: File Names297915 +Node: Visiting302252 +Node: Saving308938 +Node: Backup313861 +Node: Backup Names315257 +Node: Backup Deletion316740 +Node: Backup Copying317890 +Node: Interlocking319596 +Node: Reverting323724 +Node: Auto Save325636 +Node: Auto Save Files326603 +Node: Auto Save Control328444 +Node: Recover330282 +Node: Version Control331437 +Node: Concepts of VC333475 +Node: Editing with VC335085 +Node: Variables for Check-in/out340341 +Node: Log Entries342240 +Node: Change Logs and VC343420 +Node: Old Versions346687 +Node: VC Status348690 +Node: Renaming and VC350404 +Node: Snapshots351083 +Node: Making Snapshots351584 +Node: Snapshot Caveats352877 +Node: Version Headers354686 +Node: ListDir357385 +Node: Comparing Files359434 +Node: Dired360967 +Node: Dired Enter361638 +Node: Dired Edit362463 +Node: Dired Deletion364210 +Node: Dired Immed367433 +Node: Misc File Ops368709 +Node: Buffers371197 +Node: Select Buffer373355 +Node: List Buffers375150 +Node: Misc Buffer376908 +Node: Kill Buffer378551 +Node: Several Buffers379681 +Node: Windows383547 +Node: Basic Window384258 +Node: Split Window385977 +Node: Other Window388110 +Node: Pop Up Window390539 +Node: Change Window392044 +Node: Mule394952 +Node: Mule Intro396215 +Node: Language Environments397231 +Node: Input Methods399338 +Node: Select Input Method403058 +Node: Coding Systems405213 +Node: Recognize Coding409399 +Node: Specify Coding412725 +Node: Major Modes417656 +Node: Choosing Modes419875 +Node: Indentation422265 +Node: Indentation Commands424360 +Node: Tab Stops427089 +Node: Just Spaces428938 +Node: Text429753 +Node: Text Mode431736 +Node: Nroff Mode433815 +Node: TeX Mode435458 +Node: TeX Editing437710 +Node: TeX Print441144 +Node: Outline Mode444363 +Node: Outline Format445844 +Node: Outline Motion448644 +Node: Outline Visibility450197 +Node: Words453118 +Node: Sentences456065 +Node: Paragraphs458261 +Node: Pages460549 +Node: Filling463149 +Node: Auto Fill463720 +Node: Fill Commands465867 +Node: Fill Prefix468032 +Node: Case470220 +Node: Programs472248 +Node: Program Modes474797 +Node: Lists477029 +Node: Defuns482869 +Node: Grinding485522 +Node: Basic Indent486150 +Node: Multi-line Indent488171 +Node: Lisp Indent489787 +Node: C Indent493237 +Node: Matching498477 +Node: Comments499999 +Node: Balanced Editing506451 +Node: Lisp Completion507465 +Node: Documentation508480 +Node: Change Log509719 +Node: Tags512297 +Node: Tag Syntax513946 +Node: Create Tags Table517890 +Node: Etags Regexps521950 +Node: Select Tags Table526608 +Node: Find Tag530381 +Node: Tags Search533345 +Node: List Tags536801 +Node: Fortran537830 +Node: Fortran Motion538906 +Node: Fortran Indent539726 +Node: ForIndent Commands540411 +Node: ForIndent Num541556 +Node: ForIndent Conv542830 +Node: ForIndent Vars543606 +Node: Fortran Comments544774 +Node: Fortran Columns548372 +Node: Fortran Abbrev549795 +Node: Asm Mode550704 +Node: Running551256 +Node: Compilation552226 +Node: Lisp Modes557076 +Node: Lisp Libraries558349 +Node: Loading558903 +Node: Compiling Libraries563363 +Node: Mocklisp566254 +Node: Lisp Eval566931 +Node: Lisp Debug570571 +Node: Lisp Interaction575996 +Node: External Lisp577351 +Node: Packages579425 +Node: Package Terminology580166 +Node: Using Packages581524 +Node: Building Packages590383 +Node: Abbrevs592905 +Node: Defining Abbrevs595105 +Node: Expanding Abbrevs597552 +Node: Editing Abbrevs600254 +Node: Saving Abbrevs602127 +Node: Dynamic Abbrevs604067 +Node: Picture605369 +Node: Basic Picture607802 +Node: Insert in Picture610087 +Node: Tabs in Picture611509 +Node: Rectangles in Picture613030 +Node: Sending Mail614938 +Node: Mail Format616649 +Node: Mail Headers617999 +Node: Mail Mode624407 +Node: Reading Mail628020 +Node: Calendar/Diary629595 +Node: Calendar Motion631267 +Node: Calendar Unit Motion632150 +Node: Move to Beginning or End634473 +Node: Specified Dates635606 +Node: Scroll Calendar636494 +Node: Mark and Region638285 +Node: General Calendar640191 +Node: LaTeX Calendar641799 +Node: Holidays643813 +Node: Sunrise/Sunset646915 +Node: Lunar Phases649958 +Node: Other Calendars651343 +Node: Calendar Systems652830 +Node: To Other Calendar655941 +Node: From Other Calendar657932 +Node: Mayan Calendar660237 +Node: Diary663432 +Node: Diary Commands665181 +Node: Format of Diary File668487 +Node: Date Formats671357 +Node: Adding to Diary673931 +Node: Special Diary Entries675562 +Node: Calendar Customization680901 +Node: Calendar Customizing681763 +Node: Holiday Customizing684982 +Node: Date Display Format691450 +Node: Time Display Format692408 +Node: Daylight Savings693546 +Node: Diary Customizing696734 +Node: Hebrew/Islamic Entries701355 +Node: Fancy Diary Display704695 +Node: Included Diary Files706592 +Node: Sexp Diary Entries707573 +Node: Appt Customizing712663 +Node: Sorting713709 +Node: Shell718515 +Node: Single Shell719808 +Node: Interactive Shell721407 +Node: Shell Mode725172 +Node: Terminal emulator727663 +Node: Term Mode729972 +Node: Paging in Term730886 +Node: Narrowing731684 +Node: Hardcopy733634 +Node: Recursive Edit734606 +Node: Dissociated Press737593 +Node: CONX740156 +Node: Amusements741180 +Node: Emulation741660 +Node: Customization743504 +Node: Minor Modes745349 +Node: Variables746981 +Node: Examining748937 +Node: Easy Customization750398 +Node: Customization Groups751412 +Node: Changing an Option754341 +Node: Face Customization760597 +Node: Specific Customization762361 +Node: Edit Options764968 +Node: Locals766552 +Node: File Variables769731 +Node: Keyboard Macros774285 +Node: Basic Kbd Macro776456 +Node: Save Kbd Macro778388 +Node: Kbd Macro Query780057 +Node: Key Bindings781999 +Node: Keymaps782873 +Node: Rebinding786723 +Node: Interactive Rebinding787422 +Node: Programmatic Rebinding789614 +Node: Key Bindings Using Strings792421 +Node: Disabling794048 +Node: Syntax795820 +Node: Syntax Entry796701 +Node: Syntax Change800785 +Node: Init File802954 +Node: Init Syntax804459 +Node: Init Examples806811 +Node: Terminal Init811001 +Node: Audible Bell812711 +Node: Faces816142 +Node: Frame Components820984 +Node: X Resources821429 +Node: Geometry Resources823088 +Node: Iconic Resources825536 +Node: Resource List826008 +Node: Face Resources832515 +Node: Widgets836192 +Node: Menubar Resources837131 +Node: Quitting838064 +Node: Lossage841042 +Node: Stuck Recursive841686 +Node: Screen Garbled842392 +Node: Text Garbled843526 +Node: Unasked-for Search844165 +Node: Emergency Escape844950 +Node: Total Frustration846729 +Node: Bugs847360 +Node: Glossary856894 +Node: Manifesto888547 +Node: Key Index912023 +Node: Command Index937894 +Node: Variable Index980480 +Node: Concept Index996566  End Tag Table diff --git a/info/xemacs.info-2 b/info/xemacs.info-2 index 8c5ccaa..e8c6378 100644 --- a/info/xemacs.info-2 +++ b/info/xemacs.info-2 @@ -1124,25 +1124,55 @@ File: xemacs.info, Node: Entering Emacs, Next: Exiting, Prev: Pull-down Menus Entering and Exiting Emacs ************************** - The usual way to invoke Emacs is to type `emacs ' at the shell -(for XEmacs, type `xemacs '). Emacs clears the screen and then -displays an initial advisory message and copyright notice. You can -begin typing Emacs commands immediately afterward. - - Some operating systems insist on discarding all type-ahead when Emacs -starts up; they give Emacs no way to prevent this. Therefore, it is -wise to wait until Emacs clears the screen before typing the first -editing command. + The usual way to invoke XEmacs is to type `xemacs ' at the +shell. XEmacs clears the screen and then displays an initial advisory +message and copyright notice. You can begin typing XEmacs commands +immediately afterward. + + Some operating systems insist on discarding all type-ahead when +XEmacs starts up; they give XEmacs no way to prevent this. Therefore, +it is advisable to wait until XEmacs clears the screen before typing +your first editing command. + + If you run XEmacs from a shell window under the X Window System, run +it in the background with `xemacs&'. This way, XEmacs does not tie up +the shell window, so you can use that to run other shell commands while +XEmacs operates its own X windows. You can begin typing XEmacs commands +as soon as you direct your keyboard input to the XEmacs frame. Before Emacs reads the first command, you have not had a chance to give a command to specify a file to edit. Since Emacs must always have -a current buffer for editing, it presents a buffer, by default, a -buffer named `*scratch*'. The buffer is in Lisp Interaction mode; you -can use it to type Lisp expressions and evaluate them, or you can -ignore that capability and simply doodle. You can specify a different -major mode for this buffer by setting the variable `initial-major-mode' -in your init file. *Note Init File::. - - It is possible to give Emacs arguments in the shell command line to -specify files to visit, Lisp files to load, and functions to call. +a current buffer for editing, it presents a buffer, by default, a buffer +named `*scratch*'. The buffer is in Lisp Interaction mode; you can use +it to type Lisp expressions and evaluate them, or you can ignore that +capability and simply doodle. (You can specify a different major mode +for this buffer by setting the variable `initial-major-mode' in your +init file. *Note Init File::.) + + It is possible to specify files to be visited, Lisp files to be +loaded, and functions to be called, by giving Emacs arguments in the +shell command line. *Note Command Switches::. But we don't recommend +doing this. The feature exists mainly for compatibility with other +editors. + + Many other editors are designed to be started afresh each time you +want to edit. You edit one file and then exit the editor. The next +time you want to edit either another file or the same one, you must run +the editor again. With these editors, it makes sense to use a +command-line argument to say which file to edit. + + But starting a new Emacs each time you want to edit a different file +does not make sense. For one thing, this would be annoyingly slow. For +another, this would fail to take advantage of Emacs's ability to visit +more than one file in a single editing session. And it would lose the +other accumulated context, such as registers, undo history, and the mark +ring. + + The recommended way to use XEmacs is to start it only once, just +after you log in, and do all your editing in the same Emacs session. +Each time you want to edit a different file, you visit it with the +existing Emacs, which eventually comes to have many files in it ready +for editing. Usually you do not kill the Emacs until you are about to +log out. *Note Files::, for more information on visiting more than one +file. diff --git a/info/xemacs.info-3 b/info/xemacs.info-3 index de7a277..1bc5ee6 100644 --- a/info/xemacs.info-3 +++ b/info/xemacs.info-3 @@ -36,17 +36,20 @@ Exiting Emacs ============= There are two commands for exiting Emacs because there are two kinds -of exiting: "suspending" Emacs and "killing" Emacs. "Suspending" means -stopping Emacs temporarily and returning control to its superior -(usually the shell), allowing you to resume editing later in the same -Emacs job, with the same files, same kill ring, same undo history, and -so on. This is the usual way to exit. "Killing" Emacs means -destroying the Emacs job. You can run Emacs again later, but you will -get a fresh Emacs; there is no way to resume the same editing session -after it has been killed. +of exiting: "suspending" Emacs and "killing" Emacs. + + "Suspending" means stopping Emacs temporarily and returning control +to its parent process (usually a shell), allowing you to resume editing +later in the same Emacs job, with the same buffers, same kill ring, +same undo history, and so on. This is the usual way to exit. + + "Killing" Emacs means destroying the Emacs job. You can run Emacs +again later, but you will get a fresh Emacs; there is no way to resume +the same editing session after it has been killed. `C-z' - Suspend Emacs (`suspend-emacs'). If used under the X window + Suspend Emacs or iconify a frame + (`suspend-emacs-or-iconify-frame'). If used under the X window system, shrink the X window containing the Emacs frame to an icon (see below). @@ -57,41 +60,65 @@ after it has been killed. window containing the Emacs frame to an icon. The Emacs process is stopped temporarily, and control is returned to the window manager. If more than one frame is associated with the Emacs process, only the -frame from which you used `C-z' is retained. The X windows containing -the other Emacs frames are closed. +frame from which you used `C-z' is iconified. To activate the "suspended" Emacs, use the appropriate window manager mouse gestures. Usually left-clicking on the icon reactivates and reopens the X window containing the Emacs frame, but the window manager you use determines what exactly happens. To actually kill the Emacs -process, use `C-x C-c' or the Exit Emacs item on the File menu. - - On systems that do not permit programs to be suspended, `C-z' runs -an inferior shell that communicates directly with the terminal, and -Emacs waits until you exit the subshell. On these systems, the only way -to return to the shell from which Emacs was started (to log out, for -example) is to kill Emacs. `C-d' or `exit' are typical commands to -exit a subshell. +process, use `C-x C-c' or the Exit XEmacs item on the File menu. + + To suspend Emacs, type `C-z' (`suspend-emacs'). This takes you back +to the shell from which you invoked Emacs. You can resume Emacs with +the shell command `%xemacs' in most common shells. + + On systems that do not support suspending programs, `C-z' starts an +inferior shell that communicates directly with the terminal. Emacs +waits until you exit the subshell. (The way to do that is probably +with `C-d' or `exit', but it depends on which shell you use.) The only +way on these systems to get back to the shell from which Emacs was run +(to log out, for example) is to kill Emacs. + + Suspending also fails if you run Emacs under a shell that doesn't +support suspending programs, even if the system itself does support it. +In such a case, you can set the variable `cannot-suspend' to a +non-`nil' value to force `C-z' to start an inferior shell. (One might +also describe Emacs's parent shell as "inferior" for failing to support +job control properly, but that is a matter of taste.) + + When Emacs communicates directly with an X server and creates its own +dedicated X windows, `C-z' has a different meaning. Suspending an +applications that uses its own X windows is not meaningful or useful. +Instead, `C-z' runs the command `iconify-or-deiconify-frame', which +temporarily closes up the selected Emacs frame. The way to get back to +a shell window is with the window manager. To kill Emacs, type `C-x C-c' (`save-buffers-kill-emacs'). A -two-character key is used for this to make it harder to type. In -XEmacs, selecting the Exit Emacs option of the File menu is an -alternate way of issuing the command. +two-character key is used for this to make it harder to type. Selecting +the Exit XEmacs option of the File menu is an alternate way of issuing +the command. Unless a numeric argument is used, this command first offers to save -any modified buffers. If you do not save all buffers, you are asked for -reconfirmation with `yes' before killing Emacs, since any changes not -saved will be lost. If any subprocesses are still running, `C-x C-c' -asks you to confirm killing them, since killing Emacs kills the -subprocesses simultaneously. - - In most programs running on Unix, certain characters may instantly -suspend or kill the program. (In Berkeley Unix these characters are -normally `C-z' and `C-c'.) This Unix feature is turned off while you -are in Emacs. The meanings of `C-z' and `C-x C-c' as keys in Emacs were -inspired by the standard Berkeley Unix meanings of `C-z' and `C-c', but -that is their only relationship with Unix. You could customize these -keys to do anything (*note Keymaps::). +any modified file-visiting buffers. If you do not save all buffers, +you are asked for reconfirmation with `yes' before killing Emacs, since +any changes not saved will be lost forever. If any subprocesses are +still running, `C-x C-c' asks you to confirm killing them, since killing +Emacs will kill the subprocesses immediately. + + There is no way to restart an Emacs session once you have killed it. +You can, however, arrange for Emacs to record certain session +information, such as which files are visited, when you kill it, so that +the next time you restart Emacs it will try to visit the same files and +so on. + + The operating system usually listens for certain special characters +whose meaning is to kill or suspend the program you are running. This +operating system feature is turned off while you are in Emacs. The +meanings of `C-z' and `C-x C-c' as keys in Emacs were inspired by the +use of `C-z' and `C-c' on several operating systems as the characters +for stopping or killing a program, but that is their only relationship +with the operating system. You can customize these keys to run any +commands of your choice (*note Keymaps::).  File: xemacs.info, Node: Command Switches, Next: Startup Paths, Prev: Exiting, Up: Top @@ -500,12 +527,6 @@ aiding in debugging any problems which come up. `/usr/local/info' as well as the directories of the environment variable `INFOPATH' to `Info-directory-list'. -`lock-directory' -`superlock-file' - Are the site-specific locations of the lock directory and the - superlock file, respectively. The `lock-directory' variable may - also be initialized from the `EMACSLOCKDIR' environment variable. - `exec-directory' Is the directory of architecture-dependent files that come with XEmacs, especially executable programs intended for XEmacs to @@ -539,64 +560,102 @@ Basic Editing Commands We now give the basics of how to enter text, make corrections, and save the text in a file. If this material is new to you, you might learn it more easily by running the Emacs learn-by-doing tutorial. To -do this, type `Control-h t' (`help-with-tutorial'). +use the tutorial, run Emacs and type `Control-h t' +(`help-with-tutorial'). You can also use Tutorials item from the Help +menu. + + XEmacs comes with many translations of tutorial. If your XEmacs is +with MULE and you set up language environment correctly, XEmacs choses +right tutorial when available (*note Language Environments::). If you +want specific translation, give `C-h t' a prefix argument, like `C-u +C-h t'. + + To clear the screen and redisplay, type `C-l' (`recenter'). + +* Menu: + + +* Inserting Text:: Inserting text by simply typing it. +* Moving Point:: How to move the cursor to the place where you want to + change something. +* Erasing:: Deleting and killing text. +* Files: Basic Files. Visiting, creating, and saving files. +* Help: Basic Help. Asking what a character does. +* Blank Lines:: Commands to make or delete blank lines. +* Continuation Lines:: Lines too wide for the screen. +* Position Info:: What page, line, row, or column is point on? +* Arguments:: Numeric arguments for repeating a command. + + +File: xemacs.info, Node: Inserting Text, Next: Moving Point, Up: Basic Inserting Text ============== To insert printing characters into the text you are editing, just -type them. This inserts the characters into the buffer at the cursor -(that is, at "point"; *note Point::). The cursor moves forward. Any -characters after the cursor move forward too. If the text in the buffer -is `FOOBAR', with the cursor before the `B', and you type `XX', the -result is `FOOXXBAR', with the cursor still before the `B'. - - To "delete" text you have just inserted, use . deletes -the character BEFORE the cursor (not the one that the cursor is on top -of or under; that is the character AFTER the cursor). The cursor and -all characters after it move backwards. Therefore, if you type a -printing character and then type , they cancel out. +type them. This inserts the characters you type into the buffer at the +cursor (that is, at "point"; *note Point::). The cursor moves forward, +and any text after the cursor moves forward too. If the text in the +buffer is `FOOBAR', with the cursor before the `B', then if you type +`XX', you get `FOOXXBAR', with the cursor still before the `B'. + + To "delete" text you have just inserted, use . deletes the +character _before_ the cursor (not the one that the cursor is on top of +or under; that is the character AFTER the cursor). The cursor and all +characters after it move backwards. Therefore, if you type a printing +character and then type , they cancel out. To end a line and start typing a new one, type . This inserts a newline character in the buffer. If point is in the middle of a line, splits the line. Typing when the cursor is at the -beginning of a line rubs out the newline before the line, thus joining -the line with the preceding line. +beginning of a line deletes the preceding newline, thus joining the +line with the preceding line. - Emacs automatically splits lines when they become too long, if you -turn on a special mode called "Auto Fill" mode. *Note Filling::, for -information on using Auto Fill mode. + Emacs can split lines automatically when they become too long, if you +turn on a special minor mode called "Auto Fill" mode. *Note Filling::, +for how to use Auto Fill mode. - Customization information: , in most modes, runs the command -`delete-backward-char'; runs the command `newline', and -self-inserting printing characters run the command `self-insert', which -inserts whatever character was typed to invoke it. Some major modes -rebind to other commands. + If you prefer to have text characters replace (overwrite) existing +text rather than shove it to the right, you can enable Overwrite mode, +a minor mode. *Note Minor Modes::. Direct insertion works for printing characters and , but other -characters act as editing commands and do not insert themselves. If -you need to insert a control character or a character whose code is -above 200 octal, you must "quote" it by typing the character -`control-q' (`quoted-insert') first. There are two ways to use `C-q': - - * `Control-q' followed by any non-graphic character (even `C-g') - inserts that character. - - * `Control-q' followed by three octal digits inserts the character - with the specified character code. +characters act as editing commands and do not insert themselves. If you +need to insert a control character or a character whose code is above +200 octal, you must "quote" it by typing the character `Control-q' +(`quoted-insert') first. (This character's name is normally written +`C-q' for short.) There are two ways to use `C-q': + + * `C-q' followed by any non-graphic character (even `C-g') inserts + that character. + + * `C-q' followed by a sequence of octal digits inserts the character + with the specified octal character code. You can use any number of + octal digits; any non-digit terminates the sequence. If the + terminating character is , it serves only to terminate the + sequence; any other non-digit is itself used as input after + terminating the sequence. (The use of octal sequences is disabled + in ordinary non-binary Overwrite mode, to give you a convenient + way to insert a digit instead of overwriting with it.) A numeric argument to `C-q' specifies how many copies of the quoted character should be inserted (*note Arguments::). - If you prefer to have text characters replace (overwrite) existing -text instead of moving it to the right, you can enable Overwrite mode, a -minor mode. *Note Minor Modes::. + Customization information: , in most modes, runs the command +`backward-or-forward-delete-char'; runs the command `newline', +and self-inserting printing characters run the command `self-insert', +which inserts whatever character was typed to invoke it. Some major +modes rebind to other commands. + + +File: xemacs.info, Node: Moving Point, Next: Erasing, Prev: Inserting Text, Up: Basic Changing the Location of Point ============================== To do more than insert characters, you have to know how to move point -(*note Point::). Here are a few of the available commands. +(*note Point::). The simplest way to do this is with arrow keys, or by +clicking the left mouse button where you want to move to. NOTE: Many of the following commands have two versions, one that uses the function keys (e.g. or ) and one that doesn't. The @@ -652,11 +711,13 @@ TTY's), but the latter are available on all terminals. on the frame to bring point to the center of the window. `M-r' - Move point to left margin on the line halfway down the frame or - window (`move-to-window-line'). Text does not move on the frame. - A numeric argument says how many screen lines down from the top of - the window (zero for the top). A negative argument counts from - the bottom (-1 for the bottom). + Move point to left margin, vertically centered in the window + (`move-to-window-line'). Text does not move on the screen. + + A numeric argument says which screen line to place point on. It + counts screen lines down from the top of the window (zero for the + top line). A negative argument counts lines from the bottom (-1 + for the bottom line). `C-t' Transpose two characters, the ones before and after the cursor @@ -673,36 +734,46 @@ TTY's), but the latter are available on all terminals. Move to the end of the buffer (`end-of-buffer'). `M-x goto-char' - Read a number N and move the cursor to character number N. - Position 1 is the beginning of the buffer. + Read a number N and move point to buffer position N. Position 1 + is the beginning of the buffer. `M-g' - Read a number N and move cursor to line number N (`goto-line'). + Read a number N and move point to line number N (`goto-line'). Line 1 is the beginning of the buffer. -`C-x C-n' +`M-x set-goal-column' Use the current column of point as the "semi-permanent goal column" for `C-n' and `C-p' (`set-goal-column'). Henceforth, those commands always move to this column in each line moved into, or as close as possible given the contents of the line. This goal column remains in effect until canceled. -`C-u C-x C-n' +`C-u M-x set-goal-column' Cancel the goal column. Henceforth, `C-n' and `C-p' once again try to avoid changing the horizontal position, as usual. - If you set the variable `track-eol' to a non-`nil' value, `C-n' and -`C-p' move to the end of the line when at the end of the starting line. -By default, `track-eol' is `nil'. + If you set the variable `track-eol' to a non-`nil' value, then `C-n' +and `C-p' when at the end of the starting line move to the end of +another line. Normally, `track-eol' is `nil'. *Note Variables::, for +how to set variables such as `track-eol'. + + Normally, `C-n' on the last line of a buffer appends a newline to +it. If the variable `next-line-add-newlines' is `nil', then `C-n' gets +an error instead (like `C-p' on the first line). + + +File: xemacs.info, Node: Erasing, Next: Basic Files, Prev: Moving Point, Up: Basic Erasing Text ============ `' - Delete the character before the cursor (`delete-backward-char'). + Delete the character before or after point + (`backward-or-forward-delete-char'). You can customize this + behavior by setting the variable `delete-key-deletes-forward'. `C-d' - Delete the character after the cursor (`delete-char'). + Delete the character after point (`delete-char'). `C-k' Kill to the end of the line (`kill-line'). @@ -714,85 +785,87 @@ Erasing Text Kill back to the beginning of the previous word (`backward-kill-word'). - In contrast to the key, which deletes the character before the -cursor, `Control-d' deletes the character after the cursor, causing the -rest of the text on the line to shift left. If `Control-d' is typed at -the end of a line, that line and the next line are joined. + You already know about the key which deletes the character +before point (that is, before the cursor). Another key, `Control-d' +(`C-d' for short), deletes the character after point (that is, the +character that the cursor is on). This shifts the rest of the text on +the line to the left. If you type `C-d' at the end of a line, it joins +together that line and the next line. - To erase a larger amount of text, use `Control-k', which kills a -line at a time. If you use `C-k' at the beginning or in the middle of -a line, it kills all the text up to the end of the line. If you use + To erase a larger amount of text, use the `C-k' key, which kills a +line at a time. If you type `C-k' at the beginning or middle of a +line, it kills all the text up to the end of the line. If you type `C-k' at the end of a line, it joins that line and the next line. *Note Killing::, for more flexible ways of killing text. + +File: xemacs.info, Node: Basic Files, Next: Basic Help, Prev: Erasing, Up: Basic + Files ===== - The commands above are sufficient for creating and altering text in -an Emacs buffer. More advanced Emacs commands just make things easier. -But to keep any text permanently you must put it in a "file". Files -are named units of text which are stored by the operating system and -which you can retrieve by name. To look at or use the contents of a -file in any way, including editing the file with Emacs, you must -specify the file name. + The commands described above are sufficient for creating and altering +text in an Emacs buffer; the more advanced Emacs commands just make +things easier. But to keep any text permanently you must put it in a +"file". Files are named units of text which are stored by the +operating system for you to retrieve later by name. To look at or use +the contents of a file in any way, including editing the file with +Emacs, you must specify the file name. Consider a file named `/usr/rms/foo.c'. To begin editing this file from Emacs, type: C-x C-f /usr/rms/foo.c -The file name is given as an "argument" to the command `C-x C-f' -(`find-file'). The command uses the "minibuffer" to read the argument. -You have to type to terminate the argument (*note Minibuffer::). +Here the file name is given as an "argument" to the command `C-x C-f' +(`find-file'). That command uses the "minibuffer" to read the +argument, and you type to terminate the argument (*note +Minibuffer::). You can also use the Open... menu item from the File menu, then type the name of the file to the prompt. - Emacs obeys the command by "visiting" the file: it creates a buffer, -copies the contents of the file into the buffer, and then displays the -buffer for you to edit. You can make changes in the buffer, and then -"save" the file by typing `C-x C-s' (`save-buffer') or choosing Save -Buffer from the File menu. This makes the changes permanent by copying -the altered contents of the buffer back into the file `/usr/rms/foo.c'. -Until then, the changes are only inside your Emacs buffer, and the -file `foo.c' is not changed. + Emacs obeys the command by "visiting" the file: creating a buffer, +copying the contents of the file into the buffer, and then displaying +the buffer for you to edit. If you alter the text, you can "save" the +new text in the file by typing `C-x C-s' (`save-buffer') or choosing +Save Buffer from the File menu. This makes the changes permanent by +copying the altered buffer contents back into the file +`/usr/rms/foo.c'. Until you save, the changes exist only inside Emacs, +and the file `foo.c' is unaltered. To create a file, visit the file with `C-x C-f' as if it already existed or choose Open... from the File menu and provide the name for -the new file in the minibuffer. Emacs will create an empty buffer in -which you can insert the text you want to put in the file. When you -save the buffer with `C-x C-s', or by choosing Save Buffer from the -File menu, the file is created. +the new file. Emacs will create an empty buffer in which you can +insert the text you want to put in the file. When you save the buffer +with `C-x C-s', or by choosing Save Buffer from the File menu, the file +is created. + + To learn more about using files, *Note Files::. - To learn more about using files, *note Files::. + +File: xemacs.info, Node: Basic Help, Next: Blank Lines, Prev: Basic Files, Up: Basic Help ==== - If you forget what a key does, you can use the Help character -(`C-h') to find out: Type `C-h k' followed by the key you want to know -about. For example, `C-h k C-n' tells you what `C-n' does. `C-h' is a -prefix key; `C-h k' is just one of its subcommands (the command -`describe-key'). The other subcommands of `C-h' provide different -kinds of help. Type `C-h' three times to get a description of all the -help facilities. *Note Help::. - -* Menu: - -* Blank Lines:: Commands to make or delete blank lines. -* Continuation Lines:: Lines too wide for the frame. -* Position Info:: What page, line, row, or column is point on? -* Arguments:: Numeric arguments for repeating a command. + If you forget what a key does, you can find out with the Help +character, which is `C-h' (or , which is an alias for `C-h'). Type +`C-h k' followed by the key you want to know about; for example, `C-h k +C-n' tells you all about what `C-n' does. `C-h' is a prefix key; `C-h +k' is just one of its subcommands (the command `describe-key'). The +other subcommands of `C-h' provide different kinds of help. Type `C-h' +twice to get a description of all the help facilities. *Note Help::.  -File: xemacs.info, Node: Blank Lines, Next: Continuation Lines, Prev: Basic, Up: Basic +File: xemacs.info, Node: Blank Lines, Next: Continuation Lines, Prev: Basic Help, Up: Basic Blank Lines =========== - Here are special commands and techniques for entering and removing -blank lines. + Here are special commands and techniques for putting in and taking +out blank lines. `C-o' Insert one or more blank lines after the cursor (`open-line'). @@ -802,24 +875,25 @@ blank lines. (`delete-blank-lines'). When you want to insert a new line of text before an existing line, -you just type the new line of text, followed by . If you prefer -to create a blank line first and then insert the desired text, use the -key `C-o' (`open-line'), which inserts a newline after point but leaves -point in front of the newline. Then type the text into the new line. -`C-o F O O' has the same effect as `F O O ', except for the final -location of point. - - To create several blank lines, type `C-o' several times, or give -`C-o' an argument indicating how many blank lines to create. *Note -Arguments::, for more information. - - If you have many blank lines in a row and want to get rid of them, -use `C-x C-o' (`delete-blank-lines'). If point is on a blank line -which is adjacent to at least one other blank line, `C-x C-o' deletes -all but one of the blank lines. If point is on a blank line with no -other adjacent blank line, the sole blank line is deleted. If point is -on a non-blank line, `C-x C-o' deletes any blank lines following that -non-blank line. +you can do it by typing the new line of text, followed by . +However, it may be easier to see what you are doing if you first make a +blank line and then insert the desired text into it. This is easy to do +using the key `C-o' (`open-line'), which inserts a newline after point +but leaves point in front of the newline. After `C-o', type the text +for the new line. `C-o F O O' has the same effect as `F O O ', +except for the final location of point. + + You can make several blank lines by typing `C-o' several times, or +by giving it a numeric argument to tell it how many blank lines to make. +*Note Arguments::, for how. If you have a fill prefix, then `C-o' +command inserts the fill prefix on the new line, when you use it at the +beginning of a line. *Note Fill Prefix::. + + The easy way to get rid of extra blank lines is with the command +`C-x C-o' (`delete-blank-lines'). `C-x C-o' in a run of several blank +lines deletes all but one of them. `C-x C-o' on a solitary blank line +deletes that blank line. When point is on a nonblank line, `C-x C-o' +deletes any blank lines following that nonblank line.  File: xemacs.info, Node: Continuation Lines, Next: Position Info, Prev: Blank Lines, Up: Basic @@ -827,27 +901,34 @@ File: xemacs.info, Node: Continuation Lines, Next: Position Info, Prev: Blank Continuation Lines ================== - If you add too many characters to one line without breaking with a -, the line grows to occupy two (or more) screen lines, with a -curved arrow at the extreme right margin of all but the last line. The -curved arrow indicates that the following screen line is not really a -distinct line in the text, but just the "continuation" of a line too -long to fit the frame. You can use Auto Fill mode (*note Filling::) to -have Emacs insert newlines automatically when a line gets too long. + If you add too many characters to one line without breaking it with +, the line will grow to occupy two (or more) lines on the screen, +with a curved arrow at the extreme right margin of all but the last of +them. The curved arrow says that the following screen line is not +really a distinct line in the text, but just the "continuation" of a +line too long to fit the screen. Continuation is also called "line +wrapping". + + Sometimes it is nice to have Emacs insert newlines automatically when +a line gets too long. Continuation on the screen does not do that. Use +Auto Fill mode (*note Filling::) if that's what you want. Instead of continuation, long lines can be displayed by "truncation". This means that all the characters that do not fit in the width of the frame or window do not appear at all. They remain in the buffer, -temporarily invisible. Three diagonal dots in the last column (instead -of the curved arrow inform you that truncation is in effect. +temporarily invisible. Right arrow in the last column (instead of the +curved arrow) inform you that truncation is in effect. + + Truncation instead of continuation happens whenever horizontal +scrolling is in use, and optionally in all side-by-side windows (*note +Windows::). You can enable truncation for a particular buffer by +setting the variable `truncate-lines' to non-`nil' in that buffer. +(*Note Variables::.) Altering the value of `truncate-lines' makes it +local to the current buffer; until that time, the default value is in +effect. The default is initially `nil'. *Note Locals::. - To turn off continuation for a particular buffer, set the variable -`truncate-lines' to non-`nil' in that buffer. Truncation instead of -continuation also happens whenever horizontal scrolling is in use, and -optionally whenever side-by-side windows are in use (*note Windows::). -Altering the value of `truncate-lines' makes it local to the current -buffer; until that time, the default value is in effect. The default -is initially `nil'. *Note Locals::. + *Note Display Vars::, for additional variables that affect how text +is displayed.  File: xemacs.info, Node: Position Info, Next: Arguments, Prev: Continuation Lines, Up: Basic @@ -868,15 +949,20 @@ information, it is not displayed all the time. `M-x what-line' Print line number of point in the buffer. +`M-x line-number-mode' + Toggle automatic display of current line number. + `M-=' Print number of lines and characters in the current region - (`count-lines-region'). + (`count-lines-region'). *Note Mark::, for information about the + region. `C-x =' Print character code of character after point, character position of point, and column of point (`what-cursor-position'). There are several commands for printing line numbers: + * `M-x what-line' counts lines from the beginning of the file and prints the line number point is on. The first line of the file is line number 1. You can use these numbers as arguments to `M-x @@ -888,19 +974,21 @@ information, it is not displayed all the time. current page. * `M-=' (`count-lines-region') prints the number of lines in the - region (*note Mark::). + region (*note Mark::). *Note Pages::, for the command `C-x l' + which counts the lines in the - The command `C-x =' (`what-cursor-position') provides information -about point and about the column the cursor is in. It prints a line in -the echo area that looks like this: + The command `C-x =' (`what-cursor-position') can be used to find out +the column that the cursor is in, and other miscellaneous information +about point. It prints a line in the echo area that looks like this: - Char: x (0170) point=65986 of 563027(12%) column 44 + Char: c (0143, 99, 0x63) point=18862 of 24800(76%) column 53 -(In fact, this is the output produced when point is before `column 44' +(In fact, this is the output produced when point is before `column 53' in the example.) - The two values after `Char:' describe the character following point, -first by showing it and second by giving its octal character code. + The four values after `Char:' describe the character that follows +point, first by showing it and then by giving its character code in +octal, decimal and hex. `point=' is followed by the position of point expressed as a character count. The front of the buffer counts as position 1, one @@ -915,7 +1003,7 @@ from the left edge of the window. beginning and the end temporarily invisible, `C-x =' prints additional text describing the current visible range. For example, it might say: - Char: x (0170) point=65986 of 563025(12%) <65102 - 68533> column 44 + Char: c (0143, 99, 0x63) point=19674 of 24575(80%) <19591 - 19703> column 69 where the two extra numbers give the smallest and largest character position that point is allowed to assume. The characters between those @@ -933,13 +1021,15 @@ File: xemacs.info, Node: Arguments, Prev: Position Info, Up: Basic Numeric Arguments ================= - Any Emacs command can be given a "numeric argument". Some commands + In mathematics and computer usage, the word "argument" means "data +provided to a function or operation." Any Emacs command can be given a +"numeric argument" (also called a "prefix argument"). Some commands interpret the argument as a repetition count. For example, giving an argument of ten to the key `C-f' (the command `forward-char', move forward one character) moves forward ten characters. With these commands, no argument is equivalent to an argument of one. Negative -arguments are allowed. Often they tell a command to move or act -backwards. +arguments are allowed. Often they tell a command to move or act in +the opposite direction. If your keyboard has a key (labelled with a diamond on Sun-type keyboards and labelled `Alt' on some other keyboards), the @@ -947,16 +1037,19 @@ easiest way to specify a numeric argument is to type digits and/or a minus sign while holding down the key. For example, M-5 C-n -moves down five lines. The characters `Meta-1', `Meta-2', and so on, -as well as `Meta--', do this because they are keys bound to commands -(`digit-argument' and `negative-argument') that are defined to -contribute to an argument for the next command. +would move down five lines. The characters `Meta-1', `Meta-2', and so +on, as well as `Meta--', do this because they are keys bound to +commands (`digit-argument' and `negative-argument') that are defined to +contribute to an argument for the next command. Digits and `-' +modified with Control, or Control and Meta, also specify numeric +arguments. Another way of specifying an argument is to use the `C-u' (`universal-argument') command followed by the digits of the argument. -With `C-u', you can type the argument digits without holding down shift -keys. To type a negative argument, start with a minus sign. Just a -minus sign normally means -1. `C-u' works on all terminals. +With `C-u', you can type the argument digits without holding down +modifier keys; `C-u' works on all terminals. To type a negative +argument, type a minus sign after `C-u'. Just a minus sign without +digits normally means -1. `C-u' followed by a character which is neither a digit nor a minus sign has the special meaning of "multiply by four". It multiplies the @@ -984,9 +1077,22 @@ argument of one. (*Note Killing::, for more information on `C-k'.) A few commands treat a plain `C-u' differently from an ordinary argument. A few others may treat an argument of just a minus sign -differently from an argument of -1. These unusual cases will be -described when they come up; they are always to make the individual -command more convenient to use. +differently from an argument of -1. These unusual cases are described +when they come up; they are always for reasons of convenience of use of +the individual command. + + You can use a numeric argument to insert multiple copies of a +character. This is straightforward unless the character is a digit; for +example, `C-u 6 4 a' inserts 64 copies of the character `a'. But this +does not work for inserting digits; `C-u 6 4 1' specifies an argument +of 641, rather than inserting anything. To separate the digit to +insert from the argument, type another `C-u'; for example, `C-u 6 4 C-u +1' does insert 64 copies of the character `1'. + + We use the term "prefix argument" as well as "numeric argument" to +emphasize that you type the argument before the command, and to +distinguish these arguments from minibuffer arguments that come after +the command.  File: xemacs.info, Node: Undo, Next: Minibuffer, Prev: Basic, Up: Top @@ -1109,99 +1215,3 @@ how XEmacs handles such conflicts: * Minibuffer History:: Reusing recent minibuffer arguments. * Repetition:: Re-executing commands that used the minibuffer. - -File: xemacs.info, Node: Minibuffer File, Next: Minibuffer Edit, Prev: Minibuffer, Up: Minibuffer - -Minibuffers for File Names -========================== - - Sometimes the minibuffer starts out with text in it. For example, -when you are supposed to give a file name, the minibuffer starts out -containing the "default directory", which ends with a slash. This is -to inform you which directory the file will be found in if you do not -specify a directory. - - For example, the minibuffer might start out with these contents: - - Find File: /u2/emacs/src/ - -where `Find File: ' is the prompt. Typing `buffer.c' specifies the -file `/u2/emacs/src/buffer.c'. To find files in nearby directories, -use `..'; thus, if you type `../lisp/simple.el', you will get the file -named `/u2/emacs/lisp/simple.el'. Alternatively, you can kill with -`M-' the directory names you don't want (*note Words::). - - If you don't want any of the default, you can kill it with `C-a -C-k'. But you don't need to kill the default; you can simply ignore it. -Insert an absolute file name, one starting with a slash or a tilde, -after the default directory. For example, to specify the file -`/etc/termcap', just insert that name, giving these minibuffer contents: - - Find File: /u2/emacs/src//etc/termcap - -XEmacs gives a special meaning to a double slash (which is not normally -a useful thing to write): it means, "ignore everything before the -second slash in the pair." Thus, `/u2/emacs/src/' is ignored in the -example above, and you get the file `/etc/termcap'. - - If you set `insert-default-directory' to `nil', the default -directory is not inserted in the minibuffer. This way, the minibuffer -starts out empty. But the name you type, if relative, is still -interpreted with respect to the same default directory. - - -File: xemacs.info, Node: Minibuffer Edit, Next: Completion, Prev: Minibuffer File, Up: Minibuffer - -Editing in the Minibuffer -========================= - - The minibuffer is an XEmacs buffer (albeit a peculiar one), and the -usual XEmacs commands are available for editing the text of an argument -you are entering. - - Since in the minibuffer is defined to exit the minibuffer, you -can't use it to insert a newline in the minibuffer. To do that, type -`C-o' or `C-q C-j'. (Recall that a newline is really the character -control-J.) - - The minibuffer has its own window which always has space on the -screen but acts as if it were not there when the minibuffer is not in -use. When the minibuffer is in use, its window is just like the -others; you can switch to another window with `C-x o', edit text in -other windows and perhaps even visit more files, before returning to the -minibuffer to submit the argument. You can kill text in another window, -return to the minibuffer window, and then yank the text to use it in the -argument. *Note Windows::. - - There are some restrictions on the use of the minibuffer window, -however. You cannot switch buffers in it--the minibuffer and its -window are permanently attached. Also, you cannot split or kill the -minibuffer window. But you can make it taller in the normal fashion with -`C-x ^'. - - If while in the minibuffer you issue a command that displays help -text of any sort in another window, you can use the `C-M-v' command -while in the minibuffer to scroll the help text. This lasts until you -exit the minibuffer. This feature is especially useful if a completing -minibuffer gives you a list of possible completions. *Note Other -Window::. - - If the variable `minibuffer-confirm-incomplete' is `t', you are -asked for confirmation if there is no known completion for the text you -typed. For example, if you attempted to visit a non-existent file, the -minibuffer might read: - Find File: chocolate_bar.c [no completions, confirm] - If you press `Return' again, that confirms the filename. Otherwise, -you can continue editing it. - - XEmacs supports recursive use of the minibuffer. However, it is easy -to do this by accident (because of autorepeating keyboards, for example) -and get confused. Therefore, most XEmacs commands that use the -minibuffer refuse to operate if the minibuffer window is selected. If -the minibuffer is active but you have switched to a different window, -recursive use of the minibuffer is allowed--if you know enough to try -to do this, you probably will not get confused. - - If you set the variable `enable-recursive-minibuffers' to a -non-`nil', recursive use of the minibuffer is always allowed. - diff --git a/info/xemacs.info-4 b/info/xemacs.info-4 index d822f79..34adf30 100644 --- a/info/xemacs.info-4 +++ b/info/xemacs.info-4 @@ -30,6 +30,105 @@ versions, except that the sections entitled "The GNU Manifesto", translation approved by the author instead of in the original English.  +File: xemacs.info, Node: Minibuffer File, Next: Minibuffer Edit, Prev: Minibuffer, Up: Minibuffer + +Minibuffers for File Names +========================== + + Sometimes the minibuffer starts out with text in it. For example, +when you are supposed to give a file name, the minibuffer starts out +containing the "default directory", which ends with a slash. This is +to inform you which directory the file will be found in if you do not +specify a directory. + + For example, the minibuffer might start out with these contents: + + Find File: /u2/emacs/src/ + +where `Find File: ' is the prompt. Typing `buffer.c' specifies the +file `/u2/emacs/src/buffer.c'. To find files in nearby directories, +use `..'; thus, if you type `../lisp/simple.el', you will get the file +named `/u2/emacs/lisp/simple.el'. Alternatively, you can kill with +`M-' the directory names you don't want (*note Words::). + + If you don't want any of the default, you can kill it with `C-a +C-k'. But you don't need to kill the default; you can simply ignore it. +Insert an absolute file name, one starting with a slash or a tilde, +after the default directory. For example, to specify the file +`/etc/termcap', just insert that name, giving these minibuffer contents: + + Find File: /u2/emacs/src//etc/termcap + +XEmacs gives a special meaning to a double slash (which is not normally +a useful thing to write): it means, "ignore everything before the +second slash in the pair." Thus, `/u2/emacs/src/' is ignored in the +example above, and you get the file `/etc/termcap'. + + If you set `insert-default-directory' to `nil', the default +directory is not inserted in the minibuffer. This way, the minibuffer +starts out empty. But the name you type, if relative, is still +interpreted with respect to the same default directory. + + +File: xemacs.info, Node: Minibuffer Edit, Next: Completion, Prev: Minibuffer File, Up: Minibuffer + +Editing in the Minibuffer +========================= + + The minibuffer is an XEmacs buffer (albeit a peculiar one), and the +usual XEmacs commands are available for editing the text of an argument +you are entering. + + Since in the minibuffer is defined to exit the minibuffer, you +can't use it to insert a newline in the minibuffer. To do that, type +`C-o' or `C-q C-j'. (Recall that a newline is really the character +control-J.) + + The minibuffer has its own window which always has space on the +screen but acts as if it were not there when the minibuffer is not in +use. When the minibuffer is in use, its window is just like the +others; you can switch to another window with `C-x o', edit text in +other windows and perhaps even visit more files, before returning to the +minibuffer to submit the argument. You can kill text in another window, +return to the minibuffer window, and then yank the text to use it in the +argument. *Note Windows::. + + There are some restrictions on the use of the minibuffer window, +however. You cannot switch buffers in it--the minibuffer and its +window are permanently attached. Also, you cannot split or kill the +minibuffer window. But you can make it taller in the normal fashion with +`C-x ^'. If you enable Resize-Minibuffer mode, then the minibuffer +window expands vertically as necessary to hold the text that you put in +the minibuffer. Use `M-x resize-minibuffer-mode' to enable or disable +this minor mode (*note Minor Modes::). + + If while in the minibuffer you issue a command that displays help +text of any sort in another window, you can use the `C-M-v' command +while in the minibuffer to scroll the help text. This lasts until you +exit the minibuffer. This feature is especially useful if a completing +minibuffer gives you a list of possible completions. *Note Other +Window::. + + If the variable `minibuffer-confirm-incomplete' is `t', you are +asked for confirmation if there is no known completion for the text you +typed. For example, if you attempted to visit a non-existent file, the +minibuffer might read: + Find File: chocolate_bar.c [no completions, confirm] + If you press `Return' again, that confirms the filename. Otherwise, +you can continue editing it. + + XEmacs supports recursive use of the minibuffer. However, it is easy +to do this by accident (because of autorepeating keyboards, for example) +and get confused. Therefore, most XEmacs commands that use the +minibuffer refuse to operate if the minibuffer window is selected. If +the minibuffer is active but you have switched to a different window, +recursive use of the minibuffer is allowed--if you know enough to try +to do this, you probably will not get confused. + + If you set the variable `enable-recursive-minibuffers' to a +non-`nil', recursive use of the minibuffer is always allowed. + + File: xemacs.info, Node: Completion, Next: Minibuffer History, Prev: Minibuffer Edit, Up: Minibuffer Completion @@ -91,7 +190,7 @@ possibilities for the very next character--it could be any of `c-'--so no more characters are added; instead, displays a list of all possible completions in another window. - If you go on to type `f ', this sees `auto-f'. The only + If you go on to type `-f ', this sees `auto-f'. The only command name starting this way is `auto-fill-mode', so completion fills in the rest of that. You now have `auto-fill-mode' in the minibuffer after typing just `au f '. Note that has this effect @@ -150,6 +249,14 @@ window that displays a list of completions: but you must click in the list of completions, not in the minibuffer itself. +`' +`M-v' + Typing or `M-v', while in the minibuffer, selects the + window showing the completion list buffer + (`switch-to-completions'). This paves the way for using the + commands below. (Selecting that window in the usual ways has the + same effect, but this way is more convenient.) + `' Typing _in the completion list buffer_ chooses the completion that point is in or next to (`choose-completion'). To @@ -234,6 +341,10 @@ in contexts where `completing-read' allows answers that are not valid completions, an extra must be typed to confirm the response. This is helpful for catching typos. + Icomplete mode presents a constantly-updated display that tells you +what completions are available for the text you've entered so far. The +command to enable or disable this minor mode is `M-x icomplete-mode'. +  File: xemacs.info, Node: Minibuffer History, Next: Repetition, Prev: Completion, Up: Minibuffer @@ -320,11 +431,11 @@ name. Re-execute a recent minibuffer command (`repeat-complex-command'). `M-p' - Within `C-x ', move to previous recorded command + Within `C-x ', move to previous recorded command (`previous-history-element'). `M-n' - Within `C-x ', move to the next (more recent) recorded + Within `C-x ', move to the next (more recent) recorded command (`next-history-element'). `M-x list-command-history' @@ -1116,87 +1227,3 @@ delimiter (to exclude it). Finally, `C-x h' (`mark-whole-buffer') sets up the entire buffer as the region by putting point at the beginning and the mark at the end. - -File: xemacs.info, Node: Mark Ring, Prev: Marking Objects, Up: Mark - -The Mark Ring -------------- - - Aside from delimiting the region, the mark is also useful for marking -a spot that you may want to go back to. To make this feature more -useful, Emacs remembers 16 previous locations of the mark in the "mark -ring". Most commands that set the mark push the old mark onto this -ring. To return to a marked location, use `C-u C-' (or `C-u -C-@'); this is the command `set-mark-command' given a numeric argument. -The command moves point to where the mark was, and restores the mark -from the ring of former marks. Repeated use of this command moves point -to all the old marks on the ring, one by one. The marks you have seen -go to the end of the ring, so no marks are lost. - - Each buffer has its own mark ring. All editing commands use the -current buffer's mark ring. In particular, `C-u C-' always stays -in the same buffer. - - Many commands that can move long distances, such as `M-<' -(`beginning-of-buffer'), start by setting the mark and saving the old -mark on the mark ring. This makes it easier for you to move back -later. Searches set the mark, unless they do not actually move point. -When a command sets the mark, `Mark Set' is printed in the echo area. - - The variable `mark-ring-max' is the maximum number of entries to -keep in the mark ring. If that many entries exist and another entry is -added, the last entry in the list is discarded. Repeating `C-u -C-' circulates through the entries that are currently in the ring. - - The variable `mark-ring' holds the mark ring itself, as a list of -marker objects in the order most recent first. This variable is local -in every buffer. - - -File: xemacs.info, Node: Mouse Selection, Next: Additional Mouse Operations, Prev: Mark, Up: Top - -Selecting Text with the Mouse -============================= - - If you are using XEmacs under X, you can use the mouse pointer to -select text. (The normal mouse pointer is an I-beam, the same pointer -that `xterm' uses.) - - The glyph variable `text-pointer-glyph' controls the shape of the -mouse pointer when over text. You can also control the shape of the -mouse pointer when over nontext using `nontext-pointer-glyph', and the -shape of the mouse pointer when over the modeline using -`modeline-pointer-glyph'. (Remember, you should use `set-glyph-image', -not `setq', to set one of these variables.) - - If you want to get fancy, you can set the foreground and background -colors of the mouse pointer by setting the `pointer' face. - - There are two ways to select a region of text with the mouse: - - To select a word in text, double-click with the left mouse button -while the mouse cursor is over the word. The word is highlighted when -selected. On monochrome monitors, a stippled background indicates that a -region of text has been highlighted. On color monitors, a color -background indicates highlighted text. You can triple-click to select -whole lines. - - To select an arbitrary region of text: - - 1. Move the mouse cursor over the character at the beginning of the - region of text you want to select. - - 2. Press and hold the left mouse button. - - 3. While holding the left mouse button down, drag the cursor to the - character at the end of the region of text you want to select. - - 4. Release the left mouse button. - The selected region of text is highlighted. - - Once a region of text is selected, it becomes the primary X selection -(*note Using X Selections::) as well as the Emacs selected region. You -can paste it into other X applications and use the options from the -Edit pull-down menu on it. Since it is also the Emacs region, you can -use Emacs region commands on it. - diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4204c58..0ce9a98 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,16 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + +2000-05-11 Ben Wing + + * i.c (get_command): fix unused var warning. + + * make-docfile.c (MDGET): + * make-docfile.c (read_c_string): + rewrite and reindent -- handle closing doc string comment that's + not at beg of line. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/lib-src/config.values.in b/lib-src/config.values.in index c3e3de9..e71f67b 100644 --- a/lib-src/config.values.in +++ b/lib-src/config.values.in @@ -45,8 +45,6 @@ LIBS "@LIBS@" LISPDIR "@LISPDIR@" LISPDIR_USER_DEFINED "@LISPDIR_USER_DEFINED@" LN_S "@LN_S@" -LOCKDIR "@LOCKDIR@" -LOCKDIR_USER_DEFINED "@LOCKDIR_USER_DEFINED@" MAKE_SUBDIR "@MAKE_SUBDIR@" MODULEDIR "@MODULEDIR@" MODULEDIR_USER_DEFINED "@MODULEDIR_USER_DEFINED@" @@ -116,7 +114,6 @@ libexecdir "@libexecdir@" libs_xauth "@libs_xauth@" lispdir "@lispdir@" localstatedir "@localstatedir@" -lockdir "@lockdir@" lwlib_objs "@lwlib_objs@" machfile "@machfile@" mandir "@mandir@" diff --git a/lib-src/i.c b/lib-src/i.c index 1bec21f..097b311 100644 --- a/lib-src/i.c +++ b/lib-src/i.c @@ -90,7 +90,7 @@ start_pump (I_connector* pi) static LPTSTR get_command (void) { - LPTSTR q, ws, cl = GetCommandLine (); + LPTSTR cl = GetCommandLine (); int ix; while (1) diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 141287a..d971a11 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -303,48 +303,59 @@ char buf[128]; Convert escape sequences \n and \t to newline and tab; discard \ followed by newline. */ +#define MDGET do { prevc = c; c = getc (infile); } while (0) static int read_c_string (FILE *infile, int printflag, int c_docstring) { - register int c; + register int prevc = 0, c = 0; char *p = buf; int start = -1; - c = getc (infile); + MDGET; while (c != EOF) { while ((c_docstring || c != '"') && c != EOF) { - if (start) + if (c == '*') { - if (c == '*') + int cc = getc (infile); + if (cc == '/') { - int cc = getc (infile); - if (cc == '/') - break; - else - ungetc (cc, infile); + if (prevc != '\n') + { + if (printflag > 0) + { + if (ellcc) + fprintf (outfile, "\\n\\"); + putc ('\n', outfile); + } + else if (printflag < 0) + *p++ = '\n'; + } + break; } + else + ungetc (cc, infile); + } - if (start != -1) + if (start == 1) + { + if (printflag > 0) { - if (printflag > 0) - { - if (ellcc) - fprintf (outfile, "\\n\\"); - putc ('\n', outfile); - } - else if (printflag < 0) - *p++ = '\n'; + if (ellcc) + fprintf (outfile, "\\n\\"); + putc ('\n', outfile); } + else if (printflag < 0) + *p++ = '\n'; } if (c == '\\') { - c = getc (infile); + MDGET; if (c == '\n') { - c = getc (infile); + MDGET; start = 1; continue; } @@ -358,32 +369,36 @@ read_c_string (FILE *infile, int printflag, int c_docstring) else { start = 0; - if (printflag > 0) { - if (ellcc && c == '"') - putc ('\\', outfile); - putc (c, outfile); - } + if (printflag > 0) + { + if (ellcc && c == '"') + putc ('\\', outfile); + putc (c, outfile); + } else if (printflag < 0) *p++ = c; } - c = getc (infile); + MDGET; } /* look for continuation of string */ if (Current_file_type == c_file) { - while (isspace (c = getc (infile))) - ; + do + { + MDGET; + } + while (isspace (c)); if (c != '"') break; } else { - c = getc (infile); + MDGET; if (c != '"') break; /* If we had a "", concatenate the two strings. */ } - c = getc (infile); + MDGET; } if (printflag < 0) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc53514..8793cb0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,196 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + +2000-05-20 Karl M. Hegbloom + + * font-lock.el (font-lock-keywords): Rewrote docstring + +2000-05-22 Karl M. Hegbloom + + * loadhist.el (unload-feature): handle case where x is both boundp + and fboundp + +2000-05-22 Karl M. Hegbloom + + * packages.el: It's ok to use built-in macros, but not lisp + defined ones. + +2000-05-20 Ben Wing + + * font-lock.el: + * font-lock.el (font-lock-message-threshold): + * font-lock.el (font-lock-mode): + * font-lock.el (font-lock-default-fontify-buffer): + * font-lock.el (font-lock-always-fontify-immediately): + * font-lock.el (font-lock-old-extent): Removed. + * font-lock.el (font-lock-old-len): Removed. + * font-lock.el (font-lock-fontify-glumped-region): Removed. + * font-lock.el (font-lock-pending-extent-table): New. + * font-lock.el (font-lock-range-table): New. + * font-lock.el (font-lock-after-change-function): + * font-lock.el (font-lock-after-change-function-1): Removed. + * font-lock.el (font-lock-fontify-pending-extents): New. + * font-lock.el ('font-lock-revert-cleanup): Removed. + * font-lock.el ('font-lock-revert-setup): Removed. + Rewrite deferral code to handle any number of changes, merging + them properly. Remove hacked-up code for revert-buffer, now + unnecessary. + + * menubar-items.el (default-menubar): + In Options->Edit Init File, don't switch to emacs-lisp-mode + unless necessary; doing this turns off font-lock. + +2000-05-15 Yoshiki Hayashi + + * keydefs.el: Define C-x BS to backward-kill-sentence. + +2000-05-15 Yoshiki Hayashi + + * files.el (hack-local-variables-prop-line): Use non-greedy + matching to process -*-texinfo-*- -*-. + +2000-05-11 Jonathan Marten + + * minibuf.el (minibuf-directory-files): new function. + (read-file-name-activate-callback): use minibuf-directory-files. + (read-directory-name-internal): ditto. + (mouse-file-display-completion-list): ditto. + (mouse-directory-display-completion-list): ditto. + (read-file-name-internal): remove "./" from completion list unless + explicitly matched, for consistency. + +2000-05-11 Ben Wing + + * gutter-items.el (gutter-buffers-tab): + * gutter-items.el (add-tab-to-gutter): + * gutter-items.el (update-tab-in-gutter): + * gutter-items.el (remove-buffer-from-gutter-tab): Removed. + * gutter-items.el (append-progress-display): + * gutter-items.el (abort-progress-display): + * gutter-items.el (raw-append-progress-display): + Further fixes. Use set-glyph-image not set-image-instance-property, + to fix problems with multiple windows in a frame. + + * menubar-items.el (tutorials-menu-filter): + Fix typo. + + * startup.el (early-error-handler): + Display message box under windows; otherwise, message will disappear + before it can be viewed. + + * update-elc.el: + Fix bug in NEEDTODUMP processing. + +2000-05-08 Yoshiki Hayashi + + * startup.el (lock-directory): Removed. + (superlock-file): Ditto. + (startup-set-paths): Remove lockdir. + (startup-setup-paths-warning): Remove lock-directory. + + * setup-paths.el (paths-find-lock-directory): Removed. + (paths-find-superlock-file): Ditto. + +2000-05-09 Ben Wing + + * faces.el (set-face-property): + * faces.el (set-face-font): + * faces.el (set-face-foreground): + * faces.el (set-face-background): + * faces.el (set-face-background-pixmap): + * faces.el (set-face-underline-p): + * faces.el (set-face-strikethru-p): + * faces.el (set-face-highlight-p): + * faces.el (set-face-dim-p): + * faces.el (set-face-blinking-p): + * faces.el (set-face-reverse-p): + doc string changes. + + * glyphs.el: + * glyphs.el (make-image-specifier): + * glyphs.el (glyph-property): + * glyphs.el (set-glyph-image): + * glyphs.el (make-glyph): + * glyphs.el (make-pointer-glyph): + * glyphs.el (make-icon-glyph): + * glyphs.el (widget-image-instance-p): New. + authorship info, lots of doc changes. New predicate, inadvertently + omitted. the general principle with specifier docs is now that + the description of instantiators should go with the make-foo-specifier + fun's doc string, rather than in foo-specifier-p. this follows + conventions elsewhere in XEmacs and in general is a lot more obvious + of a place to look. sometimes the make-foo-specifier function needs + to be created in the process. + + * gutter.el: + * gutter.el (make-gutter-specifier): New. + * gutter.el (make-gutter-size-specifier): New. + * gutter.el (make-gutter-visible-specifier): New. + specifier doc updates according to the conventions specified before. + + * objects.el: + * objects.el (make-font-specifier): + * objects.el (make-color-specifier): + * objects.el (make-face-boolean-specifier): New. + specifier doc updates according to the conventions specified before. + + * specifier.el: + * specifier.el (set-specifier): + * specifier.el (make-integer-specifier): New. + * specifier.el (make-boolean-specifier): New. + * specifier.el (make-natnum-specifier): New. + * specifier.el (make-generic-specifier): New. + * specifier.el (make-display-table-specifier): New. + specifier doc updates according to the conventions specified before. + + * toolbar.el: + * toolbar.el (make-toolbar-specifier): New. + specifier doc updates according to the conventions specified before. + +2000-05-09 Ben Wing + + * process.el (call-process-internal): Revert to previous version + because Mike's change clashed with a change I did not long before. + Changed progn to prog1 to fix the bug pointed out by Mike Alexander. + Thanks very much Mike for pointing out the bug and submitting a + patch! + +2000-04-13 Mike Alexander + + * process.el (call-process-internal): Send the correct input buffer + (call-process-internal): Return the exit status of the process + +2000-05-07 Ben Wing + + * winnt.el: + * winnt.el (nt-quote-args-verbatim): Removed. + * winnt.el (nt-quote-args-prefix-quote): Removed. + * winnt.el (nt-quote-args-backslash-quote): Removed. + * winnt.el (nt-quote-args-double-quote): Removed. + * winnt.el (nt-quote-args-functions-alist): Removed. + * winnt.el (nt-quote-process-args): Removed. + Remove all stuff for argument quoting. We borrow the code instead + from Emacs 20.6, which is much more careful in its quoting + (e.g. in handling runs of the escape character) and avoids most of + the need for this Lisp mechanism by checking to see whether we're + running a Cygwin or normal program and doing the appropriate + quoting. If we end up needing such a mechanism, we should add + it by extending the variable `mswindows-quote-process-args' so it + can take an alist of regexps. + +2000-05-07 Ben Wing + + * keydefs.el: + Restore M-up, M-down to 21.1 state. Put *ward-sentence on + C-M-left, C-M-right instead. Define C-M-up, C-M-down to scroll + the window without moving point. + + * simple.el: + * simple.el (scroll-up-one): New. + * simple.el (scroll-down-one): New. + Functions for use with C-M-up/down. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/lisp/custom-load.el b/lisp/custom-load.el index 242478a..21ff01b 100644 --- a/lisp/custom-load.el +++ b/lisp/custom-load.el @@ -60,8 +60,8 @@ (custom-add-loads 'files '("files")) (custom-add-loads 'build '("build-report")) (custom-add-loads 'font-lock '("font-lock")) -(custom-add-loads 'external '("process" "cus-edit")) -(custom-add-loads 'development '("process" "lisp-mode" "cus-edit")) +(custom-add-loads 'external '("process2" "cus-edit")) +(custom-add-loads 'development '("process2" "lisp-mode" "cus-edit")) (custom-add-loads 'gnuserv '("gnuserv")) (custom-add-loads 'gutter '("gutter" "gutter-items")) (custom-add-loads 'fill-comments '("simple")) @@ -73,7 +73,7 @@ (custom-add-loads 'display '("toolbar" "scrollbar" "auto-show")) (custom-add-loads 'faces '("faces" "font" "cus-edit" "font-lock" "hyper-apropos" "info" "wid-edit")) (custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get")) -(custom-add-loads 'processes '("process" "gnuserv")) +(custom-add-loads 'processes '("process2" "gnuserv")) (custom-add-loads 'hyper-apropos '("hyper-apropos")) (custom-add-loads 'wp '("printer" "cus-edit")) (custom-add-loads 'vc '("files")) diff --git a/lisp/faces.el b/lisp/faces.el index 616c510..d149cb0 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -292,41 +292,41 @@ If PROPERTY is not a built-in property, then this function will The following symbols have predefined meanings: foreground The foreground color of the face. - For valid instantiators, see `color-specifier-p'. + For valid instantiators, see `make-color-specifier'. background The background color of the face. - For valid instantiators, see `color-specifier-p'. + For valid instantiators, see `make-color-specifier'. font The font used to display text covered by this face. - For valid instantiators, see `font-specifier-p'. + For valid instantiators, see `make-font-specifier'. display-table The display table of the face. This should be a vector of 256 elements. background-pixmap The pixmap displayed in the background of the face. Only used by faces on X devices. - For valid instantiators, see `image-specifier-p'. + For valid instantiators, see `make-image-specifier'. underline Underline all text covered by this face. - For valid instantiators, see `face-boolean-specifier-p'. + For valid instantiators, see `make-face-boolean-specifier'. strikethru Draw a line through all text covered by this face. - For valid instantiators, see `face-boolean-specifier-p'. + For valid instantiators, see `make-face-boolean-specifier'. highlight Highlight all text covered by this face. Only used by faces on TTY devices. - For valid instantiators, see `face-boolean-specifier-p'. + For valid instantiators, see `make-face-boolean-specifier'. dim Dim all text covered by this face. - For valid instantiators, see `face-boolean-specifier-p'. + For valid instantiators, see `make-face-boolean-specifier'. blinking Blink all text covered by this face. Only used by faces on TTY devices. - For valid instantiators, see `face-boolean-specifier-p'. + For valid instantiators, see `make-face-boolean-specifier'. reverse Reverse the foreground and background colors. Only used by faces on TTY devices. - For valid instantiators, see `face-boolean-specifier-p'. + For valid instantiators, see `make-face-boolean-specifier'. doc-string Description of what the face's normal use is. NOTE: This is not a specifier, unlike all @@ -433,7 +433,7 @@ See `face-property-instance' for more information." FACE may be either a face object or a symbol representing a face. -FONT should be an instantiator (see `font-specifier-p'), a list of +FONT should be an instantiator (see `make-font-specifier'), a list of instantiators, an alist of specifications (each mapping a locale to an instantiator list), or a font specifier object. @@ -490,7 +490,7 @@ See `face-property-instance' for more information." FACE may be either a face object or a symbol representing a face. -COLOR should be an instantiator (see `color-specifier-p'), a list of +COLOR should be an instantiator (see `make-color-specifier'), a list of instantiators, an alist of specifications (each mapping a locale to an instantiator list), or a color specifier object. @@ -547,7 +547,7 @@ See `face-property-instance' for more information." FACE may be either a face object or a symbol representing a face. -COLOR should be an instantiator (see `color-specifier-p'), a list of +COLOR should be an instantiator (see `make-color-specifier'), a list of instantiators, an alist of specifications (each mapping a locale to an instantiator list), or a color specifier object. @@ -595,7 +595,7 @@ This property is only used on window system devices. FACE may be either a face object or a symbol representing a face. -PIXMAP should be an instantiator (see `image-specifier-p'), a list +PIXMAP should be an instantiator (see `make-image-specifier'), a list of instantiators, an alist of specifications (each mapping a locale to an instantiator list), or an image specifier object. @@ -652,7 +652,7 @@ See `face-property-instance' for the semantics of the DOMAIN argument." how-to-add) "Change the underline property of FACE to UNDERLINE-P. UNDERLINE-P is normally a face-boolean instantiator; see - `face-boolean-specifier-p'. + `make-face-boolean-specifier'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and HOW-TO-ADD arguments." (interactive (face-interactive "underline-p" "underlined")) @@ -667,7 +667,7 @@ See `face-property-instance' for the semantics of the DOMAIN argument." how-to-add) "Change whether FACE is strikethru-d (i.e. struck through) in LOCALE. STRIKETHRU-P is normally a face-boolean instantiator; see - `face-boolean-specifier-p'. + `make-face-boolean-specifier'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and HOW-TO-ADD arguments." (interactive (face-interactive "strikethru-p" "strikethru-d")) @@ -682,7 +682,7 @@ See `face-property-instance' for the semantics of the DOMAIN argument." how-to-add) "Change whether FACE is highlighted in LOCALE (TTY locales only). HIGHLIGHT-P is normally a face-boolean instantiator; see - `face-boolean-specifier-p'. + `make-face-boolean-specifier'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and HOW-TO-ADD arguments." (interactive (face-interactive "highlight-p" "highlighted")) @@ -696,7 +696,7 @@ See `face-property-instance' for the semantics of the DOMAIN argument." (defun set-face-dim-p (face dim-p &optional locale tag-set how-to-add) "Change whether FACE is dimmed in LOCALE. DIM-P is normally a face-boolean instantiator; see - `face-boolean-specifier-p'. + `make-face-boolean-specifier'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and HOW-TO-ADD arguments." (interactive (face-interactive "dim-p" "dimmed")) @@ -711,7 +711,7 @@ See `face-property-instance' for the semantics of the DOMAIN argument." how-to-add) "Change whether FACE is blinking in LOCALE (TTY locales only). BLINKING-P is normally a face-boolean instantiator; see - `face-boolean-specifier-p'. + `make-face-boolean-specifier'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and HOW-TO-ADD arguments." (interactive (face-interactive "blinking-p" "blinking")) @@ -725,7 +725,7 @@ See `face-property-instance' for the semantics of the DOMAIN argument." (defun set-face-reverse-p (face reverse-p &optional locale tag-set how-to-add) "Change whether FACE is reversed in LOCALE (TTY locales only). REVERSE-P is normally a face-boolean instantiator; see - `face-boolean-specifier-p'. + `make-face-boolean-specifier'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and HOW-TO-ADD arguments." (interactive (face-interactive "reverse-p" "reversed")) diff --git a/lisp/files.el b/lisp/files.el index f38a941..7a64a89 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1542,7 +1542,7 @@ for current buffer." (cond ((not (search-forward "-*-" end t)) ;; doesn't have one. (setq force t)) - ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") + ((looking-at "[ \t]*\\([^ \t\n\r:;]+?\\)\\([ \t]*-\\*-\\)") ;; Antiquated form: "-*- ModeName -*-". (setq result (list (cons 'mode diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 3969793..ce98ccc 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -178,8 +178,8 @@ The size is measured in characters. This affects `font-lock-fontify-region' but not `font-lock-fontify-buffer'. (In other words, when you first visit a file and it gets fontified, you will see status messages no matter what size the file is. However, if you do something else like paste a -chunk of text or revert a buffer, you will see status messages only if the -changed region is large enough.) +chunk of text, you will see status messages only if the changed region is +large enough.) Note that setting `font-lock-verbose' to nil disables the status messages entirely." @@ -318,95 +318,123 @@ megabyte for buffers in `rmail-mode', and size is irrelevant otherwise." ;;;###autoload (defvar font-lock-keywords nil - "A list of the keywords to highlight. -Each element should be of the form: - - MATCHER - (MATCHER . MATCH) - (MATCHER . FACENAME) - (MATCHER . HIGHLIGHT) - (MATCHER HIGHLIGHT ...) - (eval . FORM) - -where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED. - -FORM is an expression, whose value should be a keyword element, -evaluated when the keyword is (first) used in a buffer. This feature -can be used to provide a keyword that can only be generated when Font -Lock mode is actually turned on. + "A list defining the keywords for `font-lock-mode' to highlight. + + FONT-LOCK-KEYWORDS := List of FONT-LOCK-FORM's. + + FONT-LOCK-FORM :== MATCHER + | (MATCHER . MATCH) + | (MATCHER . FACE-FORM) + | (MATCHER . HIGHLIGHT) + | (MATCHER HIGHLIGHT ...) + | (eval . FORM) + + MATCHER :== A string containing a regexp. + | A variable containing a regexp to search for. + | A function to call to make the search. + It is called with one arg, the limit of the search, + and should leave MATCH results in the XEmacs global + match data. + + MATCH :== An integer match subexpression number from MATCHER. + + FACE-FORM :== The symbol naming a defined face. + | Expression whos value is the face name to use. If you + want FACE-FORM to be a symbol that evaluates to a face, + use a form like \"(progn sym)\". + + HIGHLIGHT :== MATCH-HIGHLIGHT + | MATCH-ANCHORED + + FORM :== Expression returning a FONT-LOCK-FORM, evaluated when + the FONT-LOCK-FORM is first used in a buffer. This + feature can be used to provide a FONT-LOCK-FORM that + can only be generated when Font Lock mode is actually + turned on. + + MATCH-HIGHLIGHT :== (MATCH FACE-FORM OVERRIDE LAXMATCH) + + OVERRIDE :== t - overwrite existing fontification + | 'keep - only parts not already fontified are + highlighted. + | 'prepend - merge faces, this fontification has + precedence over existing + | 'append - merge faces, existing fontification has + precedence over + this face. + + LAXMATCH :== If non-nil, no error is signalled if there is no MATCH + in MATCHER. + + MATCH-ANCHORED :== (ANCHOR-MATCHER PRE-MATCH-FORM \\ + POST-MATCH-FORM MATCH-HIGHLIGHT ...) + + ANCHOR-MATCHER :== Like a MATCHER, except that the limit of the search + defaults to the end of the line after PRE-MATCH-FORM + is evaluated. However, if PRE-MATCH-FORM returns a + position greater than the end of the line, that + position is used as the limit of the search. It is + generally a bad idea to return a position greater than + the end of the line, i.e., cause the ANCHOR-MATCHER + search to span lines. + + PRE-MATCH-FORM :== Evaluated before the ANCHOR-MATCHER is used, therefore + can be used to initialize before, ANCHOR-MATCHER is + used. Typically, PRE-MATCH-FORM is used to move to + some position relative to the original MATCHER, before + starting with the ANCHOR-MATCHER. + + POST-MATCH-FORM :== Like PRE-MATCH-FORM, but used to clean up after the + ANCHOR-MATCHER. It might be used to move, before + resuming with MATCH-ANCHORED's parent's MATCHER. + +For example, an element of the first form highlights (if not already highlighted): + + \"\\\\\" Discrete occurrences of \"foo\" in the value + of the variable `font-lock-keyword-face'. + + (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of + \"fubar\" in the value of + `font-lock-keyword-face'. + + (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of + `fubar-face'. + + (\"foo\\\\|bar\" 0 foo-bar-face t) Occurrences of either \"foo\" or \"bar\" in the + value of `foo-bar-face', even if already + highlighted. + + (fubar-match 1 fubar-face) The first subexpression within all + occurrences of whatever the function + `fubar-match' finds and matches in the value + of `fubar-face'. + + (\"\\\\\" (0 anchor-face) (\"\\\\\" nil nil (0 item-face))) + -------------- --------------- ------------ --- --- ------------- + | | | | | | + MATCHER | ANCHOR-MATCHER | +------+ MATCH-HIGHLIGHT + MATCH-HIGHLIGHT PRE-MATCH-FORM | + POST-MATCH-FORM + + Discrete occurrences of \"anchor\" in the value of `anchor-face', and + subsequent discrete occurrences of \"item\" (on the same line) in the value + of `item-face'. (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. + Therefore \"item\" is initially searched for starting from the end of the + match of \"anchor\", and searching for subsequent instance of \"anchor\" + resumes from where searching for \"item\" concluded.) For highlighting single items, typically only MATCH-HIGHLIGHT is required. -However, if an item or (typically) items is to be highlighted following the -instance of another item (the anchor) then MATCH-ANCHORED may be required. - -MATCH-HIGHLIGHT should be of the form: - - (MATCH FACENAME OVERRIDE LAXMATCH) - -Where MATCHER can be either the regexp to search for, a variable -containing the regexp to search for, or the function to call to make -the search (called with one argument, the limit of the search). MATCH -is the subexpression of MATCHER to be highlighted. FACENAME is either -a symbol naming a face, or an expression whose value is the face name -to use. If you want FACENAME to be a symbol that evaluates to a face, -use a form like \"(progn sym)\". - -OVERRIDE and LAXMATCH are flags. If OVERRIDE is t, existing fontification may -be overwritten. If `keep', only parts not already fontified are highlighted. -If `prepend' or `append', existing fontification is merged with the new, in -which the new or existing fontification, respectively, takes precedence. -If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER. - -For example, an element of the form highlights (if not already highlighted): - - \"\\\\\\=\" Discrete occurrences of \"foo\" in the value of the - variable `font-lock-keyword-face'. - (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of \"fubar\" in - the value of `font-lock-keyword-face'. - (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of `fubar-face'. - (\"foo\\\\|bar\" 0 foo-bar-face t) - Occurrences of either \"foo\" or \"bar\" in the value - of `foo-bar-face', even if already highlighted. - -MATCH-ANCHORED should be of the form: - - (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...) - -Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below. -PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after -the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be -used to initialize before, and cleanup after, MATCHER is used. Typically, -PRE-MATCH-FORM is used to move to some position relative to the original -MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might -be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER. - -For example, an element of the form highlights (if not already highlighted): - - (\"\\\\\\=\" (0 anchor-face) (\"\\\\\\=\" nil nil (0 item-face))) - - Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent - discrete occurrences of \"item\" (on the same line) in the value of `item-face'. - (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. Therefore \"item\" is - initially searched for starting from the end of the match of \"anchor\", and - searching for subsequent instance of \"anchor\" resumes from where searching - for \"item\" concluded.) - -The above-mentioned exception is as follows. The limit of the MATCHER search -defaults to the end of the line after PRE-MATCH-FORM is evaluated. -However, if PRE-MATCH-FORM returns a position greater than the position after -PRE-MATCH-FORM is evaluated, that position is used as the limit of the search. -It is generally a bad idea to return a position greater than the end of the -line, i.e., cause the MATCHER search to span lines. - -Note that the MATCH-ANCHORED feature is experimental; in the future, we may -replace it with other ways of providing this functionality. +However, if an item or (typically) several items are to be highlighted +following the instance of another item (the anchor) then MATCH-ANCHORED may be +required. These regular expressions should not match text which spans lines. While -\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating -when you edit the buffer does not, since it considers text one line at a time. +\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating when you +edit the buffer does not, since it considers text one line at a time. -Be very careful composing regexps for this list; -the wrong pattern can dramatically slow things down!") +Be very careful composing regexps for this list; the wrong pattern can +dramatically slow things down! +") ;;;###autoload (make-variable-buffer-local 'font-lock-keywords) @@ -829,11 +857,6 @@ See the variable `font-lock-keywords' for customization." (set (make-local-variable 'font-lock-mode) on-p) (cond (on-p (font-lock-set-defaults-1) - (make-local-hook 'before-revert-hook) - (make-local-hook 'after-revert-hook) - ;; If buffer is reverted, must clean up the state. - (add-hook 'before-revert-hook 'font-lock-revert-setup nil t) - (add-hook 'after-revert-hook 'font-lock-revert-cleanup nil t) (run-hooks 'font-lock-mode-hook) (cond (font-lock-fontified nil) @@ -845,13 +868,9 @@ See the variable `font-lock-keywords' for customization." (buffer-name))))) (font-lock-fontified (setq font-lock-fontified nil) - (remove-hook 'before-revert-hook 'font-lock-revert-setup t) - (remove-hook 'after-revert-hook 'font-lock-revert-cleanup t) (font-lock-unfontify-region (point-min) (point-max)) (font-lock-thing-lock-cleanup)) (t - (remove-hook 'before-revert-hook 'font-lock-revert-setup t) - (remove-hook 'after-revert-hook 'font-lock-revert-cleanup t) (font-lock-thing-lock-cleanup))) (redraw-modeline))) @@ -974,45 +993,46 @@ This can take a while for large buffers." (defun font-lock-unfontify-region (beg end &optional loudly) (funcall font-lock-unfontify-region-function beg end loudly)) -;; #### In these functions, the FSF is careful to do -;; (save-restriction -;; (widen) -;; before anything else. Should we copy? (defun font-lock-default-fontify-buffer () (interactive) - (let ((was-on font-lock-mode) - (font-lock-verbose (or font-lock-verbose (interactive-p))) - (font-lock-message-threshold 0) - (aborted nil)) - ;; Turn it on to run hooks and get the right font-lock-keywords. - (or was-on (font-lock-mode 1)) - (font-lock-unfontify-region (point-min) (point-max) t) -;; (buffer-syntactic-context-flush-cache) + ;; if we don't widen, then the C code will fail to + ;; realize that we're inside a comment. + (save-restriction + (widen) + (let ((was-on font-lock-mode) + (font-lock-verbose (or font-lock-verbose (interactive-p))) + (font-lock-message-threshold 0) + (aborted nil)) + ;; Turn it on to run hooks and get the right font-lock-keywords. + (or was-on (font-lock-mode 1)) + (font-lock-unfontify-region (point-min) (point-max) t) + ;; (buffer-syntactic-context-flush-cache) - ;; If a ^G is typed during fontification, abort the fontification, but - ;; return normally (do not signal.) This is to make it easy to abort - ;; fontification if it's taking a long time, without also causing the - ;; buffer not to pop up. If a real abort is desired, the user can ^G - ;; again. - ;; - ;; Possibly this should happen down in font-lock-fontify-region instead - ;; of here, but since that happens from the after-change-hook (meaning - ;; much more frequently) I'm afraid of the bad consequences of stealing - ;; the interrupt character at inopportune times. - ;; - (condition-case nil - (save-excursion - (font-lock-fontify-region (point-min) (point-max))) - (t - (setq aborted t))) - - (or was-on ; turn it off if it was off. - (let ((font-lock-fontified nil)) ; kludge to prevent defontification - (font-lock-mode 0))) - (set (make-local-variable 'font-lock-fontified) t) - (when (and aborted font-lock-verbose) - (lprogress-display 'font-lock "Fontifying %s... aborted." 'abort (buffer-name)))) - (run-hooks 'font-lock-after-fontify-buffer-hook)) + ;; If a ^G is typed during fontification, abort the fontification, but + ;; return normally (do not signal.) This is to make it easy to abort + ;; fontification if it's taking a long time, without also causing the + ;; buffer not to pop up. If a real abort is desired, the user can ^G + ;; again. + ;; + ;; Possibly this should happen down in font-lock-fontify-region instead + ;; of here, but since that happens from the after-change-hook (meaning + ;; much more frequently) I'm afraid of the bad consequences of stealing + ;; the interrupt character at inopportune times. + ;; + (condition-case nil + (save-excursion + (font-lock-fontify-region (point-min) (point-max))) + (t + (setq aborted t))) + + (or was-on ; turn it off if it was off. + (let ((font-lock-fontified nil)) ; kludge to prevent defontification + (font-lock-mode 0))) + (set (make-local-variable 'font-lock-fontified) t) + (when (and aborted font-lock-verbose) + (lprogress-display 'font-lock "Fontifying %s... aborted." + 'abort (buffer-name)))) + (run-hooks 'font-lock-after-fontify-buffer-hook))) (defun font-lock-default-unfontify-buffer () (font-lock-unfontify-region (point-min) (point-max)) @@ -1058,10 +1078,7 @@ This can take a while for large buffers." (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))) ;; Following is the original FSF version (similar to our original -;; version, before all the crap I added below). -;; -;; Probably that crap should either be fixed up so it works better, -;; or tossed away. +;; version, before the deferred stuff was added). ;; ;; I think that lazy-lock v2 tries to do something similar. ;; Those efforts should be merged. @@ -1075,111 +1092,97 @@ This can take a while for large buffers." ; (progn (goto-char beg) (beginning-of-line) (point)) ; (progn (goto-char end) (forward-line 1) (point)))))) -(defvar font-lock-old-extent nil) -(defvar font-lock-old-len 0) - -(defun font-lock-fontify-glumped-region () - ;; even if something goes wrong in the fontification, mark the glumped - ;; region as fontified; otherwise, the same error might get signaled - ;; after every command. - (unwind-protect - ;; buffer/extent may be deleted. - (if (and (extent-live-p font-lock-old-extent) - (buffer-live-p (extent-object font-lock-old-extent))) - (save-excursion - (set-buffer (extent-object font-lock-old-extent)) - (font-lock-after-change-function-1 - (extent-start-position font-lock-old-extent) - (extent-end-position font-lock-old-extent) - font-lock-old-len))) - (detach-extent font-lock-old-extent) - (setq font-lock-old-extent nil))) +(defvar font-lock-always-fontify-immediately nil + "Set this to non-nil to disable font-lock deferral. +Otherwise, changes to existing text will not be processed until the +next redisplay cycle, avoiding excessive fontification when many +buffer modifications are performed or a buffer is reverted.") -(defun font-lock-pre-idle-hook () - (condition-case nil - (if font-lock-old-extent - (font-lock-fontify-glumped-region)) - (error (warn "Error caught in `font-lock-pre-idle-hook'")))) +(defvar font-lock-pending-extent-table (make-hash-table :weakness 'key)) +(defvar font-lock-range-table (make-range-table)) -(defvar font-lock-always-fontify-immediately nil - "Set this to non-nil to disable font-lock deferral.") +(defun font-lock-pre-idle-hook () + (condition-case font-lock-error + (if (> (hash-table-count font-lock-pending-extent-table) 0) + (font-lock-fontify-pending-extents)) + (error (warn "Error caught in `font-lock-pre-idle-hook': %s" + font-lock-error)))) ;;; called when any modification is made to buffer text. This function -;;; attempts to glump adjacent changes together so that excessive -;;; fontification is avoided. This function could easily be adapted -;;; to other after-change-functions. +;;; remembers the changed ranges until the next redisplay, at which point +;;; the extents are merged and pruned, and the resulting ranges fontified. +;;; This function could easily be adapted to other after-change-functions. (defun font-lock-after-change-function (beg end old-len) - (let ((obeg (and font-lock-old-extent - (extent-start-position font-lock-old-extent))) - (oend (and font-lock-old-extent - (extent-end-position font-lock-old-extent))) - (bc-end (+ beg old-len))) - - ;; If this change can't be merged into the glumped one, - ;; we need to fontify the glumped one right now. - (if (and font-lock-old-extent - (or (not (eq (current-buffer) - (extent-object font-lock-old-extent))) - (< bc-end obeg) - (> beg oend))) - (font-lock-fontify-glumped-region)) - - (if font-lock-old-extent - ;; Update glumped region. - (progn - ;; Any characters in the before-change region that are - ;; outside the glumped region go into the glumped - ;; before-change region. - (if (> bc-end oend) - (setq font-lock-old-len (+ font-lock-old-len (- bc-end oend)))) - (if (> obeg beg) - (setq font-lock-old-len (+ font-lock-old-len (- obeg beg)))) - ;; New glumped region is the union of the glumped region - ;; and the new region. - (set-extent-endpoints font-lock-old-extent - (min obeg beg) - (max oend end))) - - ;; No glumped region, so create one. - (setq font-lock-old-extent (make-extent beg end)) - (set-extent-property font-lock-old-extent 'detachable nil) - (set-extent-property font-lock-old-extent 'end-open nil) - (setq font-lock-old-len old-len)) - + (when font-lock-mode + (let ((ex (make-extent beg end))) + (set-extent-property ex 'detachable nil) + (set-extent-property ex 'end-open nil) + (let ((exs (gethash (current-buffer) font-lock-pending-extent-table))) + (push ex exs) + (puthash (current-buffer) exs font-lock-pending-extent-table))) (if font-lock-always-fontify-immediately - (font-lock-fontify-glumped-region)))) - -(defun font-lock-after-change-function-1 (beg end old-len) - (if (null font-lock-mode) - nil - (save-excursion - (save-restriction - ;; if we don't widen, then fill-paragraph (and any command that - ;; operates on a narrowed region) confuses things, because the C - ;; code will fail to realize that we're inside a comment. - (widen) - (save-match-data - (let ((zmacs-region-stays zmacs-region-stays)) ; protect from change! - (goto-char beg) - ;; Maybe flush the internal cache used by syntactically-sectionize. - ;; (It'd be nice if this was more automatic.) Any deletions mean - ;; the cache is invalid, and insertions at beginning or end of line - ;; mean that the bol cache might be invalid. -;; (if (or (> old-len 0) (bobp) (= (preceding-char) ?\n)) -;; (buffer-syntactic-context-flush-cache)) - - ;; Always recompute the whole line. - (goto-char end) - (forward-line 1) - (setq end (point)) - (goto-char beg) - (beginning-of-line) - (setq beg (point)) - ;; Rescan between start of line from `beg' and start of line after - ;; `end'. - (font-lock-fontify-region beg end))))))) - + (font-lock-fontify-pending-extents)))) + +(defun font-lock-fontify-pending-extents () + ;; ah, the beauty of mapping functions. + ;; this function is actually shorter than the old version, which handled + ;; only one buffer and one contiguous region! + (save-match-data + (maphash + #'(lambda (buffer exs) + ;; remove first, to avoid infinite reprocessing if error + (remhash buffer font-lock-pending-extent-table) + (when (buffer-live-p buffer) + (clear-range-table font-lock-range-table) + (with-current-buffer buffer + (save-excursion + (save-restriction + ;; if we don't widen, then the C code will fail to + ;; realize that we're inside a comment. + (widen) + (let ((zmacs-region-stays + zmacs-region-stays)) ; protect from change! + (mapc + #'(lambda (ex) + ;; paranoia. + (when (and (extent-live-p ex) + (not (extent-detached-p ex))) + ;; first expand the ranges to full lines, because + ;; that is what will be fontified; then use a + ;; range table to merge the ranges. + (let* ((beg (extent-start-position ex)) + (end (extent-end-position ex)) + (beg (progn (goto-char beg) + (beginning-of-line) + (point))) + (end (progn (goto-char end) + (forward-line 1) + (point)))) + (detach-extent ex) + (put-range-table beg end t + font-lock-range-table)))) + exs) + (map-range-table + #'(lambda (beg end val) + ;; Maybe flush the internal cache used by + ;; syntactically-sectionize. (It'd be nice if this + ;; was more automatic.) Any deletions mean the + ;; cache is invalid, and insertions at beginning or + ;; end of line mean that the bol cache might be + ;; invalid. + ;; #### This code has been commented out for some time + ;; now and is bit-rotting. Someone should look into + ;; this. +;; (if (or change-was-deletion (bobp) +;; (= (preceding-char) ?\n)) +;; (buffer-syntactic-context-flush-cache)) + (if (and (= beg (point-min)) + (= end (point-max))) + (font-lock-fontify-buffer) + (font-lock-fontify-region beg end))) + font-lock-range-table))))))) + font-lock-pending-extent-table))) ;; Syntactic fontification functions. @@ -1567,28 +1570,6 @@ START should be at the beginning of a line." ((and (boundp 'lazy-lock-mode) lazy-lock-mode) (lazy-lock-after-fontify-buffer)))) -;; If the buffer is about to be reverted, it won't be fontified afterward. -;(defun font-lock-revert-setup () -; (setq font-lock-fontified nil)) - -;; If the buffer has just been reverted, normally that turns off -;; Font Lock mode. So turn the mode back on if necessary. -;; sb 1999-03-03 -- The above comment no longer appears to be operative as -;; the first call to normal-mode *will* restore the font-lock state and -;; this call forces a second font-locking to occur when reverting a buffer, -;; which is wasteful at best. -;;(defun font-lock-revert-cleanup ()) - -;; 12-10-99. This still does not work right, I think -;; after change functions will still get us. The simplest thing to do -;; is unconditionally turn-off font-lock before revert (and thus nuke -;; all hooks) and then turn it on again afterwards. This also happens -;; to be much faster because fontifying from scratch is better than -;; trying to do incremental changes for the whole buffer. - -(defalias 'font-lock-revert-cleanup 'turn-on-font-lock) -(defalias 'font-lock-revert-setup 'turn-off-font-lock) - ;; Various functions. @@ -2369,7 +2350,7 @@ The name is assumed to begin with a capital letter.") ;; Class names: (list (concat "\\<\\(class\\|interface\\)\\>\\s *" - java-font-lock-identifier-regexp) + java-font-lock-identifier-regexp) 2 'font-lock-function-name-face) ;; Package declarations: diff --git a/lisp/glyphs.el b/lisp/glyphs.el index 08a791a..dc3b882 100644 --- a/lisp/glyphs.el +++ b/lisp/glyphs.el @@ -1,7 +1,7 @@ ;;; glyphs.el --- Lisp interface to C glyphs ;; Copyright (C) 1994, 1997 Free Software Foundation, Inc. -;; Copyright (C) 1995, 1996 Ben Wing. +;; Copyright (C) 1995, 1996, 2000 Ben Wing. ;; Author: Chuck Thompson , Ben Wing ;; Maintainer: XEmacs Development Team @@ -26,27 +26,287 @@ ;;; Synched up with: Not in FSF. +;;; Authorship: + +;; Prototype created 1995 by Chuck Thompson. +;; Completely rewritten by Ben Wing, 1995. +;; Various cleanups (esp. doc strings) by Ben Wing, May 2000. + ;;; Commentary: ;; This file is dumped with XEmacs. ;;; Code: -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; font specifiers +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; image specifiers (defun make-image-specifier (spec-list) "Return a new `image' specifier object with the specification list SPEC-LIST. SPEC-LIST can be a list of specifications (each of which is a cons of a locale and a list of instantiators), a single instantiator, or a list of instantiators. See `make-specifier' for more information about -specifiers." +specifiers. + +An image specifier is used for images (pixmaps, widgets and the like). +It is used to describe the actual image in a glyph. It is instanced +as an image-instance. Note that \"image\" as used in XEmacs does not +actually refer to what the term \"image\" normally means (a picture, +e.g. in .GIF or .JPG format, and called a \"pixmap\" in XEmacs), but +includes all types of graphical elements, including pixmaps, widgets +\(buttons, sliders, text fields, etc.) and even strings of text. + +Note that, in practice, you rarely, if ever, need to actually create +an image specifier! (The function `make-image-specifier' exists mainly +for completeness.) Pretty much the only use for image specifiers is to +control how glyphs are displayed, and the image specifier associated +with a glyph (the `image' property of a glyph) is created +automatically when a glyph is created (see `make-glyph') and need not +\(and cannot, for that matter) ever be changed. In fact, the design +decision to create a separate image specifier type, rather than make +glyphs themselves be specifiers, is debatable -- the other properties +of glyphs are rarely used and could conceivably have been incorporated +into the glyph's instantiator. The rarely used glyph types (buffer, +pointer, icon) could also have been incorporated into the instantiator. + +Image instantiators come in many formats: `xbm', `xpm', `gif', `jpeg', +etc. This describes the format of the data describing the image. The +resulting image instances also come in many types -- `mono-pixmap', +`color-pixmap', `text', `pointer', etc. This refers to the behavior of +the image and the sorts of places it can appear. (For example, a +color-pixmap image has fixed colors specified for it, while a +mono-pixmap image comes in two unspecified shades \"foreground\" and +\"background\" that are determined from the face of the glyph or +surrounding text; a text image appears as a string of text and has an +unspecified foreground, background, and font; a pointer image behaves +like a mono-pixmap image but can only be used as a mouse pointer +\[mono-pixmap images cannot be used as mouse pointers]; etc.) It is +important to keep the distinction between image instantiator format and +image instance type in mind. Typically, a given image instantiator +format can result in many different image instance types (for example, +`xpm' can be instanced as `color-pixmap', `mono-pixmap', or `pointer'; +whereas `cursor-font' can be instanced only as `pointer'), and a +particular image instance type can be generated by many different +image instantiator formats (e.g. `color-pixmap' can be generated by `xpm', +`gif', `jpeg', etc.). + +See `make-image-instance' for a more detailed discussion of image +instance types. + +An image instantiator should be a string or a vector of the form + + [FORMAT :KEYWORD VALUE ...] + +i.e. a format symbol followed by zero or more alternating keyword-value +pairs. FORMAT should be one of + +'nothing + Don't display anything; no keywords are valid for this. + Can only be instanced as `nothing'. +'string + Display this image as a text string. Can only be instanced + as `text', although support for instancing as `mono-pixmap' + and `color-pixmap' should be added. +'formatted-string + Display this image as a text string, with replaceable fields; + not currently implemented. (It is, instead, equivalent to `string'.) +'xbm + An X bitmap; only if X or MS Windows support was compiled into this + XEmacs. Can be instanced as `mono-pixmap', `color-pixmap', or `pointer'. +'xpm + An XPM pixmap; only if XPM support was compiled into this XEmacs. + Can be instanced as `color-pixmap', `mono-pixmap', or `pointer'. +'xface + An X-Face bitmap, used to encode people's faces in e-mail messages; + only if X-Face support was compiled into this XEmacs. Can be + instanced as `mono-pixmap', `color-pixmap', or `pointer'. +'gif + A GIF87 or GIF89 image; only if GIF support was compiled into this + XEmacs. NOTE: only the first frame of animated gifs will be displayed. + Can be instanced as `color-pixmap'. +'jpeg + A JPEG image; only if JPEG support was compiled into this XEmacs. + Can be instanced as `color-pixmap'. +'png + A PNG image; only if PNG support was compiled into this XEmacs. + Can be instanced as `color-pixmap'. +'tiff + A TIFF image; only if TIFF support was compiled into this XEmacs. + Can be instanced as `color-pixmap'. +'bmp + A MS Windows BMP image; only if MS Windows support was compiled into + this XEmacs. Can be instanced as `color-pixmap'. +'cursor-font + One of the standard cursor-font names, such as \"watch\" or + \"right_ptr\" under X. Under X, this is, more specifically, any + of the standard cursor names from appendix B of the Xlib manual + [also known as the file ] minus the XC_ prefix. + On other window systems, the valid names will be specific to the + type of window system. Can only be instanced as `pointer'. +'mswindows-resource + An MS Windows pointer resource. Specifies a resource to retrieve + directly from the system (an OEM resource) or from a file, particularly + an executable file. If the resource is to be retrieved from a file, use + :file and optionally :resource-id. Otherwise use :resource-id. Always + specify :resource-type to specify the type (cursor, bitmap or icon) of + the resource. Possible values for :resource-id are listed below. Can + be instanced as `pointer' or `color-pixmap'. +'font + A glyph from a font; i.e. the name of a font, and glyph index into it + of the form \"FONT fontname index [[mask-font] mask-index]\". + Currently can only be instanced as `pointer', although this should + probably be fixed. +'subwindow + An embedded windowing system window. Can only be instanced as + `subwindow'. +'button + A button widget; either a push button, radio button or toggle button. + Can only be instanced as `widget'. +'combo-box + A drop list of selectable items in a widget, for editing text. + Can only be instanced as `widget'. +'edit-field + A text editing widget. Can only be instanced as `widget'. +'label + A static, text-only, widget; for displaying text. Can only be instanced + as `widget'. +'layout + A widget for controlling the positioning of children underneath it. + Through the use of nested layouts, a widget hierarchy can be created + which can have the appearance of any standard dialog box or similar + arrangement; all of this is counted as one \"glyph\" and could appear + in many of the places that expect a single glyph. Can only be instanced + as `widget'. +'native-layout + The native version of a layout widget. #### Document me better! + Can only be instanced as `widget'. +'progress-gauge + A sliding widget, for showing progress. Can only be instanced as + `widget'. +'tab-control + A tab widget; a series of user selectable tabs. Can only be instanced + as `widget'. +'tree-view + A folding widget. Can only be instanced as `widget'. +'scrollbar + A scrollbar widget. Can only be instanced as `widget'. +'autodetect + XEmacs tries to guess what format the data is in. If X support + exists, the data string will be checked to see if it names a filename. + If so, and this filename contains XBM or XPM data, the appropriate + sort of pixmap or pointer will be created. [This includes picking up + any specified hotspot or associated mask file.] Otherwise, if `pointer' + is one of the allowable image-instance types and the string names a + valid cursor-font name, the image will be created as a pointer. + Otherwise, the image will be displayed as text. If no X support + exists, the image will always be displayed as text. Can be instanced as + `mono-pixmap', `color-pixmap', `pointer', or `text'. +'inherit + Inherit from the background-pixmap property of a face. Can only be + instanced as `mono-pixmap'. + +The valid keywords are: + +:data + Inline data. For most formats above, this should be a string. For + XBM images, this should be a list of three elements: width, height, and + a string of bit data. This keyword is valid for all of the bitmap/pixmap + formats, as well as `string', `formatted-string', `font', `cursor-font', + and `autodetect'. +:file + Data is contained in a file. The value is the name of this file. + If both :data and :file are specified, the image is created from + what is specified in :data and the string in :file becomes the + value of the `image-instance-file-name' function when applied to + the resulting image-instance. This keyword is valid for all of the + bitmap/pixmap formats as well as `mswindows-resource'. +:foreground +:background + For `xbm', `xface', `cursor-font', `widget' and `font'. These keywords + allow you to explicitly specify foreground and background colors. + The argument should be anything acceptable to `make-color-instance'. + This will cause what would be a `mono-pixmap' to instead be colorized + as a two-color color-pixmap, and specifies the foreground and/or + background colors for a pointer instead of black and white. +:mask-data + For `xbm' and `xface'. This specifies a mask to be used with the + bitmap. The format is a list of width, height, and bits, like for + :data. +:mask-file + For `xbm' and `xface'. This specifies a file containing the mask data. + If neither a mask file nor inline mask data is given for an XBM image, + and the XBM image comes from a file, XEmacs will look for a mask file + with the same name as the image file but with \"Mask\" or \"msk\" + appended. For example, if you specify the XBM file \"left_ptr\" + [usually located in \"/usr/include/X11/bitmaps\"], the associated + mask file \"left_ptrmsk\" will automatically be picked up. +:hotspot-x +:hotspot-y + For `xbm' and `xface'. These keywords specify a hotspot if the image + is instantiated as a `pointer'. Note that if the XBM image file + specifies a hotspot, it will automatically be picked up if no + explicit hotspot is given. +:color-symbols + Only for `xpm'. This specifies an alist that maps strings + that specify symbolic color names to the actual color to be used + for that symbolic color (in the form of a string or a color-specifier + object). If this is not specified, the contents of `xpm-color-symbols' + are used to generate the alist. +:resource-id + Only for `mswindows-resource'. This must be either an integer (which + directly specifies a resource number) or a string. Valid strings are + + -- For bitmaps: + + \"close\", \"uparrow\", \"dnarrow\", \"rgarrow\", \"lfarrow\", + \"reduce\", \"zoom\", \"restore\", \"reduced\", \"zoomd\", + \"restored\", \"uparrowd\", \"dnarrowd\", \"rgarrowd\", \"lfarrowd\", + \"mnarrow\", \"combo\", \"uparrowi\", \"dnarrowi\", \"rgarrowi\", + \"lfarrowi\", \"size\", \"btsize\", \"check\", \"checkboxes\", and + \"btncorners\". + + -- For cursors: + + \"normal\", \"ibeam\", \"wait\", \"cross\", \"up\", \"sizenwse\", + \"sizenesw\", \"sizewe\", \"sizens\", \"sizeall\", and \"no\". + + -- For icons: + + \"sample\", \"hand\", \"ques\", \"bang\", \"note\", and \"winlogo\". +:resource-type + Only for `mswindows-resource'. This must be a symbol, either `cursor', + `icon', or `bitmap', specifying the type of resource to be retrieved. +:face + Only for `inherit'. This specifies the face to inherit from. + For widgets this also specifies the face to use for display. It defaults + to gui-element-face. + +Keywords accepted as menu item specs are also accepted by widgets. +These are `:selected', `:active', `:suffix', `:keys', `:style', +`:filter', `:config', `:included', `:key-sequence', `:accelerator', +`:label' and `:callback'. + +If instead of a vector, the instantiator is a string, it will be +converted into a vector by looking it up according to the specs in the +`console-type-image-conversion-list' (q.v.) for the console type of +the domain (usually a window; sometimes a frame or device) over which +the image is being instantiated. + +If the instantiator specifies data from a file, the data will be read +in at the time that the instantiator is added to the image (which may +be well before when the image is actually displayed), and the +instantiator will be converted into one of the inline-data forms, with +the filename retained using a :file keyword. This implies that the +file must exist when the instantiator is added to the image, but does +not need to exist at any other time (e.g. it may safely be a temporary +file). +" (make-specifier-and-init 'image spec-list)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; glyphs (defconst built-in-glyph-specifiers '(image contrib-p baseline) - "A list of the built-in face properties that are specifiers.") + "A list of the built-in glyph properties that are specifiers.") (defun glyph-property (glyph property &optional locale) "Return GLYPH's value of PROPERTY in LOCALE. @@ -287,7 +547,7 @@ See `glyph-property-instance' for more information." "Change the image of GLYPH in LOCALE. SPEC should be an instantiator (a string or vector; see - `image-specifier-p' for a description of possible values here), + `make-image-specifier' for a description of possible values here), a list of (possibly tagged) instantiators, an alist of specifications (each mapping a locale to an instantiator list), or an image specifier object. @@ -380,20 +640,162 @@ See `set-glyph-property' for more information." (set-glyph-property glyph 'baseline spec locale tag-set how-to-add)) (defun make-glyph (&optional spec-list type) - "Return a new `glyph' object of type TYPE. - -TYPE should be one of `buffer' (used for glyphs in an extent, the modeline, + "Create a new glyph of type TYPE. + +A glyph in XEmacs does NOT refer to a single unit of textual display (the +XEmacs term for this is \"rune\"), but rather is an object encapsulating +a graphical element, such as an image or widget (an element such as a +button or text field; \"widget\" is the term for this under X Windows, +and it's called a \"control\" under MS Windows). This graphical element +could appear in a buffer, a margin, a gutter, or a toolbar, or as a mouse +pointer or an icon, for example. + +Creating a glyph using `make-glyph' does not specify *where* the glyph +will be used, but it does specify *what* the glyph will look like. In +particular, SPEC-LIST is used to specify this, and it's used to +initialize the glyph's `image' property, which is an image +specifier. (Note that \"image\" as used in the context of a glyph's +`image' property or in the terms \"image specifier\", \"image +instantiator\", or \"image instance\" does not refer to what people +normally think of as an image (which in XEmacs is called a +\"pixmap\"), but to any graphical element -- a pixmap, a widget, or +even a block of text, when used in the places that call for a glyph.) +The format of the SPEC-LIST is typically an image instantiator (a +string or a vector; see `make-image-specifier' for a detailed description +of the valid image instantiators), but can also be a list of such +instantiators (each one in turn is tried until an image is +successfully produced), a cons of a locale (frame, buffer, etc.) and +an instantiator, a list of such conses, or any other form accepted by +`canonicalize-spec-list'. + +If you're not familiar with specifiers, you should be in order to +understand how glyphs work. The clearest introduction to specifiers +is in the Lispref manual, available under Info. (Choose +Help->Info->Info Contents on the menubar or type \\[info].) You can +also see `make-specifier' for a capsule summary. What's important to +keep in mind is that a specifier lets you set a different value for +any particular buffer, window, frame, device, or console. This allows +for a great deal of flexibility; in particular, only one global glyph +needs to exist for a particular purpose (e.g. the icon used to represent +an iconified frame, the mouse pointer used over particular areas of a +frame, etc.), and in these cases you do not create your own glyph, but +rather modify the existing one. + +As well as using SPEC-LIST to initialize the glyph, you can set +specifications using `set-glyph-image'. Note that, due to a possibly +questionable historical design decision, a glyph itself is not +actually a specifier, but rather is an object containing an image +specifier (as well as other, seldom-used properties). Therefore, you +cannot set or access specifications for the glyph's image by directly +using `set-specifier', `specifier-instance' or the like on the glyph; +instead use them on `(glyph-image GLYPH)' or use the convenience +functions `set-glyph-image', `glyph-image-instance', and +`glyph-image'. + +Once you have created a glyph, you specify where it will be used as follows: + +-- To insert a glyph into a buffer, create an extent in the buffer and then + use `set-extent-begin-glyph' or `set-extent-end-glyph' to set a glyph + to be displayed at the corresponding edge of the extent. (It is common + to create zero-width extents for this purpose.) + +-- To insert a glyph into the left or right margin of a buffer, first + make sure the margin is visible by setting a value for the specifiers + `left-margin-width' or `right-margin-width'. (Not strictly necessary + when using margin glyphs with layout policy `whitespace'.) Then follow + the same procedure above for inserting a glyph in a buffer, and then + set a non-default layout policy for the glyph using + `set-extent-begin-glyph-layout' or `set-extent-end-glyph-layout'. + Alternatively, use the high-level annotations API (see + `make-annotation'). (In point of fact, you can also use the annotations + API for glyphs in a buffer, by setting a layout policy of `text'.) + +-- To insert a glyph into the modeline, just put the glyph directly as + one of the modeline elements. (Unfortunately you can't currently + put a begin glyph or end glyph on one of the modeline extents -- + they're ignored.) + +-- To insert a glyph into a toolbar, specify it as part of a toolbar + instantiator (typically set on the specifier `default-toolbar'). + See `default-toolbar' for more information. (Note that it is standard + practice to use a symbol in place of the glyph list in the toolbar + instantiator; the symbol is evalled to get the glyph list. This + facilitates both creating the toolbar instantiator and modifying + individual glyphs in a toolbar later on. For example, you can + change the way that the Mail toolbar button looks by modifying the + value of the variable `toolbar-mail-icon' (in general, `toolbar-*-icon') + and then calling `(set-specifier-dirty-flag default-toolbar)'. + (#### Unfortunately this doesn't quite work the way it should; the + change will appear in new frames, but not existing ones. + +-- To insert a glyph into a gutter, create or modify a gutter instantiator + (typically set on the specifier `default-gutter'). Gutter instantiators + consist of strings or lists of strings, so to insert a glyph, create an + extent over the string, and use `set-extent-begin-glyph' or + `set-extent-end-glyph' to set a glyph to be displayed at the corresponding + edge of the extent, just like for glyphs in a buffer. + +-- To use a glyph as the icon for a frame, you do not actually create a new + glyph; rather, you change the specifications for the existing glyph + `frame-icon-glyph'. (Remember that, because of the specifier nature of + glyphs, you can set different values for any particular buffer or frame.) + +-- To use a glyph as the mouse pointer, in general you do not create a + new glyph, but rather you change the specifications of various existing + glyphs, such as `text-pointer-glyph' for the pointer used over text, + `modeline-pointer-glyph' for the pointer used over the modeline, etc. + Do an apropos over `*-pointer-glyph' to find all of them. (Note also + that you can temporarily set the mouse pointer to some specific shape + by using `set-frame-pointer', which takes an image instace, as obtained + from calling `glyph-image-instance' on a glyph of type `pointer' -- + either one of the above-mentioned variables or one you created yourself. + (See below for what it means to create a glyph of type `pointer'.) + This pointer will last only until the next mouse motion event is + processed or certain other things happen, such as creating or deleting + a window. (In fact, the above-mentioned pointer glyph variables are + implemented as part of the default handler for mouse motion events. + If you want to customize this behavior, take a look at `mode-motion-hook', + or `mouse-motion-handler' if you really want to get low-level.) + +-- To use a glyph to control the shape of miscellaneous redisplay effects + such as the truncation and continuation markers, set the appropriate + existing glyph variables, as for icons and pointers above. See + `continuation-glyph', `control-arrow-glyph', `hscroll-glyph', + `invisible-text-glyph', `octal-escape-glyph', and `truncation-glyph'. + See also `overlay-arrow-string', an odd redisplay leftover which can + be set to a glyph you created, and will cause the glyph to be displayed + on top of the text position specified in the marker stored in + `overlay-arrow-position'. + +-- To use a glyph in a display table (i.e. to control the appearance of + any individual character), create the appropriate character glyphs + and then set a specification for the specifier `current-display-table', + which controls the appearance of characters. You can also set an + overriding display table for use with text displayed in a particular + face; see `set-face-display-table' and `make-display-table'. + #### Note: Display tables do not currently support general Mule + characters. They will be overhauled at some point to support this + and to provide other features required under Mule. + +-- To use a glyph as the background pixmap of a face: Note that the + background pixmap of a face is actually an image specifier -- probably + the only place in XEmacs where an image specifier occurs outside of + a glyph. Similarly to how the glyph's image specifier works, you + don't create your own image specifier, but rather add specifications + to the existing one (using `set-face-background-pixmap'). Note that + the image instance that is generated in order to actually display the + background pixmap is of type `mono-pixmap', meaning that it's a two-color + image and the foreground and background of the image get filled in with + the corresponding colors from the face. + +It is extremely rare that you will ever have to specify a value for TYPE, +which should be one of `buffer' (used for glyphs in an extent, the modeline, the toolbar, or elsewhere in a buffer), `pointer' (used for the mouse-pointer), -or `icon' (used for a frame's icon), and defaults to `buffer'. - -SPEC-LIST is used to initialize the glyph's image. It is typically an -image instantiator (a string or a vector; see `image-specifier-p' for -a detailed description of the valid image instantiators), but can also -be a list of such instantiators (each one in turn is tried until an -image is successfully produced), a cons of a locale (frame, buffer, etc.) -and an instantiator, a list of such conses, or any other form accepted -by `canonicalize-spec-list'. See `make-specifier' for more information -about specifiers." +or `icon' (used for a frame's icon), and defaults to `buffer'. The only cases +where it needs to be specified is when creating icon or pointer glyphs, and +in both cases the necessary glyphs have already been created at startup and +are accessed through the appropriate variables, e.g. `text-pointer-glyph' +(or in general, `*-pointer-glyph') and `frame-icon-glyph'." (let ((glyph (make-glyph-internal type))) (and spec-list (set-glyph-image glyph spec-list)) glyph)) @@ -412,38 +814,22 @@ about specifiers." (defun make-pointer-glyph (&optional spec-list) "Return a new `pointer-glyph' object with the specification list SPEC-LIST. - This is equivalent to calling `make-glyph', specifying a type of `pointer'. +See `make-glyph' for more information. -SPEC-LIST is used to initialize the glyph's image. It is typically an -image instantiator (a string or a vector; see `image-specifier-p' for -a detailed description of the valid image instantiators), but can also -be a list of such instantiators (each one in turn is tried until an -image is successfully produced), a cons of a locale (frame, buffer, etc.) -and an instantiator, a list of such conses, or any other form accepted -by `canonicalize-spec-list'. See `make-specifier' for more information -about specifiers. - -You can also create a glyph with an empty SPEC-LIST and add image -instantiators afterwards using `set-glyph-image'." +It is extremely unlikely that you will ever need to create a pointer glyph. +Instead, you probably want to be calling `set-glyph-image' on an existing +glyph, e.g. `text-pointer-glyph'." (make-glyph spec-list 'pointer)) (defun make-icon-glyph (&optional spec-list) "Return a new `icon-glyph' object with the specification list SPEC-LIST. - This is equivalent to calling `make-glyph', specifying a type of `icon'. +See `make-glyph' for more information. -SPEC-LIST is used to initialize the glyph's image. It is typically an -image instantiator (a string or a vector; see `image-specifier-p' for -a detailed description of the valid image instantiators), but can also -be a list of such instantiators (each one in turn is tried until an -image is successfully produced), a cons of a locale (frame, buffer, etc.) -and an instantiator, a list of such conses, or any other form accepted -by `canonicalize-spec-list'. See `make-specifier' for more information -about specifiers. - -You can also create a glyph with an empty SPEC-LIST and add image -instantiators afterwards using `set-glyph-image'." +It is extremely unlikely that you will ever need to create a icon glyph. +Instead, you probably want to be calling `set-glyph-image' on +`frame-icon-glyph'." (make-glyph spec-list 'icon)) (defun nothing-image-instance-p (object) @@ -468,9 +854,12 @@ instantiators afterwards using `set-glyph-image'." "Return t if OBJECT is an image instance of type `pointer'." (and (image-instance-p object) (eq 'pointer (image-instance-type object)))) +(defun widget-image-instance-p (object) + "Return t if OBJECT is an image instance of type `widget'." + (and (image-instance-p object) (eq 'widget (image-instance-type object)))) + (defun subwindow-image-instance-p (object) - "Return t if OBJECT is an image instance of type `subwindow'. -Subwindows are not implemented in this version of XEmacs." + "Return t if OBJECT is an image instance of type `subwindow'." (and (image-instance-p object) (eq 'subwindow (image-instance-type object)))) ;;;;;;;;;; the built-in glyphs diff --git a/lisp/gutter-items.el b/lisp/gutter-items.el index d9e8fd3..777ddc3 100644 --- a/lisp/gutter-items.el +++ b/lisp/gutter-items.el @@ -33,8 +33,7 @@ (defvar gutter-buffers-tab nil "A tab widget in the gutter for displaying buffers. -Do not set this. Use `glyph-image-instance' and -`set-image-instance-property' to change the properties of the tab.") +Do not set this. Use `set-glyph-image' to change the properties of the tab.") (defcustom gutter-buffers-tab-visible-p (gutter-element-visible-p default-gutter-visible-p 'buffers-tab) @@ -278,16 +277,7 @@ items by redefining the function `format-buffers-menu-line'." (set-extent-begin-glyph gutter-buffers-tab-extent (setq gutter-buffers-tab - (make-glyph - (vector 'tab-control :descriptor "Buffers" :face buffers-tab-face - :orientation gutter-buffers-tab-orientation - (if (or (eq gutter-buffers-tab-orientation 'top) - (eq gutter-buffers-tab-orientation 'bottom)) - :pixel-width :pixel-height) - (if (or (eq gutter-buffers-tab-orientation 'top) - (eq gutter-buffers-tab-orientation 'bottom)) - '(gutter-pixel-width) '(gutter-pixel-height)) - :properties (list :items (buffers-tab-items nil nil t)))))) + (make-glyph))) ;; Nuke all existing tabs (remove-gutter-element top-gutter 'buffers-tab) @@ -324,52 +314,44 @@ items by redefining the function `format-buffers-menu-line'." ))) (console-type-list)))) -(defun update-tab-in-gutter (&optional frame-or-buffer force-selection) +(defun update-tab-in-gutter (frame &optional force-selection) "Update the tab control in the gutter area." - (let ((locale (if (framep frame-or-buffer) frame-or-buffer))) ;; dedicated frames don't get tabs - (unless (and (framep locale) - (window-dedicated-p (frame-selected-window locale))) - (when (specifier-instance default-gutter-visible-p locale) - (unless (and gutter-buffers-tab - (eq (default-gutter-position) - gutter-buffers-tab-orientation)) - (add-tab-to-gutter)) - (when (valid-image-instantiator-format-p 'tab-control locale) - (let ((inst (glyph-image-instance - gutter-buffers-tab - (when (framep frame-or-buffer) - (last-nonminibuf-window frame-or-buffer))))) - (set-image-instance-property inst :items - (buffers-tab-items - nil locale force-selection)))))))) - -(defun remove-buffer-from-gutter-tab () - "Remove the current buffer from the tab control in the gutter area." - (when (and (valid-image-instantiator-format-p 'tab-control) - (specifier-instance default-gutter-visible-p)) - (let ((inst (glyph-image-instance gutter-buffers-tab)) - (buffers (buffers-tab-items t))) - (unless buffers - (setq buffers (build-buffers-tab-internal - (list - (get-buffer-create "*scratch*"))))) - (set-image-instance-property inst :items buffers)))) + (unless (window-dedicated-p (frame-selected-window frame)) + (when (specifier-instance default-gutter-visible-p frame) + (unless (and gutter-buffers-tab + (eq (default-gutter-position) + gutter-buffers-tab-orientation)) + (add-tab-to-gutter)) + (when (valid-image-instantiator-format-p 'tab-control frame) + (set-glyph-image + gutter-buffers-tab + (vector 'tab-control :descriptor "Buffers" :face buffers-tab-face + :orientation gutter-buffers-tab-orientation + (if (or (eq gutter-buffers-tab-orientation 'top) + (eq gutter-buffers-tab-orientation 'bottom)) + :pixel-width :pixel-height) + (if (or (eq gutter-buffers-tab-orientation 'top) + (eq gutter-buffers-tab-orientation 'bottom)) + '(gutter-pixel-width) '(gutter-pixel-height)) + :properties + (list :items + (buffers-tab-items nil frame force-selection))) + frame))))) ;; A myriad of different update hooks all doing slightly different things -(add-hook 'kill-buffer-hook 'remove-buffer-from-gutter-tab) (add-hook 'create-frame-hook #'(lambda (frame) (when gutter-buffers-tab (update-tab-in-gutter frame t)))) (add-hook 'buffer-list-changed-hook 'update-tab-in-gutter) (add-hook 'default-gutter-position-changed-hook #'(lambda () - (when gutter-buffers-tab (update-tab-in-gutter)))) + (when gutter-buffers-tab + (mapc #'update-tab-in-gutter (frame-list))))) (add-hook 'gutter-element-visibility-changed-hook #'(lambda (prop visible-p) (when (and (eq prop 'buffers-tab) visible-p) - (update-tab-in-gutter)))) - + (mapc #'update-tab-in-gutter (frame-list))))) ;; ;; progress display ;; ripped off from message display @@ -382,8 +364,8 @@ textual and displayed in the echo area." :type 'boolean :group 'gutter) -(defvar progress-glyph-height 32 - "Height of the gutter area for progress messages.") +(defvar progress-glyph-height 24 + "Height of the progress gauge glyph.") (defvar progress-display-popup-period 0.5 "The time that the progress gauge should remain up after completion") @@ -396,7 +378,7 @@ textual and displayed in the echo area." (defvar progress-gauge-glyph (make-glyph `[progress-gauge - :pixel-height (- progress-glyph-height 8) + :pixel-height (eval progress-glyph-height) :pixel-width 250 :descriptor "Progress"])) @@ -407,30 +389,31 @@ displayed above the gauge itself. If STYLE is 'small then the gauge and text are arranged side-by-side." (cond ((eq style 'small) - (setq progress-glyph-height 24) + (setq progress-glyph-height 16) (setq progress-layout-glyph (make-glyph `[layout :orientation horizontal + :margin-width 4 :items (,progress-gauge-glyph [button - :pixel-height (- progress-glyph-height 8) + :pixel-height (eval progress-glyph-height) ;; 'quit is special and acts "asynchronously". :descriptor "Stop" :callback 'quit] ,progress-text-glyph)]))) (t - (setq progress-glyph-height 32) + (setq progress-glyph-height 24) (setq progress-layout-glyph (make-glyph `[layout :orientation vertical :justify left + :margin-width 4 :items (,progress-text-glyph [layout - :pixel-height (eval progress-glyph-height) :orientation horizontal :items (,progress-gauge-glyph [button - :pixel-height (- progress-glyph-height 8) + :pixel-height (eval progress-glyph-height) :descriptor " Stop " ;; 'quit is special and acts "asynchronously". :callback 'quit])])]))))) @@ -457,6 +440,7 @@ Do not modify this directly--use the `progress-display' or `[layout :orientation vertical :justify left :items (,progress-text-glyph [layout + :margin-width 4 :pixel-height progress-glyph-height :orientation horizontal])])) @@ -537,6 +521,8 @@ you should just use (progress nil)." (progn (setcdr top message) (if (equal tmsg message) + ;; #### use of set-image-instance-property is wrong. + ;; use set-glyph-image instead. (set-image-instance-property (glyph-image-instance progress-gauge-glyph (frame-selected-window frame)) @@ -572,6 +558,8 @@ you should just use (progress nil)." ;; fixup the gutter specifiers (set-gutter-element bottom-gutter 'progress gutter-string frame) (set-specifier bottom-gutter-border-width 2 frame) + ;; #### use of set-image-instance-property is wrong. + ;; use set-glyph-image instead. (set-image-instance-property (glyph-image-instance progress-text-glyph (frame-selected-window frame)) :data message) @@ -600,6 +588,8 @@ you should just use (progress nil)." ;; fixup the gutter specifiers (set-gutter-element bottom-gutter 'progress gutter-string frame) (set-specifier bottom-gutter-border-width 2 frame) + ;; #### use of set-image-instance-property is wrong. + ;; use set-glyph-image instead. (set-image-instance-property (glyph-image-instance progress-gauge-glyph (frame-selected-window frame)) diff --git a/lisp/gutter.el b/lisp/gutter.el index f4565a6..b5c8ab8 100644 --- a/lisp/gutter.el +++ b/lisp/gutter.el @@ -108,6 +108,61 @@ non-nil if it is visible in optional DOMAIN." (or (and (listp spec) (memq 'buffers-tab spec)) spec))) +(defun make-gutter-specifier (spec-list) + "Return a new `gutter' specifier object with the given specification list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Gutter specifiers are used to specify the format of a gutter. +The values of the variables `default-gutter', `top-gutter', +`left-gutter', `right-gutter', and `bottom-gutter' are always +gutter specifiers. + +Valid gutter instantiators are called \"gutter descriptors\" and are +either strings or property-lists of strings. See `default-gutter' for +a description of the exact format." + (make-specifier-and-init 'gutter spec-list)) + +(defun make-gutter-size-specifier (spec-list) + "Return a new `gutter-size' specifier object with the given spec list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Gutter-size specifiers are used to specify the size of a gutter. The +values of the variables `default-gutter-size', `top-gutter-size', +`left-gutter-size', `right-gutter-size', and `bottom-gutter-size' are +always gutter-size specifiers. + +Valid gutter-size instantiators are either integers or the special +symbol 'autodetect. If a gutter-size is set to 'autodetect them the +size of the gutter will be adjusted to just accomodate the gutters +contents. 'autodetect only works for top and bottom gutters." + (make-specifier-and-init 'gutter-size spec-list)) + +(defun make-gutter-visible-specifier (spec-list) + "Return a new `gutter-visible' specifier object with the given spec list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Gutter-visible specifiers are used to specify the visibility of a +gutter. The values of the variables `default-gutter-visible-p', +`top-gutter-visible-p', `left-gutter-visible-p', +`right-gutter-visible-p', and `bottom-gutter-visible-p' are always +gutter-visible specifiers. + +Valid gutter-visible instantiators are t, nil or a list of symbols. +If a gutter-visible instantiator is set to a list of symbols, and the +correspondong gutter specification is a property-list strings, then +elements of the gutter specification will only be visible if the +corresponding symbol occurs in the gutter-visible instantiator." + (make-specifier-and-init 'gutter-visible spec-list)) + (defun init-gutter () "Initialize the gutter." ;; do nothing as yet. diff --git a/lisp/keydefs.el b/lisp/keydefs.el index 82652ea..765ee58 100644 --- a/lisp/keydefs.el +++ b/lisp/keydefs.el @@ -385,6 +385,7 @@ Keymap for characters following C-c.") ;; Default binding of "Control-h" is help. (define-key global-map 'backspace 'delete-backward-char) (define-key global-map '(meta backspace) 'backward-kill-word) +(define-key global-map [(control x) backspace] 'backward-kill-sentence) (define-key global-map "\M-\C-z" 'activate-region) @@ -549,24 +550,26 @@ Keymap for characters following C-c.") (define-key global-map '(control kp-down) 'forward-block-of-lines) ;; context-sensitive movement -;; (meta control left/right) should be reserved for bindings that -;; switch between buffers/web pages/etc. (define-key global-map '(meta left) 'backward-sexp) (define-key global-map '(meta right) 'forward-sexp) -(define-key global-map '(meta up) 'backward-sentence) -(define-key global-map '(meta down) 'forward-sentence) -(define-key global-map '(meta control up) 'backward-paragraph) -(define-key global-map '(meta control down) 'forward-paragraph) +(define-key global-map '(meta up) 'backward-paragraph) +(define-key global-map '(meta down) 'forward-paragraph) +(define-key global-map '(meta control left) 'backward-sentence) +(define-key global-map '(meta control right) 'forward-sentence) +(define-key global-map '(meta control up) 'scroll-down-one) +(define-key global-map '(meta control down) 'scroll-up-one) (define-key global-map '(meta control home) 'beginning-of-defun) (define-key global-map '(meta control end) 'end-of-defun) (define-key global-map '(meta control prior) 'backward-page) (define-key global-map '(meta control next) 'forward-page) (define-key global-map '(meta kp-left) 'backward-sexp) (define-key global-map '(meta kp-right) 'forward-sexp) -(define-key global-map '(meta kp-up) 'backward-sentence) -(define-key global-map '(meta kp-down) 'forward-sentence) -(define-key global-map '(meta control kp-up) 'backward-paragraph) -(define-key global-map '(meta control kp-down) 'forward-paragraph) +(define-key global-map '(meta kp-up) 'backward-paragraph) +(define-key global-map '(meta kp-down) 'forward-paragraph) +(define-key global-map '(meta control kp-left) 'backward-sentence) +(define-key global-map '(meta control kp-right) 'forward-sentence) +(define-key global-map '(meta control kp-up) 'scroll-down-one) +(define-key global-map '(meta control kp-down) 'scroll-up-one) (define-key global-map '(meta control kp-home) 'beginning-of-defun) (define-key global-map '(meta control kp-end) 'end-of-defun) (define-key global-map '(meta control kp-prior) 'backward-page) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 7783fd3..228aa09 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -123,7 +123,11 @@ is nil, raise an error." (when dependents (error "Loaded libraries %s depend on %s" (prin1-to-string dependents) file)))) - (let* ((flist (feature-symbols feature)) (file (car flist))) + (let* ((flist (feature-symbols feature)) + (file (car flist))) + (flet ((reset-aload (x) + (let ((aload (get x 'autoload))) + (if aload (fset x (cons 'autoload aload)))))) (mapcar #'(lambda (x) (cond ((stringp x) nil) @@ -131,12 +135,17 @@ is nil, raise an error." ;; Remove any feature names that this file provided. (if (eq (car x) 'provide) (setq features (delq (cdr x) features)))) - ((boundp x) (makunbound x)) + ((and (boundp x) + (fboundp x)) + (makunbound x) + (fmakunbound x) + (reset-aload x)) + ((boundp x) + (makunbound x)) ((fboundp x) (fmakunbound x) - (let ((aload (get x 'autoload))) - (if aload (fset x (cons 'autoload aload))))))) - (cdr flist)) + (reset-aload x)))) + (cdr flist))) ;; Delete the load-history element for this file. (let ((elt (assoc file load-history))) (setq load-history (delq elt load-history))))) diff --git a/lisp/menubar-items.el b/lisp/menubar-items.el index eda0c93..c61764c 100644 --- a/lisp/menubar-items.el +++ b/lisp/menubar-items.el @@ -1374,7 +1374,8 @@ which will not be used as accelerators." ;; #### there should be something that holds the name that the init ;; file should be created as, when it's not present. (progn (find-file (or user-init-file "~/.emacs")) - (emacs-lisp-mode))] + (or (eq major-mode 'emacs-lisp-mode) + (emacs-lisp-mode)))] ["%_Save Options to .emacs File" customize-save-customized] ) @@ -1866,13 +1867,13 @@ If this is a relative filename, it is put into the same directory as your current-language-environment)) `([,(car lang) (help-with-tutorial nil ,(cdr tut))])))) - language-info-alist)) - ;; Non mule tutorials. - (mapcar #'(lambda (lang) - `[,(car lang) - (help-with-tutorial ,(format "TUTORIAL.%s" - (cadr lang)))]) - tutorial-supported-languages)))) + language-info-alist) + ;; Non mule tutorials. + (mapcar #'(lambda (lang) + `[,(car lang) + (help-with-tutorial ,(format "TUTORIAL.%s" + (cadr lang)))]) + tutorial-supported-languages))))) (set-menubar default-menubar) diff --git a/lisp/minibuf.el b/lisp/minibuf.el index 342f5bd..6343c2d 100644 --- a/lisp/minibuf.el +++ b/lisp/minibuf.el @@ -1544,6 +1544,24 @@ If DEFAULT-VALUE is non-nil, return that if user enters an empty (setq n (1+ n)))) new))) + +;; Wrapper for `directory-files' for use in generating completion lists. +;; Generates output in the same format as `file-name-all-completions'. +;; +;; The EFS replacement for `directory-files' doesn't support the FILES-ONLY +;; option, so it has to be faked. The listing cache will hopefully +;; improve the performance of this operation. +(defun minibuf-directory-files (dir &optional match-regexp files-only) + (let ((want-file (or (eq files-only nil) (eq files-only t))) + (want-dirs (or (eq files-only nil) (not (eq files-only t))))) + (delete nil + (mapcar (function (lambda (f) + (if (file-directory-p (expand-file-name f dir)) + (and want-dirs (file-name-as-directory f)) + (and want-file f)))) + (delete "." (directory-files dir nil match-regexp)))))) + + (defun read-file-name-2 (history prompt dir default must-match initial-contents completer) @@ -1632,7 +1650,7 @@ If DEFAULT-VALUE is non-nil, return that if user enters an empty (reset-buffer completion-buf) (let ((standard-output completion-buf)) (display-completion-list - (delete "." (directory-files full nil nil nil (if dir-p 'directory))) + (minibuf-directory-files full nil (if dir-p 'directory)) :user-data dir-p :reference-buffer minibuf :activate-callback 'read-file-name-activate-callback) @@ -1825,7 +1843,9 @@ DIR defaults to current buffer's directory default." ((eq action 't) ;; all completions (mapcar #'un-substitute-in-file-name - (file-name-all-completions name dir))) + (if (string= name "") + (delete "./" (file-name-all-completions "" dir)) + (file-name-all-completions name dir)))) (t;; nil ;; complete (let* ((d (or dir default-directory)) @@ -1854,17 +1874,13 @@ DIR defaults to current buffer's directory default." #'(lambda (action orig string specdir dir name) (let* ((dirs #'(lambda (fn) (let ((l (if (equal name "") - (directory-files + (minibuf-directory-files dir - nil "" - nil 'directories) - (directory-files + (minibuf-directory-files dir - nil (concat "\\`" (regexp-quote name)) - nil 'directories)))) (mapcar fn ;; Wretched unix @@ -1947,7 +1963,7 @@ whether it is a file(/result) or a directory (/result/)." (let ((standard-output (window-buffer window))) (condition-case nil (display-completion-list - (directory-files dir nil nil nil t) + (minibuf-directory-files dir nil t) :window-width (window-width window) :window-height (window-text-area-height window) :completion-string "" @@ -1963,7 +1979,7 @@ whether it is a file(/result) or a directory (/result/)." (let ((standard-output (window-buffer window))) (condition-case nil (display-completion-list - (delete "." (directory-files dir nil nil nil 1)) + (minibuf-directory-files dir nil 1) :window-width (window-width window) :window-height (window-text-area-height window) :completion-string "" diff --git a/lisp/objects.el b/lisp/objects.el index 9c1d690..86b7bd8 100644 --- a/lisp/objects.el +++ b/lisp/objects.el @@ -46,7 +46,19 @@ SPEC-LIST can be a list of specifications (each of which is a cons of a locale and a list of instantiators), a single instantiator, or a list of instantiators. See `make-specifier' for more information about -specifiers." +specifiers. + +Valid instantiators for font specifiers are: + +-- a string naming a font (e.g. under X this might be + \"-*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*\" for a 14-point + upright medium-weight Courier font) +-- a font instance (use that instance directly if the device matches, + or use the string that generated it) +-- a vector of no elements (only on TTY's; this means to set no font + at all, thus using the \"natural\" font of the terminal's text) +-- a vector of one element (a face to inherit from) +" (make-specifier-and-init 'font spec-list)) (defun font-name (font &optional domain charset) @@ -127,7 +139,21 @@ and is equivalent to the sum of the font instance's ascent and descent." SPEC-LIST can be a list of specifications (each of which is a cons of a locale and a list of instantiators), a single instantiator, or a list of instantiators. See `make-specifier' for a detailed description of -how specifiers work." +how specifiers work. + +Valid instantiators for color specifiers are: + +-- a string naming a color (e.g. under X this might be \"lightseagreen2\" + or \"#F534B2\") +-- a color instance (use that instance directly if the device matches, + or use the string that generated it) +-- a vector of no elements (only on TTY's; this means to set no color + at all, thus using the \"natural\" color of the terminal's text) +-- a vector of one or two elements: a face to inherit from, and + optionally a symbol naming which property of that face to inherit, + either `foreground' or `background' (if omitted, defaults to the same + property that this color specifier is used for; if this specifier is + not part of a face, the instantiator would not be valid)." (make-specifier-and-init 'color spec-list)) (defun color-name (color &optional domain) @@ -146,4 +172,24 @@ to using `specifier-instance' and applying `color-instance-rgb-components' to the result. See `make-specifier' for more information about specifiers." (ws-object-property-1 'color-instance-rgb-components color domain)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; face-boolean specifiers + +(defun make-face-boolean-specifier (spec-list) + "Return a new `face-boolean' specifier object with the given spec list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for a detailed description of +how specifiers work. + +Valid instantiators for face-boolean specifiers are + +-- t or nil +-- a vector of two or three elements: a face to inherit from, + optionally a symbol naming the property of that face to inherit from + (if omitted, defaults to the same property that this face-boolean + specifier is used for; if this specifier is not part of a face, + the instantiator would not be valid), and optionally a value which, + if non-nil, means to invert the sense of the inherited property." + (make-specifier-and-init 'color spec-list)) + ;;; objects.el ends here. diff --git a/lisp/packages.el b/lisp/packages.el index 2d1eaf3..9ecd6db 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -38,8 +38,8 @@ ;; (this goes for any package loaded before `subr.el'.) ;; ;; - not to use macros, because they are not yet available (and this -;; file must be loadable uncompiled.) This rules out CL-style -;; macros like `when', for instance. +;; file must be loadable uncompiled.) Built in macros, such as +;; `when' and `unless' are fine, of course. ;; ;; - not to use `defcustom'. If you must add user-customizable ;; variables here, use `defvar', and add the variable to diff --git a/lisp/process.el b/lisp/process.el index c0602de..1fc438a 100644 --- a/lisp/process.el +++ b/lisp/process.el @@ -129,7 +129,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you (if buffer (set-marker (process-mark proc) (point buffer) buffer)) (unwind-protect - (progn + (prog1 (catch 'call-process-done (when (not discard) (set-process-sentinel diff --git a/lisp/setup-paths.el b/lisp/setup-paths.el index a01dff3..f26dad8 100644 --- a/lisp/setup-paths.el +++ b/lisp/setup-paths.el @@ -143,23 +143,6 @@ "Find the documentation directory." (paths-find-architecture-directory roots "lib-src" nil configure-doc-directory)) -(defun paths-find-lock-directory (roots) - "Find the lock directory." - (defvar configure-lock-directory) - (paths-find-site-directory roots "lock" "EMACSLOCKDIR" configure-lock-directory)) - -(defun paths-find-superlock-file (lock-directory) - "Find the superlock file." - ;; #### There is no such variable configure-superlock-file! - (cond - ((null lock-directory) - nil) - ((and configure-superlock-file - (file-directory-p (file-name-directory configure-superlock-file))) - configure-superlock-file) - (t - (expand-file-name "!!!SuperLock!!!" lock-directory)))) - (defun paths-find-exec-directory (roots) "Find the binary directory." (paths-find-architecture-directory roots "lib-src" diff --git a/lisp/simple.el b/lisp/simple.el index cf2652a..9ece9ae 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2001,6 +2001,17 @@ is nil. If BUFFER is nil, the current buffer is assumed." (beginning-of-buffer nil) (end-of-buffer nil)))) +(defun scroll-up-one () + "Scroll text of current window upward one line. +On attempt to scroll past end of buffer, `end-of-buffer' is signaled. +On attempt to scroll past beginning of buffer, `beginning-of-buffer' is +signaled. + +If `signal-error-on-buffer-boundary' is nil, attempts to scroll past buffer +boundaries do not cause an error to be signaled." + (interactive "_") + (scroll-up-command 1)) + (defun scroll-up-command (&optional n) "Scroll text of current window upward ARG lines; or near full screen if no ARG. A near full screen is `next-screen-context-lines' less than a full screen. @@ -2020,6 +2031,17 @@ boundaries do not cause an error to be signaled." (beginning-of-buffer nil) (end-of-buffer nil)))) +(defun scroll-down-one () + "Scroll text of current window downward one line. +On attempt to scroll past end of buffer, `end-of-buffer' is signaled. +On attempt to scroll past beginning of buffer, `beginning-of-buffer' is +signaled. + +If `signal-error-on-buffer-boundary' is nil, attempts to scroll past buffer +boundaries do not cause an error to be signaled." + (interactive "_") + (scroll-down-command 1)) + (defun scroll-down-command (&optional n) "Scroll text of current window downward ARG lines; or near full screen if no ARG. A near full screen is `next-screen-context-lines' less than a full screen. diff --git a/lisp/specifier.el b/lisp/specifier.el index 5653975..08b037e 100644 --- a/lisp/specifier.el +++ b/lisp/specifier.el @@ -1,7 +1,7 @@ ;;; specifier.el --- Lisp interface to specifiers ;; Copyright (C) 1997 Free Software Foundation, Inc. -;; Copyright (C) 1995, 1996 Ben Wing. +;; Copyright (C) 1995, 1996, 2000 Ben Wing. ;; Author: Ben Wing ;; Keywords: internal, dumped @@ -275,18 +275,20 @@ indicate that it applies everywhere. LOCALE usually defaults to VALUE is usually what is called an \"instantiator\" (which, roughly speaking, corresponds to the \"value\" of the property governed by -SPECIFIER). The valid instantiators for SPECIFIER depend on the -type of SPECIFIER (which you can determine using `specifier-type'). -The specifier `scrollbar-width', for example, is of type `integer', -meaning its valid instantiators are integers. The specifier -governing the background color of the `default' face (you can -retrieve this specifier using `(face-background 'default)') is -of type `color', meaning its valid instantiators are strings naming -colors and color-instance objects. For some types of specifiers, -such as `image' and `toolbar', the instantiators can be very -complex. Generally this is documented in the appropriate predicate -function -- `color-specifier-p', `image-specifier-p', -`toolbar-specifier-p', etc. +SPECIFIER). The valid instantiators for SPECIFIER depend on the type +of SPECIFIER (which you can determine using `specifier-type'). The +specifier `scrollbar-width', for example, is of type `integer', +meaning its valid instantiators are integers. The specifier governing +the background color of the `default' face (you can retrieve this +specifier using `(face-background 'default)') is of type `color', +meaning its valid instantiators are strings naming colors and +color-instance objects. For some types of specifiers, such as `image' +and `toolbar', the instantiators can be very complex. Generally this +is documented in the appropriate creation function -- +e.g. `make-color-specifier', `make-font-specifier', +`make-image-specifier' -- or in the global variable holding the most +common specifier for that type (`default-toolbar', `default-gutter', +`current-display-table'). NOTE: It does *not* work to give a VALUE of nil as a way of removing the specifications for a locale. Use `remove-specifier' @@ -526,6 +528,58 @@ Example: ,(car oldval)))) oldvallist varlist)))))))) +(defun make-integer-specifier (spec-list) + "Return a new `integer' specifier object with the given specification list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Valid instantiators for integer specifiers are integers." + (make-specifier-and-init 'integer spec-list)) + +(defun make-boolean-specifier (spec-list) + "Return a new `boolean' specifier object with the given specification list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Valid instantiators for boolean specifiers are t and nil." + (make-specifier-and-init 'boolean spec-list)) + +(defun make-natnum-specifier (spec-list) + "Return a new `natnum' specifier object with the given specification list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Valid instantiators for natnum specifiers are non-negative integers." + (make-specifier-and-init 'natnum spec-list)) + +(defun make-generic-specifier (spec-list) + "Return a new `generic' specifier object with the given specification list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Valid instantiators for generic specifiers are all Lisp values. +They are returned back unchanged when a specifier is instantiated." + (make-specifier-and-init 'generic spec-list)) + +(defun make-display-table-specifier (spec-list) + "Return a new `display-table' specifier object with the given spec list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Valid instantiators for display-table specifiers are described in +detail in the doc string for `current-display-table'." + (make-specifier-and-init 'display-table spec-list)) + ;; Evaluate this for testing: ; (cl-prettyexpand '(let-specifier ((modeline-shadow-thickness 0 (selected-window) 'x) (fubar (value) baz)) (sit-for 1))) diff --git a/lisp/startup.el b/lisp/startup.el index 8c2686e..f2bc2d3 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -369,11 +369,10 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (princ "\n\n" stream))) (when (not suppress-early-error-handler-backtrace) (backtrace stream t))) + (if (fboundp 'mswindows-message-box) + (mswindows-message-box "Initialization error")) (kill-emacs -1)) -(defvar lock-directory) -(defvar superlock-file) - (defun normal-top-level () (if command-line-processed (message "Back to top level.") @@ -1146,18 +1145,6 @@ It's idempotent, so call this as often as you like!" (princ (format "Info-directory-list:\n%S\n" Info-directory-list) 'external-debugging-output)) - (if (boundp 'lock-directory) - (progn - (setq lock-directory (paths-find-lock-directory roots)) - (setq superlock-file (paths-find-superlock-file lock-directory)) - - (if debug-paths - (progn - (princ (format "lock-directory:\n%S\n" lock-directory) - 'external-debugging-output) - (princ (format "superlock-file:\n%S\n" superlock-file) - 'external-debugging-output))))) - (setq exec-directory (paths-find-exec-directory roots)) (if debug-paths @@ -1205,20 +1192,15 @@ It's idempotent, so call this as often as you like!" (princ (buffer-string) 'external-debugging-output))) (defun startup-setup-paths-warning () - (let ((lock (if (boundp 'lock-directory) lock-directory 't)) - (warnings '())) - (if (and (stringp lock) (null (file-directory-p lock))) - (setq lock nil)) + (let ((warnings '())) (cond ((null (and lisp-directory exec-directory data-directory doc-directory - load-path - lock)) + load-path)) (save-excursion (set-buffer (get-buffer-create " *warning-tmp*")) (erase-buffer) (buffer-disable-undo (current-buffer)) (if (null lisp-directory) (push "lisp-directory" warnings)) - (if (null lock) (push "lock-directory" warnings)) (if (null exec-directory) (push "exec-directory" warnings)) (if (null data-directory) (push "data-directory" warnings)) (if (null doc-directory) (push "doc-directory" warnings)) diff --git a/lisp/toolbar.el b/lisp/toolbar.el index 772abf5..74d44e7 100644 --- a/lisp/toolbar.el +++ b/lisp/toolbar.el @@ -198,4 +198,21 @@ as an argument if release is over a blank area of the toolbar." (setq zmacs-region-stays t) (release-toolbar-button-internal event nil)) +(defun make-toolbar-specifier (spec-list) + "Return a new `toolbar' specifier object with the given specification list. +SPEC-LIST can be a list of specifications (each of which is a cons of a +locale and a list of instantiators), a single instantiator, or a list +of instantiators. See `make-specifier' for more information about +specifiers. + +Toolbar specifiers are used to specify the format of a toolbar. +The values of the variables `default-toolbar', `top-toolbar', +`left-toolbar', `right-toolbar', and `bottom-toolbar' are always +toolbar specifiers. + +Valid toolbar instantiators are called \"toolbar descriptors\" +and are lists of vectors. See `default-toolbar' for a description +of the exact format." + (make-specifier-and-init 'toolbar spec-list)) + ;;; toolbar.el ends here diff --git a/lisp/update-elc.el b/lisp/update-elc.el index d9c33c8..c27378e 100644 --- a/lisp/update-elc.el +++ b/lisp/update-elc.el @@ -115,14 +115,18 @@ (if (string-match "\\.elc?\\'" arg) (substring arg 0 (match-beginning 0)) arg))) - (if (and dumped-exe - (or (and (file-exists-p (concat frob ".el")) - (file-newer-than-file-p (concat frob ".el") - dumped-exe)) - (and (file-exists-p (concat frob ".elc")) - (file-newer-than-file-p (concat frob ".elc") - dumped-exe)))) - (setq need-to-dump t))) + (when (and dumped-exe + (or (and (file-exists-p + (concat "../lisp/" frob ".el")) + (file-newer-than-file-p + (concat "../lisp/" frob ".el") + dumped-exe)) + (and (file-exists-p + (concat "../lisp/" frob ".elc")) + (file-newer-than-file-p + (concat "../lisp/" frob ".elc") + dumped-exe)))) + (setq need-to-dump t))) (if (null (member (file-name-nondirectory arg) packages-unbytecompiled-lisp)) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index bba50dc..f2ac1bd 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/man/ChangeLog b/man/ChangeLog index 41ff8e5..94fd8f1 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,31 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + +2000-05-17 Yoshiki Hayashi + + * xemacs/basic.texi: Document translation of tutorial. + * xemacs/startup.texi: Remove lock-directory. + * xemacs/enterings.texi: Update. + +2000-05-17 Yoshiki Hayashi + + * lispref/display.texi: + * lispref/faces.texi: + * lispref/glyphs.texi: + * lispref/gutter.texi: + * lispref/modes.texi: + * lispref/specifiers.texi: + * lispref/toolbar.texi: + Update. Merge Ben's doc-string update. + +2000-05-08 Yoshiki Hayashi + + * xemacs/basic.texi: + * xemacs/enterings.texi: + * xemacs/mini.texi: + Partial sync with FSF Emacs 20.6 and some update. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/man/internals/internals.texi b/man/internals/internals.texi index dc213f4..e46d7f2 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -5051,7 +5051,7 @@ For a description about the internals: @xref{lrecords}. Our next candidates are the other objects that behave quite differently than everything else: the strings. They consists of two parts, a -fixed-size portion (@code{struct Lisp_string}) holding the string's +fixed-size portion (@code{struct Lisp_String}) holding the string's length, its property list and a pointer to the second part, and the actual string data, which is stored in string-chars blocks comparable to frob blocks. In this block, the data is not only freed, but also a @@ -5787,7 +5787,7 @@ field and a pointer to an associated array of lrecord_description. @node Dumping phase, Reloading phase, Data descriptions, Dumping @section Dumping phase -Dumping is done by calling the function pdump() (in alloc.c) which is +Dumping is done by calling the function pdump() (in dumper.c) which is invoked from Fdump_emacs (in emacs.c). This function performs a number of tasks. diff --git a/man/lispref/compile.texi b/man/lispref/compile.texi index 8d92bd0..6feb3e0 100644 --- a/man/lispref/compile.texi +++ b/man/lispref/compile.texi @@ -235,7 +235,7 @@ prevent processing of subsequent files. (The file that gets the error will not, of course, produce any compiled code.) @example -% emacs -batch -f batch-byte-compile *.el +% xemacs -batch -f batch-byte-compile *.el @end example @end defun diff --git a/man/lispref/databases.texi b/man/lispref/databases.texi index 0b11270..fdc5c74 100644 --- a/man/lispref/databases.texi +++ b/man/lispref/databases.texi @@ -31,7 +31,7 @@ select the type of database file to use. (Note: XEmacs may not support both of these types.) For a @var{type} of @code{'dbm}, there are no subtypes, so -@var{subtype} should by @code{nil}. +@var{subtype} should be @code{nil}. For a @var{type} of @code{'berkeley_db}, the following subtypes are available: @code{'hash}, @code{'btree}, and @code{'recno}. See the diff --git a/man/lispref/display.texi b/man/lispref/display.texi index 1517f0f..1a85ffc 100644 --- a/man/lispref/display.texi +++ b/man/lispref/display.texi @@ -996,6 +996,71 @@ the contents of a display table, using additional indirection to a ``glyph table'' and such. Note that ``glyph'' has a different meaning in XEmacs.) +@defvar current-display-table + +The display table currently in use. This is a specifier. + +Display tables are used to control how characters are displayed. Each +time that redisplay processes a character, it is looked up in all the +display tables that apply (obtained by calling @code{specifier-instance} +on @code{current-display-table} and any overriding display tables +specified in currently active faces). The first entry found that +matches the character determines how the character is displayed. If +there is no matching entry, the default display method is +used. (Non-control characters are displayed as themselves and control +characters are displayed according to the buffer-local variable +@code{ctl-arrow}. Control characters are further affected by +@code{control-arrow-glyph} and @code{octal-escape-glyph}.) + +Each instantiator in this specifier and the display-table specifiers +in faces is a display table or a list of such tables. If a list, each +table will be searched in turn for an entry matching a particular +character. Each display table is one of + +@itemize @bullet +@item +A vector, specifying values for characters starting at 0. +@item +A char table, either of type @code{char} or @code{generic}. +@item +A range table. +@end itemize + +Each entry in a display table should be one of + +@itemize @bullet +@item +nil (this entry is ignored and the search continues). +@item +A character (use this character; if it happens to be the same as +the original character, default processing happens, otherwise +redisplay attempts to display this character directly; +#### At some point recursive display-table lookup will be +implemented). +@item +A string (display each character in the string directly; +#### At some point recursive display-table lookup will be +implemented). +@item +A glyph (display the glyph; +#### At some point recursive display-table lookup will be +implemented when a string glyph is being processed). +@item +A cons of the form (format "@var{string}") where @var{string} is a +printf-like spec used to process the character. #### Unfortunately no +formatting directives other than %% are implemented. +@item +A vector (each element of the vector is processed recursively; +in such a case, nil elements in the vector are simply ignored). + +#### At some point in the near future, display tables are likely to +be expanded to include other features, such as referencing characters +in particular fonts and allowing the character search to continue +all the way up the chain of specifier instantiators. These features +are necessary to properly display Unicode characters. +@end itemize +@end defvar + Individual faces can also specify an overriding display table; this is set using @code{set-face-display-table}. @xref{Faces}. diff --git a/man/lispref/extents.texi b/man/lispref/extents.texi index e332f78..a654d69 100644 --- a/man/lispref/extents.texi +++ b/man/lispref/extents.texi @@ -94,9 +94,9 @@ 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 +@dfn{detached} (i.e. no longer in the buffer) when all its text is deleted. Otherwise, it will simply shrink down to zero-length and -sit it the same place in the buffer. By default, the @code{detachable} +sit in the same place in the buffer. By default, the @code{detachable} property is set on newly-created extents. @xref{Detached Extents}. If an extent has its @code{duplicable} property set, it will be diff --git a/man/lispref/faces.texi b/man/lispref/faces.texi index 9afd173..ee36e15 100644 --- a/man/lispref/faces.texi +++ b/man/lispref/faces.texi @@ -476,6 +476,33 @@ This predicate returns @code{t} if @var{object} is a font specifier, and @code{nil} otherwise. @end defun +@defun make-font-specifier spec-list + +Return a new @code{font} specifier object with the given specification +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. @xref{Specifiers}, for more information +about specifiers. + +Valid instantiators for font specifiers are: + +@itemize @bullet + +@item +A string naming a font (e.g. under X this might be +"-*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*" for a 14-point +upright medium-weight Courier font). +@item +A font instance (use that instance directly if the device matches, +or use the string that generated it). +@item +A vector of no elements (only on TTY's; this means to set no font +at all, thus using the "natural" font of the terminal's text). +@item +A vector of one element (a face to inherit from). +@end itemize +@end defun + @node Font Instances @subsection Font Instances @@ -634,6 +661,63 @@ applying @code{font-instance-properties} to the result. This function returns non-@code{nil} if @var{object} is a color specifier. @end defun +@defun make-color-specifier spec-list + +Return a new @code{color} specifier object with the given specification +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. @xref{Specifiers}, for a detailed +description of how specifiers work. + +Valid instantiators for color specifiers are: + +@itemize @bullet +@item +A string naming a color (e.g. under X this might be "lightseagreen2" or +"#F534B2"). + +@item +A color instance (use that instance directly if the device matches, +or use the string that generated it). + +@item +A vector of no elements (only on TTY's; this means to set no color at +all, thus using the "natural" color of the terminal's text). + +@item +A vector of one or two elements: a face to inherit from, and optionally +a symbol naming which property of that face to inherit, either +@code{foreground} or @code{background} (if omitted, defaults to the same +property that this color specifier is used for; if this specifier is not +part of a face, the instantiator would not be valid). +@end itemize +@end defun + +@defun make-face-boolean-specifier spec-list + +Return a new @code{face-boolean} specifier object with the given spec +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. @xref{Specifiers}, for a detailed +description of how specifiers work. + +Valid instantiators for face-boolean specifiers are + +@itemize @bullet +@item +t or nil. +@item +A vector of two or three elements: a face to inherit from, optionally a +symbol naming the property of that face to inherit from (if omitted, +defaults to the same property that this face-boolean specifier is used +for; if this specifier is not part of a face, the instantiator would not +be valid), and optionally a value which, if non-nil, means to invert the +sense of the inherited property. +@end itemize + +@end defun + + @node Color Instances @subsection Color Instances @cindex color instances diff --git a/man/lispref/glyphs.texi b/man/lispref/glyphs.texi index 3cffa49..8373674 100644 --- a/man/lispref/glyphs.texi +++ b/man/lispref/glyphs.texi @@ -7,15 +7,15 @@ @chapter Glyphs @cindex glyphs - A @dfn{glyph} is an object that is used for pixmaps and images of all -sorts, as well as for things that ``act'' like pixmaps, such as -non-textual strings (@dfn{annotations}) displayed in a buffer or in the -margins. It is used in begin-glyphs and end-glyphs attached to extents, -marginal and textual annotations, overlay arrows (@code{overlay-arrow-*} -variables), toolbar buttons, mouse pointers, frame icons, truncation and -continuation markers, and the like. (Basically, any place there is an -image or something that acts like an image, there will be a glyph object -representing it.) + A @dfn{glyph} is an object that is used for pixmaps, widgets and +images of all sorts, as well as for things that ``act'' like pixmaps, +such as non-textual strings (@dfn{annotations}) displayed in a buffer or +in the margins. It is used in begin-glyphs and end-glyphs attached to +extents, marginal and textual annotations, overlay arrows +(@code{overlay-arrow-*} variables), toolbar buttons, mouse pointers, +frame icons, truncation and continuation markers, and the +like. (Basically, any place there is an image or something that acts +like an image, there will be a glyph object representing it.) The actual image that is displayed (as opposed to its position or clipping) is defined by an @dfn{image specifier} object contained @@ -71,6 +71,179 @@ one of @code{buffer} (used for glyphs in an extent, the modeline, the toolbar, or elsewhere in a buffer), @code{pointer} (used for the mouse-pointer), or @code{icon} (used for a frame's icon), and defaults to @code{buffer}. @xref{Glyph Types}. + +A glyph in XEmacs does @strong{NOT} refer to a single unit of textual +display (the XEmacs term for this is @dfn{rune}), but rather is an +object encapsulating a graphical element, such as an image or widget (an +element such as a button or text field; @dfn{widget} is the term for +this under X Windows, and it's called a @dfn{control} under MS Windows). +This graphical element could appear in a buffer, a margin, a gutter, or +a toolbar, or as a mouse pointer or an icon, for example. + +Creating a glyph using @code{make-glyph} does not specify @emph{where} +the glyph will be used, but it does specify @emph{what} the glyph will +look like. In particular, SPEC-LIST is used to specify this, and it's +used to initialize the glyph's @code{image} property, which is an image +specifier. (Note that @dfn{image} as used in the context of a glyph's +@code{image} property or in the terms @dfn{image specifier}, @dfn{image +instantiator}, or @dfn{image instance} does not refer to what people +normally think of as an image (which in XEmacs is called a +@dfn{pixmap}), but to any graphical element---a pixmap, a widget, or +even a block of text, when used in the places that call for a glyph.) +The format of the SPEC-LIST is typically an image instantiator (a string +or a vector; @ref{Image Specifiers}), but can also be a list of such +instantiators (each one in turn is tried until an image is successfully +produced), a cons of a locale (frame, buffer, etc.) and an +instantiator, a list of such conses, or any other form accepted by +@code{canonicalize-spec-list}. @xref{Specifiers}, for more information +about specifiers. + +If you're not familiar with specifiers, you should be in order to +understand how glyphs work. The clearest introduction to specifiers +is in the Lispref manual, available under Info. (Choose +Help->Info->Info Contents on the menubar or type C-h i.) You can +also see @code{make-specifier} for a capsule summary. What's important to +keep in mind is that a specifier lets you set a different value for +any particular buffer, window, frame, device, or console. This allows +for a great deal of flexibility; in particular, only one global glyph +needs to exist for a particular purpose (e.g. the icon used to represent +an iconified frame, the mouse pointer used over particular areas of a +frame, etc.), and in these cases you do not create your own glyph, but +rather modify the existing one. + +As well as using @var{spec-list} to initialize the glyph, you can set +specifications using @code{set-glyph-image}. Note that, due to a +possibly questionable historical design decision, a glyph itself is not +actually a specifier, but rather is an object containing an image +specifier (as well as other, seldom-used properties). Therefore, you +cannot set or access specifications for the glyph's image by directly +using @code{set-specifier}, @code{specifier-instance} or the like on the +glyph; instead use them on @code{(glyph-image @var{glyph})} or use the +convenience functions @code{set-glyph-image}, +@code{glyph-image-instance}, and @code{glyph-image}. + +Once you have created a glyph, you specify where it will be used as +follows: + +@itemize @bullet +@item +To insert a glyph into a buffer, create an extent in the buffer and then +use @code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set +a glyph to be displayed at the corresponding edge of the extent. (It is +common to create zero-width extents for this purpose.) + +@item +To insert a glyph into the left or right margin of a buffer, first +make sure the margin is visible by setting a value for the specifiers +@code{left-margin-width} or @code{right-margin-width}. (Not strictly necessary +when using margin glyphs with layout policy @code{whitespace}.) Then follow +the same procedure above for inserting a glyph in a buffer, and then +set a non-default layout policy for the glyph using +@code{set-extent-begin-glyph-layout} or @code{set-extent-end-glyph-layout}. +Alternatively, use the high-level annotations API (see +@code{make-annotation}). (In point of fact, you can also use the annotations +API for glyphs in a buffer, by setting a layout policy of @code{text}.) + +@item +To insert a glyph into the modeline, just put the glyph directly as one +of the modeline elements. (Unfortunately you can't currently put a begin +glyph or end glyph on one of the modeline extents---they're ignored.) + +@item +To insert a glyph into a toolbar, specify it as part of a toolbar +instantiator (typically set on the specifier @code{default-toolbar}). +See @code{default-toolbar} for more information. (Note that it is +standard practice to use a symbol in place of the glyph list in the +toolbar instantiator; the symbol is evalled to get the glyph list. This +facilitates both creating the toolbar instantiator and modifying +individual glyphs in a toolbar later on. For example, you can change +the way that the Mail toolbar button looks by modifying the value of the +variable @code{toolbar-mail-icon} (in general, @code{toolbar-*-icon}) +and then calling @code{(set-specifier-dirty-flag default-toolbar)}. +(#### Unfortunately this doesn't quite work the way it should; the +change will appear in new frames, but not existing ones. + +@item +To insert a glyph into a gutter, create or modify a gutter instantiator +(typically set on the specifier @code{default-gutter}). Gutter +instantiators consist of strings or lists of strings, so to insert a +glyph, create an extent over the string, and use +@code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set a +glyph to be displayed at the corresponding edge of the extent, just like +for glyphs in a buffer. + +@item +To use a glyph as the icon for a frame, you do not actually create a new +glyph; rather, you change the specifications for the existing glyph +@code{frame-icon-glyph}. (Remember that, because of the specifier nature +of glyphs, you can set different values for any particular buffer or +frame.) + +@item +To use a glyph as the mouse pointer, in general you do not create a new +glyph, but rather you change the specifications of various existing +glyphs, such as @code{text-pointer-glyph} for the pointer used over +text, @code{modeline-pointer-glyph} for the pointer used over the +modeline, etc. Do an apropos over @code{*-pointer-glyph} to find all of +them. (Note also that you can temporarily set the mouse pointer to some +specific shape by using @code{set-frame-pointer}, which takes an image +instace, as obtained from calling @code{glyph-image-instance} on a glyph +of type @code{pointer} -- either one of the above-mentioned variables or +one you created yourself. (See below for what it means to create a +glyph of type @code{pointer}.) This pointer will last only until the +next mouse motion event is processed or certain other things happen, +such as creating or deleting a window. (In fact, the above-mentioned +pointer glyph variables are implemented as part of the default handler +for mouse motion events. If you want to customize this behavior, take a +look at @code{mode-motion-hook}, or @code{mouse-motion-handler} if you +really want to get low-level.) + +@item +To use a glyph to control the shape of miscellaneous redisplay effects +such as the truncation and continuation markers, set the appropriate +existing glyph variables, as for icons and pointers above. See +@code{continuation-glyph}, @code{control-arrow-glyph}, +@code{hscroll-glyph}, @code{invisible-text-glyph}, +@code{octal-escape-glyph}, and @code{truncation-glyph}. See also +@code{overlay-arrow-string}, an odd redisplay leftover which can be set +to a glyph you created, and will cause the glyph to be displayed on top +of the text position specified in the marker stored in +@code{overlay-arrow-position}. + +@item +To use a glyph in a display table (i.e. to control the appearance of any +individual character), create the appropriate character glyphs and then +set a specification for the specifier @code{current-display-table}, +which controls the appearance of characters. You can also set an +overriding display table for use with text displayed in a particular +face; see @code{set-face-display-table} and @code{make-display-table}. +#### Note: Display tables do not currently support general Mule +characters. They will be overhauled at some point to support this +and to provide other features required under Mule. + +@item +To use a glyph as the background pixmap of a face: Note that the +background pixmap of a face is actually an image specifier -- probably +the only place in XEmacs where an image specifier occurs outside of a +glyph. Similarly to how the glyph's image specifier works, you don't +create your own image specifier, but rather add specifications to the +existing one (using @code{set-face-background-pixmap}). Note that the +image instance that is generated in order to actually display the +background pixmap is of type @code{mono-pixmap}, meaning that it's a +two-color image and the foreground and background of the image get +filled in with the corresponding colors from the face. +@end itemize + +It is extremely rare that you will ever have to specify a value for +TYPE, which should be one of @code{buffer} (used for glyphs in an +extent, the modeline, the toolbar, or elsewhere in a buffer), +@code{pointer} (used for the mouse-pointer), or @code{icon} (used for a +frame's icon), and defaults to @code{buffer}. The only cases where it +needs to be specified is when creating icon or pointer glyphs, and in +both cases the necessary glyphs have already been created at startup and +are accessed through the appropriate variables, +e.g. @code{text-pointer-glyph} (or in general, @code{*-pointer-glyph}) +and @code{frame-icon-glyph}. @xref{Glyph Types}. @end defun @defun make-glyph-internal &optional type @@ -78,13 +251,25 @@ This function creates a new, uninitialized glyph of type @var{type}. @end defun @defun make-pointer-glyph &optional spec-list -This function is equivalent to calling @code{make-glyph} with a -@var{type} of @code{pointer}. + +Return a new @code{pointer-glyph} object with the specification list +@var{spec-list}. This function is equivalent to calling +@code{make-glyph} with a @var{type} of @code{pointer}. + +It is extremely unlikely that you will ever need to create a pointer +glyph. Instead, you probably want to be calling @code{set-glyph-image} +on an existing glyph, e.g. @code{text-pointer-glyph}. @end defun @defun make-icon-glyph &optional spec-list -This function is equivalent to calling @code{make-glyph} with a -@var{type} of @code{icon}. + +Return a new @code{pointer-glyph} object with the specification list +@var{spec-list}. This function is equivalent to calling +@code{make-glyph} with a @var{type} of @code{icon}. + +It is extremely unlikely that you will ever need to create a pointer +glyph. Instead, you probably want to be calling @code{set-glyph-image} +on an existing glyph, e.g. @code{text-pointer-glyph}. @end defun @node Glyph Properties @@ -420,10 +605,21 @@ a glyph. @end defun @defun make-image-specifier spec-list -This function creates a new image specifier object and initializes -it according to @var{spec-list}. It is unlikely that you will ever -want to do this, but this function is provided for completeness and -for experimentation purposes. @xref{Specifiers}. +This function creates a new image specifier object and initializes it +according to @var{spec-list}. @xref{Specifiers}. + +Note that, in practice, you rarely, if ever, need to actually create an +image specifier! (This function exists mainly for completeness.) Pretty +much the only use for image specifiers is to control how glyphs are +displayed, and the image specifier associated with a glyph (the +@code{image} property of a glyph) is created automatically when a glyph +is created and need not (and cannot, for that matter) ever be changed +(@pxref{Glyphs}). In fact, the design decision to create a separate +image specifier type, rather than make glyphs themselves be specifiers, +is debatable---the other properties of glyphs are rarely used and could +conceivably have been incorporated into the glyph's instantiator. The +rarely used glyph types (buffer, pointer, icon) could also have been +incorporated into the instantiator. @end defun Image instantiators come in many formats: @code{xbm}, @code{xpm}, @@ -516,8 +712,49 @@ A glyph from a font; i.e. the name of a font, and glyph index into it of the form @samp{@var{font} fontname index [[mask-font] mask-index]}. Only if X support was compiled into this XEmacs. Currently can only be instanced as @code{pointer}, although this should probably be fixed. +@item mswindows-resource +An MS Windows pointer resource. Specifies a resource to retrieve +directly from the system (an OEM resource) or from a file, particularly +an executable file. If the resource is to be retrieved from a file, use +:file and optionally :resource-id. Otherwise use :resource-id. Always +specify :resource-type to specify the type (cursor, bitmap or icon) of +the resource. Possible values for :resource-id are listed below. Can +be instanced as @code{pointer} or @code{color-pixmap}. @item subwindow -An embedded X window; not currently implemented. +An embedded windowing system window. Can only be instanced as +@code{subwindow}. +@item button +A button widget; either a push button, radio button or toggle button. +Can only be instanced as @code{widget}. +@item combo-box +A drop list of selectable items in a widget, for editing text. +Can only be instanced as @code{widget}. +@item edit-field +A text editing widget. Can only be instanced as @code{widget}. +@item label +A static, text-only, widget; for displaying text. Can only be instanced +as @code{widget}. +@item layout +A widget for controlling the positioning of children underneath it. +Through the use of nested layouts, a widget hierarchy can be created +which can have the appearance of any standard dialog box or similar +arrangement; all of this is counted as one @dfn{glyph} and could appear +in many of the places that expect a single glyph. Can only be instanced +as @code{widget}. +@item native-layout +@c #### Document me better! +The native version of a layout widget. +Can only be instanced as @code{widget}. +@item progress-gauge +A sliding widget, for showing progress. Can only be instanced as +@code{widget}. +@item tab-control +A tab widget; a series of user selectable tabs. Can only be instanced +as @code{widget}. +@item tree-view +A folding widget. Can only be instanced as @code{widget}. +@item scrollbar +A scrollbar widget. Can only be instanced as @code{widget}. @item autodetect XEmacs tries to guess what format the data is in. If X support exists, the data string will be checked to see if it names a filename. If so, @@ -528,6 +765,9 @@ is one of the allowable image-instance types and the string names a valid cursor-font name, the image will be created as a pointer. Otherwise, the image will be displayed as text. If no X support exists, the image will always be displayed as text. +@item inherit +Inherit from the background-pixmap property of a face. Can only be +instanced as @code{mono-pixmap}. @end table The valid keywords are: @@ -587,8 +827,44 @@ specify symbolic color names to the actual color to be used for that symbolic color (in the form of a string or a color-specifier object). If this is not specified, the contents of @code{xpm-color-symbols} are used to generate the alist. +@item :resource-id +Only for @code{mswindows-resource}. This must be either an integer +(which directly specifies a resource number) or a string. Valid strings +are + +For bitmaps: + +"close", "uparrow", "dnarrow", "rgarrow", "lfarrow", +"reduce", "zoom", "restore", "reduced", "zoomd", +"restored", "uparrowd", "dnarrowd", "rgarrowd", "lfarrowd", +"mnarrow", "combo", "uparrowi", "dnarrowi", "rgarrowi", +"lfarrowi", "size", "btsize", "check", "checkboxes", and +"btncorners". + +For cursors: + +"normal", "ibeam", "wait", "cross", "up", "sizenwse", +"sizenesw", "sizewe", "sizens", "sizeall", and "no". + +For icons: + +"sample", "hand", "ques", "bang", "note", and "winlogo". +@item :resource-type +Only for @code{mswindows-resource}. This must be a symbol, either +@code{cursor}, @code{icon}, or @code{bitmap}, specifying the type of +resource to be retrieved. +@item :face +Only for @code{inherit}. This specifies the face to inherit from. For +widgets this also specifies the face to use for display. It defaults to +gui-element-face. @end table +Keywords accepted as menu item specs are also accepted by widgets. +These are @code{:selected}, @code{:active}, @code{:suffix}, +@code{:keys}, @code{:style}, @code{:filter}, @code{:config}, +@code{:included}, @code{:key-sequence}, @code{:accelerator}, +@code{:label} and @code{:callback}. + If instead of a vector, the instantiator is a string, it will be converted into a vector by looking it up according to the specs in the @code{console-type-image-conversion-list} for the console type of @@ -770,10 +1046,14 @@ This function returns non-@code{nil} if @var{object} is an image instance of type @code{nothing}. @end defun +@defun widget-image-instance-p object +Return t if @var{object} is an image instance of type @code{widget}. +@end defun + @node Image Instance Functions @subsubsection Image Instance Functions -@defun make-image-instance data &optional device dest-types no-error +@defun make-image-instance data &optional domain dest-types no-error This function creates a new image-instance object. @var{data} is an image instantiator, which describes the image @@ -789,14 +1069,47 @@ image formats, the most natural types are @code{color-pixmap}, followed by @code{mono-pixmap}, followed by @code{pointer}. For the string and formatted-string formats, the most natural types are @code{text}, followed by @code{mono-pixmap} (not currently implemented), followed by -@code{color-pixmap} (not currently implemented). The other formats can -only be instantiated as one type. (If you want to control more -specifically the order of the types into which an image is instantiated, -just call @code{make-image-instance} repeatedly until it succeeds, -passing less and less preferred destination types each time. +@code{color-pixmap} (not currently implemented). For MS Windows +resources, the most natural type for pointer resources is +@code{pointer}, and for the others it's @code{color-pixmap}. The other +formats can only be instantiated as one type. (If you want to control +more specifically the order of the types into which an image is +instantiated, just call @code{make-image-instance} repeatedly until it +succeeds, passing less and less preferred destination types each time. If @var{dest-types} is omitted, all possible types are allowed. +@var{domain} specifies the domain to which the image instance will be +attached. This domain is termed the @dfn{governing domain}. The type +of the governing domain depends on the image instantiator +format. (Although, more correctly, it should probably depend on the +image instance type.) For example, pixmap image instances are specific +to a device, but widget image instances are specific to a particular +XEmacs window because in order to display such a widget when two windows +onto the same buffer want to display the widget, two separate underlying +widgets must be created. (That's because a widget is actually a child +window-system window, and all window-system windows have a unique +existence on the screen.) This means that the governing domain for a +pixmap image instance will be some device (most likely, the only +existing device), whereas the governing domain for a widget image +instance will be some XEmacs window. + +If you specify an overly general @var{domain} (e.g. a frame when a +window was wanted), an error is signaled. If you specify an overly +specific @var{domain} (e.g. a window when a device was wanted), the +corresponding general domain is fetched and used instead. For +@code{make-image-instance}, it makes no difference whether you specify +an overly specific domain or the properly general domain derived from +it. However, it does matter when creating an image instance by +instantiating a specifier or glyph (e.g. with +@code{glyph-image-instance}), because the more specific domain causes +spec lookup to start there and proceed to more general domains. (It +would also matter when creating an image instance with an instantiator +format of @code{inherit}, but we currently disallow this. #### We should +fix this.) +n +If omitted, @var{domain} defaults to the selected window. + @var{no-error} controls what happens when the image cannot be generated. If @var{nil}, an error message is generated. If @var{t}, no messages are generated and this function returns @var{nil}. If anything else, a @@ -818,6 +1131,17 @@ returned. This function returns the name of the given image instance. @end defun +@defun image-instance-domain image-instance + +Return the governing domain of the given @var{image-instance}. The +governing domain of an image instance is the domain that the image +instance is specific to. It is @emph{NOT} necessarily the domain that +was given to the call to @code{specifier-instance} that resulted in the +creation of this image instance. See @code{make-image-instance} for +more information on governing domains. +@end defun + + @defun image-instance-string image-instance This function returns the string of the given image instance. This will only be non-@code{nil} for text image instances. diff --git a/man/lispref/gutter.texi b/man/lispref/gutter.texi index 4da9fa2..34c8d47 100644 --- a/man/lispref/gutter.texi +++ b/man/lispref/gutter.texi @@ -14,13 +14,15 @@ can contain arbitrary text or graphics. @menu * Gutter Intro:: An introduction. -* Gutter Descriptor Format:: How to create a gutter. +* Creating Gutter:: How to create a gutter. +* Gutter Descriptor Format:: Accessing and modifying a gutter's + properties. * Specifying a Gutter:: Setting a gutter's contents. * Other Gutter Variables:: Controlling the size of gutters. * Common Gutter Widgets:: Things to put in gutters. @end menu -@node Gutter Intro, Gutter Descriptor Format, , Gutter +@node Gutter Intro, Creating Gutter, Gutter, Gutter @section Gutter Intro A @dfn{gutter} is a rectangle displayed along one edge of a frame. It @@ -57,7 +59,70 @@ from the default just sets the position-specific specifiers, and if the user sets the default gutter to the same position, it will just not be visible. -@node Gutter Descriptor Format, Specifying a Gutter, Gutter Intro, Gutter +@node Creating Gutter, Gutter Descriptor Format, Gutter Intro, Gutter +@section Creating Gutter + +@defun make-gutter-specifier spec-list + +Return a new @code{gutter} specifier object with the given specification +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. @xref{Specifiers}, for more information +about specifiers. + +Gutter specifiers are used to specify the format of a gutter. The +values of the variables @code{default-gutter}, @code{top-gutter}, +@code{left-gutter}, @code{right-gutter}, and @code{bottom-gutter} are +always gutter specifiers. + +Valid gutter instantiators are called "gutter descriptors" and are +either strings or property-lists of strings. See @code{default-gutter} +for a description of the exact format. +@end defun + +@defun make-gutter-size-specifier spec-list + +Return a new @code{gutter-size} specifier object with the given spec +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. @xref{Specifiers}, for more information +about specifiers. + +Gutter-size specifiers are used to specify the size of a gutter. The +values of the variables @code{default-gutter-size}, +@code{top-gutter-size}, @code{left-gutter-size}, +@code{right-gutter-size}, and @code{bottom-gutter-size} are always +gutter-size specifiers. + +Valid gutter-size instantiators are either integers or the special +symbol @code{autodetect}. If a gutter-size is set to @code{autodetect} +them the size of the gutter will be adjusted to just accomodate the +gutters contents. @code{autodetect} only works for top and bottom +gutters. +@end defun + +@defun make-gutter-visible-specifier spec-list + +Return a new @code{gutter-visible} specifier object with the given spec +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. @xref{Specifiers}, for more information +about specifiers. + +Gutter-visible specifiers are used to specify the visibility of a +gutter. The values of the variables @code{default-gutter-visible-p}, +@code{top-gutter-visible-p}, @code{left-gutter-visible-p}, +@code{right-gutter-visible-p}, and @code{bottom-gutter-visible-p} are +always gutter-visible specifiers. + +Valid gutter-visible instantiators are t, nil or a list of symbols. If +a gutter-visible instantiator is set to a list of symbols, and the +correspondong gutter specification is a property-list strings, then +elements of the gutter specification will only be visible if the +corresponding symbol occurs in the gutter-visible instantiator. +@end defun + +@node Gutter Descriptor Format, Specifying a Gutter, Creating Gutter, Gutter @section Gutter Descriptor Format The contents of a gutter are specified using a @dfn{gutter descriptor}. @@ -383,13 +448,13 @@ time-consuming operations like downloading. * Progress Bars:: Visual indication of operation progress. @end menu -@node Buffer Tabs, Progress Bars, , Common Gutter Widgets -@section Buffer Tabs +@node Buffer Tabs, Progress Bars, ,Common Gutter Widgets +@subsection Buffer Tabs Not documented yet. -@node Progress Bars, , Buffer Tabs, Common Gutter Widgets -@section Progress Bars +@node Progress Bars, , Buffer Tabs, Common Gutter Widgets +@subsection Progress Bars Not documented yet. diff --git a/man/lispref/modes.texi b/man/lispref/modes.texi index 332a960..d338082 100644 --- a/man/lispref/modes.texi +++ b/man/lispref/modes.texi @@ -920,7 +920,7 @@ is controlled using the @code{modeline} face. @xref{Faces}. The modeline contents are controlled by a data structure of lists, strings, symbols, and numbers kept in the buffer-local variable -@code{mode-line-format}. The data structure is called a @dfn{modeline +@code{modeline-format}. The data structure is called a @dfn{modeline construct}, and it is built in recursive fashion out of simpler modeline constructs. The same data structure is used for constructing frame titles (@pxref{Frame Titles}). @@ -943,8 +943,8 @@ Because of this, very few modes need to alter @code{modeline-format}. For most purposes, it is sufficient to alter the variables referenced by @code{modeline-format}. - A modeline construct may be a list, a symbol, or a string. If the -value is a list, each element may be a list, a symbol, or a string. + A modeline construct may be a string, symbol, glyph, generic +specifier, list or cons cell. @table @code @cindex percent symbol in modeline @@ -956,13 +956,22 @@ is left justified). @xref{%-Constructs}. @item @var{symbol} A symbol as a modeline construct stands for its value. The value of -@var{symbol} is used as a modeline construct, in place of @var{symbol}. -However, the symbols @code{t} and @code{nil} are ignored; so is any -symbol whose value is void. +@var{symbol} is processed as a modeline construct, in place of +@var{symbol}. However, the symbols @code{t} and @code{nil} are ignored; +so is any symbol whose value is void. There is one exception: if the value of @var{symbol} is a string, it is displayed verbatim: the @code{%}-constructs are not recognized. +@item @var{glyph} +A glyph is displayed as is. + +@item @var{generic-specifier} +A @var{generic-specifier} (i.e. a specifier of type @code{generic}) +stands for its instance. The instance of @var{generic-specifier} is +computed in the current window using the equivalent of +@code{specifier-instance} and the value is processed. + @item (@var{string} @var{rest}@dots{}) @r{or} (@var{list} @var{rest}@dots{}) A list whose first element is a string or list means to process all the elements recursively and concatenate the results. This is the most @@ -987,6 +996,19 @@ if @var{width} is negative) on the right. For example, the usual way to show what percentage of a buffer is above the top of the window is to use a list like this: @code{(-3 "%p")}. + +@item (@var{extent} @var{rest}@dots{}) + +A list whose car is an extent means the cdr of the list is processed +normally but the results are displayed using the face of the extent, and +mouse clicks over this section are processed using the keymap of the +extent. (In addition, if the extent has a help-echo property, that +string will be echoed when the mouse moves over this section.) If +extents are nested, all keymaps are properly consulted when processing +mouse clicks, but multiple faces are not correctly merged (only the +first face is used), and lists of faces are not correctly handled. +@c #### Document generate-modeline-string. +@c See `generated-modeline-string' for more information. @end table If you do alter @code{modeline-format} itself, the new value should @@ -1202,10 +1224,10 @@ The status of the subprocess belonging to the current buffer, obtained with @c The following two may only apply in XEmacs. @item %l -the current line number. +The current line number. @item %S -the name of the selected frame; this is only meaningful under the +The name of the selected frame; this is only meaningful under the X Window System. @xref{Frame Name}. @item %t @@ -1226,6 +1248,9 @@ visible on screen; or @samp{Bottom} or @samp{All}. @samp{Narrow} when narrowing is in effect; nothing otherwise (see @code{narrow-to-region} in @ref{Narrowing}). +@item %C +Under XEmacs/mule, the mnemonic for @code{buffer-file-coding-system}. + @item %[ An indication of the depth of recursive editing levels (not counting minibuffer levels): one @samp{[} for each editing level. diff --git a/man/lispref/specifiers.texi b/man/lispref/specifiers.texi index 89bd121..660d251 100644 --- a/man/lispref/specifiers.texi +++ b/man/lispref/specifiers.texi @@ -703,7 +703,7 @@ and can be used to restrict the scope of that instantiator to a particular device class or device type and/or to mark instantiators added by a particular package so that they can be later removed. -A specifier tag set consists of a list of zero of more specifier tags, +A specifier tag set consists of a list of zero or more specifier tags, each of which is a symbol that is recognized by XEmacs as a tag. (The valid device types and device classes are always tags, as are any tags defined by @code{define-specifier-tag}.) It is called a ``tag set'' (as @@ -934,11 +934,11 @@ of the symbols @code{generic}, @code{integer}, @code{natnum}, @code{face-boolean}, or @code{toolbar}. For more information on particular types of specifiers, see the -functions @code{generic-specifier-p}, @code{integer-specifier-p}, -@code{natnum-specifier-p}, @code{boolean-specifier-p}, -@code{color-specifier-p}, @code{font-specifier-p}, -@code{image-specifier-p}, @code{face-boolean-specifier-p}, and -@code{toolbar-specifier-p}. +functions @code{make-generic-specifier}, @code{make-integer-specifier}, +@code{make-natnum-specifier}, @code{make-boolean-specifier}, +@code{make-color-specifier}, @code{make-font-specifier}, +@code{make-image-specifier}, @code{make-face-boolean-specifier}, and +@code{make-toolbar-specifier}. @end defun @defun make-specifier-and-init type spec-list &optional dont-canonicalize @@ -954,6 +954,59 @@ this conversion is not performed, and the @var{spec-list} must already be in full form. See @code{canonicalize-spec-list}. @end defun +@defun make-integer-specifier spec-list + +Return a new @code{integer} specifier object with the given +specification list. @var{spec-list} can be a list of specifications +(each of which is a cons of a locale and a list of instantiators), a +single instantiator, or a list of instantiators. + +Valid instantiators for integer specifiers are integers. +@end defun + +@defun make-boolean-specifier spec-list + +Return a new @code{boolean} specifier object with the given +specification list. @var{spec-list} can be a list of specifications +(each of which is a cons of a locale and a list of instantiators), a +single instantiator, or a list of instantiators. + +Valid instantiators for boolean specifiers are @code{t} and @code{nil}. +@end defun + +@defun make-natnum-specifier spec-list + +Return a new @code{natnum} specifier object with the given specification +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. + +Valid instantiators for natnum specifiers are non-negative integers. +@end defun + +@defun make-generic-specifier spec-list + +Return a new @code{generic} specifier object with the given +specification list. @var{spec-list} can be a list of specifications +(each of which is a cons of a locale and a list of instantiators), a +single instantiator, or a list of instantiators. + +Valid instantiators for generic specifiers are all Lisp values. They +are returned back unchanged when a specifier is instantiated. +@end defun + +@defun make-display-table-specifier spec-list + +Return a new @code{display-table} specifier object with the given spec +list. @var{spec-list} can be a list of specifications (each of which is +a cons of a locale and a list of instantiators), a single instantiator, +or a list of instantiators. + +Valid instantiators for display-table specifiers are described in detail +in the doc string for @code{current-display-table} (@pxref{Active +Display Table}). +@end defun + @node Specifier Validation Functions @section Functions for Checking the Validity of Specifier Components diff --git a/man/lispref/toolbar.texi b/man/lispref/toolbar.texi index 13747cd..3d725a6 100644 --- a/man/lispref/toolbar.texi +++ b/man/lispref/toolbar.texi @@ -9,7 +9,9 @@ @menu * Toolbar Intro:: An introduction. -* Toolbar Descriptor Format:: How to create a toolbar. +* Creating Toolbar:: How to create a toolbar. +* Toolbar Descriptor Format:: Accessing and modifying a toolbar's + properties. * Specifying the Toolbar:: Setting a toolbar's contents. * Other Toolbar Variables:: Controlling the size of toolbars. @end menu @@ -57,6 +59,27 @@ from the default just sets the position-specific specifiers, and if the user sets the default toolbar to the same position, it will just not be visible. +@node Creating Toolbar +@section Creating Toolbar + +@defun make-toolbar-specifier spec-list + +Return a new @code{toolbar} specifier object with the given +specification list. @var{spec-list} can be a list of specifications +(each of which is a cons of a locale and a list of instantiators), a +single instantiator, or a list of instantiators. @xref{Specifiers}, for +more information about specifiers. + +Toolbar specifiers are used to specify the format of a toolbar. The +values of the variables @code{default-toolbar}, @code{top-toolbar}, +@code{left-toolbar}, @code{right-toolbar}, and @code{bottom-toolbar} are +always toolbar specifiers. + +Valid toolbar instantiators are called "toolbar descriptors" +and are lists of vectors. See @code{default-toolbar} for a description +of the exact format. +@end defun + @node Toolbar Descriptor Format @section Toolbar Descriptor Format diff --git a/man/xemacs/basic.texi b/man/xemacs/basic.texi index 32cfc00..2c6f1c6 100644 --- a/man/xemacs/basic.texi +++ b/man/xemacs/basic.texi @@ -1,4 +1,6 @@ - +@c This is part of the XEmacs manual. +@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc. +@c See file xemacs.texi for copying conditions. @node Basic, Undo, Startup Paths, Top @chapter Basic Editing Commands @@ -7,8 +9,34 @@ We now give the basics of how to enter text, make corrections, and save the text in a file. If this material is new to you, you might learn it more easily by running the Emacs learn-by-doing tutorial. To -do this, type @kbd{Control-h t} (@code{help-with-tutorial}). +use the tutorial, run Emacs and type @kbd{Control-h t} +(@code{help-with-tutorial}). You can also use @b{Tutorials} item from +the @b{Help} menu. + +XEmacs comes with many translations of tutorial. If your XEmacs is with +MULE and you set up language environment correctly, XEmacs choses right +tutorial when available (@pxref{Language Environments}). If you want +specific translation, give @kbd{C-h t} a prefix argument, like @kbd{C-u +C-h t}. + + To clear the screen and redisplay, type @kbd{C-l} (@code{recenter}). + +@menu +* Inserting Text:: Inserting text by simply typing it. +* Moving Point:: How to move the cursor to the place where you want to + change something. +* Erasing:: Deleting and killing text. +* Files: Basic Files. Visiting, creating, and saving files. +* Help: Basic Help. Asking what a character does. +* Blank Lines:: Commands to make or delete blank lines. +* Continuation Lines:: Lines too wide for the screen. +* Position Info:: What page, line, row, or column is point on? +* Arguments:: Numeric arguments for repeating a command. +@c * Repeating:: A short-cut for repeating the previous command. +@end menu + +@node Inserting Text, Moving Point, , Basic @section Inserting Text @cindex insertion @@ -16,74 +44,92 @@ do this, type @kbd{Control-h t} (@code{help-with-tutorial}). @cindex cursor @cindex graphic characters To insert printing characters into the text you are editing, just type -them. This inserts the characters into the buffer at the cursor (that -is, at @dfn{point}; @pxref{Point}). The cursor moves forward. Any -characters after the cursor move forward too. If the text in the buffer -is @samp{FOOBAR}, with the cursor before the @samp{B}, and you type -@kbd{XX}, the result is @samp{FOOXXBAR}, with the cursor still before the -@samp{B}. - -@kindex DEL +them. This inserts the characters you type into the buffer at the +cursor (that is, at @dfn{point}; @pxref{Point}). The cursor moves +forward, and any text after the cursor moves forward too. If the text +in the buffer is @samp{FOOBAR}, with the cursor before the @samp{B}, +then if you type @kbd{XX}, you get @samp{FOOXXBAR}, with the cursor +still before the @samp{B}. + +@kindex BS @cindex deletion - To @dfn{delete} text you have just inserted, use @key{DEL}. -@key{DEL} deletes the character @var{before} the cursor (not the one -that the cursor is on top of or under; that is the character @var{after} -the cursor). The cursor and all characters after it move backwards. -Therefore, if you type a printing character and then type @key{DEL}, -they cancel out. + To @dfn{delete} text you have just inserted, use @key{BS}. @key{BS} +deletes the character @emph{before} the cursor (not the one that the +cursor is on top of or under; that is the character @var{after} the +cursor). The cursor and all characters after it move backwards. +Therefore, if you type a printing character and then type @key{BS}, they +cancel out. @kindex RET @cindex newline To end a line and start typing a new one, type @key{RET}. This inserts a newline character in the buffer. If point is in the middle of a line, @key{RET} splits the line. Typing @key{DEL} when the cursor is -at the beginning of a line rubs out the newline before the line, thus -joining the line with the preceding line. +at the beginning of a line deletes the preceding newline, thus joining +the line with the preceding line. - Emacs automatically splits lines when they become too long, if you -turn on a special mode called @dfn{Auto Fill} mode. @xref{Filling}, for -information on using Auto Fill mode. + Emacs can split lines automatically when they become too long, if you +turn on a special minor mode called @dfn{Auto Fill} mode. +@xref{Filling}, for how to use Auto Fill mode. -@findex delete-backward-char -@findex newline -@findex self-insert - Customization information: @key{DEL}, in most modes, runs the command -@code{delete-backward-char}; @key{RET} runs the command @code{newline}, -and self-inserting printing characters run the command -@code{self-insert}, which inserts whatever character was typed to invoke -it. Some major modes rebind @key{DEL} to other commands. + If you prefer to have text characters replace (overwrite) existing +text rather than shove it to the right, you can enable Overwrite mode, +a minor mode. @xref{Minor Modes}. @cindex quoting @kindex C-q @findex quoted-insert - Direct insertion works for printing characters and @key{SPC}, but -other characters act as editing commands and do not insert themselves. -If you need to insert a control character or a character whose code is -above 200 octal, you must @dfn{quote} it by typing the character -@kbd{control-q} (@code{quoted-insert}) first. There are two ways to use -@kbd{C-q}:@refill + Direct insertion works for printing characters and @key{SPC}, but other +characters act as editing commands and do not insert themselves. If you +need to insert a control character or a character whose code is above 200 +octal, you must @dfn{quote} it by typing the character @kbd{Control-q} +(@code{quoted-insert}) first. (This character's name is normally written +@kbd{C-q} for short.) There are two ways to use @kbd{C-q}: @itemize @bullet @item -@kbd{Control-q} followed by any non-graphic character (even @kbd{C-g}) +@kbd{C-q} followed by any non-graphic character (even @kbd{C-g}) inserts that character. + @item -@kbd{Control-q} followed by three octal digits inserts the character -with the specified character code. +@kbd{C-q} followed by a sequence of octal digits inserts the character +with the specified octal character code. You can use any number of +octal digits; any non-digit terminates the sequence. If the terminating +character is @key{RET}, it serves only to terminate the sequence; any +other non-digit is itself used as input after terminating the sequence. +(The use of octal sequences is disabled in ordinary non-binary Overwrite +mode, to give you a convenient way to insert a digit instead of +overwriting with it.) @end itemize @noindent A numeric argument to @kbd{C-q} specifies how many copies of the quoted character should be inserted (@pxref{Arguments}). - If you prefer to have text characters replace (overwrite) existing -text instead of moving it to the right, you can enable Overwrite mode, a -minor mode. @xref{Minor Modes}. +@findex backward-or-forward-delete-char +@findex newline +@findex self-insert + Customization information: @key{DEL}, in most modes, runs the command +@code{backward-or-forward-delete-char}; @key{RET} runs the command +@code{newline}, and self-inserting printing characters run the command +@code{self-insert}, which inserts whatever character was typed to invoke +it. Some major modes rebind @key{DEL} to other commands. +@node Moving Point, Erasing, Inserting Text, Basic @section Changing the Location of Point +@cindex arrow keys +@kindex LEFT +@kindex RIGHT +@kindex UP +@kindex DOWN +@cindex moving point +@cindex movement +@cindex cursor motion +@cindex moving the cursor To do more than insert characters, you have to know how to move point -(@pxref{Point}). Here are a few of the available commands. +(@pxref{Point}). The simplest way to do this is with arrow keys, or by +clicking the left mouse button where you want to move to. NOTE: Many of the following commands have two versions, one that uses the function keys (e.g. @key{LEFT} or @key{END}) and one that doesn't. @@ -149,7 +195,10 @@ Move forward one word (@code{forward-word}). Move backward one word (@code{backward-word}). @item C-n @itemx DOWN -Move down one line, vertically (@code{next-line}). This command attempts to keep the horizontal position unchanged, so if you start in the middle of one line, you end in the middle of the next. When on the last line of text, @kbd{C-n} creates a new line and moves onto it. +Move down one line, vertically (@code{next-line}). This command +attempts to keep the horizontal position unchanged, so if you start in +the middle of one line, you end in the middle of the next. When on the +last line of text, @kbd{C-n} creates a new line and moves onto it. @item C-p @itemx UP Move up one line, vertically (@code{previous-line}). @@ -163,14 +212,16 @@ Move up one page, vertically (@code{scroll-down}). Clear the frame and reprint everything (@code{recenter}). Text moves on the frame to bring point to the center of the window. @item M-r -Move point to left margin on the line halfway down the frame or -window (@code{move-to-window-line}). Text does not move on the -frame. A numeric argument says how many screen lines down from the -top of the window (zero for the top). A negative argument counts from -the bottom (@minus{}1 for the bottom). +Move point to left margin, vertically centered in the window +(@code{move-to-window-line}). Text does not move on the screen. + +A numeric argument says which screen line to place point on. It counts +screen lines down from the top of the window (zero for the top line). A +negative argument counts lines from the bottom (@minus{}1 for the bottom +line). @item C-t Transpose two characters, the ones before and after the cursor -@*(@code{transpose-chars}). +(@code{transpose-chars}). @item M-< @itemx C-HOME Move to the top of the buffer (@code{beginning-of-buffer}). With @@ -180,35 +231,46 @@ numeric argument @var{n}, move to @var{n}/10 of the way from the top. @itemx C-END Move to the end of the buffer (@code{end-of-buffer}). @item M-x goto-char -Read a number @var{n} and move the cursor to character number @var{n}. +Read a number @var{n} and move point to buffer position @var{n}. Position 1 is the beginning of the buffer. @item M-g -Read a number @var{n} and move cursor to line number @var{n} +Read a number @var{n} and move point to line number @var{n} (@code{goto-line}). Line 1 is the beginning of the buffer. -@item C-x C-n +@c @item C-x C-n +@item M-x set-goal-column @findex set-goal-column Use the current column of point as the @dfn{semi-permanent goal column} for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, those commands always move to this column in each line moved into, or as close as possible given the contents of the line. This goal column remains in effect until canceled. -@item C-u C-x C-n +@c @item C-u C-x C-n +@item C-u M-x set-goal-column Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} once again try to avoid changing the horizontal position, as usual. @end table @vindex track-eol If you set the variable @code{track-eol} to a non-@code{nil} value, -@kbd{C-n} and @kbd{C-p} move to the end of the line when at the end of -the starting line. By default, @code{track-eol} is @code{nil}. +then @kbd{C-n} and @kbd{C-p} when at the end of the starting line move +to the end of another line. Normally, @code{track-eol} is @code{nil}. +@xref{Variables}, for how to set variables such as @code{track-eol}. + +@vindex next-line-add-newlines + Normally, @kbd{C-n} on the last line of a buffer appends a newline to +it. If the variable @code{next-line-add-newlines} is @code{nil}, then +@kbd{C-n} gets an error instead (like @kbd{C-p} on the first line). +@node Erasing, Basic Files, Moving Point, Basic @section Erasing Text @table @kbd @item @key{DEL} -Delete the character before the cursor (@code{delete-backward-char}). +Delete the character before or after point +(@code{backward-or-forward-delete-char}). You can customize +this behavior by setting the variable @code{delete-key-deletes-forward}. @item C-d -Delete the character after the cursor (@code{delete-char}). +Delete the character after point (@code{delete-char}). @item C-k Kill to the end of the line (@code{kill-line}). @item M-d @@ -218,30 +280,34 @@ Kill back to the beginning of the previous word (@code{backward-kill-word}). @end table - In contrast to the @key{DEL} key, which deletes the character before -the cursor, @kbd{Control-d} deletes the character after the cursor, -causing the rest of the text on the line to shift left. If -@kbd{Control-d} is typed at the end of a line, that line and the next -line are joined. - - To erase a larger amount of text, use @kbd{Control-k}, which kills a -line at a time. If you use @kbd{C-k} at the beginning or in the middle -of a line, it kills all the text up to the end of the line. If you use -@kbd{C-k} at the end of a line, it joins that line and the next -line. +@cindex killing characters and lines +@cindex deleting characters and lines +@cindex erasing characters and lines + You already know about the @key{DEL} key which deletes the character +before point (that is, before the cursor). Another key, @kbd{Control-d} +(@kbd{C-d} for short), deletes the character after point (that is, the +character that the cursor is on). This shifts the rest of the text on +the line to the left. If you type @kbd{C-d} at the end of a line, it +joins together that line and the next line. + + To erase a larger amount of text, use the @kbd{C-k} key, which kills a +line at a time. If you type @kbd{C-k} at the beginning or middle of a +line, it kills all the text up to the end of the line. If you type +@kbd{C-k} at the end of a line, it joins that line and the next line. @xref{Killing}, for more flexible ways of killing text. +@node Basic Files, Basic Help, Erasing, Basic @section Files @cindex files - The commands above are sufficient for creating and altering text in an -Emacs buffer. More advanced Emacs commands just make things easier. But -to keep any text permanently you must put it in a @dfn{file}. Files are -named units of text which are stored by the operating system and which -you can retrieve by name. To look at or use the contents of a file in -any way, including editing the file with Emacs, you must specify the -file name. + The commands described above are sufficient for creating and altering +text in an Emacs buffer; the more advanced Emacs commands just make +things easier. But to keep any text permanently you must put it in a +@dfn{file}. Files are named units of text which are stored by the +operating system for you to retrieve later by name. To look at or use +the contents of a file in any way, including editing the file with +Emacs, you must specify the file name. Consider a file named @file{/usr/rms/foo.c}. To begin editing this file from Emacs, type: @@ -251,54 +317,51 @@ C-x C-f /usr/rms/foo.c @key{RET} @end example @noindent -The file name is given as an @dfn{argument} to the command @kbd{C-x -C-f} (@code{find-file}). The command uses the @dfn{minibuffer} to -read the argument. You have to type @key{RET} to terminate the argument -(@pxref{Minibuffer}).@refill +Here the file name is given as an @dfn{argument} to the command @kbd{C-x +C-f} (@code{find-file}). That command uses the @dfn{minibuffer} to +read the argument, and you type @key{RET} to terminate the argument +(@pxref{Minibuffer}). You can also use the @b{Open...} menu item from the @b{File} menu, then type the name of the file to the prompt. - Emacs obeys the command by @dfn{visiting} the file: it creates a -buffer, copies the contents of the file into the buffer, and then -displays the buffer for you to edit. You can make changes in the -buffer, and then @dfn{save} the file by typing @kbd{C-x C-s} -(@code{save-buffer}) or choosing @b{Save Buffer} from the @b{File} menu. -This makes the changes permanent by copying the altered contents of the -buffer back into the file @file{/usr/rms/foo.c}. Until then, the -changes are only inside your Emacs buffer, and the file @file{foo.c} is -not changed.@refill + Emacs obeys the command by @dfn{visiting} the file: creating a buffer, +copying the contents of the file into the buffer, and then displaying +the buffer for you to edit. If you alter the text, you can @dfn{save} +the new text in the file by typing @kbd{C-x C-s} (@code{save-buffer}) or +choosing @b{Save Buffer} from the @b{File} menu. This makes the changes +permanent by copying the altered buffer contents back into the file +@file{/usr/rms/foo.c}. Until you save, the changes exist only inside +Emacs, and the file @file{foo.c} is unaltered. To create a file, visit the file with @kbd{C-x C-f} as if it already existed or choose @b{Open...} from the @b{File} menu and provide the -name for the new file in the minibuffer. Emacs will create an empty -buffer in which you can insert the text you want to put in the file. -When you save the buffer with @kbd{C-x C-s}, or by choosing @b{Save -Buffer} from the @b{File} menu, the file is created. +name for the new file. Emacs will create an empty buffer in which you +can insert the text you want to put in the file. When you save the +buffer with @kbd{C-x C-s}, or by choosing @b{Save Buffer} from the +@b{File} menu, the file is created. - To learn more about using files, @pxref{Files}. + To learn more about using files, @xref{Files}. +@node Basic Help, Blank Lines, Basic Files, Basic @section Help - If you forget what a key does, you can use the Help character -(@kbd{C-h}) to find out: Type @kbd{C-h k} followed by the key you want -to know about. For example, @kbd{C-h k C-n} tells you what @kbd{C-n} +@cindex getting help with keys + If you forget what a key does, you can find out with the Help +character, which is @kbd{C-h} (or @key{F1}, which is an alias for +@kbd{C-h}). Type @kbd{C-h k} followed by the key you want to know +about; for example, @kbd{C-h k C-n} tells you all about what @kbd{C-n} does. @kbd{C-h} is a prefix key; @kbd{C-h k} is just one of its subcommands (the command @code{describe-key}). The other subcommands of -@kbd{C-h} provide different kinds of help. Type @kbd{C-h} three times -to get a description of all the help facilities. @xref{Help}.@refill - -@menu -* Blank Lines:: Commands to make or delete blank lines. -* Continuation Lines:: Lines too wide for the frame. -* Position Info:: What page, line, row, or column is point on? -* Arguments:: Numeric arguments for repeating a command. -@end menu +@kbd{C-h} provide different kinds of help. Type @kbd{C-h} twice to get +a description of all the help facilities. @xref{Help}. -@node Blank Lines, Continuation Lines, Basic, Basic +@node Blank Lines, Continuation Lines, Basic Help, Basic @section Blank Lines - Here are special commands and techniques for entering and removing +@cindex inserting blank lines +@cindex deleting blank lines + Here are special commands and techniques for putting in and taking out blank lines. @c widecommands @@ -315,55 +378,65 @@ Delete all but one of many consecutive blank lines @cindex blank lines @findex open-line @findex delete-blank-lines - When you want to insert a new line of text before an existing line, -you just type the new line of text, followed by @key{RET}. If you -prefer to create a blank line first and then insert the desired text, -use the key @kbd{C-o} (@code{open-line}), which inserts a newline after -point but leaves point in front of the newline. Then type -the text into the new line. @kbd{C-o F O O} has the same effect as -@kbd{F O O @key{RET}}, except for the final location of point. - - To create several blank lines, type @kbd{C-o} several times, or -give @kbd{C-o} an argument indicating how many blank lines to create. -@xref{Arguments}, for more information. - - If you have many blank lines in a row and want to get rid of them, use -@kbd{C-x C-o} (@code{delete-blank-lines}). If point is on a blank -line which is adjacent to at least one other blank line, @kbd{C-x C-o} -deletes all but one of the blank lines. -If point is on a blank line with no other adjacent blank line, the -sole blank line is deleted. If point is on a non-blank -line, @kbd{C-x C-o} deletes any blank lines following that non-blank -line. + When you want to insert a new line of text before an existing line, you +can do it by typing the new line of text, followed by @key{RET}. +However, it may be easier to see what you are doing if you first make a +blank line and then insert the desired text into it. This is easy to do +using the key @kbd{C-o} (@code{open-line}), which inserts a newline +after point but leaves point in front of the newline. After @kbd{C-o}, +type the text for the new line. @kbd{C-o F O O} has the same effect as +@w{@kbd{F O O @key{RET}}}, except for the final location of point. + + You can make several blank lines by typing @kbd{C-o} several times, or +by giving it a numeric argument to tell it how many blank lines to make. +@xref{Arguments}, for how. If you have a fill prefix, then @kbd{C-o} +command inserts the fill prefix on the new line, when you use it at the +beginning of a line. @xref{Fill Prefix}. + + The easy way to get rid of extra blank lines is with the command +@kbd{C-x C-o} (@code{delete-blank-lines}). @kbd{C-x C-o} in a run of +several blank lines deletes all but one of them. @kbd{C-x C-o} on a +solitary blank line deletes that blank line. When point is on a +nonblank line, @kbd{C-x C-o} deletes any blank lines following that +nonblank line. @node Continuation Lines, Position Info, Blank Lines, Basic @section Continuation Lines @cindex continuation line - If you add too many characters to one line without breaking with a -@key{RET}, the line grows to occupy two (or more) screen lines, with a -curved arrow at the extreme right margin of all but the last line. The -curved arrow indicates that the following screen line is not really a -distinct line in the text, but just the @dfn{continuation} of a line too -long to fit the frame. You can use Auto Fill mode (@pxref{Filling}) -to have Emacs insert newlines automatically when a line gets too long. - +@cindex wrapping +@cindex line wrapping + If you add too many characters to one line without breaking it with +@key{RET}, the line will grow to occupy two (or more) lines on the +screen, with a curved arrow at the extreme right margin of all but the +last of them. The curved arrow says that the following screen line is +not really a distinct line in the text, but just the @dfn{continuation} +of a line too long to fit the screen. Continuation is also called +@dfn{line wrapping}. + + Sometimes it is nice to have Emacs insert newlines automatically when +a line gets too long. Continuation on the screen does not do that. Use +Auto Fill mode (@pxref{Filling}) if that's what you want. @vindex truncate-lines @cindex truncation Instead of continuation, long lines can be displayed by @dfn{truncation}. This means that all the characters that do not fit in the width of the frame or window do not appear at all. They remain in the buffer, -temporarily invisible. Three diagonal dots in the last column (instead of -the curved arrow inform you that truncation is in effect. +temporarily invisible. Right arrow in the last column (instead of the +curved arrow) inform you that truncation is in effect. + + Truncation instead of continuation happens whenever horizontal +scrolling is in use, and optionally in all side-by-side windows +(@pxref{Windows}). You can enable truncation for a particular buffer by +setting the variable @code{truncate-lines} to non-@code{nil} in that +buffer. (@xref{Variables}.) Altering the value of +@code{truncate-lines} makes it local to the current buffer; until that +time, the default value is in effect. The default is initially +@code{nil}. @xref{Locals}. - To turn off continuation for a particular buffer, set the -variable @code{truncate-lines} to non-@code{nil} in that buffer. -Truncation instead of continuation also happens whenever horizontal -scrolling is in use, and optionally whenever side-by-side windows are in -use (@pxref{Windows}). Altering the value of @code{truncate-lines} makes -it local to the current buffer; until that time, the default value is in -effect. The default is initially @code{nil}. @xref{Locals}.@refill + @xref{Display Vars}, for additional variables that affect how text is +displayed. @node Position Info, Arguments, Continuation Lines, Basic @section Cursor Position Information @@ -380,9 +453,12 @@ information, it is not displayed all the time. Print page number of point, and line number within page. @item M-x what-line Print line number of point in the buffer. +@item M-x line-number-mode +Toggle automatic display of current line number. @item M-= -Print number of lines and characters in the current region -(@code{count-lines-region}). +Print number of lines and characters in the current region +(@code{count-lines-region}). @xref{Mark}, for information about the +region. @item C-x = Print character code of character after point, character position of point, and column of point (@code{what-cursor-position}). @@ -396,6 +472,7 @@ point, and column of point (@code{what-cursor-position}). @findex count-lines-region There are several commands for printing line numbers: + @itemize @bullet @item @kbd{M-x what-line} counts lines from the beginning of the file and @@ -407,26 +484,28 @@ goto-line}. counts lines within the page, printing both of them. @xref{Pages}, for the command @kbd{C-x l}, which counts the lines in the current page. @item -@kbd{M-=} (@code{count-lines-region}) prints the number of lines in -the region (@pxref{Mark}). +@kbd{M-=} (@code{count-lines-region}) prints the number of lines in the +region (@pxref{Mark}). @xref{Pages}, for the command @kbd{C-x l} which +counts the lines in the @end itemize @kindex C-x = @findex what-cursor-position - The command @kbd{C-x =} (@code{what-cursor-position}) provides -information about point and about the column the cursor is in. -It prints a line in the echo area that looks like this: + The command @kbd{C-x =} (@code{what-cursor-position}) can be used to find out +the column that the cursor is in, and other miscellaneous information about +point. It prints a line in the echo area that looks like this: @example -Char: x (0170) point=65986 of 563027(12%) column 44 +Char: c (0143, 99, 0x63) point=18862 of 24800(76%) column 53 @end example @noindent -(In fact, this is the output produced when point is before @samp{column 44} -in the example.) +(In fact, this is the output produced when point is before @samp{column +53} in the example.) - The two values after @samp{Char:} describe the character following point, -first by showing it and second by giving its octal character code. + The four values after @samp{Char:} describe the character that follows +point, first by showing it and then by giving its character code in +octal, decimal and hex. @samp{point=} is followed by the position of point expressed as a character count. The front of the buffer counts as position 1, one character later @@ -434,8 +513,8 @@ as 2, and so on. The next, larger number is the total number of characters in the buffer. Afterward in parentheses comes the position expressed as a percentage of the total size. - @samp{column} is followed by the horizontal position of point, in columns -from the left edge of the window. + @samp{column} is followed by the horizontal position of point, in +columns from the left edge of the window. If the buffer has been narrowed, making some of the text at the beginning and the end temporarily invisible, @kbd{C-x =} prints @@ -443,7 +522,7 @@ additional text describing the current visible range. For example, it might say: @smallexample -Char: x (0170) point=65986 of 563025(12%) <65102 - 68533> column 44 +Char: c (0143, 99, 0x63) point=19674 of 24575(80%) <19591 - 19703> column 69 @end smallexample @noindent @@ -463,12 +542,15 @@ point=563026 of 563025(100%) column 0 @section Numeric Arguments @cindex numeric arguments - Any Emacs command can be given a @dfn{numeric argument}. Some commands -interpret the argument as a repetition count. For example, giving an -argument of ten to the key @kbd{C-f} (the command @code{forward-char}, move -forward one character) moves forward ten characters. With these commands, -no argument is equivalent to an argument of one. Negative arguments are -allowed. Often they tell a command to move or act backwards. + In mathematics and computer usage, the word @dfn{argument} means +``data provided to a function or operation.'' Any Emacs command can be +given a @dfn{numeric argument} (also called a @dfn{prefix argument}). +Some commands interpret the argument as a repetition count. For +example, giving an argument of ten to the key @kbd{C-f} (the command +@code{forward-char}, move forward one character) moves forward ten +characters. With these commands, no argument is equivalent to an +argument of one. Negative arguments are allowed. Often they tell a +command to move or act in the opposite direction. @kindex M-1 @kindex M-@t{-} @@ -482,18 +564,21 @@ minus sign while holding down the @key{META} key. For example, M-5 C-n @end example @noindent -moves down five lines. The characters @kbd{Meta-1}, @kbd{Meta-2}, and -so on, as well as @kbd{Meta--}, do this because they are keys bound to -commands (@code{digit-argument} and @code{negative-argument}) that are -defined to contribute to an argument for the next command. +would move down five lines. The characters @kbd{Meta-1}, @kbd{Meta-2}, +and so on, as well as @kbd{Meta--}, do this because they are keys bound +to commands (@code{digit-argument} and @code{negative-argument}) that +are defined to contribute to an argument for the next command. Digits +and @kbd{-} modified with Control, or Control and Meta, also specify +numeric arguments. @kindex C-u @findex universal-argument Another way of specifying an argument is to use the @kbd{C-u} -(@code{universal-argument}) command followed by the digits of the argument. -With @kbd{C-u}, you can type the argument digits without holding -down shift keys. To type a negative argument, start with a minus sign. -Just a minus sign normally means @minus{}1. @kbd{C-u} works on all terminals. +(@code{universal-argument}) command followed by the digits of the +argument. With @kbd{C-u}, you can type the argument digits without +holding down modifier keys; @kbd{C-u} works on all terminals. To type a +negative argument, type a minus sign after @kbd{C-u}. Just a minus sign +without digits normally means @minus{}1. @kbd{C-u} followed by a character which is neither a digit nor a minus sign has the special meaning of ``multiply by four''. It multiplies the @@ -503,7 +588,7 @@ is a good way to move forward ``fast'', since it moves about 1/5 of a line in the usual size frame. Other useful combinations are @kbd{C-u C-n}, @kbd{C-u C-u C-n} (move down a good fraction of a frame), @kbd{C-u C-u C-o} (make ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four -lines).@refill +lines). Some commands care only about whether there is an argument and not about its value. For example, the command @kbd{M-q} (@code{fill-paragraph}) with @@ -519,32 +604,47 @@ special: it kills the text up to the next newline, or, if point is right at the end of the line, it kills the newline itself. Thus, two @kbd{C-k} commands with no arguments can kill a non-blank line, just like @kbd{C-k} with an argument of one. (@xref{Killing}, for more information on -@kbd{C-k}.)@refill +@kbd{C-k}.) A few commands treat a plain @kbd{C-u} differently from an ordinary argument. A few others may treat an argument of just a minus sign -differently from an argument of @minus{}1. These unusual cases will be -described when they come up; they are always to make the individual -command more convenient to use. +differently from an argument of @minus{}1. These unusual cases are +described when they come up; they are always for reasons of convenience +of use of the individual command. + + You can use a numeric argument to insert multiple copies of a +character. This is straightforward unless the character is a digit; for +example, @kbd{C-u 6 4 a} inserts 64 copies of the character @samp{a}. +But this does not work for inserting digits; @kbd{C-u 6 4 1} specifies +an argument of 641, rather than inserting anything. To separate the +digit to insert from the argument, type another @kbd{C-u}; for example, +@kbd{C-u 6 4 C-u 1} does insert 64 copies of the character @samp{1}. + + We use the term ``prefix argument'' as well as ``numeric argument'' to +emphasize that you type the argument before the command, and to +distinguish these arguments from minibuffer arguments that come after +the command. -@c section Autoarg Mode @ignore -@cindex autoarg mode - Users of ASCII keyboards may prefer to use Autoarg mode. Autoarg mode -means that you don't need to type @kbd{C-u} to specify a numeric argument. -Instead, you type just the digits. Digits followed by an ordinary -inserting character are themselves inserted, but digits followed by an -Escape or Control character serve as an argument to it and are not -inserted. A minus sign can also be part of an argument, but only at the -beginning. If you type a minus sign following some digits, both the digits -and the minus sign are inserted. - - To use Autoarg mode, set the variable Autoarg Mode nonzero. -@xref{Variables}. - - Autoargument digits echo at the bottom of the frame; the first -nondigit causes them to be inserted or uses them as an argument. To -insert some digits and nothing else, you must follow them with a Space -and then rub it out. @kbd{C-g} cancels the digits, while Delete inserts -them all and then rubs out the last. +@node Repeating +@section Repeating a Command +@cindex repeating a command + +@kindex C-x z +@findex repeat + The command @kbd{C-x z} (@code{repeat}) provides another way to repeat +an Emacs command many times. This command repeats the previous Emacs +command, whatever that was. Repeating a command uses the same arguments +that were used before; it does not read new arguments each time. + + To repeat the command more than once, type additional @kbd{z}'s: each +@kbd{z} repeats the command one more time. Repetition ends when you +type a character other than @kbd{z}, or press a mouse button. + + For example, suppose you type @kbd{C-u 2 0 C-d} to delete 20 +characters. You can repeat that command (including its argument) three +additional times, to delete a total of 80 characters, by typing @kbd{C-x +z z z}. The first @kbd{C-x z} repeats the command once, and each +subsequent @kbd{z} repeats it once again. + @end ignore diff --git a/man/xemacs/entering.texi b/man/xemacs/entering.texi index 2c9b33c..00d45ae 100644 --- a/man/xemacs/entering.texi +++ b/man/xemacs/entering.texi @@ -1,53 +1,91 @@ - +@c This is part of the XEmacs manual. +@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995 Free Software Foundation, Inc. +@c See file xemacs.texi for copying conditions. @node Entering Emacs, Exiting, Pull-down Menus, Top @chapter Entering and Exiting Emacs -@cindex entering Emacs @cindex entering XEmacs +@cindex starting XEmacs - The usual way to invoke Emacs is to type @kbd{emacs @key{RET}} at the -shell (for XEmacs, type @kbd{xemacs @key{RET}}). Emacs clears the -screen and then displays an initial advisory message and copyright -notice. You can begin typing Emacs commands immediately afterward. + The usual way to invoke XEmacs is to type @kbd{xemacs @key{RET}} at +the shell. XEmacs clears the screen and then displays an initial +advisory message and copyright notice. You can begin typing XEmacs +commands immediately afterward. - Some operating systems insist on discarding all type-ahead when Emacs -starts up; they give Emacs no way to prevent this. Therefore, it is -wise to wait until Emacs clears the screen before typing the first + Some operating systems insist on discarding all type-ahead when XEmacs +starts up; they give XEmacs no way to prevent this. Therefore, it is +advisable to wait until XEmacs clears the screen before typing your first editing command. + If you run XEmacs from a shell window under the X Window System, run it +in the background with @samp{xemacs&}. This way, XEmacs does not tie up +the shell window, so you can use that to run other shell commands while +XEmacs operates its own X windows. You can begin typing XEmacs commands +as soon as you direct your keyboard input to the XEmacs frame. + @vindex initial-major-mode Before Emacs reads the first command, you have not had a chance to -give a command to specify a file to edit. Since Emacs must always have a -current buffer for editing, it presents a buffer, by default, a buffer named -@samp{*scratch*}. The buffer is in Lisp Interaction -mode; you can use it to type Lisp expressions and evaluate them, or you -can ignore that capability and simply doodle. You can specify a -different major mode for this buffer by setting the variable -@code{initial-major-mode} in your init file. @xref{Init File}. +give a command to specify a file to edit. Since Emacs must always have +a current buffer for editing, it presents a buffer, by default, a buffer +named @samp{*scratch*}. The buffer is in Lisp Interaction mode; you can +use it to type Lisp expressions and evaluate them, or you can ignore +that capability and simply doodle. (You can specify a different major +mode for this buffer by setting the variable @code{initial-major-mode} +in your init file. @xref{Init File}.) + + It is possible to specify files to be visited, Lisp files to be +loaded, and functions to be called, by giving Emacs arguments in the +shell command line. @xref{Command Switches}. But we don't recommend +doing this. The feature exists mainly for compatibility with other +editors. - It is possible to give Emacs arguments in the shell command line to -specify files to visit, Lisp files to load, and functions to call. + Many other editors are designed to be started afresh each time you +want to edit. You edit one file and then exit the editor. The next +time you want to edit either another file or the same one, you must run +the editor again. With these editors, it makes sense to use a +command-line argument to say which file to edit. + + But starting a new Emacs each time you want to edit a different file +does not make sense. For one thing, this would be annoyingly slow. For +another, this would fail to take advantage of Emacs's ability to visit +more than one file in a single editing session. And it would lose the +other accumulated context, such as registers, undo history, and the mark +ring. + + The recommended way to use XEmacs is to start it only once, just +after you log in, and do all your editing in the same Emacs session. +Each time you want to edit a different file, you visit it with the +existing Emacs, which eventually comes to have many files in it ready +for editing. Usually you do not kill the Emacs until you are about to +log out. @xref{Files}, for more information on visiting more than one +file. @node Exiting, Command Switches, Entering Emacs, Top @section Exiting Emacs @cindex exiting @cindex killing Emacs @cindex suspending +@cindex leaving Emacs +@cindex quitting Emacs @cindex shrinking XEmacs frame There are two commands for exiting Emacs because there are two kinds of exiting: @dfn{suspending} Emacs and @dfn{killing} Emacs. -@dfn{Suspending} means stopping Emacs temporarily and returning control -to its superior (usually the shell), allowing you to resume editing -later in the same Emacs job, with the same files, same kill ring, same -undo history, and so on. This is the usual way to exit. @dfn{Killing} -Emacs means destroying the Emacs job. You can run Emacs again later, -but you will get a fresh Emacs; there is no way to resume the same -editing session after it has been killed. + + @dfn{Suspending} means stopping Emacs temporarily and returning +control to its parent process (usually a shell), allowing you to resume +editing later in the same Emacs job, with the same buffers, same kill +ring, same undo history, and so on. This is the usual way to exit. + + @dfn{Killing} Emacs means destroying the Emacs job. You can run Emacs +again later, but you will get a fresh Emacs; there is no way to resume +the same editing session after it has been killed. @table @kbd @item C-z -Suspend Emacs (@code{suspend-emacs}). If used under the X window system, -shrink the X window containing the Emacs frame to an icon (see below). +Suspend Emacs or iconify a frame +(@code{suspend-emacs-or-iconify-frame}). If used under the X window +system, shrink the X window containing the Emacs frame to an icon (see +below). @item C-x C-c Kill Emacs (@code{save-buffers-kill-emacs}). @end table @@ -56,45 +94,68 @@ If you use XEmacs under the X window system, @kbd{C-z} shrinks the X window containing the Emacs frame to an icon. The Emacs process is stopped temporarily, and control is returned to the window manager. If more than one frame is associated with the Emacs process, only the -frame from which you used @kbd{C-z} is retained. The X windows -containing the other Emacs frames are closed. +frame from which you used @kbd{C-z} is iconified. To activate the "suspended" Emacs, use the appropriate window manager mouse gestures. Usually left-clicking on the icon reactivates and reopens the X window containing the Emacs frame, but the window manager you use determines what exactly happens. To actually kill the Emacs -process, use @kbd{C-x C-c} or the @b{Exit Emacs} item on the @b{File} +process, use @kbd{C-x C-c} or the @b{Exit XEmacs} item on the @b{File} menu. @kindex C-z @findex suspend-emacs - On systems that do not permit programs to be suspended, @kbd{C-z} runs -an inferior shell that communicates directly with the terminal, and -Emacs waits until you exit the subshell. On these systems, the only way -to return to the shell from which Emacs was started (to log out, for -example) is to kill Emacs. @kbd{C-d} or @code{exit} are typical -commands to exit a subshell. + To suspend Emacs, type @kbd{C-z} (@code{suspend-emacs}). This takes +you back to the shell from which you invoked Emacs. You can resume +Emacs with the shell command @samp{%xemacs} in most common shells. + + On systems that do not support suspending programs, @kbd{C-z} starts +an inferior shell that communicates directly with the terminal. +Emacs waits until you exit the subshell. (The way to do that is +probably with @kbd{C-d} or @samp{exit}, but it depends on which shell +you use.) The only way on these systems to get back to the shell from +which Emacs was run (to log out, for example) is to kill Emacs. + + Suspending also fails if you run Emacs under a shell that doesn't +support suspending programs, even if the system itself does support it. +In such a case, you can set the variable @code{cannot-suspend} to a +non-@code{nil} value to force @kbd{C-z} to start an inferior shell. +(One might also describe Emacs's parent shell as ``inferior'' for +failing to support job control properly, but that is a matter of taste.) + + When Emacs communicates directly with an X server and creates its own +dedicated X windows, @kbd{C-z} has a different meaning. Suspending an +applications that uses its own X windows is not meaningful or useful. +Instead, @kbd{C-z} runs the command @code{iconify-or-deiconify-frame}, +which temporarily closes up the selected Emacs frame. +The way to get back to a shell window is with the window manager. @kindex C-x C-c @findex save-buffers-kill-emacs To kill Emacs, type @kbd{C-x C-c} (@code{save-buffers-kill-emacs}). A -two-character key is used for this to make it harder to type. In -XEmacs, selecting the @b{Exit Emacs} option of the @b{File} menu is an -alternate way of issuing the command. +two-character key is used for this to make it harder to type. Selecting +the @b{Exit XEmacs} option of the @b{File} menu is an alternate way of +issuing the command. Unless a numeric argument is used, this command first offers to save any -modified buffers. If you do not save all buffers, you are asked for -reconfirmation with @kbd{yes} before killing Emacs, since any changes -not saved will be lost. If any subprocesses are still running, @kbd{C-x -C-c} asks you to confirm killing them, since killing Emacs kills the -subprocesses simultaneously. - - In most programs running on Unix, certain characters may instantly -suspend or kill the program. (In Berkeley Unix these characters are -normally @kbd{C-z} and @kbd{C-c}.) @i{This Unix feature is turned off -while you are in Emacs.} The meanings of @kbd{C-z} and @kbd{C-x C-c} as -keys in Emacs were inspired by the standard Berkeley Unix meanings of -@kbd{C-z} and @kbd{C-c}, but that is their only relationship with Unix. -You could customize these keys to do anything (@pxref{Keymaps}). - -@c ??? What about system V here? +modified file-visiting buffers. If you do not save all buffers, you are +asked for reconfirmation with @kbd{yes} before killing Emacs, since any +changes not saved will be lost forever. If any subprocesses are still +running, @kbd{C-x C-c} asks you to confirm killing them, since killing +Emacs will kill the subprocesses immediately. + + There is no way to restart an Emacs session once you have killed it. +You can, however, arrange for Emacs to record certain session +information, such as which files are visited, when you kill it, so that +the next time you restart Emacs it will try to visit the same files and +so on. +@c @xref{Saving Emacs Sessions}. + + The operating system usually listens for certain special characters +whose meaning is to kill or suspend the program you are running. +@b{This operating system feature is turned off while you are in Emacs.} +The meanings of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were +inspired by the use of @kbd{C-z} and @kbd{C-c} on several operating +systems as the characters for stopping or killing a program, but that is +their only relationship with the operating system. You can customize +these keys to run any commands of your choice (@pxref{Keymaps}). diff --git a/man/xemacs/mini.texi b/man/xemacs/mini.texi index 3d75b35..3976ba6 100644 --- a/man/xemacs/mini.texi +++ b/man/xemacs/mini.texi @@ -135,7 +135,10 @@ argument. @xref{Windows}. however. You cannot switch buffers in it---the minibuffer and its window are permanently attached. Also, you cannot split or kill the minibuffer window. But you can make it taller in the normal fashion with -@kbd{C-x ^}. +@kbd{C-x ^}. If you enable Resize-Minibuffer mode, then the +minibuffer window expands vertically as necessary to hold the text that +you put in the minibuffer. Use @kbd{M-x resize-minibuffer-mode} to +enable or disable this minor mode (@pxref{Minor Modes}). @kindex C-M-v If while in the minibuffer you issue a command that displays help text @@ -227,7 +230,7 @@ possibilities for the very next character---it could be any of @samp{c-}---so no more characters are added; instead, @key{TAB} displays a list of all possible completions in another window. - If you go on to type @kbd{f @key{TAB}}, this @key{TAB} sees + If you go on to type @kbd{-f @key{TAB}}, this @key{TAB} sees @samp{auto-f}. The only command name starting this way is @code{auto-fill-mode}, so completion fills in the rest of that. You now have @samp{auto-fill-mode} in the minibuffer after typing just @kbd{au @@ -285,6 +288,15 @@ completions chooses that completion (@code{mouse-choose-completion}). You normally use this command while point is in the minibuffer; but you must click in the list of completions, not in the minibuffer itself. +@findex switch-to-completions +@item @key{PRIOR} +@itemx M-v +Typing @key{PRIOR} or @kbd{M-v}, while in the minibuffer, selects the +window showing the completion list buffer +(@code{switch-to-completions}). This paves the way for using the +commands below. (Selecting that window in the usual ways has the same +effect, but this way is more convenient.) + @findex choose-completion @item @key{RET} Typing @key{RET} @emph{in the completion list buffer} chooses the @@ -375,6 +387,12 @@ then in contexts where @code{completing-read} allows answers that are not valid completions, an extra @key{RET} must be typed to confirm the response. This is helpful for catching typos. +@cindex Icomplete mode + Icomplete mode presents a constantly-updated display that tells you +what completions are available for the text you've entered so far. The +command to enable or disable this minor mode is @kbd{M-x +icomplete-mode}. + @node Minibuffer History, Repetition, Completion, Minibuffer @section Minibuffer History @cindex minibuffer history @@ -479,11 +497,11 @@ the command name. @item C-x @key{ESC} @key{ESC} Re-execute a recent minibuffer command (@code{repeat-complex-command}). @item M-p -Within @kbd{C-x @key{ESC}}, move to previous recorded command +Within @kbd{C-x @key{ESC} @key{ESC}}, move to previous recorded command (@code{previous-history-element}). @item M-n -Within @kbd{C-x @key{ESC}}, move to the next (more recent) recorded -command (@code{next-history-element}). +Within @kbd{C-x @key{ESC} @key{ESC}}, move to the next (more recent) +recorded command (@code{next-history-element}). @item M-x list-command-history Display the entire command history, showing all the commands @kbd{C-x @key{ESC} @key{ESC}} can repeat, most recent first. diff --git a/man/xemacs/startup.texi b/man/xemacs/startup.texi index 263feb5..3fca5ee 100644 --- a/man/xemacs/startup.texi +++ b/man/xemacs/startup.texi @@ -158,16 +158,6 @@ variable @code{INFOPATH} @vindex INFOPATH to @code{Info-directory-list}. -@item lock-directory -@itemx superlock-file -@vindex lock-directory -@vindex superlock-file -Are the site-specific locations of the lock directory and the superlock -file, respectively. The @code{lock-directory} variable may also be -initialized from the @code{EMACSLOCKDIR} -@vindex EMACSLOCKDIR -environment variable. - @item exec-directory @vindex exec-directory Is the directory of architecture-dependent files that come with XEmacs, diff --git a/nt/ChangeLog b/nt/ChangeLog index b8bbb4d..3d55b83 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,11 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + +2000-05-12 Craig Lanning + + * inc\sys\socket.h: Don't define timeval as ws_timeval for mingw32 + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/src/ChangeLog b/src/ChangeLog index da05b2f..7d4753c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,875 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + +2000-05-22 Jan Vroonhof + + * redisplay.c (VERTICAL_CLIP): No longer reset when updating line + start cache. + (updating_line_start_cache): Gone. + (regenerate_window): Replace resetting of VERTICAL_CLIP by + generic code to force a minimum of 1 line laid out in the + CMOTION_DISP case. + +2000-05-22 Jan Vroonhof + + * glyphs.c (instantiate_image_instantiator): Check for initialized + height & width no longer special cases IMAGE_NOTHING. + (nothing_instantiate): Set height and width of instance. + +2000-05-24 Yoshiki Hayashi + + * unexelf.c (unexec): Search for ".data" section. + Initialize new_data2_offset from old_data_index. + Remove redundant check for ElfW. + +2000-05-23 Andy Piper + + * glyphs.c (get_image_instantiator_governing_domain): allow more + specific domains as the governing domain rather than expecting an + exact match. This fixes problems with layouts. + +2000-05-22 Andy Piper + + * redisplay-output.c (compare_runes): check for non-images + + * glyphs.c (set_glyph_dirty_p): ditto. + (update_glyph_cachel_data): ditto. + + * glyphs-widget.c (layout_post_instantiate): ditto. + (layout_post_instantiate): ditto. + + * event-msw.c (mswindows_wnd_proc): warning removal. + +2000-05-12 Craig Lanning + + * s\mingw32.h: Added #undef for CLASH_DETECTION. + + * syswindows.h: Moved PBS_SMOOTH definition to syscommctrl.h. + + * syscommctrl.h (PBS_SMOOTH): Moved from syswindows.h. + + * nt.c (rva_to_section): mingw32 needs rva_to_section. + (mswindows_executable_type): mingw32 now has enough headers for + this to work. + +2000-05-20 Andy Piper + + * console-msw.c (mswindows_output_last_error): ; -> , + +2000-05-12 Andy Piper + + * console-msw.c (FROB): compare ints with ints. + +2000-05-11 Andy Piper + + * glyphs-x.c (x_finalize_image_instance): make minimal build + happy. + +2000-05-20 Ben Wing + + * event-Xt.c: + * event-Xt.c (vars_of_event_Xt): + move modifier-keys-are-sticky to event-stream.c. + + * event-msw.c: + * event-msw.c (mswindows_enqueue_mouse_button_event): + * event-msw.c (key_needs_default_processing_p): + * event-msw.c (XEMSW_LCONTROL): + * event-msw.c (mswindows_handle_sticky_modifiers): + * event-msw.c (FROB): + * event-msw.c (clear_sticky_modifiers): + * event-msw.c (output_modifier_keyboard_state): + * event-msw.c (output_alt_keyboard_state): + * event-msw.c (mswindows_wnd_proc): + * event-msw.c (mswindows_modifier_state): + * event-msw.c (emacs_mswindows_handle_magic_event): + implement sticky modifiers. + + * event-stream.c: + * event-stream.c (vars_of_event_stream): + move modifier-keys-are-sticky here. + + * lisp.h: + add CHECK_FUNCTION. + + * rangetab.c: + implement map-range-table. + + +2000-05-17 Yoshiki Hayashi + + * redisplay-tty.c (reset_tty_modes): + (tty_redisplay_shutdown): Adjust argument type to + tty_frame_output_end. + +2000-05-11 Yoshiki Hayashi + + * eval.c (Fbacktrace): Don't output a line with only right + parenthesis. + +2000-05-17 Kenji Itoh + + * postgresql.c (Fpq_connect_poll): Replace `PS' with `polling_status'. + (Fpq_reset_poll): Ditto. + +2000-05-16 Katsumi Yamaoka + + * redisplay-tty.c: Replace tty_output_end with tty_frame_output_end. + +2000-05-16 Ben Wing + + * buffer.c: + * buffer.c (dfc_convert_to/from_internal_format): + * buffer.c (reinit_vars_of_buffer): + Fix conversion functions to allow reentrancy. + + * console-msw.c: + * console-msw.c (mswindows_output_last_error): + New fun, generally useful -- output a human-readable + version of GetLastError() on the console. + + * console-msw.h: + * console-msw.h (struct mswindows_frame): + Changes for DeferWindowPos. Declare mswindows_output_last_error(). + + * console-stream.c (stream_output_begin): + * console-stream.c (stream_output_end): + * console-stream.c (stream_output_vertical_divider): + * console-stream.c (stream_clear_region): + * console-stream.c (stream_flash): + * console-stream.c (console_type_create_stream): + Delete blank stream methods, not needed. + + * console.h (struct console_methods): + Split begin/end methods into window and frame. + + * event-msw.c: + * event-msw.c (mswindows_handle_paint): + * event-msw.c (output_alt_keyboard_state): + * event-msw.c (mswindows_wnd_proc): + * event-msw.c (vars_of_event_mswindows): + Comment about problems with ignored-expose. + Define mswindows-debug-events; not really implemented. + + * frame-msw.c (mswindows_init_frame_1): + random cleanups. + + * glyphs-msw.c: + * glyphs-msw.c (begin_defer_window_pos): + * glyphs-msw.c (mswindows_unmap_subwindow): + * glyphs-msw.c (mswindows_map_subwindow): + * glyphs-msw.c (mswindows_resize_subwindow): + Use DeferWindowPos to reduce flashing when mapping/unmapping. + + * glyphs.c (make_image_instance_1): + Fix crash. + + * gutter.c (Fredisplay_gutter_area): + Use new begin/end methods. + + * lisp.h (Dynarr_new2): + New creation fun. + + * redisplay-msw.c: + * redisplay-msw.c (mswindows_frame_output_begin): + * redisplay-msw.c (mswindows_frame_output_end): + * redisplay-msw.c (console_type_create_redisplay_mswindows): + New begin/end methods -- handle DeferWindowPos. + + * redisplay-output.c (redisplay_move_cursor): + * redisplay-output.c (redraw_cursor_in_window): + * redisplay-output.c (redisplay_update_line): + * redisplay-output.c (redisplay_output_window): + New begin/end methods. + + * redisplay-tty.c: + * redisplay-tty.c (tty_frame_output_begin): + * redisplay-tty.c (tty_frame_output_end): + * redisplay-tty.c (console_type_create_redisplay_tty): + New begin/end methods. + + * redisplay-x.c: + * redisplay-x.c (x_window_output_begin): + * redisplay-x.c (x_window_output_end): + * redisplay-x.c (console_type_create_redisplay_x): + New begin/end methods. + + * redisplay.c (redisplay_frame): + * redisplay.c (Fredisplay_echo_area): + New begin/end methods. + use MAYBE_DEVMETH for clear_frame; it may not exist. + + * window.h (WINDOW_XFRAME): + WINDOW_XFOO macros -- get locale and decode struct pointer. + + +2000-05-12 Ben Wing + + * emacs.c: + * emacs.c (ensure_no_quitting_from_now_on): + * emacs.c (fatal_error_signal): + * emacs.c (mswindows_handle_hardware_exceptions): + * emacs.c (main): + * emacs.c (Fkill_emacs): + * emacs.c (shut_down_emacs): + * emacs.c (assert_failed): + various improvements in fatal error handling. + + * eval.c: + move preparing_for_armageddon to emacs.c. + + * lisp.h: + declare fatal_error_in_progress. + + * print.c: + * print.c (std_handle_out_external): + * print.c (std_handle_out_va): + * print.c (stderr_out): + * print.c (stdout_out): + use console under mswin when no standard output. + don't do code conversion during fatal error. + + * scrollbar.c (Fscrollbar_page_up): + * scrollbar.c (Fscrollbar_page_down): + fix missing else. reindent. + +2000-05-11 Jan Vroonhof + + Emergency fix. + + * glyphs.h (GLYPH_CACHEL_DESCENT): + (GLYPH_CACHEL_DESCENT): + (GLYPH_CACHEL_DESCENT): + * glyphs.h (GLYPH_CACHEL_ASCENT): Match parameters to variables + used in case these are inline functions. + Use more absurd values to error check. + + include window.h for error check functions. + +2000-05-11 Ben Wing + + * cmdloop.c (Freally_early_error_handler): + Display message box under windows; otherwise, message will disappear + before it can be viewed. + + * console-msw.c: + * console-msw.c (Fmswindows_message_box): + * console-msw.c (FROB): + * console-msw.c (syms_of_console_mswindows): + Define new fun `mswindows-message-box'. + #### I will merge this into `popup-dialog-box'; just give me + a bit of time. + + * general.c: + * general.c (syms_of_general): + Some new symbols used in `mswindows-message-box'. + + * glyphs.c: + * glyphs.c (Fset_image_instance_property): + put warning in this fun. + + * glyphs.h: + * glyphs.h (GLYPH_CACHEL_WIDTH): + * glyphs.h (GLYPH_CACHEL_ASCENT): + * glyphs.h (GLYPH_CACHEL): + * glyphs.h (GLYPH_CACHEL_GLYPH): + define error-checking versions to try to catch a bug i've seen -- + redisplay gets in an infinite loop because the glyph width of the + continuation glyph is 65535. + + * lisp.h: + Extern message-box stuff. + + * window.c (allocate_window): + * window.c (make_dummy_parent): + * window.c (Fset_window_configuration): + Use EQUAL not EQ for subwindow caches to make them work a bit + better. (Something is still very broken.) + + +2000-05-11 Yoshiki Hayashi + + * glyphs.c (image_instantiate): Suppress gcc warnings. + (Fmake_image_instance): Fix doc string. + * specifier.c (Fmake_specifier): Ditto. + +2000-05-02 Yoshiki Hayashi + + * paths.h.in (PATH_LOCK): Removed. + * config.h.in (LOCKDIR_USER_DEFINED): Removed. + * emacs.c (complex_vars_of_emacs): Remove configure-lock-directory. + +2000-05-08 Yoshiki Hayashi + + * fns.c (Ffeaturep): Update e-mail address in doc-string. + Document (featurep '(and xemacs 21.02)). + +2000-05-09 Ben Wing + + * buffer.c (complex_vars_of_buffer): + update modeline-format doc. + + * device.h: + comment about how DFW_DEVICE should be merged with DOMAIN_DEVICE. + + * emacs.c: + timeline of all released versions of Emacs, for use in creating + authorship comments and in synching up. + + * glyphs-widget.c (image_instantiator_buttons): + * glyphs-widget.c (image_instantiator_edit_fields): + * glyphs-widget.c (image_instantiator_combo_box): + * glyphs-widget.c (image_instantiator_scrollbar): + * glyphs-widget.c (image_instantiator_progress_guage): + * glyphs-widget.c (image_instantiator_tree_view): + * glyphs-widget.c (image_instantiator_tab_control): + * glyphs-widget.c (image_instantiator_labels): + * glyphs-widget.c (image_instantiator_layout): + * glyphs-widget.c (image_instantiator_native_layout): + rename decode_domain method to governing_domain. + + * glyphs.c: + * glyphs.c (Fvalid_image_instantiator_format_p): doc update. + * glyphs.c (add_entry_to_device_ii_format_list): + make sure we don't put an entry more than once into the list. + * glyphs.c (check_instance_cache_mapper): + ************************************************************* + allow for nil. THIS SHOULD FIX A REAL CRASH THAT MANY PEOPLE + HAVE BEEN GETTING. + ************************************************************* + * glyphs.c (get_image_instantiator_governing_domain): + clean up, expand on new concept of governing domain. + * glyphs.c (instantiate_image_instantiator): + * glyphs.c (allocate_image_instance): + use governing_domain instead of cache_domain in naming. + * glyphs.c (Fvalid_image_instance_type_p): fix docs. + * glyphs.c (make_image_instance_1): + * glyphs.c (Fmake_image_instance): + allow for any domain (not just device), and process the + governing domain correctly. very big doc fix. + * glyphs.c (Fimage_instance_domain): + new primitive, to retrieve the governing domain of an image instance. + * glyphs.c (image_instantiate): + use new governing_domain stuff. this fixes a crash you could get + by instantiating certain widget glyphs in frame locales. (should + signal an error instead of crashing.) + * glyphs.c (Fimage_specifier_p): move doc to make-image-specifier. + * glyphs.c (Fglyphp): clean up doc. + * glyphs.c (subwindow_governing_domain): renamed from *_decode_domain. + * glyphs.c (syms_of_glyphs): + declare Fimage_instance_domain, remove unused Qlayout_image_instance_p. + * glyphs.c (image_instantiator_format_create): add some comments about + bogus code. + * glyphs.c (specifier_vars_of_glyphs): totally rewrite the doc string + for current-display-table. (Apparently Hrjove implemented in 1998 a + design I wrote up in 1996, but didn't update the doc string.) + + * glyphs.h: clean up a doc string. + * glyphs.h (governing_domain): + * glyphs.h (struct image_instantiator_methods): + changes for governing_domain stuff. + + * gutter.c: + * gutter.c (Fgutter_specifier_p): + * gutter.c (Fgutter_size_specifier_p): + * gutter.c (Fgutter_visible_specifier_p): + * objects.c: + * objects.c (Fcolor_specifier_p): + * objects.c (Ffont_specifier_p): + * objects.c (Fface_boolean_specifier_p): + doc strings moved to make-*-specifier. + + * redisplay.c (add_disp_table_entry_runes_1): + * redisplay.c (generate_fstring_runes): + * redisplay.c (screen): + add random comments and doc strings. + + * specifier.c: + * specifier.c (Fmake_specifier): + major overhaul of this doc string. + + * specifier.c (Fvalid_specifier_domain_p): + comment about the bogosity of image instances being domains. + * specifier.c (decode_domain): + now non-static, used in glyphs.c. + * specifier.c (specifier_instance): + comment about the bogosity of image instances being domains. + * specifier.c (Fgeneric_specifier_p): + move doc string to make-generic-specifier. + * specifier.c (VALID_SINGLE_DISPTABLE_INSTANTIATOR_P): + rebackslashify. + + * specifier.h: + * specifier.h (DOMAIN_FRAME): + * specifier.h (DOMAIN_LIVE_P): + * specifier.h (DOMAIN_XDEVICE): + rebackslashify. + add comments about problems with these macros. + prototype for decode_domain. + + * toolbar.c: + * toolbar.c (Ftoolbar_specifier_p): + move doc string to `make-toolbar-specifier'. + + * window.c (window_unmap_subwindows_cache_mapper): + ************************************************************* + allow for nil. THIS SHOULD FIX A REAL CRASH THAT MANY PEOPLE + HAVE BEEN GETTING. + ************************************************************* + +2000-05-09 Andy Piper + + * glyphs.h: declare reset_frame_subwindow_instance_cache. + + * window.c (Fset_window_configuration): reset the frame subwindow + cache and re-initialize the window subwindow caches. + + * glyphs.c (reset_frame_subwindow_instance_cache): new function. + +2000-05-09 Ben Wing + + * ntheap.c (recreate_heap): Changed unknown (VC6 only?) SIZE_T to + DWORD. + +2000-04-26 Mike Woolley + + * ntheap.c: Changed recreate_heap to limit the amount reserved + for the heap to that which is actually available. Also now + displays a message box (with some dignostics) in the event that + it still can't start. + +2000-05-07 Jan Vroonhof + + * callproc.c (Fold_call_process_internal): GCPRO path + +2000-05-08 Jan Vroonhof + + Patch by Bill Perry. + + * scrollbar.c (Fscrollbar_page_up): Conditionalize on type of call + back data instead of #ifdef. + (Fscrollbar_page_down): ditto. + +2000-05-07 Ben Wing + + * buffer.h: + Kludge for defining Qmswindows_tstr. + + * nt.c: + * nt.c (open_input_file): + * nt.c (open_output_file): + * nt.c (rva_to_section): + * nt.c (mswindows_executable_type): + Move all memory-mapped-file routines here (some were in unexnt.c, + which is bad because they are used by process-nt.c, and unexnt + won't be around when portable dumping). Synched the above routines + with FSF 20.6. + + * nt.h: + Removed ifdef'd out bogus code. + Fixed some prototypes. + + * nt.h (file_data): + * nt.h (OFFSET_TO_RVA): + * nt.h (RVA_TO_OFFSET): + * nt.h (RVA_TO_PTR): + Moved the memory-mapped-file structures, macros and prototypes + here, to parallel nt.c. ntheap.h should really be removed + entirely, and it's a non-portable-dumper specific file. + + * ntheap.h (round_to_next): + Moved the memory-mapped-file structures, macros and prototypes + to nt.h. + + * ntproc.c (compare_env): + Moved rva_to_section and mswindows_executable_type to nt.c. + Moved compare_env to process-nt.c. + ntproc.c will die, one day. + + * ntproc.c (sys_spawnve): + Account for win32_ -> mswindows_. + + * process-nt.c: + * process-nt.c (struct nt_process_data): + * process-nt.c (ensure_console_window_exists): + * process-nt.c (compare_env): + * process-nt.c (nt_create_process): + * process-nt.c (nt_kill_process_by_pid): + * process-nt.c (syms_of_process_nt): + * process-nt.c (vars_of_process_nt): + Introduce variable `mswindows-quote-process-args', from FSF 20.6. + Copy argument quoting code from FSF 20.6 (with appropriate Mule-ization + changes). Eliminate our old `nt-quote-process-args' mechanism. + Synch up nt_create_process with FSF 20.6 sys_spawnve. + Move compare_env here from ntproc.c. + + * process.c (Fprocess_send_region): + Takes an optional fourth argument, BUFFER, which should fix some + problems with call-process. + + * syscommctrl.h: + Move ICC_BAR_CLASSES here from syswindows.h, to avoid a warning. + + * syswindows.h: + Move ICC_BAR_CLASSES to syscommctrl.h. + Add preliminary macros for MSWindows/Mule. More to come. + + * unexnt.c: + * unexnt.c (unexec): + open_output_file moved to nt.c. + + +2000-05-05 Andy Piper + + * window.c (window_unmap_subwindows_cache_mapper): remove the dead + instance from the frame cache also since GC may catch up too late + to make frame deletion sane. + +2000-05-04 Andy Piper + + * glyphs-x.c (x_widget_instantiate): gcpro widget callbacks. + (x_finalize_image_instance): ungcpro on deletion. + + * glyphs.c (image_instantiator_format_create): give pointers a + query geometry method so that the geometry is at least set. + + * glyphs-x.c (image_instantiator_format_create_glyphs_x): only + initialize layouts if using widgets. + +2000-05-03 Andy Piper + + * nt.c: remove bogus reference to sysmmsystem.h + + * gui-x.c (popup_selection_callback): fix no selection abort. + +2000-05-02 Andy Piper + + * glyphs-msw.c (mswindows_update_widget): cope with nil text. + (mswindows_widget_instantiate): ditto. + + * glyphs-widget.c (initialize_widget_image_instance): initialize + children correctly. + (widget_instantiate): cope with children and items in the same + instance. + + * glyphs.c (mark_image_instance): cope with children as a first + class member. + (image_instance_equal): ditto. + (image_instance_hash): ditto. + (image_instance_changed): ditto. + +2000-04-30 Andy Piper + + * glyphs.c (subwindow_query_geometry): new function. Return some + defaults. + (subwindow_instantiate): don't assign dimensions if none have been + given. + (image_instantiator_format_create): add subwindow_query_geometry. + (print_image_instance): cope with layouts as widgets. + +2000-04-29 Andy Piper + + * frame.c (delete_frame_internal): call + free_frame_subwindow_instance_cache so that all subwindows are + finalized before their parent. + (mark_frame): remove subwindow_cachels. + (Fmake_frame): remove subwindow_cachel manipulation. + (allocate_frame_core): subwindow_instance_cache is a weak list. + (delete_frame_internal): set subwindow_instance_cache to nil. + + * glyphs-msw.c (mswindows_finalize_image_instance): make double + finalization safe. + (mswindows_finalize_image_instance): use the device + not the domain as the domain may have died already. + + * glyphs-x.c (x_finalize_image_instance): ditto. + (x_subwindow_instantiate): remove SUBWINDOW_WIDTH & + HEIGHT. + + * redisplay-output.c (redisplay_unmap_subwindows): update for + subwindow instance cache as a weak list. + (redisplay_unmap_subwindows_maybe): ditto. + (redisplay_unmap_subwindows_except_us): ditto. + + * glyphs.c (unmap_subwindow): error checking will check the domain + so don't deal with it here. Don't use cachels anymore. + (map_subwindow): ditto. + (update_subwindow_cachel_data): remove old accessor names. + (subwindow_instantiate): remove SUBWINDOW_WIDTH & HEIGHT. + (Fresize_subwindow): don't update cachel. + (mark_subwindow_cachels): + (update_subwindow_cachel_data): + (add_subwindow_cachel): + (get_subwindow_cachel_index): + (update_subwindow_cachel): + (reset_subwindow_cachels): + (mark_subwindow_cachels_as_not_updated): deleted. + (cache_subwindow_instance_in_frame_maybe): new function. Add a + subwindow instance to the frame cache. + (find_matching_subwindow): update for subwindow instance cache as + a weak list. + (update_widget_instances): ditto. + (image_instance_type_to_mask):inlined. + (free_frame_subwindow_instance_cache): new function. finalize all + subwindows that are instantiated. + + * glyphs.h (struct Lisp_Image_Instance): add display_data instead + of cachel information. + (IMAGE_INSTANCE_DISPLAY_X): + (IMAGE_INSTANCE_DISPLAY_Y): + (IMAGE_INSTANCE_DISPLAY_WIDTH): + (IMAGE_INSTANCE_DISPLAY_HEIGHT): + (XIMAGE_INSTANCE_DISPLAY_X): + (XIMAGE_INSTANCE_DISPLAY_Y): + (XIMAGE_INSTANCE_DISPLAY_WIDTH): + (XIMAGE_INSTANCE_DISPLAY_HEIGHT): new accessors. + remove subwindow_cachel structure and function references. + (image_instance_type_to_mask): inline from glyphs.c + + * redisplay.c (redisplay_frame): remove subwindow_cachel + references. + + * frame.h (struct frame): remove subwindow_cachels. + (FRAME_SUBWINDOW_CACHE): access subwindow_instance_cache. + + * frameslots.h: add subwindow_instance_cache. + + * window.c (replace_window): check subwindow cache of replacement. + (window_unmap_subwindows_cache_mapper): + (window_unmap_subwindows): new functions. Unmap all subwindows + cached on this window. + (mark_window_as_deleted): unmap all subwindows. + +2000-04-27 Andy Piper + + * glyphs.h (IIFORMAT_METH_OR_GIVEN): cope with null meths. + + * glyphs-widget.c (widget_layout): return something. + (layout_layout): return something. Fail if not intialized. + (layout_query_geometry): ditto. + (image_instantiator_native_layout): new function. Initialized the + native layout type. + (widget_instantiate): don't do layout stuff here. + + * glyphs.c (instantiate_image_instantiator): reorded calling or + instantiate and post_instantiate with layout in between. + (image_instance_layout): be more selective about deciding whether + the layout has been done or not. + + * glyphs.h (struct image_instantiator_methods): return a value + from layout_method. + +2000-04-26 Andy Piper + + * glyphs.c (allocate_image_instance): make initial width and + height unspecified. Set initialized to 0. + + * syscommctrl.h new file. Encapsulates commctrl.h. + + * syswindows.h new file. Encapsulates windows.h. + + * ntplay.c: use new syswindows.h and syscommctrl.h header. + * nt.c: ditto. + * console-msw.h: ditto. + + * redisplay-tty.c (tty_output_display_block): remove layout references. + + * glyphs-msw.c (mswindows_widget_instantiate): use the domain + window handle rather than just the frame. + + * glyphs.c (mark_image_instance): remove layout references. + (print_image_instance): ditto. + (image_instance_equal): ditto. + (image_instance_hash): ditto. + (decode_image_instance_type): ditto. + (encode_image_instance_type): ditto. + (image_instantiate): ditto. + (allocate_glyph): ditto. + (Fimage_instance_height): ditto. + (Fimage_instance_width): ditto. + (update_subwindow): ditto. + + * redisplay-x.c (x_output_display_block): recode for layouts as + widgets. + + * redisplay-output.c (redisplay_output_layout): recode for layouts + as widgets. + (compare_runes): remove layout references. + + * redisplay-msw.c (mswindows_output_display_block): recode for + layouts as widgets. + + * glyphs-widget.c (image_instantiator_layout): remove + layout_possible_dest_types. + (layout_possible_dest_types): deleted. + + * glyphs.h (image_instance_type): remove layout references. + (struct Lisp_Image_Instance): ditto. Add initialized flag. + (IMAGE_INSTANCE_INITIALIZED): new accessor. + (XIMAGE_INSTANCE_INITIALIZED): ditto. + +2000-04-25 Andy Piper + + * glyphs-widget.c (image_instantiator_buttons): + (image_instantiator_edit_fields): + (image_instantiator_combo_box): + (image_instantiator_scrollbar): + (image_instantiator_progress_guage): + (image_instantiator_tree_view): + (image_instantiator_tab_control): + (image_instantiator_labels): + (image_instantiator_layout): call default post_instantiate method. + (widget_post_instantiate): new function. Simply lays out the + widgets. + + * glyphs.h (struct image_instantiator_methods): add + post_instantiate method. + + * glyphs.c (instantiate_image_instantiator): add post_instantiate + method calls. + +2000-04-23 Andy Piper + + * glyphs.h (struct image_instantiator_methods): add + decode_domain_method. + (struct Lisp_Image_Instance): remove subwindow frame - it can be + derived from the domain. + (IMAGE_INSTANCE_FRAME): new accessor. + (XIMAGE_INSTANCE_FRAME): ditto. + + * glyphs.c (print_image_instance): use IMAGE_INSTANCE_FRAME + instead of _SUBWINDOW_FRAME. + (finalize_image_instance): ditto. + (Fimage_instance_foreground): ditto. + (Fimage_instance_background): ditto. + (image_instantiate): ditto. + (update_subwindow_cachel): ditto. + (update_subwindow): ditto. + (unmap_subwindow): ditto. + (map_subwindow): ditto + (subwindow_instantiate): ditto. + * glyphs-msw.c (mswindows_update_widget): ditto. + (mswindows_progress_gauge_instantiate): ditto. + (mswindows_tab_control_update): ditto. + * glyphs-x.c (x_update_widget): ditto. + (x_widget_instantiate): ditto. + (x_tab_control_instantiate): ditto. + (x_tab_control_update): ditto. + * event-msw.c (mswindows_wnd_proc): ditto + + * glyphs-widget.c (image_instantiator_layout): use + subwindow_decode_domain. + (image_instantiator_buttons): ditto. + (image_instantiator_edit_fields): ditto. + (image_instantiator_combo_box): ditto. + (image_instantiator_scrollbar): ditto. + (image_instantiator_progress_guage): ditto. + (image_instantiator_tree_view): ditto. + (image_instantiator_tab_control): ditto. + (image_instantiator_labels): ditto. + (image_instantiator_layout): ditto. + + * glyphs.c: add instance error checking to many functions. + (instantiate_image_instantiator): decode device from cache_domain. + (image_instantiate): partially rewrite by using + decode_image_instantiator_domain to determine what domain the + instance needs to be cached in. + (decode_image_instantiator_domain): new function. Determine what + domain the image needs to be cached in. + (check_window_subwindow_cache): new error checking function. + (check_instance_cache_mapper): ditto. + (check_image_instance_structure): ditto. + (subwindow_decode_domain): new function. Encodes a window as a + subwindow's cache domain. + (image_instantiator_format_create): use it for text and + subwindows. + +2000-04-21 Andy Piper + + * glyphs.c (image_instance_device): new function. + (image_instance_frame): new function. + (image_instance_window): new function. + (image_instance_live_p): new function. + + * window.c (mark_window_as_deleted): reset the subwindow_instance_ + cache to nil. + + * glyphs.h (struct Lisp_Image_Instance): device->domain. + (IMAGE_INSTANCE_DOMAIN): new accessor. + (XIMAGE_INSTANCE_DOMAIN): ditto. + + * glyphs-x.c (x_finalize_image_instance): device->domain. + + * glyphs-msw.c (init_image_instance_geometry): device->domain. + (mswindows_finalize_image_instance): ditto. + + * glyphs-eimage.c (jpeg_instantiate): device->domain. + (gif_instantiate): ditto. + (png_instantiate): ditto. + (tiff_instantiate): ditto. + + * glyphs.c (instantiate_image_instantiator): use domain rather + than device. + (mark_image_instance): device -> domain. + (print_image_instance): ditto. + (finalize_image_instance): ditto. + (image_instance_equal): ditto. + (allocate_image_instance): ditto. + (Fcolorize_image_instance): ditto. + (query_string_geometry): ditto. + (image_instantiate): ditto + (query_string_font): ditto. + (image_instantiate): ditto. + (update_subwindow): ditto. + (unmap_subwindow): ditto. + (map_subwindow): ditto. + (subwindow_instantiate): ditto. + + * specifier.h (DOMAIN_DEVICE): new, semantically correct, decoder. + (DOMAIN_FRAME): ditto. + (DOMAIN_WINDOW): ditto. + (DOMAIN_LIVE_P): ditto. + (XDOMAIN_DEVICE): ditto. + (XDOMAIN_FRAME): ditto. + (XDOMAIN_WINDOW): ditto. + + * specifier.c (Fvalid_specifier_domain_p): add image instances as + a valid specifier domain. + +2000-04-19 Andy Piper + + * glyphs-widget.c (syms_of_glyphs_widget): remove + widget-callback-current-channel. + (vars_of_glyphs_widget): ditto. + * glyphs.h: ditto + + * gui.c (get_gui_callback): revert to previous behaviour. + +2000-04-18 Andy Piper + + * glyphs.h (struct Lisp_Image_Instance): add margin_width. + (IMAGE_INSTANCE_MARGIN_WIDTH): new. + (XIMAGE_INSTANCE_MARGIN_WIDTH): new. + + * glyphs.c (image_instance_equal): add margin_width. + (image_instance_hash): ditto. + + * glyphs-widget.c (widget_instantiate): deal with margin-width. + (layout_query_geometry): ditto. + (layout_layout): ditto. + (syms_of_glyphs_widget): add margin-width. + (image_instantiator_layout): allow margin-width. + + * glyphs.c (update_widget_instances): make a normal function. + (syms_of_glyphs): remove Qupdate_widget_instances. + * glyphs.h: ditto. + + * gui-x.c (popup_selection_callback): use enqueue_magic_eval_event + so that we don't corrupt ideas about the last event or + command. Remove widget-callback-current-channel fiddling. + * gui-msw.c (mswindows_handle_gui_wm_command): ditto. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/src/buffer.c b/src/buffer.c index 5485825..abad796 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1830,8 +1830,18 @@ coding_system_is_binary (Lisp_Object coding_system) #define coding_system_is_binary(coding_system) 1 #endif -static Extbyte_dynarr *conversion_out_dynarr; -static Bufbyte_dynarr *conversion_in_dynarr; +typedef struct +{ + Dynarr_declare (Bufbyte_dynarr *); +} Bufbyte_dynarr_dynarr; + +typedef struct +{ + Dynarr_declare (Extbyte_dynarr *); +} Extbyte_dynarr_dynarr; + +static Extbyte_dynarr_dynarr *conversion_out_dynarr_list; +static Bufbyte_dynarr_dynarr *conversion_in_dynarr_list; static int dfc_convert_to_external_format_in_use; static int dfc_convert_to_internal_format_in_use; @@ -1860,6 +1870,7 @@ dfc_convert_to_external_format (dfc_conversion_type source_type, dfc_conversion_data *sink) { int count = specpdl_depth (); + Extbyte_dynarr *conversion_out_dynarr; type_checking_assert (((source_type == DFC_TYPE_DATA) || @@ -1869,20 +1880,20 @@ dfc_convert_to_external_format (dfc_conversion_type source_type, ((sink_type == DFC_TYPE_DATA) || (sink_type == DFC_TYPE_LISP_LSTREAM && LSTREAMP (source->lisp_object)))); - if (dfc_convert_to_external_format_in_use != 0) - error ("Can't call a conversion function from a conversion function"); - else - dfc_convert_to_external_format_in_use = 1; - record_unwind_protect (dfc_convert_to_external_format_reset_in_use, - Qzero); + make_int (dfc_convert_to_external_format_in_use)); + if (Dynarr_length (conversion_out_dynarr_list) <= + dfc_convert_to_external_format_in_use) + Dynarr_add (conversion_out_dynarr_list, Dynarr_new (Extbyte)); + conversion_out_dynarr = Dynarr_at (conversion_out_dynarr_list, + dfc_convert_to_external_format_in_use); + dfc_convert_to_external_format_in_use++; + Dynarr_reset (conversion_out_dynarr); #ifdef FILE_CODING coding_system = Fget_coding_system (coding_system); #endif - Dynarr_reset (conversion_out_dynarr); - /* Here we optimize in the case where the coding system does no conversion. However, we don't want to optimize in case the source or sink is an lstream, since writing to an lstream can cause a @@ -2015,6 +2026,7 @@ dfc_convert_to_internal_format (dfc_conversion_type source_type, dfc_conversion_data *sink) { int count = specpdl_depth (); + Bufbyte_dynarr *conversion_in_dynarr; type_checking_assert ((source_type == DFC_TYPE_DATA || @@ -2023,20 +2035,20 @@ dfc_convert_to_internal_format (dfc_conversion_type source_type, (sink_type == DFC_TYPE_DATA || sink_type == DFC_TYPE_LISP_LSTREAM)); - if (dfc_convert_to_internal_format_in_use != 0) - error ("Can't call a conversion function from a conversion function"); - else - dfc_convert_to_internal_format_in_use = 1; - record_unwind_protect (dfc_convert_to_internal_format_reset_in_use, - Qzero); + make_int (dfc_convert_to_internal_format_in_use)); + if (Dynarr_length (conversion_in_dynarr_list) <= + dfc_convert_to_internal_format_in_use) + Dynarr_add (conversion_in_dynarr_list, Dynarr_new (Bufbyte)); + conversion_in_dynarr = Dynarr_at (conversion_in_dynarr_list, + dfc_convert_to_internal_format_in_use); + dfc_convert_to_internal_format_in_use++; + Dynarr_reset (conversion_in_dynarr); #ifdef FILE_CODING coding_system = Fget_coding_system (coding_system); #endif - Dynarr_reset (conversion_in_dynarr); - if (source_type != DFC_TYPE_LISP_LSTREAM && sink_type != DFC_TYPE_LISP_LSTREAM && coding_system_is_binary (coding_system)) @@ -2218,8 +2230,10 @@ syms_of_buffer (void) void reinit_vars_of_buffer (void) { - conversion_in_dynarr = Dynarr_new (Bufbyte); - conversion_out_dynarr = Dynarr_new (Extbyte); + conversion_in_dynarr_list = Dynarr_new2 (Bufbyte_dynarr_dynarr, + Bufbyte_dynarr *); + conversion_out_dynarr_list = Dynarr_new2 (Extbyte_dynarr_dynarr, + Extbyte_dynarr *); staticpro_nodump (&Vbuffer_alist); Vbuffer_alist = Qnil; @@ -2661,31 +2675,31 @@ This is the same as (default-value 'case-fold-search). DEFVAR_BUFFER_LOCAL ("modeline-format", modeline_format /* Template for displaying modeline for current buffer. Each buffer has its own value of this variable. -Value may be a string, a symbol or a list or cons cell. -For a symbol, its value is used (but it is ignored if t or nil). +Value may be a string, symbol, glyph, generic specifier, list or cons cell. +For a symbol, its value is processed (but it is ignored if t or nil). A string appearing directly as the value of a symbol is processed verbatim in that the %-constructs below are not recognized. For a glyph, it is inserted as is. +For a generic specifier (i.e. a specifier of type `generic'), its instance + is computed in the current window using the equivalent of `specifier-instance' + and the value is processed. For a list whose car is a symbol, the symbol's value is taken, and if that is non-nil, the cadr of the list is processed recursively. Otherwise, the caddr of the list (if there is one) is processed. For a list whose car is a string or list, each element is processed recursively and the results are effectively concatenated. For a list whose car is an integer, the cdr of the list is processed - and padded (if the number is positive) or truncated (if negative) - to the width specified by that number. + and padded (if the number is positive) or truncated (if negative) + to the width specified by that number. For a list whose car is an extent, the cdr of the list is processed normally but the results are displayed using the face of the extent, and mouse clicks over this section are processed using the keymap of the extent. (In addition, if the extent has a help-echo property, that string will be echoed when the mouse moves over this - section.) See `generated-modeline-string' for more information. -For a list whose car is a face, the cdr of the list is processed - normally but the results will be displayed using the face in the car. -For a list whose car is a keymap, the cdr of the list is processed - normally but the keymap will apply for mouse clicks over the results, - in addition to `modeline-map'. Nested keymap specifications are - handled properly. + section.) If extents are nested, all keymaps are properly consulted + when processing mouse clicks, but multiple faces are not correctly + merged (only the first face is used), and lists of faces are not + correctly handled. See `generated-modeline-string' for more information. A string is printed verbatim in the modeline except for %-constructs: (%-constructs are processed when the string is the entire modeline-format or when it is found in a cons-cell or a list) diff --git a/src/buffer.h b/src/buffer.h index 879aa23..8db8653 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1306,6 +1306,11 @@ typedef union { char c; void *p; } *dfc_aliasing_voidpp; argument to TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT(). */ #define Qnative Qfile_name +#ifdef HAVE_MS_WINDOWS +/* #### kludge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + Remove this as soon as my Mule code is integrated. */ +#define Qmswindows_tstr Qnative +#endif /************************************************************************/ /* */ diff --git a/src/callproc.c b/src/callproc.c index 7e44f9e..1ce04b0 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -188,7 +188,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you char *bufptr = buf; int bufsize = 16384; int speccount = specpdl_depth (); - struct gcpro gcpro1, gcpro2; + struct gcpro gcpro1, gcpro2, gcpro3; char **new_argv = alloca_array (char *, max (2, nargs - 2)); /* File to use for stderr in the child. @@ -235,7 +235,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you NUNGCPRO; } - GCPRO1 (current_dir); + GCPRO2 (current_dir, path); if (nargs >= 2 && ! NILP (args[1])) { @@ -250,7 +250,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you UNGCPRO; - GCPRO2 (infile, current_dir); /* Fexpand_file_name might trash it */ + GCPRO3 (infile, current_dir, path); /* Fexpand_file_name might trash it */ if (nargs >= 3) { diff --git a/src/cmdloop.c b/src/cmdloop.c index eba7f4d..e015320 100644 --- a/src/cmdloop.c +++ b/src/cmdloop.c @@ -121,6 +121,10 @@ You should almost certainly not be using this. stderr_out ("*** Backtrace\n"); Fbacktrace (Qexternal_debugging_output, Qt); stderr_out ("*** Killing XEmacs\n"); +#ifdef HAVE_MS_WINDOWS + Fmswindows_message_box (build_string ("Initialization error"), + Qnil, Qnil); +#endif return Fkill_emacs (make_int (-1)); } diff --git a/src/config.h.in b/src/config.h.in index fd66608..eb7ca5c 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -893,7 +893,6 @@ on various systems. */ #undef SITELISPDIR_USER_DEFINED #undef ARCHLIBDIR_USER_DEFINED #undef ETCDIR_USER_DEFINED -#undef LOCKDIR_USER_DEFINED #undef INFODIR_USER_DEFINED #undef INFOPATH_USER_DEFINED diff --git a/src/console-msw.c b/src/console-msw.c index 0eb61e1..df68e17 100644 --- a/src/console-msw.c +++ b/src/console-msw.c @@ -28,14 +28,51 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include "events.h" -#include "opaque.h" +#include "buffer.h" #include "console-msw.h" +#include "events.h" +#include "opaque.h" DEFINE_CONSOLE_TYPE (mswindows); DEFINE_CONSOLE_TYPE (msprinter); +Lisp_Object Qabortretryignore; +Lisp_Object Qapplmodal; +Lisp_Object Qdefault_desktop_only; +Lisp_Object Qdefbutton1; +Lisp_Object Qdefbutton2; +Lisp_Object Qdefbutton3; +Lisp_Object Qdefbutton4; +/* Lisp_Object Qhelp; */ +Lisp_Object Qiconasterisk; +Lisp_Object Qiconexclamation; +Lisp_Object Qiconhand; +Lisp_Object Qiconinformation; +Lisp_Object Qiconquestion; +Lisp_Object Qiconstop; +/* Lisp_Object Qok; */ +Lisp_Object Qokcancel; +Lisp_Object Qretrycancel; +/* Lisp_Object Qright; */ +Lisp_Object Qrtlreading; +Lisp_Object Qservice_notification; +Lisp_Object Qsetforeground; +Lisp_Object Qsystemmodal; +Lisp_Object Qtaskmodal; +Lisp_Object Qtopmost; +Lisp_Object Qyesno; +Lisp_Object Qyesnocancel; + +/* Lisp_Object Qabort; */ +/* Lisp_Object Qcancel; */ +/* Lisp_Object Qignore; */ +/* Lisp_Object Qno; */ +/* Lisp_Object Qok; */ +/* Lisp_Object Qretry; */ +/* Lisp_Object Qyes; */ + + /************************************************************************/ /* mswindows console methods */ /************************************************************************/ @@ -261,6 +298,242 @@ DSYMNAME (Lisp_Object obj) #endif /* DEBUG_XEMACS */ +DEFUN ("mswindows-message-box", Fmswindows_message_box, 1, 3, 0, /* +Pop up an MS Windows message box. +MESSAGE is the string to display. Optional argument FLAG controls +what appears in the box and how it behaves; it is a symbol or list of +symbols, described below. Second optional argument TITLE controls the +title bar; if omitted, a standard title bar will be used, probably +displaying "XEmacs". + +Possible flags are + + +-- To specify the buttons in the message box: + +abortretryignore + The message box contains three push buttons: Abort, Retry, and Ignore. +ok + The message box contains one push button: OK. This is the default. +okcancel + The message box contains two push buttons: OK and Cancel. +retrycancel + The message box contains two push buttons: Retry and Cancel. +yesno + The message box contains two push buttons: Yes and No. +yesnocancel + The message box contains three push buttons: Yes, No, and Cancel. + + +-- To display an icon in the message box: + +iconexclamation, iconwarning + An exclamation-point icon appears in the message box. +iconinformation, iconasterisk + An icon consisting of a lowercase letter i in a circle appears in + the message box. +iconquestion + A question-mark icon appears in the message box. +iconstop, iconerror, iconhand + A stop-sign icon appears in the message box. + + +-- To indicate the default button: + +defbutton1 + The first button is the default button. This is the default. +defbutton2 + The second button is the default button. +defbutton3 + The third button is the default button. +defbutton4 + The fourth button is the default button. + + +-- To indicate the modality of the dialog box: + +applmodal + The user must respond to the message box before continuing work in + the window identified by the hWnd parameter. However, the user can + move to the windows of other applications and work in those windows. + Depending on the hierarchy of windows in the application, the user + may be able to move to other windows within the application. All + child windows of the parent of the message box are automatically + disabled, but popup windows are not. This is the default. +systemmodal + Same as applmodal except that the message box has the WS_EX_TOPMOST + style. Use system-modal message boxes to notify the user of serious, + potentially damaging errors that require immediate attention (for + example, running out of memory). This flag has no effect on the + user's ability to interact with windows other than those associated + with hWnd. +taskmodal + Same as applmodal except that all the top-level windows belonging to + the current task are disabled if the hWnd parameter is NULL. Use + this flag when the calling application or library does not have a + window handle available but still needs to prevent input to other + windows in the current application without suspending other + applications. + + +In addition, you can specify the following flags: + +default-desktop-only + The desktop currently receiving input must be a default desktop; + otherwise, the function fails. A default desktop is one an + application runs on after the user has logged on. +help + Adds a Help button to the message box. Choosing the Help button or + pressing F1 generates a Help event. +right + The text is right-justified. +rtlreading + Displays message and caption text using right-to-left reading order + on Hebrew and Arabic systems. +setforeground + The message box becomes the foreground window. Internally, Windows + calls the SetForegroundWindow function for the message box. +topmost + The message box is created with the WS_EX_TOPMOST window style. +service-notification + Windows NT only: The caller is a service notifying the user of an + event. The function displays a message box on the current active + desktop, even if there is no user logged on to the computer. If + this flag is set, the hWnd parameter must be NULL. This is so the + message box can appear on a desktop other than the desktop + corresponding to the hWnd. + + + +The return value is one of the following menu-item values returned by +the dialog box: + +abort + Abort button was selected. +cancel + Cancel button was selected. +ignore + Ignore button was selected. +no + No button was selected. +ok + OK button was selected. +retry + Retry button was selected. +yes + Yes button was selected. + +If a message box has a Cancel button, the function returns the +`cancel' value if either the ESC key is pressed or the Cancel button +is selected. If the message box has no Cancel button, pressing ESC has +no effect. */ + (message_, flags, title)) +{ + Lisp_Object tail; + Extbyte *msgout; + Extbyte *titleout = 0; + UINT sty = 0; + + if (noninteractive) + return Qcancel; + + if (!CONSP (flags)) + { + CHECK_SYMBOL (flags); + flags = list1 (flags); + } + + CHECK_STRING (message_); + TO_EXTERNAL_FORMAT (LISP_STRING, message_, + C_STRING_ALLOCA, msgout, + Qmswindows_tstr); + + if (!NILP (title)) + { + CHECK_STRING (title); + TO_EXTERNAL_FORMAT (LISP_STRING, title, + C_STRING_ALLOCA, titleout, + Qmswindows_tstr); + } + + EXTERNAL_LIST_LOOP (tail, flags) + { + Lisp_Object st = XCAR (tail); + CHECK_SYMBOL (st); + if (0) + ; +#define FROB(sym, val) else if (EQ (st, sym)) sty |= val + FROB (Qabortretryignore, MB_ABORTRETRYIGNORE); + FROB (Qapplmodal, MB_APPLMODAL); + FROB (Qdefault_desktop_only, MB_DEFAULT_DESKTOP_ONLY); + FROB (Qdefbutton1, MB_DEFBUTTON1); + FROB (Qdefbutton2, MB_DEFBUTTON2); + FROB (Qdefbutton3, MB_DEFBUTTON3); + FROB (Qdefbutton4, MB_DEFBUTTON4); + FROB (Qhelp, MB_HELP); + FROB (Qiconasterisk, MB_ICONASTERISK); + FROB (Qiconexclamation, MB_ICONEXCLAMATION); + FROB (Qiconhand, MB_ICONHAND); + FROB (Qiconinformation, MB_ICONINFORMATION); + FROB (Qiconquestion, MB_ICONQUESTION); + FROB (Qiconstop, MB_ICONSTOP); + FROB (Qok, MB_OK); + FROB (Qokcancel, MB_OKCANCEL); + FROB (Qretrycancel, MB_RETRYCANCEL); + FROB (Qright, MB_RIGHT); + FROB (Qrtlreading, MB_RTLREADING); + FROB (Qservice_notification, MB_SERVICE_NOTIFICATION); + FROB (Qsetforeground, MB_SETFOREGROUND); + FROB (Qsystemmodal, MB_SYSTEMMODAL); + FROB (Qtaskmodal, MB_TASKMODAL); + FROB (Qtopmost, MB_TOPMOST); + FROB (Qyesno, MB_YESNO); + FROB (Qyesnocancel, MB_YESNOCANCEL); +#undef FROB + + else + signal_simple_error ("Unrecognized flag", st); + } + + { + int retval = MessageBox (NULL, msgout, titleout, sty); + + if (retval == 0) + error ("Out of memory when calling `mswindows-message-box'"); + +#define FROB(sym, val) if (retval == val) return sym + FROB (Qabort, IDABORT); + FROB (Qcancel, IDCANCEL); + FROB (Qignore, IDIGNORE); + FROB (Qno, IDNO); + FROB (Qok, IDOK); + FROB (Qretry, IDRETRY); + FROB (Qyes, IDYES); +#undef FROB + + signal_simple_error ("Unknown return value from MessageBox()", + make_int (retval)); + } + + return Qnil; +} + +void +mswindows_output_last_error (char *frob) +{ + LPVOID lpMsgBuf; + int errval = GetLastError(); + + FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, errval, + MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &lpMsgBuf, + 0, + NULL); + stderr_out ("last error during %s is %d: %s\n", + frob, errval, (char*)lpMsgBuf); +} /************************************************************************/ @@ -270,6 +543,42 @@ DSYMNAME (Lisp_Object obj) void syms_of_console_mswindows (void) { + defsymbol (&Qabortretryignore, "abortretryignore"); + defsymbol (&Qapplmodal, "applmodal"); + defsymbol (&Qdefault_desktop_only, "default-desktop-only"); + defsymbol (&Qdefbutton1, "defbutton1"); + defsymbol (&Qdefbutton2, "defbutton2"); + defsymbol (&Qdefbutton3, "defbutton3"); + defsymbol (&Qdefbutton4, "defbutton4"); + /* defsymbol (&Qhelp, "help"); */ + defsymbol (&Qiconasterisk, "iconasterisk"); + defsymbol (&Qiconexclamation, "iconexclamation"); + defsymbol (&Qiconhand, "iconhand"); + defsymbol (&Qiconinformation, "iconinformation"); + defsymbol (&Qiconquestion, "iconquestion"); + defsymbol (&Qiconstop, "iconstop"); + /* defsymbol (&Qok, "ok"); */ + defsymbol (&Qokcancel, "okcancel"); + defsymbol (&Qretrycancel, "retrycancel"); + /* defsymbol (&Qright, "right"); */ + defsymbol (&Qrtlreading, "rtlreading"); + defsymbol (&Qservice_notification, "service-notification"); + defsymbol (&Qsetforeground, "setforeground"); + defsymbol (&Qsystemmodal, "systemmodal"); + defsymbol (&Qtaskmodal, "taskmodal"); + defsymbol (&Qtopmost, "topmost"); + defsymbol (&Qyesno, "yesno"); + defsymbol (&Qyesnocancel, "yesnocancel"); + + /* defsymbol (&Qabort, "abort"); */ + /* defsymbol (&Qcancel, "cancel"); */ + /* defsymbol (&Qignore, "ignore"); */ + /* defsymbol (&Qno, "no"); */ + /* defsymbol (&Qok, "ok"); */ + /* defsymbol (&Qretry, "retry"); */ + /* defsymbol (&Qyes, "yes"); */ + + DEFSUBR (Fmswindows_message_box); } void diff --git a/src/console-msw.h b/src/console-msw.h index b5c3573..eacfbf5 100644 --- a/src/console-msw.h +++ b/src/console-msw.h @@ -33,13 +33,8 @@ Boston, MA 02111-1307, USA. */ #define INCLUDED_console_msw_h_ #include "console.h" -#include -#include /* DDE management library */ -#if !defined(__CYGWIN32__) && !defined(__MINGW32__) \ - || CYGWIN_VERSION_DLL_MAJOR > 20 -#include /* FileManager/Explorer drag and drop */ -#include -#endif +#include "syswindows.h" +#include "syscommctrl.h" #ifdef HAVE_XPM #include @@ -164,6 +159,9 @@ struct mswindows_frame /* DC for this win32 window */ HDC hdc; + /* Used with DeferWindowPos */ + HDWP hdwp; + /* Time of last click event, for button 2 emul */ DWORD last_click_time; @@ -352,4 +350,7 @@ Lisp_Object mswindows_handle_gui_wm_command (struct frame* f, int msw_windows9x_p (void); + +void mswindows_output_last_error (char *frob); + #endif /* INCLUDED_console_msw_h_ */ diff --git a/src/console-stream.c b/src/console-stream.c index 600937c..33daa91 100644 --- a/src/console-stream.c +++ b/src/console-stream.c @@ -201,16 +201,6 @@ stream_eol_cursor_width (void) } static void -stream_output_begin (struct device *d) -{ -} - -static void -stream_output_end (struct device *d) -{ -} - -static void stream_output_display_block (struct window *w, struct display_line *dl, int block, int start, int end, int start_pixpos, int cursor_start, @@ -219,16 +209,6 @@ stream_output_display_block (struct window *w, struct display_line *dl, } static void -stream_output_vertical_divider (struct window *w, int clear) -{ -} - -static void -stream_clear_to_window_end (struct window *w, int ypos1, int ypos2) -{ -} - -static void stream_clear_region (Lisp_Object window, struct device* d, struct frame * f, face_index findex, int x, int y, int width, int height, Lisp_Object fcolor, Lisp_Object bcolor, @@ -236,11 +216,6 @@ stream_clear_region (Lisp_Object window, struct device* d, struct frame * f, { } -static void -stream_clear_frame (struct frame *f) -{ -} - static int stream_flash (struct device *d) { @@ -285,14 +260,9 @@ console_type_create_stream (void) CONSOLE_HAS_METHOD (stream, right_margin_width); CONSOLE_HAS_METHOD (stream, text_width); CONSOLE_HAS_METHOD (stream, output_display_block); - CONSOLE_HAS_METHOD (stream, output_vertical_divider); CONSOLE_HAS_METHOD (stream, divider_height); CONSOLE_HAS_METHOD (stream, eol_cursor_width); - CONSOLE_HAS_METHOD (stream, clear_to_window_end); CONSOLE_HAS_METHOD (stream, clear_region); - CONSOLE_HAS_METHOD (stream, clear_frame); - CONSOLE_HAS_METHOD (stream, output_begin); - CONSOLE_HAS_METHOD (stream, output_end); CONSOLE_HAS_METHOD (stream, flash); CONSOLE_HAS_METHOD (stream, ring_bell); } diff --git a/src/console.h b/src/console.h index 4dad2be..6e3118b 100644 --- a/src/console.h +++ b/src/console.h @@ -152,8 +152,10 @@ struct console_methods int, int, int, int, Lisp_Object, Lisp_Object, Lisp_Object); void (*clear_frame_method) (struct frame *); - void (*output_begin_method) (struct device *); - void (*output_end_method) (struct device *); + void (*window_output_begin_method) (struct window *); + void (*frame_output_begin_method) (struct frame *); + void (*window_output_end_method) (struct window *); + void (*frame_output_end_method) (struct frame *); int (*flash_method) (struct device *); void (*ring_bell_method) (struct device *, int volume, int pitch, int duration); diff --git a/src/device-msw.c b/src/device-msw.c index 1734233..76ef314 100644 --- a/src/device-msw.c +++ b/src/device-msw.c @@ -40,13 +40,6 @@ Boston, MA 02111-1307, USA. */ #include "frame.h" #include "sysdep.h" -#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ - CYGWIN_VERSION_DLL_MAJOR < 21 -extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ); -#else -#include -#endif - #if !(defined (__CYGWIN32__) || defined(__MINGW32__)) # include /* For CoInitialize */ #endif diff --git a/src/device.h b/src/device.h index d33b1ea..31f5388 100644 --- a/src/device.h +++ b/src/device.h @@ -426,6 +426,8 @@ int valid_device_class_p (Lisp_Object class); #define MARK_DEVICE_WINDOWS_STRUCTURE_CHANGED(d) \ ((void) (windows_structure_changed = (d)->windows_structure_changed = 1)) +/* #### unify this with DOMAIN_DEVICE once the latter has image instances + expunged from it. */ /* This turns out to be used heavily so we make it a macro to make it inline. Also, the majority of the time the object will turn out to be a window so we move it from being checked last to being checked diff --git a/src/emacs.c b/src/emacs.c index fe1d119..e1208f2 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2,6 +2,7 @@ Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 2000 Ben Wing. This file is part of XEmacs. @@ -22,6 +23,141 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Mule 2.0, FSF 19.28. */ +/* Capsule summary of the various releases of Lucid Emacs/XEmacs and + FSF/GNU Emacs. Provided here for use in cross-referencing version + releases and dates in comments, esp. in the authorship comments at + the beginning of each file. More information about history can be + found in the beginning of the Internals Manual and in the About page. + + +-- A time line for Lucid Emacs/XEmacs is + +version 19.0 shipped with Energize 1.0, April 1992. +version 19.1 released June 4, 1992. +version 19.2 released June 19, 1992. +version 19.3 released September 9, 1992. +version 19.4 released January 21, 1993. +version 19.5 was a repackaging of 19.4 with a few bug fixes and + shipped with Energize 2.0. Never released to the net. +version 19.6 released April 9, 1993. +version 19.7 was a repackaging of 19.6 with a few bug fixes and + shipped with Energize 2.1. Never released to the net. +version 19.8 released September 6, 1993. +version 19.9 released January 12, 1994. +version 19.10 released May 27, 1994. +version 19.11 (first XEmacs) released September 13, 1994. +version 19.12 released June 23, 1995. +version 19.13 released September 1, 1995. +version 19.14 released June 23, 1996. +version 20.0 released February 9, 1997. +version 19.15 released March 28, 1997. +version 20.1 (not released to the net) April 15, 1997. +version 20.2 released May 16, 1997. +version 19.16 released October 31, 1997. +version 20.3 (the first stable version of XEmacs 20.x) released + November 30, 1997. +version 20.4 released February 28, 1998. + + +-- A time line for GNU Emacs version 19 is + +version 19.7 (beta) (first beta release) released ??????; prob. late May 1993. +version 19.8 (beta) released May 27, 1993. +version 19.9 (beta) released May 27, 1993. +version 19.10 (beta) released May 30, 1993. +version 19.11 (beta) released June 1, 1993. +version 19.12 (beta) released June 2, 1993. +version 19.13 (beta) released June 8, 1993. +version 19.14 (beta) released June 17, 1993. +version 19.15 (beta) released June 19, 1993. +version 19.16 (beta) released July 6, 1993. +version 19.17 (beta) released late July, 1993. +version 19.18 (beta) released August 9, 1993. +version 19.19 (beta) released August 15, 1993. +version 19.20 (beta) released November 17, 1993. +version 19.21 (beta) released November 17, 1993. +version 19.22 (beta) released November 28, 1993. +version 19.23 (beta) released May 17, 1994. +version 19.24 (beta) released May 16, 1994. +version 19.25 (beta) released June 3, 1994. +version 19.26 (beta) released September 11, 1994. +version 19.27 (beta) released September 14, 1994. +version 19.28 (first ``official'' release) released November 1, 1994. +version 19.29 released June 21, 1995. +version 19.30 released November 24, 1995. +version 19.31 released May 25, 1996. +version 19.32 released July 31, 1996. +version 19.33 released August 11, 1996. +version 19.34 released August 21, 1996. +version 19.34b released September 6, 1996. + + +-- A time line for GNU Emacs version 20 is + +version 20.1 released September 17, 1997. +version 20.2 released September 20, 1997. +version 20.3 released August 19, 1998. + + +-- A time line for GNU Emacs version 18 and older is + +GNU Emacs version 15 (15.34) was released sometime in 1984 or 1985 and + shared some code with a version of Emacs written by James Gosling (the + same James Gosling who later created the Java language). +GNU Emacs version 16 (first released version was 16.56) was released on + July 15, 1985. All Gosling code was removed due to potential copyright + problems with the code. +version 16.57: released on September 16, 1985. +versions 16.58, 16.59: released on September 17, 1985. +version 16.60: released on September 19, 1985. These later version 16's + incorporated patches from the net, esp. for getting Emacs to work under + System V. +version 17.36 (first official v17 release) released on December 20, 1985. + Included a TeX-able user manual. First official unpatched version that + worked on vanilla System V machines. +version 17.43 (second official v17 release) released on January 25, 1986. +version 17.45 released on January 30, 1986. +version 17.46 released on February 4, 1986. +version 17.48 released on February 10, 1986. +version 17.49 released on February 12, 1986. +version 17.55 released on March 18, 1986. +version 17.57 released on March 27, 1986. +version 17.58 released on April 4, 1986. +version 17.61 released on April 12, 1986. +version 17.63 released on May 7, 1986. +version 17.64 released on May 12, 1986. +version 18.24 (a beta version) released on October 2, 1986. +version 18.30 (a beta version) released on November 15, 1986. +version 18.31 (a beta version) released on November 23, 1986. +version 18.32 (a beta version) released on December 7, 1986. +version 18.33 (a beta version) released on December 12, 1986. +version 18.35 (a beta version) released on January 5, 1987. +version 18.36 (a beta version) released on January 21, 1987. +January 27, 1987: The Great Usenet Renaming. net.emacs is now comp.emacs. +version 18.37 (a beta version) released on February 12, 1987. +version 18.38 (a beta version) released on March 3, 1987. +version 18.39 (a beta version) released on March 14, 1987. +version 18.40 (a beta version) released on March 18, 1987. +version 18.41 (the first ``official'' release) released on March 22, 1987. +version 18.45 released on June 2, 1987. +version 18.46 released on June 9, 1987. +version 18.47 released on June 18, 1987. +version 18.48 released on September 3, 1987. +version 18.49 released on September 18, 1987. +version 18.50 released on February 13, 1988. +version 18.51 released on May 7, 1988. +version 18.52 released on September 1, 1988. +version 18.53 released on February 24, 1989. +version 18.54 released on April 26, 1989. +version 18.55 released on August 23, 1989. This is the earliest version + that is still available by FTP. +version 18.56 released on January 17, 1991. +version 18.57 released late January, 1991. +version 18.58 released ?????. +version 18.59 released October 31, 1992. + +*/ + /* Note: It is necessary to specify and not "config.h" in order for the --srcdir type of compilation to work properly. Otherwise the config.h from the srcdir, rather than the one from @@ -170,8 +306,10 @@ Lisp_Object Vconfigure_exec_prefix_directory, Vconfigure_prefix_directory; priority. */ int emacs_priority; -/* If non-zero a filter or a sentinel is running. Tested to save the match - data on the first attempt to change it inside asynchronous code. */ +/* Some FSF junk with running_asynch_code, to preserve the match + data. Not necessary because we don't call process filters + asynchronously (i.e. from within QUIT). */ +/* #### Delete this when merging the rest of my code */ int running_asynch_code; /* If non-zero, a window-system was specified on the command line. */ @@ -241,11 +379,63 @@ Lisp_Object Qsave_buffers_kill_emacs; extern Lisp_Object Vlisp_EXEC_SUFFIXES; -/* Signal code for the fatal signal that was received */ -static int fatal_error_code; -/* Nonzero if handling a fatal error already */ -static int fatal_error_in_progress; +/* Ben's capsule summary about expected and unexpected exits from XEmacs. + + Expected exits occur when the user directs XEmacs to exit, for example + by pressing the close button on the only frame in XEmacs, or by typing + C-x C-c. This runs `save-buffers-kill-emacs', which saves any necessary + buffers, and then exits using the primitive `kill-emacs'. + + However, unexpected exits occur in a few different ways: + + -- a memory access violation or other hardware-generated exception + occurs. This is the worst possible problem to deal with, because + the fault can occur while XEmacs is in any state whatsoever, even + quite unstable ones. As a result, we need to be *extremely* careful + what we do. + -- we are using one X display (or if we've used more, we've closed the + others already), and some hardware or other problem happens and + suddenly we've lost our connection to the display. In this situation, + things are not so dire as in the last one; our code itself isn't + trashed, so we can continue execution as normal, after having set + things up so that we can exit at the appropriate time. Our exit + still needs to be of the emergency nature; we have no displays, so + any attempts to use them will fail. We simply want to auto-save + (the single most important thing to do during shut-down), do minimal + cleanup of stuff that has an independent existence outside of XEmacs, + and exit. + + Currently, both unexpected exit scenarios described above set + preparing_for_armageddon to indicate that nonessential and possibly + dangerous things should not be done, specifically: + + -- no garbage collection. + -- no hooks are run. + -- no messages of any sort from autosaving. + -- autosaving tries harder, ignoring certain failures. + -- existing frames are not deleted. + + (Also, all places that set preparing_for_armageddon also + set dont_check_for_quit. This happens separately because it's + also necessary to set other variables to make absolutely sure + no quitting happens.) + + In the first scenario above (the access violation), we also set + fatal_error_in_progress. This causes more things to not happen: + + -- assertion failures do not abort. + -- printing code does not do code conversion or gettext when + printing to stdout/stderr. +*/ + +/* Nonzero if handling a fatal error already. */ +int fatal_error_in_progress; + +/* Non-nil means we're going down, so we better not run any hooks + or do other non-essential stuff. */ +int preparing_for_armageddon; + static JMP_BUF run_temacs_catch; @@ -255,23 +445,54 @@ static char *run_temacs_args; static size_t run_temacs_argv_size; static size_t run_temacs_args_size; -static void shut_down_emacs (int sig, Lisp_Object stuff); +static void shut_down_emacs (int sig, Lisp_Object stuff, int no_auto_save); + +static void +ensure_no_quitting_from_now_on (void) +{ + /* make sure no quitting from now on!! */ + dont_check_for_quit = 1; + Vinhibit_quit = Qt; + Vquit_flag = Qnil; +} /* Handle bus errors, illegal instruction, etc. */ SIGTYPE fatal_error_signal (int sig) { - fatal_error_code = sig; - signal (sig, SIG_DFL); + fatal_error_in_progress++; + preparing_for_armageddon = 1; + + ensure_no_quitting_from_now_on (); + /* Unblock the signal so that if the same signal gets sent in the code below, we avoid a deadlock. */ - EMACS_UNBLOCK_SIGNAL (fatal_error_code); + EMACS_UNBLOCK_SIGNAL (sig); + + /* Only try auto-saving first time through. If we crash in auto-saving, + don't do it again. */ + if (fatal_error_in_progress == 1) + { + Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */ + /* Do this so that the variable has the same value of 2 regardless of + whether we made it through auto-saving correctly. */ + fatal_error_in_progress++; + } + else if (fatal_error_in_progress == 2) + stderr_out ("WARNING: Unable to auto-save your files properly.\n" + "Some or all may in fact have been auto-saved.\n" + "\n"); + + /* Now, reset our signal handler, so the next time, we just die. + Don't do this before auto-saving. */ + signal (sig, SIG_DFL); + /* Keep in mind that there's more than one signal that we can crash + on. */ /* If fatal error occurs in code below, avoid infinite recursion. */ - if (! fatal_error_in_progress) + if (fatal_error_in_progress <= 2) { - fatal_error_in_progress = dont_check_for_quit = 1; - shut_down_emacs (sig, Qnil); + shut_down_emacs (sig, Qnil, 1); stderr_out ("\nLisp backtrace follows:\n\n"); Fbacktrace (Qexternal_debugging_output, Qt); # if 0 /* This is evil, rarely useful, and causes grief in some cases. */ @@ -290,9 +511,62 @@ fatal_error_signal (int sig) # endif } /* Signal the same code; this time it will really be fatal. */ - kill (getpid (), fatal_error_code); + kill (getpid (), sig); SIGRETURN; } + +#ifdef _MSC_VER + +static DWORD +mswindows_handle_hardware_exceptions (DWORD code) +{ + if (code != STATUS_ACCESS_VIOLATION && code != STATUS_ILLEGAL_INSTRUCTION + && code != STATUS_PRIVILEGED_INSTRUCTION + && code != STATUS_DATATYPE_MISALIGNMENT) + return EXCEPTION_CONTINUE_SEARCH; + + /* I don't know if this filter is still wrapped in the outer __try, but + it doesn't hurt to have another one. --ben */ + __try + { + fatal_error_in_progress++; + preparing_for_armageddon = 1; + + ensure_no_quitting_from_now_on (); + + /* Only try auto-saving first time through. If we crash in auto-saving, + don't do it again. */ + if (fatal_error_in_progress == 1) + { + Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */ + /* Do this so that the variable has the same value of 2 regardless of + whether we made it through auto-saving correctly. */ + fatal_error_in_progress++; + } + else if (fatal_error_in_progress == 2) + stderr_out ("WARNING: Unable to auto-save your files properly.\n" + "Some or all may in fact have been auto-saved.\n" + "\n"); + + /* If fatal error occurs in code below, avoid infinite recursion. */ + if (fatal_error_in_progress <= 2) + { + shut_down_emacs (-1, Qnil, 1); + stderr_out ("\nLisp backtrace follows:\n\n"); + Fbacktrace (Qexternal_debugging_output, Qt); + } + } + /* VC++ documentation says that + GetExceptionCode() cannot be called inside the filter itself. */ + __except (mswindows_handle_hardware_exceptions (GetExceptionCode ())) {} + + /* pretend we didn't handle this, so that the debugger is invoked and/or + the normal GPF box appears. */ + return EXCEPTION_CONTINUE_SEARCH; +} + +#endif /* _MSC_VER */ + #ifdef SIGDANGER @@ -1686,7 +1960,6 @@ main_1 (int argc, char **argv, char **envp, int restart) #endif reinit_vars_of_objects (); reinit_vars_of_print (); - reinit_vars_of_redisplay (); reinit_vars_of_search (); reinit_vars_of_undo (); reinit_vars_of_window (); @@ -2173,6 +2446,16 @@ Do not call this. It will reinitialize your XEmacs. You'll be sorry. int main (int argc, char **argv, char **envp) { + +#ifdef _MSC_VER + /* Under VC++, access violations and the like are not sent through + the standard signal() mechanism. Rather, they need to be handled + using the Microsoft "structured exception handling" mechanism, + which vaguely resembles the C++ mechanisms. */ + __try + { +#endif + int volatile vol_argc = argc; char ** volatile vol_argv = argv; char ** volatile vol_envp = envp; @@ -2290,6 +2573,14 @@ main (int argc, char **argv, char **envp) run_temacs_argc = -1; main_1 (vol_argc, vol_argv, vol_envp, restarted); + +#ifdef _MSC_VER + } + /* VC++ documentation says that + GetExceptionCode() cannot be called inside the filter itself. */ + __except (mswindows_handle_hardware_exceptions (GetExceptionCode ())) {} +#endif + return 0; /* unreached */ } @@ -2334,9 +2625,7 @@ all of which are called before XEmacs is actually killed. if (!preparing_for_armageddon && !noninteractive) run_hook (Qkill_emacs_hook); - /* make sure no quitting from now on!! */ - dont_check_for_quit = 1; - Vinhibit_quit = Qt; + ensure_no_quitting_from_now_on (); if (!preparing_for_armageddon) { @@ -2364,7 +2653,7 @@ all of which are called before XEmacs is actually killed. UNGCPRO; - shut_down_emacs (0, STRINGP (arg) ? arg : Qnil); + shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0); #if defined(GNU_MALLOC) __free_hook = @@ -2387,45 +2676,54 @@ all of which are called before XEmacs is actually killed. If SIG is a signal number, print a message for it. - This is called by fatal signal handlers, X protocol error handlers, - and Fkill_emacs. */ + This is called by fatal signal handlers and Fkill_emacs. It used to + be called by X protocol error handlers, but instead they now call + Fkill_emacs. */ static void -shut_down_emacs (int sig, Lisp_Object stuff) +shut_down_emacs (int sig, Lisp_Object stuff, int no_auto_save) { /* This function can GC */ /* Prevent running of hooks and other non-essential stuff from now on. */ preparing_for_armageddon = 1; - /* In case frames or windows are screwed up, avoid assertion - failures here */ - Vinhibit_quit = Qt; + ensure_no_quitting_from_now_on (); #ifdef QUANTIFY quantify_stop_recording_data (); #endif /* QUANTIFY */ -#if 0 /* This is absolutely the most important thing to do, so make sure we do it now, before anything else. We might have crashed and be in a weird inconsistent state, and potentially anything could set off another protection fault and cause us to bail out immediately. */ - /* I'm not removing the code entirely, yet. We have run up against + /* Steve writes the following: + + [[I'm not removing the code entirely, yet. We have run up against a spate of problems in diagnosing crashes due to crashes within crashes. It has very definitely been determined that code called during auto-saving cannot work if XEmacs crashed inside of GC. We already auto-save on an itimer so there cannot be too much unsaved stuff around, and if we get better crash reports we might - be able to get more problems fixed so I'm disabling this. -slb */ - Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */ -#endif + be able to get more problems fixed so I'm disabling this. -slb]] + + and DISABLES AUTO-SAVING ENTIRELY during crashes! Way way bad idea. + + Instead let's just be more intelligent about avoiding crashing + when possible, esp. nested crashes. + */ + if (!no_auto_save) + Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */ fflush (stdout); reset_all_consoles (); if (sig && sig != SIGTERM) { - stderr_out ("\nFatal error (%d).\n", sig); + if (sig == -1) + stderr_out ("\nFatal error.\n\n"); + else + stderr_out ("\nFatal error (%d).\n\n", sig); stderr_out ("Your files have been auto-saved.\n" "Use `M-x recover-session' to recover them.\n" @@ -2444,6 +2742,7 @@ shut_down_emacs (int sig, Lisp_Object stuff) #endif "*MAKE SURE* to include the information in the command\n" "M-x describe-installation.\n" +#ifndef _MSC_VER "\n" "If at all possible, *please* try to obtain a C stack backtrace;\n" "it will help us immensely in determining what went wrong.\n" @@ -2452,7 +2751,10 @@ shut_down_emacs (int sig, Lisp_Object stuff) "directory in which you started the editor, or maybe in your home\n" "directory), and type\n" "\n" - " gdb "); + " gdb " +#endif + ); +#ifndef _MSC_VER { const char *name; char *dir = 0; @@ -2479,6 +2781,7 @@ shut_down_emacs (int sig, Lisp_Object stuff) "(If you don't have GDB on your system, you might have DBX,\n" "or XDB, or SDB. A similar procedure should work for all of\n" "these. Ask your system administrator if you need more help.)\n"); +#endif /* _MSC_VER */ } stuff_buffered_input (stuff); @@ -2742,17 +3045,75 @@ Non-nil return value means XEmacs is running without interactive terminal. #ifdef USE_ASSERTIONS /* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */ -DOESNT_RETURN -assert_failed (const char *file, int line, const char *expr) -{ - stderr_out ("Fatal error: assertion failed, file %s, line %d, %s\n", - file, line, expr); +static int in_assert_failed; +static const char *assert_failed_file; +static int assert_failed_line; +static const char *assert_failed_expr; + +#ifdef fprintf +#undef fprintf +#endif + #undef abort /* avoid infinite #define loop... */ + #if defined (WINDOWSNT) && defined (DEBUG_XEMACS) - DebugBreak (); -#elif !defined (ASSERTIONS_DONT_ABORT) +#define enter_debugger() DebugBreak () +#else +#define enter_debugger() +#endif + +void +assert_failed (const char *file, int line, const char *expr) +{ + /* If we're already crashing, let's not crash again. This might be + critical to getting auto-saving working properly. */ + if (fatal_error_in_progress) + return; + + /* We are extremely paranoid so we sensibly deal with recursive + assertion failures. */ + in_assert_failed++; + + if (in_assert_failed >= 4) + _exit (-1); + else if (in_assert_failed == 3) + { + enter_debugger (); + _exit (-1); + } + else if (in_assert_failed == 2) + { + /* Not stderr_out(), which does additional things and may trigger + a recursive assertion failure. fprintf was undeffed above, in + case it was encapsulated. */ + fprintf (stderr, + "Fatal error: recursive assertion failure, " + "file %s, line %d, %s\n", + file, line, expr); + fprintf (stderr, + "Original assertion failure: file %s, line %d, %s\n", + assert_failed_file, assert_failed_line, assert_failed_expr); + } + else + { + assert_failed_file = file; + assert_failed_line = line; + assert_failed_expr = expr; + + if (!initialized) + fprintf (stderr, + "Fatal error: assertion failed, file %s, line %d, %s\n", + file, line, expr); + else + stderr_out ("Fatal error: assertion failed, file %s, line %d, %s\n", + file, line, expr); + } + + enter_debugger (); +#if !defined (ASSERTIONS_DONT_ABORT) abort (); #endif + in_assert_failed = 0; } #endif /* USE_ASSERTIONS */ @@ -3176,19 +3537,6 @@ or were installed as packages, and are intended for XEmacs to use. */ ); Vdata_directory_list = Qnil; -#ifdef CLASH_DETECTION - DEFVAR_LISP ("configure-lock-directory", &Vconfigure_lock_directory /* -For internal use by the build procedure only. -configure's idea of what LOCK-DIRECTORY will be. -*/ ); -#ifdef PATH_LOCK - Vconfigure_lock_directory = Ffile_name_as_directory - (build_string ((char *) PATH_LOCK)); -#else - Vconfigure_lock_directory = Qnil; -#endif -#endif /* CLASH_DETECTION */ - DEFVAR_LISP ("site-directory", &Vsite_directory /* *Directory of site-specific Lisp files that come with XEmacs. */ ); diff --git a/src/eval.c b/src/eval.c index 803d96a..da95e4e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -143,10 +143,6 @@ Lisp_Object Vcurrent_warning_class; /* Special catch tag used in call_with_suspended_errors(). */ Lisp_Object Qunbound_suspended_errors_tag; -/* Non-nil means we're going down, so we better not run any hooks - or do other non-essential stuff. */ -int preparing_for_armageddon; - /* Non-nil means record all fset's and provide's, to be undone if the file being autoloaded is not fully loaded. They are recorded by being consed onto the front of Vautoload_queue: @@ -4901,8 +4897,8 @@ function calls. Fprin1 (backlist->args[i], stream); } } + write_c_string (")\n", stream); } - write_c_string (")\n", stream); backlist = backlist->next; } } diff --git a/src/event-Xt.c b/src/event-Xt.c index 154e5f0..78b1c40 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -86,8 +86,6 @@ XtAppContext Xt_app_con; /* Do we accept events sent by other clients? */ int x_allow_sendevents; -int modifier_keys_are_sticky; - #ifdef DEBUG_XEMACS int x_debug_events; #endif @@ -3160,15 +3158,6 @@ vars_of_event_Xt (void) dispatch_event_queue_tail = Qnil; pdump_wire (&dispatch_event_queue_tail); - DEFVAR_BOOL ("modifier-keys-are-sticky", &modifier_keys_are_sticky /* -*Non-nil makes modifier keys sticky. -This means that you can release the modifier key before pressing down -the key that you wish to be modified. Although this is non-standard -behavior, it is recommended because it reduces the strain on your hand, -thus reducing the incidence of the dreaded Emacs-pinky syndrome. -*/ ); - modifier_keys_are_sticky = 0; - DEFVAR_BOOL ("x-allow-sendevents", &x_allow_sendevents /* *Non-nil means to allow synthetic events. Nil means they are ignored. Beware: allowing emacs to process SendEvents opens a big security hole. diff --git a/src/event-msw.c b/src/event-msw.c index a949be8..5b7d03b 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -1,4 +1,4 @@ -/* The mswindows event_stream interface. +/* The mswindows event_stream interface. Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1996, 2000 Ben Wing. @@ -58,6 +58,7 @@ Boston, MA 02111-1307, USA. */ #include "process.h" #include "redisplay.h" #include "select.h" +#include "window.h" #include "sysproc.h" #include "syswait.h" #include "systime.h" @@ -78,10 +79,6 @@ typedef unsigned int SOCKET; # include /* For IShellLink */ #endif -#if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20) -typedef NMHDR *LPNMHDR; -#endif - #ifdef HAVE_MENUBARS #define ADJR_MENUFLAG TRUE #else @@ -103,6 +100,8 @@ static int mswindows_modifier_state (BYTE* keymap, int has_AltGr); static void mswindows_set_chord_timer (HWND hwnd); static int mswindows_button2_near_enough (POINTS p1, POINTS p2); static int mswindows_current_layout_has_AltGr (void); +static int mswindows_handle_sticky_modifiers (WPARAM wParam, LPARAM lParam, + int downp, int keyp); static struct event_stream *mswindows_event_stream; @@ -151,6 +150,10 @@ int mswindows_mouse_button_max_skew_x; int mswindows_mouse_button_max_skew_y; int mswindows_mouse_button_tolerance; +#ifdef DEBUG_XEMACS +int mswindows_debug_events; +#endif + /* This is the event signaled by the event pump. See mswindows_pump_outstanding_events for comments */ static Lisp_Object mswindows_error_caught_in_modal_loop; @@ -936,17 +939,21 @@ mswindows_enqueue_process_event (Lisp_Process* p) } static void -mswindows_enqueue_mouse_button_event (HWND hwnd, UINT msg, POINTS where, DWORD when) +mswindows_enqueue_mouse_button_event (HWND hwnd, UINT msg, POINTS where, + DWORD when) { + int downp = (msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN || + msg == WM_RBUTTONDOWN); /* We always use last message time, because mouse button events may get delayed, and XEmacs double click recognition will fail */ Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); - Lisp_Event* event = XEVENT(emacs_event); + Lisp_Event* event = XEVENT (emacs_event); - event->channel = mswindows_find_frame(hwnd); + mswindows_handle_sticky_modifiers (0, 0, downp, 0); + event->channel = mswindows_find_frame (hwnd); event->timestamp = when; event->event.button.button = (msg==WM_LBUTTONDOWN || msg==WM_LBUTTONUP) ? 1 : @@ -955,8 +962,7 @@ mswindows_enqueue_mouse_button_event (HWND hwnd, UINT msg, POINTS where, DWORD w event->event.button.y = where.y; event->event.button.modifiers = mswindows_modifier_state (NULL, 0); - if (msg==WM_LBUTTONDOWN || msg==WM_MBUTTONDOWN || - msg==WM_RBUTTONDOWN) + if (downp) { event->event_type = button_press_event; SetCapture (hwnd); @@ -1664,6 +1670,9 @@ mswindows_handle_paint (struct frame *frame) windows are unmapped, however once we are in the guts of WM_PAINT we need to make sure that we don't register unmaps then because they will not actually occur. */ + /* #### commenting out the next line seems to fix some problems + but not all. only andy currently understands this stuff and + he needs to review it more carefully. --ben */ if (!check_for_ignored_expose (frame, x, y, width, height)) { hold_ignored_expose_registration = 1; @@ -1681,17 +1690,288 @@ mswindows_handle_paint (struct frame *frame) static int key_needs_default_processing_p (UINT vkey) { - if (mswindows_alt_by_itself_activates_menu && vkey == VK_MENU) + if (mswindows_alt_by_itself_activates_menu && vkey == VK_MENU + /* if we let ALT activate the menu like this, then sticky ALT-modified + keystrokes become impossible. */ + && !modifier_keys_are_sticky) return 1; return 0; } +/* key-handling code is always ugly. It just ends up working out + that way. + + #### Most of the sticky-modifier code below is copied from similar + code in event-Xt.c. They should somehow or other be merged. + + Here are some pointers: + + -- DOWN_MASK indicates which modifiers should be treated as "down" + when the corresponding upstroke happens. It gets reset for + a particular modifier when that modifier goes up, and reset + for all modifiers when a non-modifier key is pressed. Example: + + I press Control-A-Shift and then release Control-A-Shift. + I want the Shift key to be sticky but not the Control key. + + -- If a modifier key is sticky, I can unstick it by pressing + the modifier key again. */ + +static WPARAM last_downkey; +static int need_to_add_mask, down_mask; + +#define XEMSW_LCONTROL (1<<0) +#define XEMSW_RCONTROL (1<<1) +#define XEMSW_LSHIFT (1<<2) +#define XEMSW_RSHIFT (1<<3) +#define XEMSW_LMENU (1<<4) +#define XEMSW_RMENU (1<<5) + +static int +mswindows_handle_sticky_modifiers (WPARAM wParam, LPARAM lParam, + int downp, int keyp) +{ + int mods = 0; + + if (!modifier_keys_are_sticky) /* Optimize for non-sticky modifiers */ + return 0; + + if (! (keyp && + (wParam == VK_CONTROL || wParam == VK_LCONTROL || + wParam == VK_RCONTROL || + wParam == VK_MENU || wParam == VK_LMENU || + wParam == VK_RMENU || + wParam == VK_SHIFT || wParam == VK_LSHIFT || + wParam == VK_RSHIFT))) + { /* Not a modifier key */ + if (downp && keyp && !last_downkey) + last_downkey = wParam; + /* If I hold press-and-release the Control key and then press + and hold down the right arrow, I want it to auto-repeat + Control-Right. On the other hand, if I do the same but + manually press the Right arrow a bunch of times, I want + to see one Control-Right and then a bunch of Rights. + This means that we need to distinguish between an + auto-repeated key and a key pressed and released a bunch + of times. */ + else if (downp && !keyp || + (downp && keyp && last_downkey && + (wParam != last_downkey || + /* the "previous key state" bit indicates autorepeat */ + ! (lParam & (1 << 30))))) + { + need_to_add_mask = 0; + last_downkey = 0; + } + if (downp) + down_mask = 0; + + mods = need_to_add_mask; + } + else /* Modifier key pressed */ + { + /* If a non-modifier key was pressed in the middle of a bunch + of modifiers, then it unsticks all the modifiers that were + previously pressed. We cannot unstick the modifiers until + now because we want to check for auto-repeat of the + non-modifier key. */ + + if (last_downkey) + { + last_downkey = 0; + need_to_add_mask = 0; + } + +#define FROB(mask) \ +do { \ + if (downp && keyp) \ + { \ + /* If modifier key is already sticky, \ + then unstick it. Note that we do \ + not test down_mask to deal with the \ + unlikely but possible case that the \ + modifier key auto-repeats. */ \ + if (need_to_add_mask & mask) \ + { \ + need_to_add_mask &= ~mask; \ + down_mask &= ~mask; \ + } \ + else \ + down_mask |= mask; \ + } \ + else \ + { \ + if (down_mask & mask) \ + { \ + down_mask &= ~mask; \ + need_to_add_mask |= mask; \ + } \ + } \ +} while (0) + + if (wParam == VK_CONTROL && (lParam & 0x1000000) + || wParam == VK_RCONTROL) + FROB (XEMSW_RCONTROL); + if (wParam == VK_CONTROL && !(lParam & 0x1000000) + || wParam == VK_LCONTROL) + FROB (XEMSW_LCONTROL); + + if (wParam == VK_SHIFT && (lParam & 0x1000000) + || wParam == VK_RSHIFT) + FROB (XEMSW_RSHIFT); + if (wParam == VK_SHIFT && !(lParam & 0x1000000) + || wParam == VK_LSHIFT) + FROB (XEMSW_LSHIFT); + + if (wParam == VK_MENU && (lParam & 0x1000000) + || wParam == VK_RMENU) + FROB (XEMSW_RMENU); + if (wParam == VK_MENU && !(lParam & 0x1000000) + || wParam == VK_LMENU) + FROB (XEMSW_LMENU); + } +#undef FROB + + if (mods && downp) + { + BYTE keymap[256]; + + GetKeyboardState (keymap); + + if (mods & XEMSW_LCONTROL) + { + keymap [VK_CONTROL] |= 0x80; + keymap [VK_LCONTROL] |= 0x80; + } + if (mods & XEMSW_RCONTROL) + { + keymap [VK_CONTROL] |= 0x80; + keymap [VK_RCONTROL] |= 0x80; + } + + if (mods & XEMSW_LSHIFT) + { + keymap [VK_SHIFT] |= 0x80; + keymap [VK_LSHIFT] |= 0x80; + } + if (mods & XEMSW_RSHIFT) + { + keymap [VK_SHIFT] |= 0x80; + keymap [VK_RSHIFT] |= 0x80; + } + + if (mods & XEMSW_LMENU) + { + keymap [VK_MENU] |= 0x80; + keymap [VK_LMENU] |= 0x80; + } + if (mods & XEMSW_RMENU) + { + keymap [VK_MENU] |= 0x80; + keymap [VK_RMENU] |= 0x80; + } + + SetKeyboardState (keymap); + return 1; + } + + return 0; +} + +static void +clear_sticky_modifiers (void) +{ + need_to_add_mask = 0; + last_downkey = 0; + down_mask = 0; +} + +#ifdef DEBUG_XEMACS + +static void +output_modifier_keyboard_state (void) +{ + BYTE keymap[256]; + + GetKeyboardState (keymap); + + stderr_out ("GetKeyboardState VK_MENU %d %d VK_LMENU %d %d VK_RMENU %d %d\n", + keymap[VK_MENU] & 0x80 ? 1 : 0, + keymap[VK_MENU] & 0x1 ? 1 : 0, + keymap[VK_LMENU] & 0x80 ? 1 : 0, + keymap[VK_LMENU] & 0x1 ? 1 : 0, + keymap[VK_RMENU] & 0x80 ? 1 : 0, + keymap[VK_RMENU] & 0x1 ? 1 : 0); + stderr_out ("GetKeyboardState VK_CONTROL %d %d VK_LCONTROL %d %d VK_RCONTROL %d %d\n", + keymap[VK_CONTROL] & 0x80 ? 1 : 0, + keymap[VK_CONTROL] & 0x1 ? 1 : 0, + keymap[VK_LCONTROL] & 0x80 ? 1 : 0, + keymap[VK_LCONTROL] & 0x1 ? 1 : 0, + keymap[VK_RCONTROL] & 0x80 ? 1 : 0, + keymap[VK_RCONTROL] & 0x1 ? 1 : 0); + stderr_out ("GetKeyboardState VK_SHIFT %d %d VK_LSHIFT %d %d VK_RSHIFT %d %d\n", + keymap[VK_SHIFT] & 0x80 ? 1 : 0, + keymap[VK_SHIFT] & 0x1 ? 1 : 0, + keymap[VK_LSHIFT] & 0x80 ? 1 : 0, + keymap[VK_LSHIFT] & 0x1 ? 1 : 0, + keymap[VK_RSHIFT] & 0x80 ? 1 : 0, + keymap[VK_RSHIFT] & 0x1 ? 1 : 0); +} + +/* try to debug the stuck-alt-key problem. + + #### this happens only inconsistently, and may only happen when using + StickyKeys in the Win2000 accessibility section of the control panel, + which is extremely broken for other reasons. */ + +static void +output_alt_keyboard_state (void) +{ + BYTE keymap[256]; + SHORT keystate[3]; + // SHORT asyncstate[3]; + + GetKeyboardState (keymap); + keystate[0] = GetKeyState (VK_MENU); + keystate[1] = GetKeyState (VK_LMENU); + keystate[2] = GetKeyState (VK_RMENU); + /* Doing this interferes with key processing. */ +/* asyncstate[0] = GetAsyncKeyState (VK_MENU); */ +/* asyncstate[1] = GetAsyncKeyState (VK_LMENU); */ +/* asyncstate[2] = GetAsyncKeyState (VK_RMENU); */ + + stderr_out ("GetKeyboardState VK_MENU %d %d VK_LMENU %d %d VK_RMENU %d %d\n", + keymap[VK_MENU] & 0x80 ? 1 : 0, + keymap[VK_MENU] & 0x1 ? 1 : 0, + keymap[VK_LMENU] & 0x80 ? 1 : 0, + keymap[VK_LMENU] & 0x1 ? 1 : 0, + keymap[VK_RMENU] & 0x80 ? 1 : 0, + keymap[VK_RMENU] & 0x1 ? 1 : 0); + stderr_out ("GetKeyState VK_MENU %d %d VK_LMENU %d %d VK_RMENU %d %d\n", + keystate[0] & 0x8000 ? 1 : 0, + keystate[0] & 0x1 ? 1 : 0, + keystate[1] & 0x8000 ? 1 : 0, + keystate[1] & 0x1 ? 1 : 0, + keystate[2] & 0x8000 ? 1 : 0, + keystate[2] & 0x1 ? 1 : 0); +/* stderr_out ("GetAsyncKeyState VK_MENU %d %d VK_LMENU %d %d VK_RMENU %d %d\n", */ +/* asyncstate[0] & 0x8000 ? 1 : 0, */ +/* asyncstate[0] & 0x1 ? 1 : 0, */ +/* asyncstate[1] & 0x8000 ? 1 : 0, */ +/* asyncstate[1] & 0x1 ? 1 : 0, */ +/* asyncstate[2] & 0x8000 ? 1 : 0, */ +/* asyncstate[2] & 0x1 ? 1 : 0); */ +} + +#endif /* DEBUG_XEMACS */ + + /* * The windows procedure for the window class XEMACS_CLASS */ LRESULT WINAPI -mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { /* Note: Remember to initialize emacs_event and event before use. This code calls code that can GC. You must GCPRO before calling such code. */ @@ -1726,11 +2006,23 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_KEYUP: case WM_SYSKEYUP: + /* See Win95 comment under WM_KEYDOWN */ { BYTE keymap[256]; int should_set_keymap = 0; +#ifdef DEBUG_XEMACS + if (mswindows_debug_events) + { + stderr_out ("%s wparam=%d lparam=%d\n", + message == WM_KEYUP ? "WM_KEYUP" : "WM_SYSKEYUP", + wParam, (int)lParam); + output_alt_keyboard_state (); + } +#endif /* DEBUG_XEMACS */ + + mswindows_handle_sticky_modifiers (wParam, lParam, 0, 1); if (wParam == VK_CONTROL) { GetKeyboardState (keymap); @@ -1744,12 +2036,13 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) should_set_keymap = 1; } - if (should_set_keymap - && (message != WM_SYSKEYUP - || NILP (Vmenu_accelerator_enabled))) + if (should_set_keymap) + // && (message != WM_SYSKEYUP + // || NILP (Vmenu_accelerator_enabled))) SetKeyboardState (keymap); } + if (key_needs_default_processing_p (wParam)) goto defproc; else @@ -1757,6 +2050,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_KEYDOWN: case WM_SYSKEYDOWN: + /* In some locales the right-hand Alt key is labelled AltGr. This key * should produce alternative charcaters when combined with another key. * eg on a German keyboard pressing AltGr+q should produce '@'. @@ -1766,24 +2060,58 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) * We get round this by removing all modifiers from the keymap before * calling TranslateMessage() unless AltGr is *really* down. */ { - BYTE keymap[256]; + BYTE keymap_trans[256]; + BYTE keymap_orig[256]; + BYTE keymap_sticky[256]; int has_AltGr = mswindows_current_layout_has_AltGr (); - int mods; + int mods = 0; int extendedp = lParam & 0x1000000; Lisp_Object keysym; + int sticky_changed; +#ifdef DEBUG_XEMACS + if (mswindows_debug_events) + { + stderr_out ("%s wparam=%d lparam=%d\n", + message == WM_KEYDOWN ? "WM_KEYDOWN" : "WM_SYSKEYDOWN", + wParam, (int)lParam); + output_alt_keyboard_state (); + } +#endif /* DEBUG_XEMACS */ + + GetKeyboardState (keymap_orig); frame = XFRAME (mswindows_find_frame (hwnd)); - GetKeyboardState (keymap); - mods = mswindows_modifier_state (keymap, has_AltGr); + if ((sticky_changed = + mswindows_handle_sticky_modifiers (wParam, lParam, 1, 1))) + { + GetKeyboardState (keymap_sticky); + if (keymap_sticky[VK_MENU] & 0x80) + { + message = WM_SYSKEYDOWN; + /* We have to set the "context bit" so that the + TranslateMessage() call below that generates the + SYSCHAR message does its thing; see the documentation + on WM_SYSKEYDOWN */ + lParam |= 1 << 29; + } + } + else + memcpy (keymap_sticky, keymap_orig, 256); + + mods = mswindows_modifier_state (keymap_sticky, has_AltGr); /* Handle non-printables */ if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods, extendedp))) - mswindows_enqueue_keypress_event (hwnd, keysym, mods); + { + mswindows_enqueue_keypress_event (hwnd, keysym, mods); + if (sticky_changed) + SetKeyboardState (keymap_orig); + } else /* Normal keys & modifiers */ { - Emchar quit_ch = CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); - BYTE keymap_orig[256]; + Emchar quit_ch = + CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) }; MSG msg, tranmsg; int potential_accelerator = 0; @@ -1800,11 +2128,15 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) * to loosely track Left and Right modifiers on behalf of the OS, * without screwing up Windows NT which tracks them properly. */ if (wParam == VK_CONTROL) - keymap [extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80; + { + keymap_orig[extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80; + keymap_sticky[extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80; + } else if (wParam == VK_MENU) - keymap [extendedp ? VK_RMENU : VK_LMENU] |= 0x80; - - memcpy (keymap_orig, keymap, 256); + { + keymap_orig[extendedp ? VK_RMENU : VK_LMENU] |= 0x80; + keymap_sticky[extendedp ? VK_RMENU : VK_LMENU] |= 0x80; + } if (!NILP (Vmenu_accelerator_enabled) && !(mods & XEMACS_MOD_SHIFT) && message == WM_SYSKEYDOWN) @@ -1813,24 +2145,27 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Remove shift modifier from an ascii character */ mods &= ~XEMACS_MOD_SHIFT; + memcpy (keymap_trans, keymap_sticky, 256); + /* Clear control and alt modifiers unless AltGr is pressed */ - keymap [VK_RCONTROL] = 0; - keymap [VK_LMENU] = 0; - if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80) - || !(keymap [VK_RMENU] & 0x80)) + keymap_trans[VK_RCONTROL] = 0; + keymap_trans[VK_LMENU] = 0; + if (!has_AltGr || !(keymap_trans[VK_LCONTROL] & 0x80) + || !(keymap_trans[VK_RMENU] & 0x80)) { - keymap [VK_LCONTROL] = 0; - keymap [VK_CONTROL] = 0; - keymap [VK_RMENU] = 0; - keymap [VK_MENU] = 0; + keymap_trans[VK_LCONTROL] = 0; + keymap_trans[VK_CONTROL] = 0; + keymap_trans[VK_RMENU] = 0; + keymap_trans[VK_MENU] = 0; } - SetKeyboardState (keymap); + SetKeyboardState (keymap_trans); /* Maybe generate some WM_[SYS]CHARs in the queue */ TranslateMessage (&msg); while (PeekMessage (&tranmsg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE) - || PeekMessage (&tranmsg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE)) + || PeekMessage (&tranmsg, hwnd, WM_SYSCHAR, WM_SYSCHAR, + PM_REMOVE)) { int mods1 = mods; WPARAM ch = tranmsg.wParam; @@ -1840,9 +2175,12 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) upon dequeueing the event */ /* #### This might also not withstand localization, if quit character is not a latin-1 symbol */ - if (((quit_ch < ' ' && (mods & XEMACS_MOD_CONTROL) && quit_ch + 'a' - 1 == ch) - || (quit_ch >= ' ' && !(mods & XEMACS_MOD_CONTROL) && quit_ch == ch)) - && ((mods & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_SHIFT)) == 0)) + if (((quit_ch < ' ' && (mods & XEMACS_MOD_CONTROL) + && quit_ch + 'a' - 1 == ch) + || (quit_ch >= ' ' && !(mods & XEMACS_MOD_CONTROL) + && quit_ch == ch)) + && ((mods & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_SHIFT)) + == 0)) { mods1 |= FAKE_MOD_QUIT; ++mswindows_quit_chars_count; @@ -1855,16 +2193,21 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } mswindows_enqueue_keypress_event (hwnd, make_char (ch), mods1); } /* while */ - SetKeyboardState (keymap_orig); + /* This generates WM_SYSCHAR messages, which are interpreted by DefWindowProc as the menu selections. */ if (got_accelerator) { + SetKeyboardState (keymap_sticky); TranslateMessage (&msg); + SetKeyboardState (keymap_orig); goto defproc; } + + SetKeyboardState (keymap_orig); } /* else */ } + if (key_needs_default_processing_p (wParam)) goto defproc; else @@ -2389,7 +2732,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) (XCOLOR_INSTANCE (FACE_BACKGROUND (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); + XIMAGE_INSTANCE_FRAME (image_instance))))); } last_widget_brushed = ii; SetTextColor @@ -2398,7 +2741,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) (XCOLOR_INSTANCE (FACE_FOREGROUND (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); + XIMAGE_INSTANCE_FRAME (image_instance))))); SetBkMode (hdc, OPAQUE); SetBkColor (hdc, @@ -2406,7 +2749,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) (XCOLOR_INSTANCE (FACE_BACKGROUND (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); + XIMAGE_INSTANCE_FRAME (image_instance))))); return (LRESULT)widget_brush; } } @@ -2582,13 +2925,15 @@ mswindows_current_layout_has_AltGr (void) /* Returns the state of the modifier keys in the format expected by the * Lisp_Event key_data, button_data and motion_data modifiers member */ -int mswindows_modifier_state (BYTE* keymap, int has_AltGr) +static int +mswindows_modifier_state (BYTE* keymap, int has_AltGr) { int mods = 0; + BYTE keymap2[256]; if (keymap == NULL) { - keymap = (BYTE*) alloca(256); + keymap = keymap2; GetKeyboardState (keymap); has_AltGr = mswindows_current_layout_has_AltGr (); } @@ -2839,18 +3184,19 @@ emacs_mswindows_handle_magic_event (Lisp_Event *emacs_event) struct frame *f = XFRAME (frame); int in_p = (EVENT_MSWINDOWS_MAGIC_TYPE(emacs_event) == WM_SETFOCUS); Lisp_Object conser; + struct gcpro gcpro1; - /* struct gcpro gcpro1; */ - - /* Clear sticky modifiers here (if we had any) */ + /* On focus change, clear all memory of sticky modifiers + to avoid non-intuitive behavior. */ + clear_sticky_modifiers (); conser = Fcons (frame, Fcons (FRAME_DEVICE (f), in_p ? Qt : Qnil)); - /* GCPRO1 (conser); XXX Not necessary? */ + GCPRO1 (conser); emacs_handle_focus_change_preliminary (conser); /* Under X the stuff up to here is done in the X event handler. I Don't know why */ emacs_handle_focus_change_final (conser); - /* UNGCPRO; */ + UNGCPRO; } break; @@ -3165,6 +3511,20 @@ vars_of_event_mswindows (void) mswindows_error_caught_in_modal_loop = Qnil; staticpro (&mswindows_error_caught_in_modal_loop); + +#ifdef DEBUG_XEMACS + DEFVAR_INT ("mswindows-debug-events", &mswindows_debug_events /* +If non-zero, display debug information about Windows events that XEmacs sees. +Information is displayed in a console window. Currently defined values are: + +1 == non-verbose output +2 == verbose output + +#### Unfortunately, not yet implemented. +*/ ); + mswindows_debug_events = 0; +#endif + DEFVAR_BOOL ("mswindows-alt-by-itself-activates-menu", &mswindows_alt_by_itself_activates_menu /* *Controls whether pressing and releasing the Alt key activates the menubar. diff --git a/src/event-stream.c b/src/event-stream.c index e2b46bb..e3cbf1f 100644 --- a/src/event-stream.c +++ b/src/event-stream.c @@ -121,6 +121,8 @@ Lisp_Object Qpre_idle_hook, Vpre_idle_hook; /* Control gratuitous keyboard focus throwing. */ int focus_follows_mouse; +int modifier_keys_are_sticky; + #if 0 /* FSF Emacs crap */ /* Hook run after a command if there's no more input soon. */ Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook; @@ -4754,6 +4756,15 @@ you should *bind* this, not set it. */ ); Vretry_undefined_key_binding_unshifted = Qt; + DEFVAR_BOOL ("modifier-keys-are-sticky", &modifier_keys_are_sticky /* +*Non-nil makes modifier keys sticky. +This means that you can release the modifier key before pressing down +the key that you wish to be modified. Although this is non-standard +behavior, it is recommended because it reduces the strain on your hand, +thus reducing the incidence of the dreaded Emacs-pinky syndrome. +*/ ); + modifier_keys_are_sticky = 0; + #ifdef HAVE_XIM DEFVAR_LISP ("composed-character-default-binding", &Vcomposed_character_default_binding /* diff --git a/src/fns.c b/src/fns.c index d22368e..e3bce63 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3229,10 +3229,13 @@ Examples: (featurep '(or (and xemacs 19.15) (and emacs 19.34))) => ; Non-nil on XEmacs 19.15 and later, or FSF Emacs 19.34 and later. + (featurep '(and xemacs 21.02)) + => ; Non-nil on XEmacs 21.2 and later. + NOTE: The advanced arguments of this function (anything other than a symbol) are not yet supported by FSF Emacs. If you feel they are useful for supporting multiple Emacs variants, lobby Richard Stallman at -. +. */ (fexp)) { diff --git a/src/frame-msw.c b/src/frame-msw.c index f049a23..6679792 100644 --- a/src/frame-msw.c +++ b/src/frame-msw.c @@ -127,13 +127,6 @@ mswindows_init_frame_1 (struct frame *f, Lisp_Object props) abs (XINT (height)); /* Misc frame stuff */ - FRAME_MSWINDOWS_DATA(f)->button2_need_lbutton = 0; - FRAME_MSWINDOWS_DATA(f)->button2_need_rbutton = 0; - FRAME_MSWINDOWS_DATA(f)->button2_is_down = 0; - FRAME_MSWINDOWS_DATA(f)->ignore_next_lbutton_up = 0; - FRAME_MSWINDOWS_DATA(f)->ignore_next_rbutton_up = 0; - FRAME_MSWINDOWS_DATA(f)->sizing = 0; - FRAME_MSWINDOWS_DATA(f)->paint_pending = 0; FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil; #ifdef HAVE_TOOLBARS FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) = diff --git a/src/frame.c b/src/frame.c index fbb1a61..7549f4e 100644 --- a/src/frame.c +++ b/src/frame.c @@ -130,8 +130,6 @@ mark_frame (Lisp_Object obj) #define MARKED_SLOT(x) mark_object (f->x) #include "frameslots.h" - mark_subwindow_cachels (f->subwindow_cachels); - if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */ MAYBE_FRAMEMETH (f, mark_frame, (f)); @@ -208,7 +206,7 @@ allocate_frame_core (Lisp_Object device) f->last_nonminibuf_window = root_window; /* cache of subwindows visible on frame */ - f->subwindow_cachels = Dynarr_new (subwindow_cachel); + f->subwindow_instance_cache = make_weak_list (WEAK_LIST_SIMPLE); /* associated exposure ignore list */ f->subwindow_exposures = 0; @@ -466,7 +464,6 @@ See `set-frame-properties', `default-x-frame-plist', and #endif reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); - reset_subwindow_cachels (f); change_frame_size (f, f->height, f->width, 0); } @@ -1553,6 +1550,12 @@ delete_frame_internal (struct frame *f, int force, free_frame_toolbars (f); #endif free_frame_gutters (f); + /* Unfortunately deleting the frame will also delete the parent of + all of the subwindow instances current on the frame. I think this + can lead to bad things when trying to finalize the + instances. Thus we loop over the instance cache calling the + finalize method for each instance. */ + free_frame_subwindow_instance_cache (f); /* This must be done before the window and window_mirror structures are freed. The scrollbar information is attached to them. */ @@ -1564,11 +1567,7 @@ delete_frame_internal (struct frame *f, int force, f->root_window = Qnil; /* clear out the cached glyph information */ - if (f->subwindow_cachels) - { - Dynarr_free (f->subwindow_cachels); - f->subwindow_cachels = 0; - } + f->subwindow_instance_cache = Qnil; /* Remove the frame now from the list. This way, any events generated on this frame by the maneuvers below will disperse themselves. */ diff --git a/src/frame.h b/src/frame.h index e77a490..ceae5b0 100644 --- a/src/frame.h +++ b/src/frame.h @@ -94,9 +94,6 @@ struct frame int modiff; - /* subwindow cache elements for this frame */ - subwindow_cachel_dynarr *subwindow_cachels; - struct expose_ignore* subwindow_exposures; struct expose_ignore* subwindow_exposures_tail; @@ -547,7 +544,7 @@ extern int frame_changed; NON_LVALUE ((f)->last_nonminibuf_window) #define FRAME_SB_VCACHE(f) ((f)->sb_vcache) #define FRAME_SB_HCACHE(f) ((f)->sb_hcache) -#define FRAME_SUBWINDOW_CACHE(f) ((f)->subwindow_cachels) +#define FRAME_SUBWINDOW_CACHE(f) ((f)->subwindow_instance_cache) #if 0 /* FSFmacs */ diff --git a/src/frameslots.h b/src/frameslots.h index 4fe27bf..c473817 100644 --- a/src/frameslots.h +++ b/src/frameslots.h @@ -145,6 +145,9 @@ Boston, MA 02111-1307, USA. */ MARKED_SLOT_ARRAY (toolbar_border_width, 4); #endif +/* Cache of subwindow instances for this frame */ + MARKED_SLOT (subwindow_instance_cache); + /* Possible frame-local default for outside margin widths. */ MARKED_SLOT (left_margin_width); MARKED_SLOT (right_margin_width); diff --git a/src/general.c b/src/general.c index e3c8e4c..7ed8d4c 100644 --- a/src/general.c +++ b/src/general.c @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +Lisp_Object Qabort; Lisp_Object Qactually_requested; Lisp_Object Qafter; Lisp_Object Qall; @@ -47,8 +48,9 @@ Lisp_Object Qbottom; Lisp_Object Qbottom_margin; Lisp_Object Qbuffer; Lisp_Object Qbutton; -Lisp_Object Qcenter; +Lisp_Object Qcancel; Lisp_Object Qcategory; +Lisp_Object Qcenter; Lisp_Object Qchannel; Lisp_Object Qchar; Lisp_Object Qcharacter; @@ -82,18 +84,20 @@ Lisp_Object Qface; Lisp_Object Qfile_name; Lisp_Object Qfont; Lisp_Object Qframe; -Lisp_Object Qfunction; Lisp_Object Qfuncall; +Lisp_Object Qfunction; Lisp_Object Qgap_overhead; Lisp_Object Qgeneric; Lisp_Object Qgeometry; Lisp_Object Qglobal; Lisp_Object Qgutter; Lisp_Object Qheight; +Lisp_Object Qhelp; Lisp_Object Qhighlight; Lisp_Object Qhorizontal; Lisp_Object Qicon; Lisp_Object Qid; +Lisp_Object Qignore; Lisp_Object Qimage; Lisp_Object Qinfo; Lisp_Object Qinherit; @@ -122,11 +126,13 @@ Lisp_Object Qmotion; Lisp_Object Qmsprinter; Lisp_Object Qmswindows; Lisp_Object Qname; +Lisp_Object Qno; Lisp_Object Qnone; Lisp_Object Qnot; Lisp_Object Qnothing; Lisp_Object Qnotice; Lisp_Object Qobject; +Lisp_Object Qok; Lisp_Object Qold_assoc; Lisp_Object Qold_delete; Lisp_Object Qold_delq; @@ -147,6 +153,7 @@ Lisp_Object Qrassoc; Lisp_Object Qrassq; Lisp_Object Qrequire; Lisp_Object Qresource; +Lisp_Object Qretry; Lisp_Object Qreturn; Lisp_Object Qreverse; Lisp_Object Qright; @@ -179,16 +186,18 @@ Lisp_Object Qunimplemented; Lisp_Object Qvalue_assoc; Lisp_Object Qvertical; Lisp_Object Qwarning; -Lisp_Object Qwidth; Lisp_Object Qwidget; +Lisp_Object Qwidth; Lisp_Object Qwindow; Lisp_Object Qwindow_system; Lisp_Object Qx; Lisp_Object Qy; +Lisp_Object Qyes; void syms_of_general (void) { + defsymbol (&Qabort, "abort"); defsymbol (&Qactually_requested, "actually-requested"); defsymbol (&Qafter, "after"); defsymbol (&Qall, "all"); @@ -205,6 +214,7 @@ syms_of_general (void) defsymbol (&Qbottom_margin, "bottom-margin"); defsymbol (&Qbuffer, "buffer"); defsymbol (&Qbutton, "button"); + defsymbol (&Qcancel, "cancel"); defsymbol (&Qcategory, "category"); defsymbol (&Qcenter, "center"); defsymbol (&Qchannel, "channel"); @@ -240,18 +250,20 @@ syms_of_general (void) defsymbol (&Qfile_name, "file-name"); defsymbol (&Qfont, "font"); defsymbol (&Qframe, "frame"); - defsymbol (&Qfunction, "function"); defsymbol (&Qfuncall, "funcall"); + defsymbol (&Qfunction, "function"); defsymbol (&Qgap_overhead, "gap-overhead"); defsymbol (&Qgeneric, "generic"); defsymbol (&Qgeometry, "geometry"); defsymbol (&Qglobal, "global"); defsymbol (&Qgutter, "gutter"); defsymbol (&Qheight, "height"); + defsymbol (&Qhelp, "help"); defsymbol (&Qhighlight, "highlight"); defsymbol (&Qhorizontal, "horizontal"); defsymbol (&Qicon, "icon"); defsymbol (&Qid, "id"); + defsymbol (&Qignore, "ignore"); defsymbol (&Qimage, "image"); defsymbol (&Qinfo, "info"); defsymbol (&Qinherit, "inherit"); @@ -280,11 +292,13 @@ syms_of_general (void) defsymbol (&Qmsprinter, "msprinter"); defsymbol (&Qmswindows, "mswindows"); defsymbol (&Qname, "name"); + defsymbol (&Qno, "no"); defsymbol (&Qnone, "none"); defsymbol (&Qnot, "not"); defsymbol (&Qnothing, "nothing"); defsymbol (&Qnotice, "notice"); defsymbol (&Qobject, "object"); + defsymbol (&Qok, "ok"); defsymbol (&Qold_assoc, "old-assoc"); defsymbol (&Qold_delete, "old-delete"); defsymbol (&Qold_delq, "old-delq"); @@ -305,6 +319,7 @@ syms_of_general (void) defsymbol (&Qrassq, "rassq"); defsymbol (&Qrequire, "require"); defsymbol (&Qresource, "resource"); + defsymbol (&Qretry, "retry"); defsymbol (&Qreturn, "return"); defsymbol (&Qreverse, "reverse"); defsymbol (&Qright, "right"); @@ -337,10 +352,11 @@ syms_of_general (void) defsymbol (&Qvalue_assoc, "value-assoc"); defsymbol (&Qvertical, "vertical"); defsymbol (&Qwarning, "warning"); - defsymbol (&Qwidth, "width"); defsymbol (&Qwidget, "widget"); + defsymbol (&Qwidth, "width"); defsymbol (&Qwindow, "window"); defsymbol (&Qwindow_system, "window-system"); defsymbol (&Qx, "x"); defsymbol (&Qy, "y"); + defsymbol (&Qyes, "yes"); } diff --git a/src/glyphs-eimage.c b/src/glyphs-eimage.c index 928b8e6..cb61afa 100644 --- a/src/glyphs-eimage.c +++ b/src/glyphs-eimage.c @@ -56,6 +56,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "frame.h" #include "opaque.h" +#include "window.h" #include "sysfile.h" @@ -480,7 +481,7 @@ jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* Step 6.5: Create the pixmap and set up the image instance */ /* now instantiate */ - MAYBE_DEVMETH (XDEVICE (ii->device), + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), init_image_instance_from_eimage, (ii, cinfo.output_width, cinfo.output_height, 1, unwind.eimage, dest_mask, @@ -706,7 +707,7 @@ gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, } /* now instantiate */ - MAYBE_DEVMETH (XDEVICE (ii->device), + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), init_image_instance_from_eimage, (ii, width, height, unwind.giffile->ImageCount, unwind.eimage, dest_mask, instantiator, domain)); @@ -1017,7 +1018,7 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, } /* now instantiate */ - MAYBE_DEVMETH (XDEVICE (ii->device), + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), init_image_instance_from_eimage, (ii, width, height, 1, unwind.eimage, dest_mask, instantiator, domain)); @@ -1299,7 +1300,7 @@ tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, } /* now instantiate */ - MAYBE_DEVMETH (XDEVICE (ii->device), + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), init_image_instance_from_eimage, (ii, width, height, 1, unwind.eimage, dest_mask, instantiator, domain)); diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 440e272..1320e03 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* written by Andy Piper plagerising bits from +/* written by Andy Piper plagiarising bits from glyphs-x.c */ #include @@ -57,7 +57,6 @@ DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); -DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout); #ifdef HAVE_JPEG DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg); #endif @@ -80,6 +79,8 @@ DEFINE_DEVICE_IIFORMAT (msprinter, xbm); DEFINE_DEVICE_IIFORMAT (mswindows, xface); DEFINE_DEVICE_IIFORMAT (msprinter, xface); #endif +DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout); +DEFINE_DEVICE_IIFORMAT (mswindows, native_layout); DEFINE_DEVICE_IIFORMAT (mswindows, button); DEFINE_DEVICE_IIFORMAT (mswindows, edit_field); DEFINE_DEVICE_IIFORMAT (mswindows, subwindow); @@ -132,8 +133,7 @@ get_device_compdc (struct device *d) */ static void init_image_instance_geometry (Lisp_Image_Instance *ii) { - Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - struct device *d = XDEVICE (device); + struct device *d = DOMAIN_XDEVICE (ii->domain); if (/* #### Scaleable && */ DEVICE_MSPRINTER_P (d)) { @@ -349,8 +349,7 @@ init_image_instance_from_dibitmap (Lisp_Image_Instance *ii, int x_hot, int y_hot, int create_mask) { - Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - struct device *d = XDEVICE (device); + struct device *d = XDEVICE (IMAGE_INSTANCE_DEVICE (ii)); void* bmp_buf=0; enum image_instance_type type; HBITMAP bitmap; @@ -2072,11 +2071,13 @@ extern int debug_widget_instances; static void mswindows_finalize_image_instance (Lisp_Image_Instance *p) { - if (DEVICE_LIVE_P (XDEVICE (p->device))) + if (!p->data) + return; + + if (DEVICE_LIVE_P (XDEVICE (IMAGE_INSTANCE_DEVICE (p)))) { - if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET - || - IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) + if (image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (p)) + & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK)) { #ifdef DEBUG_WIDGETS debug_widget_instances--; @@ -2139,6 +2140,14 @@ mswindows_widget_hfont (Lisp_Image_Instance *p, return mswindows_get_hfont (XFONT_INSTANCE (font), under, strike); } +static HDWP +begin_defer_window_pos (struct frame *f) +{ + if (FRAME_MSWINDOWS_DATA (f)->hdwp == 0) + FRAME_MSWINDOWS_DATA (f)->hdwp = BeginDeferWindowPos (10); + return FRAME_MSWINDOWS_DATA (f)->hdwp; +} + /* unmap the image if it is a widget. This is used by redisplay via redisplay_unmap_subwindows */ static void @@ -2146,11 +2155,26 @@ mswindows_unmap_subwindow (Lisp_Image_Instance *p) { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) { - SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), - NULL, - 0, 0, 0, 0, - SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE - | SWP_NOSENDCHANGING); + struct frame *f = XFRAME (IMAGE_INSTANCE_FRAME (p)); + HDWP hdwp = begin_defer_window_pos (f); + HDWP new_hdwp; + new_hdwp = DeferWindowPos (hdwp, IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), + NULL, + 0, 0, 0, 0, + SWP_HIDEWINDOW | SWP_NOACTIVATE | + SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER + /* Setting this flag causes the call to + DeferWindowPos to fail with + "Invalid parameter". I don't understand + why we bother to try and set this + anyway. -- ben */ + /* | SWP_NOSENDCHANGING */ + ); + if (!new_hdwp) + mswindows_output_last_error ("unmapping"); + else + hdwp = new_hdwp; + FRAME_MSWINDOWS_DATA (f)->hdwp = hdwp; if (GetFocus() == WIDGET_INSTANCE_MSWINDOWS_HANDLE (p)) SetFocus (GetParent (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p))); } @@ -2162,6 +2186,9 @@ static void mswindows_map_subwindow (Lisp_Image_Instance *p, int x, int y, struct display_glyph_area* dga) { + struct frame *f = XFRAME (IMAGE_INSTANCE_FRAME (p)); + HDWP hdwp = begin_defer_window_pos (f); + HDWP new_hdwp; /* move the window before mapping it ... */ SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), NULL, @@ -2175,12 +2202,24 @@ mswindows_map_subwindow (Lisp_Image_Instance *p, int x, int y, SWP_NOZORDER | SWP_NOSIZE | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); /* ... now map it - we are not allowed to move it at the same time. */ - SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), - NULL, - 0, 0, 0, 0, - SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE - | SWP_SHOWWINDOW | SWP_NOCOPYBITS - | SWP_NOSENDCHANGING); + new_hdwp = DeferWindowPos (hdwp, IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), + NULL, + 0, 0, 0, 0, + SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE + | SWP_SHOWWINDOW + /* | SWP_NOCOPYBITS */ + /* Setting this flag causes the call to + DeferWindowPos to fail with + "Invalid parameter". I don't understand + why we bother to try and set this + anyway. -- ben */ + /* | SWP_NOSENDCHANGING */ + | SWP_NOACTIVATE); + if (!new_hdwp) + mswindows_output_last_error ("mapping"); + else + hdwp = new_hdwp; + FRAME_MSWINDOWS_DATA (f)->hdwp = hdwp; } /* resize the subwindow instance */ @@ -2188,11 +2227,12 @@ static void mswindows_resize_subwindow (Lisp_Image_Instance* ii, int w, int h) { /* Set the size of the control .... */ - SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), - NULL, - 0, 0, w, h, - SWP_NOZORDER | SWP_NOMOVE - | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); + if (!SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), + NULL, + 0, 0, w, h, + SWP_NOZORDER | SWP_NOMOVE + | SWP_NOCOPYBITS | SWP_NOSENDCHANGING)) + mswindows_output_last_error ("resizing"); } /* Simply resize the window here. */ @@ -2210,17 +2250,16 @@ static void mswindows_update_widget (Lisp_Image_Instance *p) { /* Possibly update the face font and colors. */ - if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p) - || - XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (p))->faces_changed - || - IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) + if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (p)) + && (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p) + || XFRAME (IMAGE_INSTANCE_FRAME (p))->faces_changed + || IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))) { /* set the widget font from the widget face */ SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), WM_SETFONT, (WPARAM) mswindows_widget_hfont - (p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)), + (p, IMAGE_INSTANCE_FRAME (p)), MAKELPARAM (TRUE, 0)); } /* Possibly update the dimensions. */ @@ -2231,7 +2270,8 @@ mswindows_update_widget (Lisp_Image_Instance *p) IMAGE_INSTANCE_HEIGHT (p)); } /* Possibly update the text in the widget. */ - if (IMAGE_INSTANCE_TEXT_CHANGED (p)) + if (IMAGE_INSTANCE_TEXT_CHANGED (p) + && !NILP (IMAGE_INSTANCE_WIDGET_TEXT (p))) { Extbyte* lparam=0; TO_EXTERNAL_FORMAT (LISP_STRING, IMAGE_INSTANCE_WIDGET_TEXT (p), @@ -2249,7 +2289,7 @@ static int mswindows_register_gui_item (Lisp_Object image_instance, Lisp_Object gui, Lisp_Object domain) { - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); struct frame* f = XFRAME (frame); int id = gui_item_id_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f), gui, @@ -2278,7 +2318,7 @@ mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instant { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); HWND wnd; CHECK_MSWINDOWS_DEVICE (device); @@ -2400,7 +2440,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat /* this function can call lisp */ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), style; - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); Extbyte* nm=0; HWND wnd; int id = 0xffff; @@ -2438,7 +2478,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat IMAGE_INSTANCE_WIDGET_WIDTH (ii), IMAGE_INSTANCE_WIDGET_HEIGHT (ii), /* parent window */ - FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), + DOMAIN_MSWINDOWS_HANDLE (domain), (HMENU)id, /* No menu */ NULL, /* must be null for this class */ NULL)) == NULL) @@ -2468,9 +2508,32 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat IMAGE_INSTANCE_SUBWINDOW_ID (ii) = wnd; SetWindowLong (wnd, GWL_USERDATA, (LONG)LISP_TO_VOID(image_instance)); /* set the widget font from the widget face */ - SendMessage (wnd, WM_SETFONT, - (WPARAM) mswindows_widget_hfont (ii, domain), - MAKELPARAM (TRUE, 0)); + if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii))) + SendMessage (wnd, WM_SETFONT, + (WPARAM) mswindows_widget_hfont (ii, domain), + MAKELPARAM (TRUE, 0)); +} + +/* Instantiate a native layout widget. */ +static void +mswindows_native_layout_instantiate (Lisp_Object image_instance, + Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "STATIC", + /* Approximation to styles available with + an XEmacs layout. */ + EQ (IMAGE_INSTANCE_LAYOUT_BORDER (ii), + Qetched_in) || + EQ (IMAGE_INSTANCE_LAYOUT_BORDER (ii), + Qetched_out) || + GLYPHP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)) + ? SS_ETCHEDFRAME : SS_SUNKEN, + 0); } /* Instantiate a button widget. Unfortunately instantiated widgets are @@ -2593,7 +2656,7 @@ mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object in (XCOLOR_INSTANCE (FACE_BACKGROUND (XIMAGE_INSTANCE_WIDGET_FACE (ii), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (ii)))))); + XIMAGE_INSTANCE_FRAME (ii)))))); #endif #ifdef PBS_SETBARCOLOR SendMessage (wnd, PBS_SETBARCOLOR, 0, @@ -2601,7 +2664,7 @@ mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object in (XCOLOR_INSTANCE (FACE_FOREGROUND (XIMAGE_INSTANCE_WIDGET_FACE (ii), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (ii)))))); + XIMAGE_INSTANCE_FRAME (ii)))))); #endif } @@ -2785,7 +2848,7 @@ mswindows_tab_control_update (Lisp_Object image_instance) LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))) { add_tab_item (image_instance, wnd, XCAR (rest), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii), i); + IMAGE_INSTANCE_FRAME (ii), i); if (gui_item_selected_p (XCAR (rest))) selected = i; i++; @@ -3013,7 +3076,6 @@ image_instantiator_format_create_glyphs_mswindows (void) { IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, nothing); IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, string); - IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, layout); IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, formatted_string); IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, inherit); /* image-instantiator types */ @@ -3046,44 +3108,41 @@ image_instantiator_format_create_glyphs_mswindows (void) IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, gif); #endif #ifdef HAVE_WIDGETS + INITIALIZE_DEVICE_IIFORMAT (mswindows, widget); + IIFORMAT_HAS_DEVMETHOD (mswindows, widget, property); + /* layout widget */ + IIFORMAT_VALID_CONSOLE (mswindows, layout); + INITIALIZE_DEVICE_IIFORMAT (mswindows, native_layout); + IIFORMAT_HAS_DEVMETHOD (mswindows, native_layout, instantiate); /* button widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, button); IIFORMAT_HAS_DEVMETHOD (mswindows, button, property); IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate); IIFORMAT_HAS_DEVMETHOD (mswindows, button, update); - + /* edit-field widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, edit_field); IIFORMAT_HAS_DEVMETHOD (mswindows, edit_field, instantiate); - + /* subwindow */ INITIALIZE_DEVICE_IIFORMAT (mswindows, subwindow); IIFORMAT_HAS_DEVMETHOD (mswindows, subwindow, instantiate); - - INITIALIZE_DEVICE_IIFORMAT (mswindows, widget); - IIFORMAT_HAS_DEVMETHOD (mswindows, widget, property); - /* label */ INITIALIZE_DEVICE_IIFORMAT (mswindows, label); IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate); - /* combo box */ INITIALIZE_DEVICE_IIFORMAT (mswindows, combo_box); IIFORMAT_HAS_DEVMETHOD (mswindows, combo_box, property); IIFORMAT_HAS_DEVMETHOD (mswindows, combo_box, instantiate); - /* scrollbar */ INITIALIZE_DEVICE_IIFORMAT (mswindows, scrollbar); IIFORMAT_HAS_DEVMETHOD (mswindows, scrollbar, instantiate); - /* progress gauge */ INITIALIZE_DEVICE_IIFORMAT (mswindows, progress_gauge); IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, update); IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, instantiate); - /* tree view widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, tree_view); /* IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);*/ IIFORMAT_HAS_DEVMETHOD (mswindows, tree_view, instantiate); - /* tab control widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, tab_control); IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, instantiate); diff --git a/src/glyphs-msw.h b/src/glyphs-msw.h index 80d7c64..c2cba15 100644 --- a/src/glyphs-msw.h +++ b/src/glyphs-msw.h @@ -96,14 +96,21 @@ struct mswindows_subwindow_data }; #define MSWINDOWS_SUBWINDOW_DATA(i) \ -((struct mswindows_subwindow_data *) (i)->data) - + ((struct mswindows_subwindow_data *) (i)->data) #define IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW(i) \ (MSWINDOWS_SUBWINDOW_DATA (i)->clip_window) +#define XIMAGE_INSTANCE_MSWINDOWS_SUBWINDOW_DATA(i) \ + MSWINDOWS_SUBWINDOW_DATA (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW(i) \ IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (XIMAGE_INSTANCE (i)) +#define DOMAIN_MSWINDOWS_HANDLE(domain) \ + ((IMAGE_INSTANCEP (domain) && \ + XIMAGE_INSTANCE_MSWINDOWS_SUBWINDOW_DATA (domain)) ? \ + XWIDGET_INSTANCE_MSWINDOWS_HANDLE (domain) : \ + FRAME_MSWINDOWS_HANDLE (DOMAIN_XFRAME (domain))) + #endif /* HAVE_MS_WINDOWS */ #endif /* INCLUDED_glyphs_msw_h_ */ diff --git a/src/glyphs-widget.c b/src/glyphs-widget.c index 8456c25..d7c8c58 100644 --- a/src/glyphs-widget.c +++ b/src/glyphs-widget.c @@ -55,12 +55,13 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab_control); Lisp_Object Qtab_control; DEFINE_IMAGE_INSTANTIATOR_FORMAT (layout); Lisp_Object Qlayout; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (native_layout); +Lisp_Object Qnative_layout; Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items; Lisp_Object Q_image, Q_text, Q_orientation, Q_justify, Q_border; +Lisp_Object Q_margin_width; Lisp_Object Qetched_in, Qetched_out, Qbevel_in, Qbevel_out; -Lisp_Object Vwidget_callback_current_channel; -Lisp_Object Qwidget_callback_current_channel; #ifdef DEBUG_WIDGETS int debug_widget_instances; @@ -274,7 +275,7 @@ widget_property (Lisp_Object image_instance, Lisp_Object prop) return Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), prop, Qnil); /* .. then try device specific methods ... */ - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (image_instance), IMAGE_INSTANCE_WIDGET_TYPE (ii), ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, property)) @@ -304,7 +305,7 @@ widget_set_property (Lisp_Object image_instance, Lisp_Object prop, Lisp_Object v } /* Now try device specific methods first ... */ - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (image_instance), IMAGE_INSTANCE_WIDGET_TYPE (ii), ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, set_property) @@ -331,30 +332,32 @@ widget_set_property (Lisp_Object image_instance, Lisp_Object prop, Lisp_Object v } /* Like the rest of redisplay, we want widget updates to occur -asynchronously. Thus toolkit specific methods for setting properties -must be called by redisplay instead of by *_set_property. Thus -*_set_property records the change and this function actually -implements it. We want to be slightly clever about this however by -supplying format specific functions for the updates instead of lumping -them all into this function. Note that there is no need for format -generic functions. */ + asynchronously. Thus toolkit specific methods for setting + properties must be called by redisplay instead of by + *_set_property. Thus *_set_property records the change and this + function actually implements it. We want to be slightly clever + about this however by supplying format specific functions for the + updates instead of lumping them all into this function. Note that + there is no need for format generic functions. */ void update_widget (Lisp_Object widget) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (widget); struct image_instantiator_methods* meths; - if (IMAGE_INSTANCE_TYPE (ii) != IMAGE_WIDGET) + if (!WIDGET_IMAGE_INSTANCEP (widget) + || EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout) + || EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qnative_layout)) return; /* Device generic methods. We must update the widget's size as it may have been changed by the the layout routines. We also do this here so that explicit resizing from lisp does not result in synchronous updates. */ - MAYBE_DEVMETH (XDEVICE (ii->device), update_widget, (ii)); + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), update_widget, (ii)); /* Device-format specific methods */ - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (widget), IMAGE_INSTANCE_WIDGET_TYPE (ii), ERROR_ME_NOT); MAYBE_IIFORMAT_METH (meths, update, (widget)); @@ -389,7 +392,7 @@ widget_query_geometry (Lisp_Object image_instance, IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii)) { /* .. then try device specific methods ... */ - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (image_instance), IMAGE_INSTANCE_WIDGET_TYPE (ii), ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry)) @@ -437,7 +440,7 @@ widget_query_geometry (Lisp_Object image_instance, } } -static void +static int widget_layout (Lisp_Object image_instance, unsigned int width, unsigned int height, Lisp_Object domain) { @@ -445,21 +448,22 @@ widget_layout (Lisp_Object image_instance, struct image_instantiator_methods* meths; /* .. then try device specific methods ... */ - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (image_instance), IMAGE_INSTANCE_WIDGET_TYPE (ii), ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, layout)) - IIFORMAT_METH (meths, layout, (image_instance, - width, height, domain)); + return IIFORMAT_METH (meths, layout, (image_instance, + width, height, domain)); else { /* ... then format specific methods ... */ meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii), ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, layout)) - IIFORMAT_METH (meths, layout, (image_instance, - width, height, domain)); + return IIFORMAT_METH (meths, layout, (image_instance, + width, height, domain)); } + return 1; } static void @@ -516,6 +520,7 @@ initialize_widget_image_instance (Lisp_Image_Instance *ii, Lisp_Object type) IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil; SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Qnil); IMAGE_INSTANCE_WIDGET_ITEMS (ii) = allocate_gui_item (); + IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = Qnil; IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil; IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii) = Qnil; IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii) = Qnil; @@ -547,15 +552,15 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object props = find_keyword_in_vector (instantiator, Q_properties); Lisp_Object items = find_keyword_in_vector (instantiator, Q_items); Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation); + Lisp_Object mwidth = find_keyword_in_vector (instantiator, Q_margin_width); int pw=0, ph=0, tw=0, th=0; /* this just does pixel type sizing */ subwindow_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain); - - if (!(dest_mask & (IMAGE_WIDGET_MASK | IMAGE_LAYOUT_MASK))) - incompatible_image_types (instantiator, dest_mask, - IMAGE_WIDGET_MASK | IMAGE_LAYOUT_MASK); + + if (!(dest_mask & IMAGE_WIDGET_MASK)) + incompatible_image_types (instantiator, dest_mask, IMAGE_WIDGET_MASK); initialize_widget_image_instance (ii, XVECTOR_DATA (instantiator)[0]); @@ -566,57 +571,10 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, if (!NILP (face)) SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Fget_face (face)); - /* Do layout specific initialisation. This feels a bit tacky, but - the alternative is a myriad of different little functions. */ - if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout)) - { - Lisp_Object rest, children = Qnil; - Lisp_Object border = find_keyword_in_vector (instantiator, Q_border); - - if (NILP (orient)) - { - IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_VERTICAL; - } - IMAGE_INSTANCE_TYPE (ii) = IMAGE_LAYOUT; - - if (EQ (border, Qt)) - { - IMAGE_INSTANCE_LAYOUT_BORDER (ii) = Qetched_in; - } - else if (GLYPHP (border)) - { - /* We are going to be sneaky here and add the border text as - just another child, the layout and output routines don't know - this and will just display at the offsets we prescribe. */ - Lisp_Object gii = glyph_image_instance (border, domain, ERROR_ME, 1); - /* make sure we are designated as the parent. */ - XIMAGE_INSTANCE_PARENT (gii) = image_instance; - children = Fcons (gii, children); - IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (0); - } - else - { - IMAGE_INSTANCE_LAYOUT_BORDER (ii) = border; - } - - /* Pick up the sub-widgets. */ - LIST_LOOP (rest, items) - { - /* make sure the image is instantiated */ - Lisp_Object gii = glyph_image_instance (XCAR (rest), domain, ERROR_ME, 1); - /* make sure we are designated as the parent. */ - XIMAGE_INSTANCE_PARENT (gii) = image_instance; - children = Fcons (gii, children); - } - /* Make sure elements in the layout are in the order the - user expected. */ - children = Fnreverse (children); - IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children; - } /* retrieve the gui item information. This is easy if we have been provided with a vector, more difficult if we have just been given keywords */ - else if (STRINGP (desc) || NILP (desc)) + if (STRINGP (desc) || NILP (desc)) { /* big cheat - we rely on the fact that a gui item looks like an instantiator */ IMAGE_INSTANCE_WIDGET_ITEMS (ii) = @@ -626,14 +584,16 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, else IMAGE_INSTANCE_WIDGET_ITEMS (ii) = gui_parse_item_keywords_no_errors (desc); - + /* Pick up the orientation before we do our first layout. */ if (EQ (orient, Qleft) || EQ (orient, Qright) || EQ (orient, Qvertical)) IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_VERTICAL; /* parse more gui items out of the properties */ if (!NILP (props) - && !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout)) + && + !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout) + && !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qnative_layout)) { if (NILP (items)) { @@ -709,15 +669,23 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0; } - /* When we create the widgets the window system expects a valid - size, so If we still don' t have sizes, call layout to pick them - up. If query_geometry or layout relies on the widget being in - existence then we are in catch 22. */ - image_instance_layout (image_instance, - pw ? pw : IMAGE_UNSPECIFIED_GEOMETRY, - ph ? ph : IMAGE_UNSPECIFIED_GEOMETRY, - domain); + /* Pick up the margin width. */ + if (!NILP (mwidth)) + IMAGE_INSTANCE_MARGIN_WIDTH (ii) = XINT (mwidth); + + /* Layout for the layout widget is premature at this point since the + children will not have been instantiated. We can't instantiate + them until the device instantiation method for the layout has + been executed. We do however want to record any specified + dimensions. */ + if (pw) IMAGE_INSTANCE_WIDTH (ii) = pw; + if (ph) IMAGE_INSTANCE_HEIGHT (ii) = ph; +} +static void +widget_post_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object domain) +{ #ifdef DEBUG_WIDGETS debug_widget_instances++; stderr_out ("instantiated "); @@ -878,12 +846,6 @@ progress_gauge_set_property (Lisp_Object image_instance, /***************************************************************************** * widget layout * *****************************************************************************/ -static int -layout_possible_dest_types (void) -{ - return IMAGE_LAYOUT_MASK; -} - /* we need to convert things like glyphs to images, eval expressions etc.*/ static Lisp_Object @@ -911,6 +873,79 @@ layout_normalize (Lisp_Object inst, Lisp_Object console_type) return inst; } +static void +layout_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation); + Lisp_Object border = find_keyword_in_vector (instantiator, Q_border); + + /* Do widget type instantiation first. */ + widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, + dest_mask, domain); + + if (NILP (orient)) + { + IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_VERTICAL; + } + + if (EQ (border, Qt)) + { + IMAGE_INSTANCE_LAYOUT_BORDER (ii) = Qetched_in; + } + else + { + IMAGE_INSTANCE_LAYOUT_BORDER (ii) = border; + } + /* We don't do the children yet as we might not have a containing + window. */ +} + +static void +layout_post_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object domain) +{ + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object items = find_keyword_in_vector (instantiator, Q_items); + Lisp_Object rest, children = Qnil; + + if (GLYPHP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))) + { + /* We are going to be sneaky here and add the border text as + just another child, the layout and output routines don't know + this and will just display at the offsets we prescribe. */ + Lisp_Object gii = glyph_image_instance + (IMAGE_INSTANCE_LAYOUT_BORDER (ii), + image_instance, ERROR_ME, 1); + + if (!IMAGE_INSTANCEP (gii)) + return; + /* make sure we are designated as the parent. */ + XIMAGE_INSTANCE_PARENT (gii) = image_instance; + children = Fcons (gii, children); + IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (0); + } + + /* Pick up the sub-widgets. */ + LIST_LOOP (rest, items) + { + /* make sure the image is instantiated */ + Lisp_Object gii = glyph_image_instance (XCAR (rest), + image_instance, ERROR_ME, 1); + if (!IMAGE_INSTANCEP (gii)) + return; + /* make sure we are designated as the parent. */ + XIMAGE_INSTANCE_PARENT (gii) = image_instance; + children = Fcons (gii, children); + } + /* Make sure elements in the layout are in the order the + user expected. */ + children = Fnreverse (children); + IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children; +} + /* Layout widget. Sizing commentary: we have a number of problems that we would like to address. Some consider some of these more important than others. It used to be that size information was @@ -969,6 +1004,10 @@ layout_query_geometry (Lisp_Object image_instance, unsigned int* width, int maxph = 0, maxpw = 0, nitems = 0, ph_adjust = 0; unsigned int gheight, gwidth; + /* If we are not initialized then we won't have any children. */ + if (!IMAGE_INSTANCE_INITIALIZED (ii)) + return; + /* First just set up what we already have. */ if (width) *width = IMAGE_INSTANCE_WIDTH (ii); if (height) *height = IMAGE_INSTANCE_HEIGHT (ii); @@ -1018,9 +1057,11 @@ layout_query_geometry (Lisp_Object image_instance, unsigned int* width, } else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_HORIZONTAL) - *width = maxpw + (nitems + 1) * WIDGET_BORDER_WIDTH * 2; + *width = maxpw + ((nitems + 1) * WIDGET_BORDER_WIDTH + + IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2; else - *width = maxpw + 2 * WIDGET_BORDER_WIDTH * 2; + *width = maxpw + 2 * (WIDGET_BORDER_WIDTH * 2 + + IMAGE_INSTANCE_MARGIN_WIDTH (ii)); /* Work out vertical spacings. */ if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii))) @@ -1032,12 +1073,14 @@ layout_query_geometry (Lisp_Object image_instance, unsigned int* width, } else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_VERTICAL) - *height = maxph + (nitems + 1) * WIDGET_BORDER_HEIGHT * 2 + ph_adjust; + *height = maxph + ((nitems + 1) * WIDGET_BORDER_HEIGHT + + IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2 + ph_adjust; else - *height = maxph + 2 * WIDGET_BORDER_HEIGHT * 2 + ph_adjust; + *height = maxph + (2 * WIDGET_BORDER_HEIGHT + + IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2 + ph_adjust; } -static void +int layout_layout (Lisp_Object image_instance, unsigned int width, unsigned int height, Lisp_Object domain) { @@ -1047,7 +1090,11 @@ layout_layout (Lisp_Object image_instance, int x, y, maxph = 0, maxpw = 0, nitems = 0, horiz_spacing, vert_spacing, ph_adjust = 0; unsigned int gheight, gwidth; - + + /* If we are not initialized then we won't have any children. */ + if (!IMAGE_INSTANCE_INITIALIZED (ii)) + return 0; + /* Pick up the border text if we have one. */ if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))) { @@ -1095,20 +1142,26 @@ layout_layout (Lisp_Object image_instance, == LAYOUT_HORIZONTAL) /* We have a larger area to display in so distribute the space evenly. */ - horiz_spacing = (width - maxpw) / (nitems + 1); + horiz_spacing = (width - (maxpw + + IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2)) + / (nitems + 1); else - horiz_spacing = (width - maxpw) / 2; + horiz_spacing = (width - maxpw) / 2 + - IMAGE_INSTANCE_MARGIN_WIDTH (ii); if (height < maxph) vert_spacing = WIDGET_BORDER_HEIGHT * 2; else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_VERTICAL) - vert_spacing = (height - (maxph + ph_adjust)) / (nitems + 1); + vert_spacing = (height - (maxph + ph_adjust + + IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2)) + / (nitems + 1); else - vert_spacing = (height - (maxph + ph_adjust)) / 2; + vert_spacing = (height - (maxph + ph_adjust)) / 2 + - IMAGE_INSTANCE_MARGIN_WIDTH (ii); - y = vert_spacing + ph_adjust; - x = horiz_spacing; + y = vert_spacing + ph_adjust + IMAGE_INSTANCE_MARGIN_WIDTH (ii); + x = horiz_spacing + IMAGE_INSTANCE_MARGIN_WIDTH (ii); /* Now flip through putting items where we want them, paying attention to justification. Make sure we don't mess with the @@ -1156,6 +1209,41 @@ layout_layout (Lisp_Object image_instance, /* Now layout subwidgets if they require it. */ image_instance_layout (glyph, gwidth, gheight, domain); } + return 1; +} + +/* Layout subwindows if they are real subwindows. */ +static int +native_layout_layout (Lisp_Object image_instance, + unsigned int width, unsigned int height, + Lisp_Object domain) +{ + Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object rest; + + /* The first time this gets called, the layout will be only + partially instantiated. The children get done in + post_instantiate. */ + if (!IMAGE_INSTANCE_INITIALIZED (ii)) + return 0; + + /* Defining this overrides the default layout_layout so we first have to call that to get + suitable instances and values set up. */ + layout_layout (image_instance, width, height, domain); + + LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (ii)) + { + struct display_glyph_area dga; + dga.xoffset = 0; + dga.yoffset = 0; + dga.width = IMAGE_INSTANCE_WIDTH (ii); + dga.height = IMAGE_INSTANCE_HEIGHT (ii); + + map_subwindow (XCAR (rest), + IMAGE_INSTANCE_XOFFSET (ii), + IMAGE_INSTANCE_YOFFSET (ii), &dga); + } + return 1; } @@ -1176,12 +1264,12 @@ syms_of_glyphs_widget (void) defkeyword (&Q_orientation, ":orientation"); defkeyword (&Q_justify, ":justify"); defkeyword (&Q_border, ":border"); + defkeyword (&Q_margin_width, ":margin-width"); defsymbol (&Qetched_in, "etched-in"); defsymbol (&Qetched_out, "etched-out"); defsymbol (&Qbevel_in, "bevel-in"); defsymbol (&Qbevel_out, "bevel-out"); - defsymbol (&Qwidget_callback_current_channel, "widget-callback-current-channel"); } #define VALID_GUI_KEYWORDS(type) do { \ @@ -1225,7 +1313,9 @@ static void image_instantiator_buttons (void) IIFORMAT_HAS_SHARED_METHOD (button, validate, widget); IIFORMAT_HAS_SHARED_METHOD (button, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (button, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (button, post_instantiate, widget); IIFORMAT_HAS_SHARED_METHOD (button, normalize, widget); + IIFORMAT_HAS_SHARED_METHOD (button, governing_domain, subwindow); IIFORMAT_HAS_METHOD (button, query_geometry); IIFORMAT_VALID_KEYWORD (button, Q_image, check_valid_glyph_or_instantiator); @@ -1239,6 +1329,8 @@ static void image_instantiator_edit_fields (void) IIFORMAT_HAS_SHARED_METHOD (edit_field, validate, widget); IIFORMAT_HAS_SHARED_METHOD (edit_field, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (edit_field, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (edit_field, post_instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (edit_field, governing_domain, subwindow); VALID_WIDGET_KEYWORDS (edit_field); VALID_GUI_KEYWORDS (edit_field); } @@ -1248,6 +1340,8 @@ static void image_instantiator_combo_box (void) INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo_box, "combo-box"); IIFORMAT_HAS_METHOD (combo_box, validate); IIFORMAT_HAS_SHARED_METHOD (combo_box, possible_dest_types, widget); + IIFORMAT_HAS_SHARED_METHOD (combo_box, governing_domain, subwindow); + VALID_GUI_KEYWORDS (combo_box); IIFORMAT_VALID_KEYWORD (combo_box, Q_width, check_valid_int); @@ -1263,6 +1357,8 @@ static void image_instantiator_scrollbar (void) IIFORMAT_HAS_SHARED_METHOD (scrollbar, validate, widget); IIFORMAT_HAS_SHARED_METHOD (scrollbar, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (scrollbar, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (scrollbar, post_instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (scrollbar, governing_domain, subwindow); VALID_GUI_KEYWORDS (scrollbar); IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int_or_function); @@ -1276,6 +1372,8 @@ static void image_instantiator_progress_guage (void) IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget); IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (progress_gauge, post_instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (progress_gauge, governing_domain, subwindow); IIFORMAT_HAS_METHOD (progress_gauge, set_property); VALID_WIDGET_KEYWORDS (progress_gauge); VALID_GUI_KEYWORDS (progress_gauge); @@ -1287,6 +1385,8 @@ static void image_instantiator_tree_view (void) IIFORMAT_HAS_SHARED_METHOD (tree_view, validate, combo_box); IIFORMAT_HAS_SHARED_METHOD (tree_view, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (tree_view, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (tree_view, post_instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (tree_view, governing_domain, subwindow); IIFORMAT_HAS_METHOD (tree_view, query_geometry); VALID_WIDGET_KEYWORDS (tree_view); VALID_GUI_KEYWORDS (tree_view); @@ -1299,6 +1399,8 @@ static void image_instantiator_tab_control (void) IIFORMAT_HAS_SHARED_METHOD (tab_control, validate, combo_box); IIFORMAT_HAS_SHARED_METHOD (tab_control, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (tab_control, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (tab_control, post_instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (tab_control, governing_domain, subwindow); IIFORMAT_HAS_METHOD (tab_control, query_geometry); IIFORMAT_HAS_METHOD (tab_control, set_property); VALID_WIDGET_KEYWORDS (tab_control); @@ -1312,24 +1414,50 @@ static void image_instantiator_labels (void) INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label"); IIFORMAT_HAS_SHARED_METHOD (label, possible_dest_types, widget); IIFORMAT_HAS_SHARED_METHOD (label, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (label, post_instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (label, governing_domain, subwindow); VALID_WIDGET_KEYWORDS (label); IIFORMAT_VALID_KEYWORD (label, Q_descriptor, check_valid_string); } +#define VALID_LAYOUT_KEYWORDS(layout) \ + VALID_WIDGET_KEYWORDS (layout); \ + IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation); \ + IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification); \ + IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border); \ + IIFORMAT_VALID_KEYWORD (layout, Q_margin_width, check_valid_int); \ + IIFORMAT_VALID_KEYWORD (layout, Q_items, \ + check_valid_glyph_or_instantiator_list) + static void image_instantiator_layout (void) { INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (layout, "layout"); - IIFORMAT_HAS_METHOD (layout, possible_dest_types); - IIFORMAT_HAS_SHARED_METHOD (layout, instantiate, widget); + IIFORMAT_HAS_SHARED_METHOD (layout, possible_dest_types, widget); + IIFORMAT_HAS_METHOD (layout, instantiate); + IIFORMAT_HAS_METHOD (layout, post_instantiate); + IIFORMAT_HAS_SHARED_METHOD (layout, governing_domain, subwindow); IIFORMAT_HAS_METHOD (layout, normalize); IIFORMAT_HAS_METHOD (layout, query_geometry); IIFORMAT_HAS_METHOD (layout, layout); - VALID_WIDGET_KEYWORDS (layout); - IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation); - IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification); - IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border); - IIFORMAT_VALID_KEYWORD (layout, Q_items, - check_valid_glyph_or_instantiator_list); + + VALID_GUI_KEYWORDS (layout); + VALID_LAYOUT_KEYWORDS (layout); +} + +static void image_instantiator_native_layout (void) +{ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (native_layout, "native-layout"); + IIFORMAT_HAS_SHARED_METHOD (native_layout, possible_dest_types, widget); + IIFORMAT_HAS_SHARED_METHOD (native_layout, instantiate, layout); + IIFORMAT_HAS_SHARED_METHOD (native_layout, post_instantiate, layout); + IIFORMAT_HAS_METHOD (native_layout, layout); + IIFORMAT_HAS_SHARED_METHOD (native_layout, governing_domain, subwindow); + IIFORMAT_HAS_SHARED_METHOD (native_layout, normalize, layout); + IIFORMAT_HAS_SHARED_METHOD (native_layout, query_geometry, layout); + IIFORMAT_HAS_SHARED_METHOD (native_layout, layout, layout); + + VALID_GUI_KEYWORDS (native_layout); + VALID_LAYOUT_KEYWORDS (native_layout); } void @@ -1345,6 +1473,7 @@ image_instantiator_format_create_glyphs_widget (void) image_instantiator_tab_control(); image_instantiator_labels(); image_instantiator_layout(); + image_instantiator_native_layout(); } void @@ -1359,10 +1488,4 @@ void vars_of_glyphs_widget (void) { reinit_vars_of_glyphs_widget (); - - DEFVAR_LISP ("widget-callback-current-channel", &Vwidget_callback_current_channel /* -The domain that is current when a widget callback is invoked. -This is invariably the frame that the widget is instantiated in. -*/); - Vwidget_callback_current_channel = Qnil; } diff --git a/src/glyphs-x.c b/src/glyphs-x.c index 4ed6e97..2b6d350 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -98,7 +98,6 @@ DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); -DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout); #ifdef HAVE_JPEG DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg); #endif @@ -128,7 +127,9 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (font); DEFINE_IMAGE_INSTANTIATOR_FORMAT (autodetect); #ifdef HAVE_WIDGETS +DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout); DEFINE_DEVICE_IIFORMAT (x, widget); +DEFINE_DEVICE_IIFORMAT (x, native_layout); DEFINE_DEVICE_IIFORMAT (x, button); DEFINE_DEVICE_IIFORMAT (x, progress_gauge); DEFINE_DEVICE_IIFORMAT (x, edit_field); @@ -394,11 +395,14 @@ x_finalize_image_instance (Lisp_Image_Instance *p) if (!p->data) return; - if (DEVICE_LIVE_P (XDEVICE (p->device))) + if (DEVICE_LIVE_P (XDEVICE (IMAGE_INSTANCE_DEVICE (p)))) { - Display *dpy = DEVICE_X_DISPLAY (XDEVICE (p->device)); - - if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET) + Display *dpy = DEVICE_X_DISPLAY + (XDEVICE (IMAGE_INSTANCE_DEVICE (p))); + if (0) + ; +#ifdef HAVE_WIDGETS + else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET) { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) { @@ -408,10 +412,15 @@ x_finalize_image_instance (Lisp_Image_Instance *p) #endif lw_destroy_widget (IMAGE_INSTANCE_X_WIDGET_ID (p)); lw_destroy_widget (IMAGE_INSTANCE_X_CLIPWIDGET (p)); + + /* We can release the callbacks again. */ + ungcpro_popup_callbacks (IMAGE_INSTANCE_X_WIDGET_LWID (p)); + IMAGE_INSTANCE_X_WIDGET_ID (p) = 0; IMAGE_INSTANCE_X_CLIPWIDGET (p) = 0; } } +#endif else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) @@ -2210,11 +2219,11 @@ x_update_widget (Lisp_Image_Instance *p) /* Possibly update the colors and font */ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p) || - XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (p))->faces_changed + XFRAME (IMAGE_INSTANCE_FRAME (p))->faces_changed || IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) { - update_widget_face (wv, p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); + update_widget_face (wv, p, IMAGE_INSTANCE_FRAME (p)); } /* Possibly update the text. */ @@ -2267,15 +2276,15 @@ x_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* This function can GC */ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); struct frame* f = XFRAME (frame); Display *dpy; Screen *xs; Window pw, win; XSetWindowAttributes xswa; Mask valueMask = 0; - unsigned int w = IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii), - h = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii); + unsigned int w = IMAGE_INSTANCE_WIDTH (ii), + h = IMAGE_INSTANCE_HEIGHT (ii); if (!DEVICE_X_P (XDEVICE (device))) signal_simple_error ("Not an X device", device); @@ -2420,7 +2429,7 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), pixel; struct device* d = XDEVICE (device); - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); struct frame* f = XFRAME (frame); char* nm=0; Widget wid; @@ -2478,12 +2487,12 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, anymore...*/ pixel = FACE_FOREGROUND (IMAGE_INSTANCE_WIDGET_FACE (ii), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + IMAGE_INSTANCE_FRAME (ii)); fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); pixel = FACE_BACKGROUND (IMAGE_INSTANCE_WIDGET_FACE (ii), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + IMAGE_INSTANCE_FRAME (ii)); bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); lw_add_widget_value_arg (wv, XtNbackground, bcolor.pixel); @@ -2513,6 +2522,9 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, XtSetMappedWhenManaged (wid, TRUE); free_widget_value_tree (wv); + /* A kludgy but simple way to make sure the callback for a widget + doesn't get deleted. */ + gcpro_popup_callbacks (id); } /* get properties of a control */ @@ -2529,6 +2541,18 @@ x_widget_property (Lisp_Object image_instance, Lisp_Object prop) return Qunbound; } +/* Instantiate a layout control for putting other widgets in. */ +static void +x_native_layout_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "layout", 0); +} + /* Instantiate a button widget. Unfortunately instantiated widgets are particular to a frame since they need to have a parent. It's not like images where you just select the image into the context you @@ -2692,7 +2716,7 @@ x_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, IMAGE_INSTANCE_WIDGET_ITEMS (ii)); update_tab_widget_face (wv, ii, - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + IMAGE_INSTANCE_FRAME (ii)); x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "tab-control", wv); @@ -2707,7 +2731,7 @@ x_tab_control_update (Lisp_Object image_instance) /* Possibly update the face. */ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (ii) || - XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))->faces_changed + XFRAME (IMAGE_INSTANCE_FRAME (ii))->faces_changed || IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)) { @@ -2718,7 +2742,7 @@ x_tab_control_update (Lisp_Object image_instance) return; update_tab_widget_face (wv, ii, - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + IMAGE_INSTANCE_FRAME (ii)); lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, True); } @@ -2775,7 +2799,9 @@ image_instantiator_format_create_glyphs_x (void) { IIFORMAT_VALID_CONSOLE (x, nothing); IIFORMAT_VALID_CONSOLE (x, string); +#ifdef HAVE_WIDGETS IIFORMAT_VALID_CONSOLE (x, layout); +#endif IIFORMAT_VALID_CONSOLE (x, formatted_string); IIFORMAT_VALID_CONSOLE (x, inherit); #ifdef HAVE_XPM @@ -2800,12 +2826,15 @@ image_instantiator_format_create_glyphs_x (void) INITIALIZE_DEVICE_IIFORMAT (x, subwindow); IIFORMAT_HAS_DEVMETHOD (x, subwindow, instantiate); #ifdef HAVE_WIDGETS + /* layout widget */ + INITIALIZE_DEVICE_IIFORMAT (x, native_layout); + IIFORMAT_HAS_DEVMETHOD (x, native_layout, instantiate); /* button widget */ INITIALIZE_DEVICE_IIFORMAT (x, button); IIFORMAT_HAS_DEVMETHOD (x, button, property); IIFORMAT_HAS_DEVMETHOD (x, button, instantiate); IIFORMAT_HAS_DEVMETHOD (x, button, update); - + /* general widget methods. */ INITIALIZE_DEVICE_IIFORMAT (x, widget); IIFORMAT_HAS_DEVMETHOD (x, widget, property); /* progress gauge */ diff --git a/src/glyphs-x.h b/src/glyphs-x.h index 3ef30f3..791926b 100644 --- a/src/glyphs-x.h +++ b/src/glyphs-x.h @@ -122,6 +122,11 @@ struct x_subwindow_data (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) #define IMAGE_INSTANCE_X_CLIPWIDGET(i) \ (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.clip_window) +#define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ + (* (Window *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) +#define IMAGE_INSTANCE_X_WIDGET_ID(i) \ + (* (Widget *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) + #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ @@ -136,10 +141,14 @@ struct x_subwindow_data IMAGE_INSTANCE_X_CLIPWIDGET (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_CLIPWINDOW(i) \ IMAGE_INSTANCE_X_CLIPWINDOW (XIMAGE_INSTANCE (i)) -#define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ - (* (Window *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) -#define IMAGE_INSTANCE_X_WIDGET_ID(i) \ - (* (Widget *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) +#define XIMAGE_INSTANCE_X_WIDGET_ID(i) \ + IMAGE_INSTANCE_X_WIDGET_ID (XIMAGE_INSTANCE (i)) + +#define DOMAIN_X_WIDGET(domain) \ + ((IMAGE_INSTANCEP (domain) && \ + X_SUBWINDOW_INSTANCE_DATA (XIMAGE_INSTANCE (domain))) ? \ + XIMAGE_INSTANCE_X_WIDGET_ID (domain) : \ + FRAME_X_CONTAINER_WIDGET (f) (DOMAIN_XFRAME (domain))) #endif /* HAVE_X_WINDOWS */ #endif /* INCLUDED_glyphs_x_h_ */ diff --git a/src/glyphs.c b/src/glyphs.c index 66b05c5..c30eb56 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -1,7 +1,7 @@ /* Generic glyph/image implementation + display tables Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. Copyright (C) 1995 Tinker Systems - Copyright (C) 1995, 1996 Ben Wing + Copyright (C) 1995, 1996, 2000 Ben Wing Copyright (C) 1995 Sun Microsystems Copyright (C) 1998, 1999, 2000 Andy Piper @@ -30,20 +30,21 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include "blocktype.h" #include "buffer.h" +#include "chartab.h" #include "device.h" #include "elhash.h" #include "faces.h" #include "frame.h" +#include "glyphs.h" #include "insdel.h" -#include "opaque.h" #include "objects.h" +#include "opaque.h" +#include "rangetab.h" #include "redisplay.h" +#include "specifier.h" #include "window.h" -#include "frame.h" -#include "chartab.h" -#include "rangetab.h" -#include "blocktype.h" #ifdef HAVE_XPM #include @@ -58,8 +59,6 @@ Lisp_Object Qmono_pixmap_image_instance_p; Lisp_Object Qcolor_pixmap_image_instance_p; Lisp_Object Qpointer_image_instance_p; Lisp_Object Qsubwindow_image_instance_p; -Lisp_Object Qlayout_image_instance_p; -Lisp_Object Qupdate_widget_instances; Lisp_Object Qwidget_image_instance_p; Lisp_Object Qconst_glyph_variable; Lisp_Object Qmono_pixmap, Qcolor_pixmap, Qsubwindow; @@ -82,6 +81,7 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (string); DEFINE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); DEFINE_IMAGE_INSTANTIATOR_FORMAT (subwindow); DEFINE_IMAGE_INSTANTIATOR_FORMAT (text); +DEFINE_IMAGE_INSTANTIATOR_FORMAT (pointer); #ifdef HAVE_WINDOW_SYSTEM DEFINE_IMAGE_INSTANTIATOR_FORMAT (xbm); @@ -121,16 +121,19 @@ typedef struct Dynarr_declare (struct image_instantiator_format_entry); } image_instantiator_format_entry_dynarr; +/* This contains one entry per format, per device it's defined on. */ image_instantiator_format_entry_dynarr * the_image_instantiator_format_entry_dynarr; -static Lisp_Object allocate_image_instance (Lisp_Object device, Lisp_Object glyph); +static Lisp_Object allocate_image_instance (Lisp_Object governing_domain, + Lisp_Object glyph); static void image_validate (Lisp_Object instantiator); static void glyph_property_was_changed (Lisp_Object glyph, Lisp_Object property, Lisp_Object locale); static void set_image_instance_dirty_p (Lisp_Object instance, int dirty); static void register_ignored_expose (struct frame* f, int x, int y, int width, int height); +static void cache_subwindow_instance_in_frame_maybe (Lisp_Object instance); /* Unfortunately windows and X are different. In windows BeginPaint() will prevent WM_PAINT messages being generated so it is unnecessary to register exposures as they will not occur. Under X they will @@ -222,13 +225,18 @@ DEFUN ("valid-image-instantiator-format-p", Fvalid_image_instantiator_format_p, Given an IMAGE-INSTANTIATOR-FORMAT, return non-nil if it is valid. If LOCALE is non-nil then the format is checked in that domain. If LOCALE is nil the current console is used. + Valid formats are some subset of 'nothing, 'string, 'formatted-string, 'xpm, 'xbm, 'xface, 'gif, 'jpeg, 'png, 'tiff, 'cursor-font, 'font, -'autodetect, 'widget and 'subwindow, depending on how XEmacs was compiled. +'autodetect, 'subwindow, 'inherit, 'mswindows-resource, 'bmp, +'native-layout, 'layout, 'label, 'tab-control, 'tree-view, +'progress-gauge, 'scrollbar, 'combo-box, 'edit-field, 'button, +'widget, 'pointer, and 'text, depending on how XEmacs was compiled. */ (image_instantiator_format, locale)) { - return valid_image_instantiator_format_p (image_instantiator_format, locale) ? + return valid_image_instantiator_format_p (image_instantiator_format, + locale) ? Qt : Qnil; } @@ -251,8 +259,9 @@ add_entry_to_device_ii_format_list (Lisp_Object device, Lisp_Object symbol, entry.device = device; entry.meths = meths; Dynarr_add (the_image_instantiator_format_entry_dynarr, entry); - Vimage_instantiator_format_list = - Fcons (symbol, Vimage_instantiator_format_list); + if (NILP (memq_no_quit (symbol, Vimage_instantiator_format_list))) + Vimage_instantiator_format_list = + Fcons (symbol, Vimage_instantiator_format_list); } void @@ -542,6 +551,86 @@ alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist) return Fvector (len, elt); } +#ifdef ERROR_CHECK_GLYPHS +static int +check_instance_cache_mapper (Lisp_Object key, Lisp_Object value, + void *flag_closure) +{ + /* This function can GC */ + /* value can be nil; we cache failures as well as successes */ + if (!NILP (value)) + { + Lisp_Object window; + VOID_TO_LISP (window, flag_closure); + assert (EQ (XIMAGE_INSTANCE_DOMAIN (value), window)); + } + + return 0; +} + +void +check_window_subwindow_cache (struct window* w) +{ + Lisp_Object window; + + XSETWINDOW (window, w); + + assert (!NILP (w->subwindow_instance_cache)); + elisp_maphash (check_instance_cache_mapper, + w->subwindow_instance_cache, + LISP_TO_VOID (window)); +} + +void +check_image_instance_structure (Lisp_Object instance) +{ + /* Weird nothing images exist at startup when the console is + deleted. */ + if (!NOTHING_IMAGE_INSTANCEP (instance)) + assert (DOMAIN_LIVE_P (instance)); + if (WINDOWP (XIMAGE_INSTANCE_DOMAIN (instance))) + check_window_subwindow_cache + (XWINDOW (XIMAGE_INSTANCE_DOMAIN (instance))); +} +#endif + +/* Determine what kind of domain governs the image instance. + Verify that the given domain is at least as specific, and extract + the governing domain from it. */ +static Lisp_Object +get_image_instantiator_governing_domain (Lisp_Object instantiator, + Lisp_Object domain) +{ + int governing_domain; + + struct image_instantiator_methods *meths = + decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0], + ERROR_ME); + governing_domain = IIFORMAT_METH_OR_GIVEN (meths, governing_domain, (), + GOVERNING_DOMAIN_DEVICE); + + if (governing_domain == GOVERNING_DOMAIN_WINDOW + && NILP (DOMAIN_WINDOW (domain))) + signal_simple_error_2 ("Domain for this instantiator must be resolvable to a window", + instantiator, domain); + else if (governing_domain == GOVERNING_DOMAIN_FRAME + && NILP (DOMAIN_FRAME (domain))) + signal_simple_error_2 + ("Domain for this instantiator must be resolvable to a frame", + instantiator, domain); + + if (governing_domain == GOVERNING_DOMAIN_WINDOW) + domain = DOMAIN_WINDOW (domain); + else if (governing_domain == GOVERNING_DOMAIN_FRAME) + domain = DOMAIN_FRAME (domain); + else if (governing_domain == GOVERNING_DOMAIN_DEVICE) + domain = DOMAIN_DEVICE (domain); + else + abort (); + + return domain; +} + static Lisp_Object normalize_image_instantiator (Lisp_Object instantiator, Lisp_Object contype, @@ -576,54 +665,73 @@ normalize_image_instantiator (Lisp_Object instantiator, } static Lisp_Object -instantiate_image_instantiator (Lisp_Object device, Lisp_Object domain, +instantiate_image_instantiator (Lisp_Object governing_domain, + Lisp_Object domain, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object glyph) { - Lisp_Object ii = allocate_image_instance (device, glyph); + Lisp_Object ii = allocate_image_instance (governing_domain, glyph); Lisp_Image_Instance* p = XIMAGE_INSTANCE (ii); - struct image_instantiator_methods *meths; + struct image_instantiator_methods *meths, *device_meths; struct gcpro gcpro1; - int methp = 0; GCPRO1 (ii); - if (!valid_image_instantiator_format_p (XVECTOR_DATA (instantiator)[0], device)) + if (!valid_image_instantiator_format_p (XVECTOR_DATA (instantiator)[0], + DOMAIN_DEVICE (governing_domain))) signal_simple_error ("Image instantiator format is invalid in this locale.", instantiator); meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0], ERROR_ME); - methp = (int)HAS_IIFORMAT_METH_P (meths, instantiate); MAYBE_IIFORMAT_METH (meths, instantiate, (ii, instantiator, pointer_fg, pointer_bg, dest_mask, domain)); - /* now do device specific instantiation */ - meths = decode_device_ii_format (device, XVECTOR_DATA (instantiator)[0], - ERROR_ME_NOT); + /* Now do device specific instantiation. */ + device_meths = decode_device_ii_format (DOMAIN_DEVICE (governing_domain), + XVECTOR_DATA (instantiator)[0], + ERROR_ME_NOT); - if (!methp && (!meths || !HAS_IIFORMAT_METH_P (meths, instantiate))) + if (!HAS_IIFORMAT_METH_P (meths, instantiate) + && (!device_meths || !HAS_IIFORMAT_METH_P (device_meths, instantiate))) signal_simple_error ("Don't know how to instantiate this image instantiator?", instantiator); - MAYBE_IIFORMAT_METH (meths, instantiate, (ii, instantiator, pointer_fg, - pointer_bg, dest_mask, domain)); - UNGCPRO; - /* Some code may have already laid out the widget, if not then do it - here. */ + /* In general native window system methods will require sane + geometry values, thus the instance needs to have been laid-out + before they get called. */ + image_instance_layout (ii, XIMAGE_INSTANCE_WIDTH (ii), + XIMAGE_INSTANCE_HEIGHT (ii), domain); + + MAYBE_IIFORMAT_METH (device_meths, instantiate, (ii, instantiator, pointer_fg, + pointer_bg, dest_mask, domain)); + /* Do post instantiation. */ + MAYBE_IIFORMAT_METH (meths, post_instantiate, (ii, instantiator, domain)); + MAYBE_IIFORMAT_METH (device_meths, post_instantiate, (ii, instantiator, domain)); + + /* We're done. */ + IMAGE_INSTANCE_INITIALIZED (p) = 1; + /* Now that we're done verify that we really are laid out. */ if (IMAGE_INSTANCE_LAYOUT_CHANGED (p)) - image_instance_layout (ii, IMAGE_UNSPECIFIED_GEOMETRY, - IMAGE_UNSPECIFIED_GEOMETRY, domain); - + image_instance_layout (ii, XIMAGE_INSTANCE_WIDTH (ii), + XIMAGE_INSTANCE_HEIGHT (ii), domain); + /* We *must* have a clean image at this point. */ IMAGE_INSTANCE_TEXT_CHANGED (p) = 0; IMAGE_INSTANCE_SIZE_CHANGED (p) = 0; IMAGE_INSTANCE_LAYOUT_CHANGED (p) = 0; IMAGE_INSTANCE_DIRTYP (p) = 0; - return ii; + assert ( XIMAGE_INSTANCE_HEIGHT (ii) + != IMAGE_UNSPECIFIED_GEOMETRY + && XIMAGE_INSTANCE_WIDTH (ii) + != IMAGE_UNSPECIFIED_GEOMETRY); + + ERROR_CHECK_IMAGE_INSTANCE (ii); + + RETURN_UNGCPRO (ii); } @@ -638,7 +746,23 @@ mark_image_instance (Lisp_Object obj) { Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj); + /* #### I want to check the instance here, but there are way too + many instances of the instance being marked while the domain is + dead. For instance you can get marked through an event when using + callback_ex.*/ +#if 0 + ERROR_CHECK_IMAGE_INSTANCE (obj); +#endif + mark_object (i->name); + /* Is this legal in marking? We may get in the situation where the + domain has been deleted - making the instance unusable. It seems + better to remove the domain so that it can be finalized. */ + if (!DOMAIN_LIVE_P (i->domain)) + i->domain = Qnil; + else + mark_object (i->domain); + /* We don't mark the glyph reference since that would create a circularity preventing GC. */ switch (IMAGE_INSTANCE_TYPE (i)) @@ -657,23 +781,27 @@ mark_image_instance (Lisp_Object obj) break; case IMAGE_WIDGET: - case IMAGE_LAYOUT: mark_object (IMAGE_INSTANCE_WIDGET_TYPE (i)); mark_object (IMAGE_INSTANCE_WIDGET_PROPS (i)); mark_object (IMAGE_INSTANCE_WIDGET_FACE (i)); mark_object (IMAGE_INSTANCE_WIDGET_ITEMS (i)); + mark_object (IMAGE_INSTANCE_LAYOUT_CHILDREN (i)); mark_object (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (i)); mark_object (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i)); mark_object (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i)); case IMAGE_SUBWINDOW: - mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)); break; default: break; } - MAYBE_DEVMETH (XDEVICE (i->device), mark_image_instance, (i)); + /* The image may have been previously finalized (yes that's wierd, + see Fdelete_frame() and mark_window_as_deleted()), in which case + the domain will be nil, so cope with this. */ + if (!NILP (IMAGE_INSTANCE_DEVICE (i))) + MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (i)), + mark_image_instance, (i)); return i->device; } @@ -697,7 +825,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, write_c_string (" ", printcharfun); } write_c_string ("on ", printcharfun); - print_internal (ii->device, printcharfun, 0); + print_internal (ii->domain, printcharfun, 0); write_c_string (" ", printcharfun); switch (IMAGE_INSTANCE_TYPE (ii)) { @@ -773,7 +901,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, case IMAGE_WIDGET: print_internal (IMAGE_INSTANCE_WIDGET_TYPE (ii), printcharfun, 0); - if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii))) + if (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_ITEM (ii))) { write_c_string (" ", printcharfun); print_internal (IMAGE_INSTANCE_WIDGET_TEXT (ii), printcharfun, 1); @@ -788,9 +916,8 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, case IMAGE_SUBWINDOW: - case IMAGE_LAYOUT: - sprintf (buf, " %dx%d", IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii), - IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); + sprintf (buf, " %dx%d", IMAGE_INSTANCE_WIDTH (ii), + IMAGE_INSTANCE_HEIGHT (ii)); write_c_string (buf, printcharfun); /* This is stolen from frame.c. Subwindows are strange in that they @@ -799,7 +926,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, write_c_string (" on #<", printcharfun); { - struct frame* f = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + struct frame* f = XFRAME (IMAGE_INSTANCE_FRAME (ii)); if (!FRAME_LIVE_P (f)) write_c_string ("dead", printcharfun); @@ -817,7 +944,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, abort (); } - MAYBE_DEVMETH (XDEVICE (ii->device), print_image_instance, + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), print_image_instance, (ii, printcharfun, escapeflag)); sprintf (buf, " 0x%x>", ii->header.uid); write_c_string (buf, printcharfun); @@ -828,23 +955,20 @@ finalize_image_instance (void *header, int for_disksave) { Lisp_Image_Instance *i = (Lisp_Image_Instance *) header; - if (IMAGE_INSTANCE_TYPE (i) == IMAGE_NOTHING) - /* objects like this exist at dump time, so don't bomb out. */ + /* objects like this exist at dump time, so don't bomb out. */ + if (IMAGE_INSTANCE_TYPE (i) == IMAGE_NOTHING + || + NILP (IMAGE_INSTANCE_DEVICE (i))) return; if (for_disksave) finalose (i); - /* do this so that the cachels get reset */ - if (IMAGE_INSTANCE_TYPE (i) == IMAGE_WIDGET - || - IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW - || - IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW) - { - MARK_FRAME_SUBWINDOWS_CHANGED - (XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (i))); - } + /* We can't use the domain here, because it might have + disappeared. */ + MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (i)), + finalize_image_instance, (i)); - MAYBE_DEVMETH (XDEVICE (i->device), finalize_image_instance, (i)); + /* Make sure we don't try this twice. */ + IMAGE_INSTANCE_DEVICE (i) = Qnil; } static int @@ -852,13 +976,16 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) { Lisp_Image_Instance *i1 = XIMAGE_INSTANCE (obj1); Lisp_Image_Instance *i2 = XIMAGE_INSTANCE (obj2); - struct device *d1 = XDEVICE (i1->device); - struct device *d2 = XDEVICE (i2->device); - if (d1 != d2) - return 0; - if (IMAGE_INSTANCE_TYPE (i1) != IMAGE_INSTANCE_TYPE (i2) + ERROR_CHECK_IMAGE_INSTANCE (obj1); + ERROR_CHECK_IMAGE_INSTANCE (obj2); + + if (!EQ (IMAGE_INSTANCE_DOMAIN (i1), + IMAGE_INSTANCE_DOMAIN (i2)) + || IMAGE_INSTANCE_TYPE (i1) != IMAGE_INSTANCE_TYPE (i2) || IMAGE_INSTANCE_WIDTH (i1) != IMAGE_INSTANCE_WIDTH (i2) + || IMAGE_INSTANCE_MARGIN_WIDTH (i1) != + IMAGE_INSTANCE_MARGIN_WIDTH (i2) || IMAGE_INSTANCE_HEIGHT (i1) != IMAGE_INSTANCE_HEIGHT (i2) || IMAGE_INSTANCE_XOFFSET (i1) != IMAGE_INSTANCE_XOFFSET (i2) || IMAGE_INSTANCE_YOFFSET (i1) != IMAGE_INSTANCE_YOFFSET (i2)) @@ -900,7 +1027,6 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) break; case IMAGE_WIDGET: - case IMAGE_LAYOUT: if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1), IMAGE_INSTANCE_WIDGET_TYPE (i2)) && IMAGE_INSTANCE_SUBWINDOW_ID (i1) == @@ -911,6 +1037,9 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) && internal_equal (IMAGE_INSTANCE_WIDGET_ITEMS (i1), IMAGE_INSTANCE_WIDGET_ITEMS (i2), depth + 1) + && internal_equal (IMAGE_INSTANCE_LAYOUT_CHILDREN (i1), + IMAGE_INSTANCE_LAYOUT_CHILDREN (i2), + depth + 1) && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1), IMAGE_INSTANCE_WIDGET_PROPS (i2), depth + 1) @@ -934,40 +1063,47 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) abort (); } - return DEVMETH_OR_GIVEN (d1, image_instance_equal, (i1, i2, depth), 1); + return DEVMETH_OR_GIVEN (DOMAIN_XDEVICE (i1->domain), + image_instance_equal, (i1, i2, depth), 1); } -#if 0 -/* internal_hash will not go very far down a list because of the way - its written. For items we need to hash all elements so we provide - our own list hashing function. */ -static unsigned long -full_list_hash (Lisp_Object obj, int depth) +/* Image instance domain manipulators. We can't error check in these + otherwise we get into infinite recursion. */ +Lisp_Object +image_instance_device (Lisp_Object instance) { - unsigned long hash = 0; - Lisp_Object rest; + return XIMAGE_INSTANCE_DEVICE (instance); +} - if (!CONSP (obj)) - return internal_hash (obj, depth + 1); +Lisp_Object +image_instance_frame (Lisp_Object instance) +{ + return XIMAGE_INSTANCE_FRAME (instance); +} - hash = LISP_HASH (XCAR (obj)); - LIST_LOOP (rest, XCDR (obj)) - { - hash = HASH2 (hash, internal_hash (XCAR (rest), depth + 1)); - } - return hash; +Lisp_Object +image_instance_window (Lisp_Object instance) +{ + return DOMAIN_WINDOW (XIMAGE_INSTANCE_DOMAIN (instance)); +} + +int +image_instance_live_p (Lisp_Object instance) +{ + return DOMAIN_LIVE_P (XIMAGE_INSTANCE_DOMAIN (instance)); } -#endif static unsigned long image_instance_hash (Lisp_Object obj, int depth) { Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj); - struct device *d = XDEVICE (i->device); - unsigned long hash = HASH3 ((unsigned long) d, + unsigned long hash = HASH4 (LISP_HASH (IMAGE_INSTANCE_DOMAIN (i)), IMAGE_INSTANCE_WIDTH (i), + IMAGE_INSTANCE_MARGIN_WIDTH (i), IMAGE_INSTANCE_HEIGHT (i)); + ERROR_CHECK_IMAGE_INSTANCE (obj); + switch (IMAGE_INSTANCE_TYPE (i)) { case IMAGE_NOTHING: @@ -988,13 +1124,14 @@ image_instance_hash (Lisp_Object obj, int depth) break; case IMAGE_WIDGET: - case IMAGE_LAYOUT: /* We need the hash to be equivalent to what should be displayed. */ - hash = HASH4 (hash, + hash = HASH5 (hash, LISP_HASH (IMAGE_INSTANCE_WIDGET_TYPE (i)), internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1), - internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1)); + internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1), + internal_hash (IMAGE_INSTANCE_LAYOUT_CHILDREN (i), + depth + 1)); case IMAGE_SUBWINDOW: hash = HASH2 (hash, (int) IMAGE_INSTANCE_SUBWINDOW_ID (i)); break; @@ -1003,8 +1140,10 @@ image_instance_hash (Lisp_Object obj, int depth) abort (); } - return HASH2 (hash, DEVMETH_OR_GIVEN (d, image_instance_hash, (i, depth), - 0)); + return HASH2 (hash, DEVMETH_OR_GIVEN + (XDEVICE (image_instance_device (obj)), + image_instance_hash, (i, depth), + 0)); } DEFINE_LRECORD_IMPLEMENTATION ("image-instance", image_instance, @@ -1014,23 +1153,36 @@ DEFINE_LRECORD_IMPLEMENTATION ("image-instance", image_instance, Lisp_Image_Instance); static Lisp_Object -allocate_image_instance (Lisp_Object device, Lisp_Object glyph) +allocate_image_instance (Lisp_Object governing_domain, Lisp_Object glyph) { Lisp_Image_Instance *lp = alloc_lcrecord_type (Lisp_Image_Instance, &lrecord_image_instance); Lisp_Object val; zero_lcrecord (lp); - lp->device = device; + /* It's not possible to simply keep a record of the domain in which + the instance was instantiated. This is because caching may mean + that the domain becomes invalid but the instance remains + valid. However, the only truly relevant domain is the domain in + which the instance is cached since this is the one that will be + common to the instances. */ + lp->domain = governing_domain; + /* The cache domain is not quite sufficient since the domain can get + deleted before the image instance does. We need to know the + domain device in order to finalize the image instance + properly. We therefore record the device also. */ + lp->device = DOMAIN_DEVICE (governing_domain); lp->type = IMAGE_NOTHING; lp->name = Qnil; lp->x_offset = 0; lp->y_offset = 0; - lp->width = 0; - lp->height = 0; + lp->width = IMAGE_UNSPECIFIED_GEOMETRY; + lp->margin_width = 0; + lp->height = IMAGE_UNSPECIFIED_GEOMETRY; lp->parent = glyph; /* So that layouts get done. */ lp->layout_changed = 1; + lp->initialized = 0; XSETIMAGE_INSTANCE (val, lp); MARK_GLYPHS_CHANGED; @@ -1051,7 +1203,6 @@ decode_image_instance_type (Lisp_Object type, Error_behavior errb) if (EQ (type, Qpointer)) return IMAGE_POINTER; if (EQ (type, Qsubwindow)) return IMAGE_SUBWINDOW; if (EQ (type, Qwidget)) return IMAGE_WIDGET; - if (EQ (type, Qlayout)) return IMAGE_LAYOUT; maybe_signal_simple_error ("Invalid image-instance type", type, Qimage, errb); @@ -1071,7 +1222,6 @@ encode_image_instance_type (enum image_instance_type type) case IMAGE_POINTER: return Qpointer; case IMAGE_SUBWINDOW: return Qsubwindow; case IMAGE_WIDGET: return Qwidget; - case IMAGE_LAYOUT: return Qlayout; default: abort (); } @@ -1080,16 +1230,6 @@ encode_image_instance_type (enum image_instance_type type) } static int -image_instance_type_to_mask (enum image_instance_type type) -{ - /* This depends on the fact that enums are assigned consecutive - integers starting at 0. (Remember that IMAGE_UNKNOWN is the - first enum.) I'm fairly sure this behavior is ANSI-mandated, - so there should be no portability problems here. */ - return (1 << ((int) (type) - 1)); -} - -static int decode_image_instance_type_list (Lisp_Object list) { Lisp_Object rest; @@ -1158,7 +1298,7 @@ valid_image_instance_type_p (Lisp_Object type) DEFUN ("valid-image-instance-type-p", Fvalid_image_instance_type_p, 1, 1, 0, /* Given an IMAGE-INSTANCE-TYPE, return non-nil if it is valid. Valid types are some subset of 'nothing, 'text, 'mono-pixmap, 'color-pixmap, -'pointer, and 'subwindow, depending on how XEmacs was compiled. +'pointer, 'subwindow, and 'widget, depending on how XEmacs was compiled. */ (image_instance_type)) { @@ -1209,26 +1349,32 @@ Lisp_Object image_instance_parent_glyph (Lisp_Image_Instance* ii) } static Lisp_Object -make_image_instance_1 (Lisp_Object data, Lisp_Object device, +make_image_instance_1 (Lisp_Object data, Lisp_Object domain, Lisp_Object dest_types) { Lisp_Object ii; struct gcpro gcpro1; int dest_mask; + Lisp_Object governing_domain; - XSETDEVICE (device, decode_device (device)); - /* instantiate_image_instantiator() will abort if given an - image instance ... */ if (IMAGE_INSTANCEP (data)) signal_simple_error ("Image instances not allowed here", data); image_validate (data); + domain = decode_domain (domain); + /* instantiate_image_instantiator() will abort if given an + image instance ... */ dest_mask = decode_image_instance_type_list (dest_types); - data = normalize_image_instantiator (data, DEVICE_TYPE (XDEVICE (device)), + data = normalize_image_instantiator (data, + DEVICE_TYPE (DOMAIN_XDEVICE (domain)), make_int (dest_mask)); GCPRO1 (data); - if (VECTORP (data) && EQ (XVECTOR_DATA (data)[0], Qinherit)) + /* After normalizing the data, it's always either an image instance (which + we filtered out above) or a vector. */ + if (EQ (XVECTOR_DATA (data)[0], Qinherit)) signal_simple_error ("Inheritance not allowed here", data); - ii = instantiate_image_instantiator (device, device, data, + governing_domain = + get_image_instantiator_governing_domain (data, domain); + ii = instantiate_image_instantiator (governing_domain, domain, data, Qnil, Qnil, dest_mask, Qnil); RETURN_UNGCPRO (ii); } @@ -1243,7 +1389,7 @@ However, it may occasionally be useful to explicitly create image instances, if you want more control over the instantiation process. DATA is an image instantiator, which describes the image; see -`image-specifier-p' for a description of the allowed values. +`make-image-specifier' for a description of the allowed values. DEST-TYPES should be a list of allowed image instance types that can be generated. The recognized image instance types are @@ -1270,37 +1416,70 @@ be generated. The recognized image instance types are another program to be responsible for drawing into the window. 'widget A child window that contains a window-system widget, e.g. a push - button. - -The DEST-TYPES list is unordered. If multiple destination types -are possible for a given instantiator, the "most natural" type -for the instantiator's format is chosen. (For XBM, the most natural -types are `mono-pixmap', followed by `color-pixmap', followed by -`pointer'. For the other normal image formats, the most natural -types are `color-pixmap', followed by `mono-pixmap', followed by -`pointer'. For the string and formatted-string formats, the most -natural types are `text', followed by `mono-pixmap' (not currently -implemented), followed by `color-pixmap' (not currently implemented). -The other formats can only be instantiated as one type. (If you -want to control more specifically the order of the types into which -an image is instantiated, just call `make-image-instance' repeatedly -until it succeeds, passing less and less preferred destination types -each time. + button, text field, or slider. + +The DEST-TYPES list is unordered. If multiple destination types are +possible for a given instantiator, the "most natural" type for the +instantiator's format is chosen. (For XBM, the most natural types are +`mono-pixmap', followed by `color-pixmap', followed by `pointer'. For +the other normal image formats, the most natural types are +`color-pixmap', followed by `mono-pixmap', followed by `pointer'. For +the string and formatted-string formats, the most natural types are +`text', followed by `mono-pixmap' (not currently implemented), +followed by `color-pixmap' (not currently implemented). For MS +Windows resources, the most natural type for pointer resources is +`pointer', and for the others it's `color-pixmap'. The other formats +can only be instantiated as one type. (If you want to control more +specifically the order of the types into which an image is +instantiated, just call `make-image-instance' repeatedly until it +succeeds, passing less and less preferred destination types each +time.) + +See `make-image-specifier' for a description of the different image +instantiator formats. If DEST-TYPES is omitted, all possible types are allowed. +DOMAIN specifies the domain to which the image instance will be attached. +This domain is termed the \"governing domain\". The type of the governing +domain depends on the image instantiator format. (Although, more correctly, +it should probably depend on the image instance type.) For example, pixmap +image instances are specific to a device, but widget image instances are +specific to a particular XEmacs window because in order to display such a +widget when two windows onto the same buffer want to display the widget, +two separate underlying widgets must be created. (That's because a widget +is actually a child window-system window, and all window-system windows have +a unique existence on the screen.) This means that the governing domain for +a pixmap image instance will be some device (most likely, the only existing +device), whereas the governing domain for a widget image instance will be +some XEmacs window. + +If you specify an overly general DOMAIN (e.g. a frame when a window was +wanted), an error is signaled. If you specify an overly specific DOMAIN +\(e.g. a window when a device was wanted), the corresponding general domain +is fetched and used instead. For `make-image-instance', it makes no +difference whether you specify an overly specific domain or the properly +general domain derived from it. However, it does matter when creating an +image instance by instantiating a specifier or glyph (e.g. with +`glyph-image-instance'), because the more specific domain causes spec lookup +to start there and proceed to more general domains. (It would also matter +when creating an image instance with an instantiator format of `inherit', +but we currently disallow this. #### We should fix this.) + +If omitted, DOMAIN defaults to the selected window. + NO-ERROR controls what happens when the image cannot be generated. If nil, an error message is generated. If t, no messages are generated and this function returns nil. If anything else, a warning message is generated and this function returns nil. */ - (data, device, dest_types, no_error)) + (data, domain, dest_types, no_error)) { Error_behavior errb = decode_error_behavior_flag (no_error); return call_with_suspended_errors ((lisp_fn_t) make_image_instance_1, Qnil, Qimage, errb, - 3, data, device, dest_types); + 3, data, domain, dest_types); } DEFUN ("image-instance-p", Fimage_instance_p, 1, 1, 0, /* @@ -1319,6 +1498,7 @@ The return value will be one of 'nothing, 'text, 'mono-pixmap, (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); return encode_image_instance_type (XIMAGE_INSTANCE_TYPE (image_instance)); } @@ -1331,6 +1511,20 @@ Return the name of the given image instance. return XIMAGE_INSTANCE_NAME (image_instance); } +DEFUN ("image-instance-domain", Fimage_instance_domain, 1, 1, 0, /* +Return the governing domain of the given image instance. +The governing domain of an image instance is the domain that the image +instance is specific to. It is NOT necessarily the domain that was +given to the call to `specifier-instance' that resulted in the creation +of this image instance. See `make-image-instance' for more information +on governing domains. +*/ + (image_instance)) +{ + CHECK_IMAGE_INSTANCE (image_instance); + return XIMAGE_INSTANCE_DOMAIN (image_instance); +} + DEFUN ("image-instance-string", Fimage_instance_string, 1, 1, 0, /* Return the string of the given image instance. This will only be non-nil for text image instances and widgets. @@ -1358,12 +1552,13 @@ the image instance in the domain. struct image_instantiator_methods* meths; CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); CHECK_SYMBOL (prop); ii = XIMAGE_INSTANCE (image_instance); /* ... then try device specific methods ... */ type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii)); - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (image_instance), type, ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, property) && @@ -1387,7 +1582,14 @@ DEFUN ("set-image-instance-property", Fset_image_instance_property, 3, 3, 0, /* Set the given property of the given image instance. Does nothing if the property or the property method do not exist for the image instance in the domain. -*/ + +WARNING: If you are thinking about using this function, think again. +You probably want to be using `set-glyph-image' to change the glyph's +specifier. Be especially wary if you are thinking of calling this +function after having called `glyph-image-instance'. Unless you are +absolutely sure what you're doing, pretty much the only legitimate +uses for this function are setting user-specified info in a widget, +such as text in a text field. */ (image_instance, prop, val)) { Lisp_Image_Instance* ii; @@ -1395,11 +1597,12 @@ the image instance in the domain. struct image_instantiator_methods* meths; CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); CHECK_SYMBOL (prop); ii = XIMAGE_INSTANCE (image_instance); type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii)); /* try device specific methods first ... */ - meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), + meths = decode_device_ii_format (image_instance_device (image_instance), type, ERROR_ME_NOT); if (meths && HAS_IIFORMAT_METH_P (meths, set_property) && @@ -1442,6 +1645,7 @@ Return the file name from which IMAGE-INSTANCE was read, if known. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1461,6 +1665,7 @@ Return the file name from which IMAGE-INSTANCE's mask was read, if known. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1481,6 +1686,7 @@ This is 0 for a bitmap, or a positive integer for a pixmap. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1500,6 +1706,7 @@ Return the height of the image instance, in pixels. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1508,7 +1715,6 @@ Return the height of the image instance, in pixels. case IMAGE_POINTER: case IMAGE_SUBWINDOW: case IMAGE_WIDGET: - case IMAGE_LAYOUT: return make_int (XIMAGE_INSTANCE_HEIGHT (image_instance)); default: @@ -1522,6 +1728,7 @@ Return the width of the image instance, in pixels. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1530,7 +1737,6 @@ Return the width of the image instance, in pixels. case IMAGE_POINTER: case IMAGE_SUBWINDOW: case IMAGE_WIDGET: - case IMAGE_LAYOUT: return make_int (XIMAGE_INSTANCE_WIDTH (image_instance)); default: @@ -1549,6 +1755,7 @@ This will always be nil for a non-pointer image instance. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1573,6 +1780,7 @@ This will always be nil for a non-pointer image instance. (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1594,6 +1802,7 @@ colorized mono pixmaps and for pointers.) (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1605,7 +1814,7 @@ colorized mono pixmaps and for pointers.) case IMAGE_WIDGET: return FACE_FOREGROUND ( XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME + XIMAGE_INSTANCE_FRAME (image_instance)); default: @@ -1621,6 +1830,7 @@ colorized mono pixmaps and for pointers.) (image_instance)) { CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); switch (XIMAGE_INSTANCE_TYPE (image_instance)) { @@ -1632,7 +1842,7 @@ colorized mono pixmaps and for pointers.) case IMAGE_WIDGET: return FACE_BACKGROUND ( XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME + XIMAGE_INSTANCE_FRAME (image_instance)); default: @@ -1654,16 +1864,18 @@ instance is a mono pixmap; otherwise, the same image instance is returned. Lisp_Object device; CHECK_IMAGE_INSTANCE (image_instance); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); CHECK_COLOR_INSTANCE (foreground); CHECK_COLOR_INSTANCE (background); - device = XIMAGE_INSTANCE_DEVICE (image_instance); + device = image_instance_device (image_instance); if (!HAS_DEVMETH_P (XDEVICE (device), colorize_image_instance)) return image_instance; /* #### There should be a copy_image_instance(), which calls a device-specific method to copy the window-system subobject. */ - new = allocate_image_instance (device, Qnil); + new = allocate_image_instance (XIMAGE_INSTANCE_DOMAIN (image_instance), + Qnil); copy_lcrecord (XIMAGE_INSTANCE (new), XIMAGE_INSTANCE (image_instance)); /* note that if this method returns non-zero, this method MUST copy any window-system resources, so that when one image instance is @@ -1690,6 +1902,7 @@ image_instance_query_geometry (Lisp_Object image_instance, Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); Lisp_Object type; struct image_instantiator_methods* meths; + ERROR_CHECK_IMAGE_INSTANCE (image_instance); type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii)); meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT); @@ -1724,6 +1937,12 @@ image_instance_layout (Lisp_Object image_instance, Lisp_Object type; struct image_instantiator_methods* meths; + ERROR_CHECK_IMAGE_INSTANCE (image_instance); + + /* Nothing is as nothing does. */ + if (NOTHING_IMAGE_INSTANCEP (image_instance)) + return; + type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii)); meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT); @@ -1732,7 +1951,8 @@ image_instance_layout (Lisp_Object image_instance, || height == IMAGE_UNSPECIFIED_GEOMETRY) { - unsigned int dwidth, dheight; + unsigned int dwidth = IMAGE_UNSPECIFIED_GEOMETRY, + dheight = IMAGE_UNSPECIFIED_GEOMETRY; /* Get the desired geometry. */ if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry)) @@ -1754,6 +1974,13 @@ image_instance_layout (Lisp_Object image_instance, height = dheight; } + /* If we don't have sane values then we cannot layout at this point and + must just return. */ + if (width == IMAGE_UNSPECIFIED_GEOMETRY + || + height == IMAGE_UNSPECIFIED_GEOMETRY) + return; + /* At this point width and height should contain sane values. Thus we set the glyph geometry and lay it out. */ if (IMAGE_INSTANCE_WIDTH (ii) != width @@ -1766,15 +1993,11 @@ image_instance_layout (Lisp_Object image_instance, IMAGE_INSTANCE_WIDTH (ii) = width; IMAGE_INSTANCE_HEIGHT (ii) = height; - if (meths && HAS_IIFORMAT_METH_P (meths, layout)) - { - IIFORMAT_METH (meths, layout, (image_instance, width, height, domain)); - } - /* else no change to the geometry. */ - - /* Do not clear the dirty flag here - redisplay will do this for - us at the end. */ - IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 0; + if (IIFORMAT_METH_OR_GIVEN (meths, layout, + (image_instance, width, height, domain), 1)) + /* Do not clear the dirty flag here - redisplay will do this for + us at the end. */ + IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 0; } /* @@ -1847,7 +2070,11 @@ nothing_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); if (dest_mask & IMAGE_NOTHING_MASK) - IMAGE_INSTANCE_TYPE (ii) = IMAGE_NOTHING; + { + IMAGE_INSTANCE_TYPE (ii) = IMAGE_NOTHING; + IMAGE_INSTANCE_HEIGHT (ii) = 0; + IMAGE_INSTANCE_WIDTH (ii) = 0; + } else incompatible_image_types (instantiator, dest_mask, IMAGE_NOTHING_MASK); } @@ -1917,7 +2144,7 @@ string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); /* Should never get here with a domain other than a window. */ - assert (!NILP (string) && WINDOWP (domain)); + assert (!NILP (string) && WINDOWP (DOMAIN_WINDOW (domain))); if (dest_mask & IMAGE_TEXT_MASK) { IMAGE_INSTANCE_TYPE (ii) = IMAGE_TEXT; @@ -1941,7 +2168,7 @@ query_string_geometry (Lisp_Object string, Lisp_Object face, unsigned char charsets[NUM_LEADING_BYTES]; struct face_cachel frame_cachel; struct face_cachel *cachel; - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); /* Compute height */ if (height) @@ -1960,7 +2187,8 @@ query_string_geometry (Lisp_Object string, Lisp_Object face, } else { - cachel = WINDOW_FACE_CACHEL (XWINDOW (domain), DEFAULT_INDEX); + cachel = WINDOW_FACE_CACHEL (DOMAIN_XWINDOW (domain), + DEFAULT_INDEX); } ensure_face_cachel_complete (cachel, domain, charsets); @@ -1993,7 +2221,7 @@ query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain) struct face_cachel frame_cachel; struct face_cachel *cachel; int i; - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); /* Compute string font info */ find_charsets_in_bufbyte_string (charsets, @@ -2748,18 +2976,22 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, Lisp_Object domain, Lisp_Object instantiator, Lisp_Object depth) { - Lisp_Object device = DFW_DEVICE (domain); - struct device *d = XDEVICE (device); Lisp_Object glyph = IMAGE_SPECIFIER_ATTACHEE (XIMAGE_SPECIFIER (specifier)); int dest_mask = XIMAGE_SPECIFIER_ALLOWED (specifier); int pointerp = dest_mask & image_instance_type_to_mask (IMAGE_POINTER); if (IMAGE_INSTANCEP (instantiator)) { - /* make sure that the image instance's device and type are + /* make sure that the image instance's governing domain and type are matching. */ - - if (EQ (device, XIMAGE_INSTANCE_DEVICE (instantiator))) + Lisp_Object governing_domain = XIMAGE_INSTANCE_DOMAIN (instantiator); + + if ((DEVICEP (governing_domain) + && EQ (governing_domain, DOMAIN_DEVICE (domain))) + || (FRAMEP (governing_domain) + && EQ (governing_domain, DOMAIN_FRAME (domain))) + || (WINDOWP (governing_domain) + && EQ (governing_domain, DOMAIN_WINDOW (domain)))) { int mask = image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instantiator)); @@ -2770,8 +3002,8 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, instantiator); } else - signal_simple_error_2 ("Wrong device for image instance", - instantiator, device); + signal_simple_error_2 ("Wrong domain for image instance", + instantiator, domain); } else if (VECTORP (instantiator) && EQ (XVECTOR_DATA (instantiator)[0], Qinherit)) @@ -2788,12 +3020,13 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, Lisp_Object ls3 = Qnil; Lisp_Object pointer_fg = Qnil; Lisp_Object pointer_bg = Qnil; + Lisp_Object governing_domain = + get_image_instantiator_governing_domain (instantiator, domain); /* We have to put subwindow, widget and text image instances in a per-window cache so that we can see the same glyph in - different windows. Unfortunately we do not know the type of - image_instance until after it has been created. We thus need - to be really careful how we place things. */ + different windows. We use governing_domain to determine the type + of image_instance that will be created. */ if (pointerp) { @@ -2802,121 +3035,101 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, ls3 = list3 (instantiator, pointer_fg, pointer_bg); } - /* First look in the hash table. */ - subtable = Fgethash (make_int (dest_mask), d->image_instance_cache, - Qunbound); - if (UNBOUNDP (subtable)) - { - /* For the image instance cache, we do comparisons with EQ rather - than with EQUAL, as we do for color and font names. - The reasons are: - - 1) pixmap data can be very long, and thus the hashing and - comparing will take awhile. - 2) It's not so likely that we'll run into things that are EQUAL - but not EQ (that can happen a lot with faces, because their - specifiers are copied around); but pixmaps tend not to be - in faces. - - However, if the image-instance could be a pointer, we have to - use EQUAL because we massaged the instantiator into a cons3 - also containing the foreground and background of the - pointer face. - */ - - subtable = make_lisp_hash_table (20, - pointerp ? HASH_TABLE_KEY_CAR_WEAK - : HASH_TABLE_KEY_WEAK, - pointerp ? HASH_TABLE_EQUAL - : HASH_TABLE_EQ); - Fputhash (make_int (dest_mask), subtable, - d->image_instance_cache); - instance = Qunbound; - } - else + /* First look in the device cache. */ + if (DEVICEP (governing_domain)) { - instance = Fgethash (pointerp ? ls3 : instantiator, - subtable, Qunbound); - /* subwindows have a per-window cache and have to be treated - differently. dest_mask can be a bitwise OR of all image - types so we will only catch someone possibly trying to - instantiate a subwindow type thing. Unfortunately, this - will occur most of the time so this probably slows things - down. But with the current design I don't see anyway - round it. */ - if (UNBOUNDP (instance) - && - dest_mask & (IMAGE_SUBWINDOW_MASK - | IMAGE_WIDGET_MASK - | IMAGE_LAYOUT_MASK - | IMAGE_TEXT_MASK) - && WINDOWP (domain)) + subtable = Fgethash (make_int (dest_mask), + XDEVICE (governing_domain)-> + image_instance_cache, + Qunbound); + if (UNBOUNDP (subtable)) { - instance = Fgethash (instantiator, - XWINDOW (domain)->subwindow_instance_cache, - Qunbound); + /* For the image instance cache, we do comparisons with + EQ rather than with EQUAL, as we do for color and + font names. The reasons are: + + 1) pixmap data can be very long, and thus the hashing + and comparing will take awhile. + + 2) It's not so likely that we'll run into things that + are EQUAL but not EQ (that can happen a lot with + faces, because their specifiers are copied around); + but pixmaps tend not to be in faces. + + However, if the image-instance could be a pointer, we + have to use EQUAL because we massaged the + instantiator into a cons3 also containing the + foreground and background of the pointer face. */ + + subtable = make_lisp_hash_table + (20, pointerp ? HASH_TABLE_KEY_CAR_WEAK + : HASH_TABLE_KEY_WEAK, + pointerp ? HASH_TABLE_EQUAL + : HASH_TABLE_EQ); + Fputhash (make_int (dest_mask), subtable, + XDEVICE (governing_domain)->image_instance_cache); + instance = Qunbound; } + else + { + instance = Fgethash (pointerp ? ls3 : instantiator, + subtable, Qunbound); + } + } + else if (WINDOWP (governing_domain)) + { + /* Subwindows have a per-window cache and have to be treated + differently. */ + instance = + Fgethash (instantiator, + XWINDOW (governing_domain)->subwindow_instance_cache, + Qunbound); } + else + abort (); /* We're not allowed anything else currently. */ + /* If we don't have an instance at this point then create + one. */ if (UNBOUNDP (instance)) { Lisp_Object locative = noseeum_cons (Qnil, noseeum_cons (pointerp ? ls3 : instantiator, - subtable)); + DEVICEP (governing_domain) ? subtable + : XWINDOW (governing_domain) + ->subwindow_instance_cache)); int speccount = specpdl_depth (); - /* make sure we cache the failures, too. - Use an unwind-protect to catch such errors. - If we fail, the unwind-protect records nil in - the hash table. If we succeed, we change the - car of the locative to the resulting instance, - which gets recorded instead. */ + /* Make sure we cache the failures, too. Use an + unwind-protect to catch such errors. If we fail, the + unwind-protect records nil in the hash table. If we + succeed, we change the car of the locative to the + resulting instance, which gets recorded instead. */ record_unwind_protect (image_instantiate_cache_result, locative); - instance = instantiate_image_instantiator (device, - domain, - instantiator, - pointer_fg, pointer_bg, - dest_mask, - glyph); + instance = + instantiate_image_instantiator (governing_domain, + domain, instantiator, + pointer_fg, pointer_bg, + dest_mask, glyph); + + /* We need a per-frame cache for redisplay. */ + cache_subwindow_instance_in_frame_maybe (instance); Fsetcar (locative, instance); - /* only after the image has been instantiated do we know - whether we need to put it in the per-window image instance - cache. */ - if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance)) - & - (IMAGE_SUBWINDOW_MASK - | IMAGE_WIDGET_MASK - | IMAGE_LAYOUT_MASK - | IMAGE_TEXT_MASK )) - { #ifdef ERROR_CHECK_GLYPHS - if (XIMAGE_INSTANCE_TYPE (instance) != IMAGE_TEXT) - assert (EQ (XIMAGE_INSTANCE_SUBWINDOW_FRAME (instance), - FW_FRAME (domain))); -#endif - if (!WINDOWP (domain)) - signal_simple_error ("Can't instantiate text or subwindow outside a window", - instantiator); -#ifdef ERROR_CHECK_GLYPHS - if (XIMAGE_INSTANCE_TYPE (instance) != IMAGE_TEXT) - assert (EQ (XIMAGE_INSTANCE_SUBWINDOW_FRAME (instance), - FW_FRAME (domain))); + if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance)) + & (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK)) + assert (EQ (XIMAGE_INSTANCE_FRAME (instance), + DOMAIN_FRAME (domain))); #endif - Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache); - } unbind_to (speccount, Qnil); #ifdef ERROR_CHECK_GLYPHS if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance)) - & - (IMAGE_SUBWINDOW_MASK - | IMAGE_WIDGET_MASK - | IMAGE_LAYOUT_MASK - | IMAGE_TEXT_MASK )) + & (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK)) assert (EQ (Fgethash ((pointerp ? ls3 : instantiator), - XWINDOW (domain)->subwindow_instance_cache, + XWINDOW (governing_domain) + ->subwindow_instance_cache, Qunbound), instance)); #endif } @@ -2929,9 +3142,10 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, #ifdef ERROR_CHECK_GLYPHS if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance)) & (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK)) - assert (EQ (XIMAGE_INSTANCE_SUBWINDOW_FRAME (instance), - FW_FRAME (domain))); + assert (EQ (XIMAGE_INSTANCE_FRAME (instance), + DOMAIN_FRAME (domain))); #endif + ERROR_CHECK_IMAGE_INSTANCE (instance); return instance; } @@ -3146,187 +3360,7 @@ image_copy_instantiator (Lisp_Object arg) DEFUN ("image-specifier-p", Fimage_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is an image specifier. - -An image specifier is used for images (pixmaps and the like). It is used -to describe the actual image in a glyph. It is instanced as an image- -instance. - -Image instantiators come in many formats: `xbm', `xpm', `gif', `jpeg', -etc. This describes the format of the data describing the image. The -resulting image instances also come in many types -- `mono-pixmap', -`color-pixmap', `text', `pointer', etc. This refers to the behavior of -the image and the sorts of places it can appear. (For example, a -color-pixmap image has fixed colors specified for it, while a -mono-pixmap image comes in two unspecified shades "foreground" and -"background" that are determined from the face of the glyph or -surrounding text; a text image appears as a string of text and has an -unspecified foreground, background, and font; a pointer image behaves -like a mono-pixmap image but can only be used as a mouse pointer -\[mono-pixmap images cannot be used as mouse pointers]; etc.) It is -important to keep the distinction between image instantiator format and -image instance type in mind. Typically, a given image instantiator -format can result in many different image instance types (for example, -`xpm' can be instanced as `color-pixmap', `mono-pixmap', or `pointer'; -whereas `cursor-font' can be instanced only as `pointer'), and a -particular image instance type can be generated by many different -image instantiator formats (e.g. `color-pixmap' can be generated by `xpm', -`gif', `jpeg', etc.). - -See `make-image-instance' for a more detailed discussion of image -instance types. - -An image instantiator should be a string or a vector of the form - - [FORMAT :KEYWORD VALUE ...] - -i.e. a format symbol followed by zero or more alternating keyword-value -pairs. FORMAT should be one of - -'nothing - (Don't display anything; no keywords are valid for this. - Can only be instanced as `nothing'.) -'string - (Display this image as a text string. Can only be instanced - as `text', although support for instancing as `mono-pixmap' - should be added.) -'formatted-string - (Display this image as a text string, with replaceable fields; - not currently implemented.) -'xbm - (An X bitmap; only if X or Windows support was compiled into this XEmacs. - Can be instanced as `mono-pixmap', `color-pixmap', or `pointer'.) -'xpm - (An XPM pixmap; only if XPM support was compiled into this XEmacs. - Can be instanced as `color-pixmap', `mono-pixmap', or `pointer'.) -'xface - (An X-Face bitmap, used to encode people's faces in e-mail messages; - only if X-Face support was compiled into this XEmacs. Can be - instanced as `mono-pixmap', `color-pixmap', or `pointer'.) -'gif - (A GIF87 or GIF89 image; only if GIF support was compiled into this - XEmacs. NOTE: only the first frame of animated gifs will be displayed. - Can be instanced as `color-pixmap'.) -'jpeg - (A JPEG image; only if JPEG support was compiled into this XEmacs. - Can be instanced as `color-pixmap'.) -'png - (A PNG image; only if PNG support was compiled into this XEmacs. - Can be instanced as `color-pixmap'.) -'tiff - (A TIFF image; only if TIFF support was compiled into this XEmacs. - Can be instanced as `color-pixmap'.) -'cursor-font - (One of the standard cursor-font names, such as "watch" or - "right_ptr" under X. Under X, this is, more specifically, any - of the standard cursor names from appendix B of the Xlib manual - [also known as the file ] minus the XC_ prefix. - On other window systems, the valid names will be specific to the - type of window system. Can only be instanced as `pointer'.) -'font - (A glyph from a font; i.e. the name of a font, and glyph index into it - of the form "FONT fontname index [[mask-font] mask-index]". - Currently can only be instanced as `pointer', although this should - probably be fixed.) -'subwindow - (An embedded windowing system window.) -'edit-field - (A text editing widget glyph.) -'button - (A button widget glyph; either a push button, radio button or toggle button.) -'tab-control - (A tab widget glyph; a series of user selectable tabs.) -'progress-gauge - (A sliding widget glyph, for showing progress.) -'combo-box - (A drop list of selectable items in a widget glyph, for editing text.) -'label - (A static, text-only, widget glyph; for displaying text.) -'tree-view - (A folding widget glyph.) -'autodetect - (XEmacs tries to guess what format the data is in. If X support - exists, the data string will be checked to see if it names a filename. - If so, and this filename contains XBM or XPM data, the appropriate - sort of pixmap or pointer will be created. [This includes picking up - any specified hotspot or associated mask file.] Otherwise, if `pointer' - is one of the allowable image-instance types and the string names a - valid cursor-font name, the image will be created as a pointer. - Otherwise, the image will be displayed as text. If no X support - exists, the image will always be displayed as text.) -'inherit - Inherit from the background-pixmap property of a face. - -The valid keywords are: - -:data - (Inline data. For most formats above, this should be a string. For - XBM images, this should be a list of three elements: width, height, and - a string of bit data. This keyword is not valid for instantiator - formats `nothing' and `inherit'.) -:file - (Data is contained in a file. The value is the name of this file. - If both :data and :file are specified, the image is created from - what is specified in :data and the string in :file becomes the - value of the `image-instance-file-name' function when applied to - the resulting image-instance. This keyword is not valid for - instantiator formats `nothing', `string', `formatted-string', - `cursor-font', `font', `autodetect', and `inherit'.) -:foreground -:background - (For `xbm', `xface', `cursor-font', `widget' and `font'. These keywords - allow you to explicitly specify foreground and background colors. - The argument should be anything acceptable to `make-color-instance'. - This will cause what would be a `mono-pixmap' to instead be colorized - as a two-color color-pixmap, and specifies the foreground and/or - background colors for a pointer instead of black and white.) -:mask-data - (For `xbm' and `xface'. This specifies a mask to be used with the - bitmap. The format is a list of width, height, and bits, like for - :data.) -:mask-file - (For `xbm' and `xface'. This specifies a file containing the mask data. - If neither a mask file nor inline mask data is given for an XBM image, - and the XBM image comes from a file, XEmacs will look for a mask file - with the same name as the image file but with "Mask" or "msk" - appended. For example, if you specify the XBM file "left_ptr" - [usually located in "/usr/include/X11/bitmaps"], the associated - mask file "left_ptrmsk" will automatically be picked up.) -:hotspot-x -:hotspot-y - (For `xbm' and `xface'. These keywords specify a hotspot if the image - is instantiated as a `pointer'. Note that if the XBM image file - specifies a hotspot, it will automatically be picked up if no - explicit hotspot is given.) -:color-symbols - (Only for `xpm'. This specifies an alist that maps strings - that specify symbolic color names to the actual color to be used - for that symbolic color (in the form of a string or a color-specifier - object). If this is not specified, the contents of `xpm-color-symbols' - are used to generate the alist.) -:face - (Only for `inherit'. This specifies the face to inherit from. - For widget glyphs this also specifies the face to use for - display. It defaults to gui-element-face.) - -Keywords accepted as menu item specs are also accepted by widget -glyphs. These are `:selected', `:active', `:suffix', `:keys', -`:style', `:filter', `:config', `:included', `:key-sequence', -`:accelerator', `:label' and `:callback'. - -If instead of a vector, the instantiator is a string, it will be -converted into a vector by looking it up according to the specs in the -`console-type-image-conversion-list' (q.v.) for the console type of -the domain (usually a window; sometimes a frame or device) over which -the image is being instantiated. - -If the instantiator specifies data from a file, the data will be read -in at the time that the instantiator is added to the image (which may -be well before when the image is actually displayed), and the -instantiator will be converted into one of the inline-data forms, with -the filename retained using a :file keyword. This implies that the -file must exist when the instantiator is added to the image, but does -not need to exist at any other time (e.g. it may safely be a temporary -file). +See `make-image-specifier' for a description of image instantiators. */ (object)) { @@ -3496,8 +3530,7 @@ allocate_glyph (enum glyph_type type, XIMAGE_SPECIFIER_ALLOWED (g->image) = IMAGE_NOTHING_MASK | IMAGE_TEXT_MASK | IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK - | IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK - | IMAGE_LAYOUT_MASK; + | IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK; break; case GLYPH_POINTER: XIMAGE_SPECIFIER_ALLOWED (g->image) = @@ -3612,11 +3645,13 @@ iconified. Their image can be instantiated as `mono-pixmap' and DEFUN ("glyphp", Fglyphp, 1, 1, 0, /* Return non-nil if OBJECT is a glyph. -A glyph is an object used for pixmaps and the like. It is used +A glyph is an object used for pixmaps, widgets and the like. It is used in begin-glyphs and end-glyphs attached to extents, in marginal and textual annotations, in overlay arrows (overlay-arrow-* variables), in toolbar -buttons, and the like. Its image is described using an image specifier -- -see `image-specifier-p'. +buttons, and the like. Much more detailed information can be found at +`make-glyph'. Its image is described using an image specifier -- +see `make-image-specifier'. See also `make-image-instance' for further +information. */ (object)) { @@ -3651,6 +3686,7 @@ glyph_image_instance (Lisp_Object glyph, Lisp_Object domain, domain, errb, no_quit, 0, Qzero); assert (!UNBOUNDP (image_instance)); + ERROR_CHECK_IMAGE_INSTANCE (image_instance); return image_instance; } @@ -3808,6 +3844,9 @@ set_glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window, int dirty) XGLYPH_DIRTYP (glyph_or_image) = dirty; } + if (!IMAGE_INSTANCEP (instance)) + return; + XIMAGE_INSTANCE_DIRTYP (instance) = dirty; } } @@ -3957,6 +3996,9 @@ update_glyph_cachel_data (struct window *w, Lisp_Object glyph, and passing it to the size functions. */ instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); + if (!IMAGE_INSTANCEP (instance)) + return; + /* Mark text instance of the glyph dirty if faces have changed, because its geometry might have changed. */ invalidate_glyph_geometry_maybe (instance, w); @@ -4092,139 +4134,68 @@ compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, per-frame instance cache that we use to determine if a subwindow is obscuring an area that we want to clear. We need to be able to flip through this quickly so a hashtable is not suitable hence the - subwindow_cachels. The question is should we just not mark - instances in the subwindow_cachels or should we try and invalidate - the cache at suitable points in redisplay? If we don't invalidate - the cache it will fill up with crud that will only get removed when - the frame is deleted. So invalidation is good, the question is when - and whether we mark as well. Go for the simple option - don't mark, - MARK_SUBWINDOWS_CHANGED when a subwindow gets deleted. */ - -void -mark_subwindow_cachels (subwindow_cachel_dynarr *elements) -{ - int elt; - - if (!elements) - return; - - for (elt = 0; elt < Dynarr_length (elements); elt++) - { - struct subwindow_cachel *cachel = Dynarr_atp (elements, elt); - mark_object (cachel->subwindow); - } -} + subwindow_cachels. This is a weak list so unreference instances + will get deleted properly. */ -static void -update_subwindow_cachel_data (struct frame *f, Lisp_Object subwindow, - struct subwindow_cachel *cachel) -{ - cachel->subwindow = subwindow; - cachel->width = XIMAGE_INSTANCE_SUBWINDOW_WIDTH (subwindow); - cachel->height = XIMAGE_INSTANCE_SUBWINDOW_HEIGHT (subwindow); - cachel->updated = 1; -} +/* redisplay in general assumes that drawing something will erase + what was there before. unfortunately this does not apply to + subwindows that need to be specifically unmapped in order to + disappear. we take a brute force approach - on the basis that its + cheap - and unmap all subwindows in a display line */ +/* Put new instances in the frame subwindow cache. This is less costly than + doing it every time something gets mapped, and deleted instances will be + removed automatically. */ static void -add_subwindow_cachel (struct frame *f, Lisp_Object subwindow) +cache_subwindow_instance_in_frame_maybe (Lisp_Object instance) { - struct subwindow_cachel new_cachel; - - xzero (new_cachel); - new_cachel.subwindow = Qnil; - new_cachel.x=0; - new_cachel.y=0; - new_cachel.being_displayed=0; - - update_subwindow_cachel_data (f, subwindow, &new_cachel); - Dynarr_add (f->subwindow_cachels, new_cachel); -} - -static int -get_subwindow_cachel_index (struct frame *f, Lisp_Object subwindow) -{ - int elt; - - if (noninteractive) - return 0; - - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + Lisp_Image_Instance* ii = XIMAGE_INSTANCE (instance); + if (image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) + & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK)) { - struct subwindow_cachel *cachel = - Dynarr_atp (f->subwindow_cachels, elt); - - if (EQ (cachel->subwindow, subwindow) && !NILP (subwindow)) - { - if (!cachel->updated) - update_subwindow_cachel_data (f, subwindow, cachel); - return elt; - } + struct frame* f = DOMAIN_XFRAME (IMAGE_INSTANCE_DOMAIN (ii)); + XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)) + = Fcons (instance, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))); } - - /* If we didn't find the glyph, add it and then return its index. */ - add_subwindow_cachel (f, subwindow); - return elt; } -static void -update_subwindow_cachel (Lisp_Object subwindow) +/* Unmap and finalize all subwindow instances in the frame cache. This + is necessary because GC will not guarantee the order things get + deleted in and moreover, frame finalization deletes the window + system windows before deleting XEmacs windows, and hence + subwindows. */ +void +free_frame_subwindow_instance_cache (struct frame* f) { - struct frame* f; - int elt; - - if (NILP (subwindow)) - return; - - f = XFRAME ( XIMAGE_INSTANCE_SUBWINDOW_FRAME (subwindow)); + Lisp_Object rest; - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))) { - struct subwindow_cachel *cachel = - Dynarr_atp (f->subwindow_cachels, elt); - - if (EQ (cachel->subwindow, subwindow) && !NILP (subwindow)) - { - update_subwindow_cachel_data (f, subwindow, cachel); - } + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (XCAR (rest)); + /* Make sure that the subwindow is unmapped so that window + deletion will not try and do it again. */ + unmap_subwindow (XCAR (rest)); + finalize_image_instance (ii, 0); } } -/* redisplay in general assumes that drawing something will erase - what was there before. unfortunately this does not apply to - subwindows that need to be specifically unmapped in order to - disappear. we take a brute force approach - on the basis that its - cheap - and unmap all subwindows in a display line */ +/* Unmap and remove all instances from the frame cache. */ void -reset_subwindow_cachels (struct frame *f) +reset_frame_subwindow_instance_cache (struct frame* f) { - int elt; - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) - { - struct subwindow_cachel *cachel = - Dynarr_atp (f->subwindow_cachels, elt); + Lisp_Object rest; - if (!NILP (cachel->subwindow) && cachel->being_displayed) - { - cachel->updated = 1; - /* #### This is not optimal as update_subwindow will search - the cachels for ourselves as well. We could easily optimize. */ - unmap_subwindow (cachel->subwindow); - } + LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))) + { + Lisp_Object value = XCAR (rest); + /* Make sure that the subwindow is unmapped so that window + deletion will not try and do it again. */ + unmap_subwindow (value); + XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)) + = delq_no_quit (value, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))); } - Dynarr_reset (f->subwindow_cachels); -} - -void -mark_subwindow_cachels_as_not_updated (struct frame *f) -{ - int elt; - - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) - Dynarr_atp (f->subwindow_cachels, elt)->updated = 0; } - - /***************************************************************************** * subwindow exposure ignorance * *****************************************************************************/ @@ -4315,20 +4286,23 @@ register_ignored_expose (struct frame* f, int x, int y, int width, int height) ****************************************************************************/ int find_matching_subwindow (struct frame* f, int x, int y, int width, int height) { - int elt; + Lisp_Object rest; - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))) { - struct subwindow_cachel *cachel = - Dynarr_atp (f->subwindow_cachels, elt); + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (XCAR (rest)); - if (cachel->being_displayed + if (IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) && - cachel->x <= x && cachel->y <= y + IMAGE_INSTANCE_DISPLAY_X (ii) <= x + && + IMAGE_INSTANCE_DISPLAY_Y (ii) <= y && - cachel->x + cachel->width >= x + width + IMAGE_INSTANCE_DISPLAY_X (ii) + + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) >= x + width && - cachel->y + cachel->height >= y + height) + IMAGE_INSTANCE_DISPLAY_Y (ii) + + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) >= y + height) { return 1; } @@ -4356,9 +4330,9 @@ update_subwindow (Lisp_Object subwindow) Fsignal will abort. */ specbind (Qinhibit_quit, Qt); - if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET - || - IMAGE_INSTANCE_TYPE (ii) == IMAGE_LAYOUT) + ERROR_CHECK_IMAGE_INSTANCE (subwindow); + + if (WIDGET_IMAGE_INSTANCEP (subwindow)) { if (image_instance_changed (subwindow)) update_widget (subwindow); @@ -4369,9 +4343,10 @@ update_subwindow (Lisp_Object subwindow) } else if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW && - !NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))) + !NILP (IMAGE_INSTANCE_FRAME (ii))) { - MAYBE_DEVMETH (XDEVICE (ii->device), update_subwindow, (ii)); + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), + update_subwindow, (ii)); } IMAGE_INSTANCE_SIZE_CHANGED (ii) = 0; @@ -4398,72 +4373,77 @@ image_instance_changed (Lisp_Object subwindow) if (internal_hash (subwindow, IMAGE_INSTANCE_HASH_DEPTH) != IMAGE_INSTANCE_DISPLAY_HASH (ii)) return 1; - else if ((WIDGET_IMAGE_INSTANCEP (subwindow) - || LAYOUT_IMAGE_INSTANCEP (subwindow)) - && !internal_equal (IMAGE_INSTANCE_WIDGET_ITEMS (ii), - IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii), 0)) + /* #### I think there is probably a bug here. This gets called for + layouts - and yet the pending items are always nil for + layouts. We are saved by layout optimization, but I'm undecided + as to what the correct fix is. */ + else if (WIDGET_IMAGE_INSTANCEP (subwindow) + && (!internal_equal (IMAGE_INSTANCE_WIDGET_ITEMS (ii), + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii), 0) + || !NILP (IMAGE_INSTANCE_LAYOUT_CHILDREN (ii)))) return 1; else return 0; } /* Update all the subwindows on a frame. */ -DEFUN ("update-widget-instances", Fupdate_widget_instances,1, 1, 0, /* -Given a FRAME, re-evaluate the display hash code for all widgets in the frame. -Don't use this. -*/ - (frame)) +void +update_widget_instances (Lisp_Object frame) { - int elt; struct frame* f; + Lisp_Object rest; + + /* Its possible for the preceeding callback to have deleted the + frame, so cope with this. */ + if (!FRAMEP (frame) || !FRAME_LIVE_P (XFRAME (frame))) + return; + CHECK_FRAME (frame); f = XFRAME (frame); - + /* If we get called we know something has changed. */ - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) - { - struct subwindow_cachel *cachel = - Dynarr_atp (f->subwindow_cachels, elt); - - if (cachel->being_displayed && - image_instance_changed (cachel->subwindow)) - { - set_image_instance_dirty_p (cachel->subwindow, 1); - MARK_FRAME_GLYPHS_CHANGED (f); - } - } - return Qnil; + LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))) + { + Lisp_Object widget = XCAR (rest); + + if (XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (widget) + && + image_instance_changed (widget)) + { + set_image_instance_dirty_p (widget, 1); + MARK_FRAME_GLYPHS_CHANGED (f); + } + } } /* remove a subwindow from its frame */ void unmap_subwindow (Lisp_Object subwindow) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); - int elt; - struct subwindow_cachel* cachel; struct frame* f; - if (!(IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET - || - IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW) + ERROR_CHECK_IMAGE_INSTANCE (subwindow); + + if (!image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) + & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK) || - NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))) + !IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii)) return; + #ifdef DEBUG_WIDGETS stderr_out ("unmapping subwindow %d\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii)); #endif - f = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); - elt = get_subwindow_cachel_index (f, subwindow); - cachel = Dynarr_atp (f->subwindow_cachels, elt); + f = XFRAME (IMAGE_INSTANCE_FRAME (ii)); /* make sure we don't get expose events */ - register_ignored_expose (f, cachel->x, cachel->y, cachel->width, cachel->height); - cachel->x = ~0; - cachel->y = ~0; - cachel->being_displayed = 0; + register_ignored_expose (f, IMAGE_INSTANCE_DISPLAY_X (ii), + IMAGE_INSTANCE_DISPLAY_Y (ii), + IMAGE_INSTANCE_DISPLAY_WIDTH (ii), + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii)); IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; - MAYBE_DEVMETH (XDEVICE (ii->device), unmap_subwindow, (ii)); + MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)), + unmap_subwindow, (ii)); } /* show a subwindow in its frame */ @@ -4471,15 +4451,12 @@ void map_subwindow (Lisp_Object subwindow, int x, int y, struct display_glyph_area *dga) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); - int elt; - struct subwindow_cachel* cachel; struct frame* f; - if (!(IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET - || - IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW) - || - NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))) + ERROR_CHECK_IMAGE_INSTANCE (subwindow); + + if (!image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) + & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK)) return; #ifdef DEBUG_WIDGETS @@ -4487,17 +4464,15 @@ void map_subwindow (Lisp_Object subwindow, int x, int y, IMAGE_INSTANCE_SUBWINDOW_ID (ii), dga->width, dga->height, x, y); #endif - f = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + f = XFRAME (IMAGE_INSTANCE_FRAME (ii)); IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 1; - elt = get_subwindow_cachel_index (f, subwindow); - cachel = Dynarr_atp (f->subwindow_cachels, elt); - cachel->x = x; - cachel->y = y; - cachel->width = dga->width; - cachel->height = dga->height; - cachel->being_displayed = 1; + IMAGE_INSTANCE_DISPLAY_X (ii) = x; + IMAGE_INSTANCE_DISPLAY_Y (ii) = y; + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) = dga->width; + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) = dga->height; - MAYBE_DEVMETH (XDEVICE (ii->device), map_subwindow, (ii, x, y, dga)); + MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), + map_subwindow, (ii, x, y, dga)); } static int @@ -4506,6 +4481,12 @@ subwindow_possible_dest_types (void) return IMAGE_SUBWINDOW_MASK; } +int +subwindow_governing_domain (void) +{ + return GOVERNING_DOMAIN_WINDOW; +} + /* Partially instantiate a subwindow. */ void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, @@ -4513,8 +4494,8 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, int dest_mask, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - Lisp_Object frame = FW_FRAME (domain); + Lisp_Object device = image_instance_device (image_instance); + Lisp_Object frame = DOMAIN_FRAME (domain); Lisp_Object width = find_keyword_in_vector (instantiator, Q_pixel_width); Lisp_Object height = find_keyword_in_vector (instantiator, Q_pixel_height); @@ -4527,31 +4508,35 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, ii->data = 0; IMAGE_INSTANCE_SUBWINDOW_ID (ii) = 0; IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii) = frame; - /* #### This stuff may get overidden by the widget code and is - actually really dumb now that we have dynamic geometry - calculations. What should really happen is that the subwindow - should query its child for an appropriate geometry. */ if (INTP (width)) { int w = 1; if (XINT (width) > 1) w = XINT (width); - IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = w; + IMAGE_INSTANCE_WIDTH (ii) = w; + IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0; } - else - IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20; if (INTP (height)) { int h = 1; if (XINT (height) > 1) h = XINT (height); - IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = h; + IMAGE_INSTANCE_HEIGHT (ii) = h; + IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0; } - else - IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = 20; +} + +/* This is just a backup in case no-one has assigned a suitable geometry. + #### It should really query the enclose window for geometry. */ +static void +subwindow_query_geometry (Lisp_Object image_instance, unsigned int* width, + unsigned int* height, enum image_instance_geometry disp, + Lisp_Object domain) +{ + if (width) *width = 20; + if (height) *height = 20; } DEFUN ("subwindowp", Fsubwindowp, 1, 1, 0, /* @@ -4600,9 +4585,6 @@ If a value is nil that parameter is not changed. IMAGE_INSTANCE_WIDTH (ii) = neww; IMAGE_INSTANCE_SIZE_CHANGED (ii) = 1; - /* need to update the cachels as redisplay will not do this */ - update_subwindow_cachel (subwindow); - return subwindow; } @@ -4736,7 +4718,7 @@ Don't use this. /* We might need to kick redisplay at this point - but we also might not. */ MARK_DEVICE_FRAMES_GLYPHS_CHANGED - (XDEVICE (IMAGE_INSTANCE_DEVICE (ii))); + (XDEVICE (image_instance_device (value))); /* Cascade dirtiness so that we can have an animated glyph in a layout for instance. */ set_image_instance_dirty_p (value, 1); @@ -4793,7 +4775,6 @@ syms_of_glyphs (void) DEFSUBR (Fvalid_image_instantiator_format_p); DEFSUBR (Fset_console_type_image_conversion_list); DEFSUBR (Fconsole_type_image_conversion_list); - DEFSUBR (Fupdate_widget_instances); defkeyword (&Q_file, ":file"); defkeyword (&Q_data, ":data"); @@ -4828,8 +4809,6 @@ syms_of_glyphs (void) defsymbol (&Qpointer_image_instance_p, "pointer-image-instance-p"); defsymbol (&Qwidget_image_instance_p, "widget-image-instance-p"); defsymbol (&Qsubwindow_image_instance_p, "subwindow-image-instance-p"); - defsymbol (&Qlayout_image_instance_p, "layout-image-instance-p"); - defsymbol (&Qupdate_widget_instances, "update-widget-instances"); DEFSUBR (Fmake_image_instance); DEFSUBR (Fimage_instance_p); @@ -4837,6 +4816,7 @@ syms_of_glyphs (void) DEFSUBR (Fvalid_image_instance_type_p); DEFSUBR (Fimage_instance_type_list); DEFSUBR (Fimage_instance_name); + DEFSUBR (Fimage_instance_domain); DEFSUBR (Fimage_instance_string); DEFSUBR (Fimage_instance_file_name); DEFSUBR (Fimage_instance_mask_file_name); @@ -5015,11 +4995,14 @@ image_instantiator_format_create (void) INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (string, "string"); IIFORMAT_HAS_METHOD (string, validate); + IIFORMAT_HAS_SHARED_METHOD (string, governing_domain, subwindow); IIFORMAT_HAS_METHOD (string, possible_dest_types); IIFORMAT_HAS_METHOD (string, instantiate); IIFORMAT_VALID_KEYWORD (string, Q_data, check_valid_string); /* Do this so we can set strings. */ + /* #### Andy, what is this? This is a bogus format and should not be + visible to the user. */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (text, "text"); IIFORMAT_HAS_METHOD (text, set_property); IIFORMAT_HAS_METHOD (text, query_geometry); @@ -5031,10 +5014,18 @@ image_instantiator_format_create (void) IIFORMAT_HAS_METHOD (formatted_string, instantiate); IIFORMAT_VALID_KEYWORD (formatted_string, Q_data, check_valid_string); + /* Do this so pointers have geometry. */ + /* #### Andy, what is this? This is a bogus format and should not be + visible to the user. */ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (pointer, "pointer"); + IIFORMAT_HAS_SHARED_METHOD (pointer, query_geometry, subwindow); + /* subwindows */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (subwindow, "subwindow"); IIFORMAT_HAS_METHOD (subwindow, possible_dest_types); + IIFORMAT_HAS_METHOD (subwindow, governing_domain); IIFORMAT_HAS_METHOD (subwindow, instantiate); + IIFORMAT_HAS_METHOD (subwindow, query_geometry); IIFORMAT_VALID_KEYWORD (subwindow, Q_pixel_width, check_valid_int); IIFORMAT_VALID_KEYWORD (subwindow, Q_pixel_height, check_valid_int); @@ -5181,12 +5172,53 @@ specifier_vars_of_glyphs (void) DEFVAR_SPECIFIER ("current-display-table", &Vcurrent_display_table /* *The display table currently in use. This is a specifier; use `set-specifier' to change it. -The display table is a vector created with `make-display-table'. -The 256 elements control how to display each possible text character. -Each value should be a string, a glyph, a vector or nil. -If a value is a vector it must be composed only of strings and glyphs. -nil means display the character in the default fashion. -Faces can have their own, overriding display table. + +Display tables are used to control how characters are displayed. Each +time that redisplay processes a character, it is looked up in all the +display tables that apply (obtained by calling `specifier-instance' on +`current-display-table' and any overriding display tables specified in +currently active faces). The first entry found that matches the +character determines how the character is displayed. If there is no +matching entry, the default display method is used. (Non-control +characters are displayed as themselves and control characters are +displayed according to the buffer-local variable `ctl-arrow'. Control +characters are further affected by `control-arrow-glyph' and +`octal-escape-glyph'.) + +Each instantiator in this specifier and the display-table specifiers +in faces is a display table or a list of such tables. If a list, each +table will be searched in turn for an entry matching a particular +character. Each display table is one of + +-- a vector, specifying values for characters starting at 0 +-- a char table, either of type `char' or `generic' +-- a range table + +Each entry in a display table should be one of + +-- nil (this entry is ignored and the search continues) +-- a character (use this character; if it happens to be the same as + the original character, default processing happens, otherwise + redisplay attempts to display this character directly; + #### At some point recursive display-table lookup will be + implemented.) +-- a string (display each character in the string directly; + #### At some point recursive display-table lookup will be + implemented.) +-- a glyph (display the glyph; + #### At some point recursive display-table lookup will be + implemented when a string glyph is being processed.) +-- a cons of the form (format "STRING") where STRING is a printf-like + spec used to process the character. #### Unfortunately no + formatting directives other than %% are implemented. +-- a vector (each element of the vector is processed recursively; + in such a case, nil elements in the vector are simply ignored) + +#### At some point in the near future, display tables are likely to +be expanded to include other features, such as referencing characters +in particular fonts and allowing the character search to continue +all the way up the chain of specifier instantiators. These features +are necessary to properly display Unicode characters. */ ); Vcurrent_display_table = Fmake_specifier (Qdisplay_table); set_specifier_fallback (Vcurrent_display_table, diff --git a/src/glyphs.h b/src/glyphs.h index 77ae598..95fc7f6 100644 --- a/src/glyphs.h +++ b/src/glyphs.h @@ -50,19 +50,21 @@ struct image_instantiator_methods; tiff color-pixmap bmp color-pixmap cursor-font pointer - mswindows-resource pointer + mswindows-resource pointer, color-pixmap font pointer subwindow subwindow inherit mono-pixmap autodetect mono-pixmap, color-pixmap, pointer, text button widget edit-field widget - combo -box widget + combo-box widget progress-gauge widget tab-control widget tree-view widget scrollbar widget - static widget + label widget + layout widget + native-layout widget */ /* These are methods specific to a particular format of image instantiator @@ -96,6 +98,13 @@ enum image_instance_geometry #define WIDGET_BORDER_HEIGHT 4 #define WIDGET_BORDER_WIDTH 4 +enum governing_domain +{ + GOVERNING_DOMAIN_WINDOW, + GOVERNING_DOMAIN_FRAME, + GOVERNING_DOMAIN_DEVICE +}; + struct image_instantiator_methods { Lisp_Object symbol; @@ -120,6 +129,10 @@ struct image_instantiator_methods Lisp_Object (*normalize_method) (Lisp_Object instantiator, Lisp_Object console_type); + /* Governing domain method: Return an int indicating what type of + domain an instance in this format is governed by. */ + int (*governing_domain_method) (void); + /* Possible-dest-types method: Return a mask indicating what dest types are compatible with this format. */ int (*possible_dest_types_method) (void); @@ -134,6 +147,11 @@ struct image_instantiator_methods Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain); + /* Post instantiate method: finish instantiation of the image + instance. */ + void (*post_instantiate_method) (Lisp_Object image_instance, + Lisp_Object instantiator, + Lisp_Object domain); /* Property method: Given an image instance, return device specific properties. */ Lisp_Object (*property_method) (Lisp_Object image_instance, @@ -155,10 +173,10 @@ struct image_instantiator_methods Lisp_Object domain); /* Layout the instance and its children bounded by the provided - dimensions. */ - void (*layout_method) (Lisp_Object image_instance, - unsigned int width, unsigned int height, - Lisp_Object domain); + dimensions. Returns success or failure. */ + int (*layout_method) (Lisp_Object image_instance, + unsigned int width, unsigned int height, + Lisp_Object domain); }; /***** Calling an image-instantiator method *****/ @@ -187,7 +205,7 @@ do { \ the specified value */ #define IIFORMAT_METH_OR_GIVEN(mstruc, m, args, given) \ - (HAS_IIFORMAT_METH_P (mstruc, m) ? \ + ((mstruc && HAS_IIFORMAT_METH_P (mstruc, m)) ? \ IIFORMAT_METH (mstruc, m, args) : (given)) /***** Defining new image-instantiator types *****/ @@ -336,6 +354,7 @@ void initialize_subwindow_image_instance (Lisp_Image_Instance*); void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain); +int subwindow_governing_domain (void); void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain); @@ -346,6 +365,9 @@ void image_instance_query_geometry (Lisp_Object image_instance, void image_instance_layout (Lisp_Object image_instance, unsigned int width, unsigned int height, Lisp_Object domain); +int layout_layout (Lisp_Object image_instance, + unsigned int width, unsigned int height, + Lisp_Object domain); int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w); DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, @@ -395,6 +417,18 @@ DECLARE_LRECORD (image_instance, Lisp_Image_Instance); #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) +#ifdef ERROR_CHECK_GLYPHS +void check_image_instance_structure (Lisp_Object instance); +void check_window_subwindow_cache (struct window* w); +#define ERROR_CHECK_IMAGE_INSTANCE(ii) \ + check_image_instance_structure (ii) +#define ERROR_CHECK_SUBWINDOW_CACHE(w) \ + check_window_subwindow_cache (w) +#else +#define ERROR_CHECK_IMAGE_INSTANCE(ii) +#define ERROR_CHECK_SUBWINDOW_CACHE(w) +#endif + enum image_instance_type { IMAGE_UNKNOWN, @@ -404,8 +438,7 @@ enum image_instance_type IMAGE_COLOR_PIXMAP, IMAGE_POINTER, IMAGE_SUBWINDOW, - IMAGE_WIDGET, - IMAGE_LAYOUT + IMAGE_WIDGET }; #define IMAGE_NOTHING_MASK (1 << 0) @@ -415,7 +448,13 @@ enum image_instance_type #define IMAGE_POINTER_MASK (1 << 4) #define IMAGE_SUBWINDOW_MASK (1 << 5) #define IMAGE_WIDGET_MASK (1 << 6) -#define IMAGE_LAYOUT_MASK (1 << 7) + +/* This depends on the fact that enums are assigned consecutive + integers starting at 0. (Remember that IMAGE_UNKNOWN is the + first enum.) I'm fairly sure this behavior is ANSI-mandated, + so there should be no portability problems here. */ +#define image_instance_type_to_mask(type) \ + ((int) (1 << ((int) (type) - 1))) #define IMAGE_INSTANCE_TYPE_P(ii, type) \ (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type) @@ -434,8 +473,6 @@ enum image_instance_type IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW) #define WIDGET_IMAGE_INSTANCEP(ii) \ IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET) -#define LAYOUT_IMAGE_INSTANCEP(ii) \ - IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT) #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ CHECK_IMAGE_INSTANCE (x); \ @@ -480,23 +517,20 @@ enum image_instance_type x = wrong_type_argument (Qwidget_image_instance_p, (x)); \ } while (0) -#define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \ - CHECK_IMAGE_INSTANCE (x); \ - if (!LAYOUT_IMAGE_INSTANCEP (x)) \ - x = wrong_type_argument (Qlayout_image_instance_p, (x)); \ -} while (0) - struct Lisp_Image_Instance { struct lcrecord_header header; - Lisp_Object device; + Lisp_Object domain; /* The domain in which we were cached. */ + Lisp_Object device; /* The device of the domain. Recorded + since the domain may get deleted + before us. */ Lisp_Object name; /* The glyph from which we were instantiated. This is a weak reference. */ Lisp_Object parent; enum image_instance_type type; unsigned int x_offset, y_offset; /* for layout purposes */ - unsigned int width, height; + unsigned int width, height, margin_width; unsigned long display_hash; /* Hash value representing the structure of the image_instance when it was last displayed. */ @@ -505,6 +539,7 @@ struct Lisp_Image_Instance unsigned int text_changed : 1; unsigned int layout_changed : 1; unsigned int optimize_output : 1; /* For outputting layouts. */ + unsigned int initialized : 1; /* When we're fully done. */ union { @@ -529,22 +564,29 @@ struct Lisp_Image_Instance } pixmap; /* used for pointers as well */ struct { - Lisp_Object frame; void* subwindow; /* specific devices can use this as necessary */ - unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */ + struct + { /* We need these so we can do without + subwindow_cachel */ + unsigned int x, y; + unsigned int width, height; + } display_data; + unsigned int being_displayed : 1; /* used to detect when needs + to be unmapped */ unsigned int v_resize : 1; /* Whether the vsize is allowed to change. */ unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */ unsigned int orientation : 1; /* Vertical or horizontal. */ unsigned int justification : 2; /* Left, right or center. */ - /* Face for colors and font. We specify this here becuase we + /* Face for colors and font. We specify this here because we want people to be able to put :face in the instantiator spec. Using gyph-face is more inconvenient, although more general. */ Lisp_Object face; Lisp_Object type; Lisp_Object props; /* properties or border*/ - Lisp_Object items; /* a list of gui_items or children */ + Lisp_Object items; /* a list of displayed gui_items */ Lisp_Object pending_items; /* gui_items that should be displayed */ + Lisp_Object children; /* a list of children */ Lisp_Object width; /* dynamic width spec. */ Lisp_Object height; /* dynamic height spec. */ /* Change flags to augment dirty. */ @@ -568,7 +610,10 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_HASH_DEPTH 0 /* Accessor macros. */ +#define IMAGE_INSTANCE_DOMAIN(i) ((i)->domain) +#define IMAGE_INSTANCE_DOMAIN_LIVE_P(i) (DOMAIN_LIVE_P ((i)->domain)) #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) +#define IMAGE_INSTANCE_FRAME(i) (DOMAIN_FRAME ((i)->domain)) #define IMAGE_INSTANCE_NAME(i) ((i)->name) #define IMAGE_INSTANCE_PARENT(i) ((i)->parent) #define IMAGE_INSTANCE_GLYPH(i) (image_instance_parent_glyph(i)) @@ -576,14 +621,18 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) #define IMAGE_INSTANCE_WIDTH(i) ((i)->width) +#define IMAGE_INSTANCE_MARGIN_WIDTH(i) ((i)->margin_width) #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) +#define IMAGE_INSTANCE_INITIALIZED(i) ((i)->initialized) #define IMAGE_INSTANCE_DISPLAY_HASH(i) ((i)->display_hash) #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) #define IMAGE_INSTANCE_NEEDS_LAYOUT(i) \ - (IMAGE_INSTANCE_DIRTYP (i) && IMAGE_INSTANCE_LAYOUT_CHANGED (i)) + ((IMAGE_INSTANCE_DIRTYP (i) && IMAGE_INSTANCE_LAYOUT_CHANGED (i)) \ + || (FRAMEP (IMAGE_INSTANCE_FRAME (i)) \ + && XFRAME (IMAGE_INSTANCE_FRAME (i))->size_changed)) #define IMAGE_INSTANCE_FACE(i) \ (GLYPHP (IMAGE_INSTANCE_GLYPH (i)) ? \ XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) : Qnil) @@ -627,12 +676,14 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout) /* Subwindow properties */ -#define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ - IMAGE_INSTANCE_WIDTH(i) -#define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \ - IMAGE_INSTANCE_HEIGHT(i) #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow) -#define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame) +/* Display data. */ +#define IMAGE_INSTANCE_DISPLAY_X(i) ((i)->u.subwindow.display_data.x) +#define IMAGE_INSTANCE_DISPLAY_Y(i) ((i)->u.subwindow.display_data.y) +#define IMAGE_INSTANCE_DISPLAY_WIDTH(i) \ + ((i)->u.subwindow.display_data.width) +#define IMAGE_INSTANCE_DISPLAY_HEIGHT(i) \ + ((i)->u.subwindow.display_data.height) #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ ((i)->u.subwindow.being_displayed) #define IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP(i) \ @@ -669,11 +720,17 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name /* Layout properties */ -#define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.items) +#define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.children) #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.props) +#define XIMAGE_INSTANCE_DOMAIN(i) \ + IMAGE_INSTANCE_DOMAIN (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DOMAIN_LIVE_P(i) \ + IMAGE_INSTANCE_DOMAIN_LIVE_P (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_DEVICE(i) \ IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_FRAME(i) \ + IMAGE_INSTANCE_FRAME (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_NAME(i) \ IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_GLYPH(i) \ @@ -694,8 +751,12 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ IMAGE_INSTANCE_NEEDS_LAYOUT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDTH(i) \ IMAGE_INSTANCE_WIDTH (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_MARGIN_WIDTH(i) \ + IMAGE_INSTANCE_MARGIN_WIDTH (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_HEIGHT(i) \ IMAGE_INSTANCE_HEIGHT (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_INITIALIZED(i) \ + IMAGE_INSTANCE_INITIALIZED (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_FACE(i) \ IMAGE_INSTANCE_FACE (XIMAGE_INSTANCE (i)) @@ -767,14 +828,16 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ #define XIMAGE_INSTANCE_LAYOUT_BORDER(i) \ IMAGE_INSTANCE_LAYOUT_BORDER (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ - IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \ - IMAGE_INSTANCE_SUBWINDOW_HEIGHT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_SUBWINDOW_ID(i) \ IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \ - IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DISPLAY_X(i) \ + IMAGE_INSTANCE_DISPLAY_X (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DISPLAY_Y(i) \ + IMAGE_INSTANCE_DISPLAY_Y (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DISPLAY_WIDTH(i) \ + IMAGE_INSTANCE_DISPLAY_WIDTH (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DISPLAY_HEIGHT(i) \ + IMAGE_INSTANCE_DISPLAY_HEIGHT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \ @@ -785,6 +848,11 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ #define MARK_IMAGE_INSTANCE_CHANGED(i) \ (IMAGE_INSTANCE_DIRTYP (i) = 1); +Lisp_Object image_instance_device (Lisp_Object instance); +Lisp_Object image_instance_frame (Lisp_Object instance); +Lisp_Object image_instance_window (Lisp_Object instance); +int image_instance_live_p (Lisp_Object instance); + #ifdef HAVE_XPM Lisp_Object evaluate_xpm_color_symbols (void); Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid); @@ -883,8 +951,7 @@ extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; extern Lisp_Object Q_items, Q_properties, Q_image, Qimage_conversion_error; -extern Lisp_Object Q_orientation, Qupdate_widget_instances; -extern Lisp_Object Qwidget_callback_current_channel; +extern Lisp_Object Q_orientation, Q_margin_width; extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; extern Lisp_Object Vxemacs_logo; @@ -949,18 +1016,55 @@ struct glyph_cachel #define OCT_ESC_GLYPH_INDEX (glyph_index) 4 #define INVIS_GLYPH_INDEX (glyph_index) 5 -#define GLYPH_CACHEL(window, index) \ - Dynarr_atp (window->glyph_cachels, index) -#define GLYPH_CACHEL_GLYPH(window, index) \ - Dynarr_atp (window->glyph_cachels, index)->glyph -#define GLYPH_CACHEL_WIDTH(window, index) \ - Dynarr_atp (window->glyph_cachels, index)->width -#define GLYPH_CACHEL_ASCENT(window, index) \ - Dynarr_atp (window->glyph_cachels, index)->ascent -#define GLYPH_CACHEL_DESCENT(window, index) \ - Dynarr_atp (window->glyph_cachels, index)->descent -#define GLYPH_CACHEL_DIRTYP(window, index) \ - Dynarr_atp (window->glyph_cachels, index)->dirty +#ifdef ERROR_CHECK_GLYPHS + +#include "window.h" + +INLINE_HEADER int +GLYPH_CACHEL_WIDTH (struct window *window, int ind); +INLINE_HEADER int +GLYPH_CACHEL_WIDTH (struct window *window, int ind) +{ + int wid = Dynarr_atp (window->glyph_cachels, ind)->width; + assert (wid >= 0 && wid < 10000); + return wid; +} +INLINE_HEADER int +GLYPH_CACHEL_ASCENT (struct window *window, int ind); +INLINE_HEADER int +GLYPH_CACHEL_ASCENT (struct window *window, int ind) +{ + int wid = Dynarr_atp (window->glyph_cachels, ind)->ascent; + assert (wid >= 0 && wid < 10000); + return wid; +} +INLINE_HEADER int +GLYPH_CACHEL_DESCENT (struct window *window, int ind); +INLINE_HEADER int +GLYPH_CACHEL_DESCENT (struct window *window, int ind) +{ + int wid = Dynarr_atp (window->glyph_cachels, ind)->descent; + assert (wid >= 0 && wid < 10000); + return wid; +} + +#else /* not ERROR_CHECK_GLYPHS */ + +#define GLYPH_CACHEL_WIDTH(window, ind) \ + Dynarr_atp (window->glyph_cachels, ind)->width +#define GLYPH_CACHEL_ASCENT(window, ind) \ + Dynarr_atp (window->glyph_cachels, ind)->ascent +#define GLYPH_CACHEL_DESCENT(window, ind) \ + Dynarr_atp (window->glyph_cachels, ind)->descent + +#endif /* not ERROR_CHECK_GLYPHS */ + +#define GLYPH_CACHEL(window, ind) \ + Dynarr_atp (window->glyph_cachels, ind) +#define GLYPH_CACHEL_GLYPH(window, ind) \ + Dynarr_atp (window->glyph_cachels, ind)->glyph +#define GLYPH_CACHEL_DIRTYP(window, ind) \ + Dynarr_atp (window->glyph_cachels, ind)->dirty void mark_glyph_cachels (glyph_cachel_dynarr *elements); void mark_glyph_cachels_as_not_updated (struct window *w); @@ -985,34 +1089,17 @@ void get_display_tables (struct window *, face_index, * Subwindow Object * ****************************************************************************/ -/* redisplay needs a per-frame cache of subwindows being displayed so - * that we known when to unmap them */ -typedef struct subwindow_cachel subwindow_cachel; -struct subwindow_cachel -{ - Lisp_Object subwindow; - unsigned int x, y; - unsigned int width, height; - unsigned int being_displayed : 1; - unsigned int updated : 1; -}; - -typedef struct -{ - Dynarr_declare (subwindow_cachel); -} subwindow_cachel_dynarr; - -void mark_subwindow_cachels (subwindow_cachel_dynarr *elements); -void mark_subwindow_cachels_as_not_updated (struct frame *f); -void reset_subwindow_cachels (struct frame *f); void unmap_subwindow (Lisp_Object subwindow); void map_subwindow (Lisp_Object subwindow, int x, int y, struct display_glyph_area *dga); int find_matching_subwindow (struct frame* f, int x, int y, int width, int height); void update_widget (Lisp_Object widget); +void update_widget_instances (Lisp_Object frame); void update_subwindow (Lisp_Object subwindow); Lisp_Object image_instance_parent_glyph (struct Lisp_Image_Instance*); int image_instance_changed (Lisp_Object image); +void free_frame_subwindow_instance_cache (struct frame* f); +void reset_frame_subwindow_instance_cache (struct frame* f); struct expose_ignore { diff --git a/src/gui-msw.c b/src/gui-msw.c index 9fd0b37..503c631 100644 --- a/src/gui-msw.c +++ b/src/gui-msw.c @@ -22,13 +22,13 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include "console-msw.h" #include "redisplay.h" #include "gui.h" #include "glyphs.h" #include "frame.h" -#include "events.h" #include "elhash.h" -#include "console-msw.h" +#include "events.h" #include "buffer.h" /* @@ -84,15 +84,8 @@ mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, LPARAM id) mswindows_enqueue_dispatch_event (event); /* The result of this evaluation could cause other instances to change so - enqueue an update callback to check this. We also have to make sure that - the function does not appear in the command history. - #### I'm sure someone can tell me how to optimize this. */ - mswindows_enqueue_misc_user_event - (frame, Qeval, - list3 (Qlet, - list2 (Qthis_command, - Qlast_command), - list2 (Qupdate_widget_instances, frame))); + enqueue an update callback to check this. */ + enqueue_magic_eval_event (update_widget_instances, frame); return Qt; } diff --git a/src/gui-x.c b/src/gui-x.c index 2cade75..8aebe30 100644 --- a/src/gui-x.c +++ b/src/gui-x.c @@ -229,10 +229,6 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, VOID_TO_LISP (data, client_data); XSETFRAME (frame, f); - image_instance = XCAR (data); - callback = XCAR (XCDR (data)); - callback_ex = XCDR (XCDR (data)); - #if 0 /* #### What the hell? I can't understand why this call is here, and doing it is really courting disaster in the new event @@ -255,6 +251,9 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, } else { + image_instance = XCAR (data); + callback = XCAR (XCDR (data)); + callback_ex = XCDR (XCDR (data)); update_subwindows_p = 1; if (!NILP (callback_ex) && !UNBOUNDP (callback_ex)) @@ -294,16 +293,9 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, if (!NILP (event)) enqueue_Xt_dispatch_event (event); /* The result of this evaluation could cause other instances to change so - enqueue an update callback to check this. We also have to make sure that - the function does not appear in the command history. - #### I'm sure someone can tell me how to optimize this. */ + enqueue an update callback to check this. */ if (update_subwindows_p && !NILP (event)) - signal_special_Xt_user_event (frame, Qeval, - list3 (Qlet, - list2 (Qthis_command, - Qlast_command), - list2 (Qupdate_widget_instances, - frame))); + enqueue_magic_eval_event (update_widget_instances, frame); } #if 1 diff --git a/src/gui.c b/src/gui.c index 5705cea..47e21a5 100644 --- a/src/gui.c +++ b/src/gui.c @@ -81,10 +81,10 @@ get_gui_callback (Lisp_Object data, Lisp_Object *fn, Lisp_Object *arg) Vquit_flag = Qt; } else if (SYMBOLP (data) - || (COMPILED_FUNCTIONP (data) - && XCOMPILED_FUNCTION (data)->flags.interactivep) - || (CONSP (data) && (EQ (XCAR (data), Qlambda)) - && !NILP (Fassq (Qinteractive, Fcdr (Fcdr (data)))))) + || (COMPILED_FUNCTIONP (data) + && XCOMPILED_FUNCTION (data)->flags.interactivep) + || (CONSP (data) && (EQ (XCAR (data), Qlambda)) + && !NILP (Fassq (Qinteractive, Fcdr (Fcdr (data)))))) { *fn = Qcall_interactively; *arg = data; diff --git a/src/gutter.c b/src/gutter.c index 242a34a..8821c10 100644 --- a/src/gutter.c +++ b/src/gutter.c @@ -789,14 +789,9 @@ gutter_validate (Lisp_Object instantiator) DEFUN ("gutter-specifier-p", Fgutter_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a gutter specifier. -Gutter specifiers are used to specify the format of a gutter. -The values of the variables `default-gutter', `top-gutter', -`left-gutter', `right-gutter', and `bottom-gutter' are always -gutter specifiers. - -Valid gutter instantiators are called "gutter descriptors" and are -either strings or property-lists of strings. See `default-gutter' for -a description of the exact format. + +See `make-gutter-specifier' for a description of possible gutter +instantiators. */ (object)) { @@ -932,15 +927,8 @@ gutter_size_validate (Lisp_Object instantiator) DEFUN ("gutter-size-specifier-p", Fgutter_size_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a gutter-size specifier. -Gutter-size specifiers are used to specify the size of a gutter. The -values of the variables `default-gutter-size', `top-gutter-size', -`left-gutter-size', `right-gutter-size', and `bottom-gutter-size' are -always gutter-size specifiers. - -Valid gutter-size instantiators are either integers or the special -symbol 'autodetect. If a gutter-size is set to 'autodetect them the -size of the gutter will be adjusted to just accomodate the gutters -contents. 'autodetect only works for top and bottom gutters. +See `make-gutter-size-specifier' for a description of possible gutter-size +instantiators. */ (object)) { @@ -977,17 +965,8 @@ gutter_visible_validate (Lisp_Object instantiator) DEFUN ("gutter-visible-specifier-p", Fgutter_visible_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a gutter-visible specifier. -Gutter-visible specifiers are used to specify the visibility of a -gutter. The values of the variables `default-gutter-visible-p', -`top-gutter-visible-p', `left-gutter-visible-p', -`right-gutter-visible-p', and `bottom-gutter-visible-p' are always -gutter-visible specifiers. - -Valid gutter-visible instantiators are t, nil or a list of symbols. -If a gutter-visible instantiator is set to a list of symbols, and the -correspondong gutter specification is a property-list strings, then -elements of the gutter specification will only be visible if the -corresponding symbol occurs in the gutter-visible instantiator. +See `make-gutter-visible-specifier' for a description of possible +gutter-visible instantiators. */ (object)) { @@ -1009,7 +988,9 @@ Ensure that all gutters are correctly showing their gutter specifier. DEVICE_FRAME_LOOP (frmcons, d) { struct frame *f = XFRAME (XCAR (frmcons)); - + + MAYBE_DEVMETH (d, frame_output_begin, (f)); + /* Sequence is quite important here. We not only want to redisplay the gutter area but we also want to flush any frame size changes out so that the gutter redisplay happens @@ -1035,12 +1016,9 @@ Ensure that all gutters are correctly showing their gutter specifier. update_frame_gutters (f); unhold_one_frame_size_changes (f); } - } - /* We now call the output_end routine for tty frames. We delay - doing so in order to avoid cursor flicker. So much for 100% - encapsulation. */ - if (DEVICE_TTY_P (d)) - DEVMETH (d, output_end, (d)); + + MAYBE_DEVMETH (d, frame_output_end, (f)); + } d->gutter_changed = 0; } diff --git a/src/lisp.h b/src/lisp.h index 3e07fd7..9ec0b10 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -63,6 +63,8 @@ void Dynarr_delete_many (void *d, int start, int len); void Dynarr_free (void *d); #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type))) +#define Dynarr_new2(dynarr_type, type) \ + ((dynarr_type *) Dynarr_newf (sizeof (type))) #define Dynarr_at(d, pos) ((d)->base[pos]) #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) #define Dynarr_length(d) ((d)->cur) @@ -1543,6 +1545,12 @@ Lisp_Object,Lisp_Object,Lisp_Object extern int specpdl_depth_counter; #define specpdl_depth() specpdl_depth_counter + +#define CHECK_FUNCTION(fun) do { \ + while (NILP (Ffunctionp (fun))) \ + signal_invalid_function_error (fun); \ + } while (0) + /************************************************************************/ /* Checking for QUIT */ @@ -2049,6 +2057,9 @@ char *egetenv (const char *); /* Defined in console.c */ void stuff_buffered_input (Lisp_Object); +/* Defined in console-msw.c */ +EXFUN (Fmswindows_message_box, 3); + /* Defined in data.c */ DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object)); DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object)); @@ -2127,6 +2138,7 @@ Lisp_Object decode_env_path (const char *, const char *); Lisp_Object decode_path (const char *); /* Nonzero means don't do interactive redisplay and don't change tty modes */ extern int noninteractive, noninteractive1; +extern int fatal_error_in_progress; extern int preparing_for_armageddon; extern int emacs_priority; extern int running_asynch_code; @@ -2252,6 +2264,7 @@ void reset_this_command_keys (Lisp_Object, int); Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object); Lisp_Object enqueue_misc_user_event_pos (Lisp_Object, Lisp_Object, Lisp_Object, int, int, int, int); +extern int modifier_keys_are_sticky; /* Defined in event-Xt.c */ void enqueue_Xt_dispatch_event (Lisp_Object event); @@ -2642,6 +2655,7 @@ EXFUN (Fforward_char, 2); EXFUN (Fforward_line, 2); EXFUN (Ffset, 2); EXFUN (Ffuncall, MANY); +EXFUN (Ffunctionp, 1); EXFUN (Fgeq, MANY); EXFUN (Fget, 3); EXFUN (Fget_buffer_process, 1); @@ -2780,7 +2794,8 @@ EXFUN (Fvertical_motion, 3); EXFUN (Fwiden, 1); -extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook; +extern Lisp_Object Q_style, Qabort, Qactually_requested; +extern Lisp_Object Qactivate_menubar_hook; extern Lisp_Object Qafter, Qall, Qand; extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload; extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore; @@ -2788,7 +2803,7 @@ extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary; extern Lisp_Object Qbitmap, Qbitp, Qblinking; extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer; extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton; -extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory; +extern Lisp_Object Qbyte_code, Qcall_interactively, Qcancel, Qcategory; extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr; extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp; extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3; @@ -2813,8 +2828,9 @@ extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output; extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfuncall, Qfunction; extern Lisp_Object Qgap_overhead, Qgeneric, Qgeometry, Qglobal, Qheight; -extern Lisp_Object Qhighlight, Qhorizontal, Qicon; -extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit; +extern Lisp_Object Qhelp, Qhighlight, Qhorizontal, Qicon; +extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qignore, Qimage, Qinfo; +extern Lisp_Object Qinherit; extern Lisp_Object Qinhibit_quit, Qinhibit_read_only; extern Lisp_Object Qinput_charset_conversion, Qinteger; extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p; @@ -2830,12 +2846,13 @@ extern Lisp_Object Qmenubar; extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers; extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion; extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows; -extern Lisp_Object Qname, Qnas, Qnatnump; -extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch; +extern Lisp_Object Qname, Qnas, Qnatnump, Qnative_layout; +extern Lisp_Object Qno, Qno_ascii_cntl, Qno_ascii_eol, Qno_catch; extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing; extern Lisp_Object Qnothing_image_instance_p, Qnotice; extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp; -extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc; +extern Lisp_Object Qobject, Qok, Qold_assoc, Qold_delete, Qold_delq; +extern Lisp_Object Qold_rassoc; extern Lisp_Object Qold_rassq, Qonly, Qor, Qother; extern Lisp_Object Qorientation, Qoutput_charset_conversion; extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p; @@ -2845,7 +2862,7 @@ extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit; extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char; extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler; extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource; -extern Lisp_Object Qreturn, Qreverse, Qright, Qright_margin; +extern Lisp_Object Qretry, Qreturn, Qreverse, Qright, Qright_margin; extern Lisp_Object Qrun_hooks, Qsans_modifiers; extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected; extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo; @@ -2866,7 +2883,7 @@ extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical; extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning; extern Lisp_Object Qwidth, Qwidget, Qwindow; extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments; -extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p; +extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes, Qyes_or_no_p; extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table; extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table; extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar; diff --git a/src/nt.c b/src/nt.c index bd14ddc..bf46ba2 100644 --- a/src/nt.c +++ b/src/nt.c @@ -47,8 +47,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include #include -#include -#include +#include "syswindows.h" #include "nt.h" #include @@ -2004,9 +2003,15 @@ int setitimer (int kind, const struct itimerval* itnew, return errno = EINVAL; } + +/*--------------------------------------------------------------------*/ +/* Memory-mapped files */ +/*--------------------------------------------------------------------*/ + int open_input_file (file_data *p_file, const char *filename) { + /* Synched with FSF 20.6. We fixed some warnings. */ HANDLE file; HANDLE file_mapping; void *file_base; @@ -2036,6 +2041,179 @@ open_input_file (file_data *p_file, const char *filename) return TRUE; } +int +open_output_file (file_data *p_file, const char *filename, unsigned long size) +{ + /* Synched with FSF 20.6. We fixed some warnings. */ + HANDLE file; + HANDLE file_mapping; + void *file_base; + + file = CreateFile (filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + if (file == INVALID_HANDLE_VALUE) + return FALSE; + + file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE, + 0, size, NULL); + if (!file_mapping) + return FALSE; + + file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size); + if (file_base == NULL) + return FALSE; + + p_file->name = filename; + p_file->size = size; + p_file->file = file; + p_file->file_mapping = file_mapping; + p_file->file_base = (char*) file_base; + + return TRUE; +} + +#if 1 /* !defined(__MINGW32__) */ +/* Return pointer to section header for section containing the given + relative virtual address. */ +static IMAGE_SECTION_HEADER * +rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header) +{ + /* Synched with FSF 20.6. We added MINGW32 stuff. */ + PIMAGE_SECTION_HEADER section; + int i; + + section = IMAGE_FIRST_SECTION (nt_header); + + for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) + { + /* Some linkers (eg. the NT SDK linker I believe) swapped the + meaning of these two values - or rather, they ignored + VirtualSize entirely and always set it to zero. This affects + some very old exes (eg. gzip dated Dec 1993). Since + mswindows_executable_type relies on this function to work reliably, + we need to cope with this. */ + DWORD real_size = max (section->SizeOfRawData, + section->Misc.VirtualSize); + if (rva >= section->VirtualAddress + && rva < section->VirtualAddress + real_size) + return section; + section++; + } + return NULL; +} +#endif + +void +mswindows_executable_type (const char * filename, int * is_dos_app, + int * is_cygnus_app) +{ + /* Synched with FSF 20.6. We added MINGW32 stuff and casts. */ + file_data executable; + char * p; + + /* Default values in case we can't tell for sure. */ + *is_dos_app = FALSE; + *is_cygnus_app = FALSE; + + if (!open_input_file (&executable, filename)) + return; + + p = strrchr (filename, '.'); + + /* We can only identify DOS .com programs from the extension. */ + if (p && stricmp (p, ".com") == 0) + *is_dos_app = TRUE; + else if (p && (stricmp (p, ".bat") == 0 || + stricmp (p, ".cmd") == 0)) + { + /* A DOS shell script - it appears that CreateProcess is happy to + accept this (somewhat surprisingly); presumably it looks at + COMSPEC to determine what executable to actually invoke. + Therefore, we have to do the same here as well. */ + /* Actually, I think it uses the program association for that + extension, which is defined in the registry. */ + p = egetenv ("COMSPEC"); + if (p) + mswindows_executable_type (p, is_dos_app, is_cygnus_app); + } + else + { + /* Look for DOS .exe signature - if found, we must also check that + it isn't really a 16- or 32-bit Windows exe, since both formats + start with a DOS program stub. Note that 16-bit Windows + executables use the OS/2 1.x format. */ + +#if 0 /* defined( __MINGW32__ ) */ + /* mingw32 doesn't have enough headers to detect cygwin + apps, just do what we can. */ + FILHDR * exe_header; + + exe_header = (FILHDR*) executable.file_base; + if (exe_header->e_magic != DOSMAGIC) + goto unwind; + + if ((char*) exe_header->e_lfanew > (char*) executable.size) + { + /* Some dos headers (pkunzip) have bogus e_lfanew fields. */ + *is_dos_app = TRUE; + } + else if (exe_header->nt_signature != NT_SIGNATURE) + { + *is_dos_app = TRUE; + } +#else + IMAGE_DOS_HEADER * dos_header; + IMAGE_NT_HEADERS * nt_header; + + dos_header = (PIMAGE_DOS_HEADER) executable.file_base; + if (dos_header->e_magic != IMAGE_DOS_SIGNATURE) + goto unwind; + + nt_header = (PIMAGE_NT_HEADERS) ((char*) dos_header + dos_header->e_lfanew); + + if ((char*) nt_header > (char*) dos_header + executable.size) + { + /* Some dos headers (pkunzip) have bogus e_lfanew fields. */ + *is_dos_app = TRUE; + } + else if (nt_header->Signature != IMAGE_NT_SIGNATURE && + LOWORD (nt_header->Signature) != IMAGE_OS2_SIGNATURE) + { + *is_dos_app = TRUE; + } + else if (nt_header->Signature == IMAGE_NT_SIGNATURE) + { + /* Look for cygwin.dll in DLL import list. */ + IMAGE_DATA_DIRECTORY import_dir = + nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; + IMAGE_IMPORT_DESCRIPTOR * imports; + IMAGE_SECTION_HEADER * section; + + section = rva_to_section (import_dir.VirtualAddress, nt_header); + imports = (IMAGE_IMPORT_DESCRIPTOR *) RVA_TO_PTR (import_dir.VirtualAddress, + section, executable); + + for ( ; imports->Name; imports++) + { + char *dllname = (char*) RVA_TO_PTR (imports->Name, section, executable); + + /* The exact name of the cygwin dll has changed with + various releases, but hopefully this will be reasonably + future proof. */ + if (strncmp (dllname, "cygwin", 6) == 0) + { + *is_cygnus_app = TRUE; + break; + } + } + } +#endif + } + + unwind: + close_file_data (&executable); +} + /* Close the system structures associated with the given file. */ void close_file_data (file_data *p_file) diff --git a/src/nt.h b/src/nt.h index a20a68d..edc1333 100644 --- a/src/nt.h +++ b/src/nt.h @@ -40,41 +40,6 @@ Boston, MA 02111-1307, USA. */ #define X_OK 1 #define F_OK 0 -/* File descriptor set emulation. */ - -#if 0 /* These are defined in winsock.h. - FD_SETSIZE is defined 64. Let's not full the runtime. */ - -/* 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; - -/* standard access macros */ -#define FD_SET(n, p) \ - do { \ - if ((n) < FD_SETSIZE) { \ - (p)->bits[(n)/32] |= (1 << (n)%32); \ - } \ - } while (0) -#define FD_CLR(n, p) \ - do { \ - if ((n) < FD_SETSIZE) { \ - (p)->bits[(n)/32] &= ~(1 << (n)%32); \ - } \ - } while (0) -#define FD_ISSET(n, p) ((n) < FD_SETSIZE ? ((p)->bits[(n)/32] & (1 << (n)%32)) : 0) -#define FD_ZERO(p) memset((p), 0, sizeof(fd_set)) - -#define SELECT_TYPE fd_set -#define MAXDESC FD_SETSIZE - -#endif /* 0 */ - /* ------------------------------------------------------------------------- */ /* child_process.status values */ @@ -113,7 +78,7 @@ typedef struct child_process * cp; } filedesc; -extern filedesc fd_info [ MAXDESC ]; +extern filedesc fd_info []; /* fd_info flag definitions */ #define FILE_READ 0x0001 @@ -147,7 +112,37 @@ extern LPBYTE nt_get_resource (char * key, LPDWORD type); void set_process_dir (const char * dir); time_t convert_time (FILETIME ft); -extern void init_ntproc (); +extern void init_ntproc (void); extern void term_ntproc (int unused); +/* ----------------------------------------------------------------- */ +/* Useful routines for manipulating memory-mapped files. */ + +typedef struct file_data +{ + const char *name; + unsigned long size; + HANDLE file; + HANDLE file_mapping; + char *file_base; +} file_data; + +#define OFFSET_TO_RVA(var,section) \ + (section->VirtualAddress + ((DWORD)(var) - section->PointerToRawData)) + +#define RVA_TO_OFFSET(var,section) \ + (section->PointerToRawData + ((DWORD)(var) - section->VirtualAddress)) + +#define RVA_TO_PTR(var,section,filedata) \ + ((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base)) + +int open_input_file (file_data *p_file, const char *name); +int open_output_file (file_data *p_file, const char *name, unsigned long size); +void close_file_data (file_data *p_file); +void mswindows_executable_type (const char * filename, int * is_dos_app, + int * is_cygnus_app); + +/* In process-nt.c */ +extern int compare_env (const void *strp1, const void *strp2); + #endif /* INCLUDED_nt_h_ */ diff --git a/src/ntheap.c b/src/ntheap.c index 9372dd1..6695203 100644 --- a/src/ntheap.c +++ b/src/ntheap.c @@ -227,17 +227,44 @@ sbrk (unsigned long increment) void recreate_heap (char *executable_path) { - void *tmp; - /* First reserve the upper part of our heap. (We reserve first - because there have been problems in the past where doing the - mapping first has loaded DLLs into the VA space of our heap.) */ - tmp = VirtualAlloc ((void *) get_heap_end (), - get_reserved_heap_size () - get_committed_heap_size (), - MEM_RESERVE, - PAGE_NOACCESS); + because there have been problems in the past where doing the + mapping first has loaded DLLs into the VA space of our heap.) */ + + /* Query the region at the end of the committed heap */ + void *tmp; + MEMORY_BASIC_INFORMATION info; + DWORD size; + unsigned char* base = get_heap_end (); + unsigned char* end = base + get_reserved_heap_size () - get_committed_heap_size (); + VirtualQuery (base, &info, sizeof info); + if (info.State != MEM_FREE) + { + /* Oops, something has already reserved or commited it, nothing we can do but exit */ + char buf[256]; + wsprintf(buf, + "XEmacs cannot start because the memory region required by the heap is not available.\n" + "(BaseAddress = 0x%lx, AllocationBase = 0x%lx, Size = 0x%lx, State = %s, Type = %s)", + info.BaseAddress, info.AllocationBase, info.RegionSize, + info.State == MEM_COMMIT ? "COMMITED" : "RESERVED", + info.Type == MEM_IMAGE ? "IMAGE" : info.Type == MEM_MAPPED ? "MAPPED" : "PRIVATE"); + MessageBox(NULL, buf, "XEmacs", MB_OK | MB_ICONSTOP); + exit(1); + } + + /* Now try and reserve as much as possible */ + size = min (info.RegionSize, end - base); + tmp = VirtualAlloc (base, size, MEM_RESERVE, PAGE_NOACCESS); if (!tmp) - exit (1); + { + /* Can't reserve it, nothing we can do but exit */ + char buf[256]; + wsprintf(buf, + "XEmacs cannot start because it couldn't reserve space required for the heap.\n" + "(VirtualAlloc at 0x%lx of 0x%lx failed (%d))", base, size, GetLastError()); + MessageBox(NULL, buf, "XEmacs", MB_OK | MB_ICONSTOP); + exit (1); + } /* We read in the data for the .bss section from the executable first and map in the heap from the executable second to prevent diff --git a/src/ntheap.h b/src/ntheap.h index 091cf0c..8760f42 100644 --- a/src/ntheap.h +++ b/src/ntheap.h @@ -76,28 +76,4 @@ extern void cache_system_info (void); extern unsigned char *round_to_next (unsigned char *address, unsigned long align); -/* ----------------------------------------------------------------- */ -/* Useful routines for manipulating memory-mapped files. */ - -typedef struct file_data { - const char *name; - unsigned long size; - HANDLE file; - HANDLE file_mapping; - char *file_base; -} file_data; - -#define OFFSET_TO_RVA(var,section) \ - (section->VirtualAddress + ((DWORD)(var) - section->PointerToRawData)) - -#define RVA_TO_OFFSET(var,section) \ - (section->PointerToRawData + ((DWORD)(var) - section->VirtualAddress)) - -#define RVA_TO_PTR(var,section,filedata) \ - ((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base)) - -int open_input_file (file_data *p_file, const char *name); -int open_output_file (file_data *p_file, const char *name, unsigned long size); -void close_file_data (file_data *p_file); - #endif /* INCLUDED_ntheap_h_ */ diff --git a/src/ntplay.c b/src/ntplay.c index bbfa228..c19870d 100644 --- a/src/ntplay.c +++ b/src/ntplay.c @@ -18,19 +18,13 @@ 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.*/ -#include #include #include #include "sysfile.h" +#include "syswindows.h" #include "lisp.h" #include "nativesound.h" -#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ - CYGWIN_VERSION_DLL_MAJOR < 21 -extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD); -#else -#include -#endif static int play_sound_data_1 (unsigned char *data, int length, int volume, int convert); diff --git a/src/ntproc.c b/src/ntproc.c index a6159f4..eebf13f 100644 --- a/src/ntproc.c +++ b/src/ntproc.c @@ -458,156 +458,6 @@ create_child (const char *exe, char *cmdline, char *env, return FALSE; } -#ifndef __MINGW32__ -/* Return pointer to section header for section containing the given - relative virtual address. */ -static IMAGE_SECTION_HEADER * -rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header) -{ - PIMAGE_SECTION_HEADER section; - int i; - - section = IMAGE_FIRST_SECTION (nt_header); - - for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) - { - if (rva >= section->VirtualAddress - && rva < section->VirtualAddress + section->SizeOfRawData) - return section; - section++; - } - return NULL; -} -#endif - -void -win32_executable_type (const char * filename, int * is_dos_app, int * is_cygnus_app) -{ - file_data executable; - char * p; - - /* Default values in case we can't tell for sure. */ - *is_dos_app = FALSE; - *is_cygnus_app = FALSE; - - if (!open_input_file (&executable, filename)) - return; - - p = strrchr (filename, '.'); - - /* We can only identify DOS .com programs from the extension. */ - if (p && stricmp (p, ".com") == 0) - *is_dos_app = TRUE; - else if (p && (stricmp (p, ".bat") == 0 || - stricmp (p, ".cmd") == 0)) - { - /* A DOS shell script - it appears that CreateProcess is happy to - accept this (somewhat surprisingly); presumably it looks at - COMSPEC to determine what executable to actually invoke. - Therefore, we have to do the same here as well. */ - /* Actually, I think it uses the program association for that - extension, which is defined in the registry. */ - p = egetenv ("COMSPEC"); - if (p) - win32_executable_type (p, is_dos_app, is_cygnus_app); - } - else - { - /* Look for DOS .exe signature - if found, we must also check that - it isn't really a 16- or 32-bit Windows exe, since both formats - start with a DOS program stub. Note that 16-bit Windows - executables use the OS/2 1.x format. */ - -#ifdef __MINGW32__ - /* mingw32 doesn't have enough headers to detect cygwin - apps, just do what we can. */ - FILHDR * exe_header; - - exe_header = (FILHDR*) executable.file_base; - if (exe_header->e_magic != DOSMAGIC) - goto unwind; - - if ((char*) exe_header->e_lfanew > (char*) executable.size) - { - /* Some dos headers (pkunzip) have bogus e_lfanew fields. */ - *is_dos_app = TRUE; - } - else if (exe_header->nt_signature != NT_SIGNATURE) - { - *is_dos_app = TRUE; - } -#else - IMAGE_DOS_HEADER * dos_header; - IMAGE_NT_HEADERS * nt_header; - - dos_header = (PIMAGE_DOS_HEADER) executable.file_base; - if (dos_header->e_magic != IMAGE_DOS_SIGNATURE) - goto unwind; - - nt_header = (PIMAGE_NT_HEADERS) ((char*) dos_header + dos_header->e_lfanew); - - if ((char*) nt_header > (char*) dos_header + executable.size) - { - /* Some dos headers (pkunzip) have bogus e_lfanew fields. */ - *is_dos_app = TRUE; - } - else if (nt_header->Signature != IMAGE_NT_SIGNATURE && - LOWORD (nt_header->Signature) != IMAGE_OS2_SIGNATURE) - { - *is_dos_app = TRUE; - } - else if (nt_header->Signature == IMAGE_NT_SIGNATURE) - { - /* Look for cygwin.dll in DLL import list. */ - IMAGE_DATA_DIRECTORY import_dir = - nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; - IMAGE_IMPORT_DESCRIPTOR * imports; - IMAGE_SECTION_HEADER * section; - - section = rva_to_section (import_dir.VirtualAddress, nt_header); - imports = (IMAGE_IMPORT_DESCRIPTOR *) RVA_TO_PTR (import_dir.VirtualAddress, - section, executable); - - for ( ; imports->Name; imports++) - { - char *dllname = (char*) RVA_TO_PTR (imports->Name, section, executable); - - if (strcmp (dllname, "cygwin.dll") == 0) - { - *is_cygnus_app = TRUE; - break; - } - } - } -#endif - } - - unwind: - close_file_data (&executable); -} - -int -compare_env (const void *strp1, const void *strp2) -{ - const char *str1 = *(const char**)strp1, *str2 = *(const char**)strp2; - - while (*str1 && *str2 && *str1 != '=' && *str2 != '=') - { - if ((*str1) > (*str2)) - return 1; - else if ((*str1) < (*str2)) - return -1; - str1++, str2++; - } - - if (*str1 == '=' && *str2 == '=') - return 0; - else if (*str1 == '=') - return -1; - else - return 1; -} - void merge_and_sort_env (char **envp1, char **envp2, char **new_envp) { @@ -691,7 +541,7 @@ sys_spawnve (int mode, const char *cmdname, was compiled with the Cygnus GNU toolchain and hence relies on cygwin.dll to parse the command line - we use this to decide how to escape quote chars in command line args that must be quoted). */ - win32_executable_type (cmdname, &is_dos_app, &is_cygnus_app); + mswindows_executable_type (cmdname, &is_dos_app, &is_cygnus_app); /* On Windows 95, if cmdname is a DOS app, we invoke a helper application to start it by specifying the helper app as cmdname, diff --git a/src/objects-msw.c b/src/objects-msw.c index 421bb51..cb3a864 100644 --- a/src/objects-msw.c +++ b/src/objects-msw.c @@ -49,13 +49,6 @@ Boston, MA 02111-1307, USA. */ #include "device.h" #include "insdel.h" -#if (defined(__CYGWIN32__) || defined(__MINGW32__)) && \ - CYGWIN_VERSION_DLL_MAJOR < 21 -#define stricmp strcasecmp -#define FONTENUMPROC FONTENUMEXPROC -#define ntmTm ntmentm -#endif - typedef struct colormap_t { const char *name; diff --git a/src/objects.c b/src/objects.c index e91dbed..2c27ff2 100644 --- a/src/objects.c +++ b/src/objects.c @@ -507,7 +507,7 @@ color_instantiate (Lisp_Object specifier, Lisp_Object matchspec, { /* When called, we're inside of call_with_suspended_errors(), so we can freely error. */ - Lisp_Object device = DFW_DEVICE (domain); + Lisp_Object device = DOMAIN_DEVICE (domain); struct device *d = XDEVICE (device); if (COLOR_INSTANCEP (instantiator)) @@ -631,19 +631,7 @@ set_color_attached_to (Lisp_Object obj, Lisp_Object face, Lisp_Object property) DEFUN ("color-specifier-p", Fcolor_specifier_p, 1, 1, 0, /* Return t if OBJECT is a color specifier. -Valid instantiators for color specifiers are: - --- a string naming a color (e.g. under X this might be "lightseagreen2" - or "#F534B2") --- a color instance (use that instance directly if the device matches, - or use the string that generated it) --- a vector of no elements (only on TTY's; this means to set no color - at all, thus using the "natural" color of the terminal's text) --- a vector of one or two elements: a face to inherit from, and - optionally a symbol naming which property of that face to inherit, - either `foreground' or `background' (if omitted, defaults to the same - property that this color specifier is used for; if this specifier is - not part of a face, the instantiator would not be valid) +See `make-color-specifier' for a description of possible color instantiators. */ (object)) { @@ -706,7 +694,7 @@ font_instantiate (Lisp_Object specifier, Lisp_Object matchspec, { /* When called, we're inside of call_with_suspended_errors(), so we can freely error. */ - Lisp_Object device = DFW_DEVICE (domain); + Lisp_Object device = DOMAIN_DEVICE (domain); struct device *d = XDEVICE (device); Lisp_Object instance; @@ -841,16 +829,7 @@ set_font_attached_to (Lisp_Object obj, Lisp_Object face, Lisp_Object property) DEFUN ("font-specifier-p", Ffont_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a font specifier. -Valid instantiators for font specifiers are: - --- a string naming a font (e.g. under X this might be - "-*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*" for a 14-point - upright medium-weight Courier font) --- a font instance (use that instance directly if the device matches, - or use the string that generated it) --- a vector of no elements (only on TTY's; this means to set no font - at all, thus using the "natural" font of the terminal's text) --- a vector of one element (a face to inherit from) +See `make-font-specifier' for a description of possible font instantiators. */ (object)) { @@ -986,15 +965,8 @@ set_face_boolean_attached_to (Lisp_Object obj, Lisp_Object face, DEFUN ("face-boolean-specifier-p", Fface_boolean_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a face-boolean specifier. -Valid instantiators for face-boolean specifiers are - --- t or nil --- a vector of two or three elements: a face to inherit from, - optionally a symbol naming the property of that face to inherit from - (if omitted, defaults to the same property that this face-boolean - specifier is used for; if this specifier is not part of a face, - the instantiator would not be valid), and optionally a value which, - if non-nil, means to invert the sense of the inherited property. +See `make-face-boolean-specifier' for a description of possible +face-boolean instantiators. */ (object)) { diff --git a/src/paths.h.in b/src/paths.h.in index 1a6b627..c1ca13d 100644 --- a/src/paths.h.in +++ b/src/paths.h.in @@ -50,11 +50,6 @@ is where architecture-independent files are searched for. - PATH_LOCK The name of the directory that contains lock files - with which we record what files are being modified in - Emacs. This directory should be writable by everyone. - If this is specified, the string must end with a slash! - PATH_INFO This is where the info documentation is installed. PATH_INFOPATH The default value of `Info-directory-list'. @@ -101,10 +96,6 @@ #define PATH_DATA "@ETCDIR@" #endif -#ifdef LOCKDIR_USER_DEFINED -#define PATH_LOCK "@LOCKDIR@" -#endif - #ifdef DOCDIR_USER_DEFINED #define PATH_DOC "@DOCDIR@" #endif diff --git a/src/postgresql.c b/src/postgresql.c index 9ed4e8e..d2e92a8 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -540,15 +540,15 @@ Poll an asynchronous connection for completion (conn)) { PGconn *P; - PostgresPollingStatusType PS; + PostgresPollingStatusType polling_status; CHECK_PGCONN (conn); P = (XPGCONN (conn))->pgconn; CHECK_LIVE_CONNECTION (P); - PS = PQconnectPoll (P); - switch (PS) + polling_status = PQconnectPoll (P); + switch (polling_status) { case PGRES_POLLING_FAILED: /* Something Bad has happened */ @@ -566,7 +566,7 @@ Poll an asynchronous connection for completion return Qpgres_polling_active; default: /* they've added a new field we don't know about */ - error ("Help! Unknown status code %08x from backend!", PS); + error ("Help! Unknown status code %08x from backend!", polling_status); } } @@ -730,15 +730,15 @@ Poll an asynchronous reset for completion (conn)) { PGconn *P; - PostgresPollingStatusType PS; + PostgresPollingStatusType polling_status; CHECK_PGCONN (conn); P = (XPGCONN (conn))->pgconn; CHECK_LIVE_CONNECTION (P); - PS = PQresetPoll (P); - switch (PS) + polling_status = PQresetPoll (P); + switch (polling_status) { case PGRES_POLLING_FAILED: /* Something Bad has happened */ @@ -756,7 +756,7 @@ Poll an asynchronous reset for completion return Qpgres_polling_active; default: /* they've added a new field we don't know about */ - error ("Help! Unknown status code %08x from backend!", PS); + error ("Help! Unknown status code %08x from backend!", polling_status); } } #endif diff --git a/src/print.c b/src/print.c index dfe2e1c..4d1664f 100644 --- a/src/print.c +++ b/src/print.c @@ -106,6 +106,10 @@ FILE *termscript; /* Stdio stream being used for copy of all output. */ int stdout_needs_newline; +#ifdef WINDOWSNT +static int no_useful_stderr; +#endif + static void std_handle_out_external (FILE *stream, Lisp_Object lstream, const Extbyte *extptr, Extcount extlen, @@ -117,9 +121,12 @@ std_handle_out_external (FILE *stream, Lisp_Object lstream, if (stream) { #ifdef WINDOWSNT + if (!no_useful_stderr) + no_useful_stderr = GetStdHandle (STD_ERROR_HANDLE) == 0 ? 1 : -1; + /* we typically have no useful stdout/stderr under windows if we're being invoked graphically. */ - if (!noninteractive) + if (!noninteractive || no_useful_stderr > 0) msw_output_console_string (extptr, extlen); else #endif @@ -174,9 +181,16 @@ std_handle_out_va (FILE *stream, const char *fmt, va_list args) int retval; retval = vsprintf ((char *) kludge, fmt, args); - TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)), - ALLOCA, (extptr, extlen), - Qnative); + if (initialized && !fatal_error_in_progress) + TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)), + ALLOCA, (extptr, extlen), + Qnative); + else + { + extptr = (Extbyte *) kludge; + extlen = (Extcount) strlen ((char *) kludge); + } + std_handle_out_external (stream, Qnil, extptr, extlen, 1, 1); return retval; } @@ -190,7 +204,10 @@ stderr_out (const char *fmt, ...) int retval; va_list args; va_start (args, fmt); - retval = std_handle_out_va (stderr, GETTEXT (fmt), args); + retval = + std_handle_out_va + (stderr, initialized && !fatal_error_in_progress ? GETTEXT (fmt) : fmt, + args); va_end (args); return retval; } @@ -204,7 +221,10 @@ stdout_out (const char *fmt, ...) int retval; va_list args; va_start (args, fmt); - retval = std_handle_out_va (stdout, GETTEXT (fmt), args); + retval = + std_handle_out_va + (stdout, initialized && !fatal_error_in_progress ? GETTEXT (fmt) : fmt, + args); va_end (args); return retval; } diff --git a/src/process-nt.c b/src/process-nt.c index 9839bdf..5518ccb 100644 --- a/src/process-nt.c +++ b/src/process-nt.c @@ -26,9 +26,11 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include "buffer.h" #include "console-msw.h" #include "hash.h" #include "lstream.h" +#include "nt.h" #include "process.h" #include "procimpl.h" #include "sysdep.h" @@ -45,9 +47,6 @@ Boston, MA 02111-1307, USA. */ /* Arbitrary size limit for code fragments passed to run_in_other_process */ #define FRAGMENT_CODE_SIZE 32 -/* Bound by winnt.el */ -Lisp_Object Qnt_quote_process_args; - /* Implementation-specific data. Pointed to by Lisp_Process->process_data */ struct nt_process_data { @@ -57,6 +56,10 @@ struct nt_process_data int need_enable_child_signals; }; +/* Control how args are quoted to ensure correct parsing by child + process. */ +Lisp_Object Vmswindows_quote_process_args; + /* Control whether create_child causes the process to inherit Emacs' console window, or be given a new one of its own. The default is nil, to allow multiple DOS programs to run on Win95. Having separate @@ -676,22 +679,49 @@ signal_cannot_launch (Lisp_Object image_file, DWORD err) } static void -ensure_console_window_exists () +ensure_console_window_exists (void) { if (msw_windows9x_p ()) msw_hide_console (); } +int +compare_env (const void *strp1, const void *strp2) +{ + const char *str1 = *(const char**)strp1, *str2 = *(const char**)strp2; + + while (*str1 && *str2 && *str1 != '=' && *str2 != '=') + { + if ((*str1) > (*str2)) + return 1; + else if ((*str1) < (*str2)) + return -1; + str1++, str2++; + } + + if (*str1 == '=' && *str2 == '=') + return 0; + else if (*str1 == '=') + return -1; + else + return 1; +} + static int nt_create_process (Lisp_Process *p, Lisp_Object *argv, int nargv, Lisp_Object program, Lisp_Object cur_dir) { + /* Synched up with sys_spawnve in FSF 20.6. Significantly different + but still synchable. */ HANDLE hmyshove, hmyslurp, hprocin, hprocout, hprocerr; - LPTSTR command_line; + Extbyte *command_line; BOOL do_io, windowed; char *proc_env; + /* No need to DOS-ize the filename; expand-file-name (called prior) + already does this. */ + /* Find out whether the application is windowed or not */ { /* SHGetFileInfo tends to return ERROR_FILE_NOT_FOUND on most @@ -739,54 +769,258 @@ nt_create_process (Lisp_Process *p, CreatePipe (&hmyslurp, &hprocout, &sa, 0); /* Duplicate the stdout handle for use as stderr */ - DuplicateHandle(GetCurrentProcess(), hprocout, GetCurrentProcess(), &hprocerr, - 0, TRUE, DUPLICATE_SAME_ACCESS); + DuplicateHandle(GetCurrentProcess(), hprocout, GetCurrentProcess(), + &hprocerr, 0, TRUE, DUPLICATE_SAME_ACCESS); /* Stupid Win32 allows to create a pipe with *both* ends either inheritable or not. We need process ends inheritable, and local ends not inheritable. */ - DuplicateHandle (GetCurrentProcess(), hmyshove, GetCurrentProcess(), &htmp, - 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); + DuplicateHandle (GetCurrentProcess(), hmyshove, GetCurrentProcess(), + &htmp, 0, FALSE, + DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); hmyshove = htmp; - DuplicateHandle (GetCurrentProcess(), hmyslurp, GetCurrentProcess(), &htmp, - 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); + DuplicateHandle (GetCurrentProcess(), hmyslurp, GetCurrentProcess(), + &htmp, 0, FALSE, + DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); hmyslurp = htmp; } - /* Convert an argv vector into Win32 style command line by a call to - lisp function `nt-quote-process-args' which see (in winnt.el)*/ + /* Convert an argv vector into Win32 style command line. */ { int i; - Lisp_Object args_or_ret = Qnil; - struct gcpro gcpro1; + Bufbyte **quoted_args; + int is_dos_app, is_cygnus_app; + int do_quoting = 0; + char escape_char = 0; + + nargv++; /* include program; we access argv offset by 1 below */ + quoted_args = alloca_array (Bufbyte *, nargv); + + /* Determine whether program is a 16-bit DOS executable, or a Win32 + executable that is implicitly linked to the Cygnus dll (implying it + was compiled with the Cygnus GNU toolchain and hence relies on + cygwin.dll to parse the command line - we use this to decide how to + escape quote chars in command line args that must be quoted). */ + mswindows_executable_type (XSTRING_DATA (program), + &is_dos_app, &is_cygnus_app); - GCPRO1 (args_or_ret); +#if 0 + /* #### we need to port this. */ + /* On Windows 95, if cmdname is a DOS app, we invoke a helper + application to start it by specifying the helper app as cmdname, + while leaving the real app name as argv[0]. */ + if (is_dos_app) + { + cmdname = (char*) alloca (MAXPATHLEN); + if (egetenv ("CMDPROXY")) + strcpy ((char*)cmdname, egetenv ("CMDPROXY")); + else + { + strcpy ((char*)cmdname, XSTRING_DATA (Vinvocation_directory)); + strcat ((char*)cmdname, "cmdproxy.exe"); + } + } +#endif + + /* we have to do some conjuring here to put argv and envp into the + form CreateProcess wants... argv needs to be a space separated/null + terminated list of parameters, and envp is a null + separated/double-null terminated list of parameters. + + Additionally, zero-length args and args containing whitespace or + quote chars need to be wrapped in double quotes - for this to work, + embedded quotes need to be escaped as well. The aim is to ensure + the child process reconstructs the argv array we start with + exactly, so we treat quotes at the beginning and end of arguments + as embedded quotes. + + The Win32 GNU-based library from Cygnus doubles quotes to escape + them, while MSVC uses backslash for escaping. (Actually the MSVC + startup code does attempt to recognize doubled quotes and accept + them, but gets it wrong and ends up requiring three quotes to get a + single embedded quote!) So by default we decide whether to use + quote or backslash as the escape character based on whether the + binary is apparently a Cygnus compiled app. + + Note that using backslash to escape embedded quotes requires + additional special handling if an embedded quote is already + preceded by backslash, or if an arg requiring quoting ends with + backslash. In such cases, the run of escape characters needs to be + doubled. For consistency, we apply this special handling as long + as the escape character is not quote. + + Since we have no idea how large argv and envp are likely to be we + figure out list lengths on the fly and allocate them. */ + + if (!NILP (Vmswindows_quote_process_args)) + { + do_quoting = 1; + /* Override escape char by binding mswindows-quote-process-args to + desired character, or use t for auto-selection. */ + if (INTP (Vmswindows_quote_process_args)) + escape_char = (char) XINT (Vmswindows_quote_process_args); + else + escape_char = is_cygnus_app ? '"' : '\\'; + } + + /* do argv... */ + for (i = 0; i < nargv; ++i) + { + Bufbyte *targ = XSTRING_DATA (i == 0 ? program : argv[i - 1]); + Bufbyte *p = targ; + int need_quotes = 0; + int escape_char_run = 0; + int arglen = 0; + + if (*p == 0) + need_quotes = 1; + for ( ; *p; p++) + { + if (*p == '"') + { + /* allow for embedded quotes to be escaped */ + arglen++; + need_quotes = 1; + /* handle the case where the embedded quote is already escaped */ + if (escape_char_run > 0) + { + /* To preserve the arg exactly, we need to double the + preceding escape characters (plus adding one to + escape the quote character itself). */ + arglen += escape_char_run; + } + } + else if (*p == ' ' || *p == '\t') + { + need_quotes = 1; + } + + if (*p == escape_char && escape_char != '"') + escape_char_run++; + else + escape_char_run = 0; + } + if (need_quotes) + { + arglen += 2; + /* handle the case where the arg ends with an escape char - we + must not let the enclosing quote be escaped. */ + if (escape_char_run > 0) + arglen += escape_char_run; + } + arglen += strlen (targ) + 1; + + quoted_args[i] = alloca_array (Bufbyte, arglen); + } for (i = 0; i < nargv; ++i) - args_or_ret = Fcons (*argv++, args_or_ret); - args_or_ret = Fnreverse (args_or_ret); - args_or_ret = Fcons (program, args_or_ret); + { + Bufbyte *targ = XSTRING_DATA (i == 0 ? program : argv[i - 1]); + Bufbyte *p = targ; + int need_quotes = 0; + Bufbyte *parg = quoted_args[i]; + + if (*p == 0) + need_quotes = 1; - args_or_ret = call1 (Qnt_quote_process_args, args_or_ret); + if (do_quoting) + { + for ( ; *p; p++) + if (*p == ' ' || *p == '\t' || *p == '"') + need_quotes = 1; + } + if (need_quotes) + { + int escape_char_run = 0; + Bufbyte * first; + Bufbyte * last; + + p = targ; + first = p; + last = p + strlen (p) - 1; + *parg++ = '"'; +#if 0 + /* This version does not escape quotes if they occur at the + beginning or end of the arg - this could lead to incorrect + behavior when the arg itself represents a command line + containing quoted args. I believe this was originally done + as a hack to make some things work, before + `mswindows-quote-process-args' was added. */ + while (*p) + { + if (*p == '"' && p > first && p < last) + *parg++ = escape_char; /* escape embedded quotes */ + *parg++ = *p++; + } +#else + for ( ; *p; p++) + { + if (*p == '"') + { + /* double preceding escape chars if any */ + while (escape_char_run > 0) + { + *parg++ = escape_char; + escape_char_run--; + } + /* escape all quote chars, even at beginning or end */ + *parg++ = escape_char; + } + *parg++ = *p; + + if (*p == escape_char && escape_char != '"') + escape_char_run++; + else + escape_char_run = 0; + } + /* double escape chars before enclosing quote */ + while (escape_char_run > 0) + { + *parg++ = escape_char; + escape_char_run--; + } +#endif + *parg++ = '"'; + } + else + { + strcpy (parg, targ); + parg += strlen (targ); + } + *parg = '\0'; + } - if (!STRINGP (args_or_ret)) - /* Luser wrote his/her own clever version */ - error ("Bogus return value from `nt-quote-process-args'"); + { + int total_cmdline_len = 0; + Extcount *extargcount = (Extcount *) alloca_array (Extcount, nargv); + Extbyte **extarg = (Extbyte **) alloca_array (Extbyte *, nargv); + Extbyte *command_ptr; - command_line = alloca_array (char, (XSTRING_LENGTH (program) - + XSTRING_LENGTH (args_or_ret) + 2)); - strcpy (command_line, XSTRING_DATA (program)); - strcat (command_line, " "); - strcat (command_line, XSTRING_DATA (args_or_ret)); + for (i = 0; i < nargv; ++i) + { + TO_EXTERNAL_FORMAT (C_STRING, quoted_args[i], ALLOCA, + (extarg[i], extargcount[i]), Qmswindows_tstr); + /* account for space and terminating null */ + total_cmdline_len += extargcount[i] + EITCHAR_SIZE; + } - UNGCPRO; /* args_or_ret */ + command_line = alloca_array (char, total_cmdline_len); + command_ptr = command_line; + for (i = 0; i < nargv; ++i) + { + memcpy (command_ptr, extarg[i], extargcount[i]); + command_ptr += extargcount[i]; + EICOPY_TCHAR (command_ptr, ' '); + command_ptr += EITCHAR_SIZE; + } + EICOPY_TCHAR (command_ptr, '\0'); + command_ptr += EITCHAR_SIZE; + } } - /* Set `proc_env' to a nul-separated array of the strings in Vprocess_environment terminated by 2 nuls. */ { - extern int compare_env (const char **strp1, const char **strp2); char **env; REGISTER Lisp_Object tem; REGISTER char **new_env; @@ -798,6 +1032,17 @@ nt_create_process (Lisp_Process *p, && STRINGP (XCAR (tem))); tem = XCDR (tem)) new_length++; + + /* FSF adds an extra env var to hold the current process ID of the + Emacs process. Apparently this is used only by emacsserver.c, + which we have superseded to gnuserv.c. (#### Does it work under + MS Windows?) + + sprintf (ppid_env_var_buffer, "EM_PARENT_PROCESS_ID=%d", + GetCurrentProcessId ()); + arglen += strlen (ppid_env_var_buffer) + 1; + numenv++; + */ /* new_length + 1 to include terminating 0. */ env = new_env = alloca_array (char *, new_length + 1); @@ -1082,7 +1327,7 @@ nt_kill_child_process (Lisp_Object proc, int signo, } /* - * Kill any process in the system given its PID. + * Kill any process in the system given its PID * * Returns zero if a signal successfully sent, or * negative number upon failure @@ -1339,12 +1584,25 @@ process_type_create_nt (void) void syms_of_process_nt (void) { - defsymbol (&Qnt_quote_process_args, "nt-quote-process-args"); } void vars_of_process_nt (void) { + DEFVAR_LISP ("mswindows-quote-process-args", + &Vmswindows_quote_process_args /* +Non-nil enables quoting of process arguments to ensure correct parsing. +Because Windows does not directly pass argv arrays to child processes, +programs have to reconstruct the argv array by parsing the command +line string. For an argument to contain a space, it must be enclosed +in double quotes or it will be parsed as multiple arguments. + +If the value is a character, that character will be used to escape any +quote characters that appear, otherwise a suitable escape character +will be chosen based on the type of the program (normal or Cygwin). +*/ ); + Vmswindows_quote_process_args = Qt; + DEFVAR_LISP ("mswindows-start-process-share-console", &Vmswindows_start_process_share_console /* When nil, new child processes are given a new console. diff --git a/src/process.c b/src/process.c index f5e5dae..774f53a 100644 --- a/src/process.c +++ b/src/process.c @@ -1073,24 +1073,25 @@ See `set-process-filter' for more info on filter functions. return XPROCESS (proc)->filter; } -DEFUN ("process-send-region", Fprocess_send_region, 3, 3, 0, /* -Send current contents of region as input to PROCESS. +DEFUN ("process-send-region", Fprocess_send_region, 3, 4, 0, /* +Send current contents of the region between START and END as input to PROCESS. PROCESS may be a process name or an actual process. -Called from program, takes three arguments, PROCESS, START and END. +BUFFER specifies the buffer to look in; if nil, the current buffer is used. If the region is more than 500 or so characters long, it is sent in several bunches. This may happen even for shorter regions. Output from processes can arrive in between bunches. */ - (process, start, end)) + (process, start, end, buffer)) { /* This function can GC */ Lisp_Object proc = get_process (process); Bufpos st, en; + struct buffer *buf = decode_buffer (buffer, 0); - get_buffer_range_char (current_buffer, start, end, &st, &en, 0); + XSETBUFFER (buffer, buf); + get_buffer_range_char (buf, start, end, &st, &en, 0); - send_process (proc, Fcurrent_buffer (), 0, - st, en - st); + send_process (proc, buffer, 0, st, en - st); return Qnil; } diff --git a/src/rangetab.c b/src/rangetab.c index fc29885..a8556d2 100644 --- a/src/rangetab.c +++ b/src/rangetab.c @@ -443,10 +443,47 @@ Flush TABLE. DEFUN ("map-range-table", Fmap_range_table, 2, 2, 0, /* Map FUNCTION over entries in TABLE, calling it with three args, the beginning and end of the range and the corresponding value. + +Results are guaranteed to be correct (i.e. each entry processed +exactly once) if FUNCTION modifies or deletes the current entry +(i.e. passes the current range to `put-range-table' or +`remove-range-table'), but not otherwise. */ (function, table)) { - error ("not yet implemented"); + Lisp_Range_Table *rt; + int i; + + CHECK_RANGE_TABLE (table); + CHECK_FUNCTION (function); + + rt = XRANGE_TABLE (table); + + /* Do not "optimize" by pulling out the length computation below! + FUNCTION may have changed the table. */ + for (i = 0; i < Dynarr_length (rt->entries); i++) + { + struct range_table_entry *entry = Dynarr_atp (rt->entries, i); + EMACS_INT first, last; + Lisp_Object args[4]; + int oldlen; + + again: + first = entry->first; + last = entry->last; + oldlen = Dynarr_length (rt->entries); + args[0] = function; + args[1] = make_int (first); + args[2] = make_int (last); + args[3] = entry->val; + Ffuncall (countof (args), args); + /* Has FUNCTION removed the entry? */ + if (oldlen > Dynarr_length (rt->entries) + && i < Dynarr_length (rt->entries) + && (first != entry->first || last != entry->last)) + goto again; + } + return Qnil; } diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index 9af4b5e..dc0ea8b 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -957,23 +957,31 @@ mswindows_eol_cursor_width (void) } /***************************************************************************** - mswindows_output_begin + mswindows_frame_output_begin Perform any necessary initialization prior to an update. ****************************************************************************/ static void -mswindows_output_begin (struct device *d) +mswindows_frame_output_begin (struct frame *f) { } /***************************************************************************** - mswindows_output_end + mswindows_frame_output_end Perform any necessary flushing of queues when an update has completed. ****************************************************************************/ static void -mswindows_output_end (struct device *d) +mswindows_frame_output_end (struct frame *f) { + HDWP hdwp = FRAME_MSWINDOWS_DATA (f)->hdwp; + + if (hdwp != 0) + { + EndDeferWindowPos (hdwp); + FRAME_MSWINDOWS_DATA (f)->hdwp = 0; + } + GdiFlush(); } @@ -1157,8 +1165,19 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b findex, 0, 1); break; - case IMAGE_SUBWINDOW: case IMAGE_WIDGET: + if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance), + Qlayout)) + { + redisplay_output_layout (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + if (rb->cursor_type == CURSOR_ON) + mswindows_output_cursor (w, dl, xpos, cursor_width, + findex, 0, 1); + break; + } + case IMAGE_SUBWINDOW: redisplay_output_subwindow (w, instance, &dbox, &dga, findex, cursor_start, cursor_width, cursor_height); @@ -1167,15 +1186,6 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b findex, 0, 1); break; - case IMAGE_LAYOUT: - redisplay_output_layout (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height); - if (rb->cursor_type == CURSOR_ON) - mswindows_output_cursor (w, dl, xpos, cursor_width, - findex, 0, 1); - break; - case IMAGE_NOTHING: /* nothing is as nothing does */ break; @@ -1358,8 +1368,8 @@ console_type_create_redisplay_mswindows (void) CONSOLE_HAS_METHOD (mswindows, output_vertical_divider); CONSOLE_HAS_METHOD (mswindows, clear_region); CONSOLE_HAS_METHOD (mswindows, clear_frame); - CONSOLE_HAS_METHOD (mswindows, output_begin); - CONSOLE_HAS_METHOD (mswindows, output_end); + CONSOLE_HAS_METHOD (mswindows, frame_output_begin); + CONSOLE_HAS_METHOD (mswindows, frame_output_end); CONSOLE_HAS_METHOD (mswindows, flash); CONSOLE_HAS_METHOD (mswindows, ring_bell); CONSOLE_HAS_METHOD (mswindows, bevel_area); @@ -1374,8 +1384,8 @@ console_type_create_redisplay_mswindows (void) CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_vertical_divider); CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_region); CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_frame); - CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_begin); - CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_end); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, frame_output_begin); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, frame_output_end); CONSOLE_INHERITS_METHOD (msprinter, mswindows, bevel_area); CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_string); CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_pixmap); diff --git a/src/redisplay-output.c b/src/redisplay-output.c index ae45602..0994fb8 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -250,6 +250,9 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) XSETWINDOW (window, w); image = glyph_image_instance (crb->object.dglyph.glyph, window, ERROR_ME_NOT, 1); + + if (!IMAGE_INSTANCEP (image)) + return 0; ii = XIMAGE_INSTANCE (image); if (TEXT_IMAGE_INSTANCEP (image) && @@ -281,13 +284,7 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) return 0; } else - { -#ifdef DEBUG_WIDGET_OUTPUT - if (XIMAGE_INSTANCE_TYPE (image) == IMAGE_LAYOUT) - printf ("glyph layout %p considered unchanged\n", ii); -#endif - return 1; - } + return 1; } /* We now do this last so that glyph checks can do their own thing for face changes. Face changes quite often happen when we are @@ -901,7 +898,10 @@ redisplay_move_cursor (struct window *w, Bufpos new_point, int no_output_end) } else { - DEVMETH (d, output_begin, (d)); + { + MAYBE_DEVMETH (d, frame_output_begin, (f)); + MAYBE_DEVMETH (d, window_output_begin, (w)); + } rb->cursor_type = CURSOR_OFF; dl->cursor_elt = -1; output_display_line (w, 0, cla, y, rb->xpos, rb->xpos + rb->width); @@ -916,7 +916,10 @@ redisplay_move_cursor (struct window *w, Bufpos new_point, int no_output_end) if (w != XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))) { if (!no_output_end) - DEVMETH (d, output_end, (d)); + { + MAYBE_DEVMETH (d, window_output_end, (w)); + MAYBE_DEVMETH (d, frame_output_end, (f)); + } return 1; } @@ -935,7 +938,10 @@ redisplay_move_cursor (struct window *w, Bufpos new_point, int no_output_end) output_display_line (w, 0, cla, y, rb->xpos, rb->xpos + rb->width); if (!no_output_end) - DEVMETH (d, output_end, (d)); + { + MAYBE_DEVMETH (d, window_output_end, (w)); + MAYBE_DEVMETH (d, frame_output_end, (f)); + } return 1; } else @@ -999,7 +1005,10 @@ redisplay_move_cursor (struct window *w, Bufpos new_point, int no_output_end) make_int (ADJ_BUFPOS), w->buffer); if (!no_output_end) - DEVMETH (d, output_end, (d)); + { + MAYBE_DEVMETH (d, window_output_end, (w)); + MAYBE_DEVMETH (d, frame_output_end, (f)); + } return 1; } @@ -1012,7 +1021,10 @@ redisplay_move_cursor (struct window *w, Bufpos new_point, int no_output_end) } if (!no_output_end) - DEVMETH (d, output_end, (d)); + { + MAYBE_DEVMETH (d, window_output_end, (w)); + MAYBE_DEVMETH (d, frame_output_end, (f)); + } return 0; } #undef ADJ_BUFPOS @@ -1067,12 +1079,18 @@ redraw_cursor_in_window (struct window *w, int run_end_begin_meths) (f, dl->ypos - 1, rb->xpos)); if (run_end_begin_meths) - DEVMETH (d, output_begin, (d)); + { + MAYBE_DEVMETH (d, frame_output_begin, (f)); + MAYBE_DEVMETH (d, window_output_begin, (w)); + } output_display_line (w, 0, dla, y, rb->xpos, rb->xpos + rb->width); if (run_end_begin_meths) - DEVMETH (d, output_end, (d)); + { + MAYBE_DEVMETH (d, window_output_end, (w)); + MAYBE_DEVMETH (d, frame_output_end, (f)); + } } } @@ -1146,22 +1164,27 @@ redisplay_output_display_block (struct window *w, struct display_line *dl, int b static void redisplay_unmap_subwindows (struct frame* f, int x, int y, int width, int height, Lisp_Object ignored_window) { - int elt; + Lisp_Object rest; - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))) { - struct subwindow_cachel *cachel = - Dynarr_atp (f->subwindow_cachels, elt); + Lisp_Image_Instance *ii = XIMAGE_INSTANCE (XCAR (rest)); - if (cachel->being_displayed + if (IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) && - cachel->x + cachel->width > x && cachel->x < x + width + IMAGE_INSTANCE_DISPLAY_X (ii) + + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) > x + && + IMAGE_INSTANCE_DISPLAY_X (ii) < x + width && - cachel->y + cachel->height > y && cachel->y < y + height + IMAGE_INSTANCE_DISPLAY_Y (ii) + + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) > y + && + IMAGE_INSTANCE_DISPLAY_Y (ii) < y + height && - !EQ (cachel->subwindow, ignored_window)) + !EQ (XCAR (rest), ignored_window)) { - unmap_subwindow (cachel->subwindow); + unmap_subwindow (XCAR (rest)); } } } @@ -1174,7 +1197,7 @@ static void redisplay_unmap_subwindows (struct frame* f, int x, int y, int width ****************************************************************************/ void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, int width, int height) { - if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f))) + if (!NILP (XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))) { redisplay_unmap_subwindows (f, x, y, width, height, Qnil); } @@ -1183,7 +1206,7 @@ void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, int width, static void redisplay_unmap_subwindows_except_us (struct frame* f, int x, int y, int width, int height, Lisp_Object subwindow) { - if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f))) + if (!NILP (XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))) { redisplay_unmap_subwindows (f, x, y, width, height, subwindow); } @@ -1466,6 +1489,12 @@ redisplay_output_layout (struct window *w, break; case IMAGE_WIDGET: + if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (childii), Qlayout)) + { + redisplay_output_layout (w, child, &cdb, &cdga, findex, + 0, 0, 0); + break; + } case IMAGE_SUBWINDOW: if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) || IMAGE_INSTANCE_DIRTYP (childii)) @@ -1473,11 +1502,6 @@ redisplay_output_layout (struct window *w, 0, 0, 0); break; - case IMAGE_LAYOUT: - redisplay_output_layout (w, child, &cdb, &cdga, findex, - 0, 0, 0); - break; - case IMAGE_NOTHING: /* nothing is as nothing does */ break; @@ -2037,7 +2061,7 @@ redisplay_update_line (struct window *w, int first_line, int last_line, display_line_dynarr *cdla = window_display_lines (w, CURRENT_DISP); display_line_dynarr *ddla = window_display_lines (w, DESIRED_DISP); - DEVMETH (d, output_begin, (d)); + MAYBE_DEVMETH (d, window_output_begin, (w)); while (first_line <= last_line) { @@ -2122,14 +2146,8 @@ redisplay_update_line (struct window *w, int first_line, int last_line, } #endif - /* This has to be done after we've updated the values. We don't - call output_end for tty frames. Redisplay will do this after all - tty windows have been updated. This cuts down on cursor - flicker. */ - if (FRAME_TTY_P (f)) - redisplay_redraw_cursor (f, 0); - else - DEVMETH (d, output_end, (d)); + redisplay_redraw_cursor (f, 0); + MAYBE_DEVMETH (d, window_output_end, (w)); } /***************************************************************************** @@ -2243,7 +2261,7 @@ redisplay_output_window (struct window *w) } /* Perform any output initialization. */ - DEVMETH (d, output_begin, (d)); + MAYBE_DEVMETH (d, window_output_begin, (w)); /* If the window's structure has changed clear the internal border above it if it is topmost (the function will check). */ @@ -2266,7 +2284,7 @@ redisplay_output_window (struct window *w) if (window_needs_vertical_divider (w) && (f->windows_structure_changed || f->clear)) { - DEVMETH (d, output_vertical_divider, (w, f->windows_structure_changed)); + MAYBE_DEVMETH (d, output_vertical_divider, (w, f->windows_structure_changed)); } /* Clear the rest of the window, if necessary. */ @@ -2300,13 +2318,8 @@ redisplay_output_window (struct window *w) get invalidated when it should be. */ INVALIDATE_DEVICE_PIXEL_TO_GLYPH_CACHE (d); - /* We don't call output_end for tty frames. Redisplay will do this - after all tty windows have been updated. This cuts down on - cursor flicker. */ - if (FRAME_TTY_P (f)) - redisplay_redraw_cursor (f, 0); - else - DEVMETH (d, output_end, (d)); + redisplay_redraw_cursor (f, 0); + MAYBE_DEVMETH (d, window_output_end, (w)); #ifdef HAVE_SCROLLBARS update_window_scrollbars (w, NULL, !MINI_WINDOW_P (w), 0); diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 42d18b9..6794bdb 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -138,39 +138,40 @@ tty_eol_cursor_width (void) } /***************************************************************************** - tty_output_begin + tty_frame_output_begin Perform any necessary initialization prior to an update. ****************************************************************************/ #ifdef DEBUG_XEMACS -void tty_output_begin (struct device *d); +void tty_frame_output_begin (struct frame *f); void #else static void #endif -tty_output_begin (struct device *d) +tty_frame_output_begin (struct frame *f) { #ifndef HAVE_TERMIOS /* Termcap requires `ospeed' to be a global variable so we have to always set it for whatever tty console we are actually currently working with. */ - ospeed = DEVICE_TTY_DATA (d)->ospeed; + ospeed = DEVICE_TTY_DATA (XDEVICE (FRAME_DEVICE (f)))->ospeed; #endif } /***************************************************************************** - tty_output_end + tty_frame_output_end Perform any necessary flushing of queues when an update has completed. ****************************************************************************/ #ifdef DEBUG_XEMACS -void tty_output_end (struct device *d); +void tty_frame_output_end (struct frame *f); void #else static void #endif -tty_output_end (struct device *d) +tty_frame_output_end (struct frame *f) { + struct device *d = XDEVICE (FRAME_DEVICE (f)); struct console *c = XCONSOLE (DEVICE_CONSOLE (d)); CONSOLE_TTY_CURSOR_X (c) = CONSOLE_TTY_FINAL_CURSOR_X (c); @@ -340,20 +341,19 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, case IMAGE_COLOR_PIXMAP: case IMAGE_SUBWINDOW: case IMAGE_WIDGET: - case IMAGE_LAYOUT: /* just do nothing here */ break; - + case IMAGE_NOTHING: /* nothing is as nothing does */ break; - + case IMAGE_TEXT: case IMAGE_POINTER: default: abort (); } - IMAGE_INSTANCE_OPTIMIZE_OUTPUT + IMAGE_INSTANCE_OPTIMIZE_OUTPUT (XIMAGE_INSTANCE (instance)) = 0; } @@ -887,7 +887,7 @@ reset_tty_modes (struct console *c) OUTPUT1_IF (c, TTY_SD (c).keypad_off); OUTPUT1_IF (c, TTY_SD (c).cursor_normal); OUTPUT1_IF (c, TTY_SD (c).end_motion); - tty_output_end (XDEVICE (CONSOLE_SELECTED_DEVICE (c))); + tty_frame_output_end (XFRAME (CONSOLE_SELECTED_FRAME (c))); } /***************************************************************************** @@ -914,7 +914,7 @@ tty_redisplay_shutdown (struct console *c) /* And then stick the cursor there. */ tty_set_final_cursor_coords (f, f->height, 0); - tty_output_end (XDEVICE (dev)); + tty_frame_output_end (f); } } } @@ -925,7 +925,7 @@ tty_redisplay_shutdown (struct console *c) /* FLAGS - these don't need to be console local since only one console - can be being updated at a time. */ + can be being updated at a time. */ static int insert_mode_on; /* nonzero if in insert mode */ static int standout_mode_on; /* nonzero if in standout mode */ static int underline_mode_on; /* nonzero if in underline mode */ @@ -1491,8 +1491,8 @@ console_type_create_redisplay_tty (void) CONSOLE_HAS_METHOD (tty, clear_to_window_end); CONSOLE_HAS_METHOD (tty, clear_region); CONSOLE_HAS_METHOD (tty, clear_frame); - CONSOLE_HAS_METHOD (tty, output_begin); - CONSOLE_HAS_METHOD (tty, output_end); + CONSOLE_HAS_METHOD (tty, frame_output_begin); + CONSOLE_HAS_METHOD (tty, frame_output_end); CONSOLE_HAS_METHOD (tty, flash); CONSOLE_HAS_METHOD (tty, ring_bell); CONSOLE_HAS_METHOD (tty, set_final_cursor_coords); diff --git a/src/redisplay-x.c b/src/redisplay-x.c index 39a94aa..afccf66 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -286,24 +286,24 @@ x_eol_cursor_width (void) } /***************************************************************************** - x_output_begin + x_window_output_begin Perform any necessary initialization prior to an update. ****************************************************************************/ static void -x_output_begin (struct device *d) +x_window_output_begin (struct window *w) { } /***************************************************************************** - x_output_end + x_window_output_end Perform any necessary flushing of queues when an update has completed. ****************************************************************************/ static void -x_output_end (struct device *d) +x_window_output_end (struct window *w) { - XFlush (DEVICE_X_DISPLAY (d)); + XFlush (DEVICE_X_DISPLAY (WINDOW_XDEVICE (w))); } /***************************************************************************** @@ -460,18 +460,20 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, break; case IMAGE_WIDGET: + if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance), + Qlayout)) + { + redisplay_output_layout (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + break; + } case IMAGE_SUBWINDOW: redisplay_output_subwindow (w, instance, &dbox, &dga, findex, cursor_start, cursor_width, cursor_height); break; - case IMAGE_LAYOUT: - redisplay_output_layout (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height); - break; - case IMAGE_NOTHING: /* nothing is as nothing does */ break; @@ -2093,8 +2095,8 @@ console_type_create_redisplay_x (void) CONSOLE_HAS_METHOD (x, output_vertical_divider); CONSOLE_HAS_METHOD (x, clear_region); CONSOLE_HAS_METHOD (x, clear_frame); - CONSOLE_HAS_METHOD (x, output_begin); - CONSOLE_HAS_METHOD (x, output_end); + CONSOLE_HAS_METHOD (x, window_output_begin); + CONSOLE_HAS_METHOD (x, window_output_end); CONSOLE_HAS_METHOD (x, flash); CONSOLE_HAS_METHOD (x, ring_bell); CONSOLE_HAS_METHOD (x, bevel_area); diff --git a/src/redisplay.c b/src/redisplay.c index b842b94..95e171e 100644 --- a/src/redisplay.c +++ b/src/redisplay.c @@ -87,16 +87,10 @@ Boston, MA 02111-1307, USA. */ #define LEFT_GLYPHS 2 #define RIGHT_GLYPHS 3 -/* Set the vertical clip to 0 if we are currently updating the line - start cache. Otherwise for buffers of line height 1 it may fail to - be able to work properly because regenerate_window will not layout - a single line. */ #define VERTICAL_CLIP(w, display) \ - (updating_line_start_cache \ - ? 0 \ - : ((WINDOW_TTY_P (w) | (!display && scroll_on_clipped_lines)) \ + ((WINDOW_TTY_P (w) | (!display && scroll_on_clipped_lines)) \ ? INT_MAX \ - : vertical_clip)) + : vertical_clip) /* The following structures are completely private to redisplay.c so we put them here instead of in a header file, for modularity. */ @@ -328,9 +322,6 @@ int vertical_clip; /* Minimum visible pixel width of clipped glyphs at right margin. */ int horizontal_clip; -/* Set if currently inside update_line_start_cache. */ -static int updating_line_start_cache; - /* Nonzero means reading single-character input with prompt so put cursor on minibuffer after the prompt. */ int cursor_in_echo_area; @@ -1322,6 +1313,7 @@ add_disp_table_entry_runes_1 (pos_data *data, Lisp_Object entry) case '%': dst += set_charptr_emchar (dst, '%'); break; + /* #### unimplemented */ } } } @@ -3980,8 +3972,8 @@ tail_recurse: * - If first element is another symbol, process the cadr or caddr * recursively according to whether the symbol's value is non-nil or * nil. - * - If first element is a face, process the cdr recursively - * without altering the depth. + * - If first element is an extent, process the cdr recursively + * and handle the extent's face. */ Lisp_Object car, tem; @@ -5097,6 +5089,7 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) int ypos = WINDOW_TEXT_TOP (w); int yend; /* set farther down */ int yclip = WINDOW_TEXT_TOP_CLIP (w); + int force; prop_block_dynarr *prop; layout_bounds bounds; @@ -5150,10 +5143,14 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) else prop = 0; + /* When we are computing things for scrolling purposes, make + sure at least one line is always generated */ + force = (type == CMOTION_DISP); + /* Make sure this is set always */ /* Note the conversion at end */ w->window_end_pos[type] = start_pos; - while (ypos < yend) + while (ypos < yend || force) { struct display_line dl; struct display_line *dlp; @@ -5206,7 +5203,7 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) the top clip and the bottom clip. */ visible_height -= (dlp->clip + dlp->top_clip); - if (visible_height < VERTICAL_CLIP (w, 1)) + if (visible_height < VERTICAL_CLIP (w, 1) && !force) { if (local) free_display_line (dlp); @@ -5250,6 +5247,8 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) generate_display_line call. */ if (start_pos > BUF_ZV (b)) break; + + force = 0; } if (prop) @@ -6342,12 +6341,9 @@ redisplay_frame (struct frame *f, int preemption_check) process.*/ if (f->frame_changed || f->subwindows_changed) { - reset_subwindow_cachels (f); /* we have to do this so the gutter gets regenerated. */ reset_gutter_display_lines (f); } - else - mark_subwindow_cachels_as_not_updated (f); hold_frame_size_changes (); @@ -6375,6 +6371,8 @@ redisplay_frame (struct frame *f, int preemption_check) #### If a frame-size change does occur we should probably actually be preempting redisplay. */ + MAYBE_DEVMETH (d, frame_output_begin, (f)); + /* We can now update the gutters, safe in the knowledge that our efforts won't get undone. */ @@ -6388,7 +6386,7 @@ redisplay_frame (struct frame *f, int preemption_check) /* Erase the frame before outputting its contents. */ if (f->clear) { - DEVMETH (d, clear_frame, (f)); + MAYBE_DEVMETH (d, clear_frame, (f)); } /* Do the selected window first. */ @@ -6397,11 +6395,7 @@ redisplay_frame (struct frame *f, int preemption_check) /* Then do the rest. */ redisplay_windows (f->root_window, 1); - /* We now call the output_end routine for tty frames. We delay - doing so in order to avoid cursor flicker. So much for 100% - encapsulation. */ - if (FRAME_TTY_P (f)) - DEVMETH (d, output_end, (d)); + MAYBE_DEVMETH (d, frame_output_end, (f)); update_frame_title (f); @@ -7836,7 +7830,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, validate_line_start_cache (w); w->line_cache_validation_override++; - updating_line_start_cache = 1; if (from < BUF_BEGV (b)) from = BUF_BEGV (b); @@ -7845,7 +7838,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, if (from > to) { - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7858,7 +7850,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, /* Check to see if the desired range is already in the cache. */ if (from >= low_bound && to <= high_bound) { - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7887,7 +7878,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, update_internal_cache_list (w, DESIRED_DISP); if (!Dynarr_length (internal_cache)) { - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7915,7 +7905,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, { Dynarr_add_many (cache, Dynarr_atp (internal_cache, 0), Dynarr_length (internal_cache)); - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7924,7 +7913,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, the bounds of the DESIRED structs in the first place. */ if (start >= low_bound && end <= high_bound) { - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7947,7 +7935,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, Dynarr_reset (cache); Dynarr_add_many (cache, Dynarr_atp (internal_cache, 0), Dynarr_length (internal_cache)); - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7973,7 +7960,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, Dynarr_reset (cache); Dynarr_add_many (cache, Dynarr_atp (internal_cache, 0), Dynarr_length (internal_cache)); - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -7982,7 +7968,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, Dynarr_length (internal_cache) - ic_elt); } - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -8002,23 +7987,9 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, update_internal_cache_list (w, CMOTION_DISP); /* If this assert is triggered then regenerate_window failed - to layout a single line. That is not supposed to be - possible because we impose a minimum height on the buffer - and override vertical clip when we are in here. */ - /* #### Ah, but it is because the window may temporarily - exist but not have any lines at all if the minibuffer is - real big. Look into that situation better. */ - if (!Dynarr_length (internal_cache)) - { - if (old_lb == -1 && low_bound == -1) - { - updating_line_start_cache = 0; - w->line_cache_validation_override--; - return; - } - - assert (Dynarr_length (internal_cache)); - } + to layout a single line. This is not possible since we + force at least a single line to be layout for CMOTION_DISP */ + assert (Dynarr_length (internal_cache)); assert (startp == Dynarr_atp (internal_cache, 0)->start); ic_elt = Dynarr_length (internal_cache) - 1; @@ -8064,7 +8035,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, startp = new_startp; if (startp > BUF_ZV (b)) { - updating_line_start_cache = 0; w->line_cache_validation_override--; return; } @@ -8098,7 +8068,6 @@ update_line_start_cache (struct window *w, Bufpos from, Bufpos to, while (to > high_bound); } - updating_line_start_cache = 0; w->line_cache_validation_override--; assert (to <= high_bound); } @@ -8839,6 +8808,9 @@ Ensure that all minibuffers are correctly showing the echo area. if (FRAME_REPAINT_P (f) && FRAME_HAS_MINIBUF_P (f)) { Lisp_Object window = FRAME_MINIBUF_WINDOW (f); + + MAYBE_DEVMETH (d, frame_output_begin, (f)); + /* * If the frame size has changed, there may be random * chud on the screen left from previous messages @@ -8847,19 +8819,15 @@ Ensure that all minibuffers are correctly showing the echo area. */ if (f->echo_area_garbaged) { - DEVMETH (d, clear_frame, (f)); + MAYBE_DEVMETH (d, clear_frame, (f)); f->echo_area_garbaged = 0; } redisplay_window (window, 0); + MAYBE_DEVMETH (d, frame_output_end, (f)); + call_redisplay_end_triggers (XWINDOW (window), 0); } } - - /* We now call the output_end routine for tty frames. We delay - doing so in order to avoid cursor flicker. So much for 100% - encapsulation. */ - if (DEVICE_TTY_P (d)) - DEVMETH (d, output_end, (d)); } return Qnil; @@ -9270,15 +9238,8 @@ syms_of_redisplay (void) } void -reinit_vars_of_redisplay (void) -{ - updating_line_start_cache = 0; -} - -void vars_of_redisplay (void) { - reinit_vars_of_redisplay (); #if 0 staticpro (&last_arrow_position); @@ -9323,7 +9284,9 @@ See also `overlay-arrow-string'. Voverlay_arrow_position = Qnil; DEFVAR_LISP_MAGIC ("overlay-arrow-string", &Voverlay_arrow_string /* -String to display as an arrow. See also `overlay-arrow-position'. +String or glyph to display as an arrow. See also `overlay-arrow-position'. +(Note that despite the name of this variable, it can be set to a glyph as +well as a string.) */ , redisplay_variable_changed); Voverlay_arrow_string = Qnil; diff --git a/src/s/cygwin32.h b/src/s/cygwin32.h index 937adab..dd7e7da 100644 --- a/src/s/cygwin32.h +++ b/src/s/cygwin32.h @@ -85,63 +85,9 @@ extern int utimes(char *file, struct timeval *tvp); extern int srandom( unsigned seed); extern long random(); -# define SND_ASYNC 1 -# define SND_NODEFAULT 2 -# define SND_MEMORY 4 -# define SND_FILENAME 0x2000L -# define VK_APPS 0x5D -# define SIF_TRACKPOS 0x0010 -# define ICC_BAR_CLASSES 4 -# define FW_BLACK FW_HEAVY -# define FW_ULTRABOLD FW_EXTRABOLD -# define FW_DEMIBOLD FW_SEMIBOLD -# define FW_ULTRALIGHT FW_EXTRALIGHT -# define APPCMD_FILTERINITS 0x20L -# define CBF_FAIL_SELFCONNECTIONS 0x1000 -# define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 -# define CBF_FAIL_ADVISES 0x4000 -# define CBF_FAIL_POKES 0x10000 -# define CBF_FAIL_REQUESTS 0x20000 -# define SZDDESYS_TOPIC "System" -# define JOHAB_CHARSET 130 -# define MAC_CHARSET 77 # endif #endif -#ifndef SPI_GETWHEELSCROLLLINES -#define SPI_GETWHEELSCROLLLINES 104 -#endif -#ifndef WHEEL_PAGESCROLL -#define WHEEL_PAGESCROLL (UINT_MAX) -#endif -#ifndef WHEEL_DELTA -#define WHEEL_DELTA 120 -#endif -#ifndef WM_MOUSEWHEEL -#define WM_MOUSEWHEEL 0x20A -#endif -#ifndef TCS_BOTTOM -#define TCS_BOTTOM 0x0002 -#endif -#ifndef TCS_VERTICAL -#define TCS_VERTICAL 0x0080 -#endif -#ifndef PHYSICALWIDTH -#define PHYSICALWIDTH 110 -#endif -#ifndef PHYSICALHEIGHT -#define PHYSICALHEIGHT 111 -#endif -#ifndef PHYSICALOFFSETX -#define PHYSICALOFFSETX 112 -#endif -#ifndef PHYSICALOFFSETY -#define PHYSICALOFFSETY 113 -#endif - - -#define PBS_SMOOTH 0x01 - #ifdef HAVE_MS_WINDOWS #define HAVE_NTGUI #define HAVE_FACES @@ -153,7 +99,7 @@ extern long random(); #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves #define LIBS_SYSTEM -lwinmm - +#define WIN32_LEAN_AND_MEAN #define TEXT_START -1 #define TEXT_END -1 diff --git a/src/s/mingw32.h b/src/s/mingw32.h index 9cb42bf..1454e05 100644 --- a/src/s/mingw32.h +++ b/src/s/mingw32.h @@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */ #define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -Int/inc -I../nt/inc -DWINDOWSNT" #define LIBS_SYSTEM "-mno-cygwin -lwinmm -lwsock32" +#define WIN32_LEAN_AND_MEAN #define TEXT_START -1 #define TEXT_END -1 @@ -51,44 +52,9 @@ Boston, MA 02111-1307, USA. */ #define LOCALE_USE_CP_ACP 0x40000000 #define NSIG 23 -#ifndef SPI_GETWHEELSCROLLLINES -#define SPI_GETWHEELSCROLLLINES 104 -#endif -#ifndef WHEEL_PAGESCROLL -#define WHEEL_PAGESCROLL (UINT_MAX) -#endif -#ifndef WHEEL_DELTA -#define WHEEL_DELTA 120 -#endif - /* this is necessary to get the TCS_* definitions in */ #define _WIN32_IE 0x0400 -#ifndef WM_MOUSEWHEEL -#define WM_MOUSEWHEEL 0x20A -#endif -#ifndef TCS_BOTTOM -#define TCS_BOTTOM 0x0002 -#endif -#ifndef TCS_VERTICAL -#define TCS_VERTICAL 0x0080 -#endif -#ifndef PHYSICALWIDTH -#define PHYSICALWIDTH 110 -#endif -#ifndef PHYSICALHEIGHT -#define PHYSICALHEIGHT 111 -#endif -#ifndef PHYSICALOFFSETX -#define PHYSICALOFFSETX 112 -#endif -#ifndef PHYSICALOFFSETY -#define PHYSICALOFFSETY 113 -#endif -#ifndef PBS_SMOOTH -#define PBS_SMOOTH 0x01 -#endif - /* translate NT world unexec stuff to our a.out definitions */ #define strnicmp strncasecmp @@ -263,6 +229,7 @@ gid_t getegid (void); #undef HAVE_SYS_WAIT_H #undef HAVE_TERMIOS #undef SYSV_SYSTEM_DIR +#undef CLASH_DETECTION /* We now have emulation for some signals */ #define HAVE_SIGHOLD diff --git a/src/scrollbar.c b/src/scrollbar.c index 18360c0..ffa3c12 100644 --- a/src/scrollbar.c +++ b/src/scrollbar.c @@ -735,26 +735,26 @@ behavior. with their standard behaviors. It is not possible to hide the differences down in lwlib because knowledge of XEmacs buffer and cursor motion routines is necessary. */ -#if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ - defined (LWLIB_SCROLLBARS_ATHENA3D) || defined(HAVE_MS_WINDOWS) - window_scroll (window, Qnil, -1, ERROR_ME_NOT); -#else /* Athena */ - { - Bufpos bufpos; - Lisp_Object value = Fcdr (object); - CHECK_INT (value); - Fmove_to_window_line (Qzero, window); - /* can't use Fvertical_motion() because it moves the buffer point - rather than the window's point. - - #### It does? Why does it take a window argument then? */ - bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)), - XINT (value), 0); - Fset_window_point (window, make_int (bufpos)); - Fcenter_to_window_line (Qzero, window); - } -#endif /* Athena */ + if (NILP (XCDR (object))) + window_scroll (window, Qnil, -1, ERROR_ME_NOT); + else + { + Bufpos bufpos; + Lisp_Object value = Fcdr (object); + + CHECK_INT (value); + Fmove_to_window_line (Qzero, window); + /* can't use Fvertical_motion() because it moves the buffer point + rather than the window's point. + + #### It does? Why does it take a window argument then? */ + bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)), + XINT (value), 0); + Fset_window_point (window, make_int (bufpos)); + Fcenter_to_window_line (Qzero, window); + } + zmacs_region_stays = 1; return Qnil; } @@ -776,17 +776,17 @@ behavior. with their standard behaviors. It is not possible to hide the differences down in lwlib because knowledge of XEmacs buffer and cursor motion routines is necessary. */ -#if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ - defined (LWLIB_SCROLLBARS_ATHENA3D) || defined (HAVE_MS_WINDOWS) - window_scroll (window, Qnil, 1, ERROR_ME_NOT); -#else /* Athena */ - { - Lisp_Object value = Fcdr (object); - CHECK_INT (value); - Fmove_to_window_line (value, window); - Fcenter_to_window_line (Qzero, window); - } -#endif /* Athena */ + + if (NILP (XCDR (object))) + window_scroll (window, Qnil, 1, ERROR_ME_NOT); + else + { + Lisp_Object value = Fcdr (object); + CHECK_INT (value); + Fmove_to_window_line (value, window); + Fcenter_to_window_line (Qzero, window); + } + zmacs_region_stays = 1; return Qnil; } diff --git a/src/specifier.c b/src/specifier.c index 4318bf8..5338b03 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -532,31 +532,52 @@ Return a new specifier object of type TYPE. A specifier is an object that can be used to keep track of a property whose value can be per-buffer, per-window, per-frame, or per-device, -and can further be restricted to a particular console-type or device-class. -Specifiers are used, for example, for the various built-in properties of a -face; this allows a face to have different values in different frames, -buffers, etc. For more information, see `specifier-instance', +and can further be restricted to a particular console-type or +device-class. Specifiers are used, for example, for the various +built-in properties of a face; this allows a face to have different +values in different frames, buffers, etc. + +When speaking of the value of a specifier, it is important to +distinguish between the *setting* of a specifier, called an +\"instantiator\", and the *actual value*, called an \"instance\". You +put various possible instantiators (i.e. settings) into a specifier +and associate them with particular locales (buffer, window, frame, +device, global), and then the instance (i.e. actual value) is +retrieved in a specific domain (window, frame, device) by looking +through the possible instantiators (i.e. settings). This process is +called \"instantiation\". + +To put settings into a specifier, use `set-specifier', or the +lower-level functions `add-spec-to-specifier' and +`add-spec-list-to-specifier'. You can also temporarily bind a setting +to a specifier using `let-specifier'. To retrieve settings, use +`specifier-specs', or its lower-level counterpart +`specifier-spec-list'. To determine the actual value, use +`specifier-instance'. + +For more information, see `set-specifier', `specifier-instance', `specifier-specs', and `add-spec-to-specifier'; or, for a detailed -description of specifiers, including how they are instantiated over a -particular domain (i.e. how their value in that domain is determined), -see the chapter on specifiers in the XEmacs Lisp Reference Manual. +description of specifiers, including how exactly the instantiation +process works, see the chapter on specifiers in the XEmacs Lisp +Reference Manual. TYPE specifies the particular type of specifier, and should be one of -the symbols 'generic, 'integer, 'boolean, 'color, 'font, 'image, -'face-boolean, 'gutter, 'gutter-size, 'gutter-visible or 'toolbar. +the symbols 'generic, 'integer, 'natnum, 'boolean, 'color, 'font, +'image, 'face-boolean, 'display-table, 'gutter, 'gutter-size, +'gutter-visible or 'toolbar. For more information on particular types of specifiers, see the -functions `generic-specifier-p', `integer-specifier-p', -`boolean-specifier-p', `color-specifier-p', `font-specifier-p', -`image-specifier-p', `face-boolean-specifier-p', `gutter-specifier-p, -`gutter-size-specifier-p, `gutter-visible-specifier-p and -`toolbar-specifier-p'. +functions `make-generic-specifier', `make-integer-specifier', +`make-natnum-specifier', `make-boolean-specifier', +`make-color-specifier', `make-font-specifier', `make-image-specifier', +`make-face-boolean-specifier', `make-gutter-size-specifier', +`make-gutter-visible-specifier', `default-toolbar', `default-gutter', +and `current-display-table'. */ (type)) { /* This function can GC */ - struct specifier_methods *meths = decode_specifier_type (type, - ERROR_ME); + struct specifier_methods *meths = decode_specifier_type (type, ERROR_ME); return make_specifier (meths); } @@ -609,15 +630,19 @@ Valid locales are devices, frames, windows, buffers, and 'global. DEFUN ("valid-specifier-domain-p", Fvalid_specifier_domain_p, 1, 1, 0, /* Return t if DOMAIN is a valid specifier domain. A domain is used to instance a specifier (i.e. determine the specifier's -value in that domain). Valid domains are windows, frames, and devices. -\(nil is not valid.) +value in that domain). Valid domains are image instances, windows, frames, +and devices. \(nil is not valid.) image instances are pseudo-domains since +instantiation will actually occur in the window the image instance itself is +instantiated in. */ (domain)) { /* This cannot GC. */ return ((DEVICEP (domain) && DEVICE_LIVE_P (XDEVICE (domain))) || (FRAMEP (domain) && FRAME_LIVE_P (XFRAME (domain))) || - (WINDOWP (domain) && WINDOW_LIVE_P (XWINDOW (domain)))) + (WINDOWP (domain) && WINDOW_LIVE_P (XWINDOW (domain))) || + /* #### get image instances out of domains! */ + IMAGE_INSTANCEP (domain)) ? Qt : Qnil; } @@ -729,7 +754,7 @@ check_valid_domain (Lisp_Object domain) signal_simple_error ("Invalid specifier domain", domain); } -static Lisp_Object +Lisp_Object decode_domain (Lisp_Object domain) { if (NILP (domain)) @@ -2435,7 +2460,7 @@ specifier_instance_from_inst_list (Lisp_Object specifier, GCPRO2 (specifier, inst_list); sp = XSPECIFIER (specifier); - device = DFW_DEVICE (domain); + device = DOMAIN_DEVICE (domain); if (no_quit) /* The instantiate method is allowed to call eval. Since it @@ -2515,16 +2540,20 @@ specifier_instance (Lisp_Object specifier, Lisp_Object matchspec, /* Attempt to determine buffer, window, frame, and device from the domain. */ - if (WINDOWP (domain)) + /* #### get image instances out of domains! */ + if (IMAGE_INSTANCEP (domain)) + window = DOMAIN_WINDOW (domain); + else if (WINDOWP (domain)) window = domain; else if (FRAMEP (domain)) frame = domain; else if (DEVICEP (domain)) device = domain; else - /* #### dmoore - dammit, this should just signal an error or something - shouldn't it? - #### No. Errors are handled in Lisp primitives implementation. + /* dmoore writes: [dammit, this should just signal an error or something + shouldn't it?] + + No. Errors are handled in Lisp primitives implementation. Invalid domain is a design error here - kkm. */ abort (); @@ -2959,8 +2988,9 @@ DEFINE_SPECIFIER_TYPE (generic); What really needs to be done is to write a function `make-specifier-type' that creates new specifier types. - #### I'll look into this for 19.14. - */ + + #### [I'll look into this for 19.14.] Well, sometime. (Currently + May 2000, 21.2 is in development. 19.14 was released in June 1996.) */ "A generic specifier is a generalized kind of specifier with user-defined\n" "semantics. The instantiator can be any kind of Lisp object, and the\n" @@ -2997,8 +3027,8 @@ DEFINE_SPECIFIER_TYPE (generic); DEFUN ("generic-specifier-p", Fgeneric_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a generic specifier. -A generic specifier allows any kind of Lisp object as an instantiator, -and returns back the Lisp object unchanged when it is instantiated. +See `make-generic-specifier' for a description of possible generic +instantiators. */ (object)) { @@ -3020,6 +3050,9 @@ integer_validate (Lisp_Object instantiator) DEFUN ("integer-specifier-p", Finteger_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is an integer specifier. + +See `make-integer-specifier' for a description of possible integer +instantiators. */ (object)) { @@ -3040,6 +3073,9 @@ natnum_validate (Lisp_Object instantiator) DEFUN ("natnum-specifier-p", Fnatnum_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a natnum (non-negative-integer) specifier. + +See `make-natnum-specifier' for a description of possible natnum +instantiators. */ (object)) { @@ -3061,6 +3097,9 @@ boolean_validate (Lisp_Object instantiator) DEFUN ("boolean-specifier-p", Fboolean_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a boolean specifier. + +See `make-boolean-specifier' for a description of possible boolean +instantiators. */ (object)) { @@ -3073,11 +3112,11 @@ Return non-nil if OBJECT is a boolean specifier. DEFINE_SPECIFIER_TYPE (display_table); -#define VALID_SINGLE_DISPTABLE_INSTANTIATOR_P(instantiator) \ - (VECTORP (instantiator) \ - || (CHAR_TABLEP (instantiator) \ - && (XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_CHAR \ - || XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_GENERIC)) \ +#define VALID_SINGLE_DISPTABLE_INSTANTIATOR_P(instantiator) \ + (VECTORP (instantiator) \ + || (CHAR_TABLEP (instantiator) \ + && (XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_CHAR \ + || XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_GENERIC)) \ || RANGE_TABLEP (instantiator)) static void @@ -3109,6 +3148,9 @@ display_table_validate (Lisp_Object instantiator) DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a display-table specifier. + +See `current-display-table' for a description of possible display-table +instantiators. */ (object)) { diff --git a/src/specifier.h b/src/specifier.h index 17461cb..5758637 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -413,6 +413,48 @@ struct specifier_caching Lisp_Object oldval); }; +/* #### get image instances out of domains! */ + +/* #### I think the following should abort() rather than return nil + when an invalid domain is given; much more likely we'll catch design + errors early. --ben */ + +/* This turns out to be used heavily so we make it a macro to make it + inline. Also, the majority of the time the object will turn out to + be a window so we move it from being checked last to being checked + first. */ +#define DOMAIN_DEVICE(obj) \ + (WINDOWP (obj) ? WINDOW_DEVICE (XWINDOW (obj)) \ + : (FRAMEP (obj) ? FRAME_DEVICE (XFRAME (obj)) \ + : (DEVICEP (obj) ? obj \ + : (IMAGE_INSTANCEP (obj) ? image_instance_device (obj) \ + : Qnil)))) + +#define DOMAIN_FRAME(obj) \ + (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \ + : (FRAMEP (obj) ? obj \ + : (IMAGE_INSTANCEP (obj) ? image_instance_frame (obj) \ + : Qnil))) + +#define DOMAIN_WINDOW(obj) \ + (WINDOWP (obj) ? obj \ + : (IMAGE_INSTANCEP (obj) ? image_instance_window (obj) \ + : Qnil)) + +#define DOMAIN_LIVE_P(obj) \ + (WINDOWP (obj) ? WINDOW_LIVE_P (XWINDOW (obj)) \ + : (FRAMEP (obj) ? FRAME_LIVE_P (XFRAME (obj)) \ + : (DEVICEP (obj) ? DEVICE_LIVE_P (XDEVICE (obj)) \ + : (IMAGE_INSTANCEP (obj) ? image_instance_live_p (obj) \ + : 0)))) + +#define DOMAIN_XDEVICE(obj) \ + (XDEVICE (DOMAIN_DEVICE (obj))) +#define DOMAIN_XFRAME(obj) \ + (XFRAME (DOMAIN_FRAME (obj))) +#define DOMAIN_XWINDOW(obj) \ + (XWINDOW (DOMAIN_WINDOW (obj))) + EXFUN (Fcopy_specifier, 6); EXFUN (Fmake_specifier, 1); EXFUN (Fset_specifier_dirty_flag, 1); @@ -426,6 +468,7 @@ Lisp_Object decode_locale_list (Lisp_Object locale); extern enum spec_add_meth decode_how_to_add_specification (Lisp_Object how_to_add); Lisp_Object decode_specifier_tag_set (Lisp_Object tag_set); +Lisp_Object decode_domain (Lisp_Object domain); void add_entry_to_specifier_type_list (Lisp_Object symbol, struct specifier_methods *meths); diff --git a/src/toolbar-msw.c b/src/toolbar-msw.c index 7c2179c..07baead 100644 --- a/src/toolbar-msw.c +++ b/src/toolbar-msw.c @@ -46,18 +46,7 @@ Boston, MA 02111-1307, USA. */ #define TOOLBAR_ID_BIAS 16 #define TOOLBAR_HANDLE(f,p) \ GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + p) -#ifndef TB_SETIMAGELIST -#define TB_SETIMAGELIST (WM_USER + 48) -#define TB_GETIMAGELIST (WM_USER + 49) -#define TB_SETDISABLEDIMAGELIST (WM_USER + 54) -#define TB_GETDISABLEDIMAGELIST (WM_USER + 55) -#endif -#ifndef TB_SETPADDING -#define TB_SETPADDING (WM_USER + 87) -#endif -#ifndef TBSTYLE_FLAT -#define TBSTYLE_FLAT 0x800 -#endif + #define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2 #define MSWINDOWS_BLANK_SIZE 5 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8 diff --git a/src/toolbar.c b/src/toolbar.c index 963d373..b93fcd6 100644 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -1160,14 +1160,9 @@ toolbar_after_change (Lisp_Object specifier, Lisp_Object locale) DEFUN ("toolbar-specifier-p", Ftoolbar_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a toolbar specifier. -Toolbar specifiers are used to specify the format of a toolbar. -The values of the variables `default-toolbar', `top-toolbar', -`left-toolbar', `right-toolbar', and `bottom-toolbar' are always -toolbar specifiers. - -Valid toolbar instantiators are called "toolbar descriptors" -and are lists of vectors. See `default-toolbar' for a description -of the exact format. + +See `make-toolbar-specifier' for a description of possible toolbar +instantiators. */ (object)) { diff --git a/src/unexelf.c b/src/unexelf.c index d91ae33..f1da87a 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -494,16 +494,6 @@ typedef struct { # define SHN_ABS Elf_eshn_absolute # define SHN_COMMON Elf_eshn_common -/* - * The magic of picking the right size types is handled by the ELFSIZE - * definition above. - */ -# ifdef __STDC__ -# define ElfW(type) Elf_##type -# else -# define ElfW(type) Elf_/**/type -# endif - # ifdef __alpha__ # include # define HDRR struct ecoff_symhdr @@ -685,7 +675,6 @@ unexec (char *new_name, char *old_name, unsigned int data_start, old_sbss_index = -1; old_bss_addr = OLD_SECTION_H(old_bss_index).sh_addr; old_bss_size = OLD_SECTION_H(old_bss_index).sh_size; - new_data2_offset = OLD_SECTION_H(old_bss_index).sh_offset; new_data2_index = old_bss_index; } else @@ -693,7 +682,6 @@ unexec (char *new_name, char *old_name, unsigned int data_start, old_bss_addr = OLD_SECTION_H(old_sbss_index).sh_addr; old_bss_size = OLD_SECTION_H(old_bss_index).sh_size + OLD_SECTION_H(old_sbss_index).sh_size; - new_data2_offset = OLD_SECTION_H(old_sbss_index).sh_offset; new_data2_index = old_sbss_index; } @@ -711,6 +699,20 @@ unexec (char *new_name, char *old_name, unsigned int data_start, if (old_mdebug_index == old_file_h->e_shnum) old_mdebug_index = 0; + for (old_data_index = 1; old_data_index < (int) old_file_h->e_shnum; + old_data_index++) + { +#ifdef DEBUG + fprintf (stderr, "Looking for .data - found %s\n", + old_section_names + OLD_SECTION_H (old_data_index).sh_name); +#endif + if (!strcmp (old_section_names + OLD_SECTION_H (old_data_index).sh_name, + ".data")) + break; + } + if (old_data_index == old_file_h->e_shnum) + old_data_index = 0; + #if defined (emacs) || !defined (DEBUG) new_bss_addr = (ElfW(Addr)) sbrk (0); #else @@ -718,6 +720,8 @@ unexec (char *new_name, char *old_name, unsigned int data_start, #endif new_data2_addr = old_bss_addr; new_data2_size = new_bss_addr - old_bss_addr; + new_data2_offset = OLD_SECTION_H (old_data_index).sh_offset + + (new_data2_addr - OLD_SECTION_H (old_data_index).sh_addr); #ifdef DEBUG fprintf (stderr, "old_bss_index %d\n", old_bss_index); diff --git a/src/unexnt.c b/src/unexnt.c index 53abecf..d10f745 100644 --- a/src/unexnt.c +++ b/src/unexnt.c @@ -61,6 +61,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include #include +#include "nt.h" +#include "ntheap.h" + /* From IMAGEHLP.H which is not installed by default by MSVC < 5 */ /* The IMAGEHLP.DLL library is not distributed by default with Windows95 */ typedef PIMAGE_NT_HEADERS @@ -72,9 +75,8 @@ typedef PIMAGE_NT_HEADERS extern BOOL ctrl_c_handler (unsigned long type); #endif -#include "ntheap.h" - -/* Sync with FSF Emacs 19.34.6 note: struct file_data is now defined in ntheap.h */ +/* Sync with FSF Emacs 19.34.6 + note: struct file_data is now defined in nt.h */ enum { HEAP_UNINITIALIZED = 1, @@ -282,40 +284,6 @@ unexec (char *new_name, char *old_name, void *start_data, void *start_bss, close_file_data (&out_file); } - -/* File handling. */ - - -int -open_output_file (file_data *p_file, const char *filename, unsigned long size) -{ - HANDLE file; - HANDLE file_mapping; - void *file_base; - - file = CreateFile (filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - if (file == INVALID_HANDLE_VALUE) - return FALSE; - - file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE, - 0, size, NULL); - if (!file_mapping) - return FALSE; - - file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size); - if (file_base == NULL) - return FALSE; - - p_file->name = filename; - p_file->size = size; - p_file->file = file; - p_file->file_mapping = file_mapping; - p_file->file_base = (char*) file_base; - - return TRUE; -} - /* Routines to manipulate NT executable file sections. */ #ifndef DUMP_SEPARATE_SECTION diff --git a/src/window.c b/src/window.c index 473c778..c3e511f 100644 --- a/src/window.c +++ b/src/window.c @@ -281,9 +281,9 @@ allocate_window (void) p->face_cachels = Dynarr_new (face_cachel); p->glyph_cachels = Dynarr_new (glyph_cachel); p->line_start_cache = Dynarr_new (line_start_cache); - p->subwindow_instance_cache = make_lisp_hash_table (10, + p->subwindow_instance_cache = make_lisp_hash_table (30, HASH_TABLE_KEY_WEAK, - HASH_TABLE_EQ); + HASH_TABLE_EQUAL); p->line_cache_last_updated = Qzero; INIT_DISP_VARIABLE (last_point_x, 0); INIT_DISP_VARIABLE (last_point_y, 0); @@ -1867,6 +1867,34 @@ replace_window (Lisp_Object old, Lisp_Object replacement) /* #### Here, if replacement is a vertical combination and so is its new parent, we should make replacement's children be children of that parent instead. */ + + ERROR_CHECK_SUBWINDOW_CACHE (p); +} + +static int +window_unmap_subwindows_cache_mapper (Lisp_Object key, Lisp_Object value, + void *flag_closure) +{ + /* value can be nil; we cache failures as well as successes */ + if (!NILP (value)) + { + struct frame* f = XFRAME (XIMAGE_INSTANCE_FRAME (value)); + unmap_subwindow (value); + /* In case GC doesn't catch up fast enough, remove from the frame + cache also. Otherwise code that checks the sanity of the instance + will fail. */ + XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)) + = delq_no_quit (value, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))); + } + return 0; +} + +static void +window_unmap_subwindows (struct window* w) +{ + assert (!NILP (w->subwindow_instance_cache)); + elisp_maphash (window_unmap_subwindows_cache_mapper, + w->subwindow_instance_cache, 0); } /* we're deleting W; set the structure of W to indicate this. */ @@ -1874,6 +1902,20 @@ replace_window (Lisp_Object old, Lisp_Object replacement) static void mark_window_as_deleted (struct window *w) { + /* The window instance cache is going away now, so need to get the + cachels reset by redisplay. */ + MARK_FRAME_SUBWINDOWS_CHANGED (XFRAME (WINDOW_FRAME (w))); + + /* The cache is going away. If we leave unmapping to + reset_subwindow_cachels then we get in a situation where the + domain (the window) has been deleted but we still need access to + its attributes in order to unmap windows properly. Since the + subwindows are going to get GC'd anyway as a result of the domain + going away, it is safer to just unmap them all while we know the + domain is still valid. */ + ERROR_CHECK_SUBWINDOW_CACHE (w); + window_unmap_subwindows (w); + /* In the loop (while t (split-window) (delete-window)) we end up with a tree of deleted windows which are all connected @@ -1885,13 +1927,13 @@ mark_window_as_deleted (struct window *w) Since the window-configuration code doesn't need any of the pointers to other windows (they are all recreated from the window-config data), we set them all to nil so that we - are able to collect more actual garbage. - */ + are able to collect more actual garbage. */ w->next = Qnil; w->prev = Qnil; w->hchild = Qnil; w->vchild = Qnil; w->parent = Qnil; + w->subwindow_instance_cache = Qnil; w->dead = 1; @@ -1928,6 +1970,7 @@ will automatically call `save-buffers-kill-emacs'.) window = Fselected_window (Qnil); else CHECK_WINDOW (window); + w = XWINDOW (window); /* It's okay to delete an already-deleted window. */ @@ -3475,9 +3518,9 @@ make_dummy_parent (Lisp_Object window) p->face_cachels = Dynarr_new (face_cachel); p->glyph_cachels = Dynarr_new (glyph_cachel); p->subwindow_instance_cache = - make_lisp_hash_table (10, + make_lisp_hash_table (30, HASH_TABLE_KEY_WEAK, - HASH_TABLE_EQ); + HASH_TABLE_EQUAL); /* Put new into window structure in place of window */ replace_window (window, new); @@ -5173,6 +5216,11 @@ by `current-window-configuration' (which see). mark_windows_in_use (f, 1); + /* Force subwindows to be reinstantiated. They are all going + anyway and if we don't do this GC may not happen between now + and the next time we check their integrity. */ + reset_frame_subwindow_instance_cache (f); + #if 0 /* JV: This is bogus, First of all, the units are inconsistent. The frame sizes are measured @@ -5315,6 +5363,14 @@ by `current-window-configuration' (which see). w->hscroll = p->hscroll; w->modeline_hscroll = p->modeline_hscroll; w->line_cache_last_updated = Qzero; + /* The subwindow instance cache isn't preserved across + window configurations, and in fact doing so would be + wrong. We just reset to zero and then redisplay will fill + it up as needed. */ + w->subwindow_instance_cache = + make_lisp_hash_table (30, + HASH_TABLE_KEY_WEAK, + HASH_TABLE_EQUAL); SET_LAST_MODIFIED (w, 1); SET_LAST_FACECHANGE (w); w->config_mark = 0; diff --git a/src/window.h b/src/window.h index 8144a47..15ce2b3 100644 --- a/src/window.h +++ b/src/window.h @@ -387,9 +387,13 @@ int invalidate_vertical_divider_cache_in_window (struct window *w, int window_divider_width (struct window *w); #define WINDOW_FRAME(w) ((w)->frame) +#define WINDOW_XFRAME(w) XFRAME (WINDOW_FRAME (w)) #define WINDOW_BUFFER(w) ((w)->buffer) +#define WINDOW_XBUFFER(w) XBUFFER (WINDOW_BUFFER (w)) #define WINDOW_DEVICE(w) FRAME_DEVICE (XFRAME (WINDOW_FRAME (w))) +#define WINDOW_XDEVICE(w) XDEVICE (WINDOW_DEVICE (w)) #define WINDOW_CONSOLE(w) DEVICE_CONSOLE (XDEVICE (WINDOW_DEVICE (w))) +#define WINDOW_XCONSOLE(w) XCONSOLE (WINDOW_CONSOLE (w)) /* XEmacs window size and positioning macros. */ #define WINDOW_TOP(w) ((w)->pixel_top) diff --git a/tests/ChangeLog b/tests/ChangeLog index 36e7a61..821a5a1 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2000-05-28 Martin Buchholz + + * XEmacs 21.2.34 is released. + 2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. diff --git a/tests/glyph-test.el b/tests/glyph-test.el index c325e36..b5d1727 100644 --- a/tests/glyph-test.el +++ b/tests/glyph-test.el @@ -148,12 +148,12 @@ ;; layout (setq layout (make-glyph - [layout :pixel-width 200 :pixel-height 250 + [layout :descriptor "The Layout" :orientation vertical :justify left :border [string :data "Hello There Mrs"] - :items ([layout :orientation horizontal - :items (radio-button1 radio-button2)] + :items ([native-layout :orientation horizontal + :items (radio-button1 radio-button2)] edit-field toggle-button label str)])) (set-glyph-face layout 'gui-element) (set-extent-begin-glyph diff --git a/version.sh b/version.sh index ea26a94..44b7645 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=33 -xemacs_codename="Melpomene" +emacs_beta_version=34 +xemacs_codename="Molpe" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8 -- 1.7.10.4