+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
* configure.in: Add new option `--with-utf-2000'; define `UTF2000'
if it is specified.
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
+2000-05-15 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * configure.in:
+ Do not define DOUG_LEA_MALLOC when using other malloc scheme.
+ Remove unused variable use_minimal_tagbits.
+
+2000-05-02 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * configure.in: Remove lockdir.
+
+2000-04-15 Andy Piper <andy@xemacs.org>
+
+ * etc/Emacs.ad: add select-start() back into text translations.
+
2000-05-01 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.33 is released.
pkgdir='${datadir}/${instvardir}/lisp'
package_path=''
etcdir='${datadir}/${instvardir}/etc'
-lockdir='${statedir}/${inststaticdir}/lock'
archlibdir='${datadir}/${instvardir}/${configuration}'
docdir='${archlibdir}'
with_prefix='yes'
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
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
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:844: checking whether ln -s works" >&5
+echo "configure:835: checking whether ln -s works" >&5
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
echo $ac_n "checking "host system type"""... $ac_c" 1>&6
-echo "configure:1109: checking "host system type"" >&5
+echo "configure:1100: 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/'`
# 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:1604: checking for $ac_word" >&5
+echo "configure:1595: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
# 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:1631: checking for $ac_word" >&5
+echo "configure:1622: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
# 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:1679: checking for $ac_word" >&5
+echo "configure:1670: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1708: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1699: 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'
cat > conftest.$ac_ext << EOF
-#line 1721 "configure"
+#line 1712 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1717: \"$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
{ 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:1754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1745: 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:1759: checking whether we are using GNU C" >&5
+echo "configure:1750: checking whether we are using GNU C" >&5
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1757: \"$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
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1784: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1775: checking whether ${CC-cc} accepts -g" >&5
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; 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:1817: checking for $ac_word" >&5
+echo "configure:1808: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
# 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:1844: checking for $ac_word" >&5
+echo "configure:1835: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
# 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:1892: checking for $ac_word" >&5
+echo "configure:1883: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1921: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1912: 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'
cat > conftest.$ac_ext << EOF
-#line 1934 "configure"
+#line 1925 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1930: \"$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
{ 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:1967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1958: 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:1972: checking whether we are using GNU C" >&5
+echo "configure:1963: checking whether we are using GNU C" >&5
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$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
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1997: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1988: checking whether ${CC-cc} accepts -g" >&5
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; 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:2030: checking for $ac_word" >&5
+echo "configure:2021: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
# 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:2057: checking for $ac_word" >&5
+echo "configure:2048: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
# 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:2105: checking for $ac_word" >&5
+echo "configure:2096: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2134: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2125: 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'
cat > conftest.$ac_ext << EOF
-#line 2147 "configure"
+#line 2138 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2143: \"$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
{ 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:2180: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2171: 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:2185: checking whether we are using GNU C" >&5
+echo "configure:2176: checking whether we are using GNU C" >&5
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2183: \"$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
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2210: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2201: checking whether ${CC-cc} accepts -g" >&5
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
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:2247: checking how to run the C preprocessor" >&5
+echo "configure:2238: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2260 "configure"
+#line 2251 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2257: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2277 "configure"
+#line 2268 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2274: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2294 "configure"
+#line 2285 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2291: \"$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
:
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2326: checking for AIX" >&5
+echo "configure:2317: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 2328 "configure"
+#line 2319 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
#define CONFFOO 1
EOF
echo $ac_n "checking for a working inclusion macro""... $ac_c" 1>&6
-echo "configure:2357: checking for a working inclusion macro" >&5
+echo "configure:2348: checking for a working inclusion macro" >&5
cat > conftest.$ac_ext <<EOF
-#line 2359 "configure"
+#line 2350 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2362: \"$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
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 2386 "configure"
+#line 2377 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2390: \"$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
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 2414 "configure"
+#line 2405 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2419: \"$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
echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2454: checking for GNU libc" >&5
+echo "configure:2445: checking for GNU libc" >&5
cat > conftest.$ac_ext <<EOF
-#line 2456 "configure"
+#line 2447 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
have_glibc=yes
else
esac
cat > conftest.$ac_ext <<EOF
-#line 2545 "configure"
+#line 2536 "configure"
#include "confdefs.h"
int main () {
#if defined __SUNPRO_C
#endif
}
EOF
-if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
if test "$GCC" = "yes"; then
echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
-echo "configure:2793: checking for buggy gcc versions" >&5
+echo "configure:2784: 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.*)
fi
echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2916: checking for dynodump" >&5
+echo "configure:2907: checking for dynodump" >&5
if test "$unexec" != "unexsol2.o"; then
echo "$ac_t""no" 1>&6
else
done
echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
-echo "configure:2954: checking for terminateAndUnload in -lC" >&5
+echo "configure:2945: checking for terminateAndUnload in -lC" >&5
ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
xe_check_libs=" -lC "
cat > conftest.$ac_ext <<EOF
-#line 2959 "configure"
+#line 2950 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
terminateAndUnload()
; return 0; }
EOF
-if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2961: \"$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
if test "$add_runtime_path" = "yes"; then
echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:3078: checking "for runtime libraries flag"" >&5
+echo "configure:3069: checking "for runtime libraries flag"" >&5
case "$opsys" in
sol2 ) dash_r="-R" ;;
decosf* | linux* | irix*) dash_r="-rpath " ;;
done
fi
cat > conftest.$ac_ext <<EOF
-#line 3100 "configure"
+#line 3091 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
dash_r="$try_dash_r"
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:3209: checking for malloc_get_state" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3212 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char malloc_get_state(); below. */
-#include <assert.h>
-/* 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:3235: \"$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:3255: checking for malloc_set_state" >&5
+echo "configure:3200: checking for malloc_set_state" >&5
cat > conftest.$ac_ext <<EOF
-#line 3258 "configure"
+#line 3203 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char malloc_set_state(); below. */
; return 0; }
EOF
-if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3226: \"$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
fi
echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
-echo "configure:3301: checking whether __after_morecore_hook exists" >&5
+echo "configure:3246: checking whether __after_morecore_hook exists" >&5
cat > conftest.$ac_ext <<EOF
-#line 3303 "configure"
+#line 3248 "configure"
#include "confdefs.h"
extern void (* __after_morecore_hook)();
int main() {
__after_morecore_hook = 0
; return 0; }
EOF
-if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3255: \"$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
- 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
}
fi
- use_minimal_tagbits=yes
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:3369: checking for $ac_word" >&5
+echo "configure:3311: checking for $ac_word" >&5
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
# 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:3424: checking for a BSD compatible install" >&5
+echo "configure:3366: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
# 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:3478: checking for $ac_word" >&5
+echo "configure:3420: checking for $ac_word" >&5
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3510: checking for $ac_hdr" >&5
+echo "configure:3452: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 3513 "configure"
+#line 3455 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3460: \"$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*
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:3548: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:3490: checking for sys/wait.h that is POSIX.1 compatible" >&5
cat > conftest.$ac_ext <<EOF
-#line 3551 "configure"
+#line 3493 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:3567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3591: checking for ANSI C header files" >&5
+echo "configure:3533: checking for ANSI C header files" >&5
cat > conftest.$ac_ext <<EOF
-#line 3594 "configure"
+#line 3536 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3544: \"$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*
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
-#line 3619 "configure"
+#line 3561 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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
-#line 3637 "configure"
+#line 3579 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
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 <<EOF
-#line 3655 "configure"
+#line 3597 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3692: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3634: checking whether time.h and sys/time.h may both be included" >&5
cat > conftest.$ac_ext <<EOF
-#line 3695 "configure"
+#line 3637 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:3728: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3670: checking for sys_siglist declaration in signal.h or unistd.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3731 "configure"
+#line 3673 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:3768: checking for struct utimbuf" >&5
+echo "configure:3710: checking for struct utimbuf" >&5
cat > conftest.$ac_ext <<EOF
-#line 3770 "configure"
+#line 3712 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
static struct utimbuf x; x.actime = x.modtime;
; return 0; }
EOF
-if { (eval echo configure:3789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3731: \"$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
rm -f conftest*
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3809: checking return type of signal handlers" >&5
+echo "configure:3751: checking return type of signal handlers" >&5
cat > conftest.$ac_ext <<EOF
-#line 3812 "configure"
+#line 3754 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3851: checking for size_t" >&5
+echo "configure:3793: checking for size_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3854 "configure"
+#line 3796 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3885: checking for pid_t" >&5
+echo "configure:3827: checking for pid_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3888 "configure"
+#line 3830 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3919: checking for uid_t in sys/types.h" >&5
+echo "configure:3861: checking for uid_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3922 "configure"
+#line 3864 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3958: checking for mode_t" >&5
+echo "configure:3900: checking for mode_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3961 "configure"
+#line 3903 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3992: checking for off_t" >&5
+echo "configure:3934: checking for off_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3995 "configure"
+#line 3937 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:4026: checking for ssize_t" >&5
+echo "configure:3968: checking for ssize_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4029 "configure"
+#line 3971 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:4061: checking for struct timeval" >&5
+echo "configure:4003: checking for struct timeval" >&5
cat > conftest.$ac_ext <<EOF
-#line 4063 "configure"
+#line 4005 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
static struct timeval x; x.tv_sec = x.tv_usec;
; return 0; }
EOF
-if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
HAVE_TIMEVAL=yes
rm -f conftest*
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:4101: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:4043: checking whether struct tm is in sys/time.h or time.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4104 "configure"
+#line 4046 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:4136: checking for tm_zone in struct tm" >&5
+echo "configure:4078: checking for tm_zone in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 4139 "configure"
+#line 4081 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:4170: checking for tzname" >&5
+echo "configure:4112: checking for tzname" >&5
cat > conftest.$ac_ext <<EOF
-#line 4173 "configure"
+#line 4115 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4209: checking for working const" >&5
+echo "configure:4151: checking for working const" >&5
cat > conftest.$ac_ext <<EOF
-#line 4212 "configure"
+#line 4154 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:4286: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:4228: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
cat > conftestmake <<\EOF
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:4311: checking whether byte ordering is bigendian" >&5
+echo "configure:4253: 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 <<EOF
-#line 4316 "configure"
+#line 4258 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4269: \"$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 <<EOF
-#line 4331 "configure"
+#line 4273 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:4342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
cat > conftest.$ac_ext <<EOF
-#line 4359 "configure"
+#line 4301 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_c_bigendian=no
else
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:4399: checking size of short" >&5
+echo "configure:4341: checking size of short" >&5
cat > conftest.$ac_ext <<EOF
-#line 4402 "configure"
+#line 4344 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_short=`cat conftestval`
else
exit 1
fi
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:4441: checking size of int" >&5
+echo "configure:4383: checking size of int" >&5
cat > conftest.$ac_ext <<EOF
-#line 4444 "configure"
+#line 4386 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_int=`cat conftestval`
else
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4477: checking size of long" >&5
+echo "configure:4419: checking size of long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4480 "configure"
+#line 4422 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_long=`cat conftestval`
else
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4513: checking size of long long" >&5
+echo "configure:4455: checking size of long long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4516 "configure"
+#line 4458 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4469: \"$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
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:4549: checking size of void *" >&5
+echo "configure:4491: checking size of void *" >&5
cat > conftest.$ac_ext <<EOF
-#line 4552 "configure"
+#line 4494 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4505: \"$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
echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:4586: checking for long file names" >&5
+echo "configure:4528: 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:
echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4632: checking for sin" >&5
+echo "configure:4574: checking for sin" >&5
cat > conftest.$ac_ext <<EOF
-#line 4635 "configure"
+#line 4577 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin(); below. */
; return 0; }
EOF
-if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4600: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:4676: checking for sin in -lm" >&5
+echo "configure:4618: checking for sin in -lm" >&5
ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
xe_check_libs=" -lm "
cat > conftest.$ac_ext <<EOF
-#line 4681 "configure"
+#line 4623 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
sin()
; return 0; }
EOF
-if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4634: \"$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
cat > conftest.$ac_ext <<EOF
-#line 4736 "configure"
+#line 4678 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
return atanh(1.0) + asinh(1.0) + acosh(1.0);
; return 0; }
EOF
-if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4685: \"$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
rm -f conftest*
echo "checking type of mail spool file locking" 1>&6
-echo "configure:4760: checking type of mail spool file locking" >&5
+echo "configure:4702: 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:4764: checking for $ac_func" >&5
+echo "configure:4706: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 4767 "configure"
+#line 4709 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4732: \"$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
case "$opsys" in decosf*)
echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:4863: checking for cma_open in -lpthreads" >&5
+echo "configure:4805: 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 <<EOF
-#line 4868 "configure"
+#line 4810 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
cma_open()
; return 0; }
EOF
-if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4821: \"$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
esac
echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:4915: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4857: 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;
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:4927: checking for \"-z ignore\" linker flag" >&5
+echo "configure:4869: 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 ;;
echo "checking "for specified window system"" 1>&6
-echo "configure:4938: checking "for specified window system"" >&5
+echo "configure:4880: checking "for specified window system"" >&5
if test "$with_x11" != "no"; then
test "$x_includes $x_libraries" != "NONE NONE" && \
# 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:4971: checking for X" >&5
+echo "configure:4913: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 5031 "configure"
+#line 4973 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4978: \"$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*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5105 "configure"
+#line 5047 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:5112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5054: \"$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.
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:5221: checking whether -R must be followed by a space" >&5
+echo "configure:5163: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 5224 "configure"
+#line 5166 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 5247 "configure"
+#line 5189 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
else
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:5290: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:5232: 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 <<EOF
-#line 5295 "configure"
+#line 5237 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:5306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5248: \"$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
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:5330: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:5272: 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 <<EOF
-#line 5335 "configure"
+#line 5277 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:5346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5288: \"$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
# 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:5375: checking for gethostbyname" >&5
+echo "configure:5317: checking for gethostbyname" >&5
cat > conftest.$ac_ext <<EOF
-#line 5378 "configure"
+#line 5320 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:5401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5343: \"$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
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:5422: checking for gethostbyname in -lnsl" >&5
+echo "configure:5364: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
xe_check_libs=" -lnsl "
cat > conftest.$ac_ext <<EOF
-#line 5427 "configure"
+#line 5369 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5380: \"$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
# -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:5468: checking for connect" >&5
+echo "configure:5410: checking for connect" >&5
cat > conftest.$ac_ext <<EOF
-#line 5471 "configure"
+#line 5413 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:5494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5436: \"$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
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:5517: checking "$xe_msg_checking"" >&5
+echo "configure:5459: 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 <<EOF
-#line 5522 "configure"
+#line 5464 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5475: \"$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
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:5557: checking for remove" >&5
+echo "configure:5499: checking for remove" >&5
cat > conftest.$ac_ext <<EOF
-#line 5560 "configure"
+#line 5502 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
; return 0; }
EOF
-if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5525: \"$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
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:5604: checking for remove in -lposix" >&5
+echo "configure:5546: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
xe_check_libs=" -lposix "
cat > conftest.$ac_ext <<EOF
-#line 5609 "configure"
+#line 5551 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
remove()
; return 0; }
EOF
-if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5562: \"$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
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:5644: checking for shmat" >&5
+echo "configure:5586: checking for shmat" >&5
cat > conftest.$ac_ext <<EOF
-#line 5647 "configure"
+#line 5589 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
; return 0; }
EOF
-if { (eval echo configure:5670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5612: \"$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
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:5691: checking for shmat in -lipc" >&5
+echo "configure:5633: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
xe_check_libs=" -lipc "
cat > conftest.$ac_ext <<EOF
-#line 5696 "configure"
+#line 5638 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shmat()
; return 0; }
EOF
-if { (eval echo configure:5707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5649: \"$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
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:5743: checking "$xe_msg_checking"" >&5
+echo "configure:5685: 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 <<EOF
-#line 5748 "configure"
+#line 5690 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5701: \"$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
echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5928: checking for X defines extracted by xmkmf" >&5
+echo "configure:5870: checking for X defines extracted by xmkmf" >&5
rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5960: checking for X11/Intrinsic.h" >&5
+echo "configure:5902: checking for X11/Intrinsic.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 5963 "configure"
+#line 5905 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5910: \"$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*
echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5992: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5934: checking for XOpenDisplay in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
xe_check_libs=" -lX11 "
cat > conftest.$ac_ext <<EOF
-#line 5997 "configure"
+#line 5939 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:6008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5950: \"$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
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:6033: checking "$xe_msg_checking"" >&5
+echo "configure:5975: 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 <<EOF
-#line 6038 "configure"
+#line 5980 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XGetFontProperty()
; return 0; }
EOF
-if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5991: \"$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
echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:6076: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:6018: checking for XShapeSelectInput in -lXext" >&5
ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXext "
cat > conftest.$ac_ext <<EOF
-#line 6081 "configure"
+#line 6023 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XShapeSelectInput()
; return 0; }
EOF
-if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6034: \"$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
echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:6115: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:6057: checking for XtOpenDisplay in -lXt" >&5
ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXt "
cat > conftest.$ac_ext <<EOF
-#line 6120 "configure"
+#line 6062 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XtOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6073: \"$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
echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:6154: checking the version of X11 being used" >&5
+echo "configure:6096: checking the version of X11 being used" >&5
cat > conftest.$ac_ext <<EOF
-#line 6156 "configure"
+#line 6098 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
EOF
-if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
./conftest foobar; x11_release=$?
else
for ac_func in XConvertCase
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6185: checking for $ac_func" >&5
+echo "configure:6127: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 6188 "configure"
+#line 6130 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6153: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6243: checking for $ac_hdr" >&5
+echo "configure:6185: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 6246 "configure"
+#line 6188 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6193: \"$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*
echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:6282: checking for XFree86" >&5
+echo "configure:6224: checking for XFree86" >&5
if test -d "/usr/X386/include" -o \
-f "/etc/XF86Config" -o \
-f "/etc/X11/XF86Config" -o \
test -z "$with_xmu" && {
echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:6302: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:6244: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXmu "
cat > conftest.$ac_ext <<EOF
-#line 6307 "configure"
+#line 6249 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmuReadBitmapDataFromFile()
; return 0; }
EOF
-if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6260: \"$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
echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:6357: checking for main in -lXbsd" >&5
+echo "configure:6299: checking for main in -lXbsd" >&5
ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXbsd "
cat > conftest.$ac_ext <<EOF
-#line 6362 "configure"
+#line 6304 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6311: \"$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
fi
if test "$with_msw" != "no"; then
echo "checking for MS-Windows" 1>&6
-echo "configure:6406: checking for MS-Windows" >&5
+echo "configure:6348: checking for MS-Windows" >&5
echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:6409: checking for main in -lgdi32" >&5
+echo "configure:6351: checking for main in -lgdi32" >&5
ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgdi32 "
cat > conftest.$ac_ext <<EOF
-#line 6414 "configure"
+#line 6356 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6363: \"$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
fi
fi
cat > conftest.$ac_ext <<EOF
-#line 6487 "configure"
+#line 6429 "configure"
#include "confdefs.h"
#include <fcntl.h>
int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
EOF
-if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6434: \"$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
esac
echo "checking for WM_COMMAND option" 1>&6
-echo "configure:6567: checking for WM_COMMAND option" >&5;
+echo "configure:6509: checking for WM_COMMAND option" >&5;
if test "$with_wmcommand" != "no"; then
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_WMCOMMAND
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:6582: checking for X11/Xauth.h" >&5
+echo "configure:6524: checking for X11/Xauth.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6585 "configure"
+#line 6527 "configure"
#include "confdefs.h"
#include <X11/Xauth.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6532: \"$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*
}
test -z "$with_xauth" && {
echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:6613: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:6555: checking for XauGetAuthByAddr in -lXau" >&5
ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXau "
cat > conftest.$ac_ext <<EOF
-#line 6618 "configure"
+#line 6560 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XauGetAuthByAddr()
; return 0; }
EOF
-if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6571: \"$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
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:6674: checking for ${dir}tt_c.h" >&5
+echo "configure:6616: checking for ${dir}tt_c.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6677 "configure"
+#line 6619 "configure"
#include "confdefs.h"
#include <${dir}tt_c.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6624: \"$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*
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:6718: checking "$xe_msg_checking"" >&5
+echo "configure:6660: 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 <<EOF
-#line 6723 "configure"
+#line 6665 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tt_message_create()
; return 0; }
EOF
-if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6676: \"$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
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:6791: checking for Dt/Dt.h" >&5
+echo "configure:6733: checking for Dt/Dt.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6794 "configure"
+#line 6736 "configure"
#include "confdefs.h"
#include <Dt/Dt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6741: \"$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*
}
test -z "$with_cde" && {
echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:6822: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:6764: checking for DtDndDragStart in -lDtSvc" >&5
ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
xe_check_libs=" -lDtSvc "
cat > conftest.$ac_ext <<EOF
-#line 6827 "configure"
+#line 6769 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
DtDndDragStart()
; return 0; }
EOF
-if { (eval echo configure:6838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6780: \"$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
fi
echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
-echo "configure:6907: checking if drag and drop API is needed" >&5
+echo "configure:6849: checking if drag and drop API is needed" >&5
if test "$with_dragndrop" != "no" ; then
if test -n "$dragndrop_proto" ; then
with_dragndrop=yes
fi
echo "checking for LDAP" 1>&6
-echo "configure:6928: checking for LDAP" >&5
+echo "configure:6870: 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:6931: checking for ldap.h" >&5
+echo "configure:6873: checking for ldap.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6934 "configure"
+#line 6876 "configure"
#include "confdefs.h"
#include <ldap.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6881: \"$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*
}
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:6962: checking for lber.h" >&5
+echo "configure:6904: checking for lber.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6965 "configure"
+#line 6907 "configure"
#include "confdefs.h"
#include <lber.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6912: \"$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*
if test "$with_ldap" != "no"; then
echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
-echo "configure:6994: checking for ldap_search in -lldap" >&5
+echo "configure:6936: 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 <<EOF
-#line 6999 "configure"
+#line 6941 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_search()
; return 0; }
EOF
-if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6952: \"$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
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:7035: checking "$xe_msg_checking"" >&5
+echo "configure:6977: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lldap -llber"
cat > conftest.$ac_ext <<EOF
-#line 7040 "configure"
+#line 6982 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6993: \"$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
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:7076: checking "$xe_msg_checking"" >&5
+echo "configure:7018: 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 <<EOF
-#line 7081 "configure"
+#line 7023 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7034: \"$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
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:7117: checking "$xe_msg_checking"" >&5
+echo "configure:7059: 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 <<EOF
-#line 7122 "configure"
+#line 7064 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7075: \"$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
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:7184: checking for $ac_func" >&5
+echo "configure:7126: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 7187 "configure"
+#line 7129 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:7210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7152: \"$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
fi
echo "checking for PostgreSQL" 1>&6
-echo "configure:7240: checking for PostgreSQL" >&5
+echo "configure:7182: checking for PostgreSQL" >&5
postgres_h_path=""
postgres_includes_found=no
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:7248: checking for libpq-fe.h" >&5
+echo "configure:7190: checking for libpq-fe.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7251 "configure"
+#line 7193 "configure"
#include "confdefs.h"
#include <libpq-fe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7198: \"$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*
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:7283: checking for libpq-fe.h" >&5
+echo "configure:7225: checking for libpq-fe.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7286 "configure"
+#line 7228 "configure"
#include "confdefs.h"
#include <libpq-fe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7233: \"$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*
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:7321: checking for libpq-fe.h" >&5
+echo "configure:7263: checking for libpq-fe.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7324 "configure"
+#line 7266 "configure"
#include "confdefs.h"
#include <libpq-fe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7271: \"$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*
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:7359: checking for libpq-fe.h" >&5
+echo "configure:7301: checking for libpq-fe.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7362 "configure"
+#line 7304 "configure"
#include "confdefs.h"
#include <libpq-fe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7309: \"$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*
if test "$postgres_includes_found" = "yes"; then
echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
-echo "configure:7396: checking for PQconnectdb in -lpq" >&5
+echo "configure:7338: checking for PQconnectdb in -lpq" >&5
ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
xe_check_libs=" -lpq "
cat > conftest.$ac_ext <<EOF
-#line 7401 "configure"
+#line 7343 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
PQconnectdb()
; return 0; }
EOF
-if { (eval echo configure:7412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7354: \"$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
if test "$with_postgresql" = "yes"; then
echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
-echo "configure:7437: checking for PQconnectStart in -lpq" >&5
+echo "configure:7379: checking for PQconnectStart in -lpq" >&5
ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
xe_check_libs=" -lpq "
cat > conftest.$ac_ext <<EOF
-#line 7442 "configure"
+#line 7384 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
PQconnectStart()
; return 0; }
EOF
-if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7395: \"$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
if test "$window_system" != "none"; then
echo "checking for graphics libraries" 1>&6
-echo "configure:7513: checking for graphics libraries" >&5
+echo "configure:7455: 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:7518: checking for Xpm - no older than 3.4f" >&5
+echo "configure:7460: checking for Xpm - no older than 3.4f" >&5
xe_check_libs=-lXpm
cat > conftest.$ac_ext <<EOF
-#line 7521 "configure"
+#line 7463 "configure"
#include "confdefs.h"
#define XPM_NUMBERS
#include <X11/xpm.h>
XpmIncludeVersion != XpmLibraryVersion() ? 1 :
XpmIncludeVersion < 30406 ? 2 : 0 ;}
EOF
-if { (eval echo configure:7530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7472: \"$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
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:7572: checking for \"FOR_MSW\" xpm" >&5
+echo "configure:7514: checking for \"FOR_MSW\" xpm" >&5
xe_check_libs=-lXpm
cat > conftest.$ac_ext <<EOF
-#line 7575 "configure"
+#line 7517 "configure"
#include "confdefs.h"
int main() {
XpmCreatePixmapFromData()
; return 0; }
EOF
-if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
xpm_for_msw=no
else
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:7608: checking for compface.h" >&5
+echo "configure:7550: checking for compface.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7611 "configure"
+#line 7553 "configure"
#include "confdefs.h"
#include <compface.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7558: \"$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*
}
test -z "$with_xface" && {
echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:7639: checking for UnGenFace in -lcompface" >&5
+echo "configure:7581: checking for UnGenFace in -lcompface" >&5
ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcompface "
cat > conftest.$ac_ext <<EOF
-#line 7644 "configure"
+#line 7586 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
UnGenFace()
; return 0; }
EOF
-if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7597: \"$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
if test "$with_png $with_tiff" != "no no"; then
echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
-echo "configure:7707: checking for inflate in -lc" >&5
+echo "configure:7649: checking for inflate in -lc" >&5
ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
xe_check_libs=" -lc "
cat > conftest.$ac_ext <<EOF
-#line 7712 "configure"
+#line 7654 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inflate()
; return 0; }
EOF
-if { (eval echo configure:7723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7665: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
-echo "configure:7742: checking for inflate in -lz" >&5
+echo "configure:7684: checking for inflate in -lz" >&5
ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
xe_check_libs=" -lz "
cat > conftest.$ac_ext <<EOF
-#line 7747 "configure"
+#line 7689 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inflate()
; return 0; }
EOF
-if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7700: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
-echo "configure:7777: checking for inflate in -lgz" >&5
+echo "configure:7719: checking for inflate in -lgz" >&5
ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgz "
cat > conftest.$ac_ext <<EOF
-#line 7782 "configure"
+#line 7724 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inflate()
; return 0; }
EOF
-if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7735: \"$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
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:7823: checking for jpeglib.h" >&5
+echo "configure:7765: checking for jpeglib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7826 "configure"
+#line 7768 "configure"
#include "confdefs.h"
#include <jpeglib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7773: \"$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*
}
test -z "$with_jpeg" && {
echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:7854: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:7796: 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 <<EOF
-#line 7859 "configure"
+#line 7801 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jpeg_destroy_decompress()
; return 0; }
EOF
-if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7812: \"$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
png_problem=""
test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:7906: checking for pow" >&5
+echo "configure:7848: checking for pow" >&5
cat > conftest.$ac_ext <<EOF
-#line 7909 "configure"
+#line 7851 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pow(); below. */
; return 0; }
EOF
-if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7874: \"$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
}
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:7953: checking for png.h" >&5
+echo "configure:7895: checking for png.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7956 "configure"
+#line 7898 "configure"
#include "confdefs.h"
#include <png.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7903: \"$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*
}
test -z "$with_png" && {
echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
-echo "configure:7984: checking for png_read_image in -lpng" >&5
+echo "configure:7926: 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 <<EOF
-#line 7989 "configure"
+#line 7931 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
png_read_image()
; return 0; }
EOF
-if { (eval echo configure:8000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7942: \"$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
}
if test -z "$with_png"; then
echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
-echo "configure:8023: checking for workable png version information" >&5
+echo "configure:7965: checking for workable png version information" >&5
xe_check_libs="-lpng -lz"
cat > conftest.$ac_ext <<EOF
-#line 8026 "configure"
+#line 7968 "configure"
#include "confdefs.h"
#include <png.h>
int main(int c, char **v) {
if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
EOF
-if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7976: \"$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
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:8077: checking for tiffio.h" >&5
+echo "configure:8019: checking for tiffio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8080 "configure"
+#line 8022 "configure"
#include "confdefs.h"
#include <tiffio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8027: \"$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*
}
test -z "$with_tiff" && {
echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8108: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:8050: checking for TIFFClientOpen in -ltiff" >&5
ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
xe_check_libs=" -ltiff "
cat > conftest.$ac_ext <<EOF
-#line 8113 "configure"
+#line 8055 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
TIFFClientOpen()
; return 0; }
EOF
-if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8066: \"$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
if test "$with_x11" = "yes"; then
echo "checking for X11 graphics libraries" 1>&6
-echo "configure:8163: checking for X11 graphics libraries" >&5
+echo "configure:8105: checking for X11 graphics libraries" >&5
echo "checking for the Athena widgets" 1>&6
-echo "configure:8166: checking for the Athena widgets" >&5
+echo "configure:8108: checking for the Athena widgets" >&5
case "$with_athena" in
"xaw" | "") athena_variant=Xaw athena_3d=no ;;
if test "$athena_3d" = "no"; then
echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:8180: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
+echo "configure:8122: 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 <<EOF
-#line 8185 "configure"
+#line 8127 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XawScrollbarSetThumb()
; return 0; }
EOF
-if { (eval echo configure:8196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8138: \"$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
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:8212: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8154: 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 <<EOF
-#line 8217 "configure"
+#line 8159 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8170: \"$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
else
echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:8259: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8201: 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 <<EOF
-#line 8264 "configure"
+#line 8206 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:8275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8217: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
-echo "configure:8293: checking for threeDClassRec in -lXaw" >&5
+echo "configure:8235: checking for threeDClassRec in -lXaw" >&5
ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXaw "
cat > conftest.$ac_ext <<EOF
-#line 8298 "configure"
+#line 8240 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8251: \"$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
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:8340: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8282: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8343 "configure"
+#line 8285 "configure"
#include "confdefs.h"
#include <X11/Xaw/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8290: \"$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*
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:8368: checking for X11/Xaw/XawInit.h" >&5
+echo "configure:8310: checking for X11/Xaw/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8371 "configure"
+#line 8313 "configure"
#include "confdefs.h"
#include <X11/Xaw/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8318: \"$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*
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:8402: checking for X11/$athena_variant/XawInit.h" >&5
+echo "configure:8344: checking for X11/$athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8405 "configure"
+#line 8347 "configure"
#include "confdefs.h"
#include <X11/$athena_variant/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8352: \"$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*
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:8427: checking for X11/$athena_variant/ThreeD.h" >&5
+echo "configure:8369: checking for X11/$athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8430 "configure"
+#line 8372 "configure"
#include "confdefs.h"
#include <X11/$athena_variant/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8377: \"$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*
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:8463: checking for $athena_variant/XawInit.h" >&5
+echo "configure:8405: checking for $athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8466 "configure"
+#line 8408 "configure"
#include "confdefs.h"
#include <$athena_variant/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8413: \"$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*
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:8488: checking for $athena_variant/ThreeD.h" >&5
+echo "configure:8430: checking for $athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8491 "configure"
+#line 8433 "configure"
#include "confdefs.h"
#include <$athena_variant/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8438: \"$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*
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:8525: checking for X11/Xaw3d/XawInit.h" >&5
+echo "configure:8467: checking for X11/Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8528 "configure"
+#line 8470 "configure"
#include "confdefs.h"
#include <X11/Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8475: \"$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*
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:8550: checking for X11/Xaw3d/ThreeD.h" >&5
+echo "configure:8492: checking for X11/Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8553 "configure"
+#line 8495 "configure"
#include "confdefs.h"
#include <X11/Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8500: \"$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*
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:8590: checking for Xaw3d/XawInit.h" >&5
+echo "configure:8532: checking for Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8593 "configure"
+#line 8535 "configure"
#include "confdefs.h"
#include <Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8540: \"$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*
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:8615: checking for Xaw3d/ThreeD.h" >&5
+echo "configure:8557: checking for Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8618 "configure"
+#line 8560 "configure"
#include "confdefs.h"
#include <Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8565: \"$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*
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:8655: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8597: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8658 "configure"
+#line 8600 "configure"
#include "confdefs.h"
#include <X11/Xaw/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8605: \"$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*
ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:8698: checking for Xm/Xm.h" >&5
+echo "configure:8640: checking for Xm/Xm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8701 "configure"
+#line 8643 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8648: \"$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*
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:8723: checking for XmStringFree in -lXm" >&5
+echo "configure:8665: checking for XmStringFree in -lXm" >&5
ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXm "
cat > conftest.$ac_ext <<EOF
-#line 8728 "configure"
+#line 8670 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmStringFree()
; return 0; }
EOF
-if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8681: \"$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
if test "$have_motif" = "yes"; then
echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
-echo "configure:8768: checking for Lesstif" >&5
+echo "configure:8710: checking for Lesstif" >&5
cat > conftest.$ac_ext <<EOF
-#line 8770 "configure"
+#line 8712 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
#ifdef LESSTIF_VERSION
if test "$with_mule" = "yes" ; then
echo "checking for Mule-related features" 1>&6
-echo "configure:9103: checking for Mule-related features" >&5
+echo "configure:9045: checking for Mule-related features" >&5
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining MULE
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9144: checking for $ac_hdr" >&5
+echo "configure:9086: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 9147 "configure"
+#line 9089 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9094: \"$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*
echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:9183: checking for strerror in -lintl" >&5
+echo "configure:9125: checking for strerror in -lintl" >&5
ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
xe_check_libs=" -lintl "
cat > conftest.$ac_ext <<EOF
-#line 9188 "configure"
+#line 9130 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
strerror()
; return 0; }
EOF
-if { (eval echo configure:9199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9141: \"$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
fi
echo "checking for Mule input methods" 1>&6
-echo "configure:9251: checking for Mule input methods" >&5
+echo "configure:9193: checking for Mule input methods" >&5
case "$with_xim" in "" | "yes" )
echo "checking for XIM" 1>&6
-echo "configure:9254: checking for XIM" >&5
+echo "configure:9196: checking for XIM" >&5
echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:9257: checking for XOpenIM in -lX11" >&5
+echo "configure:9199: checking for XOpenIM in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
xe_check_libs=" -lX11 "
cat > conftest.$ac_ext <<EOF
-#line 9262 "configure"
+#line 9204 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XOpenIM()
; return 0; }
EOF
-if { (eval echo configure:9273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9215: \"$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
if test "$have_motif $have_lesstif" = "yes no"; then
echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:9297: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:9239: checking for XmImMbLookupString in -lXm" >&5
ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXm "
cat > conftest.$ac_ext <<EOF
-#line 9302 "configure"
+#line 9244 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmImMbLookupString()
; return 0; }
EOF
-if { (eval echo configure:9313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9255: \"$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
if test "$with_xfs" = "yes" ; then
echo "checking for XFontSet" 1>&6
-echo "configure:9378: checking for XFontSet" >&5
+echo "configure:9320: checking for XFontSet" >&5
echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:9381: checking for XmbDrawString in -lX11" >&5
+echo "configure:9323: checking for XmbDrawString in -lX11" >&5
ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
xe_check_libs=" -lX11 "
cat > conftest.$ac_ext <<EOF
-#line 9386 "configure"
+#line 9328 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XmbDrawString()
; return 0; }
EOF
-if { (eval echo configure:9397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9339: \"$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
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:9437: checking for wnn/jllib.h" >&5
+echo "configure:9379: checking for wnn/jllib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9440 "configure"
+#line 9382 "configure"
#include "confdefs.h"
#include <wnn/jllib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9387: \"$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*
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9470: checking for $ac_func" >&5
+echo "configure:9412: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9473 "configure"
+#line 9415 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:9496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9438: \"$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
test "$ac_cv_func_crypt" != "yes" && {
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:9525: checking for crypt in -lcrypt" >&5
+echo "configure:9467: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcrypt "
cat > conftest.$ac_ext <<EOF
-#line 9530 "configure"
+#line 9472 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:9541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9483: \"$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
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:9576: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:9518: checking for jl_dic_list_e in -lwnn" >&5
ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
xe_check_libs=" -lwnn "
cat > conftest.$ac_ext <<EOF
-#line 9581 "configure"
+#line 9523 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9534: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
-echo "configure:9610: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:9552: 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 <<EOF
-#line 9615 "configure"
+#line 9557 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9568: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
-echo "configure:9644: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:9586: 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 <<EOF
-#line 9649 "configure"
+#line 9591 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:9660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9602: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
-echo "configure:9678: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:9620: 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 <<EOF
-#line 9683 "configure"
+#line 9625 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:9694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9636: \"$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
if test "$with_wnn6" != "no"; then
echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
-echo "configure:9742: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:9684: 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 <<EOF
-#line 9747 "configure"
+#line 9689 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jl_fi_dic_list()
; return 0; }
EOF
-if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9700: \"$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
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:9793: checking for canna/jrkanji.h" >&5
+echo "configure:9735: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9796 "configure"
+#line 9738 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9743: \"$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*
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:9828: checking for canna/jrkanji.h" >&5
+echo "configure:9770: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9831 "configure"
+#line 9773 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9778: \"$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*
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:9864: checking for canna/RK.h" >&5
+echo "configure:9806: checking for canna/RK.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9867 "configure"
+#line 9809 "configure"
#include "confdefs.h"
#include <canna/RK.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9814: \"$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*
}
test -z "$with_canna" && {
echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:9895: checking for RkBgnBun in -lRKC" >&5
+echo "configure:9837: checking for RkBgnBun in -lRKC" >&5
ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
xe_check_libs=" -lRKC "
cat > conftest.$ac_ext <<EOF
-#line 9900 "configure"
+#line 9842 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
RkBgnBun()
; return 0; }
EOF
-if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9853: \"$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
}
test -z "$with_canna" && {
echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:9934: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:9876: checking for jrKanjiControl in -lcanna" >&5
ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcanna "
cat > conftest.$ac_ext <<EOF
-#line 9939 "configure"
+#line 9881 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
jrKanjiControl()
; return 0; }
EOF
-if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9892: \"$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
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:9999: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:9941: checking for layout_object_getvalue in -li18n" >&5
ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
xe_check_libs=" -li18n "
cat > conftest.$ac_ext <<EOF
-#line 10004 "configure"
+#line 9946 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
layout_object_getvalue()
; return 0; }
EOF
-if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9957: \"$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
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:10101: checking for $ac_func" >&5
+echo "configure:10043: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10104 "configure"
+#line 10046 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10069: \"$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
for ac_func in getloadavg
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10162: checking for $ac_func" >&5
+echo "configure:10104: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10165 "configure"
+#line 10107 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10130: \"$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
echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:10224: checking for kstat_open in -lkstat" >&5
+echo "configure:10166: 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 <<EOF
-#line 10229 "configure"
+#line 10171 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
kstat_open()
; return 0; }
EOF
-if { (eval echo configure:10240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10182: \"$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
echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:10274: checking for kvm_read in -lkvm" >&5
+echo "configure:10216: 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 <<EOF
-#line 10279 "configure"
+#line 10221 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
kvm_read()
; return 0; }
EOF
-if { (eval echo configure:10290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10232: \"$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
fi
echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:10324: checking whether netdb declares h_errno" >&5
+echo "configure:10266: checking whether netdb declares h_errno" >&5
cat > conftest.$ac_ext <<EOF
-#line 10326 "configure"
+#line 10268 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
return h_errno;
; return 0; }
EOF
-if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10275: \"$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
rm -f conftest*
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:10353: checking for sigsetjmp" >&5
+echo "configure:10295: checking for sigsetjmp" >&5
cat > conftest.$ac_ext <<EOF
-#line 10355 "configure"
+#line 10297 "configure"
#include "confdefs.h"
#include <setjmp.h>
int main() {
sigjmp_buf bar; sigsetjmp (bar, 0);
; return 0; }
EOF
-if { (eval echo configure:10362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10304: \"$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
rm -f conftest*
echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:10382: checking whether localtime caches TZ" >&5
+echo "configure:10324: checking whether localtime caches TZ" >&5
if test "$ac_cv_func_tzset" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 10386 "configure"
+#line 10328 "configure"
#include "confdefs.h"
#include <time.h>
#if STDC_HEADERS
exit (0);
}
EOF
-if { (eval echo configure:10421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
emacs_cv_localtime_cache=no
else
if test "$HAVE_TIMEVAL" = "yes"; then
echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
-echo "configure:10451: checking whether gettimeofday accepts one or two arguments" >&5
+echo "configure:10393: checking whether gettimeofday accepts one or two arguments" >&5
cat > conftest.$ac_ext <<EOF
-#line 10453 "configure"
+#line 10395 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
; return 0; }
EOF
-if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10416: \"$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
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:10496: checking for inline" >&5
+echo "configure:10438: checking for inline" >&5
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 10501 "configure"
+#line 10443 "configure"
#include "confdefs.h"
int main() {
} int $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:10508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
# 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:10548: checking for working alloca.h" >&5
+echo "configure:10490: checking for working alloca.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10551 "configure"
+#line 10493 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
void *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:10558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10500: \"$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
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:10582: checking for alloca" >&5
+echo "configure:10524: checking for alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 10585 "configure"
+#line 10527 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10555: \"$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
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:10652: checking whether alloca needs Cray hooks" >&5
+echo "configure:10594: checking whether alloca needs Cray hooks" >&5
cat > conftest.$ac_ext <<EOF
-#line 10655 "configure"
+#line 10597 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:10679: checking for $ac_func" >&5
+echo "configure:10621: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10682 "configure"
+#line 10624 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10647: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:10735: checking stack direction for C alloca" >&5
+echo "configure:10677: checking stack direction for C alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 10738 "configure"
+#line 10680 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_c_stack_direction=1
else
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:10786: checking for vfork.h" >&5
+echo "configure:10728: checking for vfork.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10789 "configure"
+#line 10731 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10736: \"$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*
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:10822: checking for working vfork" >&5
+echo "configure:10764: checking for working vfork" >&5
cat > conftest.$ac_ext <<EOF
-#line 10825 "configure"
+#line 10767 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
}
}
EOF
-if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_func_vfork_works=yes
else
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:10946: checking for working strcoll" >&5
+echo "configure:10888: checking for working strcoll" >&5
cat > conftest.$ac_ext <<EOF
-#line 10949 "configure"
+#line 10891 "configure"
#include "confdefs.h"
#include <string.h>
main ()
strcoll ("123", "456") >= 0);
}
EOF
-if { (eval echo configure:10959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_func_strcoll_works=yes
else
for ac_func in getpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10987: checking for $ac_func" >&5
+echo "configure:10929: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10990 "configure"
+#line 10932 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10955: \"$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
done
echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:11041: checking whether getpgrp takes no argument" >&5
+echo "configure:10983: checking whether getpgrp takes no argument" >&5
cat > conftest.$ac_ext <<EOF
-#line 11044 "configure"
+#line 10986 "configure"
#include "confdefs.h"
/*
}
EOF
-if { (eval echo configure:11099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_func_getpgrp_void=yes
else
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:11126: checking for working mmap" >&5
+echo "configure:11068: checking for working mmap" >&5
case "$opsys" in ultrix* ) have_mmap=no ;; *)
cat > conftest.$ac_ext <<EOF
-#line 11129 "configure"
+#line 11071 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <unistd.h>
return 1;
}
EOF
-if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
have_mmap=yes
else
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:11188: checking for M_MMAP_THRESHOLD" >&5
+echo "configure:11130: checking for M_MMAP_THRESHOLD" >&5
cat > conftest.$ac_ext <<EOF
-#line 11190 "configure"
+#line 11132 "configure"
#include "confdefs.h"
#include <malloc.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:11202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rel_alloc=no; echo "$ac_t""yes" 1>&6;
else
ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:11227: checking for termios.h" >&5
+echo "configure:11169: checking for termios.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11230 "configure"
+#line 11172 "configure"
#include "confdefs.h"
#include <termios.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11177: \"$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*
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:11278: checking for termio.h" >&5
+echo "configure:11220: checking for termio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11281 "configure"
+#line 11223 "configure"
#include "confdefs.h"
#include <termio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11228: \"$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*
echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:11318: checking for socket" >&5
+echo "configure:11260: checking for socket" >&5
cat > conftest.$ac_ext <<EOF
-#line 11321 "configure"
+#line 11263 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char socket(); below. */
; return 0; }
EOF
-if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11286: \"$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
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:11359: checking for netinet/in.h" >&5
+echo "configure:11301: checking for netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11362 "configure"
+#line 11304 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11309: \"$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*
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:11384: checking for arpa/inet.h" >&5
+echo "configure:11326: checking for arpa/inet.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11387 "configure"
+#line 11329 "configure"
#include "confdefs.h"
#include <arpa/inet.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11334: \"$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*
}
echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:11417: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:11359: checking "for sun_len member in struct sockaddr_un"" >&5
cat > conftest.$ac_ext <<EOF
-#line 11419 "configure"
+#line 11361 "configure"
#include "confdefs.h"
#include <sys/types.h>
static struct sockaddr_un x; x.sun_len = 1;
; return 0; }
EOF
-if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11372: \"$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
fi
rm -f conftest*
echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
-echo "configure:11448: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:11390: checking "for ip_mreq struct in netinet/in.h"" >&5
cat > conftest.$ac_ext <<EOF
-#line 11450 "configure"
+#line 11392 "configure"
#include "confdefs.h"
#include <sys/types.h>
static struct ip_mreq x;
; return 0; }
EOF
-if { (eval echo configure:11460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11402: \"$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
echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:11491: checking for msgget" >&5
+echo "configure:11433: checking for msgget" >&5
cat > conftest.$ac_ext <<EOF
-#line 11494 "configure"
+#line 11436 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char msgget(); below. */
; return 0; }
EOF
-if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11459: \"$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
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:11532: checking for sys/ipc.h" >&5
+echo "configure:11474: checking for sys/ipc.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11535 "configure"
+#line 11477 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11482: \"$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*
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:11557: checking for sys/msg.h" >&5
+echo "configure:11499: checking for sys/msg.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11560 "configure"
+#line 11502 "configure"
#include "confdefs.h"
#include <sys/msg.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11507: \"$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*
ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:11603: checking for dirent.h" >&5
+echo "configure:11545: checking for dirent.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11606 "configure"
+#line 11548 "configure"
#include "confdefs.h"
#include <dirent.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11553: \"$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*
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:11638: checking for sys/dir.h" >&5
+echo "configure:11580: checking for sys/dir.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11641 "configure"
+#line 11583 "configure"
#include "confdefs.h"
#include <sys/dir.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11588: \"$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*
ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:11679: checking for nlist.h" >&5
+echo "configure:11621: checking for nlist.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11682 "configure"
+#line 11624 "configure"
#include "confdefs.h"
#include <nlist.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11629: \"$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*
echo "checking "for sound support"" 1>&6
-echo "configure:11717: checking "for sound support"" >&5
+echo "configure:11659: 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:11724: checking for multimedia/audio_device.h" >&5
+echo "configure:11666: checking for multimedia/audio_device.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11727 "configure"
+#line 11669 "configure"
#include "confdefs.h"
#include <multimedia/audio_device.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11674: \"$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*
if test -z "$native_sound_lib"; then
echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:11780: checking for ALopenport in -laudio" >&5
+echo "configure:11722: checking for ALopenport in -laudio" >&5
ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
xe_check_libs=" -laudio "
cat > conftest.$ac_ext <<EOF
-#line 11785 "configure"
+#line 11727 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ALopenport()
; return 0; }
EOF
-if { (eval echo configure:11796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11738: \"$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
if test -z "$native_sound_lib"; then
echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:11827: checking for AOpenAudio in -lAlib" >&5
+echo "configure:11769: checking for AOpenAudio in -lAlib" >&5
ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
xe_check_libs=" -lAlib "
cat > conftest.$ac_ext <<EOF
-#line 11832 "configure"
+#line 11774 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
AOpenAudio()
; return 0; }
EOF
-if { (eval echo configure:11843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11785: \"$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
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:11881: checking for ${dir}/soundcard.h" >&5
+echo "configure:11823: checking for ${dir}/soundcard.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11884 "configure"
+#line 11826 "configure"
#include "confdefs.h"
#include <${dir}/soundcard.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11831: \"$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*
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:11943: checking for audio/audiolib.h" >&5
+echo "configure:11885: checking for audio/audiolib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11946 "configure"
+#line 11888 "configure"
#include "confdefs.h"
#include <audio/audiolib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11893: \"$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*
echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
-echo "configure:11969: checking for AuOpenServer in -laudio" >&5
+echo "configure:11911: checking for AuOpenServer in -laudio" >&5
ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
xe_check_libs=" -laudio "
cat > conftest.$ac_ext <<EOF
-#line 11974 "configure"
+#line 11916 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
AuOpenServer()
; return 0; }
EOF
-if { (eval echo configure:11985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11927: \"$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
fi
libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi
cat > conftest.$ac_ext <<EOF
-#line 12024 "configure"
+#line 11966 "configure"
#include "confdefs.h"
#include <audio/Xtutil.h>
EOF
# 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:12055: checking for $ac_word" >&5
+echo "configure:11997: 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.
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:12084: checking for esd_play_stream" >&5
+echo "configure:12026: checking for esd_play_stream" >&5
cat > conftest.$ac_ext <<EOF
-#line 12087 "configure"
+#line 12029 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char esd_play_stream(); below. */
; return 0; }
EOF
-if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12052: \"$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
if test "$with_tty" = "yes" ; then
echo "checking for TTY-related features" 1>&6
-echo "configure:12161: checking for TTY-related features" >&5
+echo "configure:12103: checking for TTY-related features" >&5
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_TTY
EOF
if test -z "$with_ncurses"; then
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:12177: checking for tgetent in -lncurses" >&5
+echo "configure:12119: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -lncurses "
cat > conftest.$ac_ext <<EOF
-#line 12182 "configure"
+#line 12124 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12135: \"$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
ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:12226: checking for ncurses/curses.h" >&5
+echo "configure:12168: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12229 "configure"
+#line 12171 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12176: \"$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*
ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:12256: checking for ncurses/term.h" >&5
+echo "configure:12198: checking for ncurses/term.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12259 "configure"
+#line 12201 "configure"
#include "confdefs.h"
#include <ncurses/term.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12206: \"$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*
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:12294: checking for ncurses/curses.h" >&5
+echo "configure:12236: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12297 "configure"
+#line 12239 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12244: \"$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*
for lib in curses termlib termcap; do
echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:12337: checking for tgetent in -l$lib" >&5
+echo "configure:12279: checking for tgetent in -l$lib" >&5
ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -l$lib "
cat > conftest.$ac_ext <<EOF
-#line 12342 "configure"
+#line 12284 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:12353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12295: \"$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
else
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:12384: checking for tgetent in -lcurses" >&5
+echo "configure:12326: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcurses "
cat > conftest.$ac_ext <<EOF
-#line 12389 "configure"
+#line 12331 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:12400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12342: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:12418: checking for tgetent in -ltermcap" >&5
+echo "configure:12360: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -ltermcap "
cat > conftest.$ac_ext <<EOF
-#line 12423 "configure"
+#line 12365 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:12434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12376: \"$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
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:12482: checking for gpm.h" >&5
+echo "configure:12424: checking for gpm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12485 "configure"
+#line 12427 "configure"
#include "confdefs.h"
#include <gpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12432: \"$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*
}
test -z "$with_gpm" && {
echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:12513: checking for Gpm_Open in -lgpm" >&5
+echo "configure:12455: checking for Gpm_Open in -lgpm" >&5
ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgpm "
cat > conftest.$ac_ext <<EOF
-#line 12518 "configure"
+#line 12460 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
Gpm_Open()
; return 0; }
EOF
-if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12471: \"$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
test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
!= "no no no" && echo "checking for database support" 1>&6
-echo "configure:12579: checking for database support" >&5
+echo "configure:12521: 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:12584: checking for ndbm.h" >&5
+echo "configure:12526: checking for ndbm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12587 "configure"
+#line 12529 "configure"
#include "confdefs.h"
#include <ndbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12534: \"$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*
if test "$with_database_gdbm" != "no"; then
echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:12622: checking for dbm_open in -lgdbm" >&5
+echo "configure:12564: checking for dbm_open in -lgdbm" >&5
ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgdbm "
cat > conftest.$ac_ext <<EOF
-#line 12627 "configure"
+#line 12569 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12580: \"$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
if test "$with_database_dbm" != "no"; then
echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:12666: checking for dbm_open" >&5
+echo "configure:12608: checking for dbm_open" >&5
cat > conftest.$ac_ext <<EOF
-#line 12669 "configure"
+#line 12611 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dbm_open(); below. */
; return 0; }
EOF
-if { (eval echo configure:12692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12634: \"$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
echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:12711: checking for dbm_open in -ldbm" >&5
+echo "configure:12653: checking for dbm_open in -ldbm" >&5
ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -ldbm "
cat > conftest.$ac_ext <<EOF
-#line 12716 "configure"
+#line 12658 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12669: \"$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
if test "$with_database_berkdb" != "no"; then
echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:12768: checking for Berkeley db.h" >&5
+echo "configure:12710: checking for Berkeley db.h" >&5
for header in "db/db.h" "db.h"; do
cat > conftest.$ac_ext <<EOF
-#line 12771 "configure"
+#line 12713 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:12793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
db_h_file="$header"; break
else
if test "$with_database_berkdb" != "no"; then
echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
-echo "configure:12809: checking for Berkeley DB version" >&5
+echo "configure:12751: checking for Berkeley DB version" >&5
cat > conftest.$ac_ext <<EOF
-#line 12811 "configure"
+#line 12753 "configure"
#include "confdefs.h"
#include <$db_h_file>
#if DB_VERSION_MAJOR > 1
rm -f conftest*
echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:12830: checking for $dbfunc" >&5
+echo "configure:12772: checking for $dbfunc" >&5
cat > conftest.$ac_ext <<EOF
-#line 12833 "configure"
+#line 12775 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $dbfunc(); below. */
; return 0; }
EOF
-if { (eval echo configure:12856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12798: \"$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
echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:12875: checking for $dbfunc in -ldb" >&5
+echo "configure:12817: checking for $dbfunc in -ldb" >&5
ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
xe_check_libs=" -ldb "
cat > conftest.$ac_ext <<EOF
-#line 12880 "configure"
+#line 12822 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
$dbfunc()
; return 0; }
EOF
-if { (eval echo configure:12891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12833: \"$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
if test "$with_socks" = "yes"; then
echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:12955: checking for SOCKSinit in -lsocks" >&5
+echo "configure:12897: checking for SOCKSinit in -lsocks" >&5
ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
xe_check_libs=" -lsocks "
cat > conftest.$ac_ext <<EOF
-#line 12960 "configure"
+#line 12902 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
SOCKSinit()
; return 0; }
EOF
-if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12913: \"$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
if test "$with_modules" != "no"; then
echo "checking for module support" 1>&6
-echo "configure:13026: checking for module support" >&5
+echo "configure:12968: 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:13030: checking for dlfcn.h" >&5
+echo "configure:12972: checking for dlfcn.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 13033 "configure"
+#line 12975 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12980: \"$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*
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:13056: checking for dlopen in -ldl" >&5
+echo "configure:12998: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
xe_check_libs=" -ldl "
cat > conftest.$ac_ext <<EOF
-#line 13061 "configure"
+#line 13003 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:13072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13014: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:13091: checking for dlopen in -lc" >&5
+echo "configure:13033: checking for dlopen in -lc" >&5
ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
xe_check_libs=" -lc "
cat > conftest.$ac_ext <<EOF
-#line 13096 "configure"
+#line 13038 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:13107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13049: \"$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
else
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:13146: checking for shl_load in -ldld" >&5
+echo "configure:13088: 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 <<EOF
-#line 13151 "configure"
+#line 13093 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shl_load()
; return 0; }
EOF
-if { (eval echo configure:13162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13104: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:13189: checking for dld_init in -ldld" >&5
+echo "configure:13131: 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 <<EOF
-#line 13194 "configure"
+#line 13136 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dld_init()
; return 0; }
EOF
-if { (eval echo configure:13205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13147: \"$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
xealias=$internal_configuration
echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:13250: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:13192: checking how to build dynamic libraries for ${xehost}" >&5
# Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
case "$xehost" in
*-*-linux-gnu*) ;;
XEGCC=yes
else
echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:13278: checking checking whether we are using GNU C" >&5
+echo "configure:13220: checking checking whether we are using GNU C" >&5
cat > conftest.$ac_ext <<EOF
-#line 13280 "configure"
+#line 13222 "configure"
#include "confdefs.h"
#ifdef __GNUC__
fi
echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:13302: checking how to produce PIC code" >&5
+echo "configure:13244: checking how to produce PIC code" >&5
wl=
can_build_shared=yes
# 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:13395: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:13337: checking if PIC flag ${dll_cflags} really works" >&5
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $dll_cflags -DPIC"
cat > conftest.$ac_ext <<EOF
-#line 13399 "configure"
+#line 13341 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:13406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13348: \"$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
xldf=
xcldf=
echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
-echo "configure:13437: checking if C compiler can produce shared libraries" >&5
+echo "configure:13379: checking if C compiler can produce shared libraries" >&5
if test "$XEGCC" = yes; then
xcldf="-shared"
xldf="-shared"
xe_libs=
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
cat > conftest.$ac_ext <<EOF
-#line 13488 "configure"
+#line 13430 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:13495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cc_produces_so=yes
else
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:13520: checking for ld used by GCC" >&5
+echo "configure:13462: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
esac
else
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:13545: checking for GNU ld" >&5
+echo "configure:13487: checking for GNU ld" >&5
fi
if test -z "$LTLD"; then
# 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:13583: checking if the linker is GNU ld" >&5
+echo "configure:13525: 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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
xe_gnu_ld=yes
# 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:13611: checking whether the linker supports shared libraries" >&5
+echo "configure:13553: checking whether the linker supports shared libraries" >&5
dll_ld=$CC
dll_ldflags=$LDFLAGS
ld_shlibs=yes
for ac_func in dlerror _dlerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13826: checking for $ac_func" >&5
+echo "configure:13768: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 13829 "configure"
+#line 13771 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:13852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13794: \"$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
fi
cat > conftest.$ac_ext <<EOF
-#line 13891 "configure"
+#line 13833 "configure"
#include "confdefs.h"
int main(int c,char *v[]){return 0;}
EOF
-if { (eval echo configure:13895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
-LOCKDIR=$lockdir
-while true; do
- case "$LOCKDIR" in
- *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
- *) break ;;
- esac
-done
-
-
-
-
DOCDIR=$docdir
while true; do
case "$DOCDIR" in
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."
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
pkgdir='${datadir}/${instvardir}/lisp'
package_path=''
etcdir='${datadir}/${instvardir}/etc'
-lockdir='${statedir}/${inststaticdir}/lock'
archlibdir='${datadir}/${instvardir}/${configuration}'
docdir='${archlibdir}'
with_prefix='yes'
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
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
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],
- 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.
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
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."
! Native Widget translations
! =======================
Emacs*Text*translations: #override\n\
- <Btn1Down>: widget-focus-in()\n
+ <Btn1Down>: widget-focus-in() select-start()\n
! XIM input method style
! =======================
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
\1f
Tag Table:
(Indirect)
Node: Overview\7f230239
Node: Data descriptions\7f230809
Node: Dumping phase\7f232814
-Node: Object inventory\7f233216
-Node: Address allocation\7f236070
-Node: The header\7f237457
-Node: Data dumping\7f237965
-Node: Pointers dumping\7f238626
-Node: Reloading phase\7f239844
-Node: Remaining issues\7f241605
-Node: Events and the Event Loop\7f242566
-Node: Introduction to Events\7f243016
-Node: Main Loop\7f244965
-Node: Specifics of the Event Gathering Mechanism\7f248540
-Node: Specifics About the Emacs Event\7f260993
-Node: The Event Stream Callback Routines\7f261248
-Node: Other Event Loop Functions\7f261493
-Node: Converting Events\7f262633
-Node: Dispatching Events; The Command Builder\7f263242
-Node: Evaluation; Stack Frames; Bindings\7f263477
-Node: Evaluation\7f263819
-Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f270374
-Node: Simple Special Forms\7f272758
-Node: Catch and Throw\7f273541
-Node: Symbols and Variables\7f276116
-Node: Introduction to Symbols\7f276380
-Node: Obarrays\7f277448
-Node: Symbol Values\7f280981
-Node: Buffers and Textual Representation\7f283269
-Node: Introduction to Buffers\7f283927
-Node: The Text in a Buffer\7f286633
-Node: Buffer Lists\7f293783
-Node: Markers and Extents\7f295734
-Node: Bufbytes and Emchars\7f297999
-Node: The Buffer Object\7f298214
-Node: MULE Character Sets and Encodings\7f301694
-Node: Character Sets\7f302756
-Node: Encodings\7f306241
-Node: Japanese EUC (Extended Unix Code)\7f307308
-Node: JIS7\7f308140
-Node: Internal Mule Encodings\7f309490
-Node: Internal String Encoding\7f311320
-Node: Internal Character Encoding\7f313465
-Node: CCL\7f315189
-Node: The Lisp Reader and Compiler\7f321941
-Node: Lstreams\7f322154
-Node: Creating an Lstream\7f323185
-Node: Lstream Types\7f324412
-Node: Lstream Functions\7f324664
-Node: Lstream Methods\7f328230
-Node: Consoles; Devices; Frames; Windows\7f331372
-Node: Introduction to Consoles; Devices; Frames; Windows\7f331687
-Node: Point\7f334220
-Node: Window Hierarchy\7f335499
-Node: The Window Object\7f339947
-Node: The Redisplay Mechanism\7f343384
-Node: Critical Redisplay Sections\7f344176
-Node: Line Start Cache\7f345163
-Node: Redisplay Piece by Piece\7f348399
-Node: Extents\7f350436
-Node: Introduction to Extents\7f350970
-Node: Extent Ordering\7f352112
-Node: Format of the Extent Info\7f353353
-Node: Zero-Length Extents\7f355240
-Node: Mathematics of Extent Ordering\7f356638
-Node: Extent Fragments\7f361395
-Node: Faces\7f362481
-Node: Glyphs\7f362597
-Node: Specifiers\7f365614
-Node: Menus\7f365743
-Node: Subprocesses\7f368001
-Node: Interface to X Windows\7f369977
-Node: Index\7f370148
+Node: Object inventory\7f233217
+Node: Address allocation\7f236071
+Node: The header\7f237458
+Node: Data dumping\7f237966
+Node: Pointers dumping\7f238627
+Node: Reloading phase\7f239845
+Node: Remaining issues\7f241606
+Node: Events and the Event Loop\7f242567
+Node: Introduction to Events\7f243017
+Node: Main Loop\7f244966
+Node: Specifics of the Event Gathering Mechanism\7f248541
+Node: Specifics About the Emacs Event\7f260994
+Node: The Event Stream Callback Routines\7f261249
+Node: Other Event Loop Functions\7f261494
+Node: Converting Events\7f262634
+Node: Dispatching Events; The Command Builder\7f263243
+Node: Evaluation; Stack Frames; Bindings\7f263478
+Node: Evaluation\7f263820
+Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f270375
+Node: Simple Special Forms\7f272759
+Node: Catch and Throw\7f273542
+Node: Symbols and Variables\7f276117
+Node: Introduction to Symbols\7f276381
+Node: Obarrays\7f277449
+Node: Symbol Values\7f280982
+Node: Buffers and Textual Representation\7f283270
+Node: Introduction to Buffers\7f283928
+Node: The Text in a Buffer\7f286634
+Node: Buffer Lists\7f293784
+Node: Markers and Extents\7f295735
+Node: Bufbytes and Emchars\7f298000
+Node: The Buffer Object\7f298215
+Node: MULE Character Sets and Encodings\7f301695
+Node: Character Sets\7f302757
+Node: Encodings\7f306242
+Node: Japanese EUC (Extended Unix Code)\7f307309
+Node: JIS7\7f308141
+Node: Internal Mule Encodings\7f309491
+Node: Internal String Encoding\7f311321
+Node: Internal Character Encoding\7f313466
+Node: CCL\7f315190
+Node: The Lisp Reader and Compiler\7f321942
+Node: Lstreams\7f322155
+Node: Creating an Lstream\7f323186
+Node: Lstream Types\7f324413
+Node: Lstream Functions\7f324665
+Node: Lstream Methods\7f328231
+Node: Consoles; Devices; Frames; Windows\7f331373
+Node: Introduction to Consoles; Devices; Frames; Windows\7f331688
+Node: Point\7f334221
+Node: Window Hierarchy\7f335500
+Node: The Window Object\7f339948
+Node: The Redisplay Mechanism\7f343385
+Node: Critical Redisplay Sections\7f344177
+Node: Line Start Cache\7f345164
+Node: Redisplay Piece by Piece\7f348400
+Node: Extents\7f350437
+Node: Introduction to Extents\7f350971
+Node: Extent Ordering\7f352113
+Node: Format of the Extent Info\7f353354
+Node: Zero-Length Extents\7f355241
+Node: Mathematics of Extent Ordering\7f356639
+Node: Extent Fragments\7f361396
+Node: Faces\7f362482
+Node: Glyphs\7f362598
+Node: Specifiers\7f365615
+Node: Menus\7f365744
+Node: Subprocesses\7f368002
+Node: Interface to X Windows\7f369978
+Node: Index\7f370149
\1f
End Tag Table
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 (`struct Lisp_string') holding the string's
+parts, a fixed-size portion (`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
Dumping phase
=============
- Dumping is done by calling the function pdump() (in alloc.c) which is
-invoked from Fdump_emacs (in emacs.c). This function performs a number
-of tasks.
+ 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.
* Menu:
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
\1f
Tag Table:
(Indirect)
Node: Byte Compilation\7f553728
Node: Speed of Byte-Code\7f555645
Node: Compilation Functions\7f556852
-Node: Docs and Compilation\7f563239
-Node: Dynamic Loading\7f565892
-Node: Eval During Compile\7f568256
-Node: Compiled-Function Objects\7f569521
-Node: Disassembly\7f574319
-Node: Debugging\7f581573
-Node: Debugger\7f582985
-Node: Error Debugging\7f584130
-Node: Infinite Loops\7f586883
-Node: Function Debugging\7f588127
-Node: Explicit Debug\7f590917
-Node: Using Debugger\7f591688
-Node: Debugger Commands\7f593550
-Node: Invoking the Debugger\7f597867
-Node: Internals of Debugger\7f601782
-Node: Syntax Errors\7f606669
-Node: Excess Open\7f607917
-Node: Excess Close\7f609792
-Node: Compilation Errors\7f611213
-Node: Edebug\7f612501
-Node: Using Edebug\7f614609
-Node: Instrumenting\7f617306
-Node: Edebug Execution Modes\7f620795
-Node: Jumping\7f623905
-Node: Edebug Misc\7f626248
-Node: Breakpoints\7f627637
-Node: Global Break Condition\7f630443
-Node: Embedded Breakpoints\7f631398
-Node: Trapping Errors\7f632353
-Node: Edebug Views\7f634429
-Node: Edebug Eval\7f636394
-Node: Eval List\7f637571
-Node: Reading in Edebug\7f640956
-Node: Printing in Edebug\7f641755
-Node: Tracing\7f643470
-Node: Coverage Testing\7f645356
-Node: The Outside Context\7f647397
-Node: Checking Whether to Stop\7f648346
-Node: Edebug Display Update\7f648993
-Node: Edebug Recursive Edit\7f651016
-Node: Instrumenting Macro Calls\7f652671
-Node: Specification List\7f655153
-Node: Backtracking\7f664564
-Node: Debugging Backquote\7f666502
-Node: Specification Examples\7f670208
-Node: Edebug Options\7f672275
-Node: Read and Print\7f677612
-Node: Streams Intro\7f678589
-Node: Input Streams\7f680607
-Node: Input Functions\7f685508
-Node: Output Streams\7f687568
-Node: Output Functions\7f691619
-Node: Output Variables\7f695919
-Node: Minibuffers\7f700718
-Node: Intro to Minibuffers\7f701870
-Node: Text from Minibuffer\7f704058
-Node: Object from Minibuffer\7f709144
-Node: Minibuffer History\7f713239
-Node: Completion\7f716218
-Node: Basic Completion\7f718193
-Node: Minibuffer Completion\7f723222
-Node: Completion Commands\7f726799
-Node: High-Level Completion\7f731456
-Node: Reading File Names\7f736198
-Node: Programmed Completion\7f739890
-Node: Yes-or-No Queries\7f742272
-Node: Multiple Queries\7f748009
-Node: Reading a Password\7f752076
-Node: Minibuffer Misc\7f753413
-Node: Command Loop\7f758283
-Node: Command Overview\7f759627
-Node: Defining Commands\7f762905
-Node: Using Interactive\7f763653
-Node: Interactive Codes\7f768426
-Node: Interactive Examples\7f774218
-Node: Interactive Call\7f775532
-Node: Command Loop Info\7f780933
-Node: Events\7f785912
-Node: Event Types\7f787372
-Node: Event Contents\7f789295
-Node: Event Predicates\7f793771
-Node: Accessing Mouse Event Positions\7f795096
-Node: Frame-Level Event Position Info\7f795795
-Node: Window-Level Event Position Info\7f796835
-Node: Event Text Position Info\7f798599
-Node: Event Glyph Position Info\7f801091
-Node: Event Toolbar Position Info\7f802414
-Node: Other Event Position Info\7f803085
-Node: Accessing Other Event Info\7f803494
-Node: Working With Events\7f805114
-Node: Converting Events\7f811102
-Node: Reading Input\7f814054
-Node: Key Sequence Input\7f815056
-Node: Reading One Event\7f817010
-Node: Dispatching an Event\7f819827
-Node: Quoted Character Input\7f820278
-Node: Peeking and Discarding\7f821626
-Node: Waiting\7f825530
-Node: Quitting\7f827838
-Node: Prefix Command Arguments\7f832246
-Node: Recursive Editing\7f837333
-Node: Disabling Commands\7f842129
-Node: Command History\7f844197
-Node: Keyboard Macros\7f845934
-Node: Keymaps\7f848151
-Node: Keymap Terminology\7f849728
-Node: Format of Keymaps\7f852657
-Node: Creating Keymaps\7f853068
-Node: Inheritance and Keymaps\7f855147
-Node: Key Sequences\7f857519
-Node: Prefix Keys\7f862315
-Node: Active Keymaps\7f865900
-Node: Key Lookup\7f875221
-Node: Functions for Key Lookup\7f880384
-Node: Changing Key Bindings\7f886081
-Node: Key Binding Commands\7f892978
-Node: Scanning Keymaps\7f895043
-Node: Other Keymap Functions\7f903554
-Node: Menus\7f904176
-Node: Menu Format\7f904768
-Node: Menubar Format\7f913414
-Node: Menubar\7f914039
-Node: Modifying Menus\7f917152
-Node: Menu Filters\7f922166
-Node: Pop-Up Menus\7f924062
-Node: Menu Accelerators\7f926267
-Node: Creating Menu Accelerators\7f927023
-Node: Keyboard Menu Traversal\7f928383
-Node: Menu Accelerator Functions\7f929110
-Node: Buffers Menu\7f932187
-Node: Dialog Boxes\7f933481
-Node: Dialog Box Format\7f933648
-Node: Dialog Box Functions\7f935073
-Node: Toolbar\7f935470
-Node: Toolbar Intro\7f935791
-Node: Toolbar Descriptor Format\7f938200
-Node: Specifying the Toolbar\7f942694
-Node: Other Toolbar Variables\7f946299
-Node: Gutter\7f950725
-Node: Gutter Intro\7f951201
-Node: Gutter Descriptor Format\7f953198
-Node: Specifying a Gutter\7f957652
-Node: Other Gutter Variables\7f961185
-Node: Common Gutter Widgets\7f965570
-Node: Buffer Tabs\7f966562
-Node: Progress Bars\7f966703
-Node: Scrollbars\7f966848
-Node: Drag and Drop\7f966983
-Node: Supported Protocols\7f968059
-Node: OffiX DND\7f968562
-Node: CDE dt\7f969569
-Node: MSWindows OLE\7f970160
-Node: Loose ends\7f970331
-Node: Drop Interface\7f970723
-Node: Drag Interface\7f971745
-Node: Modes\7f971919
-Node: Major Modes\7f972870
-Node: Major Mode Conventions\7f975785
-Node: Example Major Modes\7f981740
-Node: Auto Major Mode\7f989773
-Node: Mode Help\7f997221
-Node: Derived Modes\7f998322
-Node: Minor Modes\7f1000513
-Node: Minor Mode Conventions\7f1001815
-Node: Keymaps and Minor Modes\7f1004678
-Node: Modeline Format\7f1005513
-Node: Modeline Data\7f1007281
-Node: Modeline Variables\7f1011551
-Node: %-Constructs\7f1016267
-Node: Hooks\7f1019178
-Node: Documentation\7f1025940
-Node: Documentation Basics\7f1027363
-Node: Accessing Documentation\7f1030413
-Node: Keys in Documentation\7f1036692
-Node: Describing Characters\7f1040171
-Node: Help Functions\7f1042520
-Node: Obsoleteness\7f1048971
-Node: Files\7f1051965
-Node: Visiting Files\7f1053890
-Node: Visiting Functions\7f1055395
-Node: Subroutines of Visiting\7f1060442
-Node: Saving Buffers\7f1062515
-Node: Reading from Files\7f1068608
-Node: Writing to Files\7f1070765
-Node: File Locks\7f1073482
-Node: Information about Files\7f1076535
-Node: Testing Accessibility\7f1077296
-Node: Kinds of Files\7f1081036
-Node: Truenames\7f1082717
-Node: File Attributes\7f1083719
-Node: Changing File Attributes\7f1088858
-Node: File Names\7f1094264
-Node: File Name Components\7f1095873
-Node: Directory Names\7f1098974
-Node: Relative File Names\7f1102427
-Node: File Name Expansion\7f1103505
-Node: Unique File Names\7f1107412
-Node: File Name Completion\7f1109027
-Node: User Name Completion\7f1111688
-Node: Contents of Directories\7f1113028
-Node: Create/Delete Dirs\7f1116341
-Node: Magic File Names\7f1117447
-Node: Partial Files\7f1123077
-Node: Intro to Partial Files\7f1123305
-Node: Creating a Partial File\7f1124545
-Node: Detached Partial Files\7f1125480
-Node: Format Conversion\7f1126602
-Node: Files and MS-DOS\7f1133118
-Node: Backups and Auto-Saving\7f1135182
-Node: Backup Files\7f1135857
-Node: Making Backups\7f1137254
-Node: Rename or Copy\7f1140003
-Node: Numbered Backups\7f1142496
-Node: Backup Names\7f1144731
-Node: Auto-Saving\7f1148023
-Node: Reverting\7f1156165
-Node: Buffers\7f1159323
-Node: Buffer Basics\7f1160740
-Node: Current Buffer\7f1162793
-Node: Buffer Names\7f1167481
-Node: Buffer File Name\7f1170686
-Node: Buffer Modification\7f1174805
-Node: Modification Time\7f1176998
-Node: Read Only Buffers\7f1180373
-Node: The Buffer List\7f1182791
-Node: Creating Buffers\7f1187621
-Node: Killing Buffers\7f1189767
-Node: Indirect Buffers\7f1193498
-Node: Windows\7f1196070
-Node: Basic Windows\7f1197548
-Node: Splitting Windows\7f1200646
-Node: Deleting Windows\7f1207535
-Node: Selecting Windows\7f1210215
-Node: Cyclic Window Ordering\7f1213344
-Node: Buffers and Windows\7f1217968
-Node: Displaying Buffers\7f1219809
-Node: Choosing Window\7f1224985
-Node: Window Point\7f1232701
-Node: Window Start\7f1234747
-Node: Vertical Scrolling\7f1239237
-Node: Horizontal Scrolling\7f1245374
-Node: Size of Window\7f1248883
-Node: Position of Window\7f1253601
-Node: Resizing Windows\7f1255841
-Node: Window Configurations\7f1261270
-Node: Frames\7f1264695
-Node: Creating Frames\7f1267036
-Node: Frame Properties\7f1268377
-Node: Property Access\7f1269193
-Node: Initial Properties\7f1270042
-Node: X Frame Properties\7f1272528
-Node: Size and Position\7f1277162
-Node: Frame Name\7f1279158
-Node: Frame Titles\7f1280072
-Node: Deleting Frames\7f1281896
-Node: Finding All Frames\7f1282496
-Node: Frames and Windows\7f1284490
-Node: Minibuffers and Frames\7f1286195
-Node: Input Focus\7f1287113
-Node: Visibility of Frames\7f1290190
-Node: Raising and Lowering\7f1292109
-Node: Frame Configurations\7f1294485
-Node: Frame Hooks\7f1295079
-Node: Consoles and Devices\7f1296884
-Node: Basic Console Functions\7f1299627
-Node: Basic Device Functions\7f1300050
-Node: Console Types and Device Classes\7f1300766
-Node: Connecting to a Console or Device\7f1302963
-Node: The Selected Console and Device\7f1305126
-Node: Console and Device I/O\7f1306152
-Node: Positions\7f1306916
-Node: Point\7f1307885
-Node: Motion\7f1310975
-Node: Character Motion\7f1311742
-Node: Word Motion\7f1313979
-Node: Buffer End Motion\7f1315480
-Node: Text Lines\7f1316977
-Node: Screen Lines\7f1321572
-Node: List Motion\7f1325635
-Node: Skipping Characters\7f1329043
-Node: Excursions\7f1331262
-Node: Narrowing\7f1334294
-Node: Markers\7f1339619
-Node: Overview of Markers\7f1340525
-Node: Predicates on Markers\7f1345217
-Node: Creating Markers\7f1346463
-Node: Information from Markers\7f1350500
-Node: Changing Markers\7f1351598
-Node: The Mark\7f1352976
-Node: The Region\7f1361470
-Node: Text\7f1367156
-Node: Near Point\7f1369855
-Node: Buffer Contents\7f1374042
-Node: Comparing Text\7f1375448
-Node: Insertion\7f1376856
-Node: Commands for Insertion\7f1380698
-Node: Deletion\7f1383654
-Node: User-Level Deletion\7f1387249
-Node: The Kill Ring\7f1391410
-Node: Kill Ring Concepts\7f1393584
-Node: Kill Functions\7f1394638
-Node: Yank Commands\7f1396543
-Node: Low-Level Kill Ring\7f1398414
-Node: Internals of Kill Ring\7f1401200
-Node: Undo\7f1403980
-Node: Maintaining Undo\7f1408309
-Node: Filling\7f1410929
-Node: Margins\7f1416923
-Node: Auto Filling\7f1420852
-Node: Sorting\7f1422033
-Node: Columns\7f1431333
-Node: Indentation\7f1433849
-Node: Primitive Indent\7f1434628
-Node: Mode-Specific Indent\7f1435872
-Node: Region Indent\7f1438383
-Node: Relative Indent\7f1441331
-Node: Indent Tabs\7f1443713
-Node: Motion by Indent\7f1445034
-Node: Case Changes\7f1445813
-Node: Text Properties\7f1449064
-Node: Examining Properties\7f1450877
-Node: Changing Properties\7f1452744
-Node: Property Search\7f1456335
-Node: Special Properties\7f1461046
-Node: Saving Properties\7f1461327
-Node: Substitution\7f1464469
-Node: Registers\7f1467739
-Node: Transposition\7f1470282
-Node: Change Hooks\7f1471176
-Node: Transformations\7f1473216
-Node: Searching and Matching\7f1477601
-Node: String Search\7f1478732
-Node: Regular Expressions\7f1483456
-Node: Syntax of Regexps\7f1484823
-Node: Regexp Example\7f1499202
-Node: Regexp Search\7f1501372
-Node: POSIX Regexps\7f1507460
-Node: Search and Replace\7f1509295
-Node: Match Data\7f1512660
-Node: Simple Match Data\7f1513790
-Node: Replacing Match\7f1518055
-Node: Entire Match Data\7f1520389
-Node: Saving Match Data\7f1522380
-Node: Searching and Case\7f1523761
-Node: Standard Regexps\7f1525795
-Node: Syntax Tables\7f1527993
-Node: Syntax Basics\7f1529107
-Node: Syntax Descriptors\7f1532079
-Node: Syntax Class Table\7f1533929
-Node: Syntax Flags\7f1539967
-Node: Syntax Table Functions\7f1543184
-Node: Motion and Syntax\7f1547048
-Node: Parsing Expressions\7f1548500
-Node: Standard Syntax Tables\7f1554569
-Node: Syntax Table Internals\7f1555413
-Node: Abbrevs\7f1556439
-Node: Abbrev Mode\7f1558242
-Node: Abbrev Tables\7f1558962
-Node: Defining Abbrevs\7f1560495
-Node: Abbrev Files\7f1562400
-Node: Abbrev Expansion\7f1564173
-Node: Standard Abbrev Tables\7f1568804
-Node: Extents\7f1569963
-Node: Intro to Extents\7f1571206
-Node: Creating and Modifying Extents\7f1575200
-Node: Extent Endpoints\7f1576707
-Node: Finding Extents\7f1579970
-Node: Mapping Over Extents\7f1583718
-Node: Extent Properties\7f1589835
-Node: Detached Extents\7f1599979
-Node: Extent Parents\7f1601838
-Node: Duplicable Extents\7f1603532
-Node: Extents and Events\7f1606753
-Node: Atomic Extents\7f1608660
-Node: Specifiers\7f1609107
-Node: Introduction to Specifiers\7f1611220
-Node: Specifiers In-Depth\7f1613530
-Node: Specifier Instancing\7f1618442
-Node: Specifier Types\7f1621704
-Node: Adding Specifications\7f1626778
-Node: Retrieving Specifications\7f1636140
-Node: Specifier Tag Functions\7f1639875
-Node: Specifier Instancing Functions\7f1643109
-Node: Specifier Example\7f1646516
-Node: Creating Specifiers\7f1649672
-Node: Specifier Validation Functions\7f1651921
-Node: Other Specification Functions\7f1654305
-Node: Faces and Window-System Objects\7f1658124
-Node: Faces\7f1658448
-Node: Merging Faces\7f1660065
-Node: Basic Face Functions\7f1662026
-Node: Face Properties\7f1664124
-Node: Face Convenience Functions\7f1674366
-Node: Other Face Display Functions\7f1677496
-Node: Fonts\7f1678309
-Node: Font Specifiers\7f1679010
-Node: Font Instances\7f1679251
-Node: Font Instance Names\7f1680218
-Node: Font Instance Size\7f1681059
-Node: Font Instance Characteristics\7f1682345
-Node: Font Convenience Functions\7f1683514
-Node: Colors\7f1684804
-Node: Color Specifiers\7f1685244
-Node: Color Instances\7f1685471
-Node: Color Instance Properties\7f1686215
-Node: Color Convenience Functions\7f1686841
-Node: Glyphs\7f1687894
-Node: Glyph Functions\7f1689486
-Node: Creating Glyphs\7f1689893
-Node: Glyph Properties\7f1691480
-Node: Glyph Convenience Functions\7f1700647
-Node: Glyph Dimensions\7f1704594
-Node: Images\7f1705674
-Node: Image Specifiers\7f1706123
-Node: Image Instantiator Conversion\7f1717472
-Node: Image Instances\7f1718837
-Node: Image Instance Types\7f1719588
-Node: Image Instance Functions\7f1722243
-Node: Glyph Types\7f1726812
-Node: Mouse Pointer\7f1728584
-Node: Redisplay Glyphs\7f1731587
-Node: Subwindows\7f1732620
-Node: Annotations\7f1732863
-Node: Annotation Basics\7f1733879
-Node: Annotation Primitives\7f1737817
-Node: Annotation Properties\7f1739146
-Node: Locating Annotations\7f1742186
-Node: Margin Primitives\7f1743023
-Node: Annotation Hooks\7f1744917
-Node: Display\7f1745577
-Node: Refresh Screen\7f1746555
-Node: Truncation\7f1748466
-Node: The Echo Area\7f1750991
-Node: Warnings\7f1757426
-Node: Invisible Text\7f1761862
-Node: Selective Display\7f1764441
-Node: Overlay Arrow\7f1768567
-Node: Temporary Displays\7f1769920
-Node: Blinking\7f1774041
-Node: Usual Display\7f1776226
-Node: Display Tables\7f1778775
-Node: Display Table Format\7f1779579
-Node: Active Display Table\7f1781021
-Node: Character Descriptors\7f1782213
-Node: Beeping\7f1782970
-Node: Hash Tables\7f1787736
-Node: Introduction to Hash Tables\7f1788344
-Node: Working With Hash Tables\7f1794367
-Node: Weak Hash Tables\7f1795484
-Node: Range Tables\7f1797283
-Node: Introduction to Range Tables\7f1797972
-Node: Working With Range Tables\7f1798403
-Node: Databases\7f1799288
-Node: Connecting to a Database\7f1799587
-Node: Working With a Database\7f1800678
-Node: Other Database Functions\7f1801536
-Node: Processes\7f1802110
-Node: Subprocess Creation\7f1804334
-Node: Synchronous Processes\7f1807623
-Node: MS-DOS Subprocesses\7f1814341
-Node: Asynchronous Processes\7f1815415
-Node: Deleting Processes\7f1819128
-Node: Process Information\7f1820999
-Node: Input to Processes\7f1824925
-Node: Signals to Processes\7f1827215
-Node: Output from Processes\7f1831635
-Node: Process Buffers\7f1832447
-Node: Filter Functions\7f1835314
-Node: Accepting Output\7f1840884
-Node: Sentinels\7f1842411
-Node: Process Window Size\7f1845901
-Node: Transaction Queues\7f1846250
-Node: Network\7f1847948
-Node: System Interface\7f1849782
-Node: Starting Up\7f1851052
-Node: Start-up Summary\7f1851646
-Node: Init File\7f1855200
-Node: Terminal-Specific\7f1857581
-Node: Command Line Arguments\7f1860740
-Node: Getting Out\7f1864229
-Node: Killing XEmacs\7f1864798
-Node: Suspending XEmacs\7f1866467
-Node: System Environment\7f1869809
-Node: User Identification\7f1876476
-Node: Time of Day\7f1880005
-Node: Time Conversion\7f1882792
-Node: Timers\7f1887832
-Node: Terminal Input\7f1890005
-Node: Input Modes\7f1890508
-Node: Translating Input\7f1892921
-Node: Recording Input\7f1897086
-Node: Terminal Output\7f1899186
-Node: Flow Control\7f1902809
-Node: Batch Mode\7f1906601
-Node: X-Windows\7f1907983
-Node: X Selections\7f1908854
-Node: X Server\7f1911064
-Node: Resources\7f1911515
-Node: Server Data\7f1916824
-Node: Grabs\7f1918031
-Node: X Miscellaneous\7f1919611
-Node: ToolTalk Support\7f1921996
-Node: XEmacs ToolTalk API Summary\7f1922213
-Node: Sending Messages\7f1923513
-Node: Example of Sending Messages\7f1923764
-Node: Elisp Interface for Sending Messages\7f1924826
-Node: Receiving Messages\7f1931218
-Node: Example of Receiving Messages\7f1931441
-Node: Elisp Interface for Receiving Messages\7f1932277
-Node: LDAP Support\7f1936102
-Node: Building XEmacs with LDAP support\7f1936596
-Node: XEmacs LDAP API\7f1937573
-Node: LDAP Variables\7f1938625
-Node: The High-Level LDAP API\7f1941225
-Node: The Low-Level LDAP API\7f1944688
-Node: The LDAP Lisp Object\7f1945519
-Node: Opening and Closing a LDAP Connection\7f1946072
-Node: Low-level Operations on a LDAP Server\7f1947872
-Node: LDAP Internationalization\7f1950566
-Node: LDAP Internationalization Variables\7f1951471
-Node: Encoder/Decoder Functions\7f1953200
-Node: Syntax of Search Filters\7f1954239
-Node: PostgreSQL Support\7f1955537
-Node: Building XEmacs with PostgreSQL support\7f1955932
-Node: XEmacs PostgreSQL libpq API\7f1957199
-Node: libpq Lisp Variables\7f1959074
-Node: libpq Lisp Symbols and DataTypes\7f1962038
-Node: Synchronous Interface Functions\7f1975278
-Node: Asynchronous Interface Functions\7f1979769
-Node: Large Object Support\7f1983270
-Node: Other libpq Functions\7f1983897
-Node: Unimplemented libpq Functions\7f1986932
-Node: XEmacs PostgreSQL libpq Examples\7f1992251
-Node: Internationalization\7f1998342
-Node: I18N Levels 1 and 2\7f1998685
-Node: I18N Level 3\7f1999391
-Node: Level 3 Basics\7f1999672
-Node: Level 3 Primitives\7f2000505
-Node: Dynamic Messaging\7f2002111
-Node: Domain Specification\7f2002574
-Node: Documentation String Extraction\7f2004477
-Node: I18N Level 4\7f2005395
-Node: MULE\7f2005587
-Node: Internationalization Terminology\7f2006636
-Node: Charsets\7f2018835
-Node: Charset Properties\7f2019531
-Node: Basic Charset Functions\7f2024246
-Node: Charset Property Functions\7f2026427
-Node: Predefined Charsets\7f2028469
-Node: MULE Characters\7f2031389
-Node: Composite Characters\7f2032236
-Node: Coding Systems\7f2033496
-Node: Coding System Types\7f2035636
-Node: ISO 2022\7f2039620
-Node: EOL Conversion\7f2051897
-Node: Coding System Properties\7f2053069
-Node: Basic Coding System Functions\7f2057386
-Node: Coding System Property Functions\7f2059420
-Node: Encoding and Decoding Text\7f2059978
-Node: Detection of Textual Encoding\7f2061114
-Node: Big5 and Shift-JIS Functions\7f2062650
-Node: Predefined Coding Systems\7f2063776
-Node: CCL\7f2075870
-Node: CCL Syntax\7f2078974
-Node: CCL Statements\7f2080550
-Node: CCL Expressions\7f2085198
-Node: Calling CCL\7f2087737
-Node: CCL Examples\7f2090726
-Node: Category Tables\7f2090863
-Node: Tips\7f2093221
-Node: Style Tips\7f2093862
-Node: Compilation Tips\7f2103381
-Node: Documentation Tips\7f2105295
-Node: Comment Tips\7f2110804
-Node: Library Headers\7f2113806
-Node: Building XEmacs and Object Allocation\7f2117778
-Node: Building XEmacs\7f2118661
-Node: Pure Storage\7f2124996
-Node: Garbage Collection\7f2127784
-Node: Standard Errors\7f2138923
-Node: Standard Buffer-Local Variables\7f2143132
-Node: Standard Keymaps\7f2145765
-Node: Standard Hooks\7f2149497
-Node: Index\7f2156997
+Node: Docs and Compilation\7f563240
+Node: Dynamic Loading\7f565893
+Node: Eval During Compile\7f568257
+Node: Compiled-Function Objects\7f569522
+Node: Disassembly\7f574320
+Node: Debugging\7f581574
+Node: Debugger\7f582986
+Node: Error Debugging\7f584131
+Node: Infinite Loops\7f586884
+Node: Function Debugging\7f588128
+Node: Explicit Debug\7f590918
+Node: Using Debugger\7f591689
+Node: Debugger Commands\7f593551
+Node: Invoking the Debugger\7f597868
+Node: Internals of Debugger\7f601783
+Node: Syntax Errors\7f606670
+Node: Excess Open\7f607918
+Node: Excess Close\7f609793
+Node: Compilation Errors\7f611214
+Node: Edebug\7f612502
+Node: Using Edebug\7f614610
+Node: Instrumenting\7f617307
+Node: Edebug Execution Modes\7f620796
+Node: Jumping\7f623906
+Node: Edebug Misc\7f626249
+Node: Breakpoints\7f627638
+Node: Global Break Condition\7f630444
+Node: Embedded Breakpoints\7f631399
+Node: Trapping Errors\7f632354
+Node: Edebug Views\7f634430
+Node: Edebug Eval\7f636395
+Node: Eval List\7f637572
+Node: Reading in Edebug\7f640957
+Node: Printing in Edebug\7f641756
+Node: Tracing\7f643471
+Node: Coverage Testing\7f645357
+Node: The Outside Context\7f647398
+Node: Checking Whether to Stop\7f648347
+Node: Edebug Display Update\7f648994
+Node: Edebug Recursive Edit\7f651017
+Node: Instrumenting Macro Calls\7f652672
+Node: Specification List\7f655154
+Node: Backtracking\7f664565
+Node: Debugging Backquote\7f666503
+Node: Specification Examples\7f670209
+Node: Edebug Options\7f672276
+Node: Read and Print\7f677613
+Node: Streams Intro\7f678590
+Node: Input Streams\7f680608
+Node: Input Functions\7f685509
+Node: Output Streams\7f687569
+Node: Output Functions\7f691620
+Node: Output Variables\7f695920
+Node: Minibuffers\7f700719
+Node: Intro to Minibuffers\7f701871
+Node: Text from Minibuffer\7f704059
+Node: Object from Minibuffer\7f709145
+Node: Minibuffer History\7f713240
+Node: Completion\7f716219
+Node: Basic Completion\7f718194
+Node: Minibuffer Completion\7f723223
+Node: Completion Commands\7f726800
+Node: High-Level Completion\7f731457
+Node: Reading File Names\7f736199
+Node: Programmed Completion\7f739891
+Node: Yes-or-No Queries\7f742273
+Node: Multiple Queries\7f748010
+Node: Reading a Password\7f752077
+Node: Minibuffer Misc\7f753414
+Node: Command Loop\7f758284
+Node: Command Overview\7f759628
+Node: Defining Commands\7f762906
+Node: Using Interactive\7f763654
+Node: Interactive Codes\7f768427
+Node: Interactive Examples\7f774219
+Node: Interactive Call\7f775533
+Node: Command Loop Info\7f780934
+Node: Events\7f785913
+Node: Event Types\7f787373
+Node: Event Contents\7f789296
+Node: Event Predicates\7f793772
+Node: Accessing Mouse Event Positions\7f795097
+Node: Frame-Level Event Position Info\7f795796
+Node: Window-Level Event Position Info\7f796836
+Node: Event Text Position Info\7f798600
+Node: Event Glyph Position Info\7f801092
+Node: Event Toolbar Position Info\7f802415
+Node: Other Event Position Info\7f803086
+Node: Accessing Other Event Info\7f803495
+Node: Working With Events\7f805115
+Node: Converting Events\7f811103
+Node: Reading Input\7f814055
+Node: Key Sequence Input\7f815057
+Node: Reading One Event\7f817011
+Node: Dispatching an Event\7f819828
+Node: Quoted Character Input\7f820279
+Node: Peeking and Discarding\7f821627
+Node: Waiting\7f825531
+Node: Quitting\7f827839
+Node: Prefix Command Arguments\7f832247
+Node: Recursive Editing\7f837334
+Node: Disabling Commands\7f842130
+Node: Command History\7f844198
+Node: Keyboard Macros\7f845935
+Node: Keymaps\7f848152
+Node: Keymap Terminology\7f849729
+Node: Format of Keymaps\7f852658
+Node: Creating Keymaps\7f853069
+Node: Inheritance and Keymaps\7f855148
+Node: Key Sequences\7f857520
+Node: Prefix Keys\7f862316
+Node: Active Keymaps\7f865901
+Node: Key Lookup\7f875222
+Node: Functions for Key Lookup\7f880385
+Node: Changing Key Bindings\7f886082
+Node: Key Binding Commands\7f892979
+Node: Scanning Keymaps\7f895044
+Node: Other Keymap Functions\7f903555
+Node: Menus\7f904177
+Node: Menu Format\7f904769
+Node: Menubar Format\7f913415
+Node: Menubar\7f914040
+Node: Modifying Menus\7f917153
+Node: Menu Filters\7f922167
+Node: Pop-Up Menus\7f924063
+Node: Menu Accelerators\7f926268
+Node: Creating Menu Accelerators\7f927024
+Node: Keyboard Menu Traversal\7f928384
+Node: Menu Accelerator Functions\7f929111
+Node: Buffers Menu\7f932188
+Node: Dialog Boxes\7f933482
+Node: Dialog Box Format\7f933649
+Node: Dialog Box Functions\7f935074
+Node: Toolbar\7f935471
+Node: Toolbar Intro\7f935906
+Node: Creating Toolbar\7f938306
+Node: Toolbar Descriptor Format\7f939223
+Node: Specifying the Toolbar\7f943720
+Node: Other Toolbar Variables\7f947325
+Node: Gutter\7f951751
+Node: Gutter Intro\7f952340
+Node: Creating Gutter\7f954343
+Node: Gutter Descriptor Format\7f957225
+Node: Specifying a Gutter\7f961682
+Node: Other Gutter Variables\7f965215
+Node: Common Gutter Widgets\7f969600
+Node: Buffer Tabs\7f970592
+Node: Progress Bars\7f970733
+Node: Scrollbars\7f970878
+Node: Drag and Drop\7f971013
+Node: Supported Protocols\7f972089
+Node: OffiX DND\7f972592
+Node: CDE dt\7f973599
+Node: MSWindows OLE\7f974190
+Node: Loose ends\7f974361
+Node: Drop Interface\7f974753
+Node: Drag Interface\7f975775
+Node: Modes\7f975949
+Node: Major Modes\7f976900
+Node: Major Mode Conventions\7f979815
+Node: Example Major Modes\7f985770
+Node: Auto Major Mode\7f993803
+Node: Mode Help\7f1001251
+Node: Derived Modes\7f1002352
+Node: Minor Modes\7f1004543
+Node: Minor Mode Conventions\7f1005845
+Node: Keymaps and Minor Modes\7f1008708
+Node: Modeline Format\7f1009543
+Node: Modeline Data\7f1011311
+Node: Modeline Variables\7f1016464
+Node: %-Constructs\7f1021180
+Node: Hooks\7f1024167
+Node: Documentation\7f1030929
+Node: Documentation Basics\7f1032352
+Node: Accessing Documentation\7f1035402
+Node: Keys in Documentation\7f1041681
+Node: Describing Characters\7f1045160
+Node: Help Functions\7f1047509
+Node: Obsoleteness\7f1053960
+Node: Files\7f1056954
+Node: Visiting Files\7f1058879
+Node: Visiting Functions\7f1060384
+Node: Subroutines of Visiting\7f1065431
+Node: Saving Buffers\7f1067504
+Node: Reading from Files\7f1073597
+Node: Writing to Files\7f1075754
+Node: File Locks\7f1078471
+Node: Information about Files\7f1081524
+Node: Testing Accessibility\7f1082285
+Node: Kinds of Files\7f1086025
+Node: Truenames\7f1087706
+Node: File Attributes\7f1088708
+Node: Changing File Attributes\7f1093847
+Node: File Names\7f1099253
+Node: File Name Components\7f1100862
+Node: Directory Names\7f1103963
+Node: Relative File Names\7f1107416
+Node: File Name Expansion\7f1108494
+Node: Unique File Names\7f1112401
+Node: File Name Completion\7f1114016
+Node: User Name Completion\7f1116677
+Node: Contents of Directories\7f1118017
+Node: Create/Delete Dirs\7f1121330
+Node: Magic File Names\7f1122436
+Node: Partial Files\7f1128066
+Node: Intro to Partial Files\7f1128294
+Node: Creating a Partial File\7f1129534
+Node: Detached Partial Files\7f1130469
+Node: Format Conversion\7f1131591
+Node: Files and MS-DOS\7f1138107
+Node: Backups and Auto-Saving\7f1140171
+Node: Backup Files\7f1140846
+Node: Making Backups\7f1142243
+Node: Rename or Copy\7f1144992
+Node: Numbered Backups\7f1147485
+Node: Backup Names\7f1149720
+Node: Auto-Saving\7f1153012
+Node: Reverting\7f1161154
+Node: Buffers\7f1164312
+Node: Buffer Basics\7f1165729
+Node: Current Buffer\7f1167782
+Node: Buffer Names\7f1172470
+Node: Buffer File Name\7f1175675
+Node: Buffer Modification\7f1179794
+Node: Modification Time\7f1181987
+Node: Read Only Buffers\7f1185362
+Node: The Buffer List\7f1187780
+Node: Creating Buffers\7f1192610
+Node: Killing Buffers\7f1194756
+Node: Indirect Buffers\7f1198487
+Node: Windows\7f1201059
+Node: Basic Windows\7f1202537
+Node: Splitting Windows\7f1205635
+Node: Deleting Windows\7f1212524
+Node: Selecting Windows\7f1215204
+Node: Cyclic Window Ordering\7f1218333
+Node: Buffers and Windows\7f1222957
+Node: Displaying Buffers\7f1224798
+Node: Choosing Window\7f1229974
+Node: Window Point\7f1237690
+Node: Window Start\7f1239736
+Node: Vertical Scrolling\7f1244226
+Node: Horizontal Scrolling\7f1250363
+Node: Size of Window\7f1253872
+Node: Position of Window\7f1258590
+Node: Resizing Windows\7f1260830
+Node: Window Configurations\7f1266259
+Node: Frames\7f1269684
+Node: Creating Frames\7f1272025
+Node: Frame Properties\7f1273366
+Node: Property Access\7f1274182
+Node: Initial Properties\7f1275031
+Node: X Frame Properties\7f1277517
+Node: Size and Position\7f1282151
+Node: Frame Name\7f1284147
+Node: Frame Titles\7f1285061
+Node: Deleting Frames\7f1286885
+Node: Finding All Frames\7f1287485
+Node: Frames and Windows\7f1289479
+Node: Minibuffers and Frames\7f1291184
+Node: Input Focus\7f1292102
+Node: Visibility of Frames\7f1295179
+Node: Raising and Lowering\7f1297098
+Node: Frame Configurations\7f1299474
+Node: Frame Hooks\7f1300068
+Node: Consoles and Devices\7f1301873
+Node: Basic Console Functions\7f1304616
+Node: Basic Device Functions\7f1305039
+Node: Console Types and Device Classes\7f1305755
+Node: Connecting to a Console or Device\7f1307952
+Node: The Selected Console and Device\7f1310115
+Node: Console and Device I/O\7f1311141
+Node: Positions\7f1311905
+Node: Point\7f1312874
+Node: Motion\7f1315964
+Node: Character Motion\7f1316731
+Node: Word Motion\7f1318968
+Node: Buffer End Motion\7f1320469
+Node: Text Lines\7f1321966
+Node: Screen Lines\7f1326561
+Node: List Motion\7f1330624
+Node: Skipping Characters\7f1334032
+Node: Excursions\7f1336251
+Node: Narrowing\7f1339283
+Node: Markers\7f1344608
+Node: Overview of Markers\7f1345514
+Node: Predicates on Markers\7f1350206
+Node: Creating Markers\7f1351452
+Node: Information from Markers\7f1355489
+Node: Changing Markers\7f1356587
+Node: The Mark\7f1357965
+Node: The Region\7f1366459
+Node: Text\7f1372145
+Node: Near Point\7f1374844
+Node: Buffer Contents\7f1379031
+Node: Comparing Text\7f1380437
+Node: Insertion\7f1381845
+Node: Commands for Insertion\7f1385687
+Node: Deletion\7f1388643
+Node: User-Level Deletion\7f1392238
+Node: The Kill Ring\7f1396399
+Node: Kill Ring Concepts\7f1398573
+Node: Kill Functions\7f1399627
+Node: Yank Commands\7f1401532
+Node: Low-Level Kill Ring\7f1403403
+Node: Internals of Kill Ring\7f1406189
+Node: Undo\7f1408969
+Node: Maintaining Undo\7f1413298
+Node: Filling\7f1415918
+Node: Margins\7f1421912
+Node: Auto Filling\7f1425841
+Node: Sorting\7f1427022
+Node: Columns\7f1436322
+Node: Indentation\7f1438838
+Node: Primitive Indent\7f1439617
+Node: Mode-Specific Indent\7f1440861
+Node: Region Indent\7f1443372
+Node: Relative Indent\7f1446320
+Node: Indent Tabs\7f1448702
+Node: Motion by Indent\7f1450023
+Node: Case Changes\7f1450802
+Node: Text Properties\7f1454053
+Node: Examining Properties\7f1455866
+Node: Changing Properties\7f1457733
+Node: Property Search\7f1461324
+Node: Special Properties\7f1466035
+Node: Saving Properties\7f1466316
+Node: Substitution\7f1469458
+Node: Registers\7f1472728
+Node: Transposition\7f1475271
+Node: Change Hooks\7f1476165
+Node: Transformations\7f1478205
+Node: Searching and Matching\7f1482590
+Node: String Search\7f1483721
+Node: Regular Expressions\7f1488445
+Node: Syntax of Regexps\7f1489812
+Node: Regexp Example\7f1504191
+Node: Regexp Search\7f1506361
+Node: POSIX Regexps\7f1512449
+Node: Search and Replace\7f1514284
+Node: Match Data\7f1517649
+Node: Simple Match Data\7f1518779
+Node: Replacing Match\7f1523044
+Node: Entire Match Data\7f1525378
+Node: Saving Match Data\7f1527369
+Node: Searching and Case\7f1528750
+Node: Standard Regexps\7f1530784
+Node: Syntax Tables\7f1532982
+Node: Syntax Basics\7f1534096
+Node: Syntax Descriptors\7f1537068
+Node: Syntax Class Table\7f1538918
+Node: Syntax Flags\7f1544956
+Node: Syntax Table Functions\7f1548173
+Node: Motion and Syntax\7f1552037
+Node: Parsing Expressions\7f1553489
+Node: Standard Syntax Tables\7f1559558
+Node: Syntax Table Internals\7f1560402
+Node: Abbrevs\7f1561428
+Node: Abbrev Mode\7f1563231
+Node: Abbrev Tables\7f1563951
+Node: Defining Abbrevs\7f1565484
+Node: Abbrev Files\7f1567389
+Node: Abbrev Expansion\7f1569162
+Node: Standard Abbrev Tables\7f1573793
+Node: Extents\7f1574952
+Node: Intro to Extents\7f1576195
+Node: Creating and Modifying Extents\7f1580187
+Node: Extent Endpoints\7f1581694
+Node: Finding Extents\7f1584957
+Node: Mapping Over Extents\7f1588705
+Node: Extent Properties\7f1594822
+Node: Detached Extents\7f1604966
+Node: Extent Parents\7f1606825
+Node: Duplicable Extents\7f1608519
+Node: Extents and Events\7f1611740
+Node: Atomic Extents\7f1613647
+Node: Specifiers\7f1614094
+Node: Introduction to Specifiers\7f1616207
+Node: Specifiers In-Depth\7f1618517
+Node: Specifier Instancing\7f1623429
+Node: Specifier Types\7f1626691
+Node: Adding Specifications\7f1631765
+Node: Retrieving Specifications\7f1641127
+Node: Specifier Tag Functions\7f1644862
+Node: Specifier Instancing Functions\7f1648096
+Node: Specifier Example\7f1651503
+Node: Creating Specifiers\7f1654659
+Node: Specifier Validation Functions\7f1658976
+Node: Other Specification Functions\7f1661360
+Node: Faces and Window-System Objects\7f1665179
+Node: Faces\7f1665503
+Node: Merging Faces\7f1667120
+Node: Basic Face Functions\7f1669081
+Node: Face Properties\7f1671179
+Node: Face Convenience Functions\7f1681421
+Node: Other Face Display Functions\7f1684551
+Node: Fonts\7f1685364
+Node: Font Specifiers\7f1686065
+Node: Font Instances\7f1687250
+Node: Font Instance Names\7f1688217
+Node: Font Instance Size\7f1689058
+Node: Font Instance Characteristics\7f1690344
+Node: Font Convenience Functions\7f1691513
+Node: Colors\7f1692803
+Node: Color Specifiers\7f1693243
+Node: Color Instances\7f1695601
+Node: Color Instance Properties\7f1696345
+Node: Color Convenience Functions\7f1696971
+Node: Glyphs\7f1698024
+Node: Glyph Functions\7f1699625
+Node: Creating Glyphs\7f1700032
+Node: Glyph Properties\7f1712671
+Node: Glyph Convenience Functions\7f1721838
+Node: Glyph Dimensions\7f1725785
+Node: Images\7f1726865
+Node: Image Specifiers\7f1727314
+Node: Image Instantiator Conversion\7f1742660
+Node: Image Instances\7f1744025
+Node: Image Instance Types\7f1744776
+Node: Image Instance Functions\7f1747539
+Node: Glyph Types\7f1754590
+Node: Mouse Pointer\7f1756362
+Node: Redisplay Glyphs\7f1759365
+Node: Subwindows\7f1760398
+Node: Annotations\7f1760641
+Node: Annotation Basics\7f1761657
+Node: Annotation Primitives\7f1765595
+Node: Annotation Properties\7f1766924
+Node: Locating Annotations\7f1769964
+Node: Margin Primitives\7f1770801
+Node: Annotation Hooks\7f1772695
+Node: Display\7f1773355
+Node: Refresh Screen\7f1774333
+Node: Truncation\7f1776244
+Node: The Echo Area\7f1778769
+Node: Warnings\7f1785204
+Node: Invisible Text\7f1789640
+Node: Selective Display\7f1792219
+Node: Overlay Arrow\7f1796345
+Node: Temporary Displays\7f1797698
+Node: Blinking\7f1801819
+Node: Usual Display\7f1804004
+Node: Display Tables\7f1806553
+Node: Display Table Format\7f1807357
+Node: Active Display Table\7f1808799
+Node: Character Descriptors\7f1812794
+Node: Beeping\7f1813551
+Node: Hash Tables\7f1818317
+Node: Introduction to Hash Tables\7f1818925
+Node: Working With Hash Tables\7f1824948
+Node: Weak Hash Tables\7f1826065
+Node: Range Tables\7f1827864
+Node: Introduction to Range Tables\7f1828553
+Node: Working With Range Tables\7f1828984
+Node: Databases\7f1829869
+Node: Connecting to a Database\7f1830168
+Node: Working With a Database\7f1831259
+Node: Other Database Functions\7f1832117
+Node: Processes\7f1832691
+Node: Subprocess Creation\7f1834915
+Node: Synchronous Processes\7f1838204
+Node: MS-DOS Subprocesses\7f1844922
+Node: Asynchronous Processes\7f1845996
+Node: Deleting Processes\7f1849709
+Node: Process Information\7f1851580
+Node: Input to Processes\7f1855506
+Node: Signals to Processes\7f1857796
+Node: Output from Processes\7f1862216
+Node: Process Buffers\7f1863028
+Node: Filter Functions\7f1865895
+Node: Accepting Output\7f1871465
+Node: Sentinels\7f1872992
+Node: Process Window Size\7f1876482
+Node: Transaction Queues\7f1876831
+Node: Network\7f1878529
+Node: System Interface\7f1880363
+Node: Starting Up\7f1881633
+Node: Start-up Summary\7f1882227
+Node: Init File\7f1885781
+Node: Terminal-Specific\7f1888162
+Node: Command Line Arguments\7f1891321
+Node: Getting Out\7f1894810
+Node: Killing XEmacs\7f1895379
+Node: Suspending XEmacs\7f1897048
+Node: System Environment\7f1900390
+Node: User Identification\7f1907057
+Node: Time of Day\7f1910586
+Node: Time Conversion\7f1913373
+Node: Timers\7f1918413
+Node: Terminal Input\7f1920586
+Node: Input Modes\7f1921089
+Node: Translating Input\7f1923502
+Node: Recording Input\7f1927667
+Node: Terminal Output\7f1929767
+Node: Flow Control\7f1933390
+Node: Batch Mode\7f1937182
+Node: X-Windows\7f1938564
+Node: X Selections\7f1939435
+Node: X Server\7f1941645
+Node: Resources\7f1942096
+Node: Server Data\7f1947405
+Node: Grabs\7f1948612
+Node: X Miscellaneous\7f1950192
+Node: ToolTalk Support\7f1952577
+Node: XEmacs ToolTalk API Summary\7f1952794
+Node: Sending Messages\7f1954094
+Node: Example of Sending Messages\7f1954345
+Node: Elisp Interface for Sending Messages\7f1955407
+Node: Receiving Messages\7f1961799
+Node: Example of Receiving Messages\7f1962022
+Node: Elisp Interface for Receiving Messages\7f1962858
+Node: LDAP Support\7f1966683
+Node: Building XEmacs with LDAP support\7f1967177
+Node: XEmacs LDAP API\7f1968154
+Node: LDAP Variables\7f1969206
+Node: The High-Level LDAP API\7f1971806
+Node: The Low-Level LDAP API\7f1975269
+Node: The LDAP Lisp Object\7f1976100
+Node: Opening and Closing a LDAP Connection\7f1976653
+Node: Low-level Operations on a LDAP Server\7f1978453
+Node: LDAP Internationalization\7f1981147
+Node: LDAP Internationalization Variables\7f1982052
+Node: Encoder/Decoder Functions\7f1983781
+Node: Syntax of Search Filters\7f1984820
+Node: PostgreSQL Support\7f1986118
+Node: Building XEmacs with PostgreSQL support\7f1986513
+Node: XEmacs PostgreSQL libpq API\7f1987780
+Node: libpq Lisp Variables\7f1989655
+Node: libpq Lisp Symbols and DataTypes\7f1992619
+Node: Synchronous Interface Functions\7f2005859
+Node: Asynchronous Interface Functions\7f2010350
+Node: Large Object Support\7f2013851
+Node: Other libpq Functions\7f2014478
+Node: Unimplemented libpq Functions\7f2017513
+Node: XEmacs PostgreSQL libpq Examples\7f2022832
+Node: Internationalization\7f2028923
+Node: I18N Levels 1 and 2\7f2029266
+Node: I18N Level 3\7f2029972
+Node: Level 3 Basics\7f2030253
+Node: Level 3 Primitives\7f2031086
+Node: Dynamic Messaging\7f2032692
+Node: Domain Specification\7f2033155
+Node: Documentation String Extraction\7f2035058
+Node: I18N Level 4\7f2035976
+Node: MULE\7f2036168
+Node: Internationalization Terminology\7f2037217
+Node: Charsets\7f2049416
+Node: Charset Properties\7f2050112
+Node: Basic Charset Functions\7f2054827
+Node: Charset Property Functions\7f2057008
+Node: Predefined Charsets\7f2059050
+Node: MULE Characters\7f2061970
+Node: Composite Characters\7f2062817
+Node: Coding Systems\7f2064077
+Node: Coding System Types\7f2066217
+Node: ISO 2022\7f2070201
+Node: EOL Conversion\7f2082478
+Node: Coding System Properties\7f2083650
+Node: Basic Coding System Functions\7f2087967
+Node: Coding System Property Functions\7f2090001
+Node: Encoding and Decoding Text\7f2090559
+Node: Detection of Textual Encoding\7f2091695
+Node: Big5 and Shift-JIS Functions\7f2093231
+Node: Predefined Coding Systems\7f2094357
+Node: CCL\7f2106451
+Node: CCL Syntax\7f2109555
+Node: CCL Statements\7f2111131
+Node: CCL Expressions\7f2115779
+Node: Calling CCL\7f2118318
+Node: CCL Examples\7f2121307
+Node: Category Tables\7f2121444
+Node: Tips\7f2123802
+Node: Style Tips\7f2124443
+Node: Compilation Tips\7f2133962
+Node: Documentation Tips\7f2135876
+Node: Comment Tips\7f2141385
+Node: Library Headers\7f2144387
+Node: Building XEmacs and Object Allocation\7f2148359
+Node: Building XEmacs\7f2149242
+Node: Pure Storage\7f2155577
+Node: Garbage Collection\7f2158365
+Node: Standard Errors\7f2169504
+Node: Standard Buffer-Local Variables\7f2173713
+Node: Standard Keymaps\7f2176346
+Node: Standard Hooks\7f2180078
+Node: Index\7f2187578
\1f
End Tag Table
file that gets the error will not, of course, produce any compiled
code.)
- % emacs -batch -f batch-byte-compile *.el
+ % xemacs -batch -f batch-byte-compile *.el
- Function: batch-byte-recompile-directory
This function is similar to `batch-byte-compile' but runs the
* 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.
\1f
-File: lispref.info, Node: Toolbar Intro, Next: Toolbar Descriptor Format, Up: Toolbar
+File: lispref.info, Node: Toolbar Intro, Next: Creating Toolbar, Up: Toolbar
Toolbar Intro
=============
toolbar to the same position, it will just not be visible.
\1f
-File: lispref.info, Node: Toolbar Descriptor Format, Next: Specifying the Toolbar, Prev: Toolbar Intro, Up: Toolbar
+File: lispref.info, Node: Creating Toolbar, Next: Toolbar Descriptor Format, Prev: Toolbar Intro, Up: Toolbar
+
+Creating Toolbar
+================
+
+ - Function: 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. *Note
+ Specifiers::, 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.
+
+\1f
+File: lispref.info, Node: Toolbar Descriptor Format, Next: Specifying the Toolbar, Prev: Creating Toolbar, Up: Toolbar
Toolbar Descriptor Format
=========================
* 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.
\1f
-File: lispref.info, Node: Gutter Intro, Next: Gutter Descriptor Format, Up: Gutter
+File: lispref.info, Node: Gutter Intro, Next: Creating Gutter, Prev: Gutter, Up: Gutter
Gutter Intro
============
gutter to the same position, it will just not be visible.
\1f
-File: lispref.info, Node: Gutter Descriptor Format, Next: Specifying a Gutter, Prev: Gutter Intro, Up: Gutter
+File: lispref.info, Node: Creating Gutter, Next: Gutter Descriptor Format, Prev: Gutter Intro, Up: Gutter
+
+Creating Gutter
+===============
+
+ - Function: 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. *Note Specifiers::, 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.
+
+ - Function: 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. *Note Specifiers::, 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.
+
+ - Function: 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. *Note Specifiers::, 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.
+
+\1f
+File: lispref.info, Node: Gutter Descriptor Format, Next: Specifying a Gutter, Prev: Creating Gutter, Up: Gutter
Gutter Descriptor Format
========================
File: lispref.info, Node: Buffer Tabs, Next: Progress Bars, Up: Common Gutter Widgets
Buffer Tabs
-===========
+-----------
Not documented yet.
File: lispref.info, Node: Progress Bars, Prev: Buffer Tabs, Up: Common Gutter Widgets
Progress Bars
-=============
+-------------
Not documented yet.
For information about the OffiX project have a look at
http://leb.net/~offix/
-\1f
-File: lispref.info, Node: CDE dt, Next: MSWindows OLE, Prev: OffiX DND, Up: Supported Protocols
-
-CDE dt
-------
-
- CDE stands for Common Desktop Environment. It is based on the Motif
-widget library. It's drag'n'drop protocol is also an abstraction of the
-Motif protocol (so it might be possible, that XEmacs will also support
-the Motif protocol soon).
-
- CDE has three different types: file, buffer, and text. XEmacs only
-uses file and buffer drags. The API will disallow full URL drags, only
-file method URLs are passed through.
-
- Buffer drags are always converted to plain text.
-
-\1f
-File: lispref.info, Node: MSWindows OLE, Next: Loose ends, Prev: CDE dt, Up: Supported Protocols
-
-MSWindows OLE
--------------
-
- Only allows file drags and drops.
-
-\1f
-File: lispref.info, Node: Loose ends, Prev: MSWindows OLE, Up: Supported Protocols
-
-Loose ends
-----------
-
- The following protocols will be supported soon: Xdnd, Motif, Xde (if
-I get some specs), KDE OffiX (if KDE can find XEmacs windows).
-
- In particular Xdnd will be one of the protocols that can benefit from
-the XEmacs API, cause it also uses MIME types to encode dragged data.
-
-\1f
-File: lispref.info, Node: Drop Interface, Next: Drag Interface, Prev: Supported Protocols, Up: Drag and Drop
-
-Drop Interface
-==============
-
- For each activated low-level protocol, a internal routine will catch
-incoming drops and convert them to a dragdrop-drop type misc-user-event.
-
- This misc-user-event has its function argument set to
-`dragdrop-drop-dispatch' and the object contains the data of the drop
-(converted to URL/MIME specific data). This function will search the
-variable `experimental-dragdrop-drop-functions' for a function that can
-handle the dropped data.
-
- To modify the drop behavior, the user can modify the variable
-`experimental-dragdrop-drop-functions'. Each element of this list
-specifies a possible handler for dropped data. The first one that can
-handle the data will return `t' and exit. Another possibility is to set
-a extent-property with the same name. Extents are checked prior to the
-variable.
-
- The customization group `drag-n-drop' shows all variables of user
-interest.
-
-\1f
-File: lispref.info, Node: Drag Interface, Prev: Drop Interface, Up: Drag and Drop
-
-Drag Interface
-==============
-
- This describes the drag API (not implemented yet).
-
-\1f
-File: lispref.info, Node: Modes, Next: Documentation, Prev: Drag and Drop, Up: Top
-
-Major and Minor Modes
-*********************
-
- A "mode" is a set of definitions that customize XEmacs and can be
-turned on and off while you edit. There are two varieties of modes:
-"major modes", which are mutually exclusive and used for editing
-particular kinds of text, and "minor modes", which provide features
-that users can enable individually.
-
- This chapter describes how to write both major and minor modes, how
-to indicate them in the modeline, and how they run hooks supplied by the
-user. For related topics such as keymaps and syntax tables, see *Note
-Keymaps::, and *Note Syntax Tables::.
-
-* Menu:
-
-* Major Modes:: Defining major modes.
-* Minor Modes:: Defining minor modes.
-* Modeline Format:: Customizing the text that appears in the modeline.
-* Hooks:: How to use hooks; how to write code that provides hooks.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: CDE dt, Next: MSWindows OLE, Prev: OffiX DND, Up: Supported Protocols
+
+CDE dt
+------
+
+ CDE stands for Common Desktop Environment. It is based on the Motif
+widget library. It's drag'n'drop protocol is also an abstraction of the
+Motif protocol (so it might be possible, that XEmacs will also support
+the Motif protocol soon).
+
+ CDE has three different types: file, buffer, and text. XEmacs only
+uses file and buffer drags. The API will disallow full URL drags, only
+file method URLs are passed through.
+
+ Buffer drags are always converted to plain text.
+
+\1f
+File: lispref.info, Node: MSWindows OLE, Next: Loose ends, Prev: CDE dt, Up: Supported Protocols
+
+MSWindows OLE
+-------------
+
+ Only allows file drags and drops.
+
+\1f
+File: lispref.info, Node: Loose ends, Prev: MSWindows OLE, Up: Supported Protocols
+
+Loose ends
+----------
+
+ The following protocols will be supported soon: Xdnd, Motif, Xde (if
+I get some specs), KDE OffiX (if KDE can find XEmacs windows).
+
+ In particular Xdnd will be one of the protocols that can benefit from
+the XEmacs API, cause it also uses MIME types to encode dragged data.
+
+\1f
+File: lispref.info, Node: Drop Interface, Next: Drag Interface, Prev: Supported Protocols, Up: Drag and Drop
+
+Drop Interface
+==============
+
+ For each activated low-level protocol, a internal routine will catch
+incoming drops and convert them to a dragdrop-drop type misc-user-event.
+
+ This misc-user-event has its function argument set to
+`dragdrop-drop-dispatch' and the object contains the data of the drop
+(converted to URL/MIME specific data). This function will search the
+variable `experimental-dragdrop-drop-functions' for a function that can
+handle the dropped data.
+
+ To modify the drop behavior, the user can modify the variable
+`experimental-dragdrop-drop-functions'. Each element of this list
+specifies a possible handler for dropped data. The first one that can
+handle the data will return `t' and exit. Another possibility is to set
+a extent-property with the same name. Extents are checked prior to the
+variable.
+
+ The customization group `drag-n-drop' shows all variables of user
+interest.
+
+\1f
+File: lispref.info, Node: Drag Interface, Prev: Drop Interface, Up: Drag and Drop
+
+Drag Interface
+==============
+
+ This describes the drag API (not implemented yet).
+
+\1f
+File: lispref.info, Node: Modes, Next: Documentation, Prev: Drag and Drop, Up: Top
+
+Major and Minor Modes
+*********************
+
+ A "mode" is a set of definitions that customize XEmacs and can be
+turned on and off while you edit. There are two varieties of modes:
+"major modes", which are mutually exclusive and used for editing
+particular kinds of text, and "minor modes", which provide features
+that users can enable individually.
+
+ This chapter describes how to write both major and minor modes, how
+to indicate them in the modeline, and how they run hooks supplied by the
+user. For related topics such as keymaps and syntax tables, see *Note
+Keymaps::, and *Note Syntax Tables::.
+
+* Menu:
+
+* Major Modes:: Defining major modes.
+* Minor Modes:: Defining minor modes.
+* Modeline Format:: Customizing the text that appears in the modeline.
+* Hooks:: How to use hooks; how to write code that provides hooks.
+
+\1f
File: lispref.info, Node: Major Modes, Next: Minor Modes, Up: Modes
Major Modes
The modeline contents are controlled by a data structure of lists,
strings, symbols, and numbers kept in the buffer-local variable
-`mode-line-format'. The data structure is called a "modeline
+`modeline-format'. The data structure is called a "modeline
construct", and it is built in recursive fashion out of simpler modeline
constructs. The same data structure is used for constructing frame
titles (*note Frame Titles::).
very few modes need to alter `modeline-format'. For most purposes, it
is sufficient to alter the variables referenced by `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.
`STRING'
A string as a modeline construct is displayed verbatim in the mode
`SYMBOL'
A symbol as a modeline construct stands for its value. The value
- of SYMBOL is used as a modeline construct, in place of SYMBOL.
- However, the symbols `t' and `nil' are ignored; so is any symbol
- whose value is void.
+ of SYMBOL is processed as a modeline construct, in place of
+ SYMBOL. However, the symbols `t' and `nil' are ignored; so is any
+ symbol whose value is void.
There is one exception: if the value of SYMBOL is a string, it is
displayed verbatim: the `%'-constructs are not recognized.
+`GLYPH'
+ A glyph is displayed as is.
+
+`GENERIC-SPECIFIER'
+ A GENERIC-SPECIFIER (i.e. a specifier of type `generic') stands
+ for its instance. The instance of GENERIC-SPECIFIER is computed
+ in the current window using the equivalent of `specifier-instance'
+ and the value is processed.
+
`(STRING REST...) or (LIST REST...)'
A list whose first element is a string or list means to process
all the elements recursively and concatenate the results. This is
above the top of the window is to use a list like this: `(-3
"%p")'.
+`(EXTENT REST...)'
+ 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.
+
If you do alter `modeline-format' itself, the new value should use
the same variables that appear in the default value (*note Modeline
Variables::), rather than duplicating their contents or displaying the
so, which kind. Its value is `nil' for no version control, or a
string that appears in the mode line.
-\1f
-File: lispref.info, Node: %-Constructs, Prev: Modeline Variables, Up: Modeline Format
-
-`%'-Constructs in the ModeLine
-------------------------------
-
- The following table lists the recognized `%'-constructs and what
-they mean. In any construct except `%%', you can add a decimal integer
-after the `%' to specify how many characters to display.
-
-`%b'
- The current buffer name, obtained with the `buffer-name' function.
- *Note Buffer Names::.
-
-`%f'
- The visited file name, obtained with the `buffer-file-name'
- function. *Note Buffer File Name::.
-
-`%F'
- The name of the selected frame.
-
-`%c'
- The current column number of point.
-
-`%l'
- The current line number of point.
-
-`%*'
- `%' if the buffer is read only (see `buffer-read-only');
- `*' if the buffer is modified (see `buffer-modified-p');
- `-' otherwise. *Note Buffer Modification::.
-
-`%+'
- `*' if the buffer is modified (see `buffer-modified-p');
- `%' if the buffer is read only (see `buffer-read-only');
- `-' otherwise. This differs from `%*' only for a modified
- read-only buffer. *Note Buffer Modification::.
-
-`%&'
- `*' if the buffer is modified, and `-' otherwise.
-
-`%s'
- The status of the subprocess belonging to the current buffer,
- obtained with `process-status'. *Note Process Information::.
-
-`%l'
- the current line number.
-
-`%S'
- the name of the selected frame; this is only meaningful under the
- X Window System. *Note Frame Name::.
-
-`%t'
- Whether the visited file is a text file or a binary file. (This
- is a meaningful distinction only on certain operating systems.)
-
-`%p'
- The percentage of the buffer text above the *top* of window, or
- `Top', `Bottom' or `All'.
-
-`%P'
- The percentage of the buffer text that is above the *bottom* of
- the window (which includes the text visible in the window, as well
- as the text above the top), plus `Top' if the top of the buffer is
- visible on screen; or `Bottom' or `All'.
-
-`%n'
- `Narrow' when narrowing is in effect; nothing otherwise (see
- `narrow-to-region' in *Note Narrowing::).
-
-`%['
- An indication of the depth of recursive editing levels (not
- counting minibuffer levels): one `[' for each editing level.
- *Note Recursive Editing::.
-
-`%]'
- One `]' for each recursive editing level (not counting minibuffer
- levels).
-
-`%%'
- The character `%'--this is how to include a literal `%' in a
- string in which `%'-constructs are allowed.
-
-`%-'
- Dashes sufficient to fill the remainder of the modeline.
-
- The following two `%'-constructs are still supported, but they are
-obsolete, since you can get the same results with the variables
-`mode-name' and `global-mode-string'.
-
-`%m'
- The value of `mode-name'.
-
-`%M'
- The value of `global-mode-string'. Currently, only `display-time'
- modifies the value of `global-mode-string'.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: %-Constructs, Prev: Modeline Variables, Up: Modeline Format
+
+`%'-Constructs in the ModeLine
+------------------------------
+
+ The following table lists the recognized `%'-constructs and what
+they mean. In any construct except `%%', you can add a decimal integer
+after the `%' to specify how many characters to display.
+
+`%b'
+ The current buffer name, obtained with the `buffer-name' function.
+ *Note Buffer Names::.
+
+`%f'
+ The visited file name, obtained with the `buffer-file-name'
+ function. *Note Buffer File Name::.
+
+`%F'
+ The name of the selected frame.
+
+`%c'
+ The current column number of point.
+
+`%l'
+ The current line number of point.
+
+`%*'
+ `%' if the buffer is read only (see `buffer-read-only');
+ `*' if the buffer is modified (see `buffer-modified-p');
+ `-' otherwise. *Note Buffer Modification::.
+
+`%+'
+ `*' if the buffer is modified (see `buffer-modified-p');
+ `%' if the buffer is read only (see `buffer-read-only');
+ `-' otherwise. This differs from `%*' only for a modified
+ read-only buffer. *Note Buffer Modification::.
+
+`%&'
+ `*' if the buffer is modified, and `-' otherwise.
+
+`%s'
+ The status of the subprocess belonging to the current buffer,
+ obtained with `process-status'. *Note Process Information::.
+
+`%l'
+ The current line number.
+
+`%S'
+ The name of the selected frame; this is only meaningful under the
+ X Window System. *Note Frame Name::.
+
+`%t'
+ Whether the visited file is a text file or a binary file. (This
+ is a meaningful distinction only on certain operating systems.)
+
+`%p'
+ The percentage of the buffer text above the *top* of window, or
+ `Top', `Bottom' or `All'.
+
+`%P'
+ The percentage of the buffer text that is above the *bottom* of
+ the window (which includes the text visible in the window, as well
+ as the text above the top), plus `Top' if the top of the buffer is
+ visible on screen; or `Bottom' or `All'.
+
+`%n'
+ `Narrow' when narrowing is in effect; nothing otherwise (see
+ `narrow-to-region' in *Note Narrowing::).
+
+`%C'
+ Under XEmacs/mule, the mnemonic for `buffer-file-coding-system'.
+
+`%['
+ An indication of the depth of recursive editing levels (not
+ counting minibuffer levels): one `[' for each editing level.
+ *Note Recursive Editing::.
+
+`%]'
+ One `]' for each recursive editing level (not counting minibuffer
+ levels).
+
+`%%'
+ The character `%'--this is how to include a literal `%' in a
+ string in which `%'-constructs are allowed.
+
+`%-'
+ Dashes sufficient to fill the remainder of the modeline.
+
+ The following two `%'-constructs are still supported, but they are
+obsolete, since you can get the same results with the variables
+`mode-name' and `global-mode-string'.
+
+`%m'
+ The value of `mode-name'.
+
+`%M'
+ The value of `global-mode-string'. Currently, only `display-time'
+ modifies the value of `global-mode-string'.
+
+\1f
File: lispref.info, Node: Hooks, Prev: Modeline Format, Up: Modes
Hooks
The last thing `after-find-file' does is call all the functions in
`find-file-hooks'.
-\1f
-File: lispref.info, Node: Saving Buffers, Next: Reading from Files, Prev: Visiting Files, Up: Files
-
-Saving Buffers
-==============
-
- When you edit a file in XEmacs, you are actually working on a buffer
-that is visiting that file--that is, the contents of the file are
-copied into the buffer and the copy is what you edit. Changes to the
-buffer do not change the file until you "save" the buffer, which means
-copying the contents of the buffer into the file.
-
- - Command: save-buffer &optional backup-option
- This function saves the contents of the current buffer in its
- visited file if the buffer has been modified since it was last
- visited or saved. Otherwise it does nothing.
-
- `save-buffer' is responsible for making backup files. Normally,
- BACKUP-OPTION is `nil', and `save-buffer' makes a backup file only
- if this is the first save since visiting the file. Other values
- for BACKUP-OPTION request the making of backup files in other
- circumstances:
-
- * With an argument of 4 or 64, reflecting 1 or 3 `C-u''s, the
- `save-buffer' function marks this version of the file to be
- backed up when the buffer is next saved.
-
- * With an argument of 16 or 64, reflecting 2 or 3 `C-u''s, the
- `save-buffer' function unconditionally backs up the previous
- version of the file before saving it.
-
- - Command: save-some-buffers &optional save-silently-p exiting
- This command saves some modified file-visiting buffers. Normally
- it asks the user about each buffer. But if SAVE-SILENTLY-P is
- non-`nil', it saves all the file-visiting buffers without querying
- the user.
-
- The optional EXITING argument, if non-`nil', requests this
- function to offer also to save certain other buffers that are not
- visiting files. These are buffers that have a non-`nil' local
- value of `buffer-offer-save'. (A user who says yes to saving one
- of these is asked to specify a file name to use.) The
- `save-buffers-kill-emacs' function passes a non-`nil' value for
- this argument.
-
- - Variable: buffer-offer-save
- When this variable is non-`nil' in a buffer, XEmacs offers to save
- the buffer on exit even if the buffer is not visiting a file. The
- variable is automatically local in all buffers. Normally, Mail
- mode (used for editing outgoing mail) sets this to `t'.
-
- - Command: write-file filename
- This function writes the current buffer into file FILENAME, makes
- the buffer visit that file, and marks it not modified. Then it
- renames the buffer based on FILENAME, appending a string like `<2>'
- if necessary to make a unique buffer name. It does most of this
- work by calling `set-visited-file-name' and `save-buffer'.
-
- - Variable: write-file-hooks
- The value of this variable is a list of functions to be called
- before writing out a buffer to its visited file. If one of them
- returns non-`nil', the file is considered already written and the
- rest of the functions are not called, nor is the usual code for
- writing the file executed.
-
- If a function in `write-file-hooks' returns non-`nil', it is
- responsible for making a backup file (if that is appropriate). To
- do so, execute the following code:
-
- (or buffer-backed-up (backup-buffer))
-
- You might wish to save the file modes value returned by
- `backup-buffer' and use that to set the mode bits of the file that
- you write. This is what `save-buffer' normally does.
-
- Even though this is not a normal hook, you can use `add-hook' and
- `remove-hook' to manipulate the list. *Note Hooks::.
-
- - Variable: local-write-file-hooks
- This works just like `write-file-hooks', but it is intended to be
- made local to particular buffers. It's not a good idea to make
- `write-file-hooks' local to a buffer--use this variable instead.
-
- The variable is marked as a permanent local, so that changing the
- major mode does not alter a buffer-local value. This is
- convenient for packages that read "file" contents in special ways,
- and set up hooks to save the data in a corresponding way.
-
- - Variable: write-contents-hooks
- This works just like `write-file-hooks', but it is intended for
- hooks that pertain to the contents of the file, as opposed to
- hooks that pertain to where the file came from. Such hooks are
- usually set up by major modes, as buffer-local bindings for this
- variable. Switching to a new major mode always resets this
- variable.
-
- - Variable: after-save-hook
- This normal hook runs after a buffer has been saved in its visited
- file.
-
- - Variable: file-precious-flag
- If this variable is non-`nil', then `save-buffer' protects against
- I/O errors while saving by writing the new file to a temporary
- name instead of the name it is supposed to have, and then renaming
- it to the intended name after it is clear there are no errors.
- This procedure prevents problems such as a lack of disk space from
- resulting in an invalid file.
-
- As a side effect, backups are necessarily made by copying. *Note
- Rename or Copy::. Yet, at the same time, saving a precious file
- always breaks all hard links between the file you save and other
- file names.
-
- Some modes set this variable non-`nil' locally in particular
- buffers.
-
- - User Option: require-final-newline
- This variable determines whether files may be written out that do
- _not_ end with a newline. If the value of the variable is `t',
- then `save-buffer' silently adds a newline at the end of the file
- whenever the buffer being saved does not already end in one. If
- the value of the variable is non-`nil', but not `t', then
- `save-buffer' asks the user whether to add a newline each time the
- case arises.
-
- If the value of the variable is `nil', then `save-buffer' doesn't
- add newlines at all. `nil' is the default value, but a few major
- modes set it to `t' in particular buffers.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Saving Buffers, Next: Reading from Files, Prev: Visiting Files, Up: Files
+
+Saving Buffers
+==============
+
+ When you edit a file in XEmacs, you are actually working on a buffer
+that is visiting that file--that is, the contents of the file are
+copied into the buffer and the copy is what you edit. Changes to the
+buffer do not change the file until you "save" the buffer, which means
+copying the contents of the buffer into the file.
+
+ - Command: save-buffer &optional backup-option
+ This function saves the contents of the current buffer in its
+ visited file if the buffer has been modified since it was last
+ visited or saved. Otherwise it does nothing.
+
+ `save-buffer' is responsible for making backup files. Normally,
+ BACKUP-OPTION is `nil', and `save-buffer' makes a backup file only
+ if this is the first save since visiting the file. Other values
+ for BACKUP-OPTION request the making of backup files in other
+ circumstances:
+
+ * With an argument of 4 or 64, reflecting 1 or 3 `C-u''s, the
+ `save-buffer' function marks this version of the file to be
+ backed up when the buffer is next saved.
+
+ * With an argument of 16 or 64, reflecting 2 or 3 `C-u''s, the
+ `save-buffer' function unconditionally backs up the previous
+ version of the file before saving it.
+
+ - Command: save-some-buffers &optional save-silently-p exiting
+ This command saves some modified file-visiting buffers. Normally
+ it asks the user about each buffer. But if SAVE-SILENTLY-P is
+ non-`nil', it saves all the file-visiting buffers without querying
+ the user.
+
+ The optional EXITING argument, if non-`nil', requests this
+ function to offer also to save certain other buffers that are not
+ visiting files. These are buffers that have a non-`nil' local
+ value of `buffer-offer-save'. (A user who says yes to saving one
+ of these is asked to specify a file name to use.) The
+ `save-buffers-kill-emacs' function passes a non-`nil' value for
+ this argument.
+
+ - Variable: buffer-offer-save
+ When this variable is non-`nil' in a buffer, XEmacs offers to save
+ the buffer on exit even if the buffer is not visiting a file. The
+ variable is automatically local in all buffers. Normally, Mail
+ mode (used for editing outgoing mail) sets this to `t'.
+
+ - Command: write-file filename
+ This function writes the current buffer into file FILENAME, makes
+ the buffer visit that file, and marks it not modified. Then it
+ renames the buffer based on FILENAME, appending a string like `<2>'
+ if necessary to make a unique buffer name. It does most of this
+ work by calling `set-visited-file-name' and `save-buffer'.
+
+ - Variable: write-file-hooks
+ The value of this variable is a list of functions to be called
+ before writing out a buffer to its visited file. If one of them
+ returns non-`nil', the file is considered already written and the
+ rest of the functions are not called, nor is the usual code for
+ writing the file executed.
+
+ If a function in `write-file-hooks' returns non-`nil', it is
+ responsible for making a backup file (if that is appropriate). To
+ do so, execute the following code:
+
+ (or buffer-backed-up (backup-buffer))
+
+ You might wish to save the file modes value returned by
+ `backup-buffer' and use that to set the mode bits of the file that
+ you write. This is what `save-buffer' normally does.
+
+ Even though this is not a normal hook, you can use `add-hook' and
+ `remove-hook' to manipulate the list. *Note Hooks::.
+
+ - Variable: local-write-file-hooks
+ This works just like `write-file-hooks', but it is intended to be
+ made local to particular buffers. It's not a good idea to make
+ `write-file-hooks' local to a buffer--use this variable instead.
+
+ The variable is marked as a permanent local, so that changing the
+ major mode does not alter a buffer-local value. This is
+ convenient for packages that read "file" contents in special ways,
+ and set up hooks to save the data in a corresponding way.
+
+ - Variable: write-contents-hooks
+ This works just like `write-file-hooks', but it is intended for
+ hooks that pertain to the contents of the file, as opposed to
+ hooks that pertain to where the file came from. Such hooks are
+ usually set up by major modes, as buffer-local bindings for this
+ variable. Switching to a new major mode always resets this
+ variable.
+
+ - Variable: after-save-hook
+ This normal hook runs after a buffer has been saved in its visited
+ file.
+
+ - Variable: file-precious-flag
+ If this variable is non-`nil', then `save-buffer' protects against
+ I/O errors while saving by writing the new file to a temporary
+ name instead of the name it is supposed to have, and then renaming
+ it to the intended name after it is clear there are no errors.
+ This procedure prevents problems such as a lack of disk space from
+ resulting in an invalid file.
+
+ As a side effect, backups are necessarily made by copying. *Note
+ Rename or Copy::. Yet, at the same time, saving a precious file
+ always breaks all hard links between the file you save and other
+ file names.
+
+ Some modes set this variable non-`nil' locally in particular
+ buffers.
+
+ - User Option: require-final-newline
+ This variable determines whether files may be written out that do
+ _not_ end with a newline. If the value of the variable is `t',
+ then `save-buffer' silently adds a newline at the end of the file
+ whenever the buffer being saved does not already end in one. If
+ the value of the variable is non-`nil', but not `t', then
+ `save-buffer' asks the user whether to add a newline each time the
+ case arises.
+
+ If the value of the variable is `nil', then `save-buffer' doesn't
+ add newlines at all. `nil' is the default value, but a few major
+ modes set it to `t' in particular buffers.
+
+\1f
File: lispref.info, Node: Reading from Files, Next: Writing to Files, Prev: Saving Buffers, Up: Files
Reading from Files
completion-ignored-extensions
=> (".o" ".elc" "~" ".dvi")
-\1f
-File: lispref.info, Node: User Name Completion, Prev: File Name Completion, Up: File Names
-
-User Name Completion
---------------------
-
- This section describes low-level subroutines for completing a user
-name. For other completion functions, see *Note Completion::.
-
- - Function: user-name-all-completions partial-username
- This function returns a list of all possible completions for a user
- whose name starts with PARTIAL-USERNAME. The order of the
- completions is unpredictable and conveys no useful information.
-
- The argument PARTIAL-USERNAME must be a partial user name
- containing no tilde character and no slash.
-
- - Function: user-name-completion username
- This function completes the user name USERNAME. It returns the
- longest prefix common to all user names that start with USERNAME.
-
- If only one match exists and USERNAME matches it exactly, the
- function returns `t'. The function returns `nil' if no user name
- starting with USERNAME exists.
-
- - Function: user-name-completion-1 username
- This function completes the user name USERNAME, like
- `user-name-completion', differing only in the return value. This
- function returns the cons of the completion returned by
- `user-name-completion', and a boolean indicating whether that
- completion was unique.
-
-\1f
-File: lispref.info, Node: Contents of Directories, Next: Create/Delete Dirs, Prev: File Names, Up: Files
-
-Contents of Directories
-=======================
-
- A directory is a kind of file that contains other files entered under
-various names. Directories are a feature of the file system.
-
- XEmacs can list the names of the files in a directory as a Lisp list,
-or display the names in a buffer using the `ls' shell command. In the
-latter case, it can optionally display information about each file,
-depending on the value of switches passed to the `ls' command.
-
- - Function: directory-files directory &optional full-name match-regexp
- nosort files-only
- This function returns a list of the names of the files in the
- directory DIRECTORY. By default, the list is in alphabetical
- order.
-
- If FULL-NAME is non-`nil', the function returns the files'
- absolute file names. Otherwise, it returns just the names
- relative to the specified directory.
-
- If MATCH-REGEXP is non-`nil', this function returns only those
- file names that contain that regular expression--the other file
- names are discarded from the list.
-
- If NOSORT is non-`nil', `directory-files' does not sort the list,
- so you get the file names in no particular order. Use this if you
- want the utmost possible speed and don't care what order the files
- are processed in. If the order of processing is visible to the
- user, then the user will probably be happier if you do sort the
- names.
-
- If FILES-ONLY is the symbol `t', then only the "files" in the
- directory will be returned; subdirectories will be excluded. If
- FILES-ONLY is not `nil' and not `t', then only the subdirectories
- will be returned. Otherwise, if FILES-ONLY is `nil' (the default)
- then both files and subdirectories will be returned.
-
- (directory-files "~lewis")
- => ("#foo#" "#foo.el#" "." ".."
- "dired-mods.el" "files.texi"
- "files.texi.~1~")
-
- An error is signaled if DIRECTORY is not the name of a directory
- that can be read.
-
- - Function: insert-directory file switches &optional wildcard
- full-directory-p
- This function inserts (in the current buffer) a directory listing
- for directory FILE, formatted with `ls' according to SWITCHES. It
- leaves point after the inserted text.
-
- The argument FILE may be either a directory name or a file
- specification including wildcard characters. If WILDCARD is
- non-`nil', that means treat FILE as a file specification with
- wildcards.
-
- If FULL-DIRECTORY-P is non-`nil', that means FILE is a directory
- and switches do not contain `-d', so that the listing should show
- the full contents of the directory. (The `-d' option to `ls' says
- to describe a directory itself rather than its contents.)
-
- This function works by running a directory listing program whose
- name is in the variable `insert-directory-program'. If WILDCARD is
- non-`nil', it also runs the shell specified by `shell-file-name',
- to expand the wildcards.
-
- - Variable: insert-directory-program
- This variable's value is the program to run to generate a
- directory listing for the function `insert-directory'.
-
-\1f
-File: lispref.info, Node: Create/Delete Dirs, Next: Magic File Names, Prev: Contents of Directories, Up: Files
-
-Creating and Deleting Directories
-=================================
-
- Most XEmacs Lisp file-manipulation functions get errors when used on
-files that are directories. For example, you cannot delete a directory
-with `delete-file'. These special functions exist to create and delete
-directories.
-
- - Command: make-directory dirname &optional parents
- This function creates a directory named DIRNAME. Interactively,
- the default choice of directory to create is the current default
- directory for file names. That is useful when you have visited a
- file in a nonexistent directory.
-
- Non-interactively, optional argument PARENTS says whether to
- create parent directories if they don't exist. (Interactively, this
- always happens.)
-
- - Command: delete-directory dirname
- This function deletes the directory named DIRNAME. The function
- `delete-file' does not work for files that are directories; you
- must use `delete-directory' in that case.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: User Name Completion, Prev: File Name Completion, Up: File Names
+
+User Name Completion
+--------------------
+
+ This section describes low-level subroutines for completing a user
+name. For other completion functions, see *Note Completion::.
+
+ - Function: user-name-all-completions partial-username
+ This function returns a list of all possible completions for a user
+ whose name starts with PARTIAL-USERNAME. The order of the
+ completions is unpredictable and conveys no useful information.
+
+ The argument PARTIAL-USERNAME must be a partial user name
+ containing no tilde character and no slash.
+
+ - Function: user-name-completion username
+ This function completes the user name USERNAME. It returns the
+ longest prefix common to all user names that start with USERNAME.
+
+ If only one match exists and USERNAME matches it exactly, the
+ function returns `t'. The function returns `nil' if no user name
+ starting with USERNAME exists.
+
+ - Function: user-name-completion-1 username
+ This function completes the user name USERNAME, like
+ `user-name-completion', differing only in the return value. This
+ function returns the cons of the completion returned by
+ `user-name-completion', and a boolean indicating whether that
+ completion was unique.
+
+\1f
+File: lispref.info, Node: Contents of Directories, Next: Create/Delete Dirs, Prev: File Names, Up: Files
+
+Contents of Directories
+=======================
+
+ A directory is a kind of file that contains other files entered under
+various names. Directories are a feature of the file system.
+
+ XEmacs can list the names of the files in a directory as a Lisp list,
+or display the names in a buffer using the `ls' shell command. In the
+latter case, it can optionally display information about each file,
+depending on the value of switches passed to the `ls' command.
+
+ - Function: directory-files directory &optional full-name match-regexp
+ nosort files-only
+ This function returns a list of the names of the files in the
+ directory DIRECTORY. By default, the list is in alphabetical
+ order.
+
+ If FULL-NAME is non-`nil', the function returns the files'
+ absolute file names. Otherwise, it returns just the names
+ relative to the specified directory.
+
+ If MATCH-REGEXP is non-`nil', this function returns only those
+ file names that contain that regular expression--the other file
+ names are discarded from the list.
+
+ If NOSORT is non-`nil', `directory-files' does not sort the list,
+ so you get the file names in no particular order. Use this if you
+ want the utmost possible speed and don't care what order the files
+ are processed in. If the order of processing is visible to the
+ user, then the user will probably be happier if you do sort the
+ names.
+
+ If FILES-ONLY is the symbol `t', then only the "files" in the
+ directory will be returned; subdirectories will be excluded. If
+ FILES-ONLY is not `nil' and not `t', then only the subdirectories
+ will be returned. Otherwise, if FILES-ONLY is `nil' (the default)
+ then both files and subdirectories will be returned.
+
+ (directory-files "~lewis")
+ => ("#foo#" "#foo.el#" "." ".."
+ "dired-mods.el" "files.texi"
+ "files.texi.~1~")
+
+ An error is signaled if DIRECTORY is not the name of a directory
+ that can be read.
+
+ - Function: insert-directory file switches &optional wildcard
+ full-directory-p
+ This function inserts (in the current buffer) a directory listing
+ for directory FILE, formatted with `ls' according to SWITCHES. It
+ leaves point after the inserted text.
+
+ The argument FILE may be either a directory name or a file
+ specification including wildcard characters. If WILDCARD is
+ non-`nil', that means treat FILE as a file specification with
+ wildcards.
+
+ If FULL-DIRECTORY-P is non-`nil', that means FILE is a directory
+ and switches do not contain `-d', so that the listing should show
+ the full contents of the directory. (The `-d' option to `ls' says
+ to describe a directory itself rather than its contents.)
+
+ This function works by running a directory listing program whose
+ name is in the variable `insert-directory-program'. If WILDCARD is
+ non-`nil', it also runs the shell specified by `shell-file-name',
+ to expand the wildcards.
+
+ - Variable: insert-directory-program
+ This variable's value is the program to run to generate a
+ directory listing for the function `insert-directory'.
+
+\1f
+File: lispref.info, Node: Create/Delete Dirs, Next: Magic File Names, Prev: Contents of Directories, Up: Files
+
+Creating and Deleting Directories
+=================================
+
+ Most XEmacs Lisp file-manipulation functions get errors when used on
+files that are directories. For example, you cannot delete a directory
+with `delete-file'. These special functions exist to create and delete
+directories.
+
+ - Command: make-directory dirname &optional parents
+ This function creates a directory named DIRNAME. Interactively,
+ the default choice of directory to create is the current default
+ directory for file names. That is useful when you have visited a
+ file in a nonexistent directory.
+
+ Non-interactively, optional argument PARENTS says whether to
+ create parent directories if they don't exist. (Interactively, this
+ always happens.)
+
+ - Command: delete-directory dirname
+ This function deletes the directory named DIRNAME. The function
+ `delete-file' does not work for files that are directories; you
+ must use `delete-directory' in that case.
+
+\1f
File: lispref.info, Node: Magic File Names, Next: Partial Files, Prev: Create/Delete Dirs, Up: Files
Making Certain File Names "Magic"
* Killing Buffers:: Buffers exist until explicitly killed.
* Indirect Buffers:: An indirect buffer shares text with some other buffer.
-\1f
-File: lispref.info, Node: Buffer Basics, Next: Current Buffer, Up: Buffers
-
-Buffer Basics
-=============
-
- A "buffer" is a Lisp object containing text to be edited. Buffers
-are used to hold the contents of files that are being visited; there may
-also be buffers that are not visiting files. While several buffers may
-exist at one time, exactly one buffer is designated the "current
-buffer" at any time. Most editing commands act on the contents of the
-current buffer. Each buffer, including the current buffer, may or may
-not be displayed in any windows.
-
- Buffers in Emacs editing are objects that have distinct names and
-hold text that can be edited. Buffers appear to Lisp programs as a
-special data type. You can think of the contents of a buffer as an
-extendable string; insertions and deletions may occur in any part of
-the buffer. *Note Text::.
-
- A Lisp buffer object contains numerous pieces of information. Some
-of this information is directly accessible to the programmer through
-variables, while other information is accessible only through
-special-purpose functions. For example, the visited file name is
-directly accessible through a variable, while the value of point is
-accessible only through a primitive function.
-
- Buffer-specific information that is directly accessible is stored in
-"buffer-local" variable bindings, which are variable values that are
-effective only in a particular buffer. This feature allows each buffer
-to override the values of certain variables. Most major modes override
-variables such as `fill-column' or `comment-column' in this way. For
-more information about buffer-local variables and functions related to
-them, see *Note Buffer-Local Variables::.
-
- For functions and variables related to visiting files in buffers, see
-*Note Visiting Files:: and *Note Saving Buffers::. For functions and
-variables related to the display of buffers in windows, see *Note
-Buffers and Windows::.
-
- - Function: bufferp object
- This function returns `t' if OBJECT is a buffer, `nil' otherwise.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Buffer Basics, Next: Current Buffer, Up: Buffers
+
+Buffer Basics
+=============
+
+ A "buffer" is a Lisp object containing text to be edited. Buffers
+are used to hold the contents of files that are being visited; there may
+also be buffers that are not visiting files. While several buffers may
+exist at one time, exactly one buffer is designated the "current
+buffer" at any time. Most editing commands act on the contents of the
+current buffer. Each buffer, including the current buffer, may or may
+not be displayed in any windows.
+
+ Buffers in Emacs editing are objects that have distinct names and
+hold text that can be edited. Buffers appear to Lisp programs as a
+special data type. You can think of the contents of a buffer as an
+extendable string; insertions and deletions may occur in any part of
+the buffer. *Note Text::.
+
+ A Lisp buffer object contains numerous pieces of information. Some
+of this information is directly accessible to the programmer through
+variables, while other information is accessible only through
+special-purpose functions. For example, the visited file name is
+directly accessible through a variable, while the value of point is
+accessible only through a primitive function.
+
+ Buffer-specific information that is directly accessible is stored in
+"buffer-local" variable bindings, which are variable values that are
+effective only in a particular buffer. This feature allows each buffer
+to override the values of certain variables. Most major modes override
+variables such as `fill-column' or `comment-column' in this way. For
+more information about buffer-local variables and functions related to
+them, see *Note Buffer-Local Variables::.
+
+ For functions and variables related to visiting files in buffers, see
+*Note Visiting Files:: and *Note Saving Buffers::. For functions and
+variables related to the display of buffers in windows, see *Note
+Buffers and Windows::.
+
+ - Function: bufferp object
+ This function returns `t' if OBJECT is a buffer, `nil' otherwise.
+
+\1f
File: lispref.info, Node: Current Buffer, Next: Buffer Names, Prev: Buffer Basics, Up: Buffers
The Current Buffer
information, *Note Annotations::.
If an extent has its `detachable' property set, it will become
-"detached" (i.e. no longer in the buffer) when all its text its
-deleted. Otherwise, it will simply shrink down to zero-length and sit
-it the same place in the buffer. By default, the `detachable' property
-is set on newly-created extents. *Note Detached Extents::.
+"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 in the
+same place in the buffer. By default, the `detachable' property is set
+on newly-created extents. *Note Detached Extents::.
If an extent has its `duplicable' property set, it will be
remembered when a string is created from text bounded by the extent.
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
+ 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 `define-specifier-tag'.) It is called a "tag set" (as
`font', `image', `face-boolean', or `toolbar'.
For more information on particular types of specifiers, see the
- functions `generic-specifier-p', `integer-specifier-p',
- `natnum-specifier-p', `boolean-specifier-p', `color-specifier-p',
- `font-specifier-p', `image-specifier-p',
- `face-boolean-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', and
+ `make-toolbar-specifier'.
- Function: make-specifier-and-init type spec-list &optional
dont-canonicalize
and the SPEC-LIST must already be in full form. See
`canonicalize-spec-list'.
+ - Function: 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.
+
+ Valid instantiators for integer specifiers are integers.
+
+ - Function: 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.
+
+ Valid instantiators for boolean specifiers are `t' and `nil'.
+
+ - Function: 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.
+
+ Valid instantiators for natnum specifiers are non-negative
+ integers.
+
+ - Function: 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.
+
+ Valid instantiators for generic specifiers are all Lisp values.
+ They are returned back unchanged when a specifier is instantiated.
+
+ - Function: 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.
+
+ Valid instantiators for display-table specifiers are described in
+ detail in the doc string for `current-display-table' (*note Active
+ Display Table::).
+
\1f
File: lispref.info, Node: Specifier Validation Functions, Next: Other Specification Functions, Prev: Creating Specifiers, Up: Specifiers
This predicate returns `t' if OBJECT is a font specifier, and
`nil' otherwise.
+ - Function: make-font-specifier spec-list
+ Return a new `font' 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. *Note Specifiers::, for
+ more information about 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).
+
\1f
File: lispref.info, Node: Font Instances, Next: Font Instance Names, Prev: Font Specifiers, Up: Fonts
which is 1 point smaller. Otherwise, it returns the next smaller
version of this font that is defined.
-\1f
-File: lispref.info, Node: Font Instance Characteristics, Next: Font Convenience Functions, Prev: Font Instance Size, Up: Fonts
-
-Font Instance Characteristics
------------------------------
-
- - Function: font-instance-properties font
- This function returns the properties (an alist or `nil') of
- FONT-INSTANCE.
-
- - Function: x-make-font-bold font &optional device
- Given an X font specification, this attempts to make a "bold" font.
- If it fails, it returns `nil'.
-
- - Function: x-make-font-unbold font &optional device
- Given an X font specification, this attempts to make a non-bold
- font. If it fails, it returns `nil'.
-
- - Function: x-make-font-italic font &optional device
- Given an X font specification, this attempts to make an "italic"
- font. If it fails, it returns `nil'.
-
- - Function: x-make-font-unitalic font &optional device
- Given an X font specification, this attempts to make a non-italic
- font. If it fails, it returns `nil'.
-
- - Function: x-make-font-bold-italic font &optional device
- Given an X font specification, this attempts to make a
- "bold-italic" font. If it fails, it returns `nil'.
-
-\1f
-File: lispref.info, Node: Font Convenience Functions, Prev: Font Instance Characteristics, Up: Fonts
-
-Font Convenience Functions
---------------------------
-
- - Function: font-name font &optional domain
- This function returns the name of the FONT in the specified
- DOMAIN, if any. FONT should be a font specifier object and DOMAIN
- is normally a window and defaults to the selected window if
- omitted. This is equivalent to using `specifier-instance' and
- applying `font-instance-name' to the result.
-
- - Function: font-truename font &optional domain
- This function returns the truename of the FONT in the specified
- DOMAIN, if any. FONT should be a font specifier object and DOMAIN
- is normally a window and defaults to the selected window if
- omitted. This is equivalent to using `specifier-instance' and
- applying `font-instance-truename' to the result.
-
- - Function: font-properties font &optional domain
- This function returns the properties of the FONT in the specified
- DOMAIN, if any. FONT should be a font specifier object and DOMAIN
- is normally a window and defaults to the selected window if
- omitted. This is equivalent to using `specifier-instance' and
- applying `font-instance-properties' to the result.
-
-\1f
-File: lispref.info, Node: Colors, Prev: Fonts, Up: Faces and Window-System Objects
-
-Colors
-======
-
-* Menu:
-
-* Color Specifiers:: Specifying how a color will appear.
-* Color Instances:: What a color specifier gets instanced as.
-* Color Instance Properties:: Properties of color instances.
-* Color Convenience Functions:: Convenience functions that automatically
- instance and retrieve the properties
- of a color specifier.
-
-\1f
-File: lispref.info, Node: Color Specifiers, Next: Color Instances, Up: Colors
-
-Color Specifiers
-----------------
-
- - Function: color-specifier-p object
- This function returns non-`nil' if OBJECT is a color specifier.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Font Instance Characteristics, Next: Font Convenience Functions, Prev: Font Instance Size, Up: Fonts
+
+Font Instance Characteristics
+-----------------------------
+
+ - Function: font-instance-properties font
+ This function returns the properties (an alist or `nil') of
+ FONT-INSTANCE.
+
+ - Function: x-make-font-bold font &optional device
+ Given an X font specification, this attempts to make a "bold" font.
+ If it fails, it returns `nil'.
+
+ - Function: x-make-font-unbold font &optional device
+ Given an X font specification, this attempts to make a non-bold
+ font. If it fails, it returns `nil'.
+
+ - Function: x-make-font-italic font &optional device
+ Given an X font specification, this attempts to make an "italic"
+ font. If it fails, it returns `nil'.
+
+ - Function: x-make-font-unitalic font &optional device
+ Given an X font specification, this attempts to make a non-italic
+ font. If it fails, it returns `nil'.
+
+ - Function: x-make-font-bold-italic font &optional device
+ Given an X font specification, this attempts to make a
+ "bold-italic" font. If it fails, it returns `nil'.
+
+\1f
+File: lispref.info, Node: Font Convenience Functions, Prev: Font Instance Characteristics, Up: Fonts
+
+Font Convenience Functions
+--------------------------
+
+ - Function: font-name font &optional domain
+ This function returns the name of the FONT in the specified
+ DOMAIN, if any. FONT should be a font specifier object and DOMAIN
+ is normally a window and defaults to the selected window if
+ omitted. This is equivalent to using `specifier-instance' and
+ applying `font-instance-name' to the result.
+
+ - Function: font-truename font &optional domain
+ This function returns the truename of the FONT in the specified
+ DOMAIN, if any. FONT should be a font specifier object and DOMAIN
+ is normally a window and defaults to the selected window if
+ omitted. This is equivalent to using `specifier-instance' and
+ applying `font-instance-truename' to the result.
+
+ - Function: font-properties font &optional domain
+ This function returns the properties of the FONT in the specified
+ DOMAIN, if any. FONT should be a font specifier object and DOMAIN
+ is normally a window and defaults to the selected window if
+ omitted. This is equivalent to using `specifier-instance' and
+ applying `font-instance-properties' to the result.
+
+\1f
+File: lispref.info, Node: Colors, Prev: Fonts, Up: Faces and Window-System Objects
+
+Colors
+======
+
+* Menu:
+
+* Color Specifiers:: Specifying how a color will appear.
+* Color Instances:: What a color specifier gets instanced as.
+* Color Instance Properties:: Properties of color instances.
+* Color Convenience Functions:: Convenience functions that automatically
+ instance and retrieve the properties
+ of a color specifier.
+
+\1f
+File: lispref.info, Node: Color Specifiers, Next: Color Instances, Up: Colors
+
+Color Specifiers
+----------------
+
+ - Function: color-specifier-p object
+ This function returns non-`nil' if OBJECT is a color specifier.
+
+ - Function: make-color-specifier spec-list
+ Return a new `color' 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. *Note Specifiers::, for
+ a detailed description of 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).
+
+ - Function: 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. *Note Specifiers::, 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.
+
+
+\1f
File: lispref.info, Node: Color Instances, Next: Color Instance Properties, Prev: Color Specifiers, Up: Colors
Color Instances
Glyphs
******
- A "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
+ A "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 ("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 (`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.)
+margins. It is used in begin-glyphs and end-glyphs attached to
+extents, marginal and textual annotations, overlay arrows
+(`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 "image specifier" object contained within
for the mouse-pointer), or `icon' (used for a frame's icon), and
defaults to `buffer'. *Note Glyph Types::.
+ 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; *Note 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 `canonicalize-spec-list'. *Note
+ 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 `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'. 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'. *Note Glyph Types::.
+
- Function: make-glyph-internal &optional type
This function creates a new, uninitialized glyph of type TYPE.
- Function: make-pointer-glyph &optional spec-list
- This function is equivalent to calling `make-glyph' with a TYPE of
- `pointer'.
+ Return a new `pointer-glyph' object with the specification list
+ SPEC-LIST. This function is equivalent to calling `make-glyph'
+ with a TYPE of `pointer'.
+
+ 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'.
- Function: make-icon-glyph &optional spec-list
- This function is equivalent to calling `make-glyph' with a TYPE of
- `icon'.
+ Return a new `pointer-glyph' object with the specification list
+ SPEC-LIST. This function is equivalent to calling `make-glyph'
+ with a TYPE of `icon'.
+
+ 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'.
\1f
File: lispref.info, Node: Glyph Properties, Next: Glyph Convenience Functions, Prev: Creating Glyphs, Up: Glyph Functions
are passed to `make-image-instance'.
* Image Instances:: What an image specifier gets instanced as.
-\1f
-File: lispref.info, Node: Image Specifiers, Next: Image Instantiator Conversion, Up: Images
-
-Image Specifiers
-----------------
-
- An image specifier is used to describe the actual image of a glyph.
-It works like other specifiers (*note Specifiers::), in that it contains
-a number of specifications describing how the image should appear in a
-variety of circumstances. These specifications are called "image
-instantiators". When XEmacs wants to display the image, it instantiates
-the image into an "image instance". Image instances are their own
-primitive object type (similar to font instances and color instances),
-describing how the image appears in a particular domain. (On the other
-hand, image instantiators, which are just descriptions of how the image
-should appear, are represented using strings or vectors.)
-
- - Function: image-specifier-p object
- This function returns non-`nil' if OBJECT is an image specifier.
- Usually, an image specifier results from calling `glyph-image' on
- a glyph.
-
- - Function: make-image-specifier spec-list
- This function creates a new image specifier object and initializes
- it according to SPEC-LIST. It is unlikely that you will ever want
- to do this, but this function is provided for completeness and for
- experimentation purposes. *Note Specifiers::.
-
- 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.).
-
- *Note Image Instances::, 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. The "format" field should be a symbol, 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,
- similar to a modeline format string; not currently implemented.
-
-`xbm'
- An X bitmap; only if X 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'.
- XPM is an add-on library for X that was designed to rectify the
- shortcomings of the XBM format. Most implementations of X include
- the XPM library as a standard part. If your vendor does not, it
- is highly recommended that you download it and install it. You
- can get it from the standard XEmacs FTP site, among other places.
-
-`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. Can be instanced as `color-pixmap'. Note that XEmacs
- includes GIF decoding functions as a standard part of it, so if
- you have X support, you will normally have GIF support, unless you
- explicitly disable it at configure time.
-
-`jpeg'
- A JPEG-format image; only if JPEG support was compiled into this
- XEmacs. Can be instanced as `color-pixmap'. If you have the JPEG
- libraries present on your system when XEmacs is built, XEmacs will
- automatically detect this and use them, unless you explicitly
- disable it at configure time.
-
-`png'
- A PNG/GIF24 image; only if PNG support was compiled into this
- XEmacs. Can be instanced as `color-pixmap'.
-
-`tiff'
- A TIFF-format image; only if TIFF support was compiled into this
- XEmacs.
-
-`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 `<X11/cursorfont.h>'] 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]'.
- Only if X support was compiled into this XEmacs. Currently can
- only be instanced as `pointer', although this should probably be
- fixed.
-
-`subwindow'
- An embedded X window; not currently implemented.
-
-`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.
-
- 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 format `nothing'.
-
-`: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', and `autodetect'.
-
-`:foreground'
-`:background'
- For `xbm', `xface', `cursor-font', 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.
-
- 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' 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
-specifier (which may be well before 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).
-
- - Function: valid-image-instantiator-format-p format
- This function returns non-`nil' if FORMAT is a valid image
- instantiator format. Note that the return value for many formats
- listed above depends on whether XEmacs was compiled with support
- for that format.
-
- - Function: image-instantiator-format-list
- This function return a list of valid image-instantiator formats.
-
- - Variable: xpm-color-symbols
- This variable holds definitions of logical color-names used when
- reading XPM files. Elements of this list should be of the form
- `(COLOR-NAME FORM-TO-EVALUATE)'. The COLOR-NAME should be a
- string, which is the name of the color to define; the
- FORM-TO-EVALUATE should evaluate to a color specifier object, or a
- string to be passed to `make-color-instance' (*note Colors::). If
- a loaded XPM file references a symbolic color called COLOR-NAME,
- it will display as the computed color instead.
-
- The default value of this variable defines the logical color names
- `"foreground"' and `"background"' to be the colors of the
- `default' face.
-
- - Variable: x-bitmap-file-path
- A list of the directories in which X bitmap files may be found.
- If nil, this is initialized from the `"*bitmapFilePath"' resource.
- This is used by the `make-image-instance' function (however, note
- that if the environment variable `XBMLANGPATH' is set, it is
- consulted first).
-
-\1f
-File: lispref.info, Node: Image Instantiator Conversion, Next: Image Instances, Prev: Image Specifiers, Up: Images
-
-Image Instantiator Conversion
------------------------------
-
- - Function: set-console-type-image-conversion-list console-type list
- This function sets the image-conversion-list for consoles of the
- given CONSOLE-TYPE. The image-conversion-list specifies how image
- instantiators that are strings should be interpreted. Each
- element of the list should be a list of two elements (a regular
- expression string and a vector) or a list of three elements (the
- preceding two plus an integer index into the vector). The string
- is converted to the vector associated with the first matching
- regular expression. If a vector index is specified, the string
- itself is substituted into that position in the vector.
-
- Note: The conversion above is applied when the image instantiator
- is added to an image specifier, not when the specifier is actually
- instantiated. Therefore, changing the image-conversion-list only
- affects newly-added instantiators. Existing instantiators in
- glyphs and image specifiers will not be affected.
-
- - Function: console-type-image-conversion-list console-type
- This function returns the image-conversion-list for consoles of
- the given CONSOLE-TYPE.
-
-\1f
-File: lispref.info, Node: Image Instances, Prev: Image Instantiator Conversion, Up: Images
-
-Image Instances
----------------
-
- Image-instance objects encapsulate the way a particular image
-(pixmap, etc.) is displayed on a particular device.
-
- In most circumstances, you do not need to directly create image
-instances; use a glyph instead. However, it may occasionally be useful
-to explicitly create image instances, if you want more control over the
-instantiation process.
-
- - Function: image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance.
-
-* Menu:
-
-* Image Instance Types:: Each image instances has a particular type.
-* Image Instance Functions:: Functions for working with image instances.
-
-\1f
-File: lispref.info, Node: Image Instance Types, Next: Image Instance Functions, Up: Image Instances
-
-Image Instance Types
-....................
-
- Image instances come in a number of different types. The type of an
-image instance specifies the nature of the image: Whether it is a text
-string, a mono pixmap, a color pixmap, etc.
-
- The valid image instance types are
-
-`nothing'
- Nothing is displayed.
-
-`text'
- Displayed as text. The foreground and background colors and the
- font of the text are specified independent of the pixmap.
- Typically these attributes will come from the face of the
- surrounding text, unless a face is specified for the glyph in
- which the image appears.
-
-`mono-pixmap'
- Displayed as a mono pixmap (a pixmap with only two colors where the
- foreground and background can be specified independent of the
- pixmap; typically the pixmap assumes the foreground and background
- colors of the text around it, unless a face is specified for the
- glyph in which the image appears).
-
-`color-pixmap'
- Displayed as a color pixmap.
-
-`pointer'
- Used as the mouse pointer for a window.
-
-`subwindow'
- A child window that is treated as an image. This allows (e.g.)
- another program to be responsible for drawing into the window.
- Not currently implemented.
-
- - Function: valid-image-instance-type-p type
- This function returns non-`nil' if TYPE is a valid image instance
- type.
-
- - Function: image-instance-type-list
- This function returns a list of the valid image instance types.
-
- - Function: image-instance-type image-instance
- This function returns the type of the given image instance. The
- return value will be one of `nothing', `text', `mono-pixmap',
- `color-pixmap', `pointer', or `subwindow'.
-
- - Function: text-image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance of
- type `text'.
-
- - Function: mono-pixmap-image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance of
- type `mono-pixmap'.
-
- - Function: color-pixmap-image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance of
- type `color-pixmap'.
-
- - Function: pointer-image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance of
- type `pointer'.
-
- - Function: subwindow-image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance of
- type `subwindow'.
-
- - Function: nothing-image-instance-p object
- This function returns non-`nil' if OBJECT is an image instance of
- type `nothing'.
-
-\1f
-File: lispref.info, Node: Image Instance Functions, Prev: Image Instance Types, Up: Image Instances
-
-Image Instance Functions
-........................
-
- - Function: make-image-instance data &optional device dest-types
- no-error
- This function creates a new image-instance object.
-
- DATA is an image instantiator, which describes the image (*note
- Image Specifiers::).
-
- DEST-TYPES should be a list of allowed image instance types that
- can be generated. 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.
-
- If DEST-TYPES is omitted, all possible types are allowed.
-
- 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.
-
- - Function: colorize-image-instance image-instance foreground
- background
- This function makes the image instance be displayed in the given
- colors. Image instances come in two varieties: bitmaps, which are
- 1 bit deep which are rendered in the prevailing foreground and
- background colors; and pixmaps, which are of arbitrary depth
- (including 1) and which have the colors explicitly specified.
- This function converts a bitmap to a pixmap. If the image
- instance was a pixmap already, nothing is done (and `nil' is
- returned). Otherwise `t' is returned.
-
- - Function: image-instance-name image-instance
- This function returns the name of the given image instance.
-
- - Function: image-instance-string image-instance
- This function returns the string of the given image instance.
- This will only be non-`nil' for text image instances.
-
- - Function: image-instance-file-name image-instance
- This function returns the file name from which IMAGE-INSTANCE was
- read, if known.
-
- - Function: image-instance-mask-file-name image-instance
- This function returns the file name from which IMAGE-INSTANCE's
- mask was read, if known.
-
- - Function: image-instance-depth image-instance
- This function returns the depth of the image instance. This is 0
- for a mono pixmap, or a positive integer for a color pixmap.
-
- - Function: image-instance-height image-instance
- This function returns the height of the image instance, in pixels.
-
- - Function: image-instance-width image-instance
- This function returns the width of the image instance, in pixels.
-
- - Function: image-instance-hotspot-x image-instance
- This function returns the X coordinate of the image instance's
- hotspot, if known. This is a point relative to the origin of the
- pixmap. When an image is used as a mouse pointer, the hotspot is
- the point on the image that sits over the location that the
- pointer points to. This is, for example, the tip of the arrow or
- the center of the crosshairs.
-
- This will always be `nil' for a non-pointer image instance.
-
- - Function: image-instance-hotspot-y image-instance
- This function returns the Y coordinate of the image instance's
- hotspot, if known.
-
- - Function: image-instance-foreground image-instance
- This function returns the foreground color of IMAGE-INSTANCE, if
- applicable. This will be a color instance or `nil'. (It will only
- be non-`nil' for colorized mono pixmaps and for pointers.)
-
- - Function: image-instance-background image-instance
- This function returns the background color of IMAGE-INSTANCE, if
- applicable. This will be a color instance or `nil'. (It will only
- be non-`nil' for colorized mono pixmaps and for pointers.)
-
-\1f
-File: lispref.info, Node: Glyph Types, Next: Mouse Pointer, Prev: Images, Up: Glyphs
-
-Glyph Types
-===========
-
- Each glyph has a particular type, which controls how the glyph's
-image is generated. Each glyph type has a corresponding list of
-allowable image instance types that can be generated. When you call
-`glyph-image-instance' to retrieve the image instance of a glyph,
-XEmacs does the equivalent of calling `make-image-instance' and passing
-in DEST-TYPES the list of allowable image instance types for the
-glyph's type.
-
- * `buffer' glyphs can be used as the begin-glyph or end-glyph of an
- extent, in the modeline, and in the toolbar. Their image can be
- instantiated as `nothing', `mono-pixmap', `color-pixmap', `text',
- and `subwindow'.
-
- * `pointer' glyphs can be used to specify the mouse pointer. Their
- image can be instantiated as `pointer'.
-
- * `icon' glyphs can be used to specify the icon used when a frame is
- iconified. Their image can be instantiated as `mono-pixmap' and
- `color-pixmap'.
-
- - Function: glyph-type glyph
- This function returns the type of the given glyph. The return
- value will be a symbol, one of `buffer', `pointer', or `icon'.
-
- - Function: valid-glyph-type-p glyph-type
- Given a GLYPH-TYPE, this function returns non-`nil' if it is valid.
-
- - Function: glyph-type-list
- This function returns a list of valid glyph types.
-
- - Function: buffer-glyph-p object
- This function returns non-`nil' if OBJECT is a glyph of type
- `buffer'.
-
- - Function: icon-glyph-p object
- This function returns non-`nil' if OBJECT is a glyph of type
- `icon'.
-
- - Function: pointer-glyph-p object
- This function returns non-`nil' if OBJECT is a glyph of type
- `pointer'.
-
-\1f
-File: lispref.info, Node: Mouse Pointer, Next: Redisplay Glyphs, Prev: Glyph Types, Up: Glyphs
-
-Mouse Pointer
-=============
-
- The shape of the mouse pointer when over a particular section of a
-frame is controlled using various glyph variables. Since the image of
-a glyph is a specifier, it can be controlled on a per-buffer,
-per-frame, per-window, or per-device basis.
-
- You should use `set-glyph-image' to set the following variables,
-_not_ `setq'.
-
- - Glyph: text-pointer-glyph
- This variable specifies the shape of the mouse pointer when over
- text.
-
- - Glyph: nontext-pointer-glyph
- This variable specifies the shape of the mouse pointer when over a
- buffer, but not over text. If unspecified in a particular domain,
- `text-pointer-glyph' is used.
-
- - Glyph: modeline-pointer-glyph
- This variable specifies the shape of the mouse pointer when over
- the modeline. If unspecified in a particular domain,
- `nontext-pointer-glyph' is used.
-
- - Glyph: selection-pointer-glyph
- This variable specifies the shape of the mouse pointer when over a
- selectable text region. If unspecified in a particular domain,
- `text-pointer-glyph' is used.
-
- - Glyph: gc-pointer-glyph
- This variable specifies the shape of the mouse pointer when a
- garbage collection is in progress. If the selected window is on a
- window system and this glyph specifies a value (i.e. a pointer
- image instance) in the domain of the selected window, the pointer
- will be changed as specified during garbage collection.
- Otherwise, a message will be printed in the echo area, as
- controlled by `gc-message'.
-
- - Glyph: busy-pointer-glyph
- This variable specifies the shape of the mouse pointer when XEmacs
- is busy. If unspecified in a particular domain, the pointer is
- not changed when XEmacs is busy.
-
- - Glyph: menubar-pointer-glyph
- This variable specifies the shape of the mouse pointer when over
- the menubar. If unspecified in a particular domain, the
- window-system-provided default pointer is used.
-
- - Glyph: scrollbar-pointer-glyph
- This variable specifies the shape of the mouse pointer when over a
- scrollbar. If unspecified in a particular domain, the
- window-system-provided default pointer is used.
-
- - Glyph: toolbar-pointer-glyph
- This variable specifies the shape of the mouse pointer when over a
- toolbar. If unspecified in a particular domain,
- `nontext-pointer-glyph' is used.
-
- Internally, these variables are implemented in
-`default-mouse-motion-handler', and thus only take effect when the
-mouse moves. That function calls `set-frame-pointer', which sets the
-current mouse pointer for a frame.
-
- - Function: set-frame-pointer frame image-instance
- This function sets the mouse pointer of FRAME to the given pointer
- image instance. You should not call this function directly. (If
- you do, the pointer will change again the next time the mouse
- moves.)
-
-\1f
-File: lispref.info, Node: Redisplay Glyphs, Next: Subwindows, Prev: Mouse Pointer, Up: Glyphs
-
-Redisplay Glyphs
-================
-
- - Glyph: truncation-glyph
- This variable specifies what is displayed at the end of truncated
- lines.
-
- - Glyph: continuation-glyph
- This variable specifies what is displayed at the end of wrapped
- lines.
-
- - Glyph: octal-escape-glyph
- This variable specifies what to prefix character codes displayed
- in octal with.
-
- - Glyph: hscroll-glyph
- This variable specifies what to display at the beginning of
- horizontally scrolled lines.
-
- - Glyph: invisible-text-glyph
- This variable specifies what to use to indicate the presence of
- invisible text. This is the glyph that is displayed when an
- ellipsis is called for, according to `selective-display-ellipses'
- or `buffer-invisibility-spec'). Normally this is three dots
- ("...").
-
- - Glyph: control-arrow-glyph
- This variable specifies what to use as an arrow for control
- characters.
-
-\1f
-File: lispref.info, Node: Subwindows, Prev: Redisplay Glyphs, Up: Glyphs
-
-Subwindows
-==========
-
- Subwindows are not currently implemented.
-
- - Function: subwindowp object
- This function returns non-`nil' if OBJECT is a subwindow.
-
-\1f
-File: lispref.info, Node: Annotations, Next: Display, Prev: Glyphs, Up: Top
-
-Annotations
-***********
-
- An "annotation" is a pixmap or string that is not part of a buffer's
-text but is displayed next to a particular location in a buffer.
-Annotations can be displayed intermixed with text, in any whitespace at
-the beginning or end of a line, or in a special area at the left or
-right side of the frame called a "margin", whose size is controllable.
-Annotations are implemented using extents (*note Extents::); but you
-can work with annotations without knowing how extents work.
-
-* Menu:
-
-* Annotation Basics:: Introduction to annotations.
-* Annotation Primitives:: Creating and deleting annotations.
-* Annotation Properties:: Retrieving and changing the characteristics
- of an annotation.
-* Margin Primitives:: Controlling the size of the margins.
-* Locating Annotations:: Looking for annotations in a buffer.
-* Annotation Hooks:: Hooks called at certain times during an
- annotation's lifetime.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Image Specifiers, Next: Image Instantiator Conversion, Up: Images
+
+Image Specifiers
+----------------
+
+ An image specifier is used to describe the actual image of a glyph.
+It works like other specifiers (*note Specifiers::), in that it contains
+a number of specifications describing how the image should appear in a
+variety of circumstances. These specifications are called "image
+instantiators". When XEmacs wants to display the image, it instantiates
+the image into an "image instance". Image instances are their own
+primitive object type (similar to font instances and color instances),
+describing how the image appears in a particular domain. (On the other
+hand, image instantiators, which are just descriptions of how the image
+should appear, are represented using strings or vectors.)
+
+ - Function: image-specifier-p object
+ This function returns non-`nil' if OBJECT is an image specifier.
+ Usually, an image specifier results from calling `glyph-image' on
+ a glyph.
+
+ - Function: make-image-specifier spec-list
+ This function creates a new image specifier object and initializes
+ it according to SPEC-LIST. *Note 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 `image' property of a glyph) is
+ created automatically when a glyph is created and need not (and
+ cannot, for that matter) ever be changed (*note 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.
+
+ 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.).
+
+ *Note Image Instances::, 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. The "format" field should be a symbol, 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,
+ similar to a modeline format string; not currently implemented.
+
+`xbm'
+ An X bitmap; only if X 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'.
+ XPM is an add-on library for X that was designed to rectify the
+ shortcomings of the XBM format. Most implementations of X include
+ the XPM library as a standard part. If your vendor does not, it
+ is highly recommended that you download it and install it. You
+ can get it from the standard XEmacs FTP site, among other places.
+
+`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. Can be instanced as `color-pixmap'. Note that XEmacs
+ includes GIF decoding functions as a standard part of it, so if
+ you have X support, you will normally have GIF support, unless you
+ explicitly disable it at configure time.
+
+`jpeg'
+ A JPEG-format image; only if JPEG support was compiled into this
+ XEmacs. Can be instanced as `color-pixmap'. If you have the JPEG
+ libraries present on your system when XEmacs is built, XEmacs will
+ automatically detect this and use them, unless you explicitly
+ disable it at configure time.
+
+`png'
+ A PNG/GIF24 image; only if PNG support was compiled into this
+ XEmacs. Can be instanced as `color-pixmap'.
+
+`tiff'
+ A TIFF-format image; only if TIFF support was compiled into this
+ XEmacs.
+
+`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 `<X11/cursorfont.h>'] 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]'.
+ Only if X support was compiled into this XEmacs. Currently can
+ only be instanced as `pointer', although this should probably be
+ fixed.
+
+`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'.
+
+`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. 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.
+
+`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 not valid for
+ instantiator format `nothing'.
+
+`: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', and `autodetect'.
+
+`:foreground'
+`:background'
+ For `xbm', `xface', `cursor-font', 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' 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
+specifier (which may be well before 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).
+
+ - Function: valid-image-instantiator-format-p format
+ This function returns non-`nil' if FORMAT is a valid image
+ instantiator format. Note that the return value for many formats
+ listed above depends on whether XEmacs was compiled with support
+ for that format.
+
+ - Function: image-instantiator-format-list
+ This function return a list of valid image-instantiator formats.
+
+ - Variable: xpm-color-symbols
+ This variable holds definitions of logical color-names used when
+ reading XPM files. Elements of this list should be of the form
+ `(COLOR-NAME FORM-TO-EVALUATE)'. The COLOR-NAME should be a
+ string, which is the name of the color to define; the
+ FORM-TO-EVALUATE should evaluate to a color specifier object, or a
+ string to be passed to `make-color-instance' (*note Colors::). If
+ a loaded XPM file references a symbolic color called COLOR-NAME,
+ it will display as the computed color instead.
+
+ The default value of this variable defines the logical color names
+ `"foreground"' and `"background"' to be the colors of the
+ `default' face.
+
+ - Variable: x-bitmap-file-path
+ A list of the directories in which X bitmap files may be found.
+ If nil, this is initialized from the `"*bitmapFilePath"' resource.
+ This is used by the `make-image-instance' function (however, note
+ that if the environment variable `XBMLANGPATH' is set, it is
+ consulted first).
+
+\1f
+File: lispref.info, Node: Image Instantiator Conversion, Next: Image Instances, Prev: Image Specifiers, Up: Images
+
+Image Instantiator Conversion
+-----------------------------
+
+ - Function: set-console-type-image-conversion-list console-type list
+ This function sets the image-conversion-list for consoles of the
+ given CONSOLE-TYPE. The image-conversion-list specifies how image
+ instantiators that are strings should be interpreted. Each
+ element of the list should be a list of two elements (a regular
+ expression string and a vector) or a list of three elements (the
+ preceding two plus an integer index into the vector). The string
+ is converted to the vector associated with the first matching
+ regular expression. If a vector index is specified, the string
+ itself is substituted into that position in the vector.
+
+ Note: The conversion above is applied when the image instantiator
+ is added to an image specifier, not when the specifier is actually
+ instantiated. Therefore, changing the image-conversion-list only
+ affects newly-added instantiators. Existing instantiators in
+ glyphs and image specifiers will not be affected.
+
+ - Function: console-type-image-conversion-list console-type
+ This function returns the image-conversion-list for consoles of
+ the given CONSOLE-TYPE.
+
+\1f
+File: lispref.info, Node: Image Instances, Prev: Image Instantiator Conversion, Up: Images
+
+Image Instances
+---------------
+
+ Image-instance objects encapsulate the way a particular image
+(pixmap, etc.) is displayed on a particular device.
+
+ In most circumstances, you do not need to directly create image
+instances; use a glyph instead. However, it may occasionally be useful
+to explicitly create image instances, if you want more control over the
+instantiation process.
+
+ - Function: image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance.
+
+* Menu:
+
+* Image Instance Types:: Each image instances has a particular type.
+* Image Instance Functions:: Functions for working with image instances.
+
+\1f
+File: lispref.info, Node: Image Instance Types, Next: Image Instance Functions, Up: Image Instances
+
+Image Instance Types
+....................
+
+ Image instances come in a number of different types. The type of an
+image instance specifies the nature of the image: Whether it is a text
+string, a mono pixmap, a color pixmap, etc.
+
+ The valid image instance types are
+
+`nothing'
+ Nothing is displayed.
+
+`text'
+ Displayed as text. The foreground and background colors and the
+ font of the text are specified independent of the pixmap.
+ Typically these attributes will come from the face of the
+ surrounding text, unless a face is specified for the glyph in
+ which the image appears.
+
+`mono-pixmap'
+ Displayed as a mono pixmap (a pixmap with only two colors where the
+ foreground and background can be specified independent of the
+ pixmap; typically the pixmap assumes the foreground and background
+ colors of the text around it, unless a face is specified for the
+ glyph in which the image appears).
+
+`color-pixmap'
+ Displayed as a color pixmap.
+
+`pointer'
+ Used as the mouse pointer for a window.
+
+`subwindow'
+ A child window that is treated as an image. This allows (e.g.)
+ another program to be responsible for drawing into the window.
+ Not currently implemented.
+
+ - Function: valid-image-instance-type-p type
+ This function returns non-`nil' if TYPE is a valid image instance
+ type.
+
+ - Function: image-instance-type-list
+ This function returns a list of the valid image instance types.
+
+ - Function: image-instance-type image-instance
+ This function returns the type of the given image instance. The
+ return value will be one of `nothing', `text', `mono-pixmap',
+ `color-pixmap', `pointer', or `subwindow'.
+
+ - Function: text-image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance of
+ type `text'.
+
+ - Function: mono-pixmap-image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance of
+ type `mono-pixmap'.
+
+ - Function: color-pixmap-image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance of
+ type `color-pixmap'.
+
+ - Function: pointer-image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance of
+ type `pointer'.
+
+ - Function: subwindow-image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance of
+ type `subwindow'.
+
+ - Function: nothing-image-instance-p object
+ This function returns non-`nil' if OBJECT is an image instance of
+ type `nothing'.
+
+ - Function: widget-image-instance-p object
+ Return t if OBJECT is an image instance of type `widget'.
+
+\1f
+File: lispref.info, Node: Image Instance Functions, Prev: Image Instance Types, Up: Image Instances
+
+Image Instance Functions
+........................
+
+ - Function: make-image-instance data &optional domain dest-types
+ no-error
+ This function creates a new image-instance object.
+
+ DATA is an image instantiator, which describes the image (*note
+ Image Specifiers::).
+
+ DEST-TYPES should be a list of allowed image instance types that
+ can be generated. 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.
+
+ 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.) n 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.
+
+ - Function: colorize-image-instance image-instance foreground
+ background
+ This function makes the image instance be displayed in the given
+ colors. Image instances come in two varieties: bitmaps, which are
+ 1 bit deep which are rendered in the prevailing foreground and
+ background colors; and pixmaps, which are of arbitrary depth
+ (including 1) and which have the colors explicitly specified.
+ This function converts a bitmap to a pixmap. If the image
+ instance was a pixmap already, nothing is done (and `nil' is
+ returned). Otherwise `t' is returned.
+
+ - Function: image-instance-name image-instance
+ This function returns the name of the given image instance.
+
+ - Function: image-instance-domain image-instance
+ 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.
+
+ - Function: image-instance-string image-instance
+ This function returns the string of the given image instance.
+ This will only be non-`nil' for text image instances.
+
+ - Function: image-instance-file-name image-instance
+ This function returns the file name from which IMAGE-INSTANCE was
+ read, if known.
+
+ - Function: image-instance-mask-file-name image-instance
+ This function returns the file name from which IMAGE-INSTANCE's
+ mask was read, if known.
+
+ - Function: image-instance-depth image-instance
+ This function returns the depth of the image instance. This is 0
+ for a mono pixmap, or a positive integer for a color pixmap.
+
+ - Function: image-instance-height image-instance
+ This function returns the height of the image instance, in pixels.
+
+ - Function: image-instance-width image-instance
+ This function returns the width of the image instance, in pixels.
+
+ - Function: image-instance-hotspot-x image-instance
+ This function returns the X coordinate of the image instance's
+ hotspot, if known. This is a point relative to the origin of the
+ pixmap. When an image is used as a mouse pointer, the hotspot is
+ the point on the image that sits over the location that the
+ pointer points to. This is, for example, the tip of the arrow or
+ the center of the crosshairs.
+
+ This will always be `nil' for a non-pointer image instance.
+
+ - Function: image-instance-hotspot-y image-instance
+ This function returns the Y coordinate of the image instance's
+ hotspot, if known.
+
+ - Function: image-instance-foreground image-instance
+ This function returns the foreground color of IMAGE-INSTANCE, if
+ applicable. This will be a color instance or `nil'. (It will only
+ be non-`nil' for colorized mono pixmaps and for pointers.)
+
+ - Function: image-instance-background image-instance
+ This function returns the background color of IMAGE-INSTANCE, if
+ applicable. This will be a color instance or `nil'. (It will only
+ be non-`nil' for colorized mono pixmaps and for pointers.)
+
+\1f
+File: lispref.info, Node: Glyph Types, Next: Mouse Pointer, Prev: Images, Up: Glyphs
+
+Glyph Types
+===========
+
+ Each glyph has a particular type, which controls how the glyph's
+image is generated. Each glyph type has a corresponding list of
+allowable image instance types that can be generated. When you call
+`glyph-image-instance' to retrieve the image instance of a glyph,
+XEmacs does the equivalent of calling `make-image-instance' and passing
+in DEST-TYPES the list of allowable image instance types for the
+glyph's type.
+
+ * `buffer' glyphs can be used as the begin-glyph or end-glyph of an
+ extent, in the modeline, and in the toolbar. Their image can be
+ instantiated as `nothing', `mono-pixmap', `color-pixmap', `text',
+ and `subwindow'.
+
+ * `pointer' glyphs can be used to specify the mouse pointer. Their
+ image can be instantiated as `pointer'.
+
+ * `icon' glyphs can be used to specify the icon used when a frame is
+ iconified. Their image can be instantiated as `mono-pixmap' and
+ `color-pixmap'.
+
+ - Function: glyph-type glyph
+ This function returns the type of the given glyph. The return
+ value will be a symbol, one of `buffer', `pointer', or `icon'.
+
+ - Function: valid-glyph-type-p glyph-type
+ Given a GLYPH-TYPE, this function returns non-`nil' if it is valid.
+
+ - Function: glyph-type-list
+ This function returns a list of valid glyph types.
+
+ - Function: buffer-glyph-p object
+ This function returns non-`nil' if OBJECT is a glyph of type
+ `buffer'.
+
+ - Function: icon-glyph-p object
+ This function returns non-`nil' if OBJECT is a glyph of type
+ `icon'.
+
+ - Function: pointer-glyph-p object
+ This function returns non-`nil' if OBJECT is a glyph of type
+ `pointer'.
+
+\1f
+File: lispref.info, Node: Mouse Pointer, Next: Redisplay Glyphs, Prev: Glyph Types, Up: Glyphs
+
+Mouse Pointer
+=============
+
+ The shape of the mouse pointer when over a particular section of a
+frame is controlled using various glyph variables. Since the image of
+a glyph is a specifier, it can be controlled on a per-buffer,
+per-frame, per-window, or per-device basis.
+
+ You should use `set-glyph-image' to set the following variables,
+_not_ `setq'.
+
+ - Glyph: text-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over
+ text.
+
+ - Glyph: nontext-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over a
+ buffer, but not over text. If unspecified in a particular domain,
+ `text-pointer-glyph' is used.
+
+ - Glyph: modeline-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over
+ the modeline. If unspecified in a particular domain,
+ `nontext-pointer-glyph' is used.
+
+ - Glyph: selection-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over a
+ selectable text region. If unspecified in a particular domain,
+ `text-pointer-glyph' is used.
+
+ - Glyph: gc-pointer-glyph
+ This variable specifies the shape of the mouse pointer when a
+ garbage collection is in progress. If the selected window is on a
+ window system and this glyph specifies a value (i.e. a pointer
+ image instance) in the domain of the selected window, the pointer
+ will be changed as specified during garbage collection.
+ Otherwise, a message will be printed in the echo area, as
+ controlled by `gc-message'.
+
+ - Glyph: busy-pointer-glyph
+ This variable specifies the shape of the mouse pointer when XEmacs
+ is busy. If unspecified in a particular domain, the pointer is
+ not changed when XEmacs is busy.
+
+ - Glyph: menubar-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over
+ the menubar. If unspecified in a particular domain, the
+ window-system-provided default pointer is used.
+
+ - Glyph: scrollbar-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over a
+ scrollbar. If unspecified in a particular domain, the
+ window-system-provided default pointer is used.
+
+ - Glyph: toolbar-pointer-glyph
+ This variable specifies the shape of the mouse pointer when over a
+ toolbar. If unspecified in a particular domain,
+ `nontext-pointer-glyph' is used.
+
+ Internally, these variables are implemented in
+`default-mouse-motion-handler', and thus only take effect when the
+mouse moves. That function calls `set-frame-pointer', which sets the
+current mouse pointer for a frame.
+
+ - Function: set-frame-pointer frame image-instance
+ This function sets the mouse pointer of FRAME to the given pointer
+ image instance. You should not call this function directly. (If
+ you do, the pointer will change again the next time the mouse
+ moves.)
+
+\1f
+File: lispref.info, Node: Redisplay Glyphs, Next: Subwindows, Prev: Mouse Pointer, Up: Glyphs
+
+Redisplay Glyphs
+================
+
+ - Glyph: truncation-glyph
+ This variable specifies what is displayed at the end of truncated
+ lines.
+
+ - Glyph: continuation-glyph
+ This variable specifies what is displayed at the end of wrapped
+ lines.
+
+ - Glyph: octal-escape-glyph
+ This variable specifies what to prefix character codes displayed
+ in octal with.
+
+ - Glyph: hscroll-glyph
+ This variable specifies what to display at the beginning of
+ horizontally scrolled lines.
+
+ - Glyph: invisible-text-glyph
+ This variable specifies what to use to indicate the presence of
+ invisible text. This is the glyph that is displayed when an
+ ellipsis is called for, according to `selective-display-ellipses'
+ or `buffer-invisibility-spec'). Normally this is three dots
+ ("...").
+
+ - Glyph: control-arrow-glyph
+ This variable specifies what to use as an arrow for control
+ characters.
+
+\1f
+File: lispref.info, Node: Subwindows, Prev: Redisplay Glyphs, Up: Glyphs
+
+Subwindows
+==========
+
+ Subwindows are not currently implemented.
+
+ - Function: subwindowp object
+ This function returns non-`nil' if OBJECT is a subwindow.
+
+\1f
+File: lispref.info, Node: Annotations, Next: Display, Prev: Glyphs, Up: Top
+
+Annotations
+***********
+
+ An "annotation" is a pixmap or string that is not part of a buffer's
+text but is displayed next to a particular location in a buffer.
+Annotations can be displayed intermixed with text, in any whitespace at
+the beginning or end of a line, or in a special area at the left or
+right side of the frame called a "margin", whose size is controllable.
+Annotations are implemented using extents (*note Extents::); but you
+can work with annotations without knowing how extents work.
+
+* Menu:
+
+* Annotation Basics:: Introduction to annotations.
+* Annotation Primitives:: Creating and deleting annotations.
+* Annotation Properties:: Retrieving and changing the characteristics
+ of an annotation.
+* Margin Primitives:: Controlling the size of the margins.
+* Locating Annotations:: Looking for annotations in a buffer.
+* Annotation Hooks:: Hooks called at certain times during an
+ annotation's lifetime.
+
+\1f
File: lispref.info, Node: Annotation Basics, Next: Annotation Primitives, Up: Annotations
Annotation Basics
This function causes an immediate update of the cursor on the
selected frame. (This function does not exist in FSF Emacs.)
-\1f
-File: lispref.info, Node: Truncation, Next: The Echo Area, Prev: Refresh Screen, Up: Display
-
-Truncation
-==========
-
- When a line of text extends beyond the right edge of a window, the
-line can either be truncated or continued on the next line. When a line
-is truncated, this is normally shown with a `\' in the rightmost column
-of the window on X displays, and with a `$' on TTY devices. When a
-line is continued or "wrapped" onto the next line, this is shown with a
-curved arrow in the rightmost column of the window (or with a `\' on
-TTY devices). The additional screen lines used to display a long text
-line are called "continuation" lines.
-
- Normally, whenever line truncation is in effect for a particular
-window, a horizontal scrollbar is displayed in that window if the
-device supports scrollbars. *Note Scrollbars::.
-
- Note that continuation is different from filling; continuation
-happens on the screen only, not in the buffer contents, and it breaks a
-line precisely at the right margin, not at a word boundary. *Note
-Filling::.
-
- - User Option: truncate-lines
- This buffer-local variable controls how XEmacs displays lines that
- extend beyond the right edge of the window. If it is non-`nil',
- then XEmacs does not display continuation lines; rather each line
- of text occupies exactly one screen line, and a backslash appears
- at the edge of any line that extends to or beyond the edge of the
- window. The default is `nil'.
-
- If the variable `truncate-partial-width-windows' is non-`nil',
- then truncation is always used for side-by-side windows (within one
- frame) regardless of the value of `truncate-lines'.
-
- - User Option: default-truncate-lines
- This variable is the default value for `truncate-lines', for
- buffers that do not have local values for it.
-
- - User Option: truncate-partial-width-windows
- This variable controls display of lines that extend beyond the
- right edge of the window, in side-by-side windows (*note Splitting
- Windows::). If it is non-`nil', these lines are truncated;
- otherwise, `truncate-lines' says what to do with them.
-
- The backslash and curved arrow used to indicate truncated or
-continued lines are only defaults, and can be changed. These images
-are actually glyphs (*note Glyphs::). XEmacs provides a great deal of
-flexibility in how glyphs can be controlled. (This differs from FSF
-Emacs, which uses display tables to control these images.)
-
- For details, *Note Redisplay Glyphs::.
-
-\1f
-File: lispref.info, Node: The Echo Area, Next: Warnings, Prev: Truncation, Up: Display
-
-The Echo Area
-=============
-
- The "echo area" is used for displaying messages made with the
-`message' primitive, and for echoing keystrokes. It is not the same as
-the minibuffer, despite the fact that the minibuffer appears (when
-active) in the same place on the screen as the echo area. The `XEmacs
-Reference Manual' specifies the rules for resolving conflicts between
-the echo area and the minibuffer for use of that screen space (*note
-The Minibuffer: (emacs)Minibuffer.). Error messages appear in the echo
-area; see *Note Errors::.
-
- You can write output in the echo area by using the Lisp printing
-functions with `t' as the stream (*note Output Functions::), or as
-follows:
-
- - Function: message string &rest arguments
- This function displays a one-line message in the echo area. The
- argument STRING is similar to a C language `printf' control
- string. See `format' in *Note String Conversion::, for the details
- on the conversion specifications. `message' returns the
- constructed string.
-
- In batch mode, `message' prints the message text on the standard
- error stream, followed by a newline.
-
- If STRING is `nil', `message' clears the echo area. If the
- minibuffer is active, this brings the minibuffer contents back onto
- the screen immediately.
-
- (message "Minibuffer depth is %d."
- (minibuffer-depth))
- -| Minibuffer depth is 0.
- => "Minibuffer depth is 0."
-
- ---------- Echo Area ----------
- Minibuffer depth is 0.
- ---------- Echo Area ----------
-
- In addition to only displaying a message, XEmacs allows you to
-"label" your messages, giving you fine-grained control of their
-display. Message label is a symbol denoting the message type. Some
-standard labels are:
-
- * `message'--default label used by the `message' function;
-
- * `error'--default label used for reporting errors;
-
- * `progress'--progress indicators like `Converting... 45%' (not
- logged by default);
-
- * `prompt'--prompt-like messages like `Isearch: foo' (not logged by
- default);
-
- * `command'--helper command messages like `Mark set' (not logged by
- default);
-
- * `no-log'--messages that should never be logged
-
- Several messages may be stacked in the echo area at once. Lisp
-programs may access these messages, or remove them as appropriate, via
-the message stack.
-
- - Function: display-message label message &optional frame stdout-p
- This function displays MESSAGE (a string) labeled as LABEL, as
- described above.
-
- The FRAME argument specifies the frame to whose minibuffer the
- message should be printed. This is currently unimplemented. The
- STDOUT-P argument is used internally.
-
- (display-message 'command "Mark set")
-
- - Function: lmessage label string &rest arguments
- This function displays a message STRING with label LABEL. It is
- similar to `message' in that it accepts a `printf'-like strings
- and any number of arguments.
-
- ;; Display a command message.
- (lmessage 'command "Comment column set to %d" comment-column)
-
- ;; Display a progress message.
- (lmessage 'progress "Fontifying %s... (%d)" buffer percentage)
-
- ;; Display a message that should not be logged.
- (lmessage 'no-log "Done")
-
- - Function: clear-message &optional label frame stdout-p no-restore
- This function remove any message with the given LABEL from the
- message-stack, erasing it from the echo area if it's currently
- displayed there.
-
- If a message remains at the head of the message-stack and
- NO-RESTORE is `nil', it will be displayed. The string which
- remains in the echo area will be returned, or `nil' if the
- message-stack is now empty. If LABEL is nil, the entire
- message-stack is cleared.
-
- ;; Show a message, wait for 2 seconds, and restore old minibuffer
- ;; contents.
- (message "A message")
- -| A message
- => "A Message"
- (lmessage 'my-label "Newsflash! Newsflash!")
- -| Newsflash! Newsflash!
- => "Newsflash! Newsflash!"
- (sit-for 2)
- (clear-message 'my-label)
- -| A message
- => "A message"
-
- Unless you need the return value or you need to specify a label,
- you should just use `(message nil)'.
-
- - Function: current-message &optional frame
- This function returns the current message in the echo area, or
- `nil'. The FRAME argument is currently unused.
-
- Some of the messages displayed in the echo area are also recorded in
-the ` *Message-Log*' buffer. Exactly which messages will be recorded
-can be tuned using the following variables.
-
- - User Option: log-message-max-size
- This variable specifies the maximum size of the ` *Message-log*'
- buffer.
-
- - Variable: log-message-ignore-labels
- This variable specifies the labels whose messages will not be
- logged. It should be a list of symbols.
-
- - Variable: log-message-ignore-regexps
- This variable specifies the regular expressions matching messages
- that will not be logged. It should be a list of regular
- expressions.
-
- Normally, packages that generate messages that might need to be
- ignored should label them with `progress', `prompt', or `no-log',
- so they can be filtered by `log-message-ignore-labels'.
-
- - Variable: echo-keystrokes
- This variable determines how much time should elapse before command
- characters echo. Its value must be a number, which specifies the
- number of seconds to wait before echoing. If the user types a
- prefix key (such as `C-x') and then delays this many seconds
- before continuing, the prefix key is echoed in the echo area. Any
- subsequent characters in the same command will be echoed as well.
-
- If the value is zero, then command input is not echoed.
-
- - Variable: cursor-in-echo-area
- This variable controls where the cursor appears when a message is
- displayed in the echo area. If it is non-`nil', then the cursor
- appears at the end of the message. Otherwise, the cursor appears
- at point--not in the echo area at all.
-
- The value is normally `nil'; Lisp programs bind it to `t' for
- brief periods of time.
-
-\1f
-File: lispref.info, Node: Warnings, Next: Invisible Text, Prev: The Echo Area, Up: Display
-
-Warnings
-========
-
- XEmacs contains a facility for unified display of various warnings.
-Unlike errors, warnings are displayed in the situations when XEmacs
-encounters a problem that is recoverable, but which should be fixed for
-safe future operation.
-
- For example, warnings are printed by the startup code when it
-encounters problems with X keysyms, when there is an error in `.emacs',
-and in other problematic situations. Unlike messages, warnings are
-displayed in a separate buffer, and include an explanatory message that
-may span across several lines. Here is an example of how a warning is
-displayed:
-
- (1) (initialization/error) An error has occurred while loading ~/.emacs:
-
- Symbol's value as variable is void: bogus-variable
-
- To ensure normal operation, you should investigate the cause of the error
- in your initialization file and remove it. Use the `-debug-init' option
- to XEmacs to view a complete error backtrace.
-
- Each warning has a "class" and a "priority level". The class is a
-symbol describing what sort of warning this is, such as
-`initialization', `resource' or `key-mapping'.
-
- The warning priority level specifies how important the warning is.
-The recognized warning levels, in increased order of priority, are:
-`debug', `info', `notice', `warning', `error', `critical', `alert' and
-`emergency'.
-
- - Function: display-warning class message &optional level
- This function displays a warning message MESSAGE (a string).
- CLASS should be a warning class symbol, as described above, or a
- list of such symbols. LEVEL describes the warning priority level.
- If unspecified, it default to `warning'.
-
- (display-warning 'resource
- "Bad resource specification encountered:
- something like
-
- Emacs*foo: bar
-
- You should replace the * with a . in order to get proper behavior when
- you use the specifier and/or `set-face-*' functions.")
-
- ---------- Warning buffer ----------
- (1) (resource/warning) Bad resource specification encountered:
- something like
-
- Emacs*foo: bar
-
- You should replace the * with a . in order to get proper behavior when
- you use the specifier and/or `set-face-*' functions.
- ---------- Warning buffer ----------
-
- - Function: lwarn class level message &rest args
- This function displays a formatted labeled warning message. As
- above, CLASS should be the warning class symbol, or a list of such
- symbols, and LEVEL should specify the warning priority level
- (`warning' by default).
-
- Unlike in `display-warning', MESSAGE may be a formatted message,
- which will be, together with the rest of the arguments, passed to
- `format'.
-
- (lwarn 'message-log 'warning
- "Error caught in `remove-message-hook': %s"
- (error-message-string e))
-
- - Variable: log-warning-minimum-level
- This variable specifies the minimum level of warnings that should
- be generated. Warnings with level lower than defined by this
- variable are completely ignored, as if they never happened.
-
- - Variable: display-warning-minimum-level
- This variable specifies the minimum level of warnings that should
- be displayed. Unlike `log-warning-minimum-level', setting this
- function does not suppress warnings entirely--they are still
- generated in the `*Warnings*' buffer, only they are not displayed
- by default.
-
- - Variable: log-warning-suppressed-classes
- This variable specifies a list of classes that should not be
- logged or displayed. If any of the class symbols associated with
- a warning is the same as any of the symbols listed here, the
- warning will be completely ignored, as it they never happened.
-
- - Variable: display-warning-suppressed-classes
- This variable specifies a list of classes that should not be
- logged or displayed. If any of the class symbols associated with
- a warning is the same as any of the symbols listed here, the
- warning will not be displayed. The warning will still logged in
- the *Warnings* buffer (unless also contained in
- `log-warning-suppressed-classes'), but the buffer will not be
- automatically popped up.
-
-\1f
-File: lispref.info, Node: Invisible Text, Next: Selective Display, Prev: Warnings, Up: Display
-
-Invisible Text
-==============
-
- You can make characters "invisible", so that they do not appear on
-the screen, with the `invisible' property. This can be either a text
-property or a property of an overlay.
-
- In the simplest case, any non-`nil' `invisible' property makes a
-character invisible. This is the default case--if you don't alter the
-default value of `buffer-invisibility-spec', this is how the
-`invisibility' property works. This feature is much like selective
-display (*note Selective Display::), but more general and cleaner.
-
- More generally, you can use the variable `buffer-invisibility-spec'
-to control which values of the `invisible' property make text
-invisible. This permits you to classify the text into different subsets
-in advance, by giving them different `invisible' values, and
-subsequently make various subsets visible or invisible by changing the
-value of `buffer-invisibility-spec'.
-
- Controlling visibility with `buffer-invisibility-spec' is especially
-useful in a program to display the list of entries in a data base. It
-permits the implementation of convenient filtering commands to view
-just a part of the entries in the data base. Setting this variable is
-very fast, much faster than scanning all the text in the buffer looking
-for properties to change.
-
- - Variable: buffer-invisibility-spec
- This variable specifies which kinds of `invisible' properties
- actually make a character invisible.
-
- `t'
- A character is invisible if its `invisible' property is
- non-`nil'. This is the default.
-
- a list
- Each element of the list makes certain characters invisible.
- Ultimately, a character is invisible if any of the elements
- of this list applies to it. The list can have two kinds of
- elements:
-
- `ATOM'
- A character is invisible if its `invisible' property
- value is ATOM or if it is a list with ATOM as a member.
-
- `(ATOM . t)'
- A character is invisible if its `invisible' property
- value is ATOM or if it is a list with ATOM as a member.
- Moreover, if this character is at the end of a line and
- is followed by a visible newline, it displays an
- ellipsis.
-
- Ordinarily, commands that operate on text or move point do not care
-whether the text is invisible. However, the user-level line motion
-commands explicitly ignore invisible newlines.
-
-\1f
-File: lispref.info, Node: Selective Display, Next: Overlay Arrow, Prev: Invisible Text, Up: Display
-
-Selective Display
-=================
-
- "Selective display" is a pair of features that hide certain lines on
-the screen.
-
- The first variant, explicit selective display, is designed for use in
-a Lisp program. The program controls which lines are hidden by altering
-the text. Outline mode has traditionally used this variant. It has
-been partially replaced by the invisible text feature (*note Invisible
-Text::); there is a new version of Outline mode which uses that instead.
-
- In the second variant, the choice of lines to hide is made
-automatically based on indentation. This variant is designed to be a
-user-level feature.
-
- The way you control explicit selective display is by replacing a
-newline (control-j) with a carriage return (control-m). The text that
-was formerly a line following that newline is now invisible. Strictly
-speaking, it is temporarily no longer a line at all, since only newlines
-can separate lines; it is now part of the previous line.
-
- Selective display does not directly affect editing commands. For
-example, `C-f' (`forward-char') moves point unhesitatingly into
-invisible text. However, the replacement of newline characters with
-carriage return characters affects some editing commands. For example,
-`next-line' skips invisible lines, since it searches only for newlines.
-Modes that use selective display can also define commands that take
-account of the newlines, or that make parts of the text visible or
-invisible.
-
- When you write a selectively displayed buffer into a file, all the
-control-m's are output as newlines. This means that when you next read
-in the file, it looks OK, with nothing invisible. The selective display
-effect is seen only within XEmacs.
-
- - Variable: selective-display
- This buffer-local variable enables selective display. This means
- that lines, or portions of lines, may be made invisible.
-
- * If the value of `selective-display' is `t', then any portion
- of a line that follows a control-m is not displayed.
-
- * If the value of `selective-display' is a positive integer,
- then lines that start with more than that many columns of
- indentation are not displayed.
-
- When some portion of a buffer is invisible, the vertical movement
- commands operate as if that portion did not exist, allowing a
- single `next-line' command to skip any number of invisible lines.
- However, character movement commands (such as `forward-char') do
- not skip the invisible portion, and it is possible (if tricky) to
- insert or delete text in an invisible portion.
-
- In the examples below, we show the _display appearance_ of the
- buffer `foo', which changes with the value of `selective-display'.
- The _contents_ of the buffer do not change.
-
- (setq selective-display nil)
- => nil
-
- ---------- Buffer: foo ----------
- 1 on this column
- 2on this column
- 3n this column
- 3n this column
- 2on this column
- 1 on this column
- ---------- Buffer: foo ----------
-
- (setq selective-display 2)
- => 2
-
- ---------- Buffer: foo ----------
- 1 on this column
- 2on this column
- 2on this column
- 1 on this column
- ---------- Buffer: foo ----------
-
- - Variable: selective-display-ellipses
- If this buffer-local variable is non-`nil', then XEmacs displays
- `...' at the end of a line that is followed by invisible text.
- This example is a continuation of the previous one.
-
- (setq selective-display-ellipses t)
- => t
-
- ---------- Buffer: foo ----------
- 1 on this column
- 2on this column ...
- 2on this column
- 1 on this column
- ---------- Buffer: foo ----------
-
- You can use a display table to substitute other text for the
- ellipsis (`...'). *Note Display Tables::.
-
-\1f
-File: lispref.info, Node: Overlay Arrow, Next: Temporary Displays, Prev: Selective Display, Up: Display
-
-The Overlay Arrow
-=================
-
- The "overlay arrow" is useful for directing the user's attention to
-a particular line in a buffer. For example, in the modes used for
-interface to debuggers, the overlay arrow indicates the line of code
-about to be executed.
-
- - Variable: overlay-arrow-string
- This variable holds the string to display to call attention to a
- particular line, or `nil' if the arrow feature is not in use.
- Despite its name, the value of this variable can be either a string
- or a glyph (*note Glyphs::).
-
- - Variable: overlay-arrow-position
- This variable holds a marker that indicates where to display the
- overlay arrow. It should point at the beginning of a line. The
- arrow text appears at the beginning of that line, overlaying any
- text that would otherwise appear. Since the arrow is usually
- short, and the line usually begins with indentation, normally
- nothing significant is overwritten.
-
- The overlay string is displayed only in the buffer that this marker
- points into. Thus, only one buffer can have an overlay arrow at
- any given time.
-
- You can do the same job by creating an extent with a `begin-glyph'
-property. *Note Extent Properties::.
-
-\1f
-File: lispref.info, Node: Temporary Displays, Next: Blinking, Prev: Overlay Arrow, Up: Display
-
-Temporary Displays
-==================
-
- Temporary displays are used by commands to put output into a buffer
-and then present it to the user for perusal rather than for editing.
-Many of the help commands use this feature.
-
- - Special Form: with-output-to-temp-buffer buffer-name forms...
- This function executes FORMS while arranging to insert any output
- they print into the buffer named BUFFER-NAME. The buffer is then
- shown in some window for viewing, displayed but not selected.
-
- The string BUFFER-NAME specifies the temporary buffer, which need
- not already exist. The argument must be a string, not a buffer.
- The buffer is erased initially (with no questions asked), and it is
- marked as unmodified after `with-output-to-temp-buffer' exits.
-
- `with-output-to-temp-buffer' binds `standard-output' to the
- temporary buffer, then it evaluates the forms in FORMS. Output
- using the Lisp output functions within FORMS goes by default to
- that buffer (but screen display and messages in the echo area,
- although they are "output" in the general sense of the word, are
- not affected). *Note Output Functions::.
-
- The value of the last form in FORMS is returned.
-
- ---------- Buffer: foo ----------
- This is the contents of foo.
- ---------- Buffer: foo ----------
-
- (with-output-to-temp-buffer "foo"
- (print 20)
- (print standard-output))
- => #<buffer foo>
-
- ---------- Buffer: foo ----------
- 20
-
- #<buffer foo>
-
- ---------- Buffer: foo ----------
-
- - Variable: temp-buffer-show-function
- If this variable is non-`nil', `with-output-to-temp-buffer' calls
- it as a function to do the job of displaying a help buffer. The
- function gets one argument, which is the buffer it should display.
-
- In Emacs versions 18 and earlier, this variable was called
- `temp-buffer-show-hook'.
-
- - Function: momentary-string-display string position &optional char
- message
- This function momentarily displays STRING in the current buffer at
- POSITION. It has no effect on the undo list or on the buffer's
- modification status.
-
- The momentary display remains until the next input event. If the
- next input event is CHAR, `momentary-string-display' ignores it
- and returns. Otherwise, that event remains buffered for
- subsequent use as input. Thus, typing CHAR will simply remove the
- string from the display, while typing (say) `C-f' will remove the
- string from the display and later (presumably) move point forward.
- The argument CHAR is a space by default.
-
- The return value of `momentary-string-display' is not meaningful.
-
- You can do the same job in a more general way by creating an extent
- with a begin-glyph property. *Note Extent Properties::.
-
- If MESSAGE is non-`nil', it is displayed in the echo area while
- STRING is displayed in the buffer. If it is `nil', a default
- message says to type CHAR to continue.
-
- In this example, point is initially located at the beginning of the
- second line:
-
- ---------- Buffer: foo ----------
- This is the contents of foo.
- -!-Second line.
- ---------- Buffer: foo ----------
-
- (momentary-string-display
- "**** Important Message! ****"
- (point) ?\r
- "Type RET when done reading")
- => t
-
- ---------- Buffer: foo ----------
- This is the contents of foo.
- **** Important Message! ****Second line.
- ---------- Buffer: foo ----------
-
- ---------- Echo Area ----------
- Type RET when done reading
- ---------- Echo Area ----------
-
- This function works by actually changing the text in the buffer.
- As a result, if you later undo in this buffer, you will see the
- message come and go.
-
-\1f
-File: lispref.info, Node: Blinking, Next: Usual Display, Prev: Temporary Displays, Up: Display
-
-Blinking Parentheses
-====================
-
- This section describes the mechanism by which XEmacs shows a matching
-open parenthesis when the user inserts a close parenthesis.
-
- - Variable: blink-paren-function
- The value of this variable should be a function (of no arguments)
- to be called whenever a character with close parenthesis syntax is
- inserted. The value of `blink-paren-function' may be `nil', in
- which case nothing is done.
-
- *Please note:* This variable was named `blink-paren-hook' in
- older Emacs versions, but since it is not called with the
- standard convention for hooks, it was renamed to
- `blink-paren-function' in version 19.
-
- - Variable: blink-matching-paren
- If this variable is `nil', then `blink-matching-open' does nothing.
-
- - Variable: blink-matching-paren-distance
- This variable specifies the maximum distance to scan for a matching
- parenthesis before giving up.
-
- - Variable: blink-matching-paren-delay
- This variable specifies the number of seconds for the cursor to
- remain at the matching parenthesis. A fraction of a second often
- gives good results, but the default is 1, which works on all
- systems.
-
- - Function: blink-matching-open
- This function is the default value of `blink-paren-function'. It
- assumes that point follows a character with close parenthesis
- syntax and moves the cursor momentarily to the matching opening
- character. If that character is not already on the screen, it
- displays the character's context in the echo area. To avoid long
- delays, this function does not search farther than
- `blink-matching-paren-distance' characters.
-
- Here is an example of calling this function explicitly.
-
- (defun interactive-blink-matching-open ()
- "Indicate momentarily the start of sexp before point."
- (interactive)
- (let ((blink-matching-paren-distance
- (buffer-size))
- (blink-matching-paren t))
- (blink-matching-open)))
-
-\1f
-File: lispref.info, Node: Usual Display, Next: Display Tables, Prev: Blinking, Up: Display
-
-Usual Display Conventions
-=========================
-
- The usual display conventions define how to display each character
-code. You can override these conventions by setting up a display table
-(*note Display Tables::). Here are the usual display conventions:
-
- * Character codes 32 through 126 map to glyph codes 32 through 126.
- Normally this means they display as themselves.
-
- * Character code 9 is a horizontal tab. It displays as whitespace
- up to a position determined by `tab-width'.
-
- * Character code 10 is a newline.
-
- * All other codes in the range 0 through 31, and code 127, display
- in one of two ways according to the value of `ctl-arrow'. If it is
- non-`nil', these codes map to sequences of two glyphs, where the
- first glyph is the ASCII code for `^'. (A display table can
- specify a glyph to use instead of `^'.) Otherwise, these codes map
- just like the codes in the range 128 to 255.
-
- * Character codes 128 through 255 map to sequences of four glyphs,
- where the first glyph is the ASCII code for `\', and the others are
- digit characters representing the code in octal. (A display table
- can specify a glyph to use instead of `\'.)
-
- The usual display conventions apply even when there is a display
-table, for any character whose entry in the active display table is
-`nil'. Thus, when you set up a display table, you need only specify
-the characters for which you want unusual behavior.
-
- These variables affect the way certain characters are displayed on
-the screen. Since they change the number of columns the characters
-occupy, they also affect the indentation functions.
-
- - User Option: ctl-arrow
- This buffer-local variable controls how control characters are
- displayed. If it is non-`nil', they are displayed as a caret
- followed by the character: `^A'. If it is `nil', they are
- displayed as a backslash followed by three octal digits: `\001'.
-
- - Variable: default-ctl-arrow
- The value of this variable is the default value for `ctl-arrow' in
- buffers that do not override it. *Note Default Value::.
-
- - User Option: tab-width
- The value of this variable is the spacing between tab stops used
- for displaying tab characters in Emacs buffers. The default is 8.
- Note that this feature is completely independent from the
- user-settable tab stops used by the command `tab-to-tab-stop'.
- *Note Indent Tabs::.
-
-\1f
-File: lispref.info, Node: Display Tables, Next: Beeping, Prev: Usual Display, Up: Display
-
-Display Tables
-==============
-
- You can use the "display table" feature to control how all 256
-possible character codes display on the screen. This is useful for
-displaying European languages that have letters not in the ASCII
-character set.
-
- The display table maps each character code into a sequence of
-"runes", each rune being an image that takes up one character position
-on the screen. You can also define how to display each rune on your
-terminal, using the "rune table".
-
-* Menu:
-
-* Display Table Format:: What a display table consists of.
-* Active Display Table:: How XEmacs selects a display table to use.
-* Character Descriptors:: Format of an individual element of a
- display table.
-
-\1f
-File: lispref.info, Node: Display Table Format, Next: Active Display Table, Up: Display Tables
-
-Display Table Format
---------------------
-
- A display table is an array of 256 elements. (In FSF Emacs, a display
-table is 262 elements. The six extra elements specify the truncation
-and continuation glyphs, etc. This method is very kludgey, and in
-XEmacs the variables `truncation-glyph', `continuation-glyph', etc. are
-used. *Note Truncation::.)
-
- - Function: make-display-table
- This creates and returns a display table. The table initially has
- `nil' in all elements.
-
- The 256 elements correspond to character codes; the Nth element says
-how to display the character code N. The value should be `nil', a
-string, a glyph, or a vector of strings and glyphs (*note Character
-Descriptors::). If an element is `nil', it says to display that
-character according to the usual display conventions (*note Usual
-Display::).
-
- If you use the display table to change the display of newline
-characters, the whole buffer will be displayed as one long "line."
-
- For example, here is how to construct a display table that mimics the
-effect of setting `ctl-arrow' to a non-`nil' value:
-
- (setq disptab (make-display-table))
- (let ((i 0))
- (while (< i 32)
- (or (= i ?\t) (= i ?\n)
- (aset disptab i (concat "^" (char-to-string (+ i 64)))))
- (setq i (1+ i)))
- (aset disptab 127 "^?"))
-
-\1f
-File: lispref.info, Node: Active Display Table, Next: Character Descriptors, Prev: Display Table Format, Up: Display Tables
-
-Active Display Table
---------------------
-
- The active display table is controlled by the variable
-`current-display-table'. This is a specifier, which means that you can
-specify separate values for it in individual buffers, windows, frames,
-and devices, as well as a global value. It also means that you cannot
-set this variable using `setq'; use `set-specifier' instead. *Note
-Specifiers::. (FSF Emacs uses `window-display-table',
-`buffer-display-table', `standard-display-table', etc. to control the
-display table. However, specifiers are a cleaner and more powerful way
-of doing the same thing. FSF Emacs also uses a different format for
-the contents of a display table, using additional indirection to a
-"glyph table" and such. Note that "glyph" has a different meaning in
-XEmacs.)
-
- Individual faces can also specify an overriding display table; this
-is set using `set-face-display-table'. *Note Faces::.
-
- If no display table can be determined for a particular window, then
-XEmacs uses the usual display conventions. *Note Usual Display::.
-
-\1f
-File: lispref.info, Node: Character Descriptors, Prev: Active Display Table, Up: Display Tables
-
-Character Descriptors
----------------------
-
- Each element of the display-table vector describes how to display a
-particular character and is called a "character descriptor". A
-character descriptor can be:
-
-a string
- Display this particular string wherever the character is to be
- displayed.
-
-a glyph
- Display this particular glyph wherever the character is to be
- displayed.
-
-a vector
- The vector may contain strings and/or glyphs. Display the
- elements of the vector one after another wherever the character is
- to be displayed.
-
-`nil'
- Display according to the standard interpretation (*note Usual
- Display::).
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Truncation, Next: The Echo Area, Prev: Refresh Screen, Up: Display
+
+Truncation
+==========
+
+ When a line of text extends beyond the right edge of a window, the
+line can either be truncated or continued on the next line. When a line
+is truncated, this is normally shown with a `\' in the rightmost column
+of the window on X displays, and with a `$' on TTY devices. When a
+line is continued or "wrapped" onto the next line, this is shown with a
+curved arrow in the rightmost column of the window (or with a `\' on
+TTY devices). The additional screen lines used to display a long text
+line are called "continuation" lines.
+
+ Normally, whenever line truncation is in effect for a particular
+window, a horizontal scrollbar is displayed in that window if the
+device supports scrollbars. *Note Scrollbars::.
+
+ Note that continuation is different from filling; continuation
+happens on the screen only, not in the buffer contents, and it breaks a
+line precisely at the right margin, not at a word boundary. *Note
+Filling::.
+
+ - User Option: truncate-lines
+ This buffer-local variable controls how XEmacs displays lines that
+ extend beyond the right edge of the window. If it is non-`nil',
+ then XEmacs does not display continuation lines; rather each line
+ of text occupies exactly one screen line, and a backslash appears
+ at the edge of any line that extends to or beyond the edge of the
+ window. The default is `nil'.
+
+ If the variable `truncate-partial-width-windows' is non-`nil',
+ then truncation is always used for side-by-side windows (within one
+ frame) regardless of the value of `truncate-lines'.
+
+ - User Option: default-truncate-lines
+ This variable is the default value for `truncate-lines', for
+ buffers that do not have local values for it.
+
+ - User Option: truncate-partial-width-windows
+ This variable controls display of lines that extend beyond the
+ right edge of the window, in side-by-side windows (*note Splitting
+ Windows::). If it is non-`nil', these lines are truncated;
+ otherwise, `truncate-lines' says what to do with them.
+
+ The backslash and curved arrow used to indicate truncated or
+continued lines are only defaults, and can be changed. These images
+are actually glyphs (*note Glyphs::). XEmacs provides a great deal of
+flexibility in how glyphs can be controlled. (This differs from FSF
+Emacs, which uses display tables to control these images.)
+
+ For details, *Note Redisplay Glyphs::.
+
+\1f
+File: lispref.info, Node: The Echo Area, Next: Warnings, Prev: Truncation, Up: Display
+
+The Echo Area
+=============
+
+ The "echo area" is used for displaying messages made with the
+`message' primitive, and for echoing keystrokes. It is not the same as
+the minibuffer, despite the fact that the minibuffer appears (when
+active) in the same place on the screen as the echo area. The `XEmacs
+Reference Manual' specifies the rules for resolving conflicts between
+the echo area and the minibuffer for use of that screen space (*note
+The Minibuffer: (emacs)Minibuffer.). Error messages appear in the echo
+area; see *Note Errors::.
+
+ You can write output in the echo area by using the Lisp printing
+functions with `t' as the stream (*note Output Functions::), or as
+follows:
+
+ - Function: message string &rest arguments
+ This function displays a one-line message in the echo area. The
+ argument STRING is similar to a C language `printf' control
+ string. See `format' in *Note String Conversion::, for the details
+ on the conversion specifications. `message' returns the
+ constructed string.
+
+ In batch mode, `message' prints the message text on the standard
+ error stream, followed by a newline.
+
+ If STRING is `nil', `message' clears the echo area. If the
+ minibuffer is active, this brings the minibuffer contents back onto
+ the screen immediately.
+
+ (message "Minibuffer depth is %d."
+ (minibuffer-depth))
+ -| Minibuffer depth is 0.
+ => "Minibuffer depth is 0."
+
+ ---------- Echo Area ----------
+ Minibuffer depth is 0.
+ ---------- Echo Area ----------
+
+ In addition to only displaying a message, XEmacs allows you to
+"label" your messages, giving you fine-grained control of their
+display. Message label is a symbol denoting the message type. Some
+standard labels are:
+
+ * `message'--default label used by the `message' function;
+
+ * `error'--default label used for reporting errors;
+
+ * `progress'--progress indicators like `Converting... 45%' (not
+ logged by default);
+
+ * `prompt'--prompt-like messages like `Isearch: foo' (not logged by
+ default);
+
+ * `command'--helper command messages like `Mark set' (not logged by
+ default);
+
+ * `no-log'--messages that should never be logged
+
+ Several messages may be stacked in the echo area at once. Lisp
+programs may access these messages, or remove them as appropriate, via
+the message stack.
+
+ - Function: display-message label message &optional frame stdout-p
+ This function displays MESSAGE (a string) labeled as LABEL, as
+ described above.
+
+ The FRAME argument specifies the frame to whose minibuffer the
+ message should be printed. This is currently unimplemented. The
+ STDOUT-P argument is used internally.
+
+ (display-message 'command "Mark set")
+
+ - Function: lmessage label string &rest arguments
+ This function displays a message STRING with label LABEL. It is
+ similar to `message' in that it accepts a `printf'-like strings
+ and any number of arguments.
+
+ ;; Display a command message.
+ (lmessage 'command "Comment column set to %d" comment-column)
+
+ ;; Display a progress message.
+ (lmessage 'progress "Fontifying %s... (%d)" buffer percentage)
+
+ ;; Display a message that should not be logged.
+ (lmessage 'no-log "Done")
+
+ - Function: clear-message &optional label frame stdout-p no-restore
+ This function remove any message with the given LABEL from the
+ message-stack, erasing it from the echo area if it's currently
+ displayed there.
+
+ If a message remains at the head of the message-stack and
+ NO-RESTORE is `nil', it will be displayed. The string which
+ remains in the echo area will be returned, or `nil' if the
+ message-stack is now empty. If LABEL is nil, the entire
+ message-stack is cleared.
+
+ ;; Show a message, wait for 2 seconds, and restore old minibuffer
+ ;; contents.
+ (message "A message")
+ -| A message
+ => "A Message"
+ (lmessage 'my-label "Newsflash! Newsflash!")
+ -| Newsflash! Newsflash!
+ => "Newsflash! Newsflash!"
+ (sit-for 2)
+ (clear-message 'my-label)
+ -| A message
+ => "A message"
+
+ Unless you need the return value or you need to specify a label,
+ you should just use `(message nil)'.
+
+ - Function: current-message &optional frame
+ This function returns the current message in the echo area, or
+ `nil'. The FRAME argument is currently unused.
+
+ Some of the messages displayed in the echo area are also recorded in
+the ` *Message-Log*' buffer. Exactly which messages will be recorded
+can be tuned using the following variables.
+
+ - User Option: log-message-max-size
+ This variable specifies the maximum size of the ` *Message-log*'
+ buffer.
+
+ - Variable: log-message-ignore-labels
+ This variable specifies the labels whose messages will not be
+ logged. It should be a list of symbols.
+
+ - Variable: log-message-ignore-regexps
+ This variable specifies the regular expressions matching messages
+ that will not be logged. It should be a list of regular
+ expressions.
+
+ Normally, packages that generate messages that might need to be
+ ignored should label them with `progress', `prompt', or `no-log',
+ so they can be filtered by `log-message-ignore-labels'.
+
+ - Variable: echo-keystrokes
+ This variable determines how much time should elapse before command
+ characters echo. Its value must be a number, which specifies the
+ number of seconds to wait before echoing. If the user types a
+ prefix key (such as `C-x') and then delays this many seconds
+ before continuing, the prefix key is echoed in the echo area. Any
+ subsequent characters in the same command will be echoed as well.
+
+ If the value is zero, then command input is not echoed.
+
+ - Variable: cursor-in-echo-area
+ This variable controls where the cursor appears when a message is
+ displayed in the echo area. If it is non-`nil', then the cursor
+ appears at the end of the message. Otherwise, the cursor appears
+ at point--not in the echo area at all.
+
+ The value is normally `nil'; Lisp programs bind it to `t' for
+ brief periods of time.
+
+\1f
+File: lispref.info, Node: Warnings, Next: Invisible Text, Prev: The Echo Area, Up: Display
+
+Warnings
+========
+
+ XEmacs contains a facility for unified display of various warnings.
+Unlike errors, warnings are displayed in the situations when XEmacs
+encounters a problem that is recoverable, but which should be fixed for
+safe future operation.
+
+ For example, warnings are printed by the startup code when it
+encounters problems with X keysyms, when there is an error in `.emacs',
+and in other problematic situations. Unlike messages, warnings are
+displayed in a separate buffer, and include an explanatory message that
+may span across several lines. Here is an example of how a warning is
+displayed:
+
+ (1) (initialization/error) An error has occurred while loading ~/.emacs:
+
+ Symbol's value as variable is void: bogus-variable
+
+ To ensure normal operation, you should investigate the cause of the error
+ in your initialization file and remove it. Use the `-debug-init' option
+ to XEmacs to view a complete error backtrace.
+
+ Each warning has a "class" and a "priority level". The class is a
+symbol describing what sort of warning this is, such as
+`initialization', `resource' or `key-mapping'.
+
+ The warning priority level specifies how important the warning is.
+The recognized warning levels, in increased order of priority, are:
+`debug', `info', `notice', `warning', `error', `critical', `alert' and
+`emergency'.
+
+ - Function: display-warning class message &optional level
+ This function displays a warning message MESSAGE (a string).
+ CLASS should be a warning class symbol, as described above, or a
+ list of such symbols. LEVEL describes the warning priority level.
+ If unspecified, it default to `warning'.
+
+ (display-warning 'resource
+ "Bad resource specification encountered:
+ something like
+
+ Emacs*foo: bar
+
+ You should replace the * with a . in order to get proper behavior when
+ you use the specifier and/or `set-face-*' functions.")
+
+ ---------- Warning buffer ----------
+ (1) (resource/warning) Bad resource specification encountered:
+ something like
+
+ Emacs*foo: bar
+
+ You should replace the * with a . in order to get proper behavior when
+ you use the specifier and/or `set-face-*' functions.
+ ---------- Warning buffer ----------
+
+ - Function: lwarn class level message &rest args
+ This function displays a formatted labeled warning message. As
+ above, CLASS should be the warning class symbol, or a list of such
+ symbols, and LEVEL should specify the warning priority level
+ (`warning' by default).
+
+ Unlike in `display-warning', MESSAGE may be a formatted message,
+ which will be, together with the rest of the arguments, passed to
+ `format'.
+
+ (lwarn 'message-log 'warning
+ "Error caught in `remove-message-hook': %s"
+ (error-message-string e))
+
+ - Variable: log-warning-minimum-level
+ This variable specifies the minimum level of warnings that should
+ be generated. Warnings with level lower than defined by this
+ variable are completely ignored, as if they never happened.
+
+ - Variable: display-warning-minimum-level
+ This variable specifies the minimum level of warnings that should
+ be displayed. Unlike `log-warning-minimum-level', setting this
+ function does not suppress warnings entirely--they are still
+ generated in the `*Warnings*' buffer, only they are not displayed
+ by default.
+
+ - Variable: log-warning-suppressed-classes
+ This variable specifies a list of classes that should not be
+ logged or displayed. If any of the class symbols associated with
+ a warning is the same as any of the symbols listed here, the
+ warning will be completely ignored, as it they never happened.
+
+ - Variable: display-warning-suppressed-classes
+ This variable specifies a list of classes that should not be
+ logged or displayed. If any of the class symbols associated with
+ a warning is the same as any of the symbols listed here, the
+ warning will not be displayed. The warning will still logged in
+ the *Warnings* buffer (unless also contained in
+ `log-warning-suppressed-classes'), but the buffer will not be
+ automatically popped up.
+
+\1f
+File: lispref.info, Node: Invisible Text, Next: Selective Display, Prev: Warnings, Up: Display
+
+Invisible Text
+==============
+
+ You can make characters "invisible", so that they do not appear on
+the screen, with the `invisible' property. This can be either a text
+property or a property of an overlay.
+
+ In the simplest case, any non-`nil' `invisible' property makes a
+character invisible. This is the default case--if you don't alter the
+default value of `buffer-invisibility-spec', this is how the
+`invisibility' property works. This feature is much like selective
+display (*note Selective Display::), but more general and cleaner.
+
+ More generally, you can use the variable `buffer-invisibility-spec'
+to control which values of the `invisible' property make text
+invisible. This permits you to classify the text into different subsets
+in advance, by giving them different `invisible' values, and
+subsequently make various subsets visible or invisible by changing the
+value of `buffer-invisibility-spec'.
+
+ Controlling visibility with `buffer-invisibility-spec' is especially
+useful in a program to display the list of entries in a data base. It
+permits the implementation of convenient filtering commands to view
+just a part of the entries in the data base. Setting this variable is
+very fast, much faster than scanning all the text in the buffer looking
+for properties to change.
+
+ - Variable: buffer-invisibility-spec
+ This variable specifies which kinds of `invisible' properties
+ actually make a character invisible.
+
+ `t'
+ A character is invisible if its `invisible' property is
+ non-`nil'. This is the default.
+
+ a list
+ Each element of the list makes certain characters invisible.
+ Ultimately, a character is invisible if any of the elements
+ of this list applies to it. The list can have two kinds of
+ elements:
+
+ `ATOM'
+ A character is invisible if its `invisible' property
+ value is ATOM or if it is a list with ATOM as a member.
+
+ `(ATOM . t)'
+ A character is invisible if its `invisible' property
+ value is ATOM or if it is a list with ATOM as a member.
+ Moreover, if this character is at the end of a line and
+ is followed by a visible newline, it displays an
+ ellipsis.
+
+ Ordinarily, commands that operate on text or move point do not care
+whether the text is invisible. However, the user-level line motion
+commands explicitly ignore invisible newlines.
+
+\1f
+File: lispref.info, Node: Selective Display, Next: Overlay Arrow, Prev: Invisible Text, Up: Display
+
+Selective Display
+=================
+
+ "Selective display" is a pair of features that hide certain lines on
+the screen.
+
+ The first variant, explicit selective display, is designed for use in
+a Lisp program. The program controls which lines are hidden by altering
+the text. Outline mode has traditionally used this variant. It has
+been partially replaced by the invisible text feature (*note Invisible
+Text::); there is a new version of Outline mode which uses that instead.
+
+ In the second variant, the choice of lines to hide is made
+automatically based on indentation. This variant is designed to be a
+user-level feature.
+
+ The way you control explicit selective display is by replacing a
+newline (control-j) with a carriage return (control-m). The text that
+was formerly a line following that newline is now invisible. Strictly
+speaking, it is temporarily no longer a line at all, since only newlines
+can separate lines; it is now part of the previous line.
+
+ Selective display does not directly affect editing commands. For
+example, `C-f' (`forward-char') moves point unhesitatingly into
+invisible text. However, the replacement of newline characters with
+carriage return characters affects some editing commands. For example,
+`next-line' skips invisible lines, since it searches only for newlines.
+Modes that use selective display can also define commands that take
+account of the newlines, or that make parts of the text visible or
+invisible.
+
+ When you write a selectively displayed buffer into a file, all the
+control-m's are output as newlines. This means that when you next read
+in the file, it looks OK, with nothing invisible. The selective display
+effect is seen only within XEmacs.
+
+ - Variable: selective-display
+ This buffer-local variable enables selective display. This means
+ that lines, or portions of lines, may be made invisible.
+
+ * If the value of `selective-display' is `t', then any portion
+ of a line that follows a control-m is not displayed.
+
+ * If the value of `selective-display' is a positive integer,
+ then lines that start with more than that many columns of
+ indentation are not displayed.
+
+ When some portion of a buffer is invisible, the vertical movement
+ commands operate as if that portion did not exist, allowing a
+ single `next-line' command to skip any number of invisible lines.
+ However, character movement commands (such as `forward-char') do
+ not skip the invisible portion, and it is possible (if tricky) to
+ insert or delete text in an invisible portion.
+
+ In the examples below, we show the _display appearance_ of the
+ buffer `foo', which changes with the value of `selective-display'.
+ The _contents_ of the buffer do not change.
+
+ (setq selective-display nil)
+ => nil
+
+ ---------- Buffer: foo ----------
+ 1 on this column
+ 2on this column
+ 3n this column
+ 3n this column
+ 2on this column
+ 1 on this column
+ ---------- Buffer: foo ----------
+
+ (setq selective-display 2)
+ => 2
+
+ ---------- Buffer: foo ----------
+ 1 on this column
+ 2on this column
+ 2on this column
+ 1 on this column
+ ---------- Buffer: foo ----------
+
+ - Variable: selective-display-ellipses
+ If this buffer-local variable is non-`nil', then XEmacs displays
+ `...' at the end of a line that is followed by invisible text.
+ This example is a continuation of the previous one.
+
+ (setq selective-display-ellipses t)
+ => t
+
+ ---------- Buffer: foo ----------
+ 1 on this column
+ 2on this column ...
+ 2on this column
+ 1 on this column
+ ---------- Buffer: foo ----------
+
+ You can use a display table to substitute other text for the
+ ellipsis (`...'). *Note Display Tables::.
+
+\1f
+File: lispref.info, Node: Overlay Arrow, Next: Temporary Displays, Prev: Selective Display, Up: Display
+
+The Overlay Arrow
+=================
+
+ The "overlay arrow" is useful for directing the user's attention to
+a particular line in a buffer. For example, in the modes used for
+interface to debuggers, the overlay arrow indicates the line of code
+about to be executed.
+
+ - Variable: overlay-arrow-string
+ This variable holds the string to display to call attention to a
+ particular line, or `nil' if the arrow feature is not in use.
+ Despite its name, the value of this variable can be either a string
+ or a glyph (*note Glyphs::).
+
+ - Variable: overlay-arrow-position
+ This variable holds a marker that indicates where to display the
+ overlay arrow. It should point at the beginning of a line. The
+ arrow text appears at the beginning of that line, overlaying any
+ text that would otherwise appear. Since the arrow is usually
+ short, and the line usually begins with indentation, normally
+ nothing significant is overwritten.
+
+ The overlay string is displayed only in the buffer that this marker
+ points into. Thus, only one buffer can have an overlay arrow at
+ any given time.
+
+ You can do the same job by creating an extent with a `begin-glyph'
+property. *Note Extent Properties::.
+
+\1f
+File: lispref.info, Node: Temporary Displays, Next: Blinking, Prev: Overlay Arrow, Up: Display
+
+Temporary Displays
+==================
+
+ Temporary displays are used by commands to put output into a buffer
+and then present it to the user for perusal rather than for editing.
+Many of the help commands use this feature.
+
+ - Special Form: with-output-to-temp-buffer buffer-name forms...
+ This function executes FORMS while arranging to insert any output
+ they print into the buffer named BUFFER-NAME. The buffer is then
+ shown in some window for viewing, displayed but not selected.
+
+ The string BUFFER-NAME specifies the temporary buffer, which need
+ not already exist. The argument must be a string, not a buffer.
+ The buffer is erased initially (with no questions asked), and it is
+ marked as unmodified after `with-output-to-temp-buffer' exits.
+
+ `with-output-to-temp-buffer' binds `standard-output' to the
+ temporary buffer, then it evaluates the forms in FORMS. Output
+ using the Lisp output functions within FORMS goes by default to
+ that buffer (but screen display and messages in the echo area,
+ although they are "output" in the general sense of the word, are
+ not affected). *Note Output Functions::.
+
+ The value of the last form in FORMS is returned.
+
+ ---------- Buffer: foo ----------
+ This is the contents of foo.
+ ---------- Buffer: foo ----------
+
+ (with-output-to-temp-buffer "foo"
+ (print 20)
+ (print standard-output))
+ => #<buffer foo>
+
+ ---------- Buffer: foo ----------
+ 20
+
+ #<buffer foo>
+
+ ---------- Buffer: foo ----------
+
+ - Variable: temp-buffer-show-function
+ If this variable is non-`nil', `with-output-to-temp-buffer' calls
+ it as a function to do the job of displaying a help buffer. The
+ function gets one argument, which is the buffer it should display.
+
+ In Emacs versions 18 and earlier, this variable was called
+ `temp-buffer-show-hook'.
+
+ - Function: momentary-string-display string position &optional char
+ message
+ This function momentarily displays STRING in the current buffer at
+ POSITION. It has no effect on the undo list or on the buffer's
+ modification status.
+
+ The momentary display remains until the next input event. If the
+ next input event is CHAR, `momentary-string-display' ignores it
+ and returns. Otherwise, that event remains buffered for
+ subsequent use as input. Thus, typing CHAR will simply remove the
+ string from the display, while typing (say) `C-f' will remove the
+ string from the display and later (presumably) move point forward.
+ The argument CHAR is a space by default.
+
+ The return value of `momentary-string-display' is not meaningful.
+
+ You can do the same job in a more general way by creating an extent
+ with a begin-glyph property. *Note Extent Properties::.
+
+ If MESSAGE is non-`nil', it is displayed in the echo area while
+ STRING is displayed in the buffer. If it is `nil', a default
+ message says to type CHAR to continue.
+
+ In this example, point is initially located at the beginning of the
+ second line:
+
+ ---------- Buffer: foo ----------
+ This is the contents of foo.
+ -!-Second line.
+ ---------- Buffer: foo ----------
+
+ (momentary-string-display
+ "**** Important Message! ****"
+ (point) ?\r
+ "Type RET when done reading")
+ => t
+
+ ---------- Buffer: foo ----------
+ This is the contents of foo.
+ **** Important Message! ****Second line.
+ ---------- Buffer: foo ----------
+
+ ---------- Echo Area ----------
+ Type RET when done reading
+ ---------- Echo Area ----------
+
+ This function works by actually changing the text in the buffer.
+ As a result, if you later undo in this buffer, you will see the
+ message come and go.
+
+\1f
+File: lispref.info, Node: Blinking, Next: Usual Display, Prev: Temporary Displays, Up: Display
+
+Blinking Parentheses
+====================
+
+ This section describes the mechanism by which XEmacs shows a matching
+open parenthesis when the user inserts a close parenthesis.
+
+ - Variable: blink-paren-function
+ The value of this variable should be a function (of no arguments)
+ to be called whenever a character with close parenthesis syntax is
+ inserted. The value of `blink-paren-function' may be `nil', in
+ which case nothing is done.
+
+ *Please note:* This variable was named `blink-paren-hook' in
+ older Emacs versions, but since it is not called with the
+ standard convention for hooks, it was renamed to
+ `blink-paren-function' in version 19.
+
+ - Variable: blink-matching-paren
+ If this variable is `nil', then `blink-matching-open' does nothing.
+
+ - Variable: blink-matching-paren-distance
+ This variable specifies the maximum distance to scan for a matching
+ parenthesis before giving up.
+
+ - Variable: blink-matching-paren-delay
+ This variable specifies the number of seconds for the cursor to
+ remain at the matching parenthesis. A fraction of a second often
+ gives good results, but the default is 1, which works on all
+ systems.
+
+ - Function: blink-matching-open
+ This function is the default value of `blink-paren-function'. It
+ assumes that point follows a character with close parenthesis
+ syntax and moves the cursor momentarily to the matching opening
+ character. If that character is not already on the screen, it
+ displays the character's context in the echo area. To avoid long
+ delays, this function does not search farther than
+ `blink-matching-paren-distance' characters.
+
+ Here is an example of calling this function explicitly.
+
+ (defun interactive-blink-matching-open ()
+ "Indicate momentarily the start of sexp before point."
+ (interactive)
+ (let ((blink-matching-paren-distance
+ (buffer-size))
+ (blink-matching-paren t))
+ (blink-matching-open)))
+
+\1f
+File: lispref.info, Node: Usual Display, Next: Display Tables, Prev: Blinking, Up: Display
+
+Usual Display Conventions
+=========================
+
+ The usual display conventions define how to display each character
+code. You can override these conventions by setting up a display table
+(*note Display Tables::). Here are the usual display conventions:
+
+ * Character codes 32 through 126 map to glyph codes 32 through 126.
+ Normally this means they display as themselves.
+
+ * Character code 9 is a horizontal tab. It displays as whitespace
+ up to a position determined by `tab-width'.
+
+ * Character code 10 is a newline.
+
+ * All other codes in the range 0 through 31, and code 127, display
+ in one of two ways according to the value of `ctl-arrow'. If it is
+ non-`nil', these codes map to sequences of two glyphs, where the
+ first glyph is the ASCII code for `^'. (A display table can
+ specify a glyph to use instead of `^'.) Otherwise, these codes map
+ just like the codes in the range 128 to 255.
+
+ * Character codes 128 through 255 map to sequences of four glyphs,
+ where the first glyph is the ASCII code for `\', and the others are
+ digit characters representing the code in octal. (A display table
+ can specify a glyph to use instead of `\'.)
+
+ The usual display conventions apply even when there is a display
+table, for any character whose entry in the active display table is
+`nil'. Thus, when you set up a display table, you need only specify
+the characters for which you want unusual behavior.
+
+ These variables affect the way certain characters are displayed on
+the screen. Since they change the number of columns the characters
+occupy, they also affect the indentation functions.
+
+ - User Option: ctl-arrow
+ This buffer-local variable controls how control characters are
+ displayed. If it is non-`nil', they are displayed as a caret
+ followed by the character: `^A'. If it is `nil', they are
+ displayed as a backslash followed by three octal digits: `\001'.
+
+ - Variable: default-ctl-arrow
+ The value of this variable is the default value for `ctl-arrow' in
+ buffers that do not override it. *Note Default Value::.
+
+ - User Option: tab-width
+ The value of this variable is the spacing between tab stops used
+ for displaying tab characters in Emacs buffers. The default is 8.
+ Note that this feature is completely independent from the
+ user-settable tab stops used by the command `tab-to-tab-stop'.
+ *Note Indent Tabs::.
+
+\1f
+File: lispref.info, Node: Display Tables, Next: Beeping, Prev: Usual Display, Up: Display
+
+Display Tables
+==============
+
+ You can use the "display table" feature to control how all 256
+possible character codes display on the screen. This is useful for
+displaying European languages that have letters not in the ASCII
+character set.
+
+ The display table maps each character code into a sequence of
+"runes", each rune being an image that takes up one character position
+on the screen. You can also define how to display each rune on your
+terminal, using the "rune table".
+
+* Menu:
+
+* Display Table Format:: What a display table consists of.
+* Active Display Table:: How XEmacs selects a display table to use.
+* Character Descriptors:: Format of an individual element of a
+ display table.
+
+\1f
+File: lispref.info, Node: Display Table Format, Next: Active Display Table, Up: Display Tables
+
+Display Table Format
+--------------------
+
+ A display table is an array of 256 elements. (In FSF Emacs, a display
+table is 262 elements. The six extra elements specify the truncation
+and continuation glyphs, etc. This method is very kludgey, and in
+XEmacs the variables `truncation-glyph', `continuation-glyph', etc. are
+used. *Note Truncation::.)
+
+ - Function: make-display-table
+ This creates and returns a display table. The table initially has
+ `nil' in all elements.
+
+ The 256 elements correspond to character codes; the Nth element says
+how to display the character code N. The value should be `nil', a
+string, a glyph, or a vector of strings and glyphs (*note Character
+Descriptors::). If an element is `nil', it says to display that
+character according to the usual display conventions (*note Usual
+Display::).
+
+ If you use the display table to change the display of newline
+characters, the whole buffer will be displayed as one long "line."
+
+ For example, here is how to construct a display table that mimics the
+effect of setting `ctl-arrow' to a non-`nil' value:
+
+ (setq disptab (make-display-table))
+ (let ((i 0))
+ (while (< i 32)
+ (or (= i ?\t) (= i ?\n)
+ (aset disptab i (concat "^" (char-to-string (+ i 64)))))
+ (setq i (1+ i)))
+ (aset disptab 127 "^?"))
+
+\1f
+File: lispref.info, Node: Active Display Table, Next: Character Descriptors, Prev: Display Table Format, Up: Display Tables
+
+Active Display Table
+--------------------
+
+ The active display table is controlled by the variable
+`current-display-table'. This is a specifier, which means that you can
+specify separate values for it in individual buffers, windows, frames,
+and devices, as well as a global value. It also means that you cannot
+set this variable using `setq'; use `set-specifier' instead. *Note
+Specifiers::. (FSF Emacs uses `window-display-table',
+`buffer-display-table', `standard-display-table', etc. to control the
+display table. However, specifiers are a cleaner and more powerful way
+of doing the same thing. FSF Emacs also uses a different format for
+the contents of a display table, using additional indirection to a
+"glyph table" and such. Note that "glyph" has a different meaning in
+XEmacs.)
+
+ - Variable: 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
+ `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.
+
+ Individual faces can also specify an overriding display table; this
+is set using `set-face-display-table'. *Note Faces::.
+
+ If no display table can be determined for a particular window, then
+XEmacs uses the usual display conventions. *Note Usual Display::.
+
+\1f
+File: lispref.info, Node: Character Descriptors, Prev: Active Display Table, Up: Display Tables
+
+Character Descriptors
+---------------------
+
+ Each element of the display-table vector describes how to display a
+particular character and is called a "character descriptor". A
+character descriptor can be:
+
+a string
+ Display this particular string wherever the character is to be
+ displayed.
+
+a glyph
+ Display this particular glyph wherever the character is to be
+ displayed.
+
+a vector
+ The vector may contain strings and/or glyphs. Display the
+ elements of the vector one after another wherever the character is
+ to be displayed.
+
+`nil'
+ Display according to the standard interpretation (*note Usual
+ Display::).
+
+\1f
File: lispref.info, Node: Beeping, Prev: Display Tables, Up: Display
Beeping
FUNCTION may remhash or puthash the entry currently being
processed by FUNCTION.
-\1f
-File: lispref.info, Node: Weak Hash Tables, Prev: Working With Hash Tables, Up: Hash Tables
-
-Weak Hash Tables
-================
-
- A "weak hash table" is a special variety of hash table whose
-elements do not count as GC referents. For any key-value pair in such a
-hash table, if either the key or value (or in some cases, if one
-particular one of the two) has no references to it outside of weak hash
-tables (and similar structures such as weak lists), the pair will be
-removed from the table, and the key and value collected. A non-weak
-hash table (or any other pointer) would prevent the objects from being
-collected.
-
- Weak hash tables are useful for keeping track of information in a
-non-obtrusive way, for example to implement caching. If the cache
-contains objects such as buffers, markers, image instances, etc. that
-will eventually disappear and get garbage-collected, using a weak hash
-table ensures that these objects are collected normally rather than
-remaining around forever, long past their actual period of use.
-(Otherwise, you'd have to explicitly map over the hash table every so
-often and remove unnecessary elements.)
-
- There are three types of weak hash tables:
-
-fully weak hash tables
- In these hash tables, a pair disappears if either the key or the
- value is unreferenced outside of the table.
-
-key-weak hash tables
- In these hash tables, a pair disappears if the key is unreferenced
- outside of the table, regardless of how the value is referenced.
-
-value-weak hash tables
- In these hash tables, a pair disappears if the value is
- unreferenced outside of the table, regardless of how the key is
- referenced.
-
- Also see *Note Weak Lists::.
-
- Weak hash tables are created by specifying the `:weakness' keyword to
-`make-hash-table'.
-
-\1f
-File: lispref.info, Node: Range Tables, Next: Databases, Prev: Hash Tables, Up: Top
-
-Range Tables
-************
-
- A range table is a table that efficiently associated values with
-ranges of integers.
-
- Note that range tables have a read syntax, like this:
-
- #s(range-table data ((-3 2) foo (5 20) bar))
-
- This maps integers in the range (-3, 2) to `foo' and integers in the
-range (5, 20) to `bar'.
-
- - Function: range-table-p object
- Return non-`nil' if OBJECT is a range table.
-
-* Menu:
-
-* Introduction to Range Tables:: Range tables efficiently map ranges of
- integers to values.
-* Working With Range Tables:: Range table functions.
-
-\1f
-File: lispref.info, Node: Introduction to Range Tables, Next: Working With Range Tables, Up: Range Tables
-
-Introduction to Range Tables
-============================
-
- - Function: make-range-table
- Make a new, empty range table.
-
- - Function: copy-range-table old-table
- Make a new range table which contains the same values for the same
- ranges as the given table. The values will not themselves be
- copied.
-
-\1f
-File: lispref.info, Node: Working With Range Tables, Prev: Introduction to Range Tables, Up: Range Tables
-
-Working With Range Tables
-=========================
-
- - Function: get-range-table pos table &optional default
- This function finds value for position POS in TABLE. If there is
- no corresponding value, return DEFAULT (defaults to `nil').
-
- - Function: put-range-table start end val table
- This function sets the value for range (START, END) to be VAL in
- TABLE.
-
- - Function: remove-range-table start end table
- This function removes the value for range (START, END) in TABLE.
-
- - Function: clear-range-table table
- This function flushes TABLE.
-
- - Function: map-range-table function table
- This function maps FUNCTION over entries in TABLE, calling it with
- three args, the beginning and end of the range and the
- corresponding value.
-
-\1f
-File: lispref.info, Node: Databases, Next: Processes, Prev: Range Tables, Up: Top
-
-Databases
-*********
-
- - Function: databasep object
- This function returns non-`nil' if OBJECT is a database.
-
-* Menu:
-
-* Connecting to a Database::
-* Working With a Database::
-* Other Database Functions::
-
-\1f
-File: lispref.info, Node: Connecting to a Database, Next: Working With a Database, Up: Databases
-
-Connecting to a Database
-========================
-
- - Function: open-database file &optional type subtype access mode
- This function opens database FILE, using database method TYPE and
- SUBTYPE, with access rights ACCESS and permissions MODE. ACCESS
- can be any combination of `r' `w' and `+', for read, write, and
- creation flags.
-
- TYPE can have the value `'dbm' or `'berkeley_db' to select the
- type of database file to use. (Note: XEmacs may not support both
- of these types.)
-
- For a TYPE of `'dbm', there are no subtypes, so SUBTYPE should by
- `nil'.
-
- For a TYPE of `'berkeley_db', the following subtypes are
- available: `'hash', `'btree', and `'recno'. See the manpages for
- the Berkeley DB functions to more information about these types.
-
- - Function: close-database obj
- This function closes database OBJ.
-
- - Function: database-live-p obj
- This function returns `t' iff OBJ is an active database, else
- `nil'.
-
-\1f
-File: lispref.info, Node: Working With a Database, Next: Other Database Functions, Prev: Connecting to a Database, Up: Databases
-
-Working With a Database
-=======================
-
- - Function: get-database key dbase &optional default
- This function finds the value for KEY in DATABASE. If there is no
- corresponding value, DEFAULT is returned (`nil' if DEFAULT is
- omitted).
-
- - Function: map-database function dbase
- This function maps FUNCTION over entries in DATABASE, calling it
- with two args, each key and value in the database.
-
- - Function: put-database key val dbase &optional replace
- This function stores KEY and VAL in DATABASE. If optional fourth
- arg REPLACE is non-`nil', replace any existing entry in the
- database.
-
- - Function: remove-database key dbase
- This function removes KEY from DATABASE.
-
-\1f
-File: lispref.info, Node: Other Database Functions, Prev: Working With a Database, Up: Databases
-
-Other Database Functions
-========================
-
- - Function: database-file-name obj
- This function returns the filename associated with the database
- OBJ.
-
- - Function: database-last-error &optional obj
- This function returns the last error associated with database OBJ.
-
- - Function: database-subtype obj
- This function returns the subtype of database OBJ, if any.
-
- - Function: database-type obj
- This function returns the type of database OBJ.
-
-\1f
-File: lispref.info, Node: Processes, Next: System Interface, Prev: Databases, Up: Top
-
-Processes
-*********
-
- In the terminology of operating systems, a "process" is a space in
-which a program can execute. XEmacs runs in a process. XEmacs Lisp
-programs can invoke other programs in processes of their own. These are
-called "subprocesses" or "child processes" of the XEmacs process, which
-is their "parent process".
-
- A subprocess of XEmacs may be "synchronous" or "asynchronous",
-depending on how it is created. When you create a synchronous
-subprocess, the Lisp program waits for the subprocess to terminate
-before continuing execution. When you create an asynchronous
-subprocess, it can run in parallel with the Lisp program. This kind of
-subprocess is represented within XEmacs by a Lisp object which is also
-called a "process". Lisp programs can use this object to communicate
-with the subprocess or to control it. For example, you can send
-signals, obtain status information, receive output from the process, or
-send input to it.
-
- - Function: processp object
- This function returns `t' if OBJECT is a process, `nil' otherwise.
-
-* Menu:
-
-* Subprocess Creation:: Functions that start subprocesses.
-* Synchronous Processes:: Details of using synchronous subprocesses.
-* MS-DOS Subprocesses:: On MS-DOS, you must indicate text vs binary
- for data sent to and from a subprocess.
-* Asynchronous Processes:: Starting up an asynchronous subprocess.
-* Deleting Processes:: Eliminating an asynchronous subprocess.
-* Process Information:: Accessing run-status and other attributes.
-* Input to Processes:: Sending input to an asynchronous subprocess.
-* Signals to Processes:: Stopping, continuing or interrupting
- an asynchronous subprocess.
-* Output from Processes:: Collecting output from an asynchronous subprocess.
-* Sentinels:: Sentinels run when process run-status changes.
-* Process Window Size:: Changing the logical window size of a process.
-* Transaction Queues:: Transaction-based communication with subprocesses.
-* Network:: Opening network connections.
-
-\1f
-File: lispref.info, Node: Subprocess Creation, Next: Synchronous Processes, Up: Processes
-
-Functions that Create Subprocesses
-==================================
-
- There are three functions that create a new subprocess in which to
-run a program. One of them, `start-process', creates an asynchronous
-process and returns a process object (*note Asynchronous Processes::).
-The other two, `call-process' and `call-process-region', create a
-synchronous process and do not return a process object (*note
-Synchronous Processes::).
-
- Synchronous and asynchronous processes are explained in following
-sections. Since the three functions are all called in a similar
-fashion, their common arguments are described here.
-
- In all cases, the function's PROGRAM argument specifies the program
-to be run. An error is signaled if the file is not found or cannot be
-executed. If the file name is relative, the variable `exec-path'
-contains a list of directories to search. Emacs initializes
-`exec-path' when it starts up, based on the value of the environment
-variable `PATH'. The standard file name constructs, `~', `.', and
-`..', are interpreted as usual in `exec-path', but environment variable
-substitutions (`$HOME', etc.) are not recognized; use
-`substitute-in-file-name' to perform them (*note File Name Expansion::).
-
- Each of the subprocess-creating functions has a BUFFER-OR-NAME
-argument which specifies where the standard output from the program will
-go. If BUFFER-OR-NAME is `nil', that says to discard the output unless
-a filter function handles it. (*Note Filter Functions::, and *Note
-Read and Print::.) Normally, you should avoid having multiple
-processes send output to the same buffer because their output would be
-intermixed randomly.
-
- All three of the subprocess-creating functions have a `&rest'
-argument, ARGS. The ARGS must all be strings, and they are supplied to
-PROGRAM as separate command line arguments. Wildcard characters and
-other shell constructs are not allowed in these strings, since they are
-passed directly to the specified program.
-
- *Please note:* The argument PROGRAM contains only the name of the
-program; it may not contain any command-line arguments. You must use
-ARGS to provide those.
-
- The subprocess gets its current directory from the value of
-`default-directory' (*note File Name Expansion::).
-
- The subprocess inherits its environment from XEmacs; but you can
-specify overrides for it with `process-environment'. *Note System
-Environment::.
-
- - Variable: exec-directory
- The value of this variable is the name of a directory (a string)
- that contains programs that come with XEmacs, that are intended
- for XEmacs to invoke. The program `wakeup' is an example of such
- a program; the `display-time' command uses it to get a reminder
- once per minute.
-
- - User Option: exec-path
- The value of this variable is a list of directories to search for
- programs to run in subprocesses. Each element is either the name
- of a directory (i.e., a string), or `nil', which stands for the
- default directory (which is the value of `default-directory').
-
- The value of `exec-path' is used by `call-process' and
- `start-process' when the PROGRAM argument is not an absolute file
- name.
-
-\1f
-File: lispref.info, Node: Synchronous Processes, Next: MS-DOS Subprocesses, Prev: Subprocess Creation, Up: Processes
-
-Creating a Synchronous Process
-==============================
-
- After a "synchronous process" is created, XEmacs waits for the
-process to terminate before continuing. Starting Dired is an example of
-this: it runs `ls' in a synchronous process, then modifies the output
-slightly. Because the process is synchronous, the entire directory
-listing arrives in the buffer before XEmacs tries to do anything with
-it.
-
- While Emacs waits for the synchronous subprocess to terminate, the
-user can quit by typing `C-g'. The first `C-g' tries to kill the
-subprocess with a `SIGINT' signal; but it waits until the subprocess
-actually terminates before quitting. If during that time the user
-types another `C-g', that kills the subprocess instantly with `SIGKILL'
-and quits immediately. *Note Quitting::.
-
- The synchronous subprocess functions returned `nil' in version 18.
-In version 19, they return an indication of how the process terminated.
-
- - Function: call-process program &optional infile destination display
- &rest args
- This function calls PROGRAM in a separate process and waits for it
- to finish.
-
- The standard input for the process comes from file INFILE if
- INFILE is not `nil' and from `/dev/null' otherwise. The argument
- DESTINATION says where to put the process output. Here are the
- possibilities:
-
- a buffer
- Insert the output in that buffer, before point. This
- includes both the standard output stream and the standard
- error stream of the process.
-
- a string
- Find or create a buffer with that name, then insert the
- output in that buffer, before point.
-
- `t'
- Insert the output in the current buffer, before point.
-
- `nil'
- Discard the output.
-
- 0
- Discard the output, and return immediately without waiting
- for the subprocess to finish.
-
- In this case, the process is not truly synchronous, since it
- can run in parallel with Emacs; but you can think of it as
- synchronous in that Emacs is essentially finished with the
- subprocess as soon as this function returns.
-
- (REAL-DESTINATION ERROR-DESTINATION)
- Keep the standard output stream separate from the standard
- error stream; deal with the ordinary output as specified by
- REAL-DESTINATION, and dispose of the error output according
- to ERROR-DESTINATION. The value `nil' means discard it, `t'
- means mix it with the ordinary output, and a string specifies
- a file name to redirect error output into.
-
- You can't directly specify a buffer to put the error output
- in; that is too difficult to implement. But you can achieve
- this result by sending the error output to a temporary file
- and then inserting the file into a buffer.
-
- If DISPLAY is non-`nil', then `call-process' redisplays the buffer
- as output is inserted. Otherwise the function does no redisplay,
- and the results become visible on the screen only when XEmacs
- redisplays that buffer in the normal course of events.
-
- The remaining arguments, ARGS, are strings that specify command
- line arguments for the program.
-
- The value returned by `call-process' (unless you told it not to
- wait) indicates the reason for process termination. A number
- gives the exit status of the subprocess; 0 means success, and any
- other value means failure. If the process terminated with a
- signal, `call-process' returns a string describing the signal.
-
- In the examples below, the buffer `foo' is current.
-
- (call-process "pwd" nil t)
- => nil
-
- ---------- Buffer: foo ----------
- /usr/user/lewis/manual
- ---------- Buffer: foo ----------
-
- (call-process "grep" nil "bar" nil "lewis" "/etc/passwd")
- => nil
-
- ---------- Buffer: bar ----------
- lewis:5LTsHm66CSWKg:398:21:Bil Lewis:/user/lewis:/bin/csh
-
- ---------- Buffer: bar ----------
-
- The `insert-directory' function contains a good example of the use
- of `call-process':
-
- (call-process insert-directory-program nil t nil switches
- (if full-directory-p
- (concat (file-name-as-directory file) ".")
- file))
-
- - Function: call-process-region start end program &optional delete
- destination display &rest args
- This function sends the text between START to END as standard
- input to a process running PROGRAM. It deletes the text sent if
- DELETE is non-`nil'; this is useful when BUFFER is `t', to insert
- the output in the current buffer.
-
- The arguments DESTINATION and DISPLAY control what to do with the
- output from the subprocess, and whether to update the display as
- it comes in. For details, see the description of `call-process',
- above. If DESTINATION is the integer 0, `call-process-region'
- discards the output and returns `nil' immediately, without waiting
- for the subprocess to finish.
-
- The remaining arguments, ARGS, are strings that specify command
- line arguments for the program.
-
- The return value of `call-process-region' is just like that of
- `call-process': `nil' if you told it to return without waiting;
- otherwise, a number or string which indicates how the subprocess
- terminated.
-
- In the following example, we use `call-process-region' to run the
- `cat' utility, with standard input being the first five characters
- in buffer `foo' (the word `input'). `cat' copies its standard
- input into its standard output. Since the argument DESTINATION is
- `t', this output is inserted in the current buffer.
-
- ---------- Buffer: foo ----------
- input-!-
- ---------- Buffer: foo ----------
-
- (call-process-region 1 6 "cat" nil t)
- => nil
-
- ---------- Buffer: foo ----------
- inputinput-!-
- ---------- Buffer: foo ----------
-
- The `shell-command-on-region' command uses `call-process-region'
- like this:
-
- (call-process-region
- start end
- shell-file-name ; Name of program.
- nil ; Do not delete region.
- buffer ; Send output to `buffer'.
- nil ; No redisplay during output.
- "-c" command) ; Arguments for the shell.
-
-\1f
-File: lispref.info, Node: MS-DOS Subprocesses, Next: Asynchronous Processes, Prev: Synchronous Processes, Up: Processes
-
-MS-DOS Subprocesses
-===================
-
- On MS-DOS, you must indicate whether the data going to and from a
-synchronous subprocess are text or binary. Text data requires
-translation between the end-of-line convention used within Emacs (a
-single newline character) and the convention used outside Emacs (the
-two-character sequence, CRLF).
-
- The variable `binary-process-input' applies to input sent to the
-subprocess, and `binary-process-output' applies to output received from
-it. A non-`nil' value means the data is non-text; `nil' means the data
-is text, and calls for conversion.
-
- - Variable: binary-process-input
- If this variable is `nil', convert newlines to CRLF sequences in
- the input to a synchronous subprocess.
-
- - Variable: binary-process-output
- If this variable is `nil', convert CRLF sequences to newlines in
- the output from a synchronous subprocess.
-
- *Note Files and MS-DOS::, for related information.
-
-\1f
-File: lispref.info, Node: Asynchronous Processes, Next: Deleting Processes, Prev: MS-DOS Subprocesses, Up: Processes
-
-Creating an Asynchronous Process
-================================
-
- After an "asynchronous process" is created, Emacs and the Lisp
-program both continue running immediately. The process may thereafter
-run in parallel with Emacs, and the two may communicate with each other
-using the functions described in following sections. Here we describe
-how to create an asynchronous process with `start-process'.
-
- - Function: start-process name buffer-or-name program &rest args
- This function creates a new asynchronous subprocess and starts the
- program PROGRAM running in it. It returns a process object that
- stands for the new subprocess in Lisp. The argument NAME
- specifies the name for the process object; if a process with this
- name already exists, then NAME is modified (by adding `<1>', etc.)
- to be unique. The buffer BUFFER-OR-NAME is the buffer to
- associate with the process.
-
- The remaining arguments, ARGS, are strings that specify command
- line arguments for the program.
-
- In the example below, the first process is started and runs
- (rather, sleeps) for 100 seconds. Meanwhile, the second process
- is started, and given the name `my-process<1>' for the sake of
- uniqueness. It inserts the directory listing at the end of the
- buffer `foo', before the first process finishes. Then it
- finishes, and a message to that effect is inserted in the buffer.
- Much later, the first process finishes, and another message is
- inserted in the buffer for it.
-
- (start-process "my-process" "foo" "sleep" "100")
- => #<process my-process>
-
- (start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin")
- => #<process my-process<1>>
-
- ---------- Buffer: foo ----------
- total 2
- lrwxrwxrwx 1 lewis 14 Jul 22 10:12 gnuemacs --> /emacs
- -rwxrwxrwx 1 lewis 19 Jul 30 21:02 lemon
-
- Process my-process<1> finished
-
- Process my-process finished
- ---------- Buffer: foo ----------
-
- - Function: start-process-shell-command name buffer-or-name command
- &rest command-args
- This function is like `start-process' except that it uses a shell
- to execute the specified command. The argument COMMAND is a shell
- command name, and COMMAND-ARGS are the arguments for the shell
- command.
-
- - Variable: process-connection-type
- This variable controls the type of device used to communicate with
- asynchronous subprocesses. If it is non-`nil', then PTYs are
- used, when available. Otherwise, pipes are used.
-
- PTYs are usually preferable for processes visible to the user, as
- in Shell mode, because they allow job control (`C-c', `C-z', etc.)
- to work between the process and its children whereas pipes do not.
- For subprocesses used for internal purposes by programs, it is
- often better to use a pipe, because they are more efficient. In
- addition, the total number of PTYs is limited on many systems and
- it is good not to waste them.
-
- The value `process-connection-type' is used when `start-process'
- is called. So you can specify how to communicate with one
- subprocess by binding the variable around the call to
- `start-process'.
-
- (let ((process-connection-type nil)) ; Use a pipe.
- (start-process ...))
-
- To determine whether a given subprocess actually got a pipe or a
- PTY, use the function `process-tty-name' (*note Process
- Information::).
-
-\1f
-File: lispref.info, Node: Deleting Processes, Next: Process Information, Prev: Asynchronous Processes, Up: Processes
-
-Deleting Processes
-==================
-
- "Deleting a process" disconnects XEmacs immediately from the
-subprocess, and removes it from the list of active processes. It sends
-a signal to the subprocess to make the subprocess terminate, but this is
-not guaranteed to happen immediately. The process object itself
-continues to exist as long as other Lisp objects point to it.
-
- You can delete a process explicitly at any time. Processes are
-deleted automatically after they terminate, but not necessarily right
-away. If you delete a terminated process explicitly before it is
-deleted automatically, no harm results.
-
- - Variable: delete-exited-processes
- This variable controls automatic deletion of processes that have
- terminated (due to calling `exit' or to a signal). If it is
- `nil', then they continue to exist until the user runs
- `list-processes'. Otherwise, they are deleted immediately after
- they exit.
-
- - Function: delete-process name
- This function deletes the process associated with NAME, killing it
- with a `SIGHUP' signal. The argument NAME may be a process, the
- name of a process, a buffer, or the name of a buffer.
-
- (delete-process "*shell*")
- => nil
-
- - Function: process-kill-without-query process &optional
- require-query-p
- This function declares that XEmacs need not query the user if
- PROCESS is still running when XEmacs is exited. The process will
- be deleted silently. If REQUIRE-QUERY-P is non-`nil', then XEmacs
- _will_ query the user (this is the default). The return value is
- `t' if a query was formerly required, and `nil' otherwise.
-
- (process-kill-without-query (get-process "shell"))
- => t
-
-\1f
-File: lispref.info, Node: Process Information, Next: Input to Processes, Prev: Deleting Processes, Up: Processes
-
-Process Information
-===================
-
- Several functions return information about processes.
-`list-processes' is provided for interactive use.
-
- - Command: list-processes
- This command displays a listing of all living processes. In
- addition, it finally deletes any process whose status was `Exited'
- or `Signaled'. It returns `nil'.
-
- - Function: process-list
- This function returns a list of all processes that have not been
- deleted.
-
- (process-list)
- => (#<process display-time> #<process shell>)
-
- - Function: get-process name
- This function returns the process named NAME, or `nil' if there is
- none. An error is signaled if NAME is not a string.
-
- (get-process "shell")
- => #<process shell>
-
- - Function: process-command process
- This function returns the command that was executed to start
- PROCESS. This is a list of strings, the first string being the
- program executed and the rest of the strings being the arguments
- that were given to the program.
-
- (process-command (get-process "shell"))
- => ("/bin/csh" "-i")
-
- - Function: process-id process
- This function returns the PID of PROCESS. This is an integer that
- distinguishes the process PROCESS from all other processes running
- on the same computer at the current time. The PID of a process is
- chosen by the operating system kernel when the process is started
- and remains constant as long as the process exists.
-
- - Function: process-name process
- This function returns the name of PROCESS.
-
- - Function: process-status process-name
- This function returns the status of PROCESS-NAME as a symbol. The
- argument PROCESS-NAME must be a process, a buffer, a process name
- (string) or a buffer name (string).
-
- The possible values for an actual subprocess are:
-
- `run'
- for a process that is running.
-
- `stop'
- for a process that is stopped but continuable.
-
- `exit'
- for a process that has exited.
-
- `signal'
- for a process that has received a fatal signal.
-
- `open'
- for a network connection that is open.
-
- `closed'
- for a network connection that is closed. Once a connection
- is closed, you cannot reopen it, though you might be able to
- open a new connection to the same place.
-
- `nil'
- if PROCESS-NAME is not the name of an existing process.
-
- (process-status "shell")
- => run
- (process-status (get-buffer "*shell*"))
- => run
- x
- => #<process xx<1>>
- (process-status x)
- => exit
-
- For a network connection, `process-status' returns one of the
- symbols `open' or `closed'. The latter means that the other side
- closed the connection, or XEmacs did `delete-process'.
-
- In earlier Emacs versions (prior to version 19), the status of a
- network connection was `run' if open, and `exit' if closed.
-
- - Function: process-kill-without-query-p process
- This function returns whether PROCESS will be killed without
- querying the user, if it is running when XEmacs is exited. The
- default value is `nil'.
-
- - Function: process-exit-status process
- This function returns the exit status of PROCESS or the signal
- number that killed it. (Use the result of `process-status' to
- determine which of those it is.) If PROCESS has not yet
- terminated, the value is 0.
-
- - Function: process-tty-name process
- This function returns the terminal name that PROCESS is using for
- its communication with Emacs--or `nil' if it is using pipes
- instead of a terminal (see `process-connection-type' in *Note
- Asynchronous Processes::).
-
-\1f
-File: lispref.info, Node: Input to Processes, Next: Signals to Processes, Prev: Process Information, Up: Processes
-
-Sending Input to Processes
-==========================
-
- Asynchronous subprocesses receive input when it is sent to them by
-XEmacs, which is done with the functions in this section. You must
-specify the process to send input to, and the input data to send. The
-data appears on the "standard input" of the subprocess.
-
- Some operating systems have limited space for buffered input in a
-PTY. On these systems, Emacs sends an EOF periodically amidst the
-other characters, to force them through. For most programs, these EOFs
-do no harm.
-
- - Function: process-send-string process-name string
- This function sends PROCESS-NAME the contents of STRING as
- standard input. The argument PROCESS-NAME must be a process or
- the name of a process. If it is `nil', the current buffer's
- process is used.
-
- The function returns `nil'.
-
- (process-send-string "shell<1>" "ls\n")
- => nil
-
-
- ---------- Buffer: *shell* ----------
- ...
- introduction.texi syntax-tables.texi~
- introduction.texi~ text.texi
- introduction.txt text.texi~
- ...
- ---------- Buffer: *shell* ----------
-
- - Command: process-send-region process-name start end
- This function sends the text in the region defined by START and
- END as standard input to PROCESS-NAME, which is a process or a
- process name. (If it is `nil', the current buffer's process is
- used.)
-
- An error is signaled unless both START and END are integers or
- markers that indicate positions in the current buffer. (It is
- unimportant which number is larger.)
-
- - Function: process-send-eof &optional process-name
- This function makes PROCESS-NAME see an end-of-file in its input.
- The EOF comes after any text already sent to it.
-
- If PROCESS-NAME is not supplied, or if it is `nil', then this
- function sends the EOF to the current buffer's process. An error
- is signaled if the current buffer has no process.
-
- The function returns PROCESS-NAME.
-
- (process-send-eof "shell")
- => "shell"
-
-\1f
-File: lispref.info, Node: Signals to Processes, Next: Output from Processes, Prev: Input to Processes, Up: Processes
-
-Sending Signals to Processes
-============================
-
- "Sending a signal" to a subprocess is a way of interrupting its
-activities. There are several different signals, each with its own
-meaning. The set of signals and their names is defined by the operating
-system. For example, the signal `SIGINT' means that the user has typed
-`C-c', or that some analogous thing has happened.
-
- Each signal has a standard effect on the subprocess. Most signals
-kill the subprocess, but some stop or resume execution instead. Most
-signals can optionally be handled by programs; if the program handles
-the signal, then we can say nothing in general about its effects.
-
- The set of signals and their names is defined by the operating
-system; XEmacs has facilities for sending only a few of the signals
-that are defined. XEmacs can send signals only to its own subprocesses.
-
- You can send signals explicitly by calling the functions in this
-section. XEmacs also sends signals automatically at certain times:
-killing a buffer sends a `SIGHUP' signal to all its associated
-processes; killing XEmacs sends a `SIGHUP' signal to all remaining
-processes. (`SIGHUP' is a signal that usually indicates that the user
-hung up the phone.)
-
- Each of the signal-sending functions takes two optional arguments:
-PROCESS-NAME and CURRENT-GROUP.
-
- The argument PROCESS-NAME must be either a process, the name of one,
-or `nil'. If it is `nil', the process defaults to the process
-associated with the current buffer. An error is signaled if
-PROCESS-NAME does not identify a process.
-
- The argument CURRENT-GROUP is a flag that makes a difference when
-you are running a job-control shell as an XEmacs subprocess. If it is
-non-`nil', then the signal is sent to the current process-group of the
-terminal that XEmacs uses to communicate with the subprocess. If the
-process is a job-control shell, this means the shell's current subjob.
-If it is `nil', the signal is sent to the process group of the
-immediate subprocess of XEmacs. If the subprocess is a job-control
-shell, this is the shell itself.
-
- The flag CURRENT-GROUP has no effect when a pipe is used to
-communicate with the subprocess, because the operating system does not
-support the distinction in the case of pipes. For the same reason,
-job-control shells won't work when a pipe is used. See
-`process-connection-type' in *Note Asynchronous Processes::.
-
- - Function: interrupt-process &optional process-name current-group
- This function interrupts the process PROCESS-NAME by sending the
- signal `SIGINT'. Outside of XEmacs, typing the "interrupt
- character" (normally `C-c' on some systems, and `DEL' on others)
- sends this signal. When the argument CURRENT-GROUP is non-`nil',
- you can think of this function as "typing `C-c'" on the terminal
- by which XEmacs talks to the subprocess.
-
- - Function: kill-process &optional process-name current-group
- This function kills the process PROCESS-NAME by sending the signal
- `SIGKILL'. This signal kills the subprocess immediately, and
- cannot be handled by the subprocess.
-
- - Function: quit-process &optional process-name current-group
- This function sends the signal `SIGQUIT' to the process
- PROCESS-NAME. This signal is the one sent by the "quit character"
- (usually `C-b' or `C-\') when you are not inside XEmacs.
-
- - Function: stop-process &optional process-name current-group
- This function stops the process PROCESS-NAME by sending the signal
- `SIGTSTP'. Use `continue-process' to resume its execution.
-
- On systems with job control, the "stop character" (usually `C-z')
- sends this signal (outside of XEmacs). When CURRENT-GROUP is
- non-`nil', you can think of this function as "typing `C-z'" on the
- terminal XEmacs uses to communicate with the subprocess.
-
- - Function: continue-process &optional process-name current-group
- This function resumes execution of the process PROCESS by sending
- it the signal `SIGCONT'. This presumes that PROCESS-NAME was
- stopped previously.
-
- - Function: signal-process pid signal
- This function sends a signal to process PID, which need not be a
- child of XEmacs. The argument SIGNAL specifies which signal to
- send; it should be an integer.
-
-\1f
-File: lispref.info, Node: Output from Processes, Next: Sentinels, Prev: Signals to Processes, Up: Processes
-
-Receiving Output from Processes
-===============================
-
- There are two ways to receive the output that a subprocess writes to
-its standard output stream. The output can be inserted in a buffer,
-which is called the associated buffer of the process, or a function
-called the "filter function" can be called to act on the output. If
-the process has no buffer and no filter function, its output is
-discarded.
-
-* Menu:
-
-* Process Buffers:: If no filter, output is put in a buffer.
-* Filter Functions:: Filter functions accept output from the process.
-* Accepting Output:: Explicitly permitting subprocess output.
- Waiting for subprocess output.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Weak Hash Tables, Prev: Working With Hash Tables, Up: Hash Tables
+
+Weak Hash Tables
+================
+
+ A "weak hash table" is a special variety of hash table whose
+elements do not count as GC referents. For any key-value pair in such a
+hash table, if either the key or value (or in some cases, if one
+particular one of the two) has no references to it outside of weak hash
+tables (and similar structures such as weak lists), the pair will be
+removed from the table, and the key and value collected. A non-weak
+hash table (or any other pointer) would prevent the objects from being
+collected.
+
+ Weak hash tables are useful for keeping track of information in a
+non-obtrusive way, for example to implement caching. If the cache
+contains objects such as buffers, markers, image instances, etc. that
+will eventually disappear and get garbage-collected, using a weak hash
+table ensures that these objects are collected normally rather than
+remaining around forever, long past their actual period of use.
+(Otherwise, you'd have to explicitly map over the hash table every so
+often and remove unnecessary elements.)
+
+ There are three types of weak hash tables:
+
+fully weak hash tables
+ In these hash tables, a pair disappears if either the key or the
+ value is unreferenced outside of the table.
+
+key-weak hash tables
+ In these hash tables, a pair disappears if the key is unreferenced
+ outside of the table, regardless of how the value is referenced.
+
+value-weak hash tables
+ In these hash tables, a pair disappears if the value is
+ unreferenced outside of the table, regardless of how the key is
+ referenced.
+
+ Also see *Note Weak Lists::.
+
+ Weak hash tables are created by specifying the `:weakness' keyword to
+`make-hash-table'.
+
+\1f
+File: lispref.info, Node: Range Tables, Next: Databases, Prev: Hash Tables, Up: Top
+
+Range Tables
+************
+
+ A range table is a table that efficiently associated values with
+ranges of integers.
+
+ Note that range tables have a read syntax, like this:
+
+ #s(range-table data ((-3 2) foo (5 20) bar))
+
+ This maps integers in the range (-3, 2) to `foo' and integers in the
+range (5, 20) to `bar'.
+
+ - Function: range-table-p object
+ Return non-`nil' if OBJECT is a range table.
+
+* Menu:
+
+* Introduction to Range Tables:: Range tables efficiently map ranges of
+ integers to values.
+* Working With Range Tables:: Range table functions.
+
+\1f
+File: lispref.info, Node: Introduction to Range Tables, Next: Working With Range Tables, Up: Range Tables
+
+Introduction to Range Tables
+============================
+
+ - Function: make-range-table
+ Make a new, empty range table.
+
+ - Function: copy-range-table old-table
+ Make a new range table which contains the same values for the same
+ ranges as the given table. The values will not themselves be
+ copied.
+
+\1f
+File: lispref.info, Node: Working With Range Tables, Prev: Introduction to Range Tables, Up: Range Tables
+
+Working With Range Tables
+=========================
+
+ - Function: get-range-table pos table &optional default
+ This function finds value for position POS in TABLE. If there is
+ no corresponding value, return DEFAULT (defaults to `nil').
+
+ - Function: put-range-table start end val table
+ This function sets the value for range (START, END) to be VAL in
+ TABLE.
+
+ - Function: remove-range-table start end table
+ This function removes the value for range (START, END) in TABLE.
+
+ - Function: clear-range-table table
+ This function flushes TABLE.
+
+ - Function: map-range-table function table
+ This function maps FUNCTION over entries in TABLE, calling it with
+ three args, the beginning and end of the range and the
+ corresponding value.
+
+\1f
+File: lispref.info, Node: Databases, Next: Processes, Prev: Range Tables, Up: Top
+
+Databases
+*********
+
+ - Function: databasep object
+ This function returns non-`nil' if OBJECT is a database.
+
+* Menu:
+
+* Connecting to a Database::
+* Working With a Database::
+* Other Database Functions::
+
+\1f
+File: lispref.info, Node: Connecting to a Database, Next: Working With a Database, Up: Databases
+
+Connecting to a Database
+========================
+
+ - Function: open-database file &optional type subtype access mode
+ This function opens database FILE, using database method TYPE and
+ SUBTYPE, with access rights ACCESS and permissions MODE. ACCESS
+ can be any combination of `r' `w' and `+', for read, write, and
+ creation flags.
+
+ TYPE can have the value `'dbm' or `'berkeley_db' to select the
+ type of database file to use. (Note: XEmacs may not support both
+ of these types.)
+
+ For a TYPE of `'dbm', there are no subtypes, so SUBTYPE should be
+ `nil'.
+
+ For a TYPE of `'berkeley_db', the following subtypes are
+ available: `'hash', `'btree', and `'recno'. See the manpages for
+ the Berkeley DB functions to more information about these types.
+
+ - Function: close-database obj
+ This function closes database OBJ.
+
+ - Function: database-live-p obj
+ This function returns `t' iff OBJ is an active database, else
+ `nil'.
+
+\1f
+File: lispref.info, Node: Working With a Database, Next: Other Database Functions, Prev: Connecting to a Database, Up: Databases
+
+Working With a Database
+=======================
+
+ - Function: get-database key dbase &optional default
+ This function finds the value for KEY in DATABASE. If there is no
+ corresponding value, DEFAULT is returned (`nil' if DEFAULT is
+ omitted).
+
+ - Function: map-database function dbase
+ This function maps FUNCTION over entries in DATABASE, calling it
+ with two args, each key and value in the database.
+
+ - Function: put-database key val dbase &optional replace
+ This function stores KEY and VAL in DATABASE. If optional fourth
+ arg REPLACE is non-`nil', replace any existing entry in the
+ database.
+
+ - Function: remove-database key dbase
+ This function removes KEY from DATABASE.
+
+\1f
+File: lispref.info, Node: Other Database Functions, Prev: Working With a Database, Up: Databases
+
+Other Database Functions
+========================
+
+ - Function: database-file-name obj
+ This function returns the filename associated with the database
+ OBJ.
+
+ - Function: database-last-error &optional obj
+ This function returns the last error associated with database OBJ.
+
+ - Function: database-subtype obj
+ This function returns the subtype of database OBJ, if any.
+
+ - Function: database-type obj
+ This function returns the type of database OBJ.
+
+\1f
+File: lispref.info, Node: Processes, Next: System Interface, Prev: Databases, Up: Top
+
+Processes
+*********
+
+ In the terminology of operating systems, a "process" is a space in
+which a program can execute. XEmacs runs in a process. XEmacs Lisp
+programs can invoke other programs in processes of their own. These are
+called "subprocesses" or "child processes" of the XEmacs process, which
+is their "parent process".
+
+ A subprocess of XEmacs may be "synchronous" or "asynchronous",
+depending on how it is created. When you create a synchronous
+subprocess, the Lisp program waits for the subprocess to terminate
+before continuing execution. When you create an asynchronous
+subprocess, it can run in parallel with the Lisp program. This kind of
+subprocess is represented within XEmacs by a Lisp object which is also
+called a "process". Lisp programs can use this object to communicate
+with the subprocess or to control it. For example, you can send
+signals, obtain status information, receive output from the process, or
+send input to it.
+
+ - Function: processp object
+ This function returns `t' if OBJECT is a process, `nil' otherwise.
+
+* Menu:
+
+* Subprocess Creation:: Functions that start subprocesses.
+* Synchronous Processes:: Details of using synchronous subprocesses.
+* MS-DOS Subprocesses:: On MS-DOS, you must indicate text vs binary
+ for data sent to and from a subprocess.
+* Asynchronous Processes:: Starting up an asynchronous subprocess.
+* Deleting Processes:: Eliminating an asynchronous subprocess.
+* Process Information:: Accessing run-status and other attributes.
+* Input to Processes:: Sending input to an asynchronous subprocess.
+* Signals to Processes:: Stopping, continuing or interrupting
+ an asynchronous subprocess.
+* Output from Processes:: Collecting output from an asynchronous subprocess.
+* Sentinels:: Sentinels run when process run-status changes.
+* Process Window Size:: Changing the logical window size of a process.
+* Transaction Queues:: Transaction-based communication with subprocesses.
+* Network:: Opening network connections.
+
+\1f
+File: lispref.info, Node: Subprocess Creation, Next: Synchronous Processes, Up: Processes
+
+Functions that Create Subprocesses
+==================================
+
+ There are three functions that create a new subprocess in which to
+run a program. One of them, `start-process', creates an asynchronous
+process and returns a process object (*note Asynchronous Processes::).
+The other two, `call-process' and `call-process-region', create a
+synchronous process and do not return a process object (*note
+Synchronous Processes::).
+
+ Synchronous and asynchronous processes are explained in following
+sections. Since the three functions are all called in a similar
+fashion, their common arguments are described here.
+
+ In all cases, the function's PROGRAM argument specifies the program
+to be run. An error is signaled if the file is not found or cannot be
+executed. If the file name is relative, the variable `exec-path'
+contains a list of directories to search. Emacs initializes
+`exec-path' when it starts up, based on the value of the environment
+variable `PATH'. The standard file name constructs, `~', `.', and
+`..', are interpreted as usual in `exec-path', but environment variable
+substitutions (`$HOME', etc.) are not recognized; use
+`substitute-in-file-name' to perform them (*note File Name Expansion::).
+
+ Each of the subprocess-creating functions has a BUFFER-OR-NAME
+argument which specifies where the standard output from the program will
+go. If BUFFER-OR-NAME is `nil', that says to discard the output unless
+a filter function handles it. (*Note Filter Functions::, and *Note
+Read and Print::.) Normally, you should avoid having multiple
+processes send output to the same buffer because their output would be
+intermixed randomly.
+
+ All three of the subprocess-creating functions have a `&rest'
+argument, ARGS. The ARGS must all be strings, and they are supplied to
+PROGRAM as separate command line arguments. Wildcard characters and
+other shell constructs are not allowed in these strings, since they are
+passed directly to the specified program.
+
+ *Please note:* The argument PROGRAM contains only the name of the
+program; it may not contain any command-line arguments. You must use
+ARGS to provide those.
+
+ The subprocess gets its current directory from the value of
+`default-directory' (*note File Name Expansion::).
+
+ The subprocess inherits its environment from XEmacs; but you can
+specify overrides for it with `process-environment'. *Note System
+Environment::.
+
+ - Variable: exec-directory
+ The value of this variable is the name of a directory (a string)
+ that contains programs that come with XEmacs, that are intended
+ for XEmacs to invoke. The program `wakeup' is an example of such
+ a program; the `display-time' command uses it to get a reminder
+ once per minute.
+
+ - User Option: exec-path
+ The value of this variable is a list of directories to search for
+ programs to run in subprocesses. Each element is either the name
+ of a directory (i.e., a string), or `nil', which stands for the
+ default directory (which is the value of `default-directory').
+
+ The value of `exec-path' is used by `call-process' and
+ `start-process' when the PROGRAM argument is not an absolute file
+ name.
+
+\1f
+File: lispref.info, Node: Synchronous Processes, Next: MS-DOS Subprocesses, Prev: Subprocess Creation, Up: Processes
+
+Creating a Synchronous Process
+==============================
+
+ After a "synchronous process" is created, XEmacs waits for the
+process to terminate before continuing. Starting Dired is an example of
+this: it runs `ls' in a synchronous process, then modifies the output
+slightly. Because the process is synchronous, the entire directory
+listing arrives in the buffer before XEmacs tries to do anything with
+it.
+
+ While Emacs waits for the synchronous subprocess to terminate, the
+user can quit by typing `C-g'. The first `C-g' tries to kill the
+subprocess with a `SIGINT' signal; but it waits until the subprocess
+actually terminates before quitting. If during that time the user
+types another `C-g', that kills the subprocess instantly with `SIGKILL'
+and quits immediately. *Note Quitting::.
+
+ The synchronous subprocess functions returned `nil' in version 18.
+In version 19, they return an indication of how the process terminated.
+
+ - Function: call-process program &optional infile destination display
+ &rest args
+ This function calls PROGRAM in a separate process and waits for it
+ to finish.
+
+ The standard input for the process comes from file INFILE if
+ INFILE is not `nil' and from `/dev/null' otherwise. The argument
+ DESTINATION says where to put the process output. Here are the
+ possibilities:
+
+ a buffer
+ Insert the output in that buffer, before point. This
+ includes both the standard output stream and the standard
+ error stream of the process.
+
+ a string
+ Find or create a buffer with that name, then insert the
+ output in that buffer, before point.
+
+ `t'
+ Insert the output in the current buffer, before point.
+
+ `nil'
+ Discard the output.
+
+ 0
+ Discard the output, and return immediately without waiting
+ for the subprocess to finish.
+
+ In this case, the process is not truly synchronous, since it
+ can run in parallel with Emacs; but you can think of it as
+ synchronous in that Emacs is essentially finished with the
+ subprocess as soon as this function returns.
+
+ (REAL-DESTINATION ERROR-DESTINATION)
+ Keep the standard output stream separate from the standard
+ error stream; deal with the ordinary output as specified by
+ REAL-DESTINATION, and dispose of the error output according
+ to ERROR-DESTINATION. The value `nil' means discard it, `t'
+ means mix it with the ordinary output, and a string specifies
+ a file name to redirect error output into.
+
+ You can't directly specify a buffer to put the error output
+ in; that is too difficult to implement. But you can achieve
+ this result by sending the error output to a temporary file
+ and then inserting the file into a buffer.
+
+ If DISPLAY is non-`nil', then `call-process' redisplays the buffer
+ as output is inserted. Otherwise the function does no redisplay,
+ and the results become visible on the screen only when XEmacs
+ redisplays that buffer in the normal course of events.
+
+ The remaining arguments, ARGS, are strings that specify command
+ line arguments for the program.
+
+ The value returned by `call-process' (unless you told it not to
+ wait) indicates the reason for process termination. A number
+ gives the exit status of the subprocess; 0 means success, and any
+ other value means failure. If the process terminated with a
+ signal, `call-process' returns a string describing the signal.
+
+ In the examples below, the buffer `foo' is current.
+
+ (call-process "pwd" nil t)
+ => nil
+
+ ---------- Buffer: foo ----------
+ /usr/user/lewis/manual
+ ---------- Buffer: foo ----------
+
+ (call-process "grep" nil "bar" nil "lewis" "/etc/passwd")
+ => nil
+
+ ---------- Buffer: bar ----------
+ lewis:5LTsHm66CSWKg:398:21:Bil Lewis:/user/lewis:/bin/csh
+
+ ---------- Buffer: bar ----------
+
+ The `insert-directory' function contains a good example of the use
+ of `call-process':
+
+ (call-process insert-directory-program nil t nil switches
+ (if full-directory-p
+ (concat (file-name-as-directory file) ".")
+ file))
+
+ - Function: call-process-region start end program &optional delete
+ destination display &rest args
+ This function sends the text between START to END as standard
+ input to a process running PROGRAM. It deletes the text sent if
+ DELETE is non-`nil'; this is useful when BUFFER is `t', to insert
+ the output in the current buffer.
+
+ The arguments DESTINATION and DISPLAY control what to do with the
+ output from the subprocess, and whether to update the display as
+ it comes in. For details, see the description of `call-process',
+ above. If DESTINATION is the integer 0, `call-process-region'
+ discards the output and returns `nil' immediately, without waiting
+ for the subprocess to finish.
+
+ The remaining arguments, ARGS, are strings that specify command
+ line arguments for the program.
+
+ The return value of `call-process-region' is just like that of
+ `call-process': `nil' if you told it to return without waiting;
+ otherwise, a number or string which indicates how the subprocess
+ terminated.
+
+ In the following example, we use `call-process-region' to run the
+ `cat' utility, with standard input being the first five characters
+ in buffer `foo' (the word `input'). `cat' copies its standard
+ input into its standard output. Since the argument DESTINATION is
+ `t', this output is inserted in the current buffer.
+
+ ---------- Buffer: foo ----------
+ input-!-
+ ---------- Buffer: foo ----------
+
+ (call-process-region 1 6 "cat" nil t)
+ => nil
+
+ ---------- Buffer: foo ----------
+ inputinput-!-
+ ---------- Buffer: foo ----------
+
+ The `shell-command-on-region' command uses `call-process-region'
+ like this:
+
+ (call-process-region
+ start end
+ shell-file-name ; Name of program.
+ nil ; Do not delete region.
+ buffer ; Send output to `buffer'.
+ nil ; No redisplay during output.
+ "-c" command) ; Arguments for the shell.
+
+\1f
+File: lispref.info, Node: MS-DOS Subprocesses, Next: Asynchronous Processes, Prev: Synchronous Processes, Up: Processes
+
+MS-DOS Subprocesses
+===================
+
+ On MS-DOS, you must indicate whether the data going to and from a
+synchronous subprocess are text or binary. Text data requires
+translation between the end-of-line convention used within Emacs (a
+single newline character) and the convention used outside Emacs (the
+two-character sequence, CRLF).
+
+ The variable `binary-process-input' applies to input sent to the
+subprocess, and `binary-process-output' applies to output received from
+it. A non-`nil' value means the data is non-text; `nil' means the data
+is text, and calls for conversion.
+
+ - Variable: binary-process-input
+ If this variable is `nil', convert newlines to CRLF sequences in
+ the input to a synchronous subprocess.
+
+ - Variable: binary-process-output
+ If this variable is `nil', convert CRLF sequences to newlines in
+ the output from a synchronous subprocess.
+
+ *Note Files and MS-DOS::, for related information.
+
+\1f
+File: lispref.info, Node: Asynchronous Processes, Next: Deleting Processes, Prev: MS-DOS Subprocesses, Up: Processes
+
+Creating an Asynchronous Process
+================================
+
+ After an "asynchronous process" is created, Emacs and the Lisp
+program both continue running immediately. The process may thereafter
+run in parallel with Emacs, and the two may communicate with each other
+using the functions described in following sections. Here we describe
+how to create an asynchronous process with `start-process'.
+
+ - Function: start-process name buffer-or-name program &rest args
+ This function creates a new asynchronous subprocess and starts the
+ program PROGRAM running in it. It returns a process object that
+ stands for the new subprocess in Lisp. The argument NAME
+ specifies the name for the process object; if a process with this
+ name already exists, then NAME is modified (by adding `<1>', etc.)
+ to be unique. The buffer BUFFER-OR-NAME is the buffer to
+ associate with the process.
+
+ The remaining arguments, ARGS, are strings that specify command
+ line arguments for the program.
+
+ In the example below, the first process is started and runs
+ (rather, sleeps) for 100 seconds. Meanwhile, the second process
+ is started, and given the name `my-process<1>' for the sake of
+ uniqueness. It inserts the directory listing at the end of the
+ buffer `foo', before the first process finishes. Then it
+ finishes, and a message to that effect is inserted in the buffer.
+ Much later, the first process finishes, and another message is
+ inserted in the buffer for it.
+
+ (start-process "my-process" "foo" "sleep" "100")
+ => #<process my-process>
+
+ (start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin")
+ => #<process my-process<1>>
+
+ ---------- Buffer: foo ----------
+ total 2
+ lrwxrwxrwx 1 lewis 14 Jul 22 10:12 gnuemacs --> /emacs
+ -rwxrwxrwx 1 lewis 19 Jul 30 21:02 lemon
+
+ Process my-process<1> finished
+
+ Process my-process finished
+ ---------- Buffer: foo ----------
+
+ - Function: start-process-shell-command name buffer-or-name command
+ &rest command-args
+ This function is like `start-process' except that it uses a shell
+ to execute the specified command. The argument COMMAND is a shell
+ command name, and COMMAND-ARGS are the arguments for the shell
+ command.
+
+ - Variable: process-connection-type
+ This variable controls the type of device used to communicate with
+ asynchronous subprocesses. If it is non-`nil', then PTYs are
+ used, when available. Otherwise, pipes are used.
+
+ PTYs are usually preferable for processes visible to the user, as
+ in Shell mode, because they allow job control (`C-c', `C-z', etc.)
+ to work between the process and its children whereas pipes do not.
+ For subprocesses used for internal purposes by programs, it is
+ often better to use a pipe, because they are more efficient. In
+ addition, the total number of PTYs is limited on many systems and
+ it is good not to waste them.
+
+ The value `process-connection-type' is used when `start-process'
+ is called. So you can specify how to communicate with one
+ subprocess by binding the variable around the call to
+ `start-process'.
+
+ (let ((process-connection-type nil)) ; Use a pipe.
+ (start-process ...))
+
+ To determine whether a given subprocess actually got a pipe or a
+ PTY, use the function `process-tty-name' (*note Process
+ Information::).
+
+\1f
+File: lispref.info, Node: Deleting Processes, Next: Process Information, Prev: Asynchronous Processes, Up: Processes
+
+Deleting Processes
+==================
+
+ "Deleting a process" disconnects XEmacs immediately from the
+subprocess, and removes it from the list of active processes. It sends
+a signal to the subprocess to make the subprocess terminate, but this is
+not guaranteed to happen immediately. The process object itself
+continues to exist as long as other Lisp objects point to it.
+
+ You can delete a process explicitly at any time. Processes are
+deleted automatically after they terminate, but not necessarily right
+away. If you delete a terminated process explicitly before it is
+deleted automatically, no harm results.
+
+ - Variable: delete-exited-processes
+ This variable controls automatic deletion of processes that have
+ terminated (due to calling `exit' or to a signal). If it is
+ `nil', then they continue to exist until the user runs
+ `list-processes'. Otherwise, they are deleted immediately after
+ they exit.
+
+ - Function: delete-process name
+ This function deletes the process associated with NAME, killing it
+ with a `SIGHUP' signal. The argument NAME may be a process, the
+ name of a process, a buffer, or the name of a buffer.
+
+ (delete-process "*shell*")
+ => nil
+
+ - Function: process-kill-without-query process &optional
+ require-query-p
+ This function declares that XEmacs need not query the user if
+ PROCESS is still running when XEmacs is exited. The process will
+ be deleted silently. If REQUIRE-QUERY-P is non-`nil', then XEmacs
+ _will_ query the user (this is the default). The return value is
+ `t' if a query was formerly required, and `nil' otherwise.
+
+ (process-kill-without-query (get-process "shell"))
+ => t
+
+\1f
+File: lispref.info, Node: Process Information, Next: Input to Processes, Prev: Deleting Processes, Up: Processes
+
+Process Information
+===================
+
+ Several functions return information about processes.
+`list-processes' is provided for interactive use.
+
+ - Command: list-processes
+ This command displays a listing of all living processes. In
+ addition, it finally deletes any process whose status was `Exited'
+ or `Signaled'. It returns `nil'.
+
+ - Function: process-list
+ This function returns a list of all processes that have not been
+ deleted.
+
+ (process-list)
+ => (#<process display-time> #<process shell>)
+
+ - Function: get-process name
+ This function returns the process named NAME, or `nil' if there is
+ none. An error is signaled if NAME is not a string.
+
+ (get-process "shell")
+ => #<process shell>
+
+ - Function: process-command process
+ This function returns the command that was executed to start
+ PROCESS. This is a list of strings, the first string being the
+ program executed and the rest of the strings being the arguments
+ that were given to the program.
+
+ (process-command (get-process "shell"))
+ => ("/bin/csh" "-i")
+
+ - Function: process-id process
+ This function returns the PID of PROCESS. This is an integer that
+ distinguishes the process PROCESS from all other processes running
+ on the same computer at the current time. The PID of a process is
+ chosen by the operating system kernel when the process is started
+ and remains constant as long as the process exists.
+
+ - Function: process-name process
+ This function returns the name of PROCESS.
+
+ - Function: process-status process-name
+ This function returns the status of PROCESS-NAME as a symbol. The
+ argument PROCESS-NAME must be a process, a buffer, a process name
+ (string) or a buffer name (string).
+
+ The possible values for an actual subprocess are:
+
+ `run'
+ for a process that is running.
+
+ `stop'
+ for a process that is stopped but continuable.
+
+ `exit'
+ for a process that has exited.
+
+ `signal'
+ for a process that has received a fatal signal.
+
+ `open'
+ for a network connection that is open.
+
+ `closed'
+ for a network connection that is closed. Once a connection
+ is closed, you cannot reopen it, though you might be able to
+ open a new connection to the same place.
+
+ `nil'
+ if PROCESS-NAME is not the name of an existing process.
+
+ (process-status "shell")
+ => run
+ (process-status (get-buffer "*shell*"))
+ => run
+ x
+ => #<process xx<1>>
+ (process-status x)
+ => exit
+
+ For a network connection, `process-status' returns one of the
+ symbols `open' or `closed'. The latter means that the other side
+ closed the connection, or XEmacs did `delete-process'.
+
+ In earlier Emacs versions (prior to version 19), the status of a
+ network connection was `run' if open, and `exit' if closed.
+
+ - Function: process-kill-without-query-p process
+ This function returns whether PROCESS will be killed without
+ querying the user, if it is running when XEmacs is exited. The
+ default value is `nil'.
+
+ - Function: process-exit-status process
+ This function returns the exit status of PROCESS or the signal
+ number that killed it. (Use the result of `process-status' to
+ determine which of those it is.) If PROCESS has not yet
+ terminated, the value is 0.
+
+ - Function: process-tty-name process
+ This function returns the terminal name that PROCESS is using for
+ its communication with Emacs--or `nil' if it is using pipes
+ instead of a terminal (see `process-connection-type' in *Note
+ Asynchronous Processes::).
+
+\1f
+File: lispref.info, Node: Input to Processes, Next: Signals to Processes, Prev: Process Information, Up: Processes
+
+Sending Input to Processes
+==========================
+
+ Asynchronous subprocesses receive input when it is sent to them by
+XEmacs, which is done with the functions in this section. You must
+specify the process to send input to, and the input data to send. The
+data appears on the "standard input" of the subprocess.
+
+ Some operating systems have limited space for buffered input in a
+PTY. On these systems, Emacs sends an EOF periodically amidst the
+other characters, to force them through. For most programs, these EOFs
+do no harm.
+
+ - Function: process-send-string process-name string
+ This function sends PROCESS-NAME the contents of STRING as
+ standard input. The argument PROCESS-NAME must be a process or
+ the name of a process. If it is `nil', the current buffer's
+ process is used.
+
+ The function returns `nil'.
+
+ (process-send-string "shell<1>" "ls\n")
+ => nil
+
+
+ ---------- Buffer: *shell* ----------
+ ...
+ introduction.texi syntax-tables.texi~
+ introduction.texi~ text.texi
+ introduction.txt text.texi~
+ ...
+ ---------- Buffer: *shell* ----------
+
+ - Command: process-send-region process-name start end
+ This function sends the text in the region defined by START and
+ END as standard input to PROCESS-NAME, which is a process or a
+ process name. (If it is `nil', the current buffer's process is
+ used.)
+
+ An error is signaled unless both START and END are integers or
+ markers that indicate positions in the current buffer. (It is
+ unimportant which number is larger.)
+
+ - Function: process-send-eof &optional process-name
+ This function makes PROCESS-NAME see an end-of-file in its input.
+ The EOF comes after any text already sent to it.
+
+ If PROCESS-NAME is not supplied, or if it is `nil', then this
+ function sends the EOF to the current buffer's process. An error
+ is signaled if the current buffer has no process.
+
+ The function returns PROCESS-NAME.
+
+ (process-send-eof "shell")
+ => "shell"
+
+\1f
+File: lispref.info, Node: Signals to Processes, Next: Output from Processes, Prev: Input to Processes, Up: Processes
+
+Sending Signals to Processes
+============================
+
+ "Sending a signal" to a subprocess is a way of interrupting its
+activities. There are several different signals, each with its own
+meaning. The set of signals and their names is defined by the operating
+system. For example, the signal `SIGINT' means that the user has typed
+`C-c', or that some analogous thing has happened.
+
+ Each signal has a standard effect on the subprocess. Most signals
+kill the subprocess, but some stop or resume execution instead. Most
+signals can optionally be handled by programs; if the program handles
+the signal, then we can say nothing in general about its effects.
+
+ The set of signals and their names is defined by the operating
+system; XEmacs has facilities for sending only a few of the signals
+that are defined. XEmacs can send signals only to its own subprocesses.
+
+ You can send signals explicitly by calling the functions in this
+section. XEmacs also sends signals automatically at certain times:
+killing a buffer sends a `SIGHUP' signal to all its associated
+processes; killing XEmacs sends a `SIGHUP' signal to all remaining
+processes. (`SIGHUP' is a signal that usually indicates that the user
+hung up the phone.)
+
+ Each of the signal-sending functions takes two optional arguments:
+PROCESS-NAME and CURRENT-GROUP.
+
+ The argument PROCESS-NAME must be either a process, the name of one,
+or `nil'. If it is `nil', the process defaults to the process
+associated with the current buffer. An error is signaled if
+PROCESS-NAME does not identify a process.
+
+ The argument CURRENT-GROUP is a flag that makes a difference when
+you are running a job-control shell as an XEmacs subprocess. If it is
+non-`nil', then the signal is sent to the current process-group of the
+terminal that XEmacs uses to communicate with the subprocess. If the
+process is a job-control shell, this means the shell's current subjob.
+If it is `nil', the signal is sent to the process group of the
+immediate subprocess of XEmacs. If the subprocess is a job-control
+shell, this is the shell itself.
+
+ The flag CURRENT-GROUP has no effect when a pipe is used to
+communicate with the subprocess, because the operating system does not
+support the distinction in the case of pipes. For the same reason,
+job-control shells won't work when a pipe is used. See
+`process-connection-type' in *Note Asynchronous Processes::.
+
+ - Function: interrupt-process &optional process-name current-group
+ This function interrupts the process PROCESS-NAME by sending the
+ signal `SIGINT'. Outside of XEmacs, typing the "interrupt
+ character" (normally `C-c' on some systems, and `DEL' on others)
+ sends this signal. When the argument CURRENT-GROUP is non-`nil',
+ you can think of this function as "typing `C-c'" on the terminal
+ by which XEmacs talks to the subprocess.
+
+ - Function: kill-process &optional process-name current-group
+ This function kills the process PROCESS-NAME by sending the signal
+ `SIGKILL'. This signal kills the subprocess immediately, and
+ cannot be handled by the subprocess.
+
+ - Function: quit-process &optional process-name current-group
+ This function sends the signal `SIGQUIT' to the process
+ PROCESS-NAME. This signal is the one sent by the "quit character"
+ (usually `C-b' or `C-\') when you are not inside XEmacs.
+
+ - Function: stop-process &optional process-name current-group
+ This function stops the process PROCESS-NAME by sending the signal
+ `SIGTSTP'. Use `continue-process' to resume its execution.
+
+ On systems with job control, the "stop character" (usually `C-z')
+ sends this signal (outside of XEmacs). When CURRENT-GROUP is
+ non-`nil', you can think of this function as "typing `C-z'" on the
+ terminal XEmacs uses to communicate with the subprocess.
+
+ - Function: continue-process &optional process-name current-group
+ This function resumes execution of the process PROCESS by sending
+ it the signal `SIGCONT'. This presumes that PROCESS-NAME was
+ stopped previously.
+
+ - Function: signal-process pid signal
+ This function sends a signal to process PID, which need not be a
+ child of XEmacs. The argument SIGNAL specifies which signal to
+ send; it should be an integer.
+
+\1f
+File: lispref.info, Node: Output from Processes, Next: Sentinels, Prev: Signals to Processes, Up: Processes
+
+Receiving Output from Processes
+===============================
+
+ There are two ways to receive the output that a subprocess writes to
+its standard output stream. The output can be inserted in a buffer,
+which is called the associated buffer of the process, or a function
+called the "filter function" can be called to act on the output. If
+the process has no buffer and no filter function, its output is
+discarded.
+
+* Menu:
+
+* Process Buffers:: If no filter, output is put in a buffer.
+* Filter Functions:: Filter functions accept output from the process.
+* Accepting Output:: Explicitly permitting subprocess output.
+ Waiting for subprocess output.
+
+\1f
File: lispref.info, Node: Process Buffers, Next: Filter Functions, Up: Output from Processes
Process Buffers
get some output, or `nil' if the timeout expired before output
arrived.
-\1f
-File: lispref.info, Node: Sentinels, Next: Process Window Size, Prev: Output from Processes, Up: Processes
-
-Sentinels: Detecting Process Status Changes
-===========================================
-
- A "process sentinel" is a function that is called whenever the
-associated process changes status for any reason, including signals
-(whether sent by XEmacs or caused by the process's own actions) that
-terminate, stop, or continue the process. The process sentinel is also
-called if the process exits. The sentinel receives two arguments: the
-process for which the event occurred, and a string describing the type
-of event.
-
- The string describing the event looks like one of the following:
-
- * `"finished\n"'.
-
- * `"exited abnormally with code EXITCODE\n"'.
-
- * `"NAME-OF-SIGNAL\n"'.
-
- * `"NAME-OF-SIGNAL (core dumped)\n"'.
-
- A sentinel runs only while XEmacs is waiting (e.g., for terminal
-input, or for time to elapse, or for process output). This avoids the
-timing errors that could result from running them at random places in
-the middle of other Lisp programs. A program can wait, so that
-sentinels will run, by calling `sit-for' or `sleep-for' (*note
-Waiting::), or `accept-process-output' (*note Accepting Output::).
-Emacs is also waiting when the command loop is reading input.
-
- Quitting is normally inhibited within a sentinel--otherwise, the
-effect of typing `C-g' at command level or to quit a user command would
-be unpredictable. If you want to permit quitting inside a sentinel,
-bind `inhibit-quit' to `nil'. *Note Quitting::.
-
- A sentinel that writes the output into the buffer of the process
-should check whether the buffer is still alive. If it tries to insert
-into a dead buffer, it will get an error. If the buffer is dead,
-`(buffer-name (process-buffer PROCESS))' returns `nil'.
-
- If an error happens during execution of a sentinel, it is caught
-automatically, so that it doesn't stop the execution of whatever
-programs was running when the sentinel was started. However, if
-`debug-on-error' is non-`nil', the error-catching is turned off. This
-makes it possible to use the Lisp debugger to debug the sentinel.
-*Note Debugger::.
-
- In earlier Emacs versions, every sentinel that did regexp searching
-or matching had to explicitly save and restore the match data. Now
-Emacs does this automatically; sentinels never need to do it explicitly.
-*Note Match Data::.
-
- - Function: set-process-sentinel process sentinel
- This function associates SENTINEL with PROCESS. If SENTINEL is
- `nil', then the process will have no sentinel. The default
- behavior when there is no sentinel is to insert a message in the
- process's buffer when the process status changes.
-
- (defun msg-me (process event)
- (princ
- (format "Process: %s had the event `%s'" process event)))
- (set-process-sentinel (get-process "shell") 'msg-me)
- => msg-me
- (kill-process (get-process "shell"))
- -| Process: #<process shell> had the event `killed'
- => #<process shell>
-
- - Function: process-sentinel process
- This function returns the sentinel of PROCESS, or `nil' if it has
- none.
-
- - Function: waiting-for-user-input-p
- While a sentinel or filter function is running, this function
- returns non-`nil' if XEmacs was waiting for keyboard input from
- the user at the time the sentinel or filter function was called,
- `nil' if it was not.
-
-\1f
-File: lispref.info, Node: Process Window Size, Next: Transaction Queues, Prev: Sentinels, Up: Processes
-
-Process Window Size
-===================
-
- - Function: set-process-window-size process height width
- This function tells PROCESS that its logical window size is HEIGHT
- by WIDTH characters. This is principally useful with pty's.
-
-\1f
-File: lispref.info, Node: Transaction Queues, Next: Network, Prev: Process Window Size, Up: Processes
-
-Transaction Queues
-==================
-
- You can use a "transaction queue" for more convenient communication
-with subprocesses using transactions. First use `tq-create' to create
-a transaction queue communicating with a specified process. Then you
-can call `tq-enqueue' to send a transaction.
-
- - Function: tq-create process
- This function creates and returns a transaction queue
- communicating with PROCESS. The argument PROCESS should be a
- subprocess capable of sending and receiving streams of bytes. It
- may be a child process, or it may be a TCP connection to a server,
- possibly on another machine.
-
- - Function: tq-enqueue queue question regexp closure fn
- This function sends a transaction to queue QUEUE. Specifying the
- queue has the effect of specifying the subprocess to talk to.
-
- The argument QUESTION is the outgoing message that starts the
- transaction. The argument FN is the function to call when the
- corresponding answer comes back; it is called with two arguments:
- CLOSURE, and the answer received.
-
- The argument REGEXP is a regular expression that should match the
- entire answer, but nothing less; that's how `tq-enqueue' determines
- where the answer ends.
-
- The return value of `tq-enqueue' itself is not meaningful.
-
- - Function: tq-close queue
- Shut down transaction queue QUEUE, waiting for all pending
- transactions to complete, and then terminate the connection or
- child process.
-
- Transaction queues are implemented by means of a filter function.
-*Note Filter Functions::.
-
-\1f
-File: lispref.info, Node: Network, Prev: Transaction Queues, Up: Processes
-
-Network Connections
-===================
-
- XEmacs Lisp programs can open TCP network connections to other
-processes on the same machine or other machines. A network connection
-is handled by Lisp much like a subprocess, and is represented by a
-process object. However, the process you are communicating with is not
-a child of the XEmacs process, so you can't kill it or send it signals.
-All you can do is send and receive data. `delete-process' closes the
-connection, but does not kill the process at the other end; that
-process must decide what to do about closure of the connection.
-
- You can distinguish process objects representing network connections
-from those representing subprocesses with the `process-status'
-function. It always returns either `open' or `closed' for a network
-connection, and it never returns either of those values for a real
-subprocess. *Note Process Information::.
-
- - Function: open-network-stream name buffer-or-name host service
- This function opens a TCP connection for a service to a host. It
- returns a process object to represent the connection.
-
- The NAME argument specifies the name for the process object. It
- is modified as necessary to make it unique.
-
- The BUFFER-OR-NAME argument is the buffer to associate with the
- connection. Output from the connection is inserted in the buffer,
- unless you specify a filter function to handle the output. If
- BUFFER-OR-NAME is `nil', it means that the connection is not
- associated with any buffer.
-
- The arguments HOST and SERVICE specify where to connect to; HOST
- is the host name or IP address (a string), and SERVICE is the name
- of a defined network service (a string) or a port number (an
- integer).
-
-\1f
-File: lispref.info, Node: System Interface, Next: X-Windows, Prev: Processes, Up: Top
-
-Operating System Interface
-**************************
-
- This chapter is about starting and getting out of Emacs, access to
-values in the operating system environment, and terminal input, output,
-and flow control.
-
- *Note Building XEmacs::, for related information. See also *Note
-Display::, for additional operating system status information
-pertaining to the terminal and the screen.
-
-* Menu:
-
-* Starting Up:: Customizing XEmacs start-up processing.
-* Getting Out:: How exiting works (permanent or temporary).
-* System Environment:: Distinguish the name and kind of system.
-* User Identification:: Finding the name and user id of the user.
-* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to a string, or
- to calendrical data (or vice versa).
-* Timers:: Setting a timer to call a function at a certain time.
-* Terminal Input:: Recording terminal input for debugging.
-* Terminal Output:: Recording terminal output for debugging.
-* Flow Control:: How to turn output flow control on or off.
-* Batch Mode:: Running XEmacs without terminal interaction.
-
-\1f
-File: lispref.info, Node: Starting Up, Next: Getting Out, Up: System Interface
-
-Starting Up XEmacs
-==================
-
- This section describes what XEmacs does when it is started, and how
-you can customize these actions.
-
-* Menu:
-
-* Start-up Summary:: Sequence of actions XEmacs performs at start-up.
-* Init File:: Details on reading the init file (`.emacs').
-* Terminal-Specific:: How the terminal-specific Lisp file is read.
-* Command Line Arguments:: How command line arguments are processed,
- and how you can customize them.
-
-\1f
-File: lispref.info, Node: Start-up Summary, Next: Init File, Up: Starting Up
-
-Summary: Sequence of Actions at Start Up
-----------------------------------------
-
- The order of operations performed (in `startup.el') by XEmacs when
-it is started up is as follows:
-
- 1. It loads the initialization library for the window system, if you
- are using a window system. This library's name is
- `term/WINDOWSYSTEM-win.el'.
-
- 2. It processes the initial options. (Some of them are handled even
- earlier than this.)
-
- 3. It initializes the X window frame and faces, if appropriate.
-
- 4. It runs the normal hook `before-init-hook'.
-
- 5. It loads the library `site-start', unless the option
- `-no-site-file' was specified. The library's file name is usually
- `site-start.el'.
-
- 6. It loads the file `~/.emacs' unless `-q' was specified on the
- command line. (This is not done in `-batch' mode.) The `-u'
- option can specify the user name whose home directory should be
- used instead of `~'.
-
- 7. It loads the library `default' unless `inhibit-default-init' is
- non-`nil'. (This is not done in `-batch' mode or if `-q' was
- specified on the command line.) The library's file name is
- usually `default.el'.
-
- 8. It runs the normal hook `after-init-hook'.
-
- 9. It sets the major mode according to `initial-major-mode', provided
- the buffer `*scratch*' is still current and still in Fundamental
- mode.
-
- 10. It loads the terminal-specific Lisp file, if any, except when in
- batch mode or using a window system.
-
- 11. It displays the initial echo area message, unless you have
- suppressed that with `inhibit-startup-echo-area-message'.
-
- 12. It processes the action arguments from the command line.
-
- 13. It runs `term-setup-hook'.
-
- 14. It calls `frame-notice-user-settings', which modifies the
- parameters of the selected frame according to whatever the init
- files specify.
-
- 15. It runs `window-setup-hook'. *Note Terminal-Specific::.
-
- 16. It displays copyleft, nonwarranty, and basic use information,
- provided there were no remaining command line arguments (a few
- steps above) and the value of `inhibit-startup-message' is `nil'.
-
- - User Option: inhibit-startup-message
- This variable inhibits the initial startup messages (the
- nonwarranty, etc.). If it is non-`nil', then the messages are not
- printed.
-
- This variable exists so you can set it in your personal init file,
- once you are familiar with the contents of the startup message.
- Do not set this variable in the init file of a new user, or in a
- way that affects more than one user, because that would prevent
- new users from receiving the information they are supposed to see.
-
- - User Option: inhibit-startup-echo-area-message
- This variable controls the display of the startup echo area
- message. You can suppress the startup echo area message by adding
- text with this form to your `.emacs' file:
-
- (setq inhibit-startup-echo-area-message
- "YOUR-LOGIN-NAME")
-
- Simply setting `inhibit-startup-echo-area-message' to your login
- name is not sufficient to inhibit the message; Emacs explicitly
- checks whether `.emacs' contains an expression as shown above.
- Your login name must appear in the expression as a Lisp string
- constant.
-
- This way, you can easily inhibit the message for yourself if you
- wish, but thoughtless copying of your `.emacs' file will not
- inhibit the message for someone else.
-
-\1f
-File: lispref.info, Node: Init File, Next: Terminal-Specific, Prev: Start-up Summary, Up: Starting Up
-
-The Init File: `.emacs'
------------------------
-
- When you start XEmacs, it normally attempts to load the file
-`.emacs' from your home directory. This file, if it exists, must
-contain Lisp code. It is called your "init file". The command line
-switches `-q' and `-u' affect the use of the init file; `-q' says not
-to load an init file, and `-u' says to load a specified user's init
-file instead of yours. *Note Entering XEmacs: (xemacs)Entering XEmacs.
-
- A site may have a "default init file", which is the library named
-`default.el'. XEmacs finds the `default.el' file through the standard
-search path for libraries (*note How Programs Do Loading::). The
-XEmacs distribution does not come with this file; sites may provide one
-for local customizations. If the default init file exists, it is
-loaded whenever you start Emacs, except in batch mode or if `-q' is
-specified. But your own personal init file, if any, is loaded first; if
-it sets `inhibit-default-init' to a non-`nil' value, then XEmacs does
-not subsequently load the `default.el' file.
-
- Another file for site-customization is `site-start.el'. Emacs loads
-this _before_ the user's init file. You can inhibit the loading of
-this file with the option `-no-site-file'.
-
- - Variable: site-run-file
- This variable specifies the site-customization file to load before
- the user's init file. Its normal value is `"site-start"'.
-
- If there is a great deal of code in your `.emacs' file, you should
-move it into another file named `SOMETHING.el', byte-compile it (*note
-Byte Compilation::), and make your `.emacs' file load the other file
-using `load' (*note Loading::).
-
- *Note Init File Examples: (xemacs)Init File Examples, for examples
-of how to make various commonly desired customizations in your `.emacs'
-file.
-
- - User Option: inhibit-default-init
- This variable prevents XEmacs from loading the default
- initialization library file for your session of XEmacs. If its
- value is non-`nil', then the default library is not loaded. The
- default value is `nil'.
-
- - Variable: before-init-hook
- - Variable: after-init-hook
- These two normal hooks are run just before, and just after,
- loading of the user's init file, `default.el', and/or
- `site-start.el'.
-
-\1f
-File: lispref.info, Node: Terminal-Specific, Next: Command Line Arguments, Prev: Init File, Up: Starting Up
-
-Terminal-Specific Initialization
---------------------------------
-
- Each terminal type can have its own Lisp library that XEmacs loads
-when run on that type of terminal. For a terminal type named TERMTYPE,
-the library is called `term/TERMTYPE'. XEmacs finds the file by
-searching the `load-path' directories as it does for other files, and
-trying the `.elc' and `.el' suffixes. Normally, terminal-specific Lisp
-library is located in `emacs/lisp/term', a subdirectory of the
-`emacs/lisp' directory in which most XEmacs Lisp libraries are kept.
-
- The library's name is constructed by concatenating the value of the
-variable `term-file-prefix' and the terminal type. Normally,
-`term-file-prefix' has the value `"term/"'; changing this is not
-recommended.
-
- The usual function of a terminal-specific library is to enable
-special keys to send sequences that XEmacs can recognize. It may also
-need to set or add to `function-key-map' if the Termcap entry does not
-specify all the terminal's function keys. *Note Terminal Input::.
-
- When the name of the terminal type contains a hyphen, only the part
-of the name before the first hyphen is significant in choosing the
-library name. Thus, terminal types `aaa-48' and `aaa-30-rv' both use
-the `term/aaa' library. If necessary, the library can evaluate
-`(getenv "TERM")' to find the full name of the terminal type.
-
- Your `.emacs' file can prevent the loading of the terminal-specific
-library by setting the variable `term-file-prefix' to `nil'. This
-feature is useful when experimenting with your own peculiar
-customizations.
-
- You can also arrange to override some of the actions of the
-terminal-specific library by setting the variable `term-setup-hook'.
-This is a normal hook which XEmacs runs using `run-hooks' at the end of
-XEmacs initialization, after loading both your `.emacs' file and any
-terminal-specific libraries. You can use this variable to define
-initializations for terminals that do not have their own libraries.
-*Note Hooks::.
-
- - Variable: term-file-prefix
- If the `term-file-prefix' variable is non-`nil', XEmacs loads a
- terminal-specific initialization file as follows:
-
- (load (concat term-file-prefix (getenv "TERM")))
-
- You may set the `term-file-prefix' variable to `nil' in your
- `.emacs' file if you do not wish to load the
- terminal-initialization file. To do this, put the following in
- your `.emacs' file: `(setq term-file-prefix nil)'.
-
- - Variable: term-setup-hook
- This variable is a normal hook that XEmacs runs after loading your
- `.emacs' file, the default initialization file (if any) and the
- terminal-specific Lisp file.
-
- You can use `term-setup-hook' to override the definitions made by a
- terminal-specific file.
-
- - Variable: window-setup-hook
- This variable is a normal hook which XEmacs runs after loading your
- `.emacs' file and the default initialization file (if any), after
- loading terminal-specific Lisp code, and after running the hook
- `term-setup-hook'.
-
-\1f
-File: lispref.info, Node: Command Line Arguments, Prev: Terminal-Specific, Up: Starting Up
-
-Command Line Arguments
-----------------------
-
- You can use command line arguments to request various actions when
-you start XEmacs. Since you do not need to start XEmacs more than once
-per day, and will often leave your XEmacs session running longer than
-that, command line arguments are hardly ever used. As a practical
-matter, it is best to avoid making the habit of using them, since this
-habit would encourage you to kill and restart XEmacs unnecessarily
-often. These options exist for two reasons: to be compatible with
-other editors (for invocation by other programs) and to enable shell
-scripts to run specific Lisp programs.
-
- This section describes how Emacs processes command line arguments,
-and how you can customize them.
-
- - Function: command-line
- This function parses the command line that XEmacs was called with,
- processes it, loads the user's `.emacs' file and displays the
- startup messages.
-
- - Variable: command-line-processed
- The value of this variable is `t' once the command line has been
- processed.
-
- If you redump XEmacs by calling `dump-emacs', you may wish to set
- this variable to `nil' first in order to cause the new dumped
- XEmacs to process its new command line arguments.
-
- - Variable: command-switch-alist
- The value of this variable is an alist of user-defined command-line
- options and associated handler functions. This variable exists so
- you can add elements to it.
-
- A "command line option" is an argument on the command line of the
- form:
-
- -OPTION
-
- The elements of the `command-switch-alist' look like this:
-
- (OPTION . HANDLER-FUNCTION)
-
- The HANDLER-FUNCTION is called to handle OPTION and receives the
- option name as its sole argument.
-
- In some cases, the option is followed in the command line by an
- argument. In these cases, the HANDLER-FUNCTION can find all the
- remaining command-line arguments in the variable
- `command-line-args-left'. (The entire list of command-line
- arguments is in `command-line-args'.)
-
- The command line arguments are parsed by the `command-line-1'
- function in the `startup.el' file. See also *Note Command Line
- Switches and Arguments: (xemacs)Command Switches.
-
- - Variable: command-line-args
- The value of this variable is the list of command line arguments
- passed to XEmacs.
-
- - Variable: command-line-functions
- This variable's value is a list of functions for handling an
- unrecognized command-line argument. Each time the next argument
- to be processed has no special meaning, the functions in this list
- are called, in order of appearance, until one of them returns a
- non-`nil' value.
-
- These functions are called with no arguments. They can access the
- command-line argument under consideration through the variable
- `argi'. The remaining arguments (not including the current one)
- are in the variable `command-line-args-left'.
-
- When a function recognizes and processes the argument in `argi', it
- should return a non-`nil' value to say it has dealt with that
- argument. If it has also dealt with some of the following
- arguments, it can indicate that by deleting them from
- `command-line-args-left'.
-
- If all of these functions return `nil', then the argument is used
- as a file name to visit.
-
-\1f
-File: lispref.info, Node: Getting Out, Next: System Environment, Prev: Starting Up, Up: System Interface
-
-Getting out of XEmacs
-=====================
-
- There are two ways to get out of XEmacs: you can kill the XEmacs job,
-which exits permanently, or you can suspend it, which permits you to
-reenter the XEmacs process later. As a practical matter, you seldom
-kill XEmacs--only when you are about to log out. Suspending is much
-more common.
-
-* Menu:
-
-* Killing XEmacs:: Exiting XEmacs irreversibly.
-* Suspending XEmacs:: Exiting XEmacs reversibly.
-
-\1f
-File: lispref.info, Node: Killing XEmacs, Next: Suspending XEmacs, Up: Getting Out
-
-Killing XEmacs
---------------
-
- Killing XEmacs means ending the execution of the XEmacs process. The
-parent process normally resumes control. The low-level primitive for
-killing XEmacs is `kill-emacs'.
-
- - Function: kill-emacs &optional exit-data
- This function exits the XEmacs process and kills it.
-
- If EXIT-DATA is an integer, then it is used as the exit status of
- the XEmacs process. (This is useful primarily in batch operation;
- see *Note Batch Mode::.)
-
- If EXIT-DATA is a string, its contents are stuffed into the
- terminal input buffer so that the shell (or whatever program next
- reads input) can read them.
-
- All the information in the XEmacs process, aside from files that have
-been saved, is lost when the XEmacs is killed. Because killing XEmacs
-inadvertently can lose a lot of work, XEmacs queries for confirmation
-before actually terminating if you have buffers that need saving or
-subprocesses that are running. This is done in the function
-`save-buffers-kill-emacs'.
-
- - Variable: kill-emacs-query-functions
- After asking the standard questions, `save-buffers-kill-emacs'
- calls the functions in the list `kill-buffer-query-functions', in
- order of appearance, with no arguments. These functions can ask
- for additional confirmation from the user. If any of them returns
- non-`nil', XEmacs is not killed.
-
- - Variable: kill-emacs-hook
- This variable is a normal hook; once `save-buffers-kill-emacs' is
- finished with all file saving and confirmation, it runs the
- functions in this hook.
-
-\1f
-File: lispref.info, Node: Suspending XEmacs, Prev: Killing XEmacs, Up: Getting Out
-
-Suspending XEmacs
------------------
-
- "Suspending XEmacs" means stopping XEmacs temporarily and returning
-control to its superior process, which is usually the shell. This
-allows you to resume editing later in the same XEmacs process, with the
-same buffers, the same kill ring, the same undo history, and so on. To
-resume XEmacs, use the appropriate command in the parent shell--most
-likely `fg'.
-
- Some operating systems do not support suspension of jobs; on these
-systems, "suspension" actually creates a new shell temporarily as a
-subprocess of XEmacs. Then you would exit the shell to return to
-XEmacs.
-
- Suspension is not useful with window systems such as X, because the
-XEmacs job may not have a parent that can resume it again, and in any
-case you can give input to some other job such as a shell merely by
-moving to a different window. Therefore, suspending is not allowed
-when XEmacs is an X client.
-
- - Function: suspend-emacs string
- This function stops XEmacs and returns control to the superior
- process. If and when the superior process resumes XEmacs,
- `suspend-emacs' returns `nil' to its caller in Lisp.
-
- If STRING is non-`nil', its characters are sent to be read as
- terminal input by XEmacs's superior shell. The characters in
- STRING are not echoed by the superior shell; only the results
- appear.
-
- Before suspending, `suspend-emacs' runs the normal hook
- `suspend-hook'. In Emacs version 18, `suspend-hook' was not a
- normal hook; its value was a single function, and if its value was
- non-`nil', then `suspend-emacs' returned immediately without
- actually suspending anything.
-
- After the user resumes XEmacs, `suspend-emacs' runs the normal hook
- `suspend-resume-hook'. *Note Hooks::.
-
- The next redisplay after resumption will redraw the entire screen,
- unless the variable `no-redraw-on-reenter' is non-`nil' (*note
- Refresh Screen::).
-
- In the following example, note that `pwd' is not echoed after
- XEmacs is suspended. But it is read and executed by the shell.
-
- (suspend-emacs)
- => nil
-
- (add-hook 'suspend-hook
- (function (lambda ()
- (or (y-or-n-p
- "Really suspend? ")
- (error "Suspend cancelled")))))
- => (lambda nil
- (or (y-or-n-p "Really suspend? ")
- (error "Suspend cancelled")))
- (add-hook 'suspend-resume-hook
- (function (lambda () (message "Resumed!"))))
- => (lambda nil (message "Resumed!"))
- (suspend-emacs "pwd")
- => nil
- ---------- Buffer: Minibuffer ----------
- Really suspend? y
- ---------- Buffer: Minibuffer ----------
-
- ---------- Parent Shell ----------
- lewis@slug[23] % /user/lewis/manual
- lewis@slug[24] % fg
-
- ---------- Echo Area ----------
- Resumed!
-
- - Variable: suspend-hook
- This variable is a normal hook run before suspending.
-
- - Variable: suspend-resume-hook
- This variable is a normal hook run after suspending.
-
-\1f
-File: lispref.info, Node: System Environment, Next: User Identification, Prev: Getting Out, Up: System Interface
-
-Operating System Environment
-============================
-
- XEmacs provides access to variables in the operating system
-environment through various functions. These variables include the
-name of the system, the user's UID, and so on.
-
- - Variable: system-type
- The value of this variable is a symbol indicating the type of
- operating system XEmacs is operating on. Here is a table of the
- possible values:
-
- `aix-v3'
- AIX.
-
- `berkeley-unix'
- Berkeley BSD.
-
- `dgux'
- Data General DGUX operating system.
-
- `gnu'
- A GNU system using the GNU HURD and Mach.
-
- `hpux'
- Hewlett-Packard HPUX operating system.
-
- `irix'
- Silicon Graphics Irix system.
-
- `linux'
- A GNU system using the Linux kernel.
-
- `ms-dos'
- Microsoft MS-DOS "operating system."
-
- `next-mach'
- NeXT Mach-based system.
-
- `rtu'
- Masscomp RTU, UCB universe.
-
- `unisoft-unix'
- UniSoft UniPlus.
-
- `usg-unix-v'
- AT&T System V.
-
- `vax-vms'
- VAX VMS.
-
- `windows-nt'
- Microsoft windows NT.
-
- `xenix'
- SCO Xenix 386.
-
- We do not wish to add new symbols to make finer distinctions
- unless it is absolutely necessary! In fact, we hope to eliminate
- some of these alternatives in the future. We recommend using
- `system-configuration' to distinguish between different operating
- systems.
-
- - Variable: system-configuration
- This variable holds the three-part configuration name for the
- hardware/software configuration of your system, as a string. The
- convenient way to test parts of this string is with `string-match'.
-
- - Function: system-name
- This function returns the name of the machine you are running on.
- (system-name)
- => "prep.ai.mit.edu"
-
- The symbol `system-name' is a variable as well as a function. In
-fact, the function returns whatever value the variable `system-name'
-currently holds. Thus, you can set the variable `system-name' in case
-Emacs is confused about the name of your system. The variable is also
-useful for constructing frame titles (*note Frame Titles::).
-
- - Variable: mail-host-address
- If this variable is non-`nil', it is used instead of `system-name'
- for purposes of generating email addresses. For example, it is
- used when constructing the default value of `user-mail-address'.
- *Note User Identification::. (Since this is done when XEmacs
- starts up, the value actually used is the one saved when XEmacs
- was dumped. *Note Building XEmacs::.)
-
- - Function: getenv var
- This function returns the value of the environment variable VAR,
- as a string. Within XEmacs, the environment variable values are
- kept in the Lisp variable `process-environment'.
-
- (getenv "USER")
- => "lewis"
-
- lewis@slug[10] % printenv
- PATH=.:/user/lewis/bin:/usr/bin:/usr/local/bin
- USER=lewis
- TERM=ibmapa16
- SHELL=/bin/csh
- HOME=/user/lewis
-
- - Command: setenv variable value
- This command sets the value of the environment variable named
- VARIABLE to VALUE. Both arguments should be strings. This
- function works by modifying `process-environment'; binding that
- variable with `let' is also reasonable practice.
-
- - Variable: process-environment
- This variable is a list of strings, each describing one environment
- variable. The functions `getenv' and `setenv' work by means of
- this variable.
-
- process-environment
- => ("l=/usr/stanford/lib/gnuemacs/lisp"
- "PATH=.:/user/lewis/bin:/usr/class:/nfsusr/local/bin"
- "USER=lewis"
- "TERM=ibmapa16"
- "SHELL=/bin/csh"
- "HOME=/user/lewis")
-
- - Variable: path-separator
- This variable holds a string which says which character separates
- directories in a search path (as found in an environment
- variable). Its value is `":"' for Unix and GNU systems, and `";"'
- for MS-DOS and Windows NT.
-
- - Variable: invocation-name
- This variable holds the program name under which Emacs was
- invoked. The value is a string, and does not include a directory
- name.
-
- - Variable: invocation-directory
- This variable holds the directory from which the Emacs executable
- was invoked, or perhaps `nil' if that directory cannot be
- determined.
-
- - Variable: installation-directory
- If non-`nil', this is a directory within which to look for the
- `lib-src' and `etc' subdirectories. This is non-`nil' when Emacs
- can't find those directories in their standard installed
- locations, but can find them in a directory related somehow to the
- one containing the Emacs executable.
-
- - Function: load-average &optional use-floats
- This function returns a list of the current 1-minute, 5-minute and
- 15-minute load averages. The values are integers that are 100
- times the system load averages. (The load averages indicate the
- number of processes trying to run.)
-
- When USE-FLOATS is non-`nil', floats will be returned instead of
- integers. These floats are not multiplied by 100.
-
- (load-average)
- => (169 158 164)
- (load-average t)
- => (1.69921875 1.58984375 1.640625)
-
- lewis@rocky[5] % uptime
- 8:06pm up 16 day(s), 21:57, 40 users,
- load average: 1.68, 1.59, 1.64
-
- If the 5-minute or 15-minute load averages are not available,
- return a shortened list, containing only those averages which are
- available.
-
- On some systems, this function may require special privileges to
- run, or it may be unimplemented for the particular system type.
- In that case, the function will signal an error.
-
- - Function: emacs-pid
- This function returns the process ID of the Emacs process.
-
- - Function: setprv privilege-name &optional setp getprv
- This function sets or resets a VMS privilege. (It does not exist
- on Unix.) The first arg is the privilege name, as a string. The
- second argument, SETP, is `t' or `nil', indicating whether the
- privilege is to be turned on or off. Its default is `nil'. The
- function returns `t' if successful, `nil' otherwise.
-
- If the third argument, GETPRV, is non-`nil', `setprv' does not
- change the privilege, but returns `t' or `nil' indicating whether
- the privilege is currently enabled.
-
-\1f
-File: lispref.info, Node: User Identification, Next: Time of Day, Prev: System Environment, Up: System Interface
-
-User Identification
-===================
-
- - Variable: user-mail-address
- This holds the nominal email address of the user who is using
- Emacs. When Emacs starts up, it computes a default value that is
- usually right, but users often set this themselves when the
- default value is not right.
-
- - Function: user-login-name &optional uid
- If you don't specify UID, this function returns the name under
- which the user is logged in. If the environment variable `LOGNAME'
- is set, that value is used. Otherwise, if the environment variable
- `USER' is set, that value is used. Otherwise, the value is based
- on the effective UID, not the real UID.
-
- If you specify UID, the value is the user name that corresponds to
- UID (which should be an integer).
-
- (user-login-name)
- => "lewis"
-
- - Function: user-real-login-name
- This function returns the user name corresponding to Emacs's real
- UID. This ignores the effective UID and ignores the environment
- variables `LOGNAME' and `USER'.
-
- - Variable: user-full-name
- This variable holds the name of the user running this Emacs. It is
- initialized at startup time from the value of `NAME' environment
- variable. You can change the value of this variable to alter the
- result of the `user-full-name' function.
-
- - Function: user-full-name &optional user
- This function returns the full name of USER. If USER is `nil', it
- defaults to the user running this Emacs. In that case, the value
- of `user-full-name' variable, if non-`nil', will be used.
-
- If USER is specified explicitly, `user-full-name' variable is
- ignored.
-
- (user-full-name)
- => "Hrvoje Niksic"
- (setq user-full-name "Hrvoje \"Niksa\" Niksic")
- (user-full-name)
- => "Hrvoje \"Niksa\" Niksic"
- (user-full-name "hniksic")
- => "Hrvoje Niksic"
-
- The symbols `user-login-name', `user-real-login-name' and
-`user-full-name' are variables as well as functions. The functions
-return the same values that the variables hold. These variables allow
-you to "fake out" Emacs by telling the functions what to return. The
-variables are also useful for constructing frame titles (*note Frame
-Titles::).
-
- - Function: user-real-uid
- This function returns the real UID of the user.
-
- (user-real-uid)
- => 19
-
- - Function: user-uid
- This function returns the effective UID of the user.
-
- - Function: user-home-directory
- This function returns the "`HOME'" directory of the user, and is
- intended to replace occurrences of "`(getenv "HOME")'". Under
- Unix systems, the following is done:
-
- 1. Return the value of "`(getenv "HOME")'", if set.
-
- 2. Return "/", as a fallback, but issue a warning. (Future
- versions of XEmacs will also attempt to lookup the `HOME'
- directory via `getpwent()', but this has not yet been
- implemented.)
-
- Under MS Windows, this is done:
-
- 1. Return the value of "`(getenv "HOME")'", if set.
-
- 2. If the environment variables `HOMEDRIVE' and `HOMEDIR' are
- both set, return the concatenation (the following description
- uses MS Windows environment variable substitution syntax):
- `%HOMEDRIVE%%HOMEDIR%'.
-
- 3. Return "C:\", as a fallback, but issue a warning.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Sentinels, Next: Process Window Size, Prev: Output from Processes, Up: Processes
+
+Sentinels: Detecting Process Status Changes
+===========================================
+
+ A "process sentinel" is a function that is called whenever the
+associated process changes status for any reason, including signals
+(whether sent by XEmacs or caused by the process's own actions) that
+terminate, stop, or continue the process. The process sentinel is also
+called if the process exits. The sentinel receives two arguments: the
+process for which the event occurred, and a string describing the type
+of event.
+
+ The string describing the event looks like one of the following:
+
+ * `"finished\n"'.
+
+ * `"exited abnormally with code EXITCODE\n"'.
+
+ * `"NAME-OF-SIGNAL\n"'.
+
+ * `"NAME-OF-SIGNAL (core dumped)\n"'.
+
+ A sentinel runs only while XEmacs is waiting (e.g., for terminal
+input, or for time to elapse, or for process output). This avoids the
+timing errors that could result from running them at random places in
+the middle of other Lisp programs. A program can wait, so that
+sentinels will run, by calling `sit-for' or `sleep-for' (*note
+Waiting::), or `accept-process-output' (*note Accepting Output::).
+Emacs is also waiting when the command loop is reading input.
+
+ Quitting is normally inhibited within a sentinel--otherwise, the
+effect of typing `C-g' at command level or to quit a user command would
+be unpredictable. If you want to permit quitting inside a sentinel,
+bind `inhibit-quit' to `nil'. *Note Quitting::.
+
+ A sentinel that writes the output into the buffer of the process
+should check whether the buffer is still alive. If it tries to insert
+into a dead buffer, it will get an error. If the buffer is dead,
+`(buffer-name (process-buffer PROCESS))' returns `nil'.
+
+ If an error happens during execution of a sentinel, it is caught
+automatically, so that it doesn't stop the execution of whatever
+programs was running when the sentinel was started. However, if
+`debug-on-error' is non-`nil', the error-catching is turned off. This
+makes it possible to use the Lisp debugger to debug the sentinel.
+*Note Debugger::.
+
+ In earlier Emacs versions, every sentinel that did regexp searching
+or matching had to explicitly save and restore the match data. Now
+Emacs does this automatically; sentinels never need to do it explicitly.
+*Note Match Data::.
+
+ - Function: set-process-sentinel process sentinel
+ This function associates SENTINEL with PROCESS. If SENTINEL is
+ `nil', then the process will have no sentinel. The default
+ behavior when there is no sentinel is to insert a message in the
+ process's buffer when the process status changes.
+
+ (defun msg-me (process event)
+ (princ
+ (format "Process: %s had the event `%s'" process event)))
+ (set-process-sentinel (get-process "shell") 'msg-me)
+ => msg-me
+ (kill-process (get-process "shell"))
+ -| Process: #<process shell> had the event `killed'
+ => #<process shell>
+
+ - Function: process-sentinel process
+ This function returns the sentinel of PROCESS, or `nil' if it has
+ none.
+
+ - Function: waiting-for-user-input-p
+ While a sentinel or filter function is running, this function
+ returns non-`nil' if XEmacs was waiting for keyboard input from
+ the user at the time the sentinel or filter function was called,
+ `nil' if it was not.
+
+\1f
+File: lispref.info, Node: Process Window Size, Next: Transaction Queues, Prev: Sentinels, Up: Processes
+
+Process Window Size
+===================
+
+ - Function: set-process-window-size process height width
+ This function tells PROCESS that its logical window size is HEIGHT
+ by WIDTH characters. This is principally useful with pty's.
+
+\1f
+File: lispref.info, Node: Transaction Queues, Next: Network, Prev: Process Window Size, Up: Processes
+
+Transaction Queues
+==================
+
+ You can use a "transaction queue" for more convenient communication
+with subprocesses using transactions. First use `tq-create' to create
+a transaction queue communicating with a specified process. Then you
+can call `tq-enqueue' to send a transaction.
+
+ - Function: tq-create process
+ This function creates and returns a transaction queue
+ communicating with PROCESS. The argument PROCESS should be a
+ subprocess capable of sending and receiving streams of bytes. It
+ may be a child process, or it may be a TCP connection to a server,
+ possibly on another machine.
+
+ - Function: tq-enqueue queue question regexp closure fn
+ This function sends a transaction to queue QUEUE. Specifying the
+ queue has the effect of specifying the subprocess to talk to.
+
+ The argument QUESTION is the outgoing message that starts the
+ transaction. The argument FN is the function to call when the
+ corresponding answer comes back; it is called with two arguments:
+ CLOSURE, and the answer received.
+
+ The argument REGEXP is a regular expression that should match the
+ entire answer, but nothing less; that's how `tq-enqueue' determines
+ where the answer ends.
+
+ The return value of `tq-enqueue' itself is not meaningful.
+
+ - Function: tq-close queue
+ Shut down transaction queue QUEUE, waiting for all pending
+ transactions to complete, and then terminate the connection or
+ child process.
+
+ Transaction queues are implemented by means of a filter function.
+*Note Filter Functions::.
+
+\1f
+File: lispref.info, Node: Network, Prev: Transaction Queues, Up: Processes
+
+Network Connections
+===================
+
+ XEmacs Lisp programs can open TCP network connections to other
+processes on the same machine or other machines. A network connection
+is handled by Lisp much like a subprocess, and is represented by a
+process object. However, the process you are communicating with is not
+a child of the XEmacs process, so you can't kill it or send it signals.
+All you can do is send and receive data. `delete-process' closes the
+connection, but does not kill the process at the other end; that
+process must decide what to do about closure of the connection.
+
+ You can distinguish process objects representing network connections
+from those representing subprocesses with the `process-status'
+function. It always returns either `open' or `closed' for a network
+connection, and it never returns either of those values for a real
+subprocess. *Note Process Information::.
+
+ - Function: open-network-stream name buffer-or-name host service
+ This function opens a TCP connection for a service to a host. It
+ returns a process object to represent the connection.
+
+ The NAME argument specifies the name for the process object. It
+ is modified as necessary to make it unique.
+
+ The BUFFER-OR-NAME argument is the buffer to associate with the
+ connection. Output from the connection is inserted in the buffer,
+ unless you specify a filter function to handle the output. If
+ BUFFER-OR-NAME is `nil', it means that the connection is not
+ associated with any buffer.
+
+ The arguments HOST and SERVICE specify where to connect to; HOST
+ is the host name or IP address (a string), and SERVICE is the name
+ of a defined network service (a string) or a port number (an
+ integer).
+
+\1f
+File: lispref.info, Node: System Interface, Next: X-Windows, Prev: Processes, Up: Top
+
+Operating System Interface
+**************************
+
+ This chapter is about starting and getting out of Emacs, access to
+values in the operating system environment, and terminal input, output,
+and flow control.
+
+ *Note Building XEmacs::, for related information. See also *Note
+Display::, for additional operating system status information
+pertaining to the terminal and the screen.
+
+* Menu:
+
+* Starting Up:: Customizing XEmacs start-up processing.
+* Getting Out:: How exiting works (permanent or temporary).
+* System Environment:: Distinguish the name and kind of system.
+* User Identification:: Finding the name and user id of the user.
+* Time of Day:: Getting the current time.
+* Time Conversion:: Converting a time from numeric form to a string, or
+ to calendrical data (or vice versa).
+* Timers:: Setting a timer to call a function at a certain time.
+* Terminal Input:: Recording terminal input for debugging.
+* Terminal Output:: Recording terminal output for debugging.
+* Flow Control:: How to turn output flow control on or off.
+* Batch Mode:: Running XEmacs without terminal interaction.
+
+\1f
+File: lispref.info, Node: Starting Up, Next: Getting Out, Up: System Interface
+
+Starting Up XEmacs
+==================
+
+ This section describes what XEmacs does when it is started, and how
+you can customize these actions.
+
+* Menu:
+
+* Start-up Summary:: Sequence of actions XEmacs performs at start-up.
+* Init File:: Details on reading the init file (`.emacs').
+* Terminal-Specific:: How the terminal-specific Lisp file is read.
+* Command Line Arguments:: How command line arguments are processed,
+ and how you can customize them.
+
+\1f
+File: lispref.info, Node: Start-up Summary, Next: Init File, Up: Starting Up
+
+Summary: Sequence of Actions at Start Up
+----------------------------------------
+
+ The order of operations performed (in `startup.el') by XEmacs when
+it is started up is as follows:
+
+ 1. It loads the initialization library for the window system, if you
+ are using a window system. This library's name is
+ `term/WINDOWSYSTEM-win.el'.
+
+ 2. It processes the initial options. (Some of them are handled even
+ earlier than this.)
+
+ 3. It initializes the X window frame and faces, if appropriate.
+
+ 4. It runs the normal hook `before-init-hook'.
+
+ 5. It loads the library `site-start', unless the option
+ `-no-site-file' was specified. The library's file name is usually
+ `site-start.el'.
+
+ 6. It loads the file `~/.emacs' unless `-q' was specified on the
+ command line. (This is not done in `-batch' mode.) The `-u'
+ option can specify the user name whose home directory should be
+ used instead of `~'.
+
+ 7. It loads the library `default' unless `inhibit-default-init' is
+ non-`nil'. (This is not done in `-batch' mode or if `-q' was
+ specified on the command line.) The library's file name is
+ usually `default.el'.
+
+ 8. It runs the normal hook `after-init-hook'.
+
+ 9. It sets the major mode according to `initial-major-mode', provided
+ the buffer `*scratch*' is still current and still in Fundamental
+ mode.
+
+ 10. It loads the terminal-specific Lisp file, if any, except when in
+ batch mode or using a window system.
+
+ 11. It displays the initial echo area message, unless you have
+ suppressed that with `inhibit-startup-echo-area-message'.
+
+ 12. It processes the action arguments from the command line.
+
+ 13. It runs `term-setup-hook'.
+
+ 14. It calls `frame-notice-user-settings', which modifies the
+ parameters of the selected frame according to whatever the init
+ files specify.
+
+ 15. It runs `window-setup-hook'. *Note Terminal-Specific::.
+
+ 16. It displays copyleft, nonwarranty, and basic use information,
+ provided there were no remaining command line arguments (a few
+ steps above) and the value of `inhibit-startup-message' is `nil'.
+
+ - User Option: inhibit-startup-message
+ This variable inhibits the initial startup messages (the
+ nonwarranty, etc.). If it is non-`nil', then the messages are not
+ printed.
+
+ This variable exists so you can set it in your personal init file,
+ once you are familiar with the contents of the startup message.
+ Do not set this variable in the init file of a new user, or in a
+ way that affects more than one user, because that would prevent
+ new users from receiving the information they are supposed to see.
+
+ - User Option: inhibit-startup-echo-area-message
+ This variable controls the display of the startup echo area
+ message. You can suppress the startup echo area message by adding
+ text with this form to your `.emacs' file:
+
+ (setq inhibit-startup-echo-area-message
+ "YOUR-LOGIN-NAME")
+
+ Simply setting `inhibit-startup-echo-area-message' to your login
+ name is not sufficient to inhibit the message; Emacs explicitly
+ checks whether `.emacs' contains an expression as shown above.
+ Your login name must appear in the expression as a Lisp string
+ constant.
+
+ This way, you can easily inhibit the message for yourself if you
+ wish, but thoughtless copying of your `.emacs' file will not
+ inhibit the message for someone else.
+
+\1f
+File: lispref.info, Node: Init File, Next: Terminal-Specific, Prev: Start-up Summary, Up: Starting Up
+
+The Init File: `.emacs'
+-----------------------
+
+ When you start XEmacs, it normally attempts to load the file
+`.emacs' from your home directory. This file, if it exists, must
+contain Lisp code. It is called your "init file". The command line
+switches `-q' and `-u' affect the use of the init file; `-q' says not
+to load an init file, and `-u' says to load a specified user's init
+file instead of yours. *Note Entering XEmacs: (xemacs)Entering XEmacs.
+
+ A site may have a "default init file", which is the library named
+`default.el'. XEmacs finds the `default.el' file through the standard
+search path for libraries (*note How Programs Do Loading::). The
+XEmacs distribution does not come with this file; sites may provide one
+for local customizations. If the default init file exists, it is
+loaded whenever you start Emacs, except in batch mode or if `-q' is
+specified. But your own personal init file, if any, is loaded first; if
+it sets `inhibit-default-init' to a non-`nil' value, then XEmacs does
+not subsequently load the `default.el' file.
+
+ Another file for site-customization is `site-start.el'. Emacs loads
+this _before_ the user's init file. You can inhibit the loading of
+this file with the option `-no-site-file'.
+
+ - Variable: site-run-file
+ This variable specifies the site-customization file to load before
+ the user's init file. Its normal value is `"site-start"'.
+
+ If there is a great deal of code in your `.emacs' file, you should
+move it into another file named `SOMETHING.el', byte-compile it (*note
+Byte Compilation::), and make your `.emacs' file load the other file
+using `load' (*note Loading::).
+
+ *Note Init File Examples: (xemacs)Init File Examples, for examples
+of how to make various commonly desired customizations in your `.emacs'
+file.
+
+ - User Option: inhibit-default-init
+ This variable prevents XEmacs from loading the default
+ initialization library file for your session of XEmacs. If its
+ value is non-`nil', then the default library is not loaded. The
+ default value is `nil'.
+
+ - Variable: before-init-hook
+ - Variable: after-init-hook
+ These two normal hooks are run just before, and just after,
+ loading of the user's init file, `default.el', and/or
+ `site-start.el'.
+
+\1f
+File: lispref.info, Node: Terminal-Specific, Next: Command Line Arguments, Prev: Init File, Up: Starting Up
+
+Terminal-Specific Initialization
+--------------------------------
+
+ Each terminal type can have its own Lisp library that XEmacs loads
+when run on that type of terminal. For a terminal type named TERMTYPE,
+the library is called `term/TERMTYPE'. XEmacs finds the file by
+searching the `load-path' directories as it does for other files, and
+trying the `.elc' and `.el' suffixes. Normally, terminal-specific Lisp
+library is located in `emacs/lisp/term', a subdirectory of the
+`emacs/lisp' directory in which most XEmacs Lisp libraries are kept.
+
+ The library's name is constructed by concatenating the value of the
+variable `term-file-prefix' and the terminal type. Normally,
+`term-file-prefix' has the value `"term/"'; changing this is not
+recommended.
+
+ The usual function of a terminal-specific library is to enable
+special keys to send sequences that XEmacs can recognize. It may also
+need to set or add to `function-key-map' if the Termcap entry does not
+specify all the terminal's function keys. *Note Terminal Input::.
+
+ When the name of the terminal type contains a hyphen, only the part
+of the name before the first hyphen is significant in choosing the
+library name. Thus, terminal types `aaa-48' and `aaa-30-rv' both use
+the `term/aaa' library. If necessary, the library can evaluate
+`(getenv "TERM")' to find the full name of the terminal type.
+
+ Your `.emacs' file can prevent the loading of the terminal-specific
+library by setting the variable `term-file-prefix' to `nil'. This
+feature is useful when experimenting with your own peculiar
+customizations.
+
+ You can also arrange to override some of the actions of the
+terminal-specific library by setting the variable `term-setup-hook'.
+This is a normal hook which XEmacs runs using `run-hooks' at the end of
+XEmacs initialization, after loading both your `.emacs' file and any
+terminal-specific libraries. You can use this variable to define
+initializations for terminals that do not have their own libraries.
+*Note Hooks::.
+
+ - Variable: term-file-prefix
+ If the `term-file-prefix' variable is non-`nil', XEmacs loads a
+ terminal-specific initialization file as follows:
+
+ (load (concat term-file-prefix (getenv "TERM")))
+
+ You may set the `term-file-prefix' variable to `nil' in your
+ `.emacs' file if you do not wish to load the
+ terminal-initialization file. To do this, put the following in
+ your `.emacs' file: `(setq term-file-prefix nil)'.
+
+ - Variable: term-setup-hook
+ This variable is a normal hook that XEmacs runs after loading your
+ `.emacs' file, the default initialization file (if any) and the
+ terminal-specific Lisp file.
+
+ You can use `term-setup-hook' to override the definitions made by a
+ terminal-specific file.
+
+ - Variable: window-setup-hook
+ This variable is a normal hook which XEmacs runs after loading your
+ `.emacs' file and the default initialization file (if any), after
+ loading terminal-specific Lisp code, and after running the hook
+ `term-setup-hook'.
+
+\1f
+File: lispref.info, Node: Command Line Arguments, Prev: Terminal-Specific, Up: Starting Up
+
+Command Line Arguments
+----------------------
+
+ You can use command line arguments to request various actions when
+you start XEmacs. Since you do not need to start XEmacs more than once
+per day, and will often leave your XEmacs session running longer than
+that, command line arguments are hardly ever used. As a practical
+matter, it is best to avoid making the habit of using them, since this
+habit would encourage you to kill and restart XEmacs unnecessarily
+often. These options exist for two reasons: to be compatible with
+other editors (for invocation by other programs) and to enable shell
+scripts to run specific Lisp programs.
+
+ This section describes how Emacs processes command line arguments,
+and how you can customize them.
+
+ - Function: command-line
+ This function parses the command line that XEmacs was called with,
+ processes it, loads the user's `.emacs' file and displays the
+ startup messages.
+
+ - Variable: command-line-processed
+ The value of this variable is `t' once the command line has been
+ processed.
+
+ If you redump XEmacs by calling `dump-emacs', you may wish to set
+ this variable to `nil' first in order to cause the new dumped
+ XEmacs to process its new command line arguments.
+
+ - Variable: command-switch-alist
+ The value of this variable is an alist of user-defined command-line
+ options and associated handler functions. This variable exists so
+ you can add elements to it.
+
+ A "command line option" is an argument on the command line of the
+ form:
+
+ -OPTION
+
+ The elements of the `command-switch-alist' look like this:
+
+ (OPTION . HANDLER-FUNCTION)
+
+ The HANDLER-FUNCTION is called to handle OPTION and receives the
+ option name as its sole argument.
+
+ In some cases, the option is followed in the command line by an
+ argument. In these cases, the HANDLER-FUNCTION can find all the
+ remaining command-line arguments in the variable
+ `command-line-args-left'. (The entire list of command-line
+ arguments is in `command-line-args'.)
+
+ The command line arguments are parsed by the `command-line-1'
+ function in the `startup.el' file. See also *Note Command Line
+ Switches and Arguments: (xemacs)Command Switches.
+
+ - Variable: command-line-args
+ The value of this variable is the list of command line arguments
+ passed to XEmacs.
+
+ - Variable: command-line-functions
+ This variable's value is a list of functions for handling an
+ unrecognized command-line argument. Each time the next argument
+ to be processed has no special meaning, the functions in this list
+ are called, in order of appearance, until one of them returns a
+ non-`nil' value.
+
+ These functions are called with no arguments. They can access the
+ command-line argument under consideration through the variable
+ `argi'. The remaining arguments (not including the current one)
+ are in the variable `command-line-args-left'.
+
+ When a function recognizes and processes the argument in `argi', it
+ should return a non-`nil' value to say it has dealt with that
+ argument. If it has also dealt with some of the following
+ arguments, it can indicate that by deleting them from
+ `command-line-args-left'.
+
+ If all of these functions return `nil', then the argument is used
+ as a file name to visit.
+
+\1f
+File: lispref.info, Node: Getting Out, Next: System Environment, Prev: Starting Up, Up: System Interface
+
+Getting out of XEmacs
+=====================
+
+ There are two ways to get out of XEmacs: you can kill the XEmacs job,
+which exits permanently, or you can suspend it, which permits you to
+reenter the XEmacs process later. As a practical matter, you seldom
+kill XEmacs--only when you are about to log out. Suspending is much
+more common.
+
+* Menu:
+
+* Killing XEmacs:: Exiting XEmacs irreversibly.
+* Suspending XEmacs:: Exiting XEmacs reversibly.
+
+\1f
+File: lispref.info, Node: Killing XEmacs, Next: Suspending XEmacs, Up: Getting Out
+
+Killing XEmacs
+--------------
+
+ Killing XEmacs means ending the execution of the XEmacs process. The
+parent process normally resumes control. The low-level primitive for
+killing XEmacs is `kill-emacs'.
+
+ - Function: kill-emacs &optional exit-data
+ This function exits the XEmacs process and kills it.
+
+ If EXIT-DATA is an integer, then it is used as the exit status of
+ the XEmacs process. (This is useful primarily in batch operation;
+ see *Note Batch Mode::.)
+
+ If EXIT-DATA is a string, its contents are stuffed into the
+ terminal input buffer so that the shell (or whatever program next
+ reads input) can read them.
+
+ All the information in the XEmacs process, aside from files that have
+been saved, is lost when the XEmacs is killed. Because killing XEmacs
+inadvertently can lose a lot of work, XEmacs queries for confirmation
+before actually terminating if you have buffers that need saving or
+subprocesses that are running. This is done in the function
+`save-buffers-kill-emacs'.
+
+ - Variable: kill-emacs-query-functions
+ After asking the standard questions, `save-buffers-kill-emacs'
+ calls the functions in the list `kill-buffer-query-functions', in
+ order of appearance, with no arguments. These functions can ask
+ for additional confirmation from the user. If any of them returns
+ non-`nil', XEmacs is not killed.
+
+ - Variable: kill-emacs-hook
+ This variable is a normal hook; once `save-buffers-kill-emacs' is
+ finished with all file saving and confirmation, it runs the
+ functions in this hook.
+
+\1f
+File: lispref.info, Node: Suspending XEmacs, Prev: Killing XEmacs, Up: Getting Out
+
+Suspending XEmacs
+-----------------
+
+ "Suspending XEmacs" means stopping XEmacs temporarily and returning
+control to its superior process, which is usually the shell. This
+allows you to resume editing later in the same XEmacs process, with the
+same buffers, the same kill ring, the same undo history, and so on. To
+resume XEmacs, use the appropriate command in the parent shell--most
+likely `fg'.
+
+ Some operating systems do not support suspension of jobs; on these
+systems, "suspension" actually creates a new shell temporarily as a
+subprocess of XEmacs. Then you would exit the shell to return to
+XEmacs.
+
+ Suspension is not useful with window systems such as X, because the
+XEmacs job may not have a parent that can resume it again, and in any
+case you can give input to some other job such as a shell merely by
+moving to a different window. Therefore, suspending is not allowed
+when XEmacs is an X client.
+
+ - Function: suspend-emacs string
+ This function stops XEmacs and returns control to the superior
+ process. If and when the superior process resumes XEmacs,
+ `suspend-emacs' returns `nil' to its caller in Lisp.
+
+ If STRING is non-`nil', its characters are sent to be read as
+ terminal input by XEmacs's superior shell. The characters in
+ STRING are not echoed by the superior shell; only the results
+ appear.
+
+ Before suspending, `suspend-emacs' runs the normal hook
+ `suspend-hook'. In Emacs version 18, `suspend-hook' was not a
+ normal hook; its value was a single function, and if its value was
+ non-`nil', then `suspend-emacs' returned immediately without
+ actually suspending anything.
+
+ After the user resumes XEmacs, `suspend-emacs' runs the normal hook
+ `suspend-resume-hook'. *Note Hooks::.
+
+ The next redisplay after resumption will redraw the entire screen,
+ unless the variable `no-redraw-on-reenter' is non-`nil' (*note
+ Refresh Screen::).
+
+ In the following example, note that `pwd' is not echoed after
+ XEmacs is suspended. But it is read and executed by the shell.
+
+ (suspend-emacs)
+ => nil
+
+ (add-hook 'suspend-hook
+ (function (lambda ()
+ (or (y-or-n-p
+ "Really suspend? ")
+ (error "Suspend cancelled")))))
+ => (lambda nil
+ (or (y-or-n-p "Really suspend? ")
+ (error "Suspend cancelled")))
+ (add-hook 'suspend-resume-hook
+ (function (lambda () (message "Resumed!"))))
+ => (lambda nil (message "Resumed!"))
+ (suspend-emacs "pwd")
+ => nil
+ ---------- Buffer: Minibuffer ----------
+ Really suspend? y
+ ---------- Buffer: Minibuffer ----------
+
+ ---------- Parent Shell ----------
+ lewis@slug[23] % /user/lewis/manual
+ lewis@slug[24] % fg
+
+ ---------- Echo Area ----------
+ Resumed!
+
+ - Variable: suspend-hook
+ This variable is a normal hook run before suspending.
+
+ - Variable: suspend-resume-hook
+ This variable is a normal hook run after suspending.
+
+\1f
+File: lispref.info, Node: System Environment, Next: User Identification, Prev: Getting Out, Up: System Interface
+
+Operating System Environment
+============================
+
+ XEmacs provides access to variables in the operating system
+environment through various functions. These variables include the
+name of the system, the user's UID, and so on.
+
+ - Variable: system-type
+ The value of this variable is a symbol indicating the type of
+ operating system XEmacs is operating on. Here is a table of the
+ possible values:
+
+ `aix-v3'
+ AIX.
+
+ `berkeley-unix'
+ Berkeley BSD.
+
+ `dgux'
+ Data General DGUX operating system.
+
+ `gnu'
+ A GNU system using the GNU HURD and Mach.
+
+ `hpux'
+ Hewlett-Packard HPUX operating system.
+
+ `irix'
+ Silicon Graphics Irix system.
+
+ `linux'
+ A GNU system using the Linux kernel.
+
+ `ms-dos'
+ Microsoft MS-DOS "operating system."
+
+ `next-mach'
+ NeXT Mach-based system.
+
+ `rtu'
+ Masscomp RTU, UCB universe.
+
+ `unisoft-unix'
+ UniSoft UniPlus.
+
+ `usg-unix-v'
+ AT&T System V.
+
+ `vax-vms'
+ VAX VMS.
+
+ `windows-nt'
+ Microsoft windows NT.
+
+ `xenix'
+ SCO Xenix 386.
+
+ We do not wish to add new symbols to make finer distinctions
+ unless it is absolutely necessary! In fact, we hope to eliminate
+ some of these alternatives in the future. We recommend using
+ `system-configuration' to distinguish between different operating
+ systems.
+
+ - Variable: system-configuration
+ This variable holds the three-part configuration name for the
+ hardware/software configuration of your system, as a string. The
+ convenient way to test parts of this string is with `string-match'.
+
+ - Function: system-name
+ This function returns the name of the machine you are running on.
+ (system-name)
+ => "prep.ai.mit.edu"
+
+ The symbol `system-name' is a variable as well as a function. In
+fact, the function returns whatever value the variable `system-name'
+currently holds. Thus, you can set the variable `system-name' in case
+Emacs is confused about the name of your system. The variable is also
+useful for constructing frame titles (*note Frame Titles::).
+
+ - Variable: mail-host-address
+ If this variable is non-`nil', it is used instead of `system-name'
+ for purposes of generating email addresses. For example, it is
+ used when constructing the default value of `user-mail-address'.
+ *Note User Identification::. (Since this is done when XEmacs
+ starts up, the value actually used is the one saved when XEmacs
+ was dumped. *Note Building XEmacs::.)
+
+ - Function: getenv var
+ This function returns the value of the environment variable VAR,
+ as a string. Within XEmacs, the environment variable values are
+ kept in the Lisp variable `process-environment'.
+
+ (getenv "USER")
+ => "lewis"
+
+ lewis@slug[10] % printenv
+ PATH=.:/user/lewis/bin:/usr/bin:/usr/local/bin
+ USER=lewis
+ TERM=ibmapa16
+ SHELL=/bin/csh
+ HOME=/user/lewis
+
+ - Command: setenv variable value
+ This command sets the value of the environment variable named
+ VARIABLE to VALUE. Both arguments should be strings. This
+ function works by modifying `process-environment'; binding that
+ variable with `let' is also reasonable practice.
+
+ - Variable: process-environment
+ This variable is a list of strings, each describing one environment
+ variable. The functions `getenv' and `setenv' work by means of
+ this variable.
+
+ process-environment
+ => ("l=/usr/stanford/lib/gnuemacs/lisp"
+ "PATH=.:/user/lewis/bin:/usr/class:/nfsusr/local/bin"
+ "USER=lewis"
+ "TERM=ibmapa16"
+ "SHELL=/bin/csh"
+ "HOME=/user/lewis")
+
+ - Variable: path-separator
+ This variable holds a string which says which character separates
+ directories in a search path (as found in an environment
+ variable). Its value is `":"' for Unix and GNU systems, and `";"'
+ for MS-DOS and Windows NT.
+
+ - Variable: invocation-name
+ This variable holds the program name under which Emacs was
+ invoked. The value is a string, and does not include a directory
+ name.
+
+ - Variable: invocation-directory
+ This variable holds the directory from which the Emacs executable
+ was invoked, or perhaps `nil' if that directory cannot be
+ determined.
+
+ - Variable: installation-directory
+ If non-`nil', this is a directory within which to look for the
+ `lib-src' and `etc' subdirectories. This is non-`nil' when Emacs
+ can't find those directories in their standard installed
+ locations, but can find them in a directory related somehow to the
+ one containing the Emacs executable.
+
+ - Function: load-average &optional use-floats
+ This function returns a list of the current 1-minute, 5-minute and
+ 15-minute load averages. The values are integers that are 100
+ times the system load averages. (The load averages indicate the
+ number of processes trying to run.)
+
+ When USE-FLOATS is non-`nil', floats will be returned instead of
+ integers. These floats are not multiplied by 100.
+
+ (load-average)
+ => (169 158 164)
+ (load-average t)
+ => (1.69921875 1.58984375 1.640625)
+
+ lewis@rocky[5] % uptime
+ 8:06pm up 16 day(s), 21:57, 40 users,
+ load average: 1.68, 1.59, 1.64
+
+ If the 5-minute or 15-minute load averages are not available,
+ return a shortened list, containing only those averages which are
+ available.
+
+ On some systems, this function may require special privileges to
+ run, or it may be unimplemented for the particular system type.
+ In that case, the function will signal an error.
+
+ - Function: emacs-pid
+ This function returns the process ID of the Emacs process.
+
+ - Function: setprv privilege-name &optional setp getprv
+ This function sets or resets a VMS privilege. (It does not exist
+ on Unix.) The first arg is the privilege name, as a string. The
+ second argument, SETP, is `t' or `nil', indicating whether the
+ privilege is to be turned on or off. Its default is `nil'. The
+ function returns `t' if successful, `nil' otherwise.
+
+ If the third argument, GETPRV, is non-`nil', `setprv' does not
+ change the privilege, but returns `t' or `nil' indicating whether
+ the privilege is currently enabled.
+
+\1f
+File: lispref.info, Node: User Identification, Next: Time of Day, Prev: System Environment, Up: System Interface
+
+User Identification
+===================
+
+ - Variable: user-mail-address
+ This holds the nominal email address of the user who is using
+ Emacs. When Emacs starts up, it computes a default value that is
+ usually right, but users often set this themselves when the
+ default value is not right.
+
+ - Function: user-login-name &optional uid
+ If you don't specify UID, this function returns the name under
+ which the user is logged in. If the environment variable `LOGNAME'
+ is set, that value is used. Otherwise, if the environment variable
+ `USER' is set, that value is used. Otherwise, the value is based
+ on the effective UID, not the real UID.
+
+ If you specify UID, the value is the user name that corresponds to
+ UID (which should be an integer).
+
+ (user-login-name)
+ => "lewis"
+
+ - Function: user-real-login-name
+ This function returns the user name corresponding to Emacs's real
+ UID. This ignores the effective UID and ignores the environment
+ variables `LOGNAME' and `USER'.
+
+ - Variable: user-full-name
+ This variable holds the name of the user running this Emacs. It is
+ initialized at startup time from the value of `NAME' environment
+ variable. You can change the value of this variable to alter the
+ result of the `user-full-name' function.
+
+ - Function: user-full-name &optional user
+ This function returns the full name of USER. If USER is `nil', it
+ defaults to the user running this Emacs. In that case, the value
+ of `user-full-name' variable, if non-`nil', will be used.
+
+ If USER is specified explicitly, `user-full-name' variable is
+ ignored.
+
+ (user-full-name)
+ => "Hrvoje Niksic"
+ (setq user-full-name "Hrvoje \"Niksa\" Niksic")
+ (user-full-name)
+ => "Hrvoje \"Niksa\" Niksic"
+ (user-full-name "hniksic")
+ => "Hrvoje Niksic"
+
+ The symbols `user-login-name', `user-real-login-name' and
+`user-full-name' are variables as well as functions. The functions
+return the same values that the variables hold. These variables allow
+you to "fake out" Emacs by telling the functions what to return. The
+variables are also useful for constructing frame titles (*note Frame
+Titles::).
+
+ - Function: user-real-uid
+ This function returns the real UID of the user.
+
+ (user-real-uid)
+ => 19
+
+ - Function: user-uid
+ This function returns the effective UID of the user.
+
+ - Function: user-home-directory
+ This function returns the "`HOME'" directory of the user, and is
+ intended to replace occurrences of "`(getenv "HOME")'". Under
+ Unix systems, the following is done:
+
+ 1. Return the value of "`(getenv "HOME")'", if set.
+
+ 2. Return "/", as a fallback, but issue a warning. (Future
+ versions of XEmacs will also attempt to lookup the `HOME'
+ directory via `getpwent()', but this has not yet been
+ implemented.)
+
+ Under MS Windows, this is done:
+
+ 1. Return the value of "`(getenv "HOME")'", if set.
+
+ 2. If the environment variables `HOMEDRIVE' and `HOMEDIR' are
+ both set, return the concatenation (the following description
+ uses MS Windows environment variable substitution syntax):
+ `%HOMEDRIVE%%HOMEDIR%'.
+
+ 3. Return "C:\", as a fallback, but issue a warning.
+
+\1f
File: lispref.info, Node: Time of Day, Next: Time Conversion, Prev: User Identification, Up: System Interface
Time of Day
into others.
* Recording Input:: Saving histories of recent or all input events.
-\1f
-File: lispref.info, Node: Input Modes, Next: Translating Input, Up: Terminal Input
-
-Input Modes
------------
-
- - Function: set-input-mode interrupt flow meta quit-char
- This function sets the mode for reading keyboard input. If
- INTERRUPT is non-null, then XEmacs uses input interrupts. If it is
- `nil', then it uses CBREAK mode. When XEmacs communicates
- directly with X, it ignores this argument and uses interrupts if
- that is the way it knows how to communicate.
-
- If FLOW is non-`nil', then XEmacs uses XON/XOFF (`C-q', `C-s')
- flow control for output to the terminal. This has no effect except
- in CBREAK mode. *Note Flow Control::.
-
- The default setting is system dependent. Some systems always use
- CBREAK mode regardless of what is specified.
-
- The argument META controls support for input character codes above
- 127. If META is `t', XEmacs converts characters with the 8th bit
- set into Meta characters. If META is `nil', XEmacs disregards the
- 8th bit; this is necessary when the terminal uses it as a parity
- bit. If META is neither `t' nor `nil', XEmacs uses all 8 bits of
- input unchanged. This is good for terminals using European 8-bit
- character sets.
-
- If QUIT-CHAR is non-`nil', it specifies the character to use for
- quitting. Normally this character is `C-g'. *Note Quitting::.
-
- The `current-input-mode' function returns the input mode settings
-XEmacs is currently using.
-
- - Function: current-input-mode
- This function returns current mode for reading keyboard input. It
- returns a list, corresponding to the arguments of `set-input-mode',
- of the form `(INTERRUPT FLOW META QUIT)' in which:
- INTERRUPT
- is non-`nil' when XEmacs is using interrupt-driven input. If
- `nil', Emacs is using CBREAK mode.
-
- FLOW
- is non-`nil' if XEmacs uses XON/XOFF (`C-q', `C-s') flow
- control for output to the terminal. This value has no effect
- unless INTERRUPT is non-`nil'.
-
- META
- is `t' if XEmacs treats the eighth bit of input characters as
- the meta bit; `nil' means XEmacs clears the eighth bit of
- every input character; any other value means XEmacs uses all
- eight bits as the basic character code.
-
- QUIT
- is the character XEmacs currently uses for quitting, usually
- `C-g'.
-
-\1f
-File: lispref.info, Node: Translating Input, Next: Recording Input, Prev: Input Modes, Up: Terminal Input
-
-Translating Input Events
-------------------------
-
- This section describes features for translating input events into
-other input events before they become part of key sequences.
-
- - Variable: function-key-map
- This variable holds a keymap that describes the character sequences
- sent by function keys on an ordinary character terminal. This
- keymap uses the same data structure as other keymaps, but is used
- differently: it specifies translations to make while reading
- events.
-
- If `function-key-map' "binds" a key sequence K to a vector V, then
- when K appears as a subsequence _anywhere_ in a key sequence, it
- is replaced with the events in V.
-
- For example, VT100 terminals send `<ESC> O P' when the keypad PF1
- key is pressed. Therefore, we want XEmacs to translate that
- sequence of events into the single event `pf1'. We accomplish
- this by "binding" `<ESC> O P' to `[pf1]' in `function-key-map',
- when using a VT100.
-
- Thus, typing `C-c <PF1>' sends the character sequence `C-c <ESC> O
- P'; later the function `read-key-sequence' translates this back
- into `C-c <PF1>', which it returns as the vector `[?\C-c pf1]'.
-
- Entries in `function-key-map' are ignored if they conflict with
- bindings made in the minor mode, local, or global keymaps. The
- intent is that the character sequences that function keys send
- should not have command bindings in their own right.
-
- The value of `function-key-map' is usually set up automatically
- according to the terminal's Terminfo or Termcap entry, but
- sometimes those need help from terminal-specific Lisp files.
- XEmacs comes with terminal-specific files for many common
- terminals; their main purpose is to make entries in
- `function-key-map' beyond those that can be deduced from Termcap
- and Terminfo. *Note Terminal-Specific::.
-
- Emacs versions 18 and earlier used totally different means of
- detecting the character sequences that represent function keys.
-
- - Variable: key-translation-map
- This variable is another keymap used just like `function-key-map'
- to translate input events into other events. It differs from
- `function-key-map' in two ways:
-
- * `key-translation-map' goes to work after `function-key-map' is
- finished; it receives the results of translation by
- `function-key-map'.
-
- * `key-translation-map' overrides actual key bindings.
-
- The intent of `key-translation-map' is for users to map one
- character set to another, including ordinary characters normally
- bound to `self-insert-command'.
-
- You can use `function-key-map' or `key-translation-map' for more
-than simple aliases, by using a function, instead of a key sequence, as
-the "translation" of a key. Then this function is called to compute
-the translation of that key.
-
- The key translation function receives one argument, which is the
-prompt that was specified in `read-key-sequence'--or `nil' if the key
-sequence is being read by the editor command loop. In most cases you
-can ignore the prompt value.
-
- If the function reads input itself, it can have the effect of
-altering the event that follows. For example, here's how to define
-`C-c h' to turn the character that follows into a Hyper character:
-
- (defun hyperify (prompt)
- (let ((e (read-event)))
- (vector (if (numberp e)
- (logior (lsh 1 20) e)
- (if (memq 'hyper (event-modifiers e))
- e
- (add-event-modifier "H-" e))))))
-
- (defun add-event-modifier (string e)
- (let ((symbol (if (symbolp e) e (car e))))
- (setq symbol (intern (concat string
- (symbol-name symbol))))
- (if (symbolp e)
- symbol
- (cons symbol (cdr e)))))
-
- (define-key function-key-map "\C-ch" 'hyperify)
-
- The `iso-transl' library uses this feature to provide a way of
-inputting non-ASCII Latin-1 characters.
-
-\1f
-File: lispref.info, Node: Recording Input, Prev: Translating Input, Up: Terminal Input
-
-Recording Input
----------------
-
- - Function: recent-keys &optional number
- This function returns a vector containing recent input events from
- the keyboard or mouse. By default, 100 events are recorded, which
- is how many `recent-keys' returns.
-
- All input events are included, whether or not they were used as
- parts of key sequences. Thus, you always get the last 100 inputs,
- not counting keyboard macros. (Events from keyboard macros are
- excluded because they are less interesting for debugging; it
- should be enough to see the events that invoked the macros.)
-
- If NUMBER is specified, not more than NUMBER events will be
- returned. You may change the number of stored events using
- `set-recent-keys-ring-size'.
-
- - Function: recent-keys-ring-size
- This function returns the number of recent events stored
- internally. This is also the maximum number of events
- `recent-keys' can return. By default, 100 events are stored.
-
- - Function: set-recent-keys-ring-size size
- This function changes the number of events stored by XEmacs and
- returned by `recent-keys'.
-
- For example, `(set-recent-keys-ring-size 250)' will make XEmacs
- remember last 250 events and will make `recent-keys' return last
- 250 events by default.
-
- - Command: open-dribble-file filename
- This function opens a "dribble file" named FILENAME. When a
- dribble file is open, each input event from the keyboard or mouse
- (but not those from keyboard macros) is written in that file. A
- non-character event is expressed using its printed representation
- surrounded by `<...>'.
-
- You close the dribble file by calling this function with an
- argument of `nil'.
-
- This function is normally used to record the input necessary to
- trigger an XEmacs bug, for the sake of a bug report.
-
- (open-dribble-file "~/dribble")
- => nil
-
- See also the `open-termscript' function (*note Terminal Output::).
-
-\1f
-File: lispref.info, Node: Terminal Output, Next: Flow Control, Prev: Terminal Input, Up: System Interface
-
-Terminal Output
-===============
-
- The terminal output functions send output to the terminal or keep
-track of output sent to the terminal. The function `device-baud-rate'
-tells you what XEmacs thinks is the output speed of the terminal.
-
- - Function: device-baud-rate &optional device
- This function's value is the output speed of the terminal
- associated with DEVICE, as far as XEmacs knows. DEVICE defaults
- to the selected device (usually the only device) if omitted.
- Changing this value does not change the speed of actual data
- transmission, but the value is used for calculations such as
- padding. This value has no effect for window-system devices.
- (This is different in FSF Emacs, where the baud rate also affects
- decisions about whether to scroll part of the screen or repaint,
- even when using a window system.)
-
- The value is measured in bits per second.
-
- XEmacs attempts to automatically initialize the baud rate by querying
-the terminal. If you are running across a network, however, and
-different parts of the network work are at different baud rates, the
-value returned by XEmacs may be different from the value used by your
-local terminal. Some network protocols communicate the local terminal
-speed to the remote machine, so that XEmacs and other programs can get
-the proper value, but others do not. If XEmacs has the wrong value, it
-makes decisions that are less than optimal. To fix the problem, use
-`set-device-baud-rate'.
-
- - Function: set-device-baud-rate &optional device
- This function sets the output speed of DEVICE. See
- `device-baud-rate'. DEVICE defaults to the selected device
- (usually the only device) if omitted.
-
- - Function: send-string-to-terminal char-or-string &optional stdout-p
- device
- This function sends CHAR-OR-STRING to the terminal without
- alteration. Control characters in CHAR-OR-STRING have
- terminal-dependent effects.
-
- If DEVICE is `nil', this function writes to XEmacs's stderr, or to
- stdout if STDOUT-P is non-`nil'. Otherwise, DEVICE should be a
- tty or stream device, and the function writes to the device's
- normal or error output, according to STDOUT-P.
-
- One use of this function is to define function keys on terminals
- that have downloadable function key definitions. For example,
- this is how on certain terminals to define function key 4 to move
- forward four characters (by transmitting the characters `C-u C-f'
- to the computer):
-
- (send-string-to-terminal "\eF4\^U\^F")
- => nil
-
- - Command: open-termscript filename
- This function is used to open a "termscript file" that will record
- all the characters sent by XEmacs to the terminal. (If there are
- multiple tty or stream devices, all characters sent to all such
- devices are recorded.) The function returns `nil'. Termscript
- files are useful for investigating problems where XEmacs garbles
- the screen, problems that are due to incorrect Termcap entries or
- to undesirable settings of terminal options more often than to
- actual XEmacs bugs. Once you are certain which characters were
- actually output, you can determine reliably whether they
- correspond to the Termcap specifications in use.
-
- A `nil' value for FILENAME stops recording terminal output.
-
- See also `open-dribble-file' in *Note Terminal Input::.
-
- (open-termscript "../junk/termscript")
- => nil
-
-\1f
-File: lispref.info, Node: Flow Control, Next: Batch Mode, Prev: Terminal Output, Up: System Interface
-
-Flow Control
-============
-
- This section attempts to answer the question "Why does XEmacs choose
-to use flow-control characters in its command character set?" For a
-second view on this issue, read the comments on flow control in the
-`emacs/INSTALL' file from the distribution; for help with Termcap
-entries and DEC terminal concentrators, see `emacs/etc/TERMS'.
-
- At one time, most terminals did not need flow control, and none used
-`C-s' and `C-q' for flow control. Therefore, the choice of `C-s' and
-`C-q' as command characters was uncontroversial. XEmacs, for economy
-of keystrokes and portability, used nearly all the ASCII control
-characters, with mnemonic meanings when possible; thus, `C-s' for
-search and `C-q' for quote.
-
- Later, some terminals were introduced which required these characters
-for flow control. They were not very good terminals for full-screen
-editing, so XEmacs maintainers did not pay attention. In later years,
-flow control with `C-s' and `C-q' became widespread among terminals,
-but by this time it was usually an option. And the majority of users,
-who can turn flow control off, were unwilling to switch to less
-mnemonic key bindings for the sake of flow control.
-
- So which usage is "right", XEmacs's or that of some terminal and
-concentrator manufacturers? This question has no simple answer.
-
- One reason why we are reluctant to cater to the problems caused by
-`C-s' and `C-q' is that they are gratuitous. There are other
-techniques (albeit less common in practice) for flow control that
-preserve transparency of the character stream. Note also that their use
-for flow control is not an official standard. Interestingly, on the
-model 33 teletype with a paper tape punch (which is very old), `C-s'
-and `C-q' were sent by the computer to turn the punch on and off!
-
- As X servers and other window systems replace character-only
-terminals, this problem is gradually being cured. For the mean time,
-XEmacs provides a convenient way of enabling flow control if you want
-it: call the function `enable-flow-control'.
-
- - Function: enable-flow-control
- This function enables use of `C-s' and `C-q' for output flow
- control, and provides the characters `C-\' and `C-^' as aliases
- for them using `keyboard-translate-table' (*note Translating
- Input::).
-
- You can use the function `enable-flow-control-on' in your `.emacs'
-file to enable flow control automatically on certain terminal types.
-
- - Function: enable-flow-control-on &rest termtypes
- This function enables flow control, and the aliases `C-\' and
- `C-^', if the terminal type is one of TERMTYPES. For example:
-
- (enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
-
- Here is how `enable-flow-control' does its job:
-
- 1. It sets CBREAK mode for terminal input, and tells the operating
- system to handle flow control, with `(set-input-mode nil t)'.
-
- 2. It sets up `keyboard-translate-table' to translate `C-\' and `C-^'
- into `C-s' and `C-q'. Except at its very lowest level, XEmacs
- never knows that the characters typed were anything but `C-s' and
- `C-q', so you can in effect type them as `C-\' and `C-^' even when
- they are input for other commands. *Note Translating Input::.
-
- If the terminal is the source of the flow control characters, then
-once you enable kernel flow control handling, you probably can make do
-with less padding than normal for that terminal. You can reduce the
-amount of padding by customizing the Termcap entry. You can also
-reduce it by setting `baud-rate' to a smaller value so that XEmacs uses
-a smaller speed when calculating the padding needed. *Note Terminal
-Output::.
-
-\1f
-File: lispref.info, Node: Batch Mode, Prev: Flow Control, Up: System Interface
-
-Batch Mode
-==========
-
- The command line option `-batch' causes XEmacs to run
-noninteractively. In this mode, XEmacs does not read commands from the
-terminal, it does not alter the terminal modes, and it does not expect
-to be outputting to an erasable screen. The idea is that you specify
-Lisp programs to run; when they are finished, XEmacs should exit. The
-way to specify the programs to run is with `-l FILE', which loads the
-library named FILE, and `-f FUNCTION', which calls FUNCTION with no
-arguments.
-
- Any Lisp program output that would normally go to the echo area,
-either using `message' or using `prin1', etc., with `t' as the stream,
-goes instead to XEmacs's standard error descriptor when in batch mode.
-Thus, XEmacs behaves much like a noninteractive application program.
-(The echo area output that XEmacs itself normally generates, such as
-command echoing, is suppressed entirely.)
-
- - Function: noninteractive
- This function returns non-`nil' when XEmacs is running in batch
- mode.
-
- - Variable: noninteractive
- This variable is non-`nil' when XEmacs is running in batch mode.
- Setting this variable to `nil', however, will not change whether
- XEmacs is running in batch mode, and will not change the return
- value of the `noninteractive' function.
-
-\1f
-File: lispref.info, Node: X-Windows, Next: ToolTalk Support, Prev: System Interface, Up: Top
-
-Functions Specific to the X Window System
-*****************************************
-
- XEmacs provides the concept of "devices", which generalizes
-connections to an X server, a TTY device, etc. Most information about
-an X server that XEmacs is connected to can be determined through
-general console and device functions. *Note Consoles and Devices::.
-However, there are some features of the X Window System that do not
-generalize well, and they are covered specially here.
-
-* Menu:
-
-* X Selections:: Transferring text to and from other X clients.
-* X Server:: Information about the X server connected to
- a particular device.
-* X Miscellaneous:: Other X-specific functions and variables.
-
-\1f
-File: lispref.info, Node: X Selections, Next: X Server, Up: X-Windows
-
-X Selections
-============
-
- The X server records a set of "selections" which permit transfer of
-data between application programs. The various selections are
-distinguished by "selection types", represented in XEmacs by symbols.
-X clients including XEmacs can read or set the selection for any given
-type.
-
- - Function: x-own-selection data &optional type
- This function sets a "selection" in the X server. It takes two
- arguments: a value, DATA, and the selection type TYPE to assign it
- to. DATA may be a string, a cons of two markers, or an extent.
- In the latter cases, the selection is considered to be the text
- between the markers, or between the extent's endpoints.
-
- Each possible TYPE has its own selection value, which changes
- independently. The usual values of TYPE are `PRIMARY' and
- `SECONDARY'; these are symbols with upper-case names, in accord
- with X Windows conventions. The default is `PRIMARY'.
-
- (In FSF Emacs, this function is called `x-set-selection' and takes
- different arguments.)
-
- - Function: x-get-selection
- This function accesses selections set up by XEmacs or by other X
- clients. It returns the value of the current primary selection.
-
- - Function: x-disown-selection &optional secondary-p
- Assuming we own the selection, this function disowns it. If
- SECONDARY-P is non-`nil', the secondary selection instead of the
- primary selection is discarded.
-
- The X server also has a set of numbered "cut buffers" which can
-store text or other data being moved between applications. Cut buffers
-are considered obsolete, but XEmacs supports them for the sake of X
-clients that still use them.
-
- - Function: x-get-cutbuffer &optional n
- This function returns the contents of cut buffer number N. (This
- function is called `x-get-cut-buffer' in FSF Emacs.)
-
- - Function: x-store-cutbuffer string
- This function stores STRING into the first cut buffer (cut buffer
- 0), moving the other values down through the series of cut buffers,
- kill-ring-style. (This function is called `x-set-cut-buffer' in FSF
- Emacs.)
-
-\1f
-File: lispref.info, Node: X Server, Next: X Miscellaneous, Prev: X Selections, Up: X-Windows
-
-X Server
-========
-
- This section describes how to access and change the overall status of
-the X server XEmacs is using.
-
-* Menu:
-
-* Resources:: Getting resource values from the server.
-* Server Data:: Getting info about the X server.
-* Grabs:: Restricting access to the server by other apps.
-
-\1f
-File: lispref.info, Node: Resources, Next: Server Data, Up: X Server
-
-Resources
----------
-
- - Function: default-x-device
- This function return the default X device for resourcing. This is
- the first-created X device that still exists.
-
- - Function: x-get-resource name class type &optional locale device
- noerror
- This function retrieves a resource value from the X resource
- manager.
-
- * The first arg is the name of the resource to retrieve, such as
- `"font"'.
-
- * The second arg is the class of the resource to retrieve, like
- `"Font"'.
-
- * The third arg should be one of the symbols `string',
- `integer', `natnum', or `boolean', specifying the type of
- object that the database is searched for.
-
- * The fourth arg is the locale to search for the resources on,
- and can currently be a a buffer, a frame, a device, or the
- symbol `global'. If omitted, it defaults to `global'.
-
- * The fifth arg is the device to search for the resources on.
- (The resource database for a particular device is constructed
- by combining non-device- specific resources such any
- command-line resources specified and any app-defaults files
- found [or the fallback resources supplied by XEmacs, if no
- app-defaults file is found] with device-specific resources
- such as those supplied using `xrdb'.) If omitted, it defaults
- to the device of LOCALE, if a device can be derived (i.e. if
- LOCALE is a frame or device), and otherwise defaults to the
- value of `default-x-device'.
-
- * The sixth arg NOERROR, if non-`nil', means do not signal an
- error if a bogus resource specification was retrieved (e.g.
- if a non-integer was given when an integer was requested).
- In this case, a warning is issued instead.
-
- The resource names passed to this function are looked up relative
- to the locale.
-
- If you want to search for a subresource, you just need to specify
- the resource levels in NAME and CLASS. For example, NAME could be
- `"modeline.attributeFont"', and CLASS `"Face.AttributeFont"'.
-
- Specifically,
-
- 1. If LOCALE is a buffer, a call
-
- `(x-get-resource "foreground" "Foreground" 'string SOME-BUFFER)'
-
- is an interface to a C call something like
-
- `XrmGetResource (db, "xemacs.buffer.BUFFER-NAME.foreground",
- "Emacs.EmacsLocaleType.EmacsBuffer.Foreground",
- "String");'
-
- 2. If LOCALE is a frame, a call
-
- `(x-get-resource "foreground" "Foreground" 'string SOME-FRAME)'
-
- is an interface to a C call something like
-
- `XrmGetResource (db, "xemacs.frame.FRAME-NAME.foreground",
- "Emacs.EmacsLocaleType.EmacsFrame.Foreground",
- "String");'
-
- 3. If LOCALE is a device, a call
-
- `(x-get-resource "foreground" "Foreground" 'string SOME-DEVICE)'
-
- is an interface to a C call something like
-
- `XrmGetResource (db, "xemacs.device.DEVICE-NAME.foreground",
- "Emacs.EmacsLocaleType.EmacsDevice.Foreground",
- "String");'
-
- 4. If LOCALE is the symbol `global', a call
-
- `(x-get-resource "foreground" "Foreground" 'string 'global)'
-
- is an interface to a C call something like
-
- `XrmGetResource (db, "xemacs.foreground",
- "Emacs.Foreground",
- "String");'
-
- Note that for `global', no prefix is added other than that of the
- application itself; thus, you can use this locale to retrieve
- arbitrary application resources, if you really want to.
-
- The returned value of this function is `nil' if the queried
- resource is not found. If TYPE is `string', a string is returned,
- and if it is `integer', an integer is returned. If TYPE is
- `boolean', then the returned value is the list `(t)' for true,
- `(nil)' for false, and is `nil' to mean "unspecified".
-
- - Function: x-put-resource resource-line &optional device
- This function adds a resource to the resource database for DEVICE.
- RESOURCE-LINE specifies the resource to add and should be a
- standard resource specification.
-
- - Variable: x-emacs-application-class
- This variable holds The X application class of the XEmacs process.
- This controls, among other things, the name of the "app-defaults"
- file that XEmacs will use. For changes to this variable to take
- effect, they must be made before the connection to the X server is
- initialized, that is, this variable may only be changed before
- XEmacs is dumped, or by setting it in the file
- `lisp/term/x-win.el'.
-
- By default, this variable is nil at startup. When the connection
- to the X server is first initialized, the X resource database will
- be consulted and the value will be set according to whether any
- resources are found for the application class "XEmacs".
-
-\1f
-File: lispref.info, Node: Server Data, Next: Grabs, Prev: Resources, Up: X Server
-
-Data about the X Server
------------------------
-
- This section describes functions and a variable that you can use to
-get information about the capabilities and origin of the X server
-corresponding to a particular device. The device argument is generally
-optional and defaults to the selected device.
-
- - Function: x-server-version &optional device
- This function returns the list of version numbers of the X server
- DEVICE is on. The returned value is a list of three integers: the
- major and minor version numbers of the X protocol in use, and the
- vendor-specific release number.
-
- - Function: x-server-vendor &optional device
- This function returns the vendor supporting the X server DEVICE is
- on.
-
- - Function: x-display-visual-class &optional device
- This function returns the visual class of the display DEVICE is
- on. The value is one of the symbols `static-gray', `gray-scale',
- `static-color', `pseudo-color', `true-color', and `direct-color'.
- (Note that this is different from previous versions of XEmacs,
- which returned `StaticGray', `GrayScale', etc.)
-
-\1f
-File: lispref.info, Node: Grabs, Prev: Server Data, Up: X Server
-
-Restricting Access to the Server by Other Apps
-----------------------------------------------
-
- - Function: x-grab-keyboard &optional device
- This function grabs the keyboard on the given device (defaulting
- to the selected one). So long as the keyboard is grabbed, all
- keyboard events will be delivered to XEmacs--it is not possible
- for other X clients to eavesdrop on them. Ungrab the keyboard
- with `x-ungrab-keyboard' (use an `unwind-protect'). Returns `t'
- if the grab was successful; `nil' otherwise.
-
- - Function: x-ungrab-keyboard &optional device
- This function releases a keyboard grab made with `x-grab-keyboard'.
-
- - Function: x-grab-pointer &optional device cursor ignore-keyboard
- This function grabs the pointer and restricts it to its current
- window. If optional DEVICE argument is `nil', the selected device
- will be used. If optional CURSOR argument is non-`nil', change
- the pointer shape to that until `x-ungrab-pointer' is called (it
- should be an object returned by the `make-cursor' function). If
- the second optional argument IGNORE-KEYBOARD is non-`nil', ignore
- all keyboard events during the grab. Returns `t' if the grab is
- successful, `nil' otherwise.
-
- - Function: x-ungrab-pointer &optional device
- This function releases a pointer grab made with `x-grab-pointer'.
- If optional first arg DEVICE is `nil' the selected device is used.
- If it is `t' the pointer will be released on all X devices.
-
-\1f
-File: lispref.info, Node: X Miscellaneous, Prev: X Server, Up: X-Windows
-
-Miscellaneous X Functions and Variables
-=======================================
-
- - Variable: x-bitmap-file-path
- This variable holds a list of the directories in which X bitmap
- files may be found. If `nil', this is initialized from the
- `"*bitmapFilePath"' resource. This is used by the
- `make-image-instance' function (however, note that if the
- environment variable `XBMLANGPATH' is set, it is consulted first).
-
- - Variable: x-library-search-path
- This variable holds the search path used by `read-color' to find
- `rgb.txt'.
-
- - Function: x-valid-keysym-name-p keysym
- This function returns true if KEYSYM names a keysym that the X
- library knows about. Valid keysyms are listed in the files
- `/usr/include/X11/keysymdef.h' and in `/usr/lib/X11/XKeysymDB', or
- whatever the equivalents are on your system.
-
- - Function: x-window-id &optional frame
- This function returns the ID of the X11 window. This gives us a
- chance to manipulate the Emacs window from within a different
- program. Since the ID is an unsigned long, we return it as a
- string.
-
- - Variable: x-allow-sendevents
- If non-`nil', synthetic events are allowed. `nil' means they are
- ignored. Beware: allowing XEmacs to process SendEvents opens a
- big security hole.
-
- - Function: x-debug-mode arg &optional device
- With a true arg, make the connection to the X server synchronous.
- With false, make it asynchronous. Synchronous connections are
- much slower, but are useful for debugging. (If you get X errors,
- make the connection synchronous, and use a debugger to set a
- breakpoint on `x_error_handler'. Your backtrace of the C stack
- will now be useful. In asynchronous mode, the stack above
- `x_error_handler' isn't helpful because of buffering.) If DEVICE
- is not specified, the selected device is assumed.
-
- Calling this function is the same as calling the C function
- `XSynchronize', or starting the program with the `-sync' command
- line argument.
-
- - Variable: x-debug-events
- If non-zero, debug information about events that XEmacs sees is
- displayed. Information is displayed on stderr. Currently defined
- values are:
-
- * 1 == non-verbose output
-
- * 2 == verbose output
-
-\1f
-File: lispref.info, Node: ToolTalk Support, Next: LDAP Support, Prev: X-Windows, Up: Top
-
-ToolTalk Support
-****************
-
-* Menu:
-
-* XEmacs ToolTalk API Summary::
-* Sending Messages::
-* Receiving Messages::
-
-\1f
-File: lispref.info, Node: XEmacs ToolTalk API Summary, Next: Sending Messages, Up: ToolTalk Support
-
-XEmacs ToolTalk API Summary
-===========================
-
- The XEmacs Lisp interface to ToolTalk is similar, at least in spirit,
-to the standard C ToolTalk API. Only the message and pattern parts of
-the API are supported at present; more of the API could be added if
-needed. The Lisp interface departs from the C API in a few ways:
-
- * ToolTalk is initialized automatically at XEmacs startup-time.
- Messages can only be sent other ToolTalk applications connected to
- the same X11 server that XEmacs is running on.
-
- * There are fewer entry points; polymorphic functions with keyword
- arguments are used instead.
-
- * The callback interface is simpler and marginally less functional.
- A single callback may be associated with a message or a pattern;
- the callback is specified with a Lisp symbol (the symbol should
- have a function binding).
-
- * The session attribute for messages and patterns is always
- initialized to the default session.
-
- * Anywhere a ToolTalk enum constant, e.g. `TT_SESSION', is valid, one
- can substitute the corresponding symbol, e.g. `'TT_SESSION'. This
- simplifies building lists that represent messages and patterns.
-
-\1f
-File: lispref.info, Node: Sending Messages, Next: Receiving Messages, Prev: XEmacs ToolTalk API Summary, Up: ToolTalk Support
-
-Sending Messages
-================
-
-* Menu:
-
-* Example of Sending Messages::
-* Elisp Interface for Sending Messages::
-
-\1f
-File: lispref.info, Node: Example of Sending Messages, Next: Elisp Interface for Sending Messages, Up: Sending Messages
-
-Example of Sending Messages
----------------------------
-
- Here's a simple example that sends a query to another application
-and then displays its reply. Both the query and the reply are stored
-in the first argument of the message.
-
- (defun tooltalk-random-query-handler (msg)
- (let ((state (get-tooltalk-message-attribute msg 'state)))
- (cond
- ((eq state 'TT_HANDLED)
- (message (get-tooltalk-message-attribute msg arg_val 0)))
- ((memq state '(TT_FAILED TT_REJECTED))
- (message "Random query turns up nothing")))))
-
- (defvar random-query-message
- '( class TT_REQUEST
- scope TT_SESSION
- address TT_PROCEDURE
- op "random-query"
- args '((TT_INOUT "?" "string"))
- callback tooltalk-random-query-handler))
-
- (let ((m (make-tooltalk-message random-query-message)))
- (send-tooltalk-message m))
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Input Modes, Next: Translating Input, Up: Terminal Input
+
+Input Modes
+-----------
+
+ - Function: set-input-mode interrupt flow meta quit-char
+ This function sets the mode for reading keyboard input. If
+ INTERRUPT is non-null, then XEmacs uses input interrupts. If it is
+ `nil', then it uses CBREAK mode. When XEmacs communicates
+ directly with X, it ignores this argument and uses interrupts if
+ that is the way it knows how to communicate.
+
+ If FLOW is non-`nil', then XEmacs uses XON/XOFF (`C-q', `C-s')
+ flow control for output to the terminal. This has no effect except
+ in CBREAK mode. *Note Flow Control::.
+
+ The default setting is system dependent. Some systems always use
+ CBREAK mode regardless of what is specified.
+
+ The argument META controls support for input character codes above
+ 127. If META is `t', XEmacs converts characters with the 8th bit
+ set into Meta characters. If META is `nil', XEmacs disregards the
+ 8th bit; this is necessary when the terminal uses it as a parity
+ bit. If META is neither `t' nor `nil', XEmacs uses all 8 bits of
+ input unchanged. This is good for terminals using European 8-bit
+ character sets.
+
+ If QUIT-CHAR is non-`nil', it specifies the character to use for
+ quitting. Normally this character is `C-g'. *Note Quitting::.
+
+ The `current-input-mode' function returns the input mode settings
+XEmacs is currently using.
+
+ - Function: current-input-mode
+ This function returns current mode for reading keyboard input. It
+ returns a list, corresponding to the arguments of `set-input-mode',
+ of the form `(INTERRUPT FLOW META QUIT)' in which:
+ INTERRUPT
+ is non-`nil' when XEmacs is using interrupt-driven input. If
+ `nil', Emacs is using CBREAK mode.
+
+ FLOW
+ is non-`nil' if XEmacs uses XON/XOFF (`C-q', `C-s') flow
+ control for output to the terminal. This value has no effect
+ unless INTERRUPT is non-`nil'.
+
+ META
+ is `t' if XEmacs treats the eighth bit of input characters as
+ the meta bit; `nil' means XEmacs clears the eighth bit of
+ every input character; any other value means XEmacs uses all
+ eight bits as the basic character code.
+
+ QUIT
+ is the character XEmacs currently uses for quitting, usually
+ `C-g'.
+
+\1f
+File: lispref.info, Node: Translating Input, Next: Recording Input, Prev: Input Modes, Up: Terminal Input
+
+Translating Input Events
+------------------------
+
+ This section describes features for translating input events into
+other input events before they become part of key sequences.
+
+ - Variable: function-key-map
+ This variable holds a keymap that describes the character sequences
+ sent by function keys on an ordinary character terminal. This
+ keymap uses the same data structure as other keymaps, but is used
+ differently: it specifies translations to make while reading
+ events.
+
+ If `function-key-map' "binds" a key sequence K to a vector V, then
+ when K appears as a subsequence _anywhere_ in a key sequence, it
+ is replaced with the events in V.
+
+ For example, VT100 terminals send `<ESC> O P' when the keypad PF1
+ key is pressed. Therefore, we want XEmacs to translate that
+ sequence of events into the single event `pf1'. We accomplish
+ this by "binding" `<ESC> O P' to `[pf1]' in `function-key-map',
+ when using a VT100.
+
+ Thus, typing `C-c <PF1>' sends the character sequence `C-c <ESC> O
+ P'; later the function `read-key-sequence' translates this back
+ into `C-c <PF1>', which it returns as the vector `[?\C-c pf1]'.
+
+ Entries in `function-key-map' are ignored if they conflict with
+ bindings made in the minor mode, local, or global keymaps. The
+ intent is that the character sequences that function keys send
+ should not have command bindings in their own right.
+
+ The value of `function-key-map' is usually set up automatically
+ according to the terminal's Terminfo or Termcap entry, but
+ sometimes those need help from terminal-specific Lisp files.
+ XEmacs comes with terminal-specific files for many common
+ terminals; their main purpose is to make entries in
+ `function-key-map' beyond those that can be deduced from Termcap
+ and Terminfo. *Note Terminal-Specific::.
+
+ Emacs versions 18 and earlier used totally different means of
+ detecting the character sequences that represent function keys.
+
+ - Variable: key-translation-map
+ This variable is another keymap used just like `function-key-map'
+ to translate input events into other events. It differs from
+ `function-key-map' in two ways:
+
+ * `key-translation-map' goes to work after `function-key-map' is
+ finished; it receives the results of translation by
+ `function-key-map'.
+
+ * `key-translation-map' overrides actual key bindings.
+
+ The intent of `key-translation-map' is for users to map one
+ character set to another, including ordinary characters normally
+ bound to `self-insert-command'.
+
+ You can use `function-key-map' or `key-translation-map' for more
+than simple aliases, by using a function, instead of a key sequence, as
+the "translation" of a key. Then this function is called to compute
+the translation of that key.
+
+ The key translation function receives one argument, which is the
+prompt that was specified in `read-key-sequence'--or `nil' if the key
+sequence is being read by the editor command loop. In most cases you
+can ignore the prompt value.
+
+ If the function reads input itself, it can have the effect of
+altering the event that follows. For example, here's how to define
+`C-c h' to turn the character that follows into a Hyper character:
+
+ (defun hyperify (prompt)
+ (let ((e (read-event)))
+ (vector (if (numberp e)
+ (logior (lsh 1 20) e)
+ (if (memq 'hyper (event-modifiers e))
+ e
+ (add-event-modifier "H-" e))))))
+
+ (defun add-event-modifier (string e)
+ (let ((symbol (if (symbolp e) e (car e))))
+ (setq symbol (intern (concat string
+ (symbol-name symbol))))
+ (if (symbolp e)
+ symbol
+ (cons symbol (cdr e)))))
+
+ (define-key function-key-map "\C-ch" 'hyperify)
+
+ The `iso-transl' library uses this feature to provide a way of
+inputting non-ASCII Latin-1 characters.
+
+\1f
+File: lispref.info, Node: Recording Input, Prev: Translating Input, Up: Terminal Input
+
+Recording Input
+---------------
+
+ - Function: recent-keys &optional number
+ This function returns a vector containing recent input events from
+ the keyboard or mouse. By default, 100 events are recorded, which
+ is how many `recent-keys' returns.
+
+ All input events are included, whether or not they were used as
+ parts of key sequences. Thus, you always get the last 100 inputs,
+ not counting keyboard macros. (Events from keyboard macros are
+ excluded because they are less interesting for debugging; it
+ should be enough to see the events that invoked the macros.)
+
+ If NUMBER is specified, not more than NUMBER events will be
+ returned. You may change the number of stored events using
+ `set-recent-keys-ring-size'.
+
+ - Function: recent-keys-ring-size
+ This function returns the number of recent events stored
+ internally. This is also the maximum number of events
+ `recent-keys' can return. By default, 100 events are stored.
+
+ - Function: set-recent-keys-ring-size size
+ This function changes the number of events stored by XEmacs and
+ returned by `recent-keys'.
+
+ For example, `(set-recent-keys-ring-size 250)' will make XEmacs
+ remember last 250 events and will make `recent-keys' return last
+ 250 events by default.
+
+ - Command: open-dribble-file filename
+ This function opens a "dribble file" named FILENAME. When a
+ dribble file is open, each input event from the keyboard or mouse
+ (but not those from keyboard macros) is written in that file. A
+ non-character event is expressed using its printed representation
+ surrounded by `<...>'.
+
+ You close the dribble file by calling this function with an
+ argument of `nil'.
+
+ This function is normally used to record the input necessary to
+ trigger an XEmacs bug, for the sake of a bug report.
+
+ (open-dribble-file "~/dribble")
+ => nil
+
+ See also the `open-termscript' function (*note Terminal Output::).
+
+\1f
+File: lispref.info, Node: Terminal Output, Next: Flow Control, Prev: Terminal Input, Up: System Interface
+
+Terminal Output
+===============
+
+ The terminal output functions send output to the terminal or keep
+track of output sent to the terminal. The function `device-baud-rate'
+tells you what XEmacs thinks is the output speed of the terminal.
+
+ - Function: device-baud-rate &optional device
+ This function's value is the output speed of the terminal
+ associated with DEVICE, as far as XEmacs knows. DEVICE defaults
+ to the selected device (usually the only device) if omitted.
+ Changing this value does not change the speed of actual data
+ transmission, but the value is used for calculations such as
+ padding. This value has no effect for window-system devices.
+ (This is different in FSF Emacs, where the baud rate also affects
+ decisions about whether to scroll part of the screen or repaint,
+ even when using a window system.)
+
+ The value is measured in bits per second.
+
+ XEmacs attempts to automatically initialize the baud rate by querying
+the terminal. If you are running across a network, however, and
+different parts of the network work are at different baud rates, the
+value returned by XEmacs may be different from the value used by your
+local terminal. Some network protocols communicate the local terminal
+speed to the remote machine, so that XEmacs and other programs can get
+the proper value, but others do not. If XEmacs has the wrong value, it
+makes decisions that are less than optimal. To fix the problem, use
+`set-device-baud-rate'.
+
+ - Function: set-device-baud-rate &optional device
+ This function sets the output speed of DEVICE. See
+ `device-baud-rate'. DEVICE defaults to the selected device
+ (usually the only device) if omitted.
+
+ - Function: send-string-to-terminal char-or-string &optional stdout-p
+ device
+ This function sends CHAR-OR-STRING to the terminal without
+ alteration. Control characters in CHAR-OR-STRING have
+ terminal-dependent effects.
+
+ If DEVICE is `nil', this function writes to XEmacs's stderr, or to
+ stdout if STDOUT-P is non-`nil'. Otherwise, DEVICE should be a
+ tty or stream device, and the function writes to the device's
+ normal or error output, according to STDOUT-P.
+
+ One use of this function is to define function keys on terminals
+ that have downloadable function key definitions. For example,
+ this is how on certain terminals to define function key 4 to move
+ forward four characters (by transmitting the characters `C-u C-f'
+ to the computer):
+
+ (send-string-to-terminal "\eF4\^U\^F")
+ => nil
+
+ - Command: open-termscript filename
+ This function is used to open a "termscript file" that will record
+ all the characters sent by XEmacs to the terminal. (If there are
+ multiple tty or stream devices, all characters sent to all such
+ devices are recorded.) The function returns `nil'. Termscript
+ files are useful for investigating problems where XEmacs garbles
+ the screen, problems that are due to incorrect Termcap entries or
+ to undesirable settings of terminal options more often than to
+ actual XEmacs bugs. Once you are certain which characters were
+ actually output, you can determine reliably whether they
+ correspond to the Termcap specifications in use.
+
+ A `nil' value for FILENAME stops recording terminal output.
+
+ See also `open-dribble-file' in *Note Terminal Input::.
+
+ (open-termscript "../junk/termscript")
+ => nil
+
+\1f
+File: lispref.info, Node: Flow Control, Next: Batch Mode, Prev: Terminal Output, Up: System Interface
+
+Flow Control
+============
+
+ This section attempts to answer the question "Why does XEmacs choose
+to use flow-control characters in its command character set?" For a
+second view on this issue, read the comments on flow control in the
+`emacs/INSTALL' file from the distribution; for help with Termcap
+entries and DEC terminal concentrators, see `emacs/etc/TERMS'.
+
+ At one time, most terminals did not need flow control, and none used
+`C-s' and `C-q' for flow control. Therefore, the choice of `C-s' and
+`C-q' as command characters was uncontroversial. XEmacs, for economy
+of keystrokes and portability, used nearly all the ASCII control
+characters, with mnemonic meanings when possible; thus, `C-s' for
+search and `C-q' for quote.
+
+ Later, some terminals were introduced which required these characters
+for flow control. They were not very good terminals for full-screen
+editing, so XEmacs maintainers did not pay attention. In later years,
+flow control with `C-s' and `C-q' became widespread among terminals,
+but by this time it was usually an option. And the majority of users,
+who can turn flow control off, were unwilling to switch to less
+mnemonic key bindings for the sake of flow control.
+
+ So which usage is "right", XEmacs's or that of some terminal and
+concentrator manufacturers? This question has no simple answer.
+
+ One reason why we are reluctant to cater to the problems caused by
+`C-s' and `C-q' is that they are gratuitous. There are other
+techniques (albeit less common in practice) for flow control that
+preserve transparency of the character stream. Note also that their use
+for flow control is not an official standard. Interestingly, on the
+model 33 teletype with a paper tape punch (which is very old), `C-s'
+and `C-q' were sent by the computer to turn the punch on and off!
+
+ As X servers and other window systems replace character-only
+terminals, this problem is gradually being cured. For the mean time,
+XEmacs provides a convenient way of enabling flow control if you want
+it: call the function `enable-flow-control'.
+
+ - Function: enable-flow-control
+ This function enables use of `C-s' and `C-q' for output flow
+ control, and provides the characters `C-\' and `C-^' as aliases
+ for them using `keyboard-translate-table' (*note Translating
+ Input::).
+
+ You can use the function `enable-flow-control-on' in your `.emacs'
+file to enable flow control automatically on certain terminal types.
+
+ - Function: enable-flow-control-on &rest termtypes
+ This function enables flow control, and the aliases `C-\' and
+ `C-^', if the terminal type is one of TERMTYPES. For example:
+
+ (enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
+
+ Here is how `enable-flow-control' does its job:
+
+ 1. It sets CBREAK mode for terminal input, and tells the operating
+ system to handle flow control, with `(set-input-mode nil t)'.
+
+ 2. It sets up `keyboard-translate-table' to translate `C-\' and `C-^'
+ into `C-s' and `C-q'. Except at its very lowest level, XEmacs
+ never knows that the characters typed were anything but `C-s' and
+ `C-q', so you can in effect type them as `C-\' and `C-^' even when
+ they are input for other commands. *Note Translating Input::.
+
+ If the terminal is the source of the flow control characters, then
+once you enable kernel flow control handling, you probably can make do
+with less padding than normal for that terminal. You can reduce the
+amount of padding by customizing the Termcap entry. You can also
+reduce it by setting `baud-rate' to a smaller value so that XEmacs uses
+a smaller speed when calculating the padding needed. *Note Terminal
+Output::.
+
+\1f
+File: lispref.info, Node: Batch Mode, Prev: Flow Control, Up: System Interface
+
+Batch Mode
+==========
+
+ The command line option `-batch' causes XEmacs to run
+noninteractively. In this mode, XEmacs does not read commands from the
+terminal, it does not alter the terminal modes, and it does not expect
+to be outputting to an erasable screen. The idea is that you specify
+Lisp programs to run; when they are finished, XEmacs should exit. The
+way to specify the programs to run is with `-l FILE', which loads the
+library named FILE, and `-f FUNCTION', which calls FUNCTION with no
+arguments.
+
+ Any Lisp program output that would normally go to the echo area,
+either using `message' or using `prin1', etc., with `t' as the stream,
+goes instead to XEmacs's standard error descriptor when in batch mode.
+Thus, XEmacs behaves much like a noninteractive application program.
+(The echo area output that XEmacs itself normally generates, such as
+command echoing, is suppressed entirely.)
+
+ - Function: noninteractive
+ This function returns non-`nil' when XEmacs is running in batch
+ mode.
+
+ - Variable: noninteractive
+ This variable is non-`nil' when XEmacs is running in batch mode.
+ Setting this variable to `nil', however, will not change whether
+ XEmacs is running in batch mode, and will not change the return
+ value of the `noninteractive' function.
+
+\1f
+File: lispref.info, Node: X-Windows, Next: ToolTalk Support, Prev: System Interface, Up: Top
+
+Functions Specific to the X Window System
+*****************************************
+
+ XEmacs provides the concept of "devices", which generalizes
+connections to an X server, a TTY device, etc. Most information about
+an X server that XEmacs is connected to can be determined through
+general console and device functions. *Note Consoles and Devices::.
+However, there are some features of the X Window System that do not
+generalize well, and they are covered specially here.
+
+* Menu:
+
+* X Selections:: Transferring text to and from other X clients.
+* X Server:: Information about the X server connected to
+ a particular device.
+* X Miscellaneous:: Other X-specific functions and variables.
+
+\1f
+File: lispref.info, Node: X Selections, Next: X Server, Up: X-Windows
+
+X Selections
+============
+
+ The X server records a set of "selections" which permit transfer of
+data between application programs. The various selections are
+distinguished by "selection types", represented in XEmacs by symbols.
+X clients including XEmacs can read or set the selection for any given
+type.
+
+ - Function: x-own-selection data &optional type
+ This function sets a "selection" in the X server. It takes two
+ arguments: a value, DATA, and the selection type TYPE to assign it
+ to. DATA may be a string, a cons of two markers, or an extent.
+ In the latter cases, the selection is considered to be the text
+ between the markers, or between the extent's endpoints.
+
+ Each possible TYPE has its own selection value, which changes
+ independently. The usual values of TYPE are `PRIMARY' and
+ `SECONDARY'; these are symbols with upper-case names, in accord
+ with X Windows conventions. The default is `PRIMARY'.
+
+ (In FSF Emacs, this function is called `x-set-selection' and takes
+ different arguments.)
+
+ - Function: x-get-selection
+ This function accesses selections set up by XEmacs or by other X
+ clients. It returns the value of the current primary selection.
+
+ - Function: x-disown-selection &optional secondary-p
+ Assuming we own the selection, this function disowns it. If
+ SECONDARY-P is non-`nil', the secondary selection instead of the
+ primary selection is discarded.
+
+ The X server also has a set of numbered "cut buffers" which can
+store text or other data being moved between applications. Cut buffers
+are considered obsolete, but XEmacs supports them for the sake of X
+clients that still use them.
+
+ - Function: x-get-cutbuffer &optional n
+ This function returns the contents of cut buffer number N. (This
+ function is called `x-get-cut-buffer' in FSF Emacs.)
+
+ - Function: x-store-cutbuffer string
+ This function stores STRING into the first cut buffer (cut buffer
+ 0), moving the other values down through the series of cut buffers,
+ kill-ring-style. (This function is called `x-set-cut-buffer' in FSF
+ Emacs.)
+
+\1f
+File: lispref.info, Node: X Server, Next: X Miscellaneous, Prev: X Selections, Up: X-Windows
+
+X Server
+========
+
+ This section describes how to access and change the overall status of
+the X server XEmacs is using.
+
+* Menu:
+
+* Resources:: Getting resource values from the server.
+* Server Data:: Getting info about the X server.
+* Grabs:: Restricting access to the server by other apps.
+
+\1f
+File: lispref.info, Node: Resources, Next: Server Data, Up: X Server
+
+Resources
+---------
+
+ - Function: default-x-device
+ This function return the default X device for resourcing. This is
+ the first-created X device that still exists.
+
+ - Function: x-get-resource name class type &optional locale device
+ noerror
+ This function retrieves a resource value from the X resource
+ manager.
+
+ * The first arg is the name of the resource to retrieve, such as
+ `"font"'.
+
+ * The second arg is the class of the resource to retrieve, like
+ `"Font"'.
+
+ * The third arg should be one of the symbols `string',
+ `integer', `natnum', or `boolean', specifying the type of
+ object that the database is searched for.
+
+ * The fourth arg is the locale to search for the resources on,
+ and can currently be a a buffer, a frame, a device, or the
+ symbol `global'. If omitted, it defaults to `global'.
+
+ * The fifth arg is the device to search for the resources on.
+ (The resource database for a particular device is constructed
+ by combining non-device- specific resources such any
+ command-line resources specified and any app-defaults files
+ found [or the fallback resources supplied by XEmacs, if no
+ app-defaults file is found] with device-specific resources
+ such as those supplied using `xrdb'.) If omitted, it defaults
+ to the device of LOCALE, if a device can be derived (i.e. if
+ LOCALE is a frame or device), and otherwise defaults to the
+ value of `default-x-device'.
+
+ * The sixth arg NOERROR, if non-`nil', means do not signal an
+ error if a bogus resource specification was retrieved (e.g.
+ if a non-integer was given when an integer was requested).
+ In this case, a warning is issued instead.
+
+ The resource names passed to this function are looked up relative
+ to the locale.
+
+ If you want to search for a subresource, you just need to specify
+ the resource levels in NAME and CLASS. For example, NAME could be
+ `"modeline.attributeFont"', and CLASS `"Face.AttributeFont"'.
+
+ Specifically,
+
+ 1. If LOCALE is a buffer, a call
+
+ `(x-get-resource "foreground" "Foreground" 'string SOME-BUFFER)'
+
+ is an interface to a C call something like
+
+ `XrmGetResource (db, "xemacs.buffer.BUFFER-NAME.foreground",
+ "Emacs.EmacsLocaleType.EmacsBuffer.Foreground",
+ "String");'
+
+ 2. If LOCALE is a frame, a call
+
+ `(x-get-resource "foreground" "Foreground" 'string SOME-FRAME)'
+
+ is an interface to a C call something like
+
+ `XrmGetResource (db, "xemacs.frame.FRAME-NAME.foreground",
+ "Emacs.EmacsLocaleType.EmacsFrame.Foreground",
+ "String");'
+
+ 3. If LOCALE is a device, a call
+
+ `(x-get-resource "foreground" "Foreground" 'string SOME-DEVICE)'
+
+ is an interface to a C call something like
+
+ `XrmGetResource (db, "xemacs.device.DEVICE-NAME.foreground",
+ "Emacs.EmacsLocaleType.EmacsDevice.Foreground",
+ "String");'
+
+ 4. If LOCALE is the symbol `global', a call
+
+ `(x-get-resource "foreground" "Foreground" 'string 'global)'
+
+ is an interface to a C call something like
+
+ `XrmGetResource (db, "xemacs.foreground",
+ "Emacs.Foreground",
+ "String");'
+
+ Note that for `global', no prefix is added other than that of the
+ application itself; thus, you can use this locale to retrieve
+ arbitrary application resources, if you really want to.
+
+ The returned value of this function is `nil' if the queried
+ resource is not found. If TYPE is `string', a string is returned,
+ and if it is `integer', an integer is returned. If TYPE is
+ `boolean', then the returned value is the list `(t)' for true,
+ `(nil)' for false, and is `nil' to mean "unspecified".
+
+ - Function: x-put-resource resource-line &optional device
+ This function adds a resource to the resource database for DEVICE.
+ RESOURCE-LINE specifies the resource to add and should be a
+ standard resource specification.
+
+ - Variable: x-emacs-application-class
+ This variable holds The X application class of the XEmacs process.
+ This controls, among other things, the name of the "app-defaults"
+ file that XEmacs will use. For changes to this variable to take
+ effect, they must be made before the connection to the X server is
+ initialized, that is, this variable may only be changed before
+ XEmacs is dumped, or by setting it in the file
+ `lisp/term/x-win.el'.
+
+ By default, this variable is nil at startup. When the connection
+ to the X server is first initialized, the X resource database will
+ be consulted and the value will be set according to whether any
+ resources are found for the application class "XEmacs".
+
+\1f
+File: lispref.info, Node: Server Data, Next: Grabs, Prev: Resources, Up: X Server
+
+Data about the X Server
+-----------------------
+
+ This section describes functions and a variable that you can use to
+get information about the capabilities and origin of the X server
+corresponding to a particular device. The device argument is generally
+optional and defaults to the selected device.
+
+ - Function: x-server-version &optional device
+ This function returns the list of version numbers of the X server
+ DEVICE is on. The returned value is a list of three integers: the
+ major and minor version numbers of the X protocol in use, and the
+ vendor-specific release number.
+
+ - Function: x-server-vendor &optional device
+ This function returns the vendor supporting the X server DEVICE is
+ on.
+
+ - Function: x-display-visual-class &optional device
+ This function returns the visual class of the display DEVICE is
+ on. The value is one of the symbols `static-gray', `gray-scale',
+ `static-color', `pseudo-color', `true-color', and `direct-color'.
+ (Note that this is different from previous versions of XEmacs,
+ which returned `StaticGray', `GrayScale', etc.)
+
+\1f
+File: lispref.info, Node: Grabs, Prev: Server Data, Up: X Server
+
+Restricting Access to the Server by Other Apps
+----------------------------------------------
+
+ - Function: x-grab-keyboard &optional device
+ This function grabs the keyboard on the given device (defaulting
+ to the selected one). So long as the keyboard is grabbed, all
+ keyboard events will be delivered to XEmacs--it is not possible
+ for other X clients to eavesdrop on them. Ungrab the keyboard
+ with `x-ungrab-keyboard' (use an `unwind-protect'). Returns `t'
+ if the grab was successful; `nil' otherwise.
+
+ - Function: x-ungrab-keyboard &optional device
+ This function releases a keyboard grab made with `x-grab-keyboard'.
+
+ - Function: x-grab-pointer &optional device cursor ignore-keyboard
+ This function grabs the pointer and restricts it to its current
+ window. If optional DEVICE argument is `nil', the selected device
+ will be used. If optional CURSOR argument is non-`nil', change
+ the pointer shape to that until `x-ungrab-pointer' is called (it
+ should be an object returned by the `make-cursor' function). If
+ the second optional argument IGNORE-KEYBOARD is non-`nil', ignore
+ all keyboard events during the grab. Returns `t' if the grab is
+ successful, `nil' otherwise.
+
+ - Function: x-ungrab-pointer &optional device
+ This function releases a pointer grab made with `x-grab-pointer'.
+ If optional first arg DEVICE is `nil' the selected device is used.
+ If it is `t' the pointer will be released on all X devices.
+
+\1f
+File: lispref.info, Node: X Miscellaneous, Prev: X Server, Up: X-Windows
+
+Miscellaneous X Functions and Variables
+=======================================
+
+ - Variable: x-bitmap-file-path
+ This variable holds a list of the directories in which X bitmap
+ files may be found. If `nil', this is initialized from the
+ `"*bitmapFilePath"' resource. This is used by the
+ `make-image-instance' function (however, note that if the
+ environment variable `XBMLANGPATH' is set, it is consulted first).
+
+ - Variable: x-library-search-path
+ This variable holds the search path used by `read-color' to find
+ `rgb.txt'.
+
+ - Function: x-valid-keysym-name-p keysym
+ This function returns true if KEYSYM names a keysym that the X
+ library knows about. Valid keysyms are listed in the files
+ `/usr/include/X11/keysymdef.h' and in `/usr/lib/X11/XKeysymDB', or
+ whatever the equivalents are on your system.
+
+ - Function: x-window-id &optional frame
+ This function returns the ID of the X11 window. This gives us a
+ chance to manipulate the Emacs window from within a different
+ program. Since the ID is an unsigned long, we return it as a
+ string.
+
+ - Variable: x-allow-sendevents
+ If non-`nil', synthetic events are allowed. `nil' means they are
+ ignored. Beware: allowing XEmacs to process SendEvents opens a
+ big security hole.
+
+ - Function: x-debug-mode arg &optional device
+ With a true arg, make the connection to the X server synchronous.
+ With false, make it asynchronous. Synchronous connections are
+ much slower, but are useful for debugging. (If you get X errors,
+ make the connection synchronous, and use a debugger to set a
+ breakpoint on `x_error_handler'. Your backtrace of the C stack
+ will now be useful. In asynchronous mode, the stack above
+ `x_error_handler' isn't helpful because of buffering.) If DEVICE
+ is not specified, the selected device is assumed.
+
+ Calling this function is the same as calling the C function
+ `XSynchronize', or starting the program with the `-sync' command
+ line argument.
+
+ - Variable: x-debug-events
+ If non-zero, debug information about events that XEmacs sees is
+ displayed. Information is displayed on stderr. Currently defined
+ values are:
+
+ * 1 == non-verbose output
+
+ * 2 == verbose output
+
+\1f
+File: lispref.info, Node: ToolTalk Support, Next: LDAP Support, Prev: X-Windows, Up: Top
+
+ToolTalk Support
+****************
+
+* Menu:
+
+* XEmacs ToolTalk API Summary::
+* Sending Messages::
+* Receiving Messages::
+
+\1f
+File: lispref.info, Node: XEmacs ToolTalk API Summary, Next: Sending Messages, Up: ToolTalk Support
+
+XEmacs ToolTalk API Summary
+===========================
+
+ The XEmacs Lisp interface to ToolTalk is similar, at least in spirit,
+to the standard C ToolTalk API. Only the message and pattern parts of
+the API are supported at present; more of the API could be added if
+needed. The Lisp interface departs from the C API in a few ways:
+
+ * ToolTalk is initialized automatically at XEmacs startup-time.
+ Messages can only be sent other ToolTalk applications connected to
+ the same X11 server that XEmacs is running on.
+
+ * There are fewer entry points; polymorphic functions with keyword
+ arguments are used instead.
+
+ * The callback interface is simpler and marginally less functional.
+ A single callback may be associated with a message or a pattern;
+ the callback is specified with a Lisp symbol (the symbol should
+ have a function binding).
+
+ * The session attribute for messages and patterns is always
+ initialized to the default session.
+
+ * Anywhere a ToolTalk enum constant, e.g. `TT_SESSION', is valid, one
+ can substitute the corresponding symbol, e.g. `'TT_SESSION'. This
+ simplifies building lists that represent messages and patterns.
+
+\1f
+File: lispref.info, Node: Sending Messages, Next: Receiving Messages, Prev: XEmacs ToolTalk API Summary, Up: ToolTalk Support
+
+Sending Messages
+================
+
+* Menu:
+
+* Example of Sending Messages::
+* Elisp Interface for Sending Messages::
+
+\1f
+File: lispref.info, Node: Example of Sending Messages, Next: Elisp Interface for Sending Messages, Up: Sending Messages
+
+Example of Sending Messages
+---------------------------
+
+ Here's a simple example that sends a query to another application
+and then displays its reply. Both the query and the reply are stored
+in the first argument of the message.
+
+ (defun tooltalk-random-query-handler (msg)
+ (let ((state (get-tooltalk-message-attribute msg 'state)))
+ (cond
+ ((eq state 'TT_HANDLED)
+ (message (get-tooltalk-message-attribute msg arg_val 0)))
+ ((memq state '(TT_FAILED TT_REJECTED))
+ (message "Random query turns up nothing")))))
+
+ (defvar random-query-message
+ '( class TT_REQUEST
+ scope TT_SESSION
+ address TT_PROCEDURE
+ op "random-query"
+ args '((TT_INOUT "?" "string"))
+ callback tooltalk-random-query-handler))
+
+ (let ((m (make-tooltalk-message random-query-message)))
+ (send-tooltalk-message m))
+
+\1f
File: lispref.info, Node: Elisp Interface for Sending Messages, Prev: Example of Sending Messages, Up: Sending Messages
Elisp Interface for Sending Messages
* The Low-Level LDAP API:: Low-level LDAP lisp primitives
* LDAP Internationalization:: I18n variables and functions
-\1f
-File: lispref.info, Node: LDAP Variables, Next: The High-Level LDAP API, Prev: XEmacs LDAP API, Up: XEmacs LDAP API
-
-LDAP Variables
---------------
-
- - Variable: ldap-default-host
- The default LDAP server hostname. A TCP port number can be
- appended to that name using a colon as a separator.
-
- - Variable: ldap-default-port
- Default TCP port for LDAP connections. Initialized from the LDAP
- library. Default value is 389.
-
- - Variable: ldap-default-base
- Default base for LDAP searches. This is a string using the syntax
- of RFC 1779. For instance, "o=ACME, c=US" limits the search to the
- Acme organization in the United States.
-
- - Variable: ldap-host-parameters-alist
- An alist of per host options for LDAP transactions. The list
- elements look like `(HOST PROP1 VAL1 PROP2 VAL2 ...)' HOST is the
- name of an LDAP server. A TCP port number can be appended to that
- name using a colon as a separator. PROPN and VALN are
- property/value pairs describing parameters for the server. Valid
- properties:
- `binddn'
- The distinguished name of the user to bind as. This may look
- like `cn=Babs Jensen,o=ACME,c=US', see RFC 1779 for details.
-
- `passwd'
- The password to use for authentication.
-
- `auth'
- The authentication method to use, possible values depend on
- the LDAP library XEmacs was compiled with, they may include
- `simple', `krbv41' and `krbv42'.
-
- `base'
- The base for the search. This may look like `cÿ, o¬me', see
- RFC 1779 for syntax details.
-
- `scope'
- One of the symbols `base', `onelevel' or `subtree' indicating
- the scope of the search limited to a base object, to a single
- level or to the whole subtree.
-
- `deref'
- The dereference policy is one of the symbols `never',
- `always', `search' or `find' and defines how aliases are
- dereferenced.
- `never'
- Aliases are never dereferenced
-
- `always'
- Aliases are always dereferenced
-
- `search'
- Aliases are dereferenced when searching
-
- `find'
- Aliases are dereferenced when locating the base object
- for the search
-
- `timelimit'
- The timeout limit for the connection in seconds.
-
- `sizelimit'
- The maximum number of matches to return for searches
- performed on this connection.
-
- - Variable: ldap-verbose
- If non-`nil', LDAP operations will echo progress messages.
- Defaults to `nil'.
-
-\1f
-File: lispref.info, Node: The High-Level LDAP API, Next: The Low-Level LDAP API, Prev: LDAP Variables, Up: XEmacs LDAP API
-
-The High-Level LDAP API
------------------------
-
- The following functions provide the most convenient interface to
-perform LDAP operations. All of them open a connection to a host,
-perform an operation (add/search/modify/delete) on one or several
-entries and cleanly close the connection thus insulating the user from
-all the details of the low-level interface such as LDAP Lisp objects
-*note The Low-Level LDAP API::.
-
- Note that `ldap-search' which used to be the name of the high-level
-search function in XEmacs 21.1 is now obsolete. For consistency in the
-naming as well as backward compatibility, that function now acts as a
-wrapper that calls either `ldap-search-basic' (low-level search
-function) or `ldap-search-entries' (high-level search function)
-according to the actual parameters. A direct call to one of these two
-functions is preferred since it is faster and unambiguous.
-
- - Function: ldap-search-entries filter &optional host attributes
- attrsonly withdn
- Perform an LDAP search. FILTER is the search filter *note Syntax
- of Search Filters:: HOST is the LDAP host on which to perform the
- search. ATTRIBUTES is the specific attributes to retrieve, `nil'
- means retrieve all. ATTRSONLY if non-`nil' retrieves the
- attributes only without their associated values. If WITHDN is
- non-`nil' each entry in the result will be prepended with its
- distinguished name DN. Additional search parameters can be
- specified through `ldap-host-parameters-alist'. The function
- returns a list of matching entries. Each entry is itself an alist
- of attribute/value pairs optionally preceded by the DN of the
- entry according to the value of WITHDN.
-
- - Function: ldap-add-entries entries &optional host binddn passwd
- Add entries to an LDAP directory. ENTRIES is a list of entry
- specifications of the form `(DN (ATTR . VALUE) (ATTR . VALUE) ...)'
- where DN the distinguished name of an entry to add, the following
- are cons cells containing attribute/value string pairs. HOST is
- the LDAP host, defaulting to `ldap-default-host' BINDDN is the DN
- to bind as to the server PASSWD is the corresponding password.
-
- - Function: ldap-modify-entries entry-mods &optional host binddn passwd
- Modify entries of an LDAP directory. ENTRY_MODS is a list of
- entry modifications of the form `(DN MOD-SPEC1 MOD-SPEC2 ...)'
- where DN is the distinguished name of the entry to modify, the
- following are modification specifications. A modification
- specification is itself a list of the form `(MOD-OP ATTR VALUE1
- VALUE2 ...)' MOD-OP and ATTR are mandatory, VALUES are optional
- depending on MOD-OP. MOD-OP is the type of modification, one of
- the symbols `add', `delete' or `replace'. ATTR is the LDAP
- attribute type to modify. HOST is the LDAP host, defaulting to
- `ldap-default-host' BINDDN is the DN to bind as to the server
- PASSWD is the corresponding password"
-
- - Function: ldap-delete-entries dn &optional host binddn passwd
- Delete an entry from an LDAP directory. DN is the distinguished
- name of an entry to delete or a list of those. HOST is the LDAP
- host, defaulting to `ldap-default-host' BINDDN is the DN to bind
- as to the server PASSWD is the corresponding password.
-
-\1f
-File: lispref.info, Node: The Low-Level LDAP API, Next: LDAP Internationalization, Prev: The High-Level LDAP API, Up: XEmacs LDAP API
-
-The Low-Level LDAP API
-----------------------
-
- The low-level API should be used directly for very specific purposes
-(such as multiple operations on a connection) only. The higher-level
-functions provide a more convenient way to access LDAP directories
-hiding the subtleties of handling the connection, translating arguments
-and ensuring compliance with LDAP internationalization rules and formats
-(currently partly implemented only). See *note The High-Level LDAP API::
-
- Note that the former functions `ldap-*-internal' functions have been
-renamed in XEmacs 21.2
-
-* Menu:
-
-* The LDAP Lisp Object::
-* Opening and Closing a LDAP Connection::
-* Low-level Operations on a LDAP Server::
-
-\1f
-File: lispref.info, Node: The LDAP Lisp Object, Next: Opening and Closing a LDAP Connection, Prev: The Low-Level LDAP API, Up: The Low-Level LDAP API
-
-The LDAP Lisp Object
-....................
-
- An internal built-in `ldap' lisp object represents a LDAP connection.
-
- - Function: ldapp object
- This function returns non-`nil' if OBJECT is a `ldap' object.
-
- - Function: ldap-host ldap
- Return the server host of the connection represented by LDAP
-
- - Function: ldap-live-p ldap
- Return non-`nil' if LDAP is an active LDAP connection
-
-\1f
-File: lispref.info, Node: Opening and Closing a LDAP Connection, Next: Low-level Operations on a LDAP Server, Prev: The LDAP Lisp Object, Up: The Low-Level LDAP API
-
-Opening and Closing a LDAP Connection
-.....................................
-
- - Function: ldap-open host &optional plist
- Open a LDAP connection to HOST. PLIST is a property list
- containing additional parameters for the connection. Valid keys
- in that list are:
- `port'
- The TCP port to use for the connection if different from
- `ldap-default-port' or the library builtin value
-
- `auth'
- The authentication method to use, possible values depend on
- the LDAP library XEmacs was compiled with, they may include
- `simple', `krbv41' and `krbv42'.
-
- `binddn'
- The distinguished name of the user to bind as. This may look
- like `c=com, o=Acme, cn=Babs Jensen', see RFC 1779 for
- details.
-
- `passwd'
- The password to use for authentication.
-
- `deref'
- The dereference policy is one of the symbols `never',
- `always', `search' or `find' and defines how aliases are
- dereferenced.
- `never'
- Aliases are never dereferenced
-
- `always'
- Aliases are always dereferenced
-
- `search'
- Aliases are dereferenced when searching
-
- `find'
- Aliases are dereferenced when locating the base object
- for the search The default is `never'.
-
- `timelimit'
- The timeout limit for the connection in seconds.
-
- `sizelimit'
- The maximum number of matches to return for searches
- performed on this connection.
-
- - Function: ldap-close ldap
- Close the connection represented by LDAP
-
-\1f
-File: lispref.info, Node: Low-level Operations on a LDAP Server, Prev: Opening and Closing a LDAP Connection, Up: The Low-Level LDAP API
-
-Low-level Operations on a LDAP Server
-.....................................
-
- `ldap-search-basic' is the low-level primitive to perform a search
-on a LDAP server. It works directly on an open LDAP connection thus
-requiring a preliminary call to `ldap-open'. Multiple searches can be
-made on the same connection, then the session must be closed with
-`ldap-close'.
-
- - Function: ldap-search-basic ldap filter base scope attrs attrsonly
- Perform a search on an open connection LDAP created with
- `ldap-open'. FILTER is a filter string for the search *note
- Syntax of Search Filters:: BASE is the distinguished name at which
- to start the search. SCOPE is one of the symbols `base',
- `onelevel' or `subtree' indicating the scope of the search limited
- to a base object, to a single level or to the whole subtree. The
- default is `subtree'. `attrs' is a list of strings indicating
- which attributes to retrieve for each matching entry. If `nil' all
- available attributes are returned. If `attrsonly' is non-`nil'
- then only the attributes are retrieved, not their associated values
- If `withdn' is non-`nil' then each entry in the result is
- prepended with its distinguished name DN If `verbose' is non-`nil'
- then progress messages are echoed The function returns a list of
- matching entries. Each entry is itself an alist of
- attribute/value pairs optionally preceded by the DN of the entry
- according to the value of `withdn'.
-
- - Function: ldap-add ldap dn entry
- Add ENTRY to a LDAP directory which a connection LDAP has been
- opened to with `ldap-open'. DN is the distinguished name of the
- entry to add. ENTRY is an entry specification, i.e., a list of
- cons cells containing attribute/value string pairs.
-
- - Function: ldap-modify ldap dn mods
- Modify an entry in an LDAP directory. LDAP is an LDAP connection
- object created with `ldap-open'. DN is the distinguished name of
- the entry to modify. MODS is a list of modifications to apply. A
- modification is a list of the form `(MOD-OP ATTR VALUE1 VALUE2
- ...)' MOD-OP and ATTR are mandatory, VALUES are optional
- depending on MOD-OP. MOD-OP is the type of modification, one of
- the symbols `add', `delete' or `replace'. ATTR is the LDAP
- attribute type to modify
-
- - Function: ldap-delete ldap dn
- Delete an entry to an LDAP directory. LDAP is an LDAP connection
- object created with `ldap-open'. DN is the distinguished name of
- the entry to delete
-
-\1f
-File: lispref.info, Node: LDAP Internationalization, Prev: The Low-Level LDAP API, Up: XEmacs LDAP API
-
-LDAP Internationalization
--------------------------
-
- The XEmacs LDAP API provides basic internationalization features
-based on the LDAP v3 specification (essentially RFC2252 on "LDAP v3
-Attribute Syntax Definitions"). Unfortunately since there is currently
-no free LDAP v3 server software, this part has not received much
-testing and should be considered experimental. The framework is in
-place though.
-
- - Function: ldap-decode-attribute attr
- Decode the attribute/value pair ATTR according to LDAP rules. The
- attribute name is looked up in `ldap-attribute-syntaxes-alist' and
- the corresponding decoder is then retrieved from
- `ldap-attribute-syntax-decoders'' and applied on the value(s).
-
-* Menu:
-
-* LDAP Internationalization Variables::
-* Encoder/Decoder Functions::
-
-\1f
-File: lispref.info, Node: LDAP Internationalization Variables, Next: Encoder/Decoder Functions, Prev: LDAP Internationalization, Up: LDAP Internationalization
-
-LDAP Internationalization Variables
-...................................
-
- - Variable: ldap-ignore-attribute-codings
- If non-`nil', no encoding/decoding will be performed LDAP
- attribute values
-
- - Variable: ldap-coding-system
- Coding system of LDAP string values. LDAP v3 specifies the coding
- system of strings to be UTF-8. You need an XEmacs with Mule
- support for this.
-
- - Variable: ldap-default-attribute-decoder
- Decoder function to use for attributes whose syntax is unknown.
- Such a function receives an encoded attribute value as a string
- and should return the decoded value as a string
-
- - Variable: ldap-attribute-syntax-encoders
- A vector of functions used to encode LDAP attribute values. The
- sequence of functions corresponds to the sequence of LDAP
- attribute syntax object identifiers of the form
- 1.3.6.1.4.1.1466.1115.121.1.* as defined in RFC2252 section 4.3.2.
- As of this writing, only a few encoder functions are available.
-
- - Variable: ldap-attribute-syntax-decoders
- A vector of functions used to decode LDAP attribute values. The
- sequence of functions corresponds to the sequence of LDAP
- attribute syntax object identifiers of the form
- 1.3.6.1.4.1.1466.1115.121.1.* as defined in RFC2252 section 4.3.2.
- As of this writing, only a few decoder functions are available.
-
- - Variable: ldap-attribute-syntaxes-alist
- A map of LDAP attribute names to their type object id minor number.
- This table is built from RFC2252 Section 5 and RFC2256 Section 5
-
-\1f
-File: lispref.info, Node: Encoder/Decoder Functions, Prev: LDAP Internationalization Variables, Up: LDAP Internationalization
-
-Encoder/Decoder Functions
-.........................
-
- - Function: ldap-encode-boolean bool
- A function that encodes an elisp boolean BOOL into a LDAP boolean
- string representation
-
- - Function: ldap-decode-boolean str
- A function that decodes a LDAP boolean string representation STR
- into an elisp boolean
-
- - Function: ldap-decode-string str
- Decode a string STR according to `ldap-coding-system'
-
- - Function: ldap-encode-string str
- Encode a string STR according to `ldap-coding-system'
-
- - Function: ldap-decode-address str
- Decode an address STR according to `ldap-coding-system' and
- replacing $ signs with newlines as specified by LDAP encoding
- rules for addresses
-
- - Function: ldap-encode-address str
- Encode an address STR according to `ldap-coding-system' and
- replacing newlines with $ signs as specified by LDAP encoding
- rules for addresses
-
-\1f
-File: lispref.info, Node: Syntax of Search Filters, Prev: XEmacs LDAP API, Up: LDAP Support
-
-Syntax of Search Filters
-========================
-
- LDAP search functions use RFC1558 syntax to describe the search
-filter. In that syntax simple filters have the form:
-
- (<attr> <filtertype> <value>)
-
- `<attr>' is an attribute name such as `cn' for Common Name, `o' for
-Organization, etc...
-
- `<value>' is the corresponding value. This is generally an exact
-string but may also contain `*' characters as wildcards
-
- `filtertype' is one `=' `~=', `<=', `>=' which respectively describe
-equality, approximate equality, inferiority and superiority.
-
- Thus `(cn=John Smith)' matches all records having a canonical name
-equal to John Smith.
-
- A special case is the presence filter `(<attr>=*' which matches
-records containing a particular attribute. For instance `(mail=*)'
-matches all records containing a `mail' attribute.
-
- Simple filters can be connected together with the logical operators
-`&', `|' and `!' which stand for the usual and, or and not operators.
-
- `(&(objectClass=Person)(mail=*)(|(sn=Smith)(givenname=John)))'
-matches records of class `Person' containing a `mail' attribute and
-corresponding to people whose last name is `Smith' or whose first name
-is `John'.
-
-\1f
-File: lispref.info, Node: PostgreSQL Support, Next: Internationalization, Prev: LDAP Support, Up: Top
-
-PostgreSQL Support
-******************
-
- XEmacs can be linked with PostgreSQL libpq run-time support to
-provide relational database access from Emacs Lisp code.
-
-* Menu:
-
-* Building XEmacs with PostgreSQL support::
-* XEmacs PostgreSQL libpq API::
-* XEmacs PostgreSQL libpq Examples::
-
-\1f
-File: lispref.info, Node: Building XEmacs with PostgreSQL support, Next: XEmacs PostgreSQL libpq API, Up: PostgreSQL Support
-
-Building XEmacs with PostgreSQL support
-=======================================
-
- XEmacs PostgreSQL support requires linking to the PostgreSQL libpq.so
-library. Describing how to build and install PostgreSQL is beyond the
-scope of this document, see the PostgreSQL manual for details.
-
- If you have installed XEmacs from one of the binary kits on
-(<ftp://ftp.xemacs.org/>), or are using an XEmacs binary from a CD ROM,
-you should have XEmacs PostgreSQL support by default. If you are
-building XEmacs from source on a Linux system with PostgreSQL installed
-into the default location, it should be autodetected when you run
-configure. If you have installed PostgreSQL into its non-Linux default
-location, `/usr/local/pgsql', you must specify
-`--site-prefixes=/usr/local/pgsql' when you run configure. If you
-installed PostgreSQL into another location, use that instead of
-`/usr/local/pgsql' when specifying `--site-prefixes'.
-
- As of XEmacs 21.2, PostgreSQL versions 6.5.3 and 7.0 are supported.
-XEmacs Lisp support for V7.0 is somewhat more extensive than support for
-V6.5. In particular, asynchronous queries are supported.
-
-\1f
-File: lispref.info, Node: XEmacs PostgreSQL libpq API, Next: XEmacs PostgreSQL libpq Examples, Prev: Building XEmacs with PostgreSQL support, Up: PostgreSQL Support
-
-XEmacs PostgreSQL libpq API
-===========================
-
- XEmacs PostgreSQL API is intended to be a policy-free, low-level
-binding to libpq. The intent is to provide all the basic functionality
-and then let high level Lisp code decide its own policies.
-
- This documentation assumes that the reader has knowledge of SQL, but
-requires no prior knowledge of libpq.
-
- There are many examples in this manual and some setup will be
-required. In order to run most of the following examples, the
-following code needs to be executed. In addition to the data is in
-this table, nearly all of the examples will assume that the free
-variable `P' refers to this database connection. The examples in the
-original edition of this manual were run against Postgres 7.0beta1.
-
- (progn
- (setq P (pq-connectdb ""))
- ;; id is the primary key, shikona is a Japanese word that
- ;; means `the professional name of a Sumo wrestler', and
- ;; rank is the Sumo rank name.
- (pq-exec P (concat "CREATE TABLE xemacs_test"
- " (id int, shikona text, rank text);"))
- (pq-exec P "COPY xemacs_test FROM stdin;")
- (pq-put-line P "1\tMusashimaru\tYokuzuna\n")
- (pq-put-line P "2\tDejima\tOozeki\n")
- (pq-put-line P "3\tMusoyama\tSekiwake\n")
- (pq-put-line P "4\tMiyabiyama\tSekiwake\n")
- (pq-put-line P "5\tWakanoyama\tMaegashira\n")
- (pq-put-line P "\\.\n")
- (pq-end-copy P))
- => nil
-
-* Menu:
-
-* libpq Lisp Variables::
-* libpq Lisp Symbols and DataTypes::
-* Synchronous Interface Functions::
-* Asynchronous Interface Functions::
-* Large Object Support::
-* Other libpq Functions::
-* Unimplemented libpq Functions::
-
-\1f
-File: lispref.info, Node: libpq Lisp Variables, Next: libpq Lisp Symbols and DataTypes, Prev: XEmacs PostgreSQL libpq API, Up: XEmacs PostgreSQL libpq API
-
-libpq Lisp Variables
---------------------
-
- Various Unix environment variables are used by libpq to provide
-defaults to the many different parameters. In the XEmacs Lisp API,
-these environment variables are bound to Lisp variables to provide more
-convenient access to Lisp Code. These variables are passed to the
-backend database server during the establishment of a database
-connection and when the `pq-setenv' call is made.
-
- - Variable: pg:host
- Initialized from the PGHOST environment variable. The default
- host to connect to.
-
- - Variable: pg:user
- Initialized from the PGUSER environment variable. The default
- database user name.
-
- - Variable: pg:options
- Initialized from the PGOPTIONS environment variable. Default
- additional server options.
-
- - Variable: pg:port
- Initialized from the PGPORT environment variable. The default TCP
- port to connect to.
-
- - Variable: pg:tty
- Initialized from the PGTTY environment variable. The default
- debugging TTY.
-
- Compatibility note: Debugging TTYs are turned off in the XEmacs
- Lisp binding.
-
- - Variable: pg:database
- Initialized from the PGDATABASE environment variable. The default
- database to connect to.
-
- - Variable: pg:realm
- Initialized from the PGREALM environment variable. The default
- Kerberos realm.
-
- - Variable: pg:client-encoding
- Initialized from the PGCLIENTENCODING environment variable. The
- default client encoding.
-
- Compatibility note: This variable is not present in non-Mule
- XEmacsen. This variable is not present in versions of libpq prior
- to 7.0. In the current implementation, client encoding is
- equivalent to the `file-name-coding-system' format.
-
- - Variable: pg:authtype
- Initialized from the PGAUTHTYPE environment variable. The default
- authentication scheme used.
-
- Compatibility note: This variable is unused in versions of libpq
- after 6.5. It is not implemented at all in the XEmacs Lisp
- binding.
-
- - Variable: pg:geqo
- Initialized from the PGGEQO environment variable. Genetic
- optimizer options.
-
- - Variable: pg:cost-index
- Initialized from the PGCOSTINDEX environment variable. Cost index
- options.
-
- - Variable: pg:cost-heap
- Initialized from the PGCOSTHEAP environment variable. Cost heap
- options.
-
- - Variable: pg:tz
- Initialized from the PGTZ environment variable. Default timezone.
-
- - Variable: pg:date-style
- Initialized from the PGDATESTYLE environment variable. Default
- date style in returned date objects.
-
- - Variable: pg-coding-system
- This is a variable controlling which coding system is used to
- encode non-ASCII strings sent to the database.
-
- Compatibility Note: This variable is not present in InfoDock.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: LDAP Variables, Next: The High-Level LDAP API, Prev: XEmacs LDAP API, Up: XEmacs LDAP API
+
+LDAP Variables
+--------------
+
+ - Variable: ldap-default-host
+ The default LDAP server hostname. A TCP port number can be
+ appended to that name using a colon as a separator.
+
+ - Variable: ldap-default-port
+ Default TCP port for LDAP connections. Initialized from the LDAP
+ library. Default value is 389.
+
+ - Variable: ldap-default-base
+ Default base for LDAP searches. This is a string using the syntax
+ of RFC 1779. For instance, "o=ACME, c=US" limits the search to the
+ Acme organization in the United States.
+
+ - Variable: ldap-host-parameters-alist
+ An alist of per host options for LDAP transactions. The list
+ elements look like `(HOST PROP1 VAL1 PROP2 VAL2 ...)' HOST is the
+ name of an LDAP server. A TCP port number can be appended to that
+ name using a colon as a separator. PROPN and VALN are
+ property/value pairs describing parameters for the server. Valid
+ properties:
+ `binddn'
+ The distinguished name of the user to bind as. This may look
+ like `cn=Babs Jensen,o=ACME,c=US', see RFC 1779 for details.
+
+ `passwd'
+ The password to use for authentication.
+
+ `auth'
+ The authentication method to use, possible values depend on
+ the LDAP library XEmacs was compiled with, they may include
+ `simple', `krbv41' and `krbv42'.
+
+ `base'
+ The base for the search. This may look like `cÿ, o¬me', see
+ RFC 1779 for syntax details.
+
+ `scope'
+ One of the symbols `base', `onelevel' or `subtree' indicating
+ the scope of the search limited to a base object, to a single
+ level or to the whole subtree.
+
+ `deref'
+ The dereference policy is one of the symbols `never',
+ `always', `search' or `find' and defines how aliases are
+ dereferenced.
+ `never'
+ Aliases are never dereferenced
+
+ `always'
+ Aliases are always dereferenced
+
+ `search'
+ Aliases are dereferenced when searching
+
+ `find'
+ Aliases are dereferenced when locating the base object
+ for the search
+
+ `timelimit'
+ The timeout limit for the connection in seconds.
+
+ `sizelimit'
+ The maximum number of matches to return for searches
+ performed on this connection.
+
+ - Variable: ldap-verbose
+ If non-`nil', LDAP operations will echo progress messages.
+ Defaults to `nil'.
+
+\1f
+File: lispref.info, Node: The High-Level LDAP API, Next: The Low-Level LDAP API, Prev: LDAP Variables, Up: XEmacs LDAP API
+
+The High-Level LDAP API
+-----------------------
+
+ The following functions provide the most convenient interface to
+perform LDAP operations. All of them open a connection to a host,
+perform an operation (add/search/modify/delete) on one or several
+entries and cleanly close the connection thus insulating the user from
+all the details of the low-level interface such as LDAP Lisp objects
+*note The Low-Level LDAP API::.
+
+ Note that `ldap-search' which used to be the name of the high-level
+search function in XEmacs 21.1 is now obsolete. For consistency in the
+naming as well as backward compatibility, that function now acts as a
+wrapper that calls either `ldap-search-basic' (low-level search
+function) or `ldap-search-entries' (high-level search function)
+according to the actual parameters. A direct call to one of these two
+functions is preferred since it is faster and unambiguous.
+
+ - Function: ldap-search-entries filter &optional host attributes
+ attrsonly withdn
+ Perform an LDAP search. FILTER is the search filter *note Syntax
+ of Search Filters:: HOST is the LDAP host on which to perform the
+ search. ATTRIBUTES is the specific attributes to retrieve, `nil'
+ means retrieve all. ATTRSONLY if non-`nil' retrieves the
+ attributes only without their associated values. If WITHDN is
+ non-`nil' each entry in the result will be prepended with its
+ distinguished name DN. Additional search parameters can be
+ specified through `ldap-host-parameters-alist'. The function
+ returns a list of matching entries. Each entry is itself an alist
+ of attribute/value pairs optionally preceded by the DN of the
+ entry according to the value of WITHDN.
+
+ - Function: ldap-add-entries entries &optional host binddn passwd
+ Add entries to an LDAP directory. ENTRIES is a list of entry
+ specifications of the form `(DN (ATTR . VALUE) (ATTR . VALUE) ...)'
+ where DN the distinguished name of an entry to add, the following
+ are cons cells containing attribute/value string pairs. HOST is
+ the LDAP host, defaulting to `ldap-default-host' BINDDN is the DN
+ to bind as to the server PASSWD is the corresponding password.
+
+ - Function: ldap-modify-entries entry-mods &optional host binddn passwd
+ Modify entries of an LDAP directory. ENTRY_MODS is a list of
+ entry modifications of the form `(DN MOD-SPEC1 MOD-SPEC2 ...)'
+ where DN is the distinguished name of the entry to modify, the
+ following are modification specifications. A modification
+ specification is itself a list of the form `(MOD-OP ATTR VALUE1
+ VALUE2 ...)' MOD-OP and ATTR are mandatory, VALUES are optional
+ depending on MOD-OP. MOD-OP is the type of modification, one of
+ the symbols `add', `delete' or `replace'. ATTR is the LDAP
+ attribute type to modify. HOST is the LDAP host, defaulting to
+ `ldap-default-host' BINDDN is the DN to bind as to the server
+ PASSWD is the corresponding password"
+
+ - Function: ldap-delete-entries dn &optional host binddn passwd
+ Delete an entry from an LDAP directory. DN is the distinguished
+ name of an entry to delete or a list of those. HOST is the LDAP
+ host, defaulting to `ldap-default-host' BINDDN is the DN to bind
+ as to the server PASSWD is the corresponding password.
+
+\1f
+File: lispref.info, Node: The Low-Level LDAP API, Next: LDAP Internationalization, Prev: The High-Level LDAP API, Up: XEmacs LDAP API
+
+The Low-Level LDAP API
+----------------------
+
+ The low-level API should be used directly for very specific purposes
+(such as multiple operations on a connection) only. The higher-level
+functions provide a more convenient way to access LDAP directories
+hiding the subtleties of handling the connection, translating arguments
+and ensuring compliance with LDAP internationalization rules and formats
+(currently partly implemented only). See *note The High-Level LDAP API::
+
+ Note that the former functions `ldap-*-internal' functions have been
+renamed in XEmacs 21.2
+
+* Menu:
+
+* The LDAP Lisp Object::
+* Opening and Closing a LDAP Connection::
+* Low-level Operations on a LDAP Server::
+
+\1f
+File: lispref.info, Node: The LDAP Lisp Object, Next: Opening and Closing a LDAP Connection, Prev: The Low-Level LDAP API, Up: The Low-Level LDAP API
+
+The LDAP Lisp Object
+....................
+
+ An internal built-in `ldap' lisp object represents a LDAP connection.
+
+ - Function: ldapp object
+ This function returns non-`nil' if OBJECT is a `ldap' object.
+
+ - Function: ldap-host ldap
+ Return the server host of the connection represented by LDAP
+
+ - Function: ldap-live-p ldap
+ Return non-`nil' if LDAP is an active LDAP connection
+
+\1f
+File: lispref.info, Node: Opening and Closing a LDAP Connection, Next: Low-level Operations on a LDAP Server, Prev: The LDAP Lisp Object, Up: The Low-Level LDAP API
+
+Opening and Closing a LDAP Connection
+.....................................
+
+ - Function: ldap-open host &optional plist
+ Open a LDAP connection to HOST. PLIST is a property list
+ containing additional parameters for the connection. Valid keys
+ in that list are:
+ `port'
+ The TCP port to use for the connection if different from
+ `ldap-default-port' or the library builtin value
+
+ `auth'
+ The authentication method to use, possible values depend on
+ the LDAP library XEmacs was compiled with, they may include
+ `simple', `krbv41' and `krbv42'.
+
+ `binddn'
+ The distinguished name of the user to bind as. This may look
+ like `c=com, o=Acme, cn=Babs Jensen', see RFC 1779 for
+ details.
+
+ `passwd'
+ The password to use for authentication.
+
+ `deref'
+ The dereference policy is one of the symbols `never',
+ `always', `search' or `find' and defines how aliases are
+ dereferenced.
+ `never'
+ Aliases are never dereferenced
+
+ `always'
+ Aliases are always dereferenced
+
+ `search'
+ Aliases are dereferenced when searching
+
+ `find'
+ Aliases are dereferenced when locating the base object
+ for the search The default is `never'.
+
+ `timelimit'
+ The timeout limit for the connection in seconds.
+
+ `sizelimit'
+ The maximum number of matches to return for searches
+ performed on this connection.
+
+ - Function: ldap-close ldap
+ Close the connection represented by LDAP
+
+\1f
+File: lispref.info, Node: Low-level Operations on a LDAP Server, Prev: Opening and Closing a LDAP Connection, Up: The Low-Level LDAP API
+
+Low-level Operations on a LDAP Server
+.....................................
+
+ `ldap-search-basic' is the low-level primitive to perform a search
+on a LDAP server. It works directly on an open LDAP connection thus
+requiring a preliminary call to `ldap-open'. Multiple searches can be
+made on the same connection, then the session must be closed with
+`ldap-close'.
+
+ - Function: ldap-search-basic ldap filter base scope attrs attrsonly
+ Perform a search on an open connection LDAP created with
+ `ldap-open'. FILTER is a filter string for the search *note
+ Syntax of Search Filters:: BASE is the distinguished name at which
+ to start the search. SCOPE is one of the symbols `base',
+ `onelevel' or `subtree' indicating the scope of the search limited
+ to a base object, to a single level or to the whole subtree. The
+ default is `subtree'. `attrs' is a list of strings indicating
+ which attributes to retrieve for each matching entry. If `nil' all
+ available attributes are returned. If `attrsonly' is non-`nil'
+ then only the attributes are retrieved, not their associated values
+ If `withdn' is non-`nil' then each entry in the result is
+ prepended with its distinguished name DN If `verbose' is non-`nil'
+ then progress messages are echoed The function returns a list of
+ matching entries. Each entry is itself an alist of
+ attribute/value pairs optionally preceded by the DN of the entry
+ according to the value of `withdn'.
+
+ - Function: ldap-add ldap dn entry
+ Add ENTRY to a LDAP directory which a connection LDAP has been
+ opened to with `ldap-open'. DN is the distinguished name of the
+ entry to add. ENTRY is an entry specification, i.e., a list of
+ cons cells containing attribute/value string pairs.
+
+ - Function: ldap-modify ldap dn mods
+ Modify an entry in an LDAP directory. LDAP is an LDAP connection
+ object created with `ldap-open'. DN is the distinguished name of
+ the entry to modify. MODS is a list of modifications to apply. A
+ modification is a list of the form `(MOD-OP ATTR VALUE1 VALUE2
+ ...)' MOD-OP and ATTR are mandatory, VALUES are optional
+ depending on MOD-OP. MOD-OP is the type of modification, one of
+ the symbols `add', `delete' or `replace'. ATTR is the LDAP
+ attribute type to modify
+
+ - Function: ldap-delete ldap dn
+ Delete an entry to an LDAP directory. LDAP is an LDAP connection
+ object created with `ldap-open'. DN is the distinguished name of
+ the entry to delete
+
+\1f
+File: lispref.info, Node: LDAP Internationalization, Prev: The Low-Level LDAP API, Up: XEmacs LDAP API
+
+LDAP Internationalization
+-------------------------
+
+ The XEmacs LDAP API provides basic internationalization features
+based on the LDAP v3 specification (essentially RFC2252 on "LDAP v3
+Attribute Syntax Definitions"). Unfortunately since there is currently
+no free LDAP v3 server software, this part has not received much
+testing and should be considered experimental. The framework is in
+place though.
+
+ - Function: ldap-decode-attribute attr
+ Decode the attribute/value pair ATTR according to LDAP rules. The
+ attribute name is looked up in `ldap-attribute-syntaxes-alist' and
+ the corresponding decoder is then retrieved from
+ `ldap-attribute-syntax-decoders'' and applied on the value(s).
+
+* Menu:
+
+* LDAP Internationalization Variables::
+* Encoder/Decoder Functions::
+
+\1f
+File: lispref.info, Node: LDAP Internationalization Variables, Next: Encoder/Decoder Functions, Prev: LDAP Internationalization, Up: LDAP Internationalization
+
+LDAP Internationalization Variables
+...................................
+
+ - Variable: ldap-ignore-attribute-codings
+ If non-`nil', no encoding/decoding will be performed LDAP
+ attribute values
+
+ - Variable: ldap-coding-system
+ Coding system of LDAP string values. LDAP v3 specifies the coding
+ system of strings to be UTF-8. You need an XEmacs with Mule
+ support for this.
+
+ - Variable: ldap-default-attribute-decoder
+ Decoder function to use for attributes whose syntax is unknown.
+ Such a function receives an encoded attribute value as a string
+ and should return the decoded value as a string
+
+ - Variable: ldap-attribute-syntax-encoders
+ A vector of functions used to encode LDAP attribute values. The
+ sequence of functions corresponds to the sequence of LDAP
+ attribute syntax object identifiers of the form
+ 1.3.6.1.4.1.1466.1115.121.1.* as defined in RFC2252 section 4.3.2.
+ As of this writing, only a few encoder functions are available.
+
+ - Variable: ldap-attribute-syntax-decoders
+ A vector of functions used to decode LDAP attribute values. The
+ sequence of functions corresponds to the sequence of LDAP
+ attribute syntax object identifiers of the form
+ 1.3.6.1.4.1.1466.1115.121.1.* as defined in RFC2252 section 4.3.2.
+ As of this writing, only a few decoder functions are available.
+
+ - Variable: ldap-attribute-syntaxes-alist
+ A map of LDAP attribute names to their type object id minor number.
+ This table is built from RFC2252 Section 5 and RFC2256 Section 5
+
+\1f
+File: lispref.info, Node: Encoder/Decoder Functions, Prev: LDAP Internationalization Variables, Up: LDAP Internationalization
+
+Encoder/Decoder Functions
+.........................
+
+ - Function: ldap-encode-boolean bool
+ A function that encodes an elisp boolean BOOL into a LDAP boolean
+ string representation
+
+ - Function: ldap-decode-boolean str
+ A function that decodes a LDAP boolean string representation STR
+ into an elisp boolean
+
+ - Function: ldap-decode-string str
+ Decode a string STR according to `ldap-coding-system'
+
+ - Function: ldap-encode-string str
+ Encode a string STR according to `ldap-coding-system'
+
+ - Function: ldap-decode-address str
+ Decode an address STR according to `ldap-coding-system' and
+ replacing $ signs with newlines as specified by LDAP encoding
+ rules for addresses
+
+ - Function: ldap-encode-address str
+ Encode an address STR according to `ldap-coding-system' and
+ replacing newlines with $ signs as specified by LDAP encoding
+ rules for addresses
+
+\1f
+File: lispref.info, Node: Syntax of Search Filters, Prev: XEmacs LDAP API, Up: LDAP Support
+
+Syntax of Search Filters
+========================
+
+ LDAP search functions use RFC1558 syntax to describe the search
+filter. In that syntax simple filters have the form:
+
+ (<attr> <filtertype> <value>)
+
+ `<attr>' is an attribute name such as `cn' for Common Name, `o' for
+Organization, etc...
+
+ `<value>' is the corresponding value. This is generally an exact
+string but may also contain `*' characters as wildcards
+
+ `filtertype' is one `=' `~=', `<=', `>=' which respectively describe
+equality, approximate equality, inferiority and superiority.
+
+ Thus `(cn=John Smith)' matches all records having a canonical name
+equal to John Smith.
+
+ A special case is the presence filter `(<attr>=*' which matches
+records containing a particular attribute. For instance `(mail=*)'
+matches all records containing a `mail' attribute.
+
+ Simple filters can be connected together with the logical operators
+`&', `|' and `!' which stand for the usual and, or and not operators.
+
+ `(&(objectClass=Person)(mail=*)(|(sn=Smith)(givenname=John)))'
+matches records of class `Person' containing a `mail' attribute and
+corresponding to people whose last name is `Smith' or whose first name
+is `John'.
+
+\1f
+File: lispref.info, Node: PostgreSQL Support, Next: Internationalization, Prev: LDAP Support, Up: Top
+
+PostgreSQL Support
+******************
+
+ XEmacs can be linked with PostgreSQL libpq run-time support to
+provide relational database access from Emacs Lisp code.
+
+* Menu:
+
+* Building XEmacs with PostgreSQL support::
+* XEmacs PostgreSQL libpq API::
+* XEmacs PostgreSQL libpq Examples::
+
+\1f
+File: lispref.info, Node: Building XEmacs with PostgreSQL support, Next: XEmacs PostgreSQL libpq API, Up: PostgreSQL Support
+
+Building XEmacs with PostgreSQL support
+=======================================
+
+ XEmacs PostgreSQL support requires linking to the PostgreSQL libpq.so
+library. Describing how to build and install PostgreSQL is beyond the
+scope of this document, see the PostgreSQL manual for details.
+
+ If you have installed XEmacs from one of the binary kits on
+(<ftp://ftp.xemacs.org/>), or are using an XEmacs binary from a CD ROM,
+you should have XEmacs PostgreSQL support by default. If you are
+building XEmacs from source on a Linux system with PostgreSQL installed
+into the default location, it should be autodetected when you run
+configure. If you have installed PostgreSQL into its non-Linux default
+location, `/usr/local/pgsql', you must specify
+`--site-prefixes=/usr/local/pgsql' when you run configure. If you
+installed PostgreSQL into another location, use that instead of
+`/usr/local/pgsql' when specifying `--site-prefixes'.
+
+ As of XEmacs 21.2, PostgreSQL versions 6.5.3 and 7.0 are supported.
+XEmacs Lisp support for V7.0 is somewhat more extensive than support for
+V6.5. In particular, asynchronous queries are supported.
+
+\1f
+File: lispref.info, Node: XEmacs PostgreSQL libpq API, Next: XEmacs PostgreSQL libpq Examples, Prev: Building XEmacs with PostgreSQL support, Up: PostgreSQL Support
+
+XEmacs PostgreSQL libpq API
+===========================
+
+ XEmacs PostgreSQL API is intended to be a policy-free, low-level
+binding to libpq. The intent is to provide all the basic functionality
+and then let high level Lisp code decide its own policies.
+
+ This documentation assumes that the reader has knowledge of SQL, but
+requires no prior knowledge of libpq.
+
+ There are many examples in this manual and some setup will be
+required. In order to run most of the following examples, the
+following code needs to be executed. In addition to the data is in
+this table, nearly all of the examples will assume that the free
+variable `P' refers to this database connection. The examples in the
+original edition of this manual were run against Postgres 7.0beta1.
+
+ (progn
+ (setq P (pq-connectdb ""))
+ ;; id is the primary key, shikona is a Japanese word that
+ ;; means `the professional name of a Sumo wrestler', and
+ ;; rank is the Sumo rank name.
+ (pq-exec P (concat "CREATE TABLE xemacs_test"
+ " (id int, shikona text, rank text);"))
+ (pq-exec P "COPY xemacs_test FROM stdin;")
+ (pq-put-line P "1\tMusashimaru\tYokuzuna\n")
+ (pq-put-line P "2\tDejima\tOozeki\n")
+ (pq-put-line P "3\tMusoyama\tSekiwake\n")
+ (pq-put-line P "4\tMiyabiyama\tSekiwake\n")
+ (pq-put-line P "5\tWakanoyama\tMaegashira\n")
+ (pq-put-line P "\\.\n")
+ (pq-end-copy P))
+ => nil
+
+* Menu:
+
+* libpq Lisp Variables::
+* libpq Lisp Symbols and DataTypes::
+* Synchronous Interface Functions::
+* Asynchronous Interface Functions::
+* Large Object Support::
+* Other libpq Functions::
+* Unimplemented libpq Functions::
+
+\1f
+File: lispref.info, Node: libpq Lisp Variables, Next: libpq Lisp Symbols and DataTypes, Prev: XEmacs PostgreSQL libpq API, Up: XEmacs PostgreSQL libpq API
+
+libpq Lisp Variables
+--------------------
+
+ Various Unix environment variables are used by libpq to provide
+defaults to the many different parameters. In the XEmacs Lisp API,
+these environment variables are bound to Lisp variables to provide more
+convenient access to Lisp Code. These variables are passed to the
+backend database server during the establishment of a database
+connection and when the `pq-setenv' call is made.
+
+ - Variable: pg:host
+ Initialized from the PGHOST environment variable. The default
+ host to connect to.
+
+ - Variable: pg:user
+ Initialized from the PGUSER environment variable. The default
+ database user name.
+
+ - Variable: pg:options
+ Initialized from the PGOPTIONS environment variable. Default
+ additional server options.
+
+ - Variable: pg:port
+ Initialized from the PGPORT environment variable. The default TCP
+ port to connect to.
+
+ - Variable: pg:tty
+ Initialized from the PGTTY environment variable. The default
+ debugging TTY.
+
+ Compatibility note: Debugging TTYs are turned off in the XEmacs
+ Lisp binding.
+
+ - Variable: pg:database
+ Initialized from the PGDATABASE environment variable. The default
+ database to connect to.
+
+ - Variable: pg:realm
+ Initialized from the PGREALM environment variable. The default
+ Kerberos realm.
+
+ - Variable: pg:client-encoding
+ Initialized from the PGCLIENTENCODING environment variable. The
+ default client encoding.
+
+ Compatibility note: This variable is not present in non-Mule
+ XEmacsen. This variable is not present in versions of libpq prior
+ to 7.0. In the current implementation, client encoding is
+ equivalent to the `file-name-coding-system' format.
+
+ - Variable: pg:authtype
+ Initialized from the PGAUTHTYPE environment variable. The default
+ authentication scheme used.
+
+ Compatibility note: This variable is unused in versions of libpq
+ after 6.5. It is not implemented at all in the XEmacs Lisp
+ binding.
+
+ - Variable: pg:geqo
+ Initialized from the PGGEQO environment variable. Genetic
+ optimizer options.
+
+ - Variable: pg:cost-index
+ Initialized from the PGCOSTINDEX environment variable. Cost index
+ options.
+
+ - Variable: pg:cost-heap
+ Initialized from the PGCOSTHEAP environment variable. Cost heap
+ options.
+
+ - Variable: pg:tz
+ Initialized from the PGTZ environment variable. Default timezone.
+
+ - Variable: pg:date-style
+ Initialized from the PGDATESTYLE environment variable. Default
+ date style in returned date objects.
+
+ - Variable: pg-coding-system
+ This is a variable controlling which coding system is used to
+ encode non-ASCII strings sent to the database.
+
+ Compatibility Note: This variable is not present in InfoDock.
+
+\1f
File: lispref.info, Node: libpq Lisp Symbols and DataTypes, Next: Synchronous Interface Functions, Prev: libpq Lisp Variables, Up: XEmacs PostgreSQL libpq API
libpq Lisp Symbols and Datatypes
The data is returned as a list of lists, where each sublist
contains info regarding a single option.
-\1f
-File: lispref.info, Node: Unimplemented libpq Functions, Prev: Other libpq Functions, Up: XEmacs PostgreSQL libpq API
-
-Unimplemented libpq Functions
------------------------------
-
- - Unimplemented Function: PGconn *PQsetdbLogin (char *pghost, char
- *pgport, char *pgoptions, char *pgtty, char *dbName, char
- *login, char *pwd)
- Synchronous database connection. PGHOST is the hostname of the
- PostgreSQL backend to connect to. PGPORT is the TCP port number
- to use. PGOPTIONS specifies other backend options. PGTTY
- specifies the debugging tty to use. DBNAME specifies the database
- name to use. LOGIN specifies the database user name. PWD
- specifies the database user's password.
-
- This routine is deprecated as of libpq-7.0, and its functionality
- can be replaced by external Lisp code if needed.
-
- - Unimplemented Function: PGconn *PQsetdb (char *pghost, char *pgport,
- char *pgoptions, char *pgtty, char *dbName)
- Synchronous database connection. PGHOST is the hostname of the
- PostgreSQL backend to connect to. PGPORT is the TCP port number
- to use. PGOPTIONS specifies other backend options. PGTTY
- specifies the debugging tty to use. DBNAME specifies the database
- name to use.
-
- This routine was deprecated in libpq-6.5.
-
- - Unimplemented Function: int PQsocket (PGconn *conn)
- Return socket file descriptor to a backend database process. CONN
- database connection object.
-
- - Unimplemented Function: void PQprint (FILE *fout, PGresult *res,
- PGprintOpt *ps)
- Print out the results of a query to a designated C stream. FOUT C
- stream to print to RES the query result object to print PS the
- print options structure.
-
- This routine is deprecated as of libpq-7.0 and cannot be sensibly
- exported to XEmacs Lisp.
-
- - Unimplemented Function: void PQdisplayTuples (PGresult *res, FILE
- *fp, int fillAlign, char *fieldSep, int printHeader, int
- quiet)
- RES query result object to print FP C stream to print to FILLALIGN
- pad the fields with spaces FIELDSEP field separator PRINTHEADER
- display headers? QUIET
-
- This routine was deprecated in libpq-6.5.
-
- - Unimplemented Function: void PQprintTuples (PGresult *res, FILE
- *fout, int printAttName, int terseOutput, int width)
- RES query result object to print FOUT C stream to print to
- PRINTATTNAME print attribute names TERSEOUTPUT delimiter bars
- WIDTH width of column, if 0, use variable width
-
- This routine was deprecated in libpq-6.5.
-
- - Unimplemented Function: int PQmblen (char *s, int encoding)
- Determine length of a multibyte encoded char at `*s'. S encoded
- string ENCODING type of encoding
-
- Compatibility note: This function was introduced in libpq-7.0.
-
- - Unimplemented Function: void PQtrace (PGconn *conn, FILE *debug_port)
- Enable tracing on `debug_port'. CONN database connection object.
- DEBUG_PORT C output stream to use.
-
- - Unimplemented Function: void PQuntrace (PGconn *conn)
- Disable tracing. CONN database connection object.
-
- - Unimplemented Function: char *PQoidStatus (PGconn *conn)
- Return the object id as a string of the last tuple inserted. CONN
- database connection object.
-
- Compatibility note: This function is deprecated in libpq-7.0,
- however it is used internally by the XEmacs binding code when
- linked against versions prior to 7.0.
-
- - Unimplemented Function: PGresult *PQfn (PGconn *conn, int fnid, int
- *result_buf, int *result_len, int result_is_int, PQArgBlock
- *args, int nargs)
- "Fast path" interface -- not really recommended for application use
- CONN A database connection object. FNID RESULT_BUF RESULT_LEN
- RESULT_IS_INT ARGS NARGS
-
- The following set of very low level large object functions aren't
-appropriate to be exported to Lisp.
-
- - Unimplemented Function: int pq-lo-open (PGconn *conn, int lobjid,
- int mode)
- CONN a database connection object. LOBJID a large object ID.
- MODE opening modes.
-
- - Unimplemented Function: int pq-lo-close (PGconn *conn, int fd)
- CONN a database connection object. FD a large object file
- descriptor
-
- - Unimplemented Function: int pq-lo-read (PGconn *conn, int fd, char
- *buf, int len)
- CONN a database connection object. FD a large object file
- descriptor. BUF buffer to read into. LEN size of buffer.
-
- - Unimplemented Function: int pq-lo-write (PGconn *conn, int fd, char
- *buf, size_t len)
- CONN a database connection object. FD a large object file
- descriptor. BUF buffer to write from. LEN size of buffer.
-
- - Unimplemented Function: int pq-lo-lseek (PGconn *conn, int fd, int
- offset, int whence)
- CONN a database connection object. FD a large object file
- descriptor. OFFSET WHENCE
-
- - Unimplemented Function: int pq-lo-creat (PGconn *conn, int mode)
- CONN a database connection object. MODE opening modes.
-
- - Unimplemented Function: int pq-lo-tell (PGconn *conn, int fd)
- CONN a database connection object. FD a large object file
- descriptor.
-
- - Unimplemented Function: int pq-lo-unlink (PGconn *conn, int lobjid)
- CONN a database connection object. LBOJID a large object ID.
-
-\1f
-File: lispref.info, Node: XEmacs PostgreSQL libpq Examples, Prev: XEmacs PostgreSQL libpq API, Up: PostgreSQL Support
-
-XEmacs PostgreSQL libpq Examples
-================================
-
- This is an example of one method of establishing an asynchronous
-connection.
-
- (defun database-poller (P)
- (message "%S before poll" (pq-pgconn P 'pq::status))
- (pq-connect-poll P)
- (message "%S after poll" (pq-pgconn P 'pq::status))
- (if (eq (pq-pgconn P 'pq::status) 'pg::connection-ok)
- (message "Done!")
- (add-timeout .1 'database-poller P)))
- => database-poller
- (progn
- (setq P (pq-connect-start ""))
- (add-timeout .1 'database-poller P))
- => pg::connection-started before poll
- => pg::connection-made after poll
- => pg::connection-made before poll
- => pg::connection-awaiting-response after poll
- => pg::connection-awaiting-response before poll
- => pg::connection-auth-ok after poll
- => pg::connection-auth-ok before poll
- => pg::connection-setenv after poll
- => pg::connection-setenv before poll
- => pg::connection-ok after poll
- => Done!
- P
- => #<PGconn localhost:25432 steve/steve>
-
- Here is an example of one method of doing an asynchronous reset.
-
- (defun database-poller (P)
- (let (PS)
- (message "%S before poll" (pq-pgconn P 'pq::status))
- (setq PS (pq-reset-poll P))
- (message "%S after poll [%S]" (pq-pgconn P 'pq::status) PS)
- (if (eq (pq-pgconn P 'pq::status) 'pg::connection-ok)
- (message "Done!")
- (add-timeout .1 'database-poller P))))
- => database-poller
- (progn
- (pq-reset-start P)
- (add-timeout .1 'database-poller P))
- => pg::connection-started before poll
- => pg::connection-made after poll [pgres::polling-writing]
- => pg::connection-made before poll
- => pg::connection-awaiting-response after poll [pgres::polling-reading]
- => pg::connection-awaiting-response before poll
- => pg::connection-setenv after poll [pgres::polling-reading]
- => pg::connection-setenv before poll
- => pg::connection-ok after poll [pgres::polling-ok]
- => Done!
- P
- => #<PGconn localhost:25432 steve/steve>
-
- And finally, an asynchronous query.
-
- (defun database-poller (P)
- (let (R)
- (pq-consume-input P)
- (if (pq-is-busy P)
- (add-timeout .1 'database-poller P)
- (setq R (pq-get-result P))
- (if R
- (progn
- (push R result-list)
- (add-timeout .1 'database-poller P))))))
- => database-poller
- (when (pq-send-query P "SELECT * FROM xemacs_test;")
- (setq result-list nil)
- (add-timeout .1 'database-poller P))
- => 885
- ;; wait a moment
- result-list
- => (#<PGresult PGRES_TUPLES_OK - SELECT>)
-
- Here is an example showing how multiple SQL statements in a single
-query can have all their results collected.
- ;; Using the same `database-poller' function from the previous example
- (when (pq-send-query P "SELECT * FROM xemacs_test;
- SELECT * FROM pg_database;
- SELECT * FROM pg_user;")
- (setq result-list nil)
- (add-timeout .1 'database-poller P))
- => 1782
- ;; wait a moment
- result-list
- => (#<PGresult PGRES_TUPLES_OK - SELECT> #<PGresult PGRES_TUPLES_OK - SELECT> #<PGresult PGRES_TUPLES_OK - SELECT>)
-
- Here is an example which illustrates collecting all data from a
-query, including the field names.
-
- (defun pg-util-query-results (results)
- "Retrieve results of last SQL query into a list structure."
- (let ((i (1- (pq-ntuples R)))
- j l1 l2)
- (while (>= i 0)
- (setq j (1- (pq-nfields R)))
- (setq l2 nil)
- (while (>= j 0)
- (push (pq-get-value R i j) l2)
- (decf j))
- (push l2 l1)
- (decf i))
- (setq j (1- (pq-nfields R)))
- (setq l2 nil)
- (while (>= j 0)
- (push (pq-fname R j) l2)
- (decf j))
- (push l2 l1)
- l1))
- => pg-util-query-results
- (setq R (pq-exec P "SELECT * FROM xemacs_test ORDER BY field2 DESC;"))
- => #<PGresult PGRES_TUPLES_OK - SELECT>
- (pg-util-query-results R)
- => (("f1" "field2") ("a" "97") ("b" "97") ("stuff" "42") ("a string" "12") ("foo" "10") ("string" "2") ("text" "1"))
-
- Here is an example of a query that uses a database cursor.
-
- (let (data R)
- (setq R (pq-exec P "BEGIN;"))
- (setq R (pq-exec P "DECLARE k_cursor CURSOR FOR SELECT * FROM xemacs_test ORDER BY f1 DESC;"))
-
- (setq R (pq-exec P "FETCH k_cursor;"))
- (while (eq (pq-ntuples R) 1)
- (push (list (pq-get-value R 0 0) (pq-get-value R 0 1)) data)
- (setq R (pq-exec P "FETCH k_cursor;")))
- (setq R (pq-exec P "END;"))
- data)
- => (("a" "97") ("a string" "12") ("b" "97") ("foo" "10") ("string" "2") ("stuff" "42") ("text" "1"))
-
- Here's another example of cursors, this time with a Lisp macro to
-implement a mapping function over a table.
-
- (defmacro map-db (P table condition callout)
- `(let (R)
- (pq-exec ,P "BEGIN;")
- (pq-exec ,P (concat "DECLARE k_cursor CURSOR FOR SELECT * FROM "
- ,table
- " "
- ,condition
- " ORDER BY f1 DESC;"))
- (setq R (pq-exec P "FETCH k_cursor;"))
- (while (eq (pq-ntuples R) 1)
- (,callout (pq-get-value R 0 0) (pq-get-value R 0 1))
- (setq R (pq-exec P "FETCH k_cursor;")))
- (pq-exec P "END;")))
- => map-db
- (defun callback (arg1 arg2)
- (message "arg1 = %s, arg2 = %s" arg1 arg2))
- => callback
- (map-db P "xemacs_test" "WHERE field2 > 10" callback)
- => arg1 = stuff, arg2 = 42
- => arg1 = b, arg2 = 97
- => arg1 = a string, arg2 = 12
- => arg1 = a, arg2 = 97
- => #<PGresult PGRES_COMMAND_OK - COMMIT>
-
-\1f
-File: lispref.info, Node: Internationalization, Next: MULE, Prev: PostgreSQL Support, Up: Top
-
-Internationalization
-********************
-
-* Menu:
-
-* I18N Levels 1 and 2:: Support for different time, date, and currency formats.
-* I18N Level 3:: Support for localized messages.
-* I18N Level 4:: Support for Asian languages.
-
-\1f
-File: lispref.info, Node: I18N Levels 1 and 2, Next: I18N Level 3, Up: Internationalization
-
-I18N Levels 1 and 2
-===================
-
- XEmacs is now compliant with I18N levels 1 and 2. Specifically,
-this means that it is 8-bit clean and correctly handles time and date
-functions. XEmacs will correctly display the entire ISO-Latin 1
-character set.
-
- The compose key may now be used to create any character in the
-ISO-Latin 1 character set not directly available via the keyboard.. In
-order for the compose key to work it is necessary to load the file
-`x-compose.el'. At any time while composing a character, `C-h' will
-display all valid completions and the character which would be produced.
-
-\1f
-File: lispref.info, Node: I18N Level 3, Next: I18N Level 4, Prev: I18N Levels 1 and 2, Up: Internationalization
-
-I18N Level 3
-============
-
-* Menu:
-
-* Level 3 Basics::
-* Level 3 Primitives::
-* Dynamic Messaging::
-* Domain Specification::
-* Documentation String Extraction::
-
-\1f
-File: lispref.info, Node: Level 3 Basics, Next: Level 3 Primitives, Up: I18N Level 3
-
-Level 3 Basics
---------------
-
- XEmacs now provides alpha-level functionality for I18N Level 3.
-This means that everything necessary for full messaging is available,
-but not every file has been converted.
-
- The two message files which have been created are `src/emacs.po' and
-`lisp/packages/mh-e.po'. Both files need to be converted using
-`msgfmt', and the resulting `.mo' files placed in some locale's
-`LC_MESSAGES' directory. The test "translations" in these files are
-the original messages prefixed by `TRNSLT_'.
-
- The domain for a variable is stored on the variable's property list
-under the property name VARIABLE-DOMAIN. The function
-`documentation-property' uses this information when translating a
-variable's documentation.
-
-\1f
-File: lispref.info, Node: Level 3 Primitives, Next: Dynamic Messaging, Prev: Level 3 Basics, Up: I18N Level 3
-
-Level 3 Primitives
-------------------
-
- - Function: gettext string
- This function looks up STRING in the default message domain and
- returns its translation. If `I18N3' was not enabled when XEmacs
- was compiled, it just returns STRING.
-
- - Function: dgettext domain string
- This function looks up STRING in the specified message domain and
- returns its translation. If `I18N3' was not enabled when XEmacs
- was compiled, it just returns STRING.
-
- - Function: bind-text-domain domain pathname
- This function associates a pathname with a message domain. Here's
- how the path to message file is constructed under SunOS 5.x:
-
- `{pathname}/{LANG}/LC_MESSAGES/{domain}.mo'
-
- If `I18N3' was not enabled when XEmacs was compiled, this function
- does nothing.
-
- - Special Form: domain string
- This function specifies the text domain used for translating
- documentation strings and interactive prompts of a function. For
- example, write:
-
- (defun foo (arg) "Doc string" (domain "emacs-foo") ...)
-
- to specify `emacs-foo' as the text domain of the function `foo'.
- The "call" to `domain' is actually a declaration rather than a
- function; when actually called, `domain' just returns `nil'.
-
- - Function: domain-of function
- This function returns the text domain of FUNCTION; it returns
- `nil' if it is the default domain. If `I18N3' was not enabled
- when XEmacs was compiled, it always returns `nil'.
-
-\1f
-File: lispref.info, Node: Dynamic Messaging, Next: Domain Specification, Prev: Level 3 Primitives, Up: I18N Level 3
-
-Dynamic Messaging
------------------
-
- The `format' function has been extended to permit you to change the
-order of parameter insertion. For example, the conversion format
-`%1$s' inserts parameter one as a string, while `%2$s' inserts
-parameter two. This is useful when creating translations which require
-you to change the word order.
-
-\1f
-File: lispref.info, Node: Domain Specification, Next: Documentation String Extraction, Prev: Dynamic Messaging, Up: I18N Level 3
-
-Domain Specification
---------------------
-
- The default message domain of XEmacs is `emacs'. For add-on
-packages, it is best to use a different domain. For example, let us
-say we want to convert the "gorilla" package to use the domain
-`emacs-gorilla'. To translate the message "What gorilla?", use
-`dgettext' as follows:
-
- (dgettext "emacs-gorilla" "What gorilla?")
-
- A function (or macro) which has a documentation string or an
-interactive prompt needs to be associated with the domain in order for
-the documentation or prompt to be translated. This is done with the
-`domain' special form as follows:
-
- (defun scratch (location)
- "Scratch the specified location."
- (domain "emacs-gorilla")
- (interactive "sScratch: ")
- ... )
-
- It is most efficient to specify the domain in the first line of the
-function body, before the `interactive' form.
-
- For variables and constants which have documentation strings,
-specify the domain after the documentation.
-
- - Special Form: defvar symbol [value [doc-string [domain]]]
- Example:
- (defvar weight 250 "Weight of gorilla, in pounds." "emacs-gorilla")
-
- - Special Form: defconst symbol [value [doc-string [domain]]]
- Example:
- (defconst limbs 4 "Number of limbs" "emacs-gorilla")
-
- Autoloaded functions which are specified in `loaddefs.el' do not need
-to have a domain specification, because their documentation strings are
-extracted into the main message base. However, for autoloaded functions
-which are specified in a separate package, use following syntax:
-
- - Function: autoload symbol filename &optional docstring interactive
- macro domain
- Example:
- (autoload 'explore "jungle" "Explore the jungle." nil nil "emacs-gorilla")
-
-\1f
-File: lispref.info, Node: Documentation String Extraction, Prev: Domain Specification, Up: I18N Level 3
-
-Documentation String Extraction
--------------------------------
-
- The utility `etc/make-po' scans the file `DOC' to extract
-documentation strings and creates a message file `doc.po'. This file
-may then be inserted within `emacs.po'.
-
- Currently, `make-po' is hard-coded to read from `DOC' and write to
-`doc.po'. In order to extract documentation strings from an add-on
-package, first run `make-docfile' on the package to produce the `DOC'
-file. Then run `make-po -p' with the `-p' argument to indicate that we
-are extracting documentation for an add-on package.
-
- (The `-p' argument is a kludge to make up for a subtle difference
-between pre-loaded documentation and add-on documentation: For add-on
-packages, the final carriage returns in the strings produced by
-`make-docfile' must be ignored.)
-
-\1f
-File: lispref.info, Node: I18N Level 4, Prev: I18N Level 3, Up: Internationalization
-
-I18N Level 4
-============
-
- The Asian-language support in XEmacs is called "MULE". *Note MULE::.
-
-\1f
-File: lispref.info, Node: MULE, Next: Tips, Prev: Internationalization, Up: Top
-
-MULE
-****
-
- "MULE" is the name originally given to the version of GNU Emacs
-extended for multi-lingual (and in particular Asian-language) support.
-"MULE" is short for "MUlti-Lingual Emacs". It is an extension and
-complete rewrite of Nemacs ("Nihon Emacs" where "Nihon" is the Japanese
-word for "Japan"), which only provided support for Japanese. XEmacs
-refers to its multi-lingual support as "MULE support" since it is based
-on "MULE".
-
-* Menu:
-
-* Internationalization Terminology::
- Definition of various internationalization terms.
-* Charsets:: Sets of related characters.
-* MULE Characters:: Working with characters in XEmacs/MULE.
-* Composite Characters:: Making new characters by overstriking other ones.
-* Coding Systems:: Ways of representing a string of chars using integers.
-* CCL:: A special language for writing fast converters.
-* Category Tables:: Subdividing charsets into groups.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Unimplemented libpq Functions, Prev: Other libpq Functions, Up: XEmacs PostgreSQL libpq API
+
+Unimplemented libpq Functions
+-----------------------------
+
+ - Unimplemented Function: PGconn *PQsetdbLogin (char *pghost, char
+ *pgport, char *pgoptions, char *pgtty, char *dbName, char
+ *login, char *pwd)
+ Synchronous database connection. PGHOST is the hostname of the
+ PostgreSQL backend to connect to. PGPORT is the TCP port number
+ to use. PGOPTIONS specifies other backend options. PGTTY
+ specifies the debugging tty to use. DBNAME specifies the database
+ name to use. LOGIN specifies the database user name. PWD
+ specifies the database user's password.
+
+ This routine is deprecated as of libpq-7.0, and its functionality
+ can be replaced by external Lisp code if needed.
+
+ - Unimplemented Function: PGconn *PQsetdb (char *pghost, char *pgport,
+ char *pgoptions, char *pgtty, char *dbName)
+ Synchronous database connection. PGHOST is the hostname of the
+ PostgreSQL backend to connect to. PGPORT is the TCP port number
+ to use. PGOPTIONS specifies other backend options. PGTTY
+ specifies the debugging tty to use. DBNAME specifies the database
+ name to use.
+
+ This routine was deprecated in libpq-6.5.
+
+ - Unimplemented Function: int PQsocket (PGconn *conn)
+ Return socket file descriptor to a backend database process. CONN
+ database connection object.
+
+ - Unimplemented Function: void PQprint (FILE *fout, PGresult *res,
+ PGprintOpt *ps)
+ Print out the results of a query to a designated C stream. FOUT C
+ stream to print to RES the query result object to print PS the
+ print options structure.
+
+ This routine is deprecated as of libpq-7.0 and cannot be sensibly
+ exported to XEmacs Lisp.
+
+ - Unimplemented Function: void PQdisplayTuples (PGresult *res, FILE
+ *fp, int fillAlign, char *fieldSep, int printHeader, int
+ quiet)
+ RES query result object to print FP C stream to print to FILLALIGN
+ pad the fields with spaces FIELDSEP field separator PRINTHEADER
+ display headers? QUIET
+
+ This routine was deprecated in libpq-6.5.
+
+ - Unimplemented Function: void PQprintTuples (PGresult *res, FILE
+ *fout, int printAttName, int terseOutput, int width)
+ RES query result object to print FOUT C stream to print to
+ PRINTATTNAME print attribute names TERSEOUTPUT delimiter bars
+ WIDTH width of column, if 0, use variable width
+
+ This routine was deprecated in libpq-6.5.
+
+ - Unimplemented Function: int PQmblen (char *s, int encoding)
+ Determine length of a multibyte encoded char at `*s'. S encoded
+ string ENCODING type of encoding
+
+ Compatibility note: This function was introduced in libpq-7.0.
+
+ - Unimplemented Function: void PQtrace (PGconn *conn, FILE *debug_port)
+ Enable tracing on `debug_port'. CONN database connection object.
+ DEBUG_PORT C output stream to use.
+
+ - Unimplemented Function: void PQuntrace (PGconn *conn)
+ Disable tracing. CONN database connection object.
+
+ - Unimplemented Function: char *PQoidStatus (PGconn *conn)
+ Return the object id as a string of the last tuple inserted. CONN
+ database connection object.
+
+ Compatibility note: This function is deprecated in libpq-7.0,
+ however it is used internally by the XEmacs binding code when
+ linked against versions prior to 7.0.
+
+ - Unimplemented Function: PGresult *PQfn (PGconn *conn, int fnid, int
+ *result_buf, int *result_len, int result_is_int, PQArgBlock
+ *args, int nargs)
+ "Fast path" interface -- not really recommended for application use
+ CONN A database connection object. FNID RESULT_BUF RESULT_LEN
+ RESULT_IS_INT ARGS NARGS
+
+ The following set of very low level large object functions aren't
+appropriate to be exported to Lisp.
+
+ - Unimplemented Function: int pq-lo-open (PGconn *conn, int lobjid,
+ int mode)
+ CONN a database connection object. LOBJID a large object ID.
+ MODE opening modes.
+
+ - Unimplemented Function: int pq-lo-close (PGconn *conn, int fd)
+ CONN a database connection object. FD a large object file
+ descriptor
+
+ - Unimplemented Function: int pq-lo-read (PGconn *conn, int fd, char
+ *buf, int len)
+ CONN a database connection object. FD a large object file
+ descriptor. BUF buffer to read into. LEN size of buffer.
+
+ - Unimplemented Function: int pq-lo-write (PGconn *conn, int fd, char
+ *buf, size_t len)
+ CONN a database connection object. FD a large object file
+ descriptor. BUF buffer to write from. LEN size of buffer.
+
+ - Unimplemented Function: int pq-lo-lseek (PGconn *conn, int fd, int
+ offset, int whence)
+ CONN a database connection object. FD a large object file
+ descriptor. OFFSET WHENCE
+
+ - Unimplemented Function: int pq-lo-creat (PGconn *conn, int mode)
+ CONN a database connection object. MODE opening modes.
+
+ - Unimplemented Function: int pq-lo-tell (PGconn *conn, int fd)
+ CONN a database connection object. FD a large object file
+ descriptor.
+
+ - Unimplemented Function: int pq-lo-unlink (PGconn *conn, int lobjid)
+ CONN a database connection object. LBOJID a large object ID.
+
+\1f
+File: lispref.info, Node: XEmacs PostgreSQL libpq Examples, Prev: XEmacs PostgreSQL libpq API, Up: PostgreSQL Support
+
+XEmacs PostgreSQL libpq Examples
+================================
+
+ This is an example of one method of establishing an asynchronous
+connection.
+
+ (defun database-poller (P)
+ (message "%S before poll" (pq-pgconn P 'pq::status))
+ (pq-connect-poll P)
+ (message "%S after poll" (pq-pgconn P 'pq::status))
+ (if (eq (pq-pgconn P 'pq::status) 'pg::connection-ok)
+ (message "Done!")
+ (add-timeout .1 'database-poller P)))
+ => database-poller
+ (progn
+ (setq P (pq-connect-start ""))
+ (add-timeout .1 'database-poller P))
+ => pg::connection-started before poll
+ => pg::connection-made after poll
+ => pg::connection-made before poll
+ => pg::connection-awaiting-response after poll
+ => pg::connection-awaiting-response before poll
+ => pg::connection-auth-ok after poll
+ => pg::connection-auth-ok before poll
+ => pg::connection-setenv after poll
+ => pg::connection-setenv before poll
+ => pg::connection-ok after poll
+ => Done!
+ P
+ => #<PGconn localhost:25432 steve/steve>
+
+ Here is an example of one method of doing an asynchronous reset.
+
+ (defun database-poller (P)
+ (let (PS)
+ (message "%S before poll" (pq-pgconn P 'pq::status))
+ (setq PS (pq-reset-poll P))
+ (message "%S after poll [%S]" (pq-pgconn P 'pq::status) PS)
+ (if (eq (pq-pgconn P 'pq::status) 'pg::connection-ok)
+ (message "Done!")
+ (add-timeout .1 'database-poller P))))
+ => database-poller
+ (progn
+ (pq-reset-start P)
+ (add-timeout .1 'database-poller P))
+ => pg::connection-started before poll
+ => pg::connection-made after poll [pgres::polling-writing]
+ => pg::connection-made before poll
+ => pg::connection-awaiting-response after poll [pgres::polling-reading]
+ => pg::connection-awaiting-response before poll
+ => pg::connection-setenv after poll [pgres::polling-reading]
+ => pg::connection-setenv before poll
+ => pg::connection-ok after poll [pgres::polling-ok]
+ => Done!
+ P
+ => #<PGconn localhost:25432 steve/steve>
+
+ And finally, an asynchronous query.
+
+ (defun database-poller (P)
+ (let (R)
+ (pq-consume-input P)
+ (if (pq-is-busy P)
+ (add-timeout .1 'database-poller P)
+ (setq R (pq-get-result P))
+ (if R
+ (progn
+ (push R result-list)
+ (add-timeout .1 'database-poller P))))))
+ => database-poller
+ (when (pq-send-query P "SELECT * FROM xemacs_test;")
+ (setq result-list nil)
+ (add-timeout .1 'database-poller P))
+ => 885
+ ;; wait a moment
+ result-list
+ => (#<PGresult PGRES_TUPLES_OK - SELECT>)
+
+ Here is an example showing how multiple SQL statements in a single
+query can have all their results collected.
+ ;; Using the same `database-poller' function from the previous example
+ (when (pq-send-query P "SELECT * FROM xemacs_test;
+ SELECT * FROM pg_database;
+ SELECT * FROM pg_user;")
+ (setq result-list nil)
+ (add-timeout .1 'database-poller P))
+ => 1782
+ ;; wait a moment
+ result-list
+ => (#<PGresult PGRES_TUPLES_OK - SELECT> #<PGresult PGRES_TUPLES_OK - SELECT> #<PGresult PGRES_TUPLES_OK - SELECT>)
+
+ Here is an example which illustrates collecting all data from a
+query, including the field names.
+
+ (defun pg-util-query-results (results)
+ "Retrieve results of last SQL query into a list structure."
+ (let ((i (1- (pq-ntuples R)))
+ j l1 l2)
+ (while (>= i 0)
+ (setq j (1- (pq-nfields R)))
+ (setq l2 nil)
+ (while (>= j 0)
+ (push (pq-get-value R i j) l2)
+ (decf j))
+ (push l2 l1)
+ (decf i))
+ (setq j (1- (pq-nfields R)))
+ (setq l2 nil)
+ (while (>= j 0)
+ (push (pq-fname R j) l2)
+ (decf j))
+ (push l2 l1)
+ l1))
+ => pg-util-query-results
+ (setq R (pq-exec P "SELECT * FROM xemacs_test ORDER BY field2 DESC;"))
+ => #<PGresult PGRES_TUPLES_OK - SELECT>
+ (pg-util-query-results R)
+ => (("f1" "field2") ("a" "97") ("b" "97") ("stuff" "42") ("a string" "12") ("foo" "10") ("string" "2") ("text" "1"))
+
+ Here is an example of a query that uses a database cursor.
+
+ (let (data R)
+ (setq R (pq-exec P "BEGIN;"))
+ (setq R (pq-exec P "DECLARE k_cursor CURSOR FOR SELECT * FROM xemacs_test ORDER BY f1 DESC;"))
+
+ (setq R (pq-exec P "FETCH k_cursor;"))
+ (while (eq (pq-ntuples R) 1)
+ (push (list (pq-get-value R 0 0) (pq-get-value R 0 1)) data)
+ (setq R (pq-exec P "FETCH k_cursor;")))
+ (setq R (pq-exec P "END;"))
+ data)
+ => (("a" "97") ("a string" "12") ("b" "97") ("foo" "10") ("string" "2") ("stuff" "42") ("text" "1"))
+
+ Here's another example of cursors, this time with a Lisp macro to
+implement a mapping function over a table.
+
+ (defmacro map-db (P table condition callout)
+ `(let (R)
+ (pq-exec ,P "BEGIN;")
+ (pq-exec ,P (concat "DECLARE k_cursor CURSOR FOR SELECT * FROM "
+ ,table
+ " "
+ ,condition
+ " ORDER BY f1 DESC;"))
+ (setq R (pq-exec P "FETCH k_cursor;"))
+ (while (eq (pq-ntuples R) 1)
+ (,callout (pq-get-value R 0 0) (pq-get-value R 0 1))
+ (setq R (pq-exec P "FETCH k_cursor;")))
+ (pq-exec P "END;")))
+ => map-db
+ (defun callback (arg1 arg2)
+ (message "arg1 = %s, arg2 = %s" arg1 arg2))
+ => callback
+ (map-db P "xemacs_test" "WHERE field2 > 10" callback)
+ => arg1 = stuff, arg2 = 42
+ => arg1 = b, arg2 = 97
+ => arg1 = a string, arg2 = 12
+ => arg1 = a, arg2 = 97
+ => #<PGresult PGRES_COMMAND_OK - COMMIT>
+
+\1f
+File: lispref.info, Node: Internationalization, Next: MULE, Prev: PostgreSQL Support, Up: Top
+
+Internationalization
+********************
+
+* Menu:
+
+* I18N Levels 1 and 2:: Support for different time, date, and currency formats.
+* I18N Level 3:: Support for localized messages.
+* I18N Level 4:: Support for Asian languages.
+
+\1f
+File: lispref.info, Node: I18N Levels 1 and 2, Next: I18N Level 3, Up: Internationalization
+
+I18N Levels 1 and 2
+===================
+
+ XEmacs is now compliant with I18N levels 1 and 2. Specifically,
+this means that it is 8-bit clean and correctly handles time and date
+functions. XEmacs will correctly display the entire ISO-Latin 1
+character set.
+
+ The compose key may now be used to create any character in the
+ISO-Latin 1 character set not directly available via the keyboard.. In
+order for the compose key to work it is necessary to load the file
+`x-compose.el'. At any time while composing a character, `C-h' will
+display all valid completions and the character which would be produced.
+
+\1f
+File: lispref.info, Node: I18N Level 3, Next: I18N Level 4, Prev: I18N Levels 1 and 2, Up: Internationalization
+
+I18N Level 3
+============
+
+* Menu:
+
+* Level 3 Basics::
+* Level 3 Primitives::
+* Dynamic Messaging::
+* Domain Specification::
+* Documentation String Extraction::
+
+\1f
+File: lispref.info, Node: Level 3 Basics, Next: Level 3 Primitives, Up: I18N Level 3
+
+Level 3 Basics
+--------------
+
+ XEmacs now provides alpha-level functionality for I18N Level 3.
+This means that everything necessary for full messaging is available,
+but not every file has been converted.
+
+ The two message files which have been created are `src/emacs.po' and
+`lisp/packages/mh-e.po'. Both files need to be converted using
+`msgfmt', and the resulting `.mo' files placed in some locale's
+`LC_MESSAGES' directory. The test "translations" in these files are
+the original messages prefixed by `TRNSLT_'.
+
+ The domain for a variable is stored on the variable's property list
+under the property name VARIABLE-DOMAIN. The function
+`documentation-property' uses this information when translating a
+variable's documentation.
+
+\1f
+File: lispref.info, Node: Level 3 Primitives, Next: Dynamic Messaging, Prev: Level 3 Basics, Up: I18N Level 3
+
+Level 3 Primitives
+------------------
+
+ - Function: gettext string
+ This function looks up STRING in the default message domain and
+ returns its translation. If `I18N3' was not enabled when XEmacs
+ was compiled, it just returns STRING.
+
+ - Function: dgettext domain string
+ This function looks up STRING in the specified message domain and
+ returns its translation. If `I18N3' was not enabled when XEmacs
+ was compiled, it just returns STRING.
+
+ - Function: bind-text-domain domain pathname
+ This function associates a pathname with a message domain. Here's
+ how the path to message file is constructed under SunOS 5.x:
+
+ `{pathname}/{LANG}/LC_MESSAGES/{domain}.mo'
+
+ If `I18N3' was not enabled when XEmacs was compiled, this function
+ does nothing.
+
+ - Special Form: domain string
+ This function specifies the text domain used for translating
+ documentation strings and interactive prompts of a function. For
+ example, write:
+
+ (defun foo (arg) "Doc string" (domain "emacs-foo") ...)
+
+ to specify `emacs-foo' as the text domain of the function `foo'.
+ The "call" to `domain' is actually a declaration rather than a
+ function; when actually called, `domain' just returns `nil'.
+
+ - Function: domain-of function
+ This function returns the text domain of FUNCTION; it returns
+ `nil' if it is the default domain. If `I18N3' was not enabled
+ when XEmacs was compiled, it always returns `nil'.
+
+\1f
+File: lispref.info, Node: Dynamic Messaging, Next: Domain Specification, Prev: Level 3 Primitives, Up: I18N Level 3
+
+Dynamic Messaging
+-----------------
+
+ The `format' function has been extended to permit you to change the
+order of parameter insertion. For example, the conversion format
+`%1$s' inserts parameter one as a string, while `%2$s' inserts
+parameter two. This is useful when creating translations which require
+you to change the word order.
+
+\1f
+File: lispref.info, Node: Domain Specification, Next: Documentation String Extraction, Prev: Dynamic Messaging, Up: I18N Level 3
+
+Domain Specification
+--------------------
+
+ The default message domain of XEmacs is `emacs'. For add-on
+packages, it is best to use a different domain. For example, let us
+say we want to convert the "gorilla" package to use the domain
+`emacs-gorilla'. To translate the message "What gorilla?", use
+`dgettext' as follows:
+
+ (dgettext "emacs-gorilla" "What gorilla?")
+
+ A function (or macro) which has a documentation string or an
+interactive prompt needs to be associated with the domain in order for
+the documentation or prompt to be translated. This is done with the
+`domain' special form as follows:
+
+ (defun scratch (location)
+ "Scratch the specified location."
+ (domain "emacs-gorilla")
+ (interactive "sScratch: ")
+ ... )
+
+ It is most efficient to specify the domain in the first line of the
+function body, before the `interactive' form.
+
+ For variables and constants which have documentation strings,
+specify the domain after the documentation.
+
+ - Special Form: defvar symbol [value [doc-string [domain]]]
+ Example:
+ (defvar weight 250 "Weight of gorilla, in pounds." "emacs-gorilla")
+
+ - Special Form: defconst symbol [value [doc-string [domain]]]
+ Example:
+ (defconst limbs 4 "Number of limbs" "emacs-gorilla")
+
+ Autoloaded functions which are specified in `loaddefs.el' do not need
+to have a domain specification, because their documentation strings are
+extracted into the main message base. However, for autoloaded functions
+which are specified in a separate package, use following syntax:
+
+ - Function: autoload symbol filename &optional docstring interactive
+ macro domain
+ Example:
+ (autoload 'explore "jungle" "Explore the jungle." nil nil "emacs-gorilla")
+
+\1f
+File: lispref.info, Node: Documentation String Extraction, Prev: Domain Specification, Up: I18N Level 3
+
+Documentation String Extraction
+-------------------------------
+
+ The utility `etc/make-po' scans the file `DOC' to extract
+documentation strings and creates a message file `doc.po'. This file
+may then be inserted within `emacs.po'.
+
+ Currently, `make-po' is hard-coded to read from `DOC' and write to
+`doc.po'. In order to extract documentation strings from an add-on
+package, first run `make-docfile' on the package to produce the `DOC'
+file. Then run `make-po -p' with the `-p' argument to indicate that we
+are extracting documentation for an add-on package.
+
+ (The `-p' argument is a kludge to make up for a subtle difference
+between pre-loaded documentation and add-on documentation: For add-on
+packages, the final carriage returns in the strings produced by
+`make-docfile' must be ignored.)
+
+\1f
+File: lispref.info, Node: I18N Level 4, Prev: I18N Level 3, Up: Internationalization
+
+I18N Level 4
+============
+
+ The Asian-language support in XEmacs is called "MULE". *Note MULE::.
+
+\1f
+File: lispref.info, Node: MULE, Next: Tips, Prev: Internationalization, Up: Top
+
+MULE
+****
+
+ "MULE" is the name originally given to the version of GNU Emacs
+extended for multi-lingual (and in particular Asian-language) support.
+"MULE" is short for "MUlti-Lingual Emacs". It is an extension and
+complete rewrite of Nemacs ("Nihon Emacs" where "Nihon" is the Japanese
+word for "Japan"), which only provided support for Japanese. XEmacs
+refers to its multi-lingual support as "MULE support" since it is based
+on "MULE".
+
+* Menu:
+
+* Internationalization Terminology::
+ Definition of various internationalization terms.
+* Charsets:: Sets of related characters.
+* MULE Characters:: Working with characters in XEmacs/MULE.
+* Composite Characters:: Making new characters by overstriking other ones.
+* Coding Systems:: Ways of representing a string of chars using integers.
+* CCL:: A special language for writing fast converters.
+* Category Tables:: Subdividing charsets into groups.
+
+\1f
File: lispref.info, Node: Internationalization Terminology, Next: Charsets, Up: MULE
Internationalization Terminology
encodings.
* Predefined Coding Systems:: Coding systems implemented by MULE.
-\1f
-File: lispref.info, Node: Coding System Types, Next: ISO 2022, Up: Coding Systems
-
-Coding System Types
--------------------
-
- The coding system type determines the basic algorithm XEmacs will
-use to decode or encode a data stream. Character encodings will be
-converted to the MULE encoding, escape sequences processed, and newline
-sequences converted to XEmacs's internal representation. There are
-three basic classes of coding system type: no-conversion, ISO-2022, and
-special.
-
- No conversion allows you to look at the file's internal
-representation. Since XEmacs is basically a text editor, "no
-conversion" does convert newline conventions by default. (Use the
-'binary coding-system if this is not desired.)
-
- ISO 2022 (*note ISO 2022::) is the basic international standard
-regulating use of "coded character sets for the exchange of data", ie,
-text streams. ISO 2022 contains functions that make it possible to
-encode text streams to comply with restrictions of the Internet mail
-system and de facto restrictions of most file systems (eg, use of the
-separator character in file names). Coding systems which are not ISO
-2022 conformant can be difficult to handle. Perhaps more important,
-they are not adaptable to multilingual information interchange, with
-the obvious exception of ISO 10646 (Unicode). (Unicode is partially
-supported by XEmacs with the addition of the Lisp package ucs-conv.)
-
- The special class of coding systems includes automatic detection,
-CCL (a "little language" embedded as an interpreter, useful for
-translating between variants of a single character set),
-non-ISO-2022-conformant encodings like Unicode, Shift JIS, and Big5,
-and MULE internal coding. (NB: this list is based on XEmacs 21.2.
-Terminology may vary slightly for other versions of XEmacs and for GNU
-Emacs 20.)
-
-`no-conversion'
- No conversion, for binary files, and a few special cases of
- non-ISO-2022 coding systems where conversion is done by hook
- functions (usually implemented in CCL). On output, graphic
- characters that are not in ASCII or Latin-1 will be replaced by a
- `?'. (For a no-conversion-encoded buffer, these characters will
- only be present if you explicitly insert them.)
-
-`iso2022'
- Any ISO-2022-compliant encoding. Among others, this includes JIS
- (the Japanese encoding commonly used for e-mail), national
- variants of EUC (the standard Unix encoding for Japanese and other
- languages), and Compound Text (an encoding used in X11). You can
- specify more specific information about the conversion with the
- FLAGS argument.
-
-`ucs-4'
- ISO 10646 UCS-4 encoding. A 31-bit fixed-width superset of
- Unicode.
-
-`utf-8'
- ISO 10646 UTF-8 encoding. A "file system safe" transformation
- format that can be used with both UCS-4 and Unicode.
-
-`undecided'
- Automatic conversion. XEmacs attempts to detect the coding system
- used in the file.
-
-`shift-jis'
- Shift-JIS (a Japanese encoding commonly used in PC operating
- systems).
-
-`big5'
- Big5 (the encoding commonly used for Taiwanese).
-
-`ccl'
- The conversion is performed using a user-written pseudo-code
- program. CCL (Code Conversion Language) is the name of this
- pseudo-code. For example, CCL is used to map KOI8-R characters
- (an encoding for Russian Cyrillic) to ISO8859-5 (the form used
- internally by MULE).
-
-`internal'
- Write out or read in the raw contents of the memory representing
- the buffer's text. This is primarily useful for debugging
- purposes, and is only enabled when XEmacs has been compiled with
- `DEBUG_XEMACS' set (the `--debug' configure option). *Warning*:
- Reading in a file using `internal' conversion can result in an
- internal inconsistency in the memory representing a buffer's text,
- which will produce unpredictable results and may cause XEmacs to
- crash. Under normal circumstances you should never use `internal'
- conversion.
-
-\1f
-File: lispref.info, Node: ISO 2022, Next: EOL Conversion, Prev: Coding System Types, Up: Coding Systems
-
-ISO 2022
-========
-
- This section briefly describes the ISO 2022 encoding standard. A
-more thorough treatment is available in the original document of ISO
-2022 as well as various national standards (such as JIS X 0202).
-
- Character sets ("charsets") are classified into the following four
-categories, according to the number of characters in the charset:
-94-charset, 96-charset, 94x94-charset, and 96x96-charset. This means
-that although an ISO 2022 coding system may have variable width
-characters, each charset used is fixed-width (in contrast to the MULE
-character set and UTF-8, for example).
-
- ISO 2022 provides for switching between character sets via escape
-sequences. This switching is somewhat complicated, because ISO 2022
-provides for both legacy applications like Internet mail that accept
-only 7 significant bits in some contexts (RFC 822 headers, for example),
-and more modern "8-bit clean" applications. It also provides for
-compact and transparent representation of languages like Japanese which
-mix ASCII and a national script (even outside of computer programs).
-
- First, ISO 2022 codified prevailing practice by dividing the code
-space into "control" and "graphic" regions. The code points 0x00-0x1F
-and 0x80-0x9F are reserved for "control characters", while "graphic
-characters" must be assigned to code points in the regions 0x20-0x7F and
-0xA0-0xFF. The positions 0x20 and 0x7F are special, and under some
-circumstances must be assigned the graphic character "ASCII SPACE" and
-the control character "ASCII DEL" respectively.
-
- The various regions are given the name C0 (0x00-0x1F), GL
-(0x20-0x7F), C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for
-"graphic left" and "graphic right", respectively, because of the
-standard method of displaying graphic character sets in tables with the
-high byte indexing columns and the low byte indexing rows. I don't
-find it very intuitive, but these are called "registers".
-
- An ISO 2022-conformant encoding for a graphic character set must use
-a fixed number of bytes per character, and the values must fit into a
-single register; that is, each byte must range over either 0x20-0x7F, or
-0xA0-0xFF. It is not allowed to extend the range of the repertoire of a
-character set by using both ranges at the same. This is why a standard
-character set such as ISO 8859-1 is actually considered by ISO 2022 to
-be an aggregation of two character sets, ASCII and LATIN-1, and why it
-is technically incorrect to refer to ISO 8859-1 as "Latin 1". Also, a
-single character's bytes must all be drawn from the same register; this
-is why Shift JIS (for Japanese) and Big 5 (for Chinese) are not ISO
-2022-compatible encodings.
-
- The reason for this restriction becomes clear when you attempt to
-define an efficient, robust encoding for a language like Japanese.
-Like ISO 8859, Japanese encodings are aggregations of several character
-sets. In practice, the vast majority of characters are drawn from the
-"JIS Roman" character set (a derivative of ASCII; it won't hurt to
-think of it as ASCII) and the JIS X 0208 standard "basic Japanese"
-character set including not only ideographic characters ("kanji") but
-syllabic Japanese characters ("kana"), a wide variety of symbols, and
-many alphabetic characters (Roman, Greek, and Cyrillic) as well.
-Although JIS X 0208 includes the whole Roman alphabet, as a 2-byte code
-it is not suited to programming; thus the inclusion of ASCII in the
-standard Japanese encodings.
-
- For normal Japanese text such as in newspapers, a broad repertoire of
-approximately 3000 characters is used. Evidently this won't fit into
-one byte; two must be used. But much of the text processed by Japanese
-computers is computer source code, nearly all of which is ASCII. A not
-insignificant portion of ordinary text is English (as such or as
-borrowed Japanese vocabulary) or other languages which can represented
-at least approximately in ASCII, as well. It seems reasonable then to
-represent ASCII in one byte, and JIS X 0208 in two. And this is exactly
-what the Extended Unix Code for Japanese (EUC-JP) does. ASCII is
-invoked to the GL register, and JIS X 0208 is invoked to the GR
-register. Thus, each byte can be tested for its character set by
-looking at the high bit; if set, it is Japanese, if clear, it is ASCII.
-Furthermore, since control characters like newline can never be part of
-a graphic character, even in the case of corruption in transmission the
-stream will be resynchronized at every line break, on the order of 60-80
-bytes. This coding system requires no escape sequences or special
-control codes to represent 99.9% of all Japanese text.
-
- Note carefully the distinction between the character sets (ASCII and
-JIS X 0208), the encoding (EUC-JP), and the coding system (ISO 2022).
-The JIS X 0208 character set is used in three different encodings for
-Japanese, but in ISO-2022-JP it is invoked into GL (so the high bit is
-always clear), in EUC-JP it is invoked into GR (setting the high bit in
-the process), and in Shift JIS the high bit may be set or reset, and the
-significant bits are shifted within the 16-bit character so that the two
-main character sets can coexist with a third (the "halfwidth katakana"
-of JIS X 0201). As the name implies, the ISO-2022-JP encoding is also a
-version of the ISO-2022 coding system.
-
- In order to systematically treat subsidiary character sets (like the
-"halfwidth katakana" already mentioned, and the "supplementary kanji" of
-JIS X 0212), four further registers are defined: G0, G1, G2, and G3.
-Unlike GL and GR, they are not logically distinguished by internal
-format. Instead, the process of "invocation" mentioned earlier is
-broken into two steps: first, a character set is "designated" to one of
-the registers G0-G3 by use of an "escape sequence" of the form:
-
- ESC [I] I F
-
- where I is an intermediate character or characters in the range 0x20
-- 0x3F, and F, from the range 0x30-0x7Fm is the final character
-identifying this charset. (Final characters in the range 0x30-0x3F are
-reserved for private use and will never have a publically registered
-meaning.)
-
- Then that register is "invoked" to either GL or GR, either
-automatically (designations to G0 normally involve invocation to GL as
-well), or by use of shifting (affecting only the following character in
-the data stream) or locking (effective until the next designation or
-locking) control sequences. An encoding conformant to ISO 2022 is
-typically defined by designating the initial contents of the G0-G3
-registers, specifying an 7 or 8 bit environment, and specifying whether
-further designations will be recognized.
-
- Some examples of character sets and the registered final characters
-F used to designate them:
-
-94-charset
- ASCII (B), left (J) and right (I) half of JIS X 0201, ...
-
-96-charset
- Latin-1 (A), Latin-2 (B), Latin-3 (C), ...
-
-94x94-charset
- GB2312 (A), JIS X 0208 (B), KSC5601 (C), ...
-
-96x96-charset
- none for the moment
-
- The meanings of the various characters in these sequences, where not
-specified by the ISO 2022 standard (such as the ESC character), are
-assigned by "ECMA", the European Computer Manufacturers Association.
-
- The meaning of intermediate characters are:
-
- $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
- ( [0x28]: designate to G0 a 94-charset whose final byte is F.
- ) [0x29]: designate to G1 a 94-charset whose final byte is F.
- * [0x2A]: designate to G2 a 94-charset whose final byte is F.
- + [0x2B]: designate to G3 a 94-charset whose final byte is F.
- , [0x2C]: designate to G0 a 96-charset whose final byte is F.
- - [0x2D]: designate to G1 a 96-charset whose final byte is F.
- . [0x2E]: designate to G2 a 96-charset whose final byte is F.
- / [0x2F]: designate to G3 a 96-charset whose final byte is F.
-
- The comma may be used in files read and written only by MULE, as a
-MULE extension, but this is illegal in ISO 2022. (The reason is that
-in ISO 2022 G0 must be a 94-member character set, with 0x20 assigned
-the value SPACE, and 0x7F assigned the value DEL.)
-
- Here are examples of designations:
-
- ESC ( B : designate to G0 ASCII
- ESC - A : designate to G1 Latin-1
- ESC $ ( A or ESC $ A : designate to G0 GB2312
- ESC $ ( B or ESC $ B : designate to G0 JISX0208
- ESC $ ) C : designate to G1 KSC5601
-
- (The short forms used to designate GB2312 and JIS X 0208 are for
-backwards compatibility; the long forms are preferred.)
-
- To use a charset designated to G2 or G3, and to use a charset
-designated to G1 in a 7-bit environment, you must explicitly invoke G1,
-G2, or G3 into GL. There are two types of invocation, Locking Shift
-(forever) and Single Shift (one character only).
-
- Locking Shift is done as follows:
-
- LS0 or SI (0x0F): invoke G0 into GL
- LS1 or SO (0x0E): invoke G1 into GL
- LS2: invoke G2 into GL
- LS3: invoke G3 into GL
- LS1R: invoke G1 into GR
- LS2R: invoke G2 into GR
- LS3R: invoke G3 into GR
-
- Single Shift is done as follows:
-
- SS2 or ESC N: invoke G2 into GL
- SS3 or ESC O: invoke G3 into GL
-
- The shift functions (such as LS1R and SS3) are represented by control
-characters (from C1) in 8 bit environments and by escape sequences in 7
-bit environments.
-
- (#### Ben says: I think the above is slightly incorrect. It appears
-that SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N
-and ESC O behave as indicated. The above definitions will not parse
-EUC-encoded text correctly, and it looks like the code in mule-coding.c
-has similar problems.)
-
- Evidently there are a lot of ISO-2022-compliant ways of encoding
-multilingual text. Now, in the world, there exist many coding systems
-such as X11's Compound Text, Japanese JUNET code, and so-called EUC
-(Extended UNIX Code); all of these are variants of ISO 2022.
-
- In MULE, we characterize a version of ISO 2022 by the following
-attributes:
-
- 1. The character sets initially designated to G0 thru G3.
-
- 2. Whether short form designations are allowed for Japanese and
- Chinese.
-
- 3. Whether ASCII should be designated to G0 before control characters.
-
- 4. Whether ASCII should be designated to G0 at the end of line.
-
- 5. 7-bit environment or 8-bit environment.
-
- 6. Whether Locking Shifts are used or not.
-
- 7. Whether to use ASCII or the variant JIS X 0201-1976-Roman.
-
- 8. Whether to use JIS X 0208-1983 or the older version JIS X
- 0208-1976.
-
- (The last two are only for Japanese.)
-
- By specifying these attributes, you can create any variant of ISO
-2022.
-
- Here are several examples:
-
- ISO-2022-JP -- Coding system used in Japanese email (RFC 1463 #### check).
- 1. G0 <- ASCII, G1..3 <- never used
- 2. Yes.
- 3. Yes.
- 4. Yes.
- 5. 7-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JIS X 0208-1983
-
- ctext -- X11 Compound Text
- 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used.
- 2. No.
- 3. No.
- 4. Yes.
- 5. 8-bit environment.
- 6. No.
- 7. Use ASCII.
- 8. Use JIS X 0208-1983.
-
- euc-china -- Chinese EUC. Often called the "GB encoding", but that is
- technically incorrect.
- 1. G0 <- ASCII, G1 <- GB 2312, G2,3 <- never used.
- 2. No.
- 3. Yes.
- 4. Yes.
- 5. 8-bit environment.
- 6. No.
- 7. Use ASCII.
- 8. Use JIS X 0208-1983.
-
- ISO-2022-KR -- Coding system used in Korean email.
- 1. G0 <- ASCII, G1 <- KSC 5601, G2,3 <- never used.
- 2. No.
- 3. Yes.
- 4. Yes.
- 5. 7-bit environment.
- 6. Yes.
- 7. Use ASCII.
- 8. Use JIS X 0208-1983.
-
- MULE creates all of these coding systems by default.
-
-\1f
-File: lispref.info, Node: EOL Conversion, Next: Coding System Properties, Prev: ISO 2022, Up: Coding Systems
-
-EOL Conversion
---------------
-
-`nil'
- Automatically detect the end-of-line type (LF, CRLF, or CR). Also
- generate subsidiary coding systems named `NAME-unix', `NAME-dos',
- and `NAME-mac', that are identical to this coding system but have
- an EOL-TYPE value of `lf', `crlf', and `cr', respectively.
-
-`lf'
- The end of a line is marked externally using ASCII LF. Since this
- is also the way that XEmacs represents an end-of-line internally,
- specifying this option results in no end-of-line conversion. This
- is the standard format for Unix text files.
-
-`crlf'
- The end of a line is marked externally using ASCII CRLF. This is
- the standard format for MS-DOS text files.
-
-`cr'
- The end of a line is marked externally using ASCII CR. This is the
- standard format for Macintosh text files.
-
-`t'
- Automatically detect the end-of-line type but do not generate
- subsidiary coding systems. (This value is converted to `nil' when
- stored internally, and `coding-system-property' will return `nil'.)
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Coding System Types, Next: ISO 2022, Up: Coding Systems
+
+Coding System Types
+-------------------
+
+ The coding system type determines the basic algorithm XEmacs will
+use to decode or encode a data stream. Character encodings will be
+converted to the MULE encoding, escape sequences processed, and newline
+sequences converted to XEmacs's internal representation. There are
+three basic classes of coding system type: no-conversion, ISO-2022, and
+special.
+
+ No conversion allows you to look at the file's internal
+representation. Since XEmacs is basically a text editor, "no
+conversion" does convert newline conventions by default. (Use the
+'binary coding-system if this is not desired.)
+
+ ISO 2022 (*note ISO 2022::) is the basic international standard
+regulating use of "coded character sets for the exchange of data", ie,
+text streams. ISO 2022 contains functions that make it possible to
+encode text streams to comply with restrictions of the Internet mail
+system and de facto restrictions of most file systems (eg, use of the
+separator character in file names). Coding systems which are not ISO
+2022 conformant can be difficult to handle. Perhaps more important,
+they are not adaptable to multilingual information interchange, with
+the obvious exception of ISO 10646 (Unicode). (Unicode is partially
+supported by XEmacs with the addition of the Lisp package ucs-conv.)
+
+ The special class of coding systems includes automatic detection,
+CCL (a "little language" embedded as an interpreter, useful for
+translating between variants of a single character set),
+non-ISO-2022-conformant encodings like Unicode, Shift JIS, and Big5,
+and MULE internal coding. (NB: this list is based on XEmacs 21.2.
+Terminology may vary slightly for other versions of XEmacs and for GNU
+Emacs 20.)
+
+`no-conversion'
+ No conversion, for binary files, and a few special cases of
+ non-ISO-2022 coding systems where conversion is done by hook
+ functions (usually implemented in CCL). On output, graphic
+ characters that are not in ASCII or Latin-1 will be replaced by a
+ `?'. (For a no-conversion-encoded buffer, these characters will
+ only be present if you explicitly insert them.)
+
+`iso2022'
+ Any ISO-2022-compliant encoding. Among others, this includes JIS
+ (the Japanese encoding commonly used for e-mail), national
+ variants of EUC (the standard Unix encoding for Japanese and other
+ languages), and Compound Text (an encoding used in X11). You can
+ specify more specific information about the conversion with the
+ FLAGS argument.
+
+`ucs-4'
+ ISO 10646 UCS-4 encoding. A 31-bit fixed-width superset of
+ Unicode.
+
+`utf-8'
+ ISO 10646 UTF-8 encoding. A "file system safe" transformation
+ format that can be used with both UCS-4 and Unicode.
+
+`undecided'
+ Automatic conversion. XEmacs attempts to detect the coding system
+ used in the file.
+
+`shift-jis'
+ Shift-JIS (a Japanese encoding commonly used in PC operating
+ systems).
+
+`big5'
+ Big5 (the encoding commonly used for Taiwanese).
+
+`ccl'
+ The conversion is performed using a user-written pseudo-code
+ program. CCL (Code Conversion Language) is the name of this
+ pseudo-code. For example, CCL is used to map KOI8-R characters
+ (an encoding for Russian Cyrillic) to ISO8859-5 (the form used
+ internally by MULE).
+
+`internal'
+ Write out or read in the raw contents of the memory representing
+ the buffer's text. This is primarily useful for debugging
+ purposes, and is only enabled when XEmacs has been compiled with
+ `DEBUG_XEMACS' set (the `--debug' configure option). *Warning*:
+ Reading in a file using `internal' conversion can result in an
+ internal inconsistency in the memory representing a buffer's text,
+ which will produce unpredictable results and may cause XEmacs to
+ crash. Under normal circumstances you should never use `internal'
+ conversion.
+
+\1f
+File: lispref.info, Node: ISO 2022, Next: EOL Conversion, Prev: Coding System Types, Up: Coding Systems
+
+ISO 2022
+========
+
+ This section briefly describes the ISO 2022 encoding standard. A
+more thorough treatment is available in the original document of ISO
+2022 as well as various national standards (such as JIS X 0202).
+
+ Character sets ("charsets") are classified into the following four
+categories, according to the number of characters in the charset:
+94-charset, 96-charset, 94x94-charset, and 96x96-charset. This means
+that although an ISO 2022 coding system may have variable width
+characters, each charset used is fixed-width (in contrast to the MULE
+character set and UTF-8, for example).
+
+ ISO 2022 provides for switching between character sets via escape
+sequences. This switching is somewhat complicated, because ISO 2022
+provides for both legacy applications like Internet mail that accept
+only 7 significant bits in some contexts (RFC 822 headers, for example),
+and more modern "8-bit clean" applications. It also provides for
+compact and transparent representation of languages like Japanese which
+mix ASCII and a national script (even outside of computer programs).
+
+ First, ISO 2022 codified prevailing practice by dividing the code
+space into "control" and "graphic" regions. The code points 0x00-0x1F
+and 0x80-0x9F are reserved for "control characters", while "graphic
+characters" must be assigned to code points in the regions 0x20-0x7F and
+0xA0-0xFF. The positions 0x20 and 0x7F are special, and under some
+circumstances must be assigned the graphic character "ASCII SPACE" and
+the control character "ASCII DEL" respectively.
+
+ The various regions are given the name C0 (0x00-0x1F), GL
+(0x20-0x7F), C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for
+"graphic left" and "graphic right", respectively, because of the
+standard method of displaying graphic character sets in tables with the
+high byte indexing columns and the low byte indexing rows. I don't
+find it very intuitive, but these are called "registers".
+
+ An ISO 2022-conformant encoding for a graphic character set must use
+a fixed number of bytes per character, and the values must fit into a
+single register; that is, each byte must range over either 0x20-0x7F, or
+0xA0-0xFF. It is not allowed to extend the range of the repertoire of a
+character set by using both ranges at the same. This is why a standard
+character set such as ISO 8859-1 is actually considered by ISO 2022 to
+be an aggregation of two character sets, ASCII and LATIN-1, and why it
+is technically incorrect to refer to ISO 8859-1 as "Latin 1". Also, a
+single character's bytes must all be drawn from the same register; this
+is why Shift JIS (for Japanese) and Big 5 (for Chinese) are not ISO
+2022-compatible encodings.
+
+ The reason for this restriction becomes clear when you attempt to
+define an efficient, robust encoding for a language like Japanese.
+Like ISO 8859, Japanese encodings are aggregations of several character
+sets. In practice, the vast majority of characters are drawn from the
+"JIS Roman" character set (a derivative of ASCII; it won't hurt to
+think of it as ASCII) and the JIS X 0208 standard "basic Japanese"
+character set including not only ideographic characters ("kanji") but
+syllabic Japanese characters ("kana"), a wide variety of symbols, and
+many alphabetic characters (Roman, Greek, and Cyrillic) as well.
+Although JIS X 0208 includes the whole Roman alphabet, as a 2-byte code
+it is not suited to programming; thus the inclusion of ASCII in the
+standard Japanese encodings.
+
+ For normal Japanese text such as in newspapers, a broad repertoire of
+approximately 3000 characters is used. Evidently this won't fit into
+one byte; two must be used. But much of the text processed by Japanese
+computers is computer source code, nearly all of which is ASCII. A not
+insignificant portion of ordinary text is English (as such or as
+borrowed Japanese vocabulary) or other languages which can represented
+at least approximately in ASCII, as well. It seems reasonable then to
+represent ASCII in one byte, and JIS X 0208 in two. And this is exactly
+what the Extended Unix Code for Japanese (EUC-JP) does. ASCII is
+invoked to the GL register, and JIS X 0208 is invoked to the GR
+register. Thus, each byte can be tested for its character set by
+looking at the high bit; if set, it is Japanese, if clear, it is ASCII.
+Furthermore, since control characters like newline can never be part of
+a graphic character, even in the case of corruption in transmission the
+stream will be resynchronized at every line break, on the order of 60-80
+bytes. This coding system requires no escape sequences or special
+control codes to represent 99.9% of all Japanese text.
+
+ Note carefully the distinction between the character sets (ASCII and
+JIS X 0208), the encoding (EUC-JP), and the coding system (ISO 2022).
+The JIS X 0208 character set is used in three different encodings for
+Japanese, but in ISO-2022-JP it is invoked into GL (so the high bit is
+always clear), in EUC-JP it is invoked into GR (setting the high bit in
+the process), and in Shift JIS the high bit may be set or reset, and the
+significant bits are shifted within the 16-bit character so that the two
+main character sets can coexist with a third (the "halfwidth katakana"
+of JIS X 0201). As the name implies, the ISO-2022-JP encoding is also a
+version of the ISO-2022 coding system.
+
+ In order to systematically treat subsidiary character sets (like the
+"halfwidth katakana" already mentioned, and the "supplementary kanji" of
+JIS X 0212), four further registers are defined: G0, G1, G2, and G3.
+Unlike GL and GR, they are not logically distinguished by internal
+format. Instead, the process of "invocation" mentioned earlier is
+broken into two steps: first, a character set is "designated" to one of
+the registers G0-G3 by use of an "escape sequence" of the form:
+
+ ESC [I] I F
+
+ where I is an intermediate character or characters in the range 0x20
+- 0x3F, and F, from the range 0x30-0x7Fm is the final character
+identifying this charset. (Final characters in the range 0x30-0x3F are
+reserved for private use and will never have a publically registered
+meaning.)
+
+ Then that register is "invoked" to either GL or GR, either
+automatically (designations to G0 normally involve invocation to GL as
+well), or by use of shifting (affecting only the following character in
+the data stream) or locking (effective until the next designation or
+locking) control sequences. An encoding conformant to ISO 2022 is
+typically defined by designating the initial contents of the G0-G3
+registers, specifying an 7 or 8 bit environment, and specifying whether
+further designations will be recognized.
+
+ Some examples of character sets and the registered final characters
+F used to designate them:
+
+94-charset
+ ASCII (B), left (J) and right (I) half of JIS X 0201, ...
+
+96-charset
+ Latin-1 (A), Latin-2 (B), Latin-3 (C), ...
+
+94x94-charset
+ GB2312 (A), JIS X 0208 (B), KSC5601 (C), ...
+
+96x96-charset
+ none for the moment
+
+ The meanings of the various characters in these sequences, where not
+specified by the ISO 2022 standard (such as the ESC character), are
+assigned by "ECMA", the European Computer Manufacturers Association.
+
+ The meaning of intermediate characters are:
+
+ $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
+ ( [0x28]: designate to G0 a 94-charset whose final byte is F.
+ ) [0x29]: designate to G1 a 94-charset whose final byte is F.
+ * [0x2A]: designate to G2 a 94-charset whose final byte is F.
+ + [0x2B]: designate to G3 a 94-charset whose final byte is F.
+ , [0x2C]: designate to G0 a 96-charset whose final byte is F.
+ - [0x2D]: designate to G1 a 96-charset whose final byte is F.
+ . [0x2E]: designate to G2 a 96-charset whose final byte is F.
+ / [0x2F]: designate to G3 a 96-charset whose final byte is F.
+
+ The comma may be used in files read and written only by MULE, as a
+MULE extension, but this is illegal in ISO 2022. (The reason is that
+in ISO 2022 G0 must be a 94-member character set, with 0x20 assigned
+the value SPACE, and 0x7F assigned the value DEL.)
+
+ Here are examples of designations:
+
+ ESC ( B : designate to G0 ASCII
+ ESC - A : designate to G1 Latin-1
+ ESC $ ( A or ESC $ A : designate to G0 GB2312
+ ESC $ ( B or ESC $ B : designate to G0 JISX0208
+ ESC $ ) C : designate to G1 KSC5601
+
+ (The short forms used to designate GB2312 and JIS X 0208 are for
+backwards compatibility; the long forms are preferred.)
+
+ To use a charset designated to G2 or G3, and to use a charset
+designated to G1 in a 7-bit environment, you must explicitly invoke G1,
+G2, or G3 into GL. There are two types of invocation, Locking Shift
+(forever) and Single Shift (one character only).
+
+ Locking Shift is done as follows:
+
+ LS0 or SI (0x0F): invoke G0 into GL
+ LS1 or SO (0x0E): invoke G1 into GL
+ LS2: invoke G2 into GL
+ LS3: invoke G3 into GL
+ LS1R: invoke G1 into GR
+ LS2R: invoke G2 into GR
+ LS3R: invoke G3 into GR
+
+ Single Shift is done as follows:
+
+ SS2 or ESC N: invoke G2 into GL
+ SS3 or ESC O: invoke G3 into GL
+
+ The shift functions (such as LS1R and SS3) are represented by control
+characters (from C1) in 8 bit environments and by escape sequences in 7
+bit environments.
+
+ (#### Ben says: I think the above is slightly incorrect. It appears
+that SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N
+and ESC O behave as indicated. The above definitions will not parse
+EUC-encoded text correctly, and it looks like the code in mule-coding.c
+has similar problems.)
+
+ Evidently there are a lot of ISO-2022-compliant ways of encoding
+multilingual text. Now, in the world, there exist many coding systems
+such as X11's Compound Text, Japanese JUNET code, and so-called EUC
+(Extended UNIX Code); all of these are variants of ISO 2022.
+
+ In MULE, we characterize a version of ISO 2022 by the following
+attributes:
+
+ 1. The character sets initially designated to G0 thru G3.
+
+ 2. Whether short form designations are allowed for Japanese and
+ Chinese.
+
+ 3. Whether ASCII should be designated to G0 before control characters.
+
+ 4. Whether ASCII should be designated to G0 at the end of line.
+
+ 5. 7-bit environment or 8-bit environment.
+
+ 6. Whether Locking Shifts are used or not.
+
+ 7. Whether to use ASCII or the variant JIS X 0201-1976-Roman.
+
+ 8. Whether to use JIS X 0208-1983 or the older version JIS X
+ 0208-1976.
+
+ (The last two are only for Japanese.)
+
+ By specifying these attributes, you can create any variant of ISO
+2022.
+
+ Here are several examples:
+
+ ISO-2022-JP -- Coding system used in Japanese email (RFC 1463 #### check).
+ 1. G0 <- ASCII, G1..3 <- never used
+ 2. Yes.
+ 3. Yes.
+ 4. Yes.
+ 5. 7-bit environment
+ 6. No.
+ 7. Use ASCII
+ 8. Use JIS X 0208-1983
+
+ ctext -- X11 Compound Text
+ 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used.
+ 2. No.
+ 3. No.
+ 4. Yes.
+ 5. 8-bit environment.
+ 6. No.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
+
+ euc-china -- Chinese EUC. Often called the "GB encoding", but that is
+ technically incorrect.
+ 1. G0 <- ASCII, G1 <- GB 2312, G2,3 <- never used.
+ 2. No.
+ 3. Yes.
+ 4. Yes.
+ 5. 8-bit environment.
+ 6. No.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
+
+ ISO-2022-KR -- Coding system used in Korean email.
+ 1. G0 <- ASCII, G1 <- KSC 5601, G2,3 <- never used.
+ 2. No.
+ 3. Yes.
+ 4. Yes.
+ 5. 7-bit environment.
+ 6. Yes.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
+
+ MULE creates all of these coding systems by default.
+
+\1f
+File: lispref.info, Node: EOL Conversion, Next: Coding System Properties, Prev: ISO 2022, Up: Coding Systems
+
+EOL Conversion
+--------------
+
+`nil'
+ Automatically detect the end-of-line type (LF, CRLF, or CR). Also
+ generate subsidiary coding systems named `NAME-unix', `NAME-dos',
+ and `NAME-mac', that are identical to this coding system but have
+ an EOL-TYPE value of `lf', `crlf', and `cr', respectively.
+
+`lf'
+ The end of a line is marked externally using ASCII LF. Since this
+ is also the way that XEmacs represents an end-of-line internally,
+ specifying this option results in no end-of-line conversion. This
+ is the standard format for Unix text files.
+
+`crlf'
+ The end of a line is marked externally using ASCII CRLF. This is
+ the standard format for MS-DOS text files.
+
+`cr'
+ The end of a line is marked externally using ASCII CR. This is the
+ standard format for Macintosh text files.
+
+`t'
+ Automatically detect the end-of-line type but do not generate
+ subsidiary coding systems. (This value is converted to `nil' when
+ stored internally, and `coding-system-property' will return `nil'.)
+
+\1f
File: lispref.info, Node: Coding System Properties, Next: Basic Coding System Functions, Prev: EOL Conversion, Up: Coding Systems
Coding System Properties
successfully, and returns to caller (which may be a CCL program). It
does not alter the status of the registers.
-\1f
-File: lispref.info, Node: CCL Expressions, Next: Calling CCL, Prev: CCL Statements, Up: CCL
-
-CCL Expressions
----------------
-
- CCL, unlike Lisp, uses infix expressions. The simplest CCL
-expressions consist of a single OPERAND, either a register (one of `r0',
-..., `r0') or an integer. Complex expressions are lists of the form `(
-EXPRESSION OPERATOR OPERAND )'. Unlike C, assignments are not
-expressions.
-
- In the following table, X is the target resister for a "set". In
-subexpressions, this is implicitly `r7'. This means that `>8', `//',
-`de-sjis', and `en-sjis' cannot be used freely in subexpressions, since
-they return parts of their values in `r7'. Y may be an expression,
-register, or integer, while Z must be a register or an integer.
-
-Name Operator Code C-like Description
-CCL_PLUS `+' 0x00 X = Y + Z
-CCL_MINUS `-' 0x01 X = Y - Z
-CCL_MUL `*' 0x02 X = Y * Z
-CCL_DIV `/' 0x03 X = Y / Z
-CCL_MOD `%' 0x04 X = Y % Z
-CCL_AND `&' 0x05 X = Y & Z
-CCL_OR `|' 0x06 X = Y | Z
-CCL_XOR `^' 0x07 X = Y ^ Z
-CCL_LSH `<<' 0x08 X = Y << Z
-CCL_RSH `>>' 0x09 X = Y >> Z
-CCL_LSH8 `<8' 0x0A X = (Y << 8) | Z
-CCL_RSH8 `>8' 0x0B X = Y >> 8, r[7] = Y & 0xFF
-CCL_DIVMOD `//' 0x0C X = Y / Z, r[7] = Y % Z
-CCL_LS `<' 0x10 X = (X < Y)
-CCL_GT `>' 0x11 X = (X > Y)
-CCL_EQ `==' 0x12 X = (X == Y)
-CCL_LE `<=' 0x13 X = (X <= Y)
-CCL_GE `>=' 0x14 X = (X >= Y)
-CCL_NE `!=' 0x15 X = (X != Y)
-CCL_ENCODE_SJIS `en-sjis' 0x16 X = HIGHER_BYTE (SJIS (Y, Z))
- r[7] = LOWER_BYTE (SJIS (Y, Z)
-CCL_DECODE_SJIS `de-sjis' 0x17 X = HIGHER_BYTE (DE-SJIS (Y, Z))
- r[7] = LOWER_BYTE (DE-SJIS (Y, Z))
-
- The CCL operators are as in C, with the addition of CCL_LSH8,
-CCL_RSH8, CCL_DIVMOD, CCL_ENCODE_SJIS, and CCL_DECODE_SJIS. The
-CCL_ENCODE_SJIS and CCL_DECODE_SJIS treat their first and second bytes
-as the high and low bytes of a two-byte character code. (SJIS stands
-for Shift JIS, an encoding of Japanese characters used by Microsoft.
-CCL_ENCODE_SJIS is a complicated transformation of the Japanese
-standard JIS encoding to Shift JIS. CCL_DECODE_SJIS is its inverse.)
-It is somewhat odd to represent the SJIS operations in infix form.
-
-\1f
-File: lispref.info, Node: Calling CCL, Next: CCL Examples, Prev: CCL Expressions, Up: CCL
-
-Calling CCL
------------
-
- CCL programs are called automatically during Emacs buffer I/O when
-the external representation has a coding system type of `shift-jis',
-`big5', or `ccl'. The program is specified by the coding system (*note
-Coding Systems::). You can also call CCL programs from other CCL
-programs, and from Lisp using these functions:
-
- - Function: ccl-execute ccl-program status
- Execute CCL-PROGRAM with registers initialized by STATUS.
- CCL-PROGRAM is a vector of compiled CCL code created by
- `ccl-compile'. It is an error for the program to try to execute a
- CCL I/O command. STATUS must be a vector of nine values,
- specifying the initial value for the R0, R1 .. R7 registers and
- for the instruction counter IC. A `nil' value for a register
- initializer causes the register to be set to 0. A `nil' value for
- the IC initializer causes execution to start at the beginning of
- the program. When the program is done, STATUS is modified (by
- side-effect) to contain the ending values for the corresponding
- registers and IC.
-
- - Function: ccl-execute-on-string ccl-program status str &optional
- continue
- Execute CCL-PROGRAM with initial STATUS on STRING. CCL-PROGRAM is
- a vector of compiled CCL code created by `ccl-compile'. STATUS
- must be a vector of nine values, specifying the initial value for
- the R0, R1 .. R7 registers and for the instruction counter IC. A
- `nil' value for a register initializer causes the register to be
- set to 0. A `nil' value for the IC initializer causes execution
- to start at the beginning of the program. An optional fourth
- argument CONTINUE, if non-nil, causes the IC to remain on the
- unsatisfied read operation if the program terminates due to
- exhaustion of the input buffer. Otherwise the IC is set to the end
- of the program. When the program is done, STATUS is modified (by
- side-effect) to contain the ending values for the corresponding
- registers and IC. Returns the resulting string.
-
- To call a CCL program from another CCL program, it must first be
-registered:
-
- - Function: register-ccl-program name ccl-program
- Register NAME for CCL program PROGRAM in `ccl-program-table'.
- PROGRAM should be the compiled form of a CCL program, or nil.
- Return index number of the registered CCL program.
-
- Information about the processor time used by the CCL interpreter can
-be obtained using these functions:
-
- - Function: ccl-elapsed-time
- Returns the elapsed processor time of the CCL interpreter as cons
- of user and system time, as floating point numbers measured in
- seconds. If only one overall value can be determined, the return
- value will be a cons of that value and 0.
-
- - Function: ccl-reset-elapsed-time
- Resets the CCL interpreter's internal elapsed time registers.
-
-\1f
-File: lispref.info, Node: CCL Examples, Prev: Calling CCL, Up: CCL
-
-CCL Examples
-------------
-
- This section is not yet written.
-
-\1f
-File: lispref.info, Node: Category Tables, Prev: CCL, Up: MULE
-
-Category Tables
-===============
-
- A category table is a type of char table used for keeping track of
-categories. Categories are used for classifying characters for use in
-regexps--you can refer to a category rather than having to use a
-complicated [] expression (and category lookups are significantly
-faster).
-
- There are 95 different categories available, one for each printable
-character (including space) in the ASCII charset. Each category is
-designated by one such character, called a "category designator". They
-are specified in a regexp using the syntax `\cX', where X is a category
-designator. (This is not yet implemented.)
-
- A category table specifies, for each character, the categories that
-the character is in. Note that a character can be in more than one
-category. More specifically, a category table maps from a character to
-either the value `nil' (meaning the character is in no categories) or a
-95-element bit vector, specifying for each of the 95 categories whether
-the character is in that category.
-
- Special Lisp functions are provided that abstract this, so you do not
-have to directly manipulate bit vectors.
-
- - Function: category-table-p obj
- This function returns `t' if ARG is a category table.
-
- - Function: category-table &optional buffer
- This function returns the current category table. This is the one
- specified by the current buffer, or by BUFFER if it is non-`nil'.
-
- - Function: standard-category-table
- This function returns the standard category table. This is the
- one used for new buffers.
-
- - Function: copy-category-table &optional table
- This function constructs a new category table and return it. It
- is a copy of the TABLE, which defaults to the standard category
- table.
-
- - Function: set-category-table table &optional buffer
- This function selects a new category table for BUFFER. One
- argument, a category table. BUFFER defaults to the current buffer
- if omitted.
-
- - Function: category-designator-p obj
- This function returns `t' if ARG is a category designator (a char
- in the range `' '' to `'~'').
-
- - Function: category-table-value-p obj
- This function returns `t' if ARG is a category table value. Valid
- values are `nil' or a bit vector of size 95.
-
-\1f
-File: lispref.info, Node: Tips, Next: Building XEmacs and Object Allocation, Prev: MULE, Up: Top
-
-Tips and Standards
-******************
-
- This chapter describes no additional features of XEmacs Lisp.
-Instead it gives advice on making effective use of the features
-described in the previous chapters.
-
-* Menu:
-
-* Style Tips:: Writing clean and robust programs.
-* Compilation Tips:: Making compiled code run fast.
-* Documentation Tips:: Writing readable documentation strings.
-* Comment Tips:: Conventions for writing comments.
-* Library Headers:: Standard headers for library packages.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: CCL Expressions, Next: Calling CCL, Prev: CCL Statements, Up: CCL
+
+CCL Expressions
+---------------
+
+ CCL, unlike Lisp, uses infix expressions. The simplest CCL
+expressions consist of a single OPERAND, either a register (one of `r0',
+..., `r0') or an integer. Complex expressions are lists of the form `(
+EXPRESSION OPERATOR OPERAND )'. Unlike C, assignments are not
+expressions.
+
+ In the following table, X is the target resister for a "set". In
+subexpressions, this is implicitly `r7'. This means that `>8', `//',
+`de-sjis', and `en-sjis' cannot be used freely in subexpressions, since
+they return parts of their values in `r7'. Y may be an expression,
+register, or integer, while Z must be a register or an integer.
+
+Name Operator Code C-like Description
+CCL_PLUS `+' 0x00 X = Y + Z
+CCL_MINUS `-' 0x01 X = Y - Z
+CCL_MUL `*' 0x02 X = Y * Z
+CCL_DIV `/' 0x03 X = Y / Z
+CCL_MOD `%' 0x04 X = Y % Z
+CCL_AND `&' 0x05 X = Y & Z
+CCL_OR `|' 0x06 X = Y | Z
+CCL_XOR `^' 0x07 X = Y ^ Z
+CCL_LSH `<<' 0x08 X = Y << Z
+CCL_RSH `>>' 0x09 X = Y >> Z
+CCL_LSH8 `<8' 0x0A X = (Y << 8) | Z
+CCL_RSH8 `>8' 0x0B X = Y >> 8, r[7] = Y & 0xFF
+CCL_DIVMOD `//' 0x0C X = Y / Z, r[7] = Y % Z
+CCL_LS `<' 0x10 X = (X < Y)
+CCL_GT `>' 0x11 X = (X > Y)
+CCL_EQ `==' 0x12 X = (X == Y)
+CCL_LE `<=' 0x13 X = (X <= Y)
+CCL_GE `>=' 0x14 X = (X >= Y)
+CCL_NE `!=' 0x15 X = (X != Y)
+CCL_ENCODE_SJIS `en-sjis' 0x16 X = HIGHER_BYTE (SJIS (Y, Z))
+ r[7] = LOWER_BYTE (SJIS (Y, Z)
+CCL_DECODE_SJIS `de-sjis' 0x17 X = HIGHER_BYTE (DE-SJIS (Y, Z))
+ r[7] = LOWER_BYTE (DE-SJIS (Y, Z))
+
+ The CCL operators are as in C, with the addition of CCL_LSH8,
+CCL_RSH8, CCL_DIVMOD, CCL_ENCODE_SJIS, and CCL_DECODE_SJIS. The
+CCL_ENCODE_SJIS and CCL_DECODE_SJIS treat their first and second bytes
+as the high and low bytes of a two-byte character code. (SJIS stands
+for Shift JIS, an encoding of Japanese characters used by Microsoft.
+CCL_ENCODE_SJIS is a complicated transformation of the Japanese
+standard JIS encoding to Shift JIS. CCL_DECODE_SJIS is its inverse.)
+It is somewhat odd to represent the SJIS operations in infix form.
+
+\1f
+File: lispref.info, Node: Calling CCL, Next: CCL Examples, Prev: CCL Expressions, Up: CCL
+
+Calling CCL
+-----------
+
+ CCL programs are called automatically during Emacs buffer I/O when
+the external representation has a coding system type of `shift-jis',
+`big5', or `ccl'. The program is specified by the coding system (*note
+Coding Systems::). You can also call CCL programs from other CCL
+programs, and from Lisp using these functions:
+
+ - Function: ccl-execute ccl-program status
+ Execute CCL-PROGRAM with registers initialized by STATUS.
+ CCL-PROGRAM is a vector of compiled CCL code created by
+ `ccl-compile'. It is an error for the program to try to execute a
+ CCL I/O command. STATUS must be a vector of nine values,
+ specifying the initial value for the R0, R1 .. R7 registers and
+ for the instruction counter IC. A `nil' value for a register
+ initializer causes the register to be set to 0. A `nil' value for
+ the IC initializer causes execution to start at the beginning of
+ the program. When the program is done, STATUS is modified (by
+ side-effect) to contain the ending values for the corresponding
+ registers and IC.
+
+ - Function: ccl-execute-on-string ccl-program status str &optional
+ continue
+ Execute CCL-PROGRAM with initial STATUS on STRING. CCL-PROGRAM is
+ a vector of compiled CCL code created by `ccl-compile'. STATUS
+ must be a vector of nine values, specifying the initial value for
+ the R0, R1 .. R7 registers and for the instruction counter IC. A
+ `nil' value for a register initializer causes the register to be
+ set to 0. A `nil' value for the IC initializer causes execution
+ to start at the beginning of the program. An optional fourth
+ argument CONTINUE, if non-nil, causes the IC to remain on the
+ unsatisfied read operation if the program terminates due to
+ exhaustion of the input buffer. Otherwise the IC is set to the end
+ of the program. When the program is done, STATUS is modified (by
+ side-effect) to contain the ending values for the corresponding
+ registers and IC. Returns the resulting string.
+
+ To call a CCL program from another CCL program, it must first be
+registered:
+
+ - Function: register-ccl-program name ccl-program
+ Register NAME for CCL program PROGRAM in `ccl-program-table'.
+ PROGRAM should be the compiled form of a CCL program, or nil.
+ Return index number of the registered CCL program.
+
+ Information about the processor time used by the CCL interpreter can
+be obtained using these functions:
+
+ - Function: ccl-elapsed-time
+ Returns the elapsed processor time of the CCL interpreter as cons
+ of user and system time, as floating point numbers measured in
+ seconds. If only one overall value can be determined, the return
+ value will be a cons of that value and 0.
+
+ - Function: ccl-reset-elapsed-time
+ Resets the CCL interpreter's internal elapsed time registers.
+
+\1f
+File: lispref.info, Node: CCL Examples, Prev: Calling CCL, Up: CCL
+
+CCL Examples
+------------
+
+ This section is not yet written.
+
+\1f
+File: lispref.info, Node: Category Tables, Prev: CCL, Up: MULE
+
+Category Tables
+===============
+
+ A category table is a type of char table used for keeping track of
+categories. Categories are used for classifying characters for use in
+regexps--you can refer to a category rather than having to use a
+complicated [] expression (and category lookups are significantly
+faster).
+
+ There are 95 different categories available, one for each printable
+character (including space) in the ASCII charset. Each category is
+designated by one such character, called a "category designator". They
+are specified in a regexp using the syntax `\cX', where X is a category
+designator. (This is not yet implemented.)
+
+ A category table specifies, for each character, the categories that
+the character is in. Note that a character can be in more than one
+category. More specifically, a category table maps from a character to
+either the value `nil' (meaning the character is in no categories) or a
+95-element bit vector, specifying for each of the 95 categories whether
+the character is in that category.
+
+ Special Lisp functions are provided that abstract this, so you do not
+have to directly manipulate bit vectors.
+
+ - Function: category-table-p obj
+ This function returns `t' if ARG is a category table.
+
+ - Function: category-table &optional buffer
+ This function returns the current category table. This is the one
+ specified by the current buffer, or by BUFFER if it is non-`nil'.
+
+ - Function: standard-category-table
+ This function returns the standard category table. This is the
+ one used for new buffers.
+
+ - Function: copy-category-table &optional table
+ This function constructs a new category table and return it. It
+ is a copy of the TABLE, which defaults to the standard category
+ table.
+
+ - Function: set-category-table table &optional buffer
+ This function selects a new category table for BUFFER. One
+ argument, a category table. BUFFER defaults to the current buffer
+ if omitted.
+
+ - Function: category-designator-p obj
+ This function returns `t' if ARG is a category designator (a char
+ in the range `' '' to `'~'').
+
+ - Function: category-table-value-p obj
+ This function returns `t' if ARG is a category table value. Valid
+ values are `nil' or a bit vector of size 95.
+
+\1f
+File: lispref.info, Node: Tips, Next: Building XEmacs and Object Allocation, Prev: MULE, Up: Top
+
+Tips and Standards
+******************
+
+ This chapter describes no additional features of XEmacs Lisp.
+Instead it gives advice on making effective use of the features
+described in the previous chapters.
+
+* Menu:
+
+* Style Tips:: Writing clean and robust programs.
+* Compilation Tips:: Making compiled code run fast.
+* Documentation Tips:: Writing readable documentation strings.
+* Comment Tips:: Conventions for writing comments.
+* Library Headers:: Standard headers for library packages.
+
+\1f
File: lispref.info, Node: Style Tips, Next: Compilation Tips, Up: Tips
Writing Clean Lisp Programs
You should not change this flag in a running XEmacs.
-\1f
-File: lispref.info, Node: Garbage Collection, Prev: Pure Storage, Up: Building XEmacs and Object Allocation
-
-Garbage Collection
-==================
-
- When a program creates a list or the user defines a new function
-(such as by loading a library), that data is placed in normal storage.
-If normal storage runs low, then XEmacs asks the operating system to
-allocate more memory in blocks of 2k bytes. Each block is used for one
-type of Lisp object, so symbols, cons cells, markers, etc., are
-segregated in distinct blocks in memory. (Vectors, long strings,
-buffers and certain other editing types, which are fairly large, are
-allocated in individual blocks, one per object, while small strings are
-packed into blocks of 8k bytes. [More correctly, a string is allocated
-in two sections: a fixed size chunk containing the length, list of
-extents, etc.; and a chunk containing the actual characters in the
-string. It is this latter chunk that is either allocated individually
-or packed into 8k blocks. The fixed size chunk is packed into 2k
-blocks, as for conses, markers, etc.])
-
- It is quite common to use some storage for a while, then release it
-by (for example) killing a buffer or deleting the last pointer to an
-object. XEmacs provides a "garbage collector" to reclaim this
-abandoned storage. (This name is traditional, but "garbage recycler"
-might be a more intuitive metaphor for this facility.)
-
- The garbage collector operates by finding and marking all Lisp
-objects that are still accessible to Lisp programs. To begin with, it
-assumes all the symbols, their values and associated function
-definitions, and any data presently on the stack, are accessible. Any
-objects that can be reached indirectly through other accessible objects
-are also accessible.
-
- When marking is finished, all objects still unmarked are garbage. No
-matter what the Lisp program or the user does, it is impossible to refer
-to them, since there is no longer a way to reach them. Their space
-might as well be reused, since no one will miss them. The second
-("sweep") phase of the garbage collector arranges to reuse them.
-
- The sweep phase puts unused cons cells onto a "free list" for future
-allocation; likewise for symbols, markers, extents, events, floats,
-compiled-function objects, and the fixed-size portion of strings. It
-compacts the accessible small string-chars chunks so they occupy fewer
-8k blocks; then it frees the other 8k blocks. Vectors, buffers,
-windows, and other large objects are individually allocated and freed
-using `malloc' and `free'.
-
- Common Lisp note: unlike other Lisps, XEmacs Lisp does not call
- the garbage collector when the free list is empty. Instead, it
- simply requests the operating system to allocate more storage, and
- processing continues until `gc-cons-threshold' bytes have been
- used.
-
- This means that you can make sure that the garbage collector will
- not run during a certain portion of a Lisp program by calling the
- garbage collector explicitly just before it (provided that portion
- of the program does not use so much space as to force a second
- garbage collection).
-
- - Command: garbage-collect
- This command runs a garbage collection, and returns information on
- the amount of space in use. (Garbage collection can also occur
- spontaneously if you use more than `gc-cons-threshold' bytes of
- Lisp data since the previous garbage collection.)
-
- `garbage-collect' returns a list containing the following
- information:
-
- ((USED-CONSES . FREE-CONSES)
- (USED-SYMS . FREE-SYMS)
- (USED-MARKERS . FREE-MARKERS)
- USED-STRING-CHARS
- USED-VECTOR-SLOTS
- (PLIST))
-
- => ((73362 . 8325) (13718 . 164)
- (5089 . 5098) 949121 118677
- (conses-used 73362 conses-free 8329 cons-storage 658168
- symbols-used 13718 symbols-free 164 symbol-storage 335216
- bit-vectors-used 0 bit-vectors-total-length 0
- bit-vector-storage 0 vectors-used 7882
- vectors-total-length 118677 vector-storage 537764
- compiled-functions-used 1336 compiled-functions-free 37
- compiled-function-storage 44440 short-strings-used 28829
- long-strings-used 2 strings-free 7722
- short-strings-total-length 916657 short-string-storage 1179648
- long-strings-total-length 32464 string-header-storage 441504
- floats-used 3 floats-free 43 float-storage 2044 markers-used 5089
- markers-free 5098 marker-storage 245280 events-used 103
- events-free 835 event-storage 110656 extents-used 10519
- extents-free 2718 extent-storage 372736
- extent-auxiliarys-used 111 extent-auxiliarys-freed 3
- extent-auxiliary-storage 4440 window-configurations-used 39
- window-configurations-on-free-list 5
- window-configurations-freed 10 window-configuration-storage 9492
- popup-datas-used 3 popup-data-storage 72 toolbar-buttons-used 62
- toolbar-button-storage 4960 toolbar-datas-used 12
- toolbar-data-storage 240 symbol-value-buffer-locals-used 182
- symbol-value-buffer-local-storage 5824
- symbol-value-lisp-magics-used 22
- symbol-value-lisp-magic-storage 1496
- symbol-value-varaliases-used 43
- symbol-value-varalias-storage 1032 opaque-lists-used 2
- opaque-list-storage 48 color-instances-used 12
- color-instance-storage 288 font-instances-used 5
- font-instance-storage 180 opaques-used 11 opaque-storage 312
- range-tables-used 1 range-table-storage 16 faces-used 34
- face-storage 2584 glyphs-used 124 glyph-storage 4464
- specifiers-used 775 specifier-storage 43869 weak-lists-used 786
- weak-list-storage 18864 char-tables-used 40
- char-table-storage 41920 buffers-used 25 buffer-storage 7000
- extent-infos-used 457 extent-infos-freed 73
- extent-info-storage 9140 keymaps-used 275 keymap-storage 12100
- consoles-used 4 console-storage 384 command-builders-used 2
- command-builder-storage 120 devices-used 2 device-storage 344
- frames-used 3 frame-storage 624 image-instances-used 47
- image-instance-storage 3008 windows-used 27 windows-freed 2
- window-storage 9180 lcrecord-lists-used 15
- lcrecord-list-storage 360 hash-tables-used 631
- hash-table-storage 25240 streams-used 1 streams-on-free-list 3
- streams-freed 12 stream-storage 91))
-
- Here is a table explaining each element:
-
- USED-CONSES
- The number of cons cells in use.
-
- FREE-CONSES
- The number of cons cells for which space has been obtained
- from the operating system, but that are not currently being
- used.
-
- USED-SYMS
- The number of symbols in use.
-
- FREE-SYMS
- The number of symbols for which space has been obtained from
- the operating system, but that are not currently being used.
-
- USED-MARKERS
- The number of markers in use.
-
- FREE-MARKERS
- The number of markers for which space has been obtained from
- the operating system, but that are not currently being used.
-
- USED-STRING-CHARS
- The total size of all strings, in characters.
-
- USED-VECTOR-SLOTS
- The total number of elements of existing vectors.
-
- PLIST
- A list of alternating keyword/value pairs providing more
- detailed information. (As you can see above, quite a lot of
- information is provided.)
-
- - User Option: gc-cons-threshold
- The value of this variable is the number of bytes of storage that
- must be allocated for Lisp objects after one garbage collection in
- order to trigger another garbage collection. A cons cell counts
- as eight bytes, a string as one byte per character plus a few
- bytes of overhead, and so on; space allocated to the contents of
- buffers does not count. Note that the subsequent garbage
- collection does not happen immediately when the threshold is
- exhausted, but only the next time the Lisp evaluator is called.
-
- The initial threshold value is 500,000. If you specify a larger
- value, garbage collection will happen less often. This reduces the
- amount of time spent garbage collecting, but increases total
- memory use. You may want to do this when running a program that
- creates lots of Lisp data.
-
- You can make collections more frequent by specifying a smaller
- value, down to 10,000. A value less than 10,000 will remain in
- effect only until the subsequent garbage collection, at which time
- `garbage-collect' will set the threshold back to 10,000. (This does
- not apply if XEmacs was configured with `--debug'. Therefore, be
- careful when setting `gc-cons-threshold' in that case!)
-
- - Function: memory-limit
- This function returns the address of the last byte XEmacs has
- allocated, divided by 1024. We divide the value by 1024 to make
- sure it fits in a Lisp integer.
-
- You can use this to get a general idea of how your actions affect
- the memory usage.
-
- - Variable: pre-gc-hook
- This is a normal hook to be run just before each garbage
- collection. Interrupts, garbage collection, and errors are
- inhibited while this hook runs, so be extremely careful in what
- you add here. In particular, avoid consing, and do not interact
- with the user.
-
- - Variable: post-gc-hook
- This is a normal hook to be run just after each garbage collection.
- Interrupts, garbage collection, and errors are inhibited while
- this hook runs, so be extremely careful in what you add here. In
- particular, avoid consing, and do not interact with the user.
-
- - Variable: gc-message
- This is a string to print to indicate that a garbage collection is
- in progress. This is printed in the echo area. If the selected
- frame is on a window system and `gc-pointer-glyph' specifies a
- value (i.e. a pointer image instance) in the domain of the
- selected frame, the mouse cursor will change instead of this
- message being printed.
-
- - Glyph: gc-pointer-glyph
- This holds the pointer glyph used to indicate that a garbage
- collection is in progress. If the selected window is on a window
- system and this glyph specifies a value (i.e. a pointer image
- instance) in the domain of the selected window, the cursor will be
- changed as specified during garbage collection. Otherwise, a
- message will be printed in the echo area, as controlled by
- `gc-message'. *Note Glyphs::.
-
- If XEmacs was configured with `--debug', you can set the following
-two variables to get direct information about all the allocation that
-is happening in a segment of Lisp code.
-
- - Variable: debug-allocation
- If non-zero, print out information to stderr about all objects
- allocated.
-
- - Variable: debug-allocation-backtrace
- Length (in stack frames) of short backtrace printed out by
- `debug-allocation'.
-
-\1f
-File: lispref.info, Node: Standard Errors, Next: Standard Buffer-Local Variables, Prev: Building XEmacs and Object Allocation, Up: Top
-
-Standard Errors
-***************
-
- Here is the complete list of the error symbols in standard Emacs,
-grouped by concept. The list includes each symbol's message (on the
-`error-message' property of the symbol) and a cross reference to a
-description of how the error can occur.
-
- Each error symbol has an `error-conditions' property that is a list
-of symbols. Normally this list includes the error symbol itself and
-the symbol `error'. Occasionally it includes additional symbols, which
-are intermediate classifications, narrower than `error' but broader
-than a single error symbol. For example, all the errors in accessing
-files have the condition `file-error'.
-
- As a special exception, the error symbol `quit' does not have the
-condition `error', because quitting is not considered an error.
-
- *Note Errors::, for an explanation of how errors are generated and
-handled.
-
-`SYMBOL'
- STRING; REFERENCE.
-
-`error'
- `"error"'
- *Note Errors::.
-
-`quit'
- `"Quit"'
- *Note Quitting::.
-
-`args-out-of-range'
- `"Args out of range"'
- *Note Sequences Arrays Vectors::.
-
-`arith-error'
- `"Arithmetic error"'
- See `/' and `%' in *Note Numbers::.
-
-`beginning-of-buffer'
- `"Beginning of buffer"'
- *Note Motion::.
-
-`buffer-read-only'
- `"Buffer is read-only"'
- *Note Read Only Buffers::.
-
-`cyclic-function-indirection'
- `"Symbol's chain of function indirections contains a loop"'
- *Note Function Indirection::.
-
-`domain-error'
- `"Arithmetic domain error"'
-`end-of-buffer'
- `"End of buffer"'
- *Note Motion::.
-
-`end-of-file'
- `"End of file during parsing"'
- This is not a `file-error'.
- *Note Input Functions::.
-
-`file-error'
- This error and its subcategories do not have error-strings,
- because the error message is constructed from the data items alone
- when the error condition `file-error' is present.
- *Note Files::.
-
-`file-locked'
- This is a `file-error'.
- *Note File Locks::.
-
-`file-already-exists'
- This is a `file-error'.
- *Note Writing to Files::.
-
-`file-supersession'
- This is a `file-error'.
- *Note Modification Time::.
-
-`invalid-byte-code'
- `"Invalid byte code"'
- *Note Byte Compilation::.
-
-`invalid-function'
- `"Invalid function"'
- *Note Classifying Lists::.
-
-`invalid-read-syntax'
- `"Invalid read syntax"'
- *Note Input Functions::.
-
-`invalid-regexp'
- `"Invalid regexp"'
- *Note Regular Expressions::.
-
-`mark-inactive'
- `"The mark is not active now"'
-`no-catch'
- `"No catch for tag"'
- *Note Catch and Throw::.
-
-`overflow-error'
- `"Arithmetic overflow error"'
-`protected-field'
- `"Attempt to modify a protected field"'
-`range-error'
- `"Arithmetic range error"'
-`search-failed'
- `"Search failed"'
- *Note Searching and Matching::.
-
-`setting-constant'
- `"Attempt to set a constant symbol"'
- *Note Variables that Never Change: Constant Variables.
-
-`singularity-error'
- `"Arithmetic singularity error"'
-`tooltalk-error'
- `"ToolTalk error"'
- *Note ToolTalk Support::.
-
-`undefined-keystroke-sequence'
- `"Undefined keystroke sequence"'
-`void-function'
- `"Symbol's function definition is void"'
- *Note Function Cells::.
-
-`void-variable'
- `"Symbol's value as variable is void"'
- *Note Accessing Variables::.
-
-`wrong-number-of-arguments'
- `"Wrong number of arguments"'
- *Note Classifying Lists::.
-
-`wrong-type-argument'
- `"Wrong type argument"'
- *Note Type Predicates::.
-
- These error types, which are all classified as special cases of
-`arith-error', can occur on certain systems for invalid use of
-mathematical functions.
-
-`domain-error'
- `"Arithmetic domain error"'
- *Note Math Functions::.
-
-`overflow-error'
- `"Arithmetic overflow error"'
- *Note Math Functions::.
-
-`range-error'
- `"Arithmetic range error"'
- *Note Math Functions::.
-
-`singularity-error'
- `"Arithmetic singularity error"'
- *Note Math Functions::.
-
-`underflow-error'
- `"Arithmetic underflow error"'
- *Note Math Functions::.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Garbage Collection, Prev: Pure Storage, Up: Building XEmacs and Object Allocation
+
+Garbage Collection
+==================
+
+ When a program creates a list or the user defines a new function
+(such as by loading a library), that data is placed in normal storage.
+If normal storage runs low, then XEmacs asks the operating system to
+allocate more memory in blocks of 2k bytes. Each block is used for one
+type of Lisp object, so symbols, cons cells, markers, etc., are
+segregated in distinct blocks in memory. (Vectors, long strings,
+buffers and certain other editing types, which are fairly large, are
+allocated in individual blocks, one per object, while small strings are
+packed into blocks of 8k bytes. [More correctly, a string is allocated
+in two sections: a fixed size chunk containing the length, list of
+extents, etc.; and a chunk containing the actual characters in the
+string. It is this latter chunk that is either allocated individually
+or packed into 8k blocks. The fixed size chunk is packed into 2k
+blocks, as for conses, markers, etc.])
+
+ It is quite common to use some storage for a while, then release it
+by (for example) killing a buffer or deleting the last pointer to an
+object. XEmacs provides a "garbage collector" to reclaim this
+abandoned storage. (This name is traditional, but "garbage recycler"
+might be a more intuitive metaphor for this facility.)
+
+ The garbage collector operates by finding and marking all Lisp
+objects that are still accessible to Lisp programs. To begin with, it
+assumes all the symbols, their values and associated function
+definitions, and any data presently on the stack, are accessible. Any
+objects that can be reached indirectly through other accessible objects
+are also accessible.
+
+ When marking is finished, all objects still unmarked are garbage. No
+matter what the Lisp program or the user does, it is impossible to refer
+to them, since there is no longer a way to reach them. Their space
+might as well be reused, since no one will miss them. The second
+("sweep") phase of the garbage collector arranges to reuse them.
+
+ The sweep phase puts unused cons cells onto a "free list" for future
+allocation; likewise for symbols, markers, extents, events, floats,
+compiled-function objects, and the fixed-size portion of strings. It
+compacts the accessible small string-chars chunks so they occupy fewer
+8k blocks; then it frees the other 8k blocks. Vectors, buffers,
+windows, and other large objects are individually allocated and freed
+using `malloc' and `free'.
+
+ Common Lisp note: unlike other Lisps, XEmacs Lisp does not call
+ the garbage collector when the free list is empty. Instead, it
+ simply requests the operating system to allocate more storage, and
+ processing continues until `gc-cons-threshold' bytes have been
+ used.
+
+ This means that you can make sure that the garbage collector will
+ not run during a certain portion of a Lisp program by calling the
+ garbage collector explicitly just before it (provided that portion
+ of the program does not use so much space as to force a second
+ garbage collection).
+
+ - Command: garbage-collect
+ This command runs a garbage collection, and returns information on
+ the amount of space in use. (Garbage collection can also occur
+ spontaneously if you use more than `gc-cons-threshold' bytes of
+ Lisp data since the previous garbage collection.)
+
+ `garbage-collect' returns a list containing the following
+ information:
+
+ ((USED-CONSES . FREE-CONSES)
+ (USED-SYMS . FREE-SYMS)
+ (USED-MARKERS . FREE-MARKERS)
+ USED-STRING-CHARS
+ USED-VECTOR-SLOTS
+ (PLIST))
+
+ => ((73362 . 8325) (13718 . 164)
+ (5089 . 5098) 949121 118677
+ (conses-used 73362 conses-free 8329 cons-storage 658168
+ symbols-used 13718 symbols-free 164 symbol-storage 335216
+ bit-vectors-used 0 bit-vectors-total-length 0
+ bit-vector-storage 0 vectors-used 7882
+ vectors-total-length 118677 vector-storage 537764
+ compiled-functions-used 1336 compiled-functions-free 37
+ compiled-function-storage 44440 short-strings-used 28829
+ long-strings-used 2 strings-free 7722
+ short-strings-total-length 916657 short-string-storage 1179648
+ long-strings-total-length 32464 string-header-storage 441504
+ floats-used 3 floats-free 43 float-storage 2044 markers-used 5089
+ markers-free 5098 marker-storage 245280 events-used 103
+ events-free 835 event-storage 110656 extents-used 10519
+ extents-free 2718 extent-storage 372736
+ extent-auxiliarys-used 111 extent-auxiliarys-freed 3
+ extent-auxiliary-storage 4440 window-configurations-used 39
+ window-configurations-on-free-list 5
+ window-configurations-freed 10 window-configuration-storage 9492
+ popup-datas-used 3 popup-data-storage 72 toolbar-buttons-used 62
+ toolbar-button-storage 4960 toolbar-datas-used 12
+ toolbar-data-storage 240 symbol-value-buffer-locals-used 182
+ symbol-value-buffer-local-storage 5824
+ symbol-value-lisp-magics-used 22
+ symbol-value-lisp-magic-storage 1496
+ symbol-value-varaliases-used 43
+ symbol-value-varalias-storage 1032 opaque-lists-used 2
+ opaque-list-storage 48 color-instances-used 12
+ color-instance-storage 288 font-instances-used 5
+ font-instance-storage 180 opaques-used 11 opaque-storage 312
+ range-tables-used 1 range-table-storage 16 faces-used 34
+ face-storage 2584 glyphs-used 124 glyph-storage 4464
+ specifiers-used 775 specifier-storage 43869 weak-lists-used 786
+ weak-list-storage 18864 char-tables-used 40
+ char-table-storage 41920 buffers-used 25 buffer-storage 7000
+ extent-infos-used 457 extent-infos-freed 73
+ extent-info-storage 9140 keymaps-used 275 keymap-storage 12100
+ consoles-used 4 console-storage 384 command-builders-used 2
+ command-builder-storage 120 devices-used 2 device-storage 344
+ frames-used 3 frame-storage 624 image-instances-used 47
+ image-instance-storage 3008 windows-used 27 windows-freed 2
+ window-storage 9180 lcrecord-lists-used 15
+ lcrecord-list-storage 360 hash-tables-used 631
+ hash-table-storage 25240 streams-used 1 streams-on-free-list 3
+ streams-freed 12 stream-storage 91))
+
+ Here is a table explaining each element:
+
+ USED-CONSES
+ The number of cons cells in use.
+
+ FREE-CONSES
+ The number of cons cells for which space has been obtained
+ from the operating system, but that are not currently being
+ used.
+
+ USED-SYMS
+ The number of symbols in use.
+
+ FREE-SYMS
+ The number of symbols for which space has been obtained from
+ the operating system, but that are not currently being used.
+
+ USED-MARKERS
+ The number of markers in use.
+
+ FREE-MARKERS
+ The number of markers for which space has been obtained from
+ the operating system, but that are not currently being used.
+
+ USED-STRING-CHARS
+ The total size of all strings, in characters.
+
+ USED-VECTOR-SLOTS
+ The total number of elements of existing vectors.
+
+ PLIST
+ A list of alternating keyword/value pairs providing more
+ detailed information. (As you can see above, quite a lot of
+ information is provided.)
+
+ - User Option: gc-cons-threshold
+ The value of this variable is the number of bytes of storage that
+ must be allocated for Lisp objects after one garbage collection in
+ order to trigger another garbage collection. A cons cell counts
+ as eight bytes, a string as one byte per character plus a few
+ bytes of overhead, and so on; space allocated to the contents of
+ buffers does not count. Note that the subsequent garbage
+ collection does not happen immediately when the threshold is
+ exhausted, but only the next time the Lisp evaluator is called.
+
+ The initial threshold value is 500,000. If you specify a larger
+ value, garbage collection will happen less often. This reduces the
+ amount of time spent garbage collecting, but increases total
+ memory use. You may want to do this when running a program that
+ creates lots of Lisp data.
+
+ You can make collections more frequent by specifying a smaller
+ value, down to 10,000. A value less than 10,000 will remain in
+ effect only until the subsequent garbage collection, at which time
+ `garbage-collect' will set the threshold back to 10,000. (This does
+ not apply if XEmacs was configured with `--debug'. Therefore, be
+ careful when setting `gc-cons-threshold' in that case!)
+
+ - Function: memory-limit
+ This function returns the address of the last byte XEmacs has
+ allocated, divided by 1024. We divide the value by 1024 to make
+ sure it fits in a Lisp integer.
+
+ You can use this to get a general idea of how your actions affect
+ the memory usage.
+
+ - Variable: pre-gc-hook
+ This is a normal hook to be run just before each garbage
+ collection. Interrupts, garbage collection, and errors are
+ inhibited while this hook runs, so be extremely careful in what
+ you add here. In particular, avoid consing, and do not interact
+ with the user.
+
+ - Variable: post-gc-hook
+ This is a normal hook to be run just after each garbage collection.
+ Interrupts, garbage collection, and errors are inhibited while
+ this hook runs, so be extremely careful in what you add here. In
+ particular, avoid consing, and do not interact with the user.
+
+ - Variable: gc-message
+ This is a string to print to indicate that a garbage collection is
+ in progress. This is printed in the echo area. If the selected
+ frame is on a window system and `gc-pointer-glyph' specifies a
+ value (i.e. a pointer image instance) in the domain of the
+ selected frame, the mouse cursor will change instead of this
+ message being printed.
+
+ - Glyph: gc-pointer-glyph
+ This holds the pointer glyph used to indicate that a garbage
+ collection is in progress. If the selected window is on a window
+ system and this glyph specifies a value (i.e. a pointer image
+ instance) in the domain of the selected window, the cursor will be
+ changed as specified during garbage collection. Otherwise, a
+ message will be printed in the echo area, as controlled by
+ `gc-message'. *Note Glyphs::.
+
+ If XEmacs was configured with `--debug', you can set the following
+two variables to get direct information about all the allocation that
+is happening in a segment of Lisp code.
+
+ - Variable: debug-allocation
+ If non-zero, print out information to stderr about all objects
+ allocated.
+
+ - Variable: debug-allocation-backtrace
+ Length (in stack frames) of short backtrace printed out by
+ `debug-allocation'.
+
+\1f
+File: lispref.info, Node: Standard Errors, Next: Standard Buffer-Local Variables, Prev: Building XEmacs and Object Allocation, Up: Top
+
+Standard Errors
+***************
+
+ Here is the complete list of the error symbols in standard Emacs,
+grouped by concept. The list includes each symbol's message (on the
+`error-message' property of the symbol) and a cross reference to a
+description of how the error can occur.
+
+ Each error symbol has an `error-conditions' property that is a list
+of symbols. Normally this list includes the error symbol itself and
+the symbol `error'. Occasionally it includes additional symbols, which
+are intermediate classifications, narrower than `error' but broader
+than a single error symbol. For example, all the errors in accessing
+files have the condition `file-error'.
+
+ As a special exception, the error symbol `quit' does not have the
+condition `error', because quitting is not considered an error.
+
+ *Note Errors::, for an explanation of how errors are generated and
+handled.
+
+`SYMBOL'
+ STRING; REFERENCE.
+
+`error'
+ `"error"'
+ *Note Errors::.
+
+`quit'
+ `"Quit"'
+ *Note Quitting::.
+
+`args-out-of-range'
+ `"Args out of range"'
+ *Note Sequences Arrays Vectors::.
+
+`arith-error'
+ `"Arithmetic error"'
+ See `/' and `%' in *Note Numbers::.
+
+`beginning-of-buffer'
+ `"Beginning of buffer"'
+ *Note Motion::.
+
+`buffer-read-only'
+ `"Buffer is read-only"'
+ *Note Read Only Buffers::.
+
+`cyclic-function-indirection'
+ `"Symbol's chain of function indirections contains a loop"'
+ *Note Function Indirection::.
+
+`domain-error'
+ `"Arithmetic domain error"'
+`end-of-buffer'
+ `"End of buffer"'
+ *Note Motion::.
+
+`end-of-file'
+ `"End of file during parsing"'
+ This is not a `file-error'.
+ *Note Input Functions::.
+
+`file-error'
+ This error and its subcategories do not have error-strings,
+ because the error message is constructed from the data items alone
+ when the error condition `file-error' is present.
+ *Note Files::.
+
+`file-locked'
+ This is a `file-error'.
+ *Note File Locks::.
+
+`file-already-exists'
+ This is a `file-error'.
+ *Note Writing to Files::.
+
+`file-supersession'
+ This is a `file-error'.
+ *Note Modification Time::.
+
+`invalid-byte-code'
+ `"Invalid byte code"'
+ *Note Byte Compilation::.
+
+`invalid-function'
+ `"Invalid function"'
+ *Note Classifying Lists::.
+
+`invalid-read-syntax'
+ `"Invalid read syntax"'
+ *Note Input Functions::.
+
+`invalid-regexp'
+ `"Invalid regexp"'
+ *Note Regular Expressions::.
+
+`mark-inactive'
+ `"The mark is not active now"'
+`no-catch'
+ `"No catch for tag"'
+ *Note Catch and Throw::.
+
+`overflow-error'
+ `"Arithmetic overflow error"'
+`protected-field'
+ `"Attempt to modify a protected field"'
+`range-error'
+ `"Arithmetic range error"'
+`search-failed'
+ `"Search failed"'
+ *Note Searching and Matching::.
+
+`setting-constant'
+ `"Attempt to set a constant symbol"'
+ *Note Variables that Never Change: Constant Variables.
+
+`singularity-error'
+ `"Arithmetic singularity error"'
+`tooltalk-error'
+ `"ToolTalk error"'
+ *Note ToolTalk Support::.
+
+`undefined-keystroke-sequence'
+ `"Undefined keystroke sequence"'
+`void-function'
+ `"Symbol's function definition is void"'
+ *Note Function Cells::.
+
+`void-variable'
+ `"Symbol's value as variable is void"'
+ *Note Accessing Variables::.
+
+`wrong-number-of-arguments'
+ `"Wrong number of arguments"'
+ *Note Classifying Lists::.
+
+`wrong-type-argument'
+ `"Wrong type argument"'
+ *Note Type Predicates::.
+
+ These error types, which are all classified as special cases of
+`arith-error', can occur on certain systems for invalid use of
+mathematical functions.
+
+`domain-error'
+ `"Arithmetic domain error"'
+ *Note Math Functions::.
+
+`overflow-error'
+ `"Arithmetic overflow error"'
+ *Note Math Functions::.
+
+`range-error'
+ `"Arithmetic range error"'
+ *Note Math Functions::.
+
+`singularity-error'
+ `"Arithmetic singularity error"'
+ *Note Math Functions::.
+
+`underflow-error'
+ `"Arithmetic underflow error"'
+ *Note Math Functions::.
+
+\1f
File: lispref.info, Node: Standard Buffer-Local Variables, Next: Standard Keymaps, Prev: Standard Errors, Up: Top
Buffer-Local Variables
* current-buffer: Current Buffer.
* current-case-table: Case Tables.
* current-column: Columns.
+* current-display-table: Active Display Table.
* current-fill-column: Margins.
* current-frame-configuration: Frame Configurations.
* current-global-map: Active Keymaps.
* image specifiers: Image Specifiers.
* image-instance-background: Image Instance Functions.
* image-instance-depth: Image Instance Functions.
+* image-instance-domain: Image Instance Functions.
* image-instance-file-name: Image Instance Functions.
* image-instance-foreground: Image Instance Functions.
* image-instance-height: Image Instance Functions.
* make-backup-file-name: Backup Names.
* make-backup-files: Making Backups.
* make-bit-vector: Bit Vector Functions.
+* make-boolean-specifier: Creating Specifiers.
* make-byte-code: Compiled-Function Objects.
* make-char: MULE Characters.
* make-char-table: Working With Char Tables.
* make-charset: Basic Charset Functions.
* make-coding-system: Basic Coding System Functions.
+* make-color-specifier: Color Specifiers.
* make-composite-char: Composite Characters.
* make-device: Connecting to a Console or Device.
* make-directory: Create/Delete Dirs.
* make-display-table: Display Table Format.
+* make-display-table-specifier: Creating Specifiers.
* make-event: Working With Events.
* make-extent: Creating and Modifying Extents.
* make-face: Basic Face Functions.
+* make-face-boolean-specifier: Color Specifiers.
* make-file-part: Creating a Partial File.
* make-font-instance: Font Instances.
+* make-font-specifier: Font Specifiers.
* make-frame: Creating Frames.
* make-frame-invisible: Visibility of Frames.
* make-frame-visible: Visibility of Frames.
+* make-generic-specifier: Creating Specifiers.
* make-glyph: Creating Glyphs.
* make-glyph-internal: Creating Glyphs.
+* make-gutter-size-specifier: Creating Gutter.
+* make-gutter-specifier: Creating Gutter.
+* make-gutter-visible-specifier: Creating Gutter.
* make-hash-table: Introduction to Hash Tables.
* make-icon-glyph: Creating Glyphs.
* make-image-instance: Image Instance Functions.
* make-image-specifier: Image Specifiers.
* make-indirect-buffer: Indirect Buffers.
+* make-integer-specifier: Creating Specifiers.
* make-keymap: Creating Keymaps.
* make-list: Building Lists.
* make-local-hook: Hooks.
* make-local-variable: Creating Buffer-Local.
* make-marker: Creating Markers.
+* make-natnum-specifier: Creating Specifiers.
* make-obsolete: Obsoleteness.
* make-obsolete-variable: Obsoleteness.
* make-pointer-glyph: Creating Glyphs.
* make-symbolic-link: Changing File Attributes.
* make-syntax-table: Syntax Table Functions.
* make-temp-name: Unique File Names.
+* make-toolbar-specifier: Creating Toolbar.
* make-tooltalk-message: Elisp Interface for Sending Messages.
* make-tooltalk-pattern: Elisp Interface for Receiving Messages.
* make-tty-device: Connecting to a Console or Device.
* whitespace character: Syntax Class Table.
* widen: Narrowing.
* widening: Narrowing.
+* widget-image-instance-p: Image Instance Types.
* window: Basic Windows.
* window configuration (Edebug): Edebug Display Update.
* window configurations: Window Configurations.
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
\1f
Tag Table:
(Indirect)
Node: Help Menu\7f90959
Node: Menu Customization\7f91360
Node: Entering Emacs\7f95590
-Node: Exiting\7f96893
-Node: Command Switches\7f99984
-Node: Startup Paths\7f109171
-Node: Basic\7f116751
-Node: Blank Lines\7f126229
-Node: Continuation Lines\7f127655
-Node: Position Info\7f129087
-Node: Arguments\7f132220
-Node: Undo\7f135357
-Node: Minibuffer\7f138304
-Node: Minibuffer File\7f140914
-Node: Minibuffer Edit\7f142719
-Node: Completion\7f145419
-Node: Completion Example\7f147350
-Node: Completion Commands\7f148444
-Node: Strict Completion\7f151100
-Node: Completion Options\7f152881
-Node: Minibuffer History\7f154175
-Node: Repetition\7f157359
-Node: M-x\7f160192
-Node: Help\7f165286
-Node: Help Summary\7f166696
-Node: Key Help\7f169482
-Node: Name Help\7f170441
-Node: Apropos\7f173086
-Node: Library Keywords\7f176205
-Node: Help Mode\7f178526
-Node: Misc Help\7f179023
-Node: Mark\7f182172
-Node: Setting Mark\7f184026
-Node: Using Region\7f187148
-Node: Marking Objects\7f187885
-Node: Mark Ring\7f189723
-Node: Mouse Selection\7f191439
-Node: Additional Mouse Operations\7f193446
-Node: Killing\7f197650
-Node: Yanking\7f203286
-Node: Kill Ring\7f204089
-Node: Appending Kills\7f205691
-Node: Earlier Kills\7f207728
-Node: Using X Selections\7f210341
-Node: X Clipboard Selection\7f211591
-Node: X Selection Commands\7f213768
-Node: X Cut Buffers\7f214854
-Node: Active Regions\7f216213
-Node: Accumulating Text\7f220793
-Node: Rectangles\7f223866
-Node: Registers\7f227385
-Node: RegPos\7f228839
-Node: RegText\7f229995
-Node: RegRect\7f231101
-Node: RegConfig\7f231980
-Node: RegNumbers\7f232920
-Node: RegFiles\7f233638
-Node: Bookmarks\7f234296
-Node: Display\7f237668
-Node: Scrolling\7f239163
-Node: Horizontal Scrolling\7f243306
-Node: Selective Display\7f244501
-Node: Display Vars\7f245720
-Node: Search\7f248398
-Node: Incremental Search\7f249591
-Node: Non-Incremental Search\7f258518
-Node: Word Search\7f259960
-Node: Regexp Search\7f261578
-Node: Regexps\7f263114
-Node: Search Case\7f273415
-Node: Replace\7f274196
-Node: Unconditional Replace\7f275144
-Node: Regexp Replace\7f276279
-Node: Replacement and Case\7f277214
-Node: Query Replace\7f278194
-Node: Other Repeating Search\7f281421
-Node: Fixit\7f282676
-Node: Kill Errors\7f283256
-Node: Transpose\7f284589
-Node: Fixing Case\7f286993
-Node: Spelling\7f287639
-Node: Files\7f289100
-Node: File Names\7f290410
-Node: Visiting\7f294747
-Node: Saving\7f301433
-Node: Backup\7f306356
-Node: Backup Names\7f307752
-Node: Backup Deletion\7f309235
-Node: Backup Copying\7f310385
-Node: Interlocking\7f312091
-Node: Reverting\7f316219
-Node: Auto Save\7f318131
-Node: Auto Save Files\7f319098
-Node: Auto Save Control\7f320939
-Node: Recover\7f322777
-Node: Version Control\7f323932
-Node: Concepts of VC\7f325970
-Node: Editing with VC\7f327580
-Node: Variables for Check-in/out\7f332836
-Node: Log Entries\7f334735
-Node: Change Logs and VC\7f335915
-Node: Old Versions\7f339182
-Node: VC Status\7f341185
-Node: Renaming and VC\7f342899
-Node: Snapshots\7f343578
-Node: Making Snapshots\7f344079
-Node: Snapshot Caveats\7f345372
-Node: Version Headers\7f347181
-Node: ListDir\7f349880
-Node: Comparing Files\7f351929
-Node: Dired\7f353462
-Node: Dired Enter\7f354133
-Node: Dired Edit\7f354958
-Node: Dired Deletion\7f356705
-Node: Dired Immed\7f359928
-Node: Misc File Ops\7f361204
-Node: Buffers\7f363692
-Node: Select Buffer\7f365850
-Node: List Buffers\7f367645
-Node: Misc Buffer\7f369403
-Node: Kill Buffer\7f371046
-Node: Several Buffers\7f372176
-Node: Windows\7f376042
-Node: Basic Window\7f376753
-Node: Split Window\7f378472
-Node: Other Window\7f380605
-Node: Pop Up Window\7f383034
-Node: Change Window\7f384539
-Node: Mule\7f387447
-Node: Mule Intro\7f388710
-Node: Language Environments\7f389726
-Node: Input Methods\7f391833
-Node: Select Input Method\7f395553
-Node: Coding Systems\7f397708
-Node: Recognize Coding\7f401894
-Node: Specify Coding\7f405220
-Node: Major Modes\7f410151
-Node: Choosing Modes\7f412370
-Node: Indentation\7f414760
-Node: Indentation Commands\7f416855
-Node: Tab Stops\7f419584
-Node: Just Spaces\7f421433
-Node: Text\7f422248
-Node: Text Mode\7f424231
-Node: Nroff Mode\7f426310
-Node: TeX Mode\7f427953
-Node: TeX Editing\7f430205
-Node: TeX Print\7f433639
-Node: Outline Mode\7f436858
-Node: Outline Format\7f438339
-Node: Outline Motion\7f441139
-Node: Outline Visibility\7f442692
-Node: Words\7f445613
-Node: Sentences\7f448560
-Node: Paragraphs\7f450756
-Node: Pages\7f453044
-Node: Filling\7f455644
-Node: Auto Fill\7f456215
-Node: Fill Commands\7f458362
-Node: Fill Prefix\7f460527
-Node: Case\7f462715
-Node: Programs\7f464743
-Node: Program Modes\7f467292
-Node: Lists\7f469524
-Node: Defuns\7f475364
-Node: Grinding\7f478017
-Node: Basic Indent\7f478645
-Node: Multi-line Indent\7f480666
-Node: Lisp Indent\7f482282
-Node: C Indent\7f485732
-Node: Matching\7f490972
-Node: Comments\7f492494
-Node: Balanced Editing\7f498946
-Node: Lisp Completion\7f499960
-Node: Documentation\7f500975
-Node: Change Log\7f502214
-Node: Tags\7f504792
-Node: Tag Syntax\7f506441
-Node: Create Tags Table\7f510385
-Node: Etags Regexps\7f514445
-Node: Select Tags Table\7f519103
-Node: Find Tag\7f522876
-Node: Tags Search\7f525840
-Node: List Tags\7f529296
-Node: Fortran\7f530325
-Node: Fortran Motion\7f531401
-Node: Fortran Indent\7f532221
-Node: ForIndent Commands\7f532906
-Node: ForIndent Num\7f534051
-Node: ForIndent Conv\7f535325
-Node: ForIndent Vars\7f536101
-Node: Fortran Comments\7f537269
-Node: Fortran Columns\7f540867
-Node: Fortran Abbrev\7f542290
-Node: Asm Mode\7f543199
-Node: Running\7f543751
-Node: Compilation\7f544721
-Node: Lisp Modes\7f549571
-Node: Lisp Libraries\7f550844
-Node: Loading\7f551398
-Node: Compiling Libraries\7f555858
-Node: Mocklisp\7f558749
-Node: Lisp Eval\7f559426
-Node: Lisp Debug\7f563066
-Node: Lisp Interaction\7f568491
-Node: External Lisp\7f569846
-Node: Packages\7f571920
-Node: Package Terminology\7f572661
-Node: Using Packages\7f574019
-Node: Building Packages\7f582878
-Node: Abbrevs\7f585400
-Node: Defining Abbrevs\7f587600
-Node: Expanding Abbrevs\7f590047
-Node: Editing Abbrevs\7f592749
-Node: Saving Abbrevs\7f594622
-Node: Dynamic Abbrevs\7f596562
-Node: Picture\7f597864
-Node: Basic Picture\7f600297
-Node: Insert in Picture\7f602582
-Node: Tabs in Picture\7f604004
-Node: Rectangles in Picture\7f605525
-Node: Sending Mail\7f607433
-Node: Mail Format\7f609144
-Node: Mail Headers\7f610494
-Node: Mail Mode\7f616902
-Node: Reading Mail\7f620515
-Node: Calendar/Diary\7f622090
-Node: Calendar Motion\7f623762
-Node: Calendar Unit Motion\7f624645
-Node: Move to Beginning or End\7f626968
-Node: Specified Dates\7f628101
-Node: Scroll Calendar\7f628989
-Node: Mark and Region\7f630780
-Node: General Calendar\7f632686
-Node: LaTeX Calendar\7f634294
-Node: Holidays\7f636308
-Node: Sunrise/Sunset\7f639410
-Node: Lunar Phases\7f642453
-Node: Other Calendars\7f643838
-Node: Calendar Systems\7f645325
-Node: To Other Calendar\7f648436
-Node: From Other Calendar\7f650427
-Node: Mayan Calendar\7f652732
-Node: Diary\7f655927
-Node: Diary Commands\7f657676
-Node: Format of Diary File\7f660982
-Node: Date Formats\7f663852
-Node: Adding to Diary\7f666426
-Node: Special Diary Entries\7f668057
-Node: Calendar Customization\7f673396
-Node: Calendar Customizing\7f674258
-Node: Holiday Customizing\7f677477
-Node: Date Display Format\7f683945
-Node: Time Display Format\7f684903
-Node: Daylight Savings\7f686041
-Node: Diary Customizing\7f689229
-Node: Hebrew/Islamic Entries\7f693850
-Node: Fancy Diary Display\7f697190
-Node: Included Diary Files\7f699087
-Node: Sexp Diary Entries\7f700068
-Node: Appt Customizing\7f705158
-Node: Sorting\7f706204
-Node: Shell\7f711010
-Node: Single Shell\7f712303
-Node: Interactive Shell\7f713902
-Node: Shell Mode\7f717667
-Node: Terminal emulator\7f720158
-Node: Term Mode\7f722467
-Node: Paging in Term\7f723381
-Node: Narrowing\7f724179
-Node: Hardcopy\7f726129
-Node: Recursive Edit\7f727101
-Node: Dissociated Press\7f730088
-Node: CONX\7f732651
-Node: Amusements\7f733675
-Node: Emulation\7f734155
-Node: Customization\7f735999
-Node: Minor Modes\7f737844
-Node: Variables\7f739476
-Node: Examining\7f741432
-Node: Easy Customization\7f742893
-Node: Customization Groups\7f743907
-Node: Changing an Option\7f746836
-Node: Face Customization\7f753092
-Node: Specific Customization\7f754856
-Node: Edit Options\7f757463
-Node: Locals\7f759047
-Node: File Variables\7f762226
-Node: Keyboard Macros\7f766780
-Node: Basic Kbd Macro\7f768951
-Node: Save Kbd Macro\7f770883
-Node: Kbd Macro Query\7f772552
-Node: Key Bindings\7f774494
-Node: Keymaps\7f775368
-Node: Rebinding\7f779218
-Node: Interactive Rebinding\7f779917
-Node: Programmatic Rebinding\7f782109
-Node: Key Bindings Using Strings\7f784916
-Node: Disabling\7f786543
-Node: Syntax\7f788315
-Node: Syntax Entry\7f789196
-Node: Syntax Change\7f793280
-Node: Init File\7f795449
-Node: Init Syntax\7f796954
-Node: Init Examples\7f799306
-Node: Terminal Init\7f803496
-Node: Audible Bell\7f805206
-Node: Faces\7f808637
-Node: Frame Components\7f813479
-Node: X Resources\7f813924
-Node: Geometry Resources\7f815583
-Node: Iconic Resources\7f818031
-Node: Resource List\7f818503
-Node: Face Resources\7f825010
-Node: Widgets\7f828687
-Node: Menubar Resources\7f829626
-Node: Quitting\7f830559
-Node: Lossage\7f833537
-Node: Stuck Recursive\7f834181
-Node: Screen Garbled\7f834887
-Node: Text Garbled\7f836021
-Node: Unasked-for Search\7f836660
-Node: Emergency Escape\7f837445
-Node: Total Frustration\7f839224
-Node: Bugs\7f839855
-Node: Glossary\7f849389
-Node: Manifesto\7f881042
-Node: Key Index\7f904518
-Node: Command Index\7f930187
-Node: Variable Index\7f972577
-Node: Concept Index\7f988769
+Node: Exiting\7f98487
+Node: Command Switches\7f102960
+Node: Startup Paths\7f112147
+Node: Basic\7f119484
+Node: Inserting Text\7f120892
+Node: Moving Point\7f123888
+Node: Erasing\7f127494
+Node: Basic Files\7f128799
+Node: Basic Help\7f130721
+Node: Blank Lines\7f131316
+Node: Continuation Lines\7f132892
+Node: Position Info\7f134559
+Node: Arguments\7f137975
+Node: Undo\7f142074
+Node: Minibuffer\7f145021
+Node: Minibuffer File\7f147631
+Node: Minibuffer Edit\7f149436
+Node: Completion\7f152377
+Node: Completion Example\7f154308
+Node: Completion Commands\7f155403
+Node: Strict Completion\7f158379
+Node: Completion Options\7f160160
+Node: Minibuffer History\7f161668
+Node: Repetition\7f164852
+Node: M-x\7f167697
+Node: Help\7f172791
+Node: Help Summary\7f174201
+Node: Key Help\7f176987
+Node: Name Help\7f177946
+Node: Apropos\7f180591
+Node: Library Keywords\7f183710
+Node: Help Mode\7f186031
+Node: Misc Help\7f186528
+Node: Mark\7f189677
+Node: Setting Mark\7f191531
+Node: Using Region\7f194653
+Node: Marking Objects\7f195390
+Node: Mark Ring\7f197228
+Node: Mouse Selection\7f198944
+Node: Additional Mouse Operations\7f200951
+Node: Killing\7f205155
+Node: Yanking\7f210791
+Node: Kill Ring\7f211594
+Node: Appending Kills\7f213196
+Node: Earlier Kills\7f215233
+Node: Using X Selections\7f217846
+Node: X Clipboard Selection\7f219096
+Node: X Selection Commands\7f221273
+Node: X Cut Buffers\7f222359
+Node: Active Regions\7f223718
+Node: Accumulating Text\7f228298
+Node: Rectangles\7f231371
+Node: Registers\7f234890
+Node: RegPos\7f236344
+Node: RegText\7f237500
+Node: RegRect\7f238606
+Node: RegConfig\7f239485
+Node: RegNumbers\7f240425
+Node: RegFiles\7f241143
+Node: Bookmarks\7f241801
+Node: Display\7f245173
+Node: Scrolling\7f246668
+Node: Horizontal Scrolling\7f250811
+Node: Selective Display\7f252006
+Node: Display Vars\7f253225
+Node: Search\7f255903
+Node: Incremental Search\7f257096
+Node: Non-Incremental Search\7f266023
+Node: Word Search\7f267465
+Node: Regexp Search\7f269083
+Node: Regexps\7f270619
+Node: Search Case\7f280920
+Node: Replace\7f281701
+Node: Unconditional Replace\7f282649
+Node: Regexp Replace\7f283784
+Node: Replacement and Case\7f284719
+Node: Query Replace\7f285699
+Node: Other Repeating Search\7f288926
+Node: Fixit\7f290181
+Node: Kill Errors\7f290761
+Node: Transpose\7f292094
+Node: Fixing Case\7f294498
+Node: Spelling\7f295144
+Node: Files\7f296605
+Node: File Names\7f297915
+Node: Visiting\7f302252
+Node: Saving\7f308938
+Node: Backup\7f313861
+Node: Backup Names\7f315257
+Node: Backup Deletion\7f316740
+Node: Backup Copying\7f317890
+Node: Interlocking\7f319596
+Node: Reverting\7f323724
+Node: Auto Save\7f325636
+Node: Auto Save Files\7f326603
+Node: Auto Save Control\7f328444
+Node: Recover\7f330282
+Node: Version Control\7f331437
+Node: Concepts of VC\7f333475
+Node: Editing with VC\7f335085
+Node: Variables for Check-in/out\7f340341
+Node: Log Entries\7f342240
+Node: Change Logs and VC\7f343420
+Node: Old Versions\7f346687
+Node: VC Status\7f348690
+Node: Renaming and VC\7f350404
+Node: Snapshots\7f351083
+Node: Making Snapshots\7f351584
+Node: Snapshot Caveats\7f352877
+Node: Version Headers\7f354686
+Node: ListDir\7f357385
+Node: Comparing Files\7f359434
+Node: Dired\7f360967
+Node: Dired Enter\7f361638
+Node: Dired Edit\7f362463
+Node: Dired Deletion\7f364210
+Node: Dired Immed\7f367433
+Node: Misc File Ops\7f368709
+Node: Buffers\7f371197
+Node: Select Buffer\7f373355
+Node: List Buffers\7f375150
+Node: Misc Buffer\7f376908
+Node: Kill Buffer\7f378551
+Node: Several Buffers\7f379681
+Node: Windows\7f383547
+Node: Basic Window\7f384258
+Node: Split Window\7f385977
+Node: Other Window\7f388110
+Node: Pop Up Window\7f390539
+Node: Change Window\7f392044
+Node: Mule\7f394952
+Node: Mule Intro\7f396215
+Node: Language Environments\7f397231
+Node: Input Methods\7f399338
+Node: Select Input Method\7f403058
+Node: Coding Systems\7f405213
+Node: Recognize Coding\7f409399
+Node: Specify Coding\7f412725
+Node: Major Modes\7f417656
+Node: Choosing Modes\7f419875
+Node: Indentation\7f422265
+Node: Indentation Commands\7f424360
+Node: Tab Stops\7f427089
+Node: Just Spaces\7f428938
+Node: Text\7f429753
+Node: Text Mode\7f431736
+Node: Nroff Mode\7f433815
+Node: TeX Mode\7f435458
+Node: TeX Editing\7f437710
+Node: TeX Print\7f441144
+Node: Outline Mode\7f444363
+Node: Outline Format\7f445844
+Node: Outline Motion\7f448644
+Node: Outline Visibility\7f450197
+Node: Words\7f453118
+Node: Sentences\7f456065
+Node: Paragraphs\7f458261
+Node: Pages\7f460549
+Node: Filling\7f463149
+Node: Auto Fill\7f463720
+Node: Fill Commands\7f465867
+Node: Fill Prefix\7f468032
+Node: Case\7f470220
+Node: Programs\7f472248
+Node: Program Modes\7f474797
+Node: Lists\7f477029
+Node: Defuns\7f482869
+Node: Grinding\7f485522
+Node: Basic Indent\7f486150
+Node: Multi-line Indent\7f488171
+Node: Lisp Indent\7f489787
+Node: C Indent\7f493237
+Node: Matching\7f498477
+Node: Comments\7f499999
+Node: Balanced Editing\7f506451
+Node: Lisp Completion\7f507465
+Node: Documentation\7f508480
+Node: Change Log\7f509719
+Node: Tags\7f512297
+Node: Tag Syntax\7f513946
+Node: Create Tags Table\7f517890
+Node: Etags Regexps\7f521950
+Node: Select Tags Table\7f526608
+Node: Find Tag\7f530381
+Node: Tags Search\7f533345
+Node: List Tags\7f536801
+Node: Fortran\7f537830
+Node: Fortran Motion\7f538906
+Node: Fortran Indent\7f539726
+Node: ForIndent Commands\7f540411
+Node: ForIndent Num\7f541556
+Node: ForIndent Conv\7f542830
+Node: ForIndent Vars\7f543606
+Node: Fortran Comments\7f544774
+Node: Fortran Columns\7f548372
+Node: Fortran Abbrev\7f549795
+Node: Asm Mode\7f550704
+Node: Running\7f551256
+Node: Compilation\7f552226
+Node: Lisp Modes\7f557076
+Node: Lisp Libraries\7f558349
+Node: Loading\7f558903
+Node: Compiling Libraries\7f563363
+Node: Mocklisp\7f566254
+Node: Lisp Eval\7f566931
+Node: Lisp Debug\7f570571
+Node: Lisp Interaction\7f575996
+Node: External Lisp\7f577351
+Node: Packages\7f579425
+Node: Package Terminology\7f580166
+Node: Using Packages\7f581524
+Node: Building Packages\7f590383
+Node: Abbrevs\7f592905
+Node: Defining Abbrevs\7f595105
+Node: Expanding Abbrevs\7f597552
+Node: Editing Abbrevs\7f600254
+Node: Saving Abbrevs\7f602127
+Node: Dynamic Abbrevs\7f604067
+Node: Picture\7f605369
+Node: Basic Picture\7f607802
+Node: Insert in Picture\7f610087
+Node: Tabs in Picture\7f611509
+Node: Rectangles in Picture\7f613030
+Node: Sending Mail\7f614938
+Node: Mail Format\7f616649
+Node: Mail Headers\7f617999
+Node: Mail Mode\7f624407
+Node: Reading Mail\7f628020
+Node: Calendar/Diary\7f629595
+Node: Calendar Motion\7f631267
+Node: Calendar Unit Motion\7f632150
+Node: Move to Beginning or End\7f634473
+Node: Specified Dates\7f635606
+Node: Scroll Calendar\7f636494
+Node: Mark and Region\7f638285
+Node: General Calendar\7f640191
+Node: LaTeX Calendar\7f641799
+Node: Holidays\7f643813
+Node: Sunrise/Sunset\7f646915
+Node: Lunar Phases\7f649958
+Node: Other Calendars\7f651343
+Node: Calendar Systems\7f652830
+Node: To Other Calendar\7f655941
+Node: From Other Calendar\7f657932
+Node: Mayan Calendar\7f660237
+Node: Diary\7f663432
+Node: Diary Commands\7f665181
+Node: Format of Diary File\7f668487
+Node: Date Formats\7f671357
+Node: Adding to Diary\7f673931
+Node: Special Diary Entries\7f675562
+Node: Calendar Customization\7f680901
+Node: Calendar Customizing\7f681763
+Node: Holiday Customizing\7f684982
+Node: Date Display Format\7f691450
+Node: Time Display Format\7f692408
+Node: Daylight Savings\7f693546
+Node: Diary Customizing\7f696734
+Node: Hebrew/Islamic Entries\7f701355
+Node: Fancy Diary Display\7f704695
+Node: Included Diary Files\7f706592
+Node: Sexp Diary Entries\7f707573
+Node: Appt Customizing\7f712663
+Node: Sorting\7f713709
+Node: Shell\7f718515
+Node: Single Shell\7f719808
+Node: Interactive Shell\7f721407
+Node: Shell Mode\7f725172
+Node: Terminal emulator\7f727663
+Node: Term Mode\7f729972
+Node: Paging in Term\7f730886
+Node: Narrowing\7f731684
+Node: Hardcopy\7f733634
+Node: Recursive Edit\7f734606
+Node: Dissociated Press\7f737593
+Node: CONX\7f740156
+Node: Amusements\7f741180
+Node: Emulation\7f741660
+Node: Customization\7f743504
+Node: Minor Modes\7f745349
+Node: Variables\7f746981
+Node: Examining\7f748937
+Node: Easy Customization\7f750398
+Node: Customization Groups\7f751412
+Node: Changing an Option\7f754341
+Node: Face Customization\7f760597
+Node: Specific Customization\7f762361
+Node: Edit Options\7f764968
+Node: Locals\7f766552
+Node: File Variables\7f769731
+Node: Keyboard Macros\7f774285
+Node: Basic Kbd Macro\7f776456
+Node: Save Kbd Macro\7f778388
+Node: Kbd Macro Query\7f780057
+Node: Key Bindings\7f781999
+Node: Keymaps\7f782873
+Node: Rebinding\7f786723
+Node: Interactive Rebinding\7f787422
+Node: Programmatic Rebinding\7f789614
+Node: Key Bindings Using Strings\7f792421
+Node: Disabling\7f794048
+Node: Syntax\7f795820
+Node: Syntax Entry\7f796701
+Node: Syntax Change\7f800785
+Node: Init File\7f802954
+Node: Init Syntax\7f804459
+Node: Init Examples\7f806811
+Node: Terminal Init\7f811001
+Node: Audible Bell\7f812711
+Node: Faces\7f816142
+Node: Frame Components\7f820984
+Node: X Resources\7f821429
+Node: Geometry Resources\7f823088
+Node: Iconic Resources\7f825536
+Node: Resource List\7f826008
+Node: Face Resources\7f832515
+Node: Widgets\7f836192
+Node: Menubar Resources\7f837131
+Node: Quitting\7f838064
+Node: Lossage\7f841042
+Node: Stuck Recursive\7f841686
+Node: Screen Garbled\7f842392
+Node: Text Garbled\7f843526
+Node: Unasked-for Search\7f844165
+Node: Emergency Escape\7f844950
+Node: Total Frustration\7f846729
+Node: Bugs\7f847360
+Node: Glossary\7f856894
+Node: Manifesto\7f888547
+Node: Key Index\7f912023
+Node: Command Index\7f937894
+Node: Variable Index\7f980480
+Node: Concept Index\7f996566
\1f
End Tag Table
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: TeX Print, Prev: TeX Editing, Up: TeX Mode
+
+TeX Printing Commands
+.....................
+
+ You can invoke TeX as an inferior of Emacs on either the entire
+contents of the buffer or just a region at a time. Running TeX in this
+way on just one chapter is a good way to see what your changes look
+like without taking the time to format the entire file.
+
+`C-c C-r'
+ Invoke TeX on the current region, plus the buffer's header
+ (`tex-region').
+
+`C-c C-b'
+ Invoke TeX on the entire current buffer (`tex-buffer').
+
+`C-c C-l'
+ Recenter the window showing output from the inferior TeX so that
+ the last line can be seen (`tex-recenter-output-buffer').
+
+`C-c C-k'
+ Kill the inferior TeX (`tex-kill-job').
+
+`C-c C-p'
+ Print the output from the last `C-c C-r' or `C-c C-b' command
+ (`tex-print').
+
+`C-c C-q'
+ Show the printer queue (`tex-show-print-queue').
+
+ You can pass the current buffer through an inferior TeX using `C-c
+C-b' (`tex-buffer'). The formatted output appears in a file in `/tmp';
+to print it, type `C-c C-p' (`tex-print'). Afterward use `C-c C-q'
+(`tex-show-print-queue') to view the progress of your output towards
+being printed.
+
+ The console output from TeX, including any error messages, appears
+in a buffer called `*TeX-shell*'. If TeX gets an error, you can switch
+to this buffer and feed it input (this works as in Shell mode; *note
+Interactive Shell::). Without switching to this buffer, you can scroll
+it so that its last line is visible by typing `C-c C-l'.
+
+ Type `C-c C-k' (`tex-kill-job') to kill the TeX process if you see
+that its output is no longer useful. Using `C-c C-b' or `C-c C-r' also
+kills any TeX process still running.
+
+ You can pass an arbitrary region through an inferior TeX by typing
+`C-c C-r' (`tex-region'). This is tricky, however, because most files
+of TeX input contain commands at the beginning to set parameters and
+define macros. Without them, no later part of the file will format
+correctly. To solve this problem, `C-c C-r' allows you to designate a
+part of the file as containing essential commands; it is included
+before the specified region as part of the input to TeX. The
+designated part of the file is called the "header".
+
+ To indicate the bounds of the header in Plain TeX mode, insert two
+special strings in the file: `%**start of header' before the header,
+and `%**end of header' after it. Each string must appear entirely on
+one line, but there may be other text on the line before or after. The
+lines containing the two strings are included in the header. If
+`%**start of header' does not appear within the first 100 lines of the
+buffer, `C-c C-r' assumes there is no header.
+
+ In LaTeX mode, the header begins with `\documentstyle' and ends with
+`\begin{document}'. These are commands that LaTeX requires you to use,
+so you don't need to do anything special to identify the header.
+
+ When you enter either kind of TeX mode, Emacs calls with no
+arguments the value of the variable `text-mode-hook', if that value
+exists and is not `nil'. Emacs then calls the variable `TeX-mode-hook'
+and either `plain-TeX-mode-hook' or `LaTeX-mode-hook' under the same
+conditions.
+
+\1f
+File: xemacs.info, Node: Outline Mode, Prev: TeX Mode, Up: Text Mode
+
+Outline Mode
+------------
+
+ Outline mode is a major mode similar to Text mode but intended for
+editing outlines. It allows you to make parts of the text temporarily
+invisible so that you can see just the overall structure of the
+outline. Type `M-x outline-mode' to turn on Outline mode in the
+current buffer.
+
+ When you enter Outline mode, Emacs calls with no arguments the value
+of the variable `text-mode-hook', if that value exists and is not
+`nil'; then it does the same with the variable `outline-mode-hook'.
+
+ When a line is invisible in outline mode, it does not appear on the
+screen. The screen appears exactly as if the invisible line were
+deleted, except that an ellipsis (three periods in a row) appears at
+the end of the previous visible line (only one ellipsis no matter how
+many invisible lines follow).
+
+ All editing commands treat the text of the invisible line as part of
+the previous visible line. For example, `C-n' moves onto the next
+visible line. Killing an entire visible line, including its
+terminating newline, really kills all the following invisible lines as
+well; yanking everything back yanks the invisible lines and they remain
+invisible.
+
+* Menu:
+
+* Format: Outline Format. What the text of an outline looks like.
+* Motion: Outline Motion. Special commands for moving through outlines.
+* Visibility: Outline Visibility. Commands to control what is visible.
+
+\1f
File: xemacs.info, Node: Outline Format, Next: Outline Motion, Prev: Outline Mode, Up: Outline Mode
Format of Outlines
mark. The command `C-M-\' (`indent-region') applies <TAB> to every
line whose first character is between point and mark.
-\1f
-File: xemacs.info, Node: Lisp Indent, Next: C Indent, Prev: Multi-line Indent, Up: Grinding
-
-Customizing Lisp Indentation
-----------------------------
-
- The indentation pattern for a Lisp expression can depend on the
-function called by the expression. For each Lisp function, you can
-choose among several predefined patterns of indentation, or define an
-arbitrary one with a Lisp program.
-
- The standard pattern of indentation is as follows: the second line
-of the expression is indented under the first argument, if that is on
-the same line as the beginning of the expression; otherwise, the second
-line is indented underneath the function name. Each following line is
-indented under the previous line whose nesting depth is the same.
-
- If the variable `lisp-indent-offset' is non-`nil', it overrides the
-usual indentation pattern for the second line of an expression, so that
-such lines are always indented `lisp-indent-offset' more columns than
-the containing list.
-
- Certain functions override the standard pattern. Functions whose
-names start with `def' always indent the second line by
-`lisp-body-indention' extra columns beyond the open-parenthesis
-starting the expression.
-
- Individual functions can override the standard pattern in various
-ways, according to the `lisp-indent-function' property of the function
-name. (Note: `lisp-indent-function' was formerly called
-`lisp-indent-hook'). There are four possibilities for this property:
-
-`nil'
- This is the same as no property; the standard indentation pattern
- is used.
-
-`defun'
- The pattern used for function names that start with `def' is used
- for this function also.
-
-a number, NUMBER
- The first NUMBER arguments of the function are "distinguished"
- arguments; the rest are considered the "body" of the expression.
- A line in the expression is indented according to whether the
- first argument on it is distinguished or not. If the argument is
- part of the body, the line is indented `lisp-body-indent' more
- columns than the open-parenthesis starting the containing
- expression. If the argument is distinguished and is either the
- first or second argument, it is indented twice that many extra
- columns. If the argument is distinguished and not the first or
- second argument, the standard pattern is followed for that line.
-
-a symbol, SYMBOL
- SYMBOL should be a function name; that function is called to
- calculate the indentation of a line within this expression. The
- function receives two arguments:
- STATE
- The value returned by `parse-partial-sexp' (a Lisp primitive
- for indentation and nesting computation) when it parses up to
- the beginning of this line.
-
- POS
- The position at which the line being indented begins.
-
- It should return either a number, which is the number of columns of
- indentation for that line, or a list whose first element is such a
- number. The difference between returning a number and returning a
- list is that a number says that all following lines at the same
- nesting level should be indented just like this one; a list says
- that following lines might call for different indentations. This
- makes a difference when the indentation is computed by `C-M-q'; if
- the value is a number, `C-M-q' need not recalculate indentation
- for the following lines until the end of the list.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Lisp Indent, Next: C Indent, Prev: Multi-line Indent, Up: Grinding
+
+Customizing Lisp Indentation
+----------------------------
+
+ The indentation pattern for a Lisp expression can depend on the
+function called by the expression. For each Lisp function, you can
+choose among several predefined patterns of indentation, or define an
+arbitrary one with a Lisp program.
+
+ The standard pattern of indentation is as follows: the second line
+of the expression is indented under the first argument, if that is on
+the same line as the beginning of the expression; otherwise, the second
+line is indented underneath the function name. Each following line is
+indented under the previous line whose nesting depth is the same.
+
+ If the variable `lisp-indent-offset' is non-`nil', it overrides the
+usual indentation pattern for the second line of an expression, so that
+such lines are always indented `lisp-indent-offset' more columns than
+the containing list.
+
+ Certain functions override the standard pattern. Functions whose
+names start with `def' always indent the second line by
+`lisp-body-indention' extra columns beyond the open-parenthesis
+starting the expression.
+
+ Individual functions can override the standard pattern in various
+ways, according to the `lisp-indent-function' property of the function
+name. (Note: `lisp-indent-function' was formerly called
+`lisp-indent-hook'). There are four possibilities for this property:
+
+`nil'
+ This is the same as no property; the standard indentation pattern
+ is used.
+
+`defun'
+ The pattern used for function names that start with `def' is used
+ for this function also.
+
+a number, NUMBER
+ The first NUMBER arguments of the function are "distinguished"
+ arguments; the rest are considered the "body" of the expression.
+ A line in the expression is indented according to whether the
+ first argument on it is distinguished or not. If the argument is
+ part of the body, the line is indented `lisp-body-indent' more
+ columns than the open-parenthesis starting the containing
+ expression. If the argument is distinguished and is either the
+ first or second argument, it is indented twice that many extra
+ columns. If the argument is distinguished and not the first or
+ second argument, the standard pattern is followed for that line.
+
+a symbol, SYMBOL
+ SYMBOL should be a function name; that function is called to
+ calculate the indentation of a line within this expression. The
+ function receives two arguments:
+ STATE
+ The value returned by `parse-partial-sexp' (a Lisp primitive
+ for indentation and nesting computation) when it parses up to
+ the beginning of this line.
+
+ POS
+ The position at which the line being indented begins.
+
+ It should return either a number, which is the number of columns of
+ indentation for that line, or a list whose first element is such a
+ number. The difference between returning a number and returning a
+ list is that a number says that all following lines at the same
+ nesting level should be indented just like this one; a list says
+ that following lines might call for different indentations. This
+ makes a difference when the indentation is computed by `C-M-q'; if
+ the value is a number, `C-M-q' need not recalculate indentation
+ for the following lines until the end of the list.
+
+\1f
File: xemacs.info, Node: C Indent, Prev: Lisp Indent, Up: Grinding
Customizing C Indentation
Move to beginning of current or previous statement (`fortran-
previous-statement').
-\1f
-File: xemacs.info, Node: Fortran Indent, Next: Fortran Comments, Prev: Fortran Motion, Up: Fortran
-
-Fortran Indentation
--------------------
-
- Special commands and features are available for indenting Fortran
-code. They make sure various syntactic entities (line numbers, comment
-line indicators, and continuation line flags) appear in the columns
-that are required for standard Fortran.
-
-* Menu:
-
-* Commands: ForIndent Commands. Commands for indenting Fortran.
-* Numbers: ForIndent Num. How line numbers auto-indent.
-* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
-* Vars: ForIndent Vars. Variables controlling Fortran indent style.
-
-\1f
-File: xemacs.info, Node: ForIndent Commands, Next: ForIndent Num, Prev: Fortran Indent, Up: Fortran Indent
-
-Fortran Indentation Commands
-............................
-
-`<TAB>'
- Indent the current line (`fortran-indent-line').
-
-`M-<LFD>'
- Break the current line and set up a continuation line.
-
-`C-M-q'
- Indent all the lines of the subprogram point is in
- (`fortran-indent-subprogram').
-
- <TAB> is redefined by Fortran mode to reindent the current line for
-Fortran (`fortran-indent-line'). Line numbers and continuation markers
-are indented to their required columns, and the body of the statement
-is independently indented, based on its nesting in the program.
-
- The key `C-M-q' is redefined as `fortran-indent-subprogram', a
-command that reindents all the lines of the Fortran subprogram
-(function or subroutine) containing point.
-
- The key `M-<LFD>' is redefined as `fortran-split-line', a command to
-split a line in the appropriate fashion for Fortran. In a non-comment
-line, the second half becomes a continuation line and is indented
-accordingly. In a comment line, both halves become separate comment
-lines.
-
-\1f
-File: xemacs.info, Node: ForIndent Num, Next: ForIndent Conv, Prev: ForIndent Commands, Up: Fortran Indent
-
-Line Numbers and Continuation
-.............................
-
- If a number is the first non-whitespace in the line, it is assumed
-to be a line number and is moved to columns 0 through 4. (Columns are
-always counted from 0 in XEmacs.) If the text on the line starts with
-the conventional Fortran continuation marker `$', it is moved to column
-5. If the text begins with any non whitespace character in column 5,
-it is assumed to be an unconventional continuation marker and remains
-in column 5.
-
- Line numbers of four digits or less are normally indented one space.
-This amount is controlled by the variable `fortran-line-number-indent',
-which is the maximum indentation a line number can have. Line numbers
-are indented to right-justify them to end in column 4 unless that would
-require more than the maximum indentation. The default value of the
-variable is 1.
-
- Simply inserting a line number is enough to indent it according to
-these rules. As each digit is inserted, the indentation is recomputed.
-To turn off this feature, set the variable
-`fortran-electric-line-number' to `nil'. Then inserting line numbers
-is like inserting anything else.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Fortran Indent, Next: Fortran Comments, Prev: Fortran Motion, Up: Fortran
+
+Fortran Indentation
+-------------------
+
+ Special commands and features are available for indenting Fortran
+code. They make sure various syntactic entities (line numbers, comment
+line indicators, and continuation line flags) appear in the columns
+that are required for standard Fortran.
+
+* Menu:
+
+* Commands: ForIndent Commands. Commands for indenting Fortran.
+* Numbers: ForIndent Num. How line numbers auto-indent.
+* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
+* Vars: ForIndent Vars. Variables controlling Fortran indent style.
+
+\1f
+File: xemacs.info, Node: ForIndent Commands, Next: ForIndent Num, Prev: Fortran Indent, Up: Fortran Indent
+
+Fortran Indentation Commands
+............................
+
+`<TAB>'
+ Indent the current line (`fortran-indent-line').
+
+`M-<LFD>'
+ Break the current line and set up a continuation line.
+
+`C-M-q'
+ Indent all the lines of the subprogram point is in
+ (`fortran-indent-subprogram').
+
+ <TAB> is redefined by Fortran mode to reindent the current line for
+Fortran (`fortran-indent-line'). Line numbers and continuation markers
+are indented to their required columns, and the body of the statement
+is independently indented, based on its nesting in the program.
+
+ The key `C-M-q' is redefined as `fortran-indent-subprogram', a
+command that reindents all the lines of the Fortran subprogram
+(function or subroutine) containing point.
+
+ The key `M-<LFD>' is redefined as `fortran-split-line', a command to
+split a line in the appropriate fashion for Fortran. In a non-comment
+line, the second half becomes a continuation line and is indented
+accordingly. In a comment line, both halves become separate comment
+lines.
+
+\1f
+File: xemacs.info, Node: ForIndent Num, Next: ForIndent Conv, Prev: ForIndent Commands, Up: Fortran Indent
+
+Line Numbers and Continuation
+.............................
+
+ If a number is the first non-whitespace in the line, it is assumed
+to be a line number and is moved to columns 0 through 4. (Columns are
+always counted from 0 in XEmacs.) If the text on the line starts with
+the conventional Fortran continuation marker `$', it is moved to column
+5. If the text begins with any non whitespace character in column 5,
+it is assumed to be an unconventional continuation marker and remains
+in column 5.
+
+ Line numbers of four digits or less are normally indented one space.
+This amount is controlled by the variable `fortran-line-number-indent',
+which is the maximum indentation a line number can have. Line numbers
+are indented to right-justify them to end in column 4 unless that would
+require more than the maximum indentation. The default value of the
+variable is 1.
+
+ Simply inserting a line number is enough to indent it according to
+these rules. As each digit is inserted, the indentation is recomputed.
+To turn off this feature, set the variable
+`fortran-electric-line-number' to `nil'. Then inserting line numbers
+is like inserting anything else.
+
+\1f
File: xemacs.info, Node: ForIndent Conv, Next: ForIndent Vars, Prev: ForIndent Num, Up: Fortran Indent
Syntactic Conventions
necessary to build distribution tarballs (Unix Tar format files,
gzipped for space savings).
-\1f
-File: xemacs.info, Node: Using Packages, Next: Building Packages, Prev: Package Terminology, Up: Packages
-
-Getting Started
----------------
-
- When you first download XEmacs 21, you will usually first grab the
-"core distribution", a file called `xemacs-21.0.tar.gz'. (Replace the
-21.0 by the current version number.) The core distribution contains
-the sources of XEmacs and a minimal set of Emacs Lisp files, which are
-in the subdirectory named `lisp'. This subdirectory used to contain
-all Emacs Lisp files distributed with XEmacs. Now, to conserve disk
-space, most non-essential packages were made optional.
-
-Choosing the Packages You Need
-------------------------------
-
- The available packages can currently be found in the same ftp
-directory where you grabbed the core distribution from, and are located
-in the subdirectory `packages/binary-packages'. Package file names
-follow the naming convention `<package-name>-<version>-pkg.tar.gz'.
-
- If you have EFS *Note (EFS)::, packages can be installed over the
-network. Alternatively, if you have copies of the packages locally,
-you can install packages from a local disk or CDROM.
-
- The file `etc/PACKAGES' in the core distribution contains a list of
-the packages available at the time of the XEmacs release. Packages are
-also listed on the `Options' menu under:
-
- Options->Customize->Emacs->Packages
-
- However, don't select any of these menu picks unless you actually
-want to install the given package (and have properly configured your
-system to do so).
-
- You can also get a list of available packages, and whether or not
-they are installed, using the visual package browser and installer.
-You can access it via the menus:
-
- Options->Manage Packages->List & Install
-
- Or, you can get to it via the keyboard:
-
- M-x pui-list-packages
-
- Hint to system administrators of multi-user systems: it might be a
-good idea to install all packages and not interfere with the wishes of
-your users.
-
- If you can't find which package provides the feature you require, try
-using the `package-get-package-provider' function. Eg., if you know
-that you need `thingatpt', type:
-
- M-x package-get-package-provider RET thingatpt
-
- which will return something like (fsf-compat "1.06"). You can the use
-one of the methods above for installing the package you want.
-
-XEmacs and Installing Packages
-------------------------------
-
- Normally, packages are installed over the network, using EFS *Note
-(EFS)::. However, you may not have network access, or you may already
-have some or all of the packages on a local disk, such as a CDROM. If
-you want to install from a local disk, you must first tell XEmacs where
-to find the package binaries. This is done by adding a line like the
-following to your `.emacs' file:
-
- (setq package-get-remote (cons (list nil "/my/path/to/package/binaries")
- package-get-remote))
-
- Here, you'd change `/my/path/to/package/binaries' to be the path to
-your local package binaries. Next, restart XEmacs, and you're ready to
-go (advanced users can just re-evaluate the sexp).
-
- If you are installing from a temporary, one-time directory, you can
-also add these directory names to `package-get-remote' using:
-
- M-x pui-add-install-directory
-
- Note, however, that any directories added using this function are not
-saved; this information will be lost when you quit XEmacs.
-
- If you're going to install over the network, you only have to insure
-that EFS *Note (EFS):: works, and that it can get outside a firewall, if
-you happen to be behind one. You shouldn't have to do anything else;
-XEmacs already knows where to go. However you can add your own mirrors
-to this list. See `package-get-remote'.
-
- The easiest way to install a package is to use the visual package
-browser and installer, using the menu pick:
-
- Options->Manage Packages->List & Install
- or
- Options->Manage Packages->Using Custom->Select-> ...
-
- You can also access it using the keyboard:
-
- M-x pui-list-packages
-
- The visual package browser will then display a list of all packages.
-Help information will be displayed at the very bottom of the buffer; you
-may have to scroll down to see it. You can also press `?' to get the
-same help. From this buffer, you can tell the package status by the
-character in the first column:
-
-`-'
- The package has not been installed.
-
-`*'
- The package has been installed, but a newer version is available.
- The current version is out-of-date.
-
-`+'
- The package has been marked for installation/update.
-
- If there is no character in the first column, the package has been
-installed and is up-to-date.
-
- From here, you can select or unselect packages for installation using
-the <RET> key, the `Mouse-2' button or selecting "Select" from the
-(Popup) Menu. Once you've finished selecting the packages, you can
-press the `x' key (or use the menu) to actually install the packages.
-Note that you will have to restart XEmacs for XEmacs to recognize any
-new packages.
-
- Key summary:
-
-`?'
- Display simple help.
-
-`<RET>'
-`<Mouse-2>'
- Toggle between selecting and unselecting a package for
- installation.
-
-`x'
- Install selected packages.
-
-`<SPC>'
- View, in the minibuffer, additional information about the package,
- such as the package date (not the build date) and the package
- author. Moving the mouse over a package name will also do the
- same thing.
-
-`v'
- Toggle between verbose and non-verbose package display.
-
-`g'
- Refresh the package display.
-
-`q'
- Kill the package buffer.
-
- Moving the mouse over a package will also cause additional
-information about the package to be displayed in the minibuffer.
-
-Other package installation interfaces
--------------------------------------
-
- For an alternative package interface, you can select packages from
-the customize menus, under:
-
- Options->Customize->Emacs->Packages-> ...
- or
- Options->Manage Packages->Using Custom->Select-> ...
-
- Set their state to on, and then do:
-
- Options->Manage Packages->Using Custom->Update Packages
-
- This will automatically retrieve the packages you have selected from
-the XEmacs ftp site or your local disk, and install them into XEmacs.
-Additionally it will update any packages you already have installed to
-the newest version. Note that if a package is newly installed you will
-have to restart XEmacs for the change to take effect.
-
- You can also install packages using a semi-manual interface:
-
- M-x package-get-all <return>
-
- Enter the name of the package (e.g., `prog-modes'), and XEmacs will
-search for the latest version (as listed in the lisp file
-`lisp/package-get-base.el'), and install it and any packages that it
-depends upon.
-
-Manual Binary Package Installation
-----------------------------------
-
- Pre-compiled, binary packages can be installed in either a system
-package directory (this is determined when XEmacs is compiled), or in
-one of the following subdirectories of your `$HOME' directory:
-
- ~/.xemacs/mule-packages
- ~/.xemacs/xemacs-packages
-
- Packages in the former directory will only be found by a Mule-enabled
-XEmacs.
-
- XEmacs does not have to be running to install binary packages,
-although XEmacs will not know about any newly-installed packages until
-you restart XEmacs. Note, however, that installing a newer version of a
-package while XEmacs is running could cause strange errors in XEmacs;
-it's best to exit XEmacs before upgrading an existing package.
-
- To install binary packages manually:
-
- 1. Download the package(s) that you want to install. Each binary
- package will typically be a gzip'd tarball.
-
- 2. Decide where to install the packages: in the system package
- directory, or in `~/.xemacs/mule-packages' or
- `~/.xemacs/xemacs-packages', respectively. If you want to install
- the packages in the system package directory, make sure you can
- write into that directory. If you want to install in your `$HOME'
- directory, create the directory, `~/.xemacs/mule-packages' or
- `~/.xemacs/xemacs-packages', respectively.
-
- 3. Next, `cd' to the directory under which you want to install the
- package(s).
-
- 4. From this directory, uncompress and extract each of the gzip'd
- tarballs that you downloaded in step 1. Unix and Cygnus cygwin
- users will typically do this using the commands:
-
- gunzip < package.tar.gz | tar xvf -
-
- Above, replace `package.tar.gz' with the filename of the package
- that you downloaded in step 1.
-
- Of course, if you use GNU `tar', you could also use:
-
- tar xvzf package.tar.gz
-
- 5. That's it. Quit and restart XEmacs to get it to recognize any new
- or changed packages.
-
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Using Packages, Next: Building Packages, Prev: Package Terminology, Up: Packages
+
+Getting Started
+---------------
+
+ When you first download XEmacs 21, you will usually first grab the
+"core distribution", a file called `xemacs-21.0.tar.gz'. (Replace the
+21.0 by the current version number.) The core distribution contains
+the sources of XEmacs and a minimal set of Emacs Lisp files, which are
+in the subdirectory named `lisp'. This subdirectory used to contain
+all Emacs Lisp files distributed with XEmacs. Now, to conserve disk
+space, most non-essential packages were made optional.
+
+Choosing the Packages You Need
+------------------------------
+
+ The available packages can currently be found in the same ftp
+directory where you grabbed the core distribution from, and are located
+in the subdirectory `packages/binary-packages'. Package file names
+follow the naming convention `<package-name>-<version>-pkg.tar.gz'.
+
+ If you have EFS *Note (EFS)::, packages can be installed over the
+network. Alternatively, if you have copies of the packages locally,
+you can install packages from a local disk or CDROM.
+
+ The file `etc/PACKAGES' in the core distribution contains a list of
+the packages available at the time of the XEmacs release. Packages are
+also listed on the `Options' menu under:
+
+ Options->Customize->Emacs->Packages
+
+ However, don't select any of these menu picks unless you actually
+want to install the given package (and have properly configured your
+system to do so).
+
+ You can also get a list of available packages, and whether or not
+they are installed, using the visual package browser and installer.
+You can access it via the menus:
+
+ Options->Manage Packages->List & Install
+
+ Or, you can get to it via the keyboard:
+
+ M-x pui-list-packages
+
+ Hint to system administrators of multi-user systems: it might be a
+good idea to install all packages and not interfere with the wishes of
+your users.
+
+ If you can't find which package provides the feature you require, try
+using the `package-get-package-provider' function. Eg., if you know
+that you need `thingatpt', type:
+
+ M-x package-get-package-provider RET thingatpt
+
+ which will return something like (fsf-compat "1.06"). You can the use
+one of the methods above for installing the package you want.
+
+XEmacs and Installing Packages
+------------------------------
+
+ Normally, packages are installed over the network, using EFS *Note
+(EFS)::. However, you may not have network access, or you may already
+have some or all of the packages on a local disk, such as a CDROM. If
+you want to install from a local disk, you must first tell XEmacs where
+to find the package binaries. This is done by adding a line like the
+following to your `.emacs' file:
+
+ (setq package-get-remote (cons (list nil "/my/path/to/package/binaries")
+ package-get-remote))
+
+ Here, you'd change `/my/path/to/package/binaries' to be the path to
+your local package binaries. Next, restart XEmacs, and you're ready to
+go (advanced users can just re-evaluate the sexp).
+
+ If you are installing from a temporary, one-time directory, you can
+also add these directory names to `package-get-remote' using:
+
+ M-x pui-add-install-directory
+
+ Note, however, that any directories added using this function are not
+saved; this information will be lost when you quit XEmacs.
+
+ If you're going to install over the network, you only have to insure
+that EFS *Note (EFS):: works, and that it can get outside a firewall, if
+you happen to be behind one. You shouldn't have to do anything else;
+XEmacs already knows where to go. However you can add your own mirrors
+to this list. See `package-get-remote'.
+
+ The easiest way to install a package is to use the visual package
+browser and installer, using the menu pick:
+
+ Options->Manage Packages->List & Install
+ or
+ Options->Manage Packages->Using Custom->Select-> ...
+
+ You can also access it using the keyboard:
+
+ M-x pui-list-packages
+
+ The visual package browser will then display a list of all packages.
+Help information will be displayed at the very bottom of the buffer; you
+may have to scroll down to see it. You can also press `?' to get the
+same help. From this buffer, you can tell the package status by the
+character in the first column:
+
+`-'
+ The package has not been installed.
+
+`*'
+ The package has been installed, but a newer version is available.
+ The current version is out-of-date.
+
+`+'
+ The package has been marked for installation/update.
+
+ If there is no character in the first column, the package has been
+installed and is up-to-date.
+
+ From here, you can select or unselect packages for installation using
+the <RET> key, the `Mouse-2' button or selecting "Select" from the
+(Popup) Menu. Once you've finished selecting the packages, you can
+press the `x' key (or use the menu) to actually install the packages.
+Note that you will have to restart XEmacs for XEmacs to recognize any
+new packages.
+
+ Key summary:
+
+`?'
+ Display simple help.
+
+`<RET>'
+`<Mouse-2>'
+ Toggle between selecting and unselecting a package for
+ installation.
+
+`x'
+ Install selected packages.
+
+`<SPC>'
+ View, in the minibuffer, additional information about the package,
+ such as the package date (not the build date) and the package
+ author. Moving the mouse over a package name will also do the
+ same thing.
+
+`v'
+ Toggle between verbose and non-verbose package display.
+
+`g'
+ Refresh the package display.
+
+`q'
+ Kill the package buffer.
+
+ Moving the mouse over a package will also cause additional
+information about the package to be displayed in the minibuffer.
+
+Other package installation interfaces
+-------------------------------------
+
+ For an alternative package interface, you can select packages from
+the customize menus, under:
+
+ Options->Customize->Emacs->Packages-> ...
+ or
+ Options->Manage Packages->Using Custom->Select-> ...
+
+ Set their state to on, and then do:
+
+ Options->Manage Packages->Using Custom->Update Packages
+
+ This will automatically retrieve the packages you have selected from
+the XEmacs ftp site or your local disk, and install them into XEmacs.
+Additionally it will update any packages you already have installed to
+the newest version. Note that if a package is newly installed you will
+have to restart XEmacs for the change to take effect.
+
+ You can also install packages using a semi-manual interface:
+
+ M-x package-get-all <return>
+
+ Enter the name of the package (e.g., `prog-modes'), and XEmacs will
+search for the latest version (as listed in the lisp file
+`lisp/package-get-base.el'), and install it and any packages that it
+depends upon.
+
+Manual Binary Package Installation
+----------------------------------
+
+ Pre-compiled, binary packages can be installed in either a system
+package directory (this is determined when XEmacs is compiled), or in
+one of the following subdirectories of your `$HOME' directory:
+
+ ~/.xemacs/mule-packages
+ ~/.xemacs/xemacs-packages
+
+ Packages in the former directory will only be found by a Mule-enabled
+XEmacs.
+
+ XEmacs does not have to be running to install binary packages,
+although XEmacs will not know about any newly-installed packages until
+you restart XEmacs. Note, however, that installing a newer version of a
+package while XEmacs is running could cause strange errors in XEmacs;
+it's best to exit XEmacs before upgrading an existing package.
+
+ To install binary packages manually:
+
+ 1. Download the package(s) that you want to install. Each binary
+ package will typically be a gzip'd tarball.
+
+ 2. Decide where to install the packages: in the system package
+ directory, or in `~/.xemacs/mule-packages' or
+ `~/.xemacs/xemacs-packages', respectively. If you want to install
+ the packages in the system package directory, make sure you can
+ write into that directory. If you want to install in your `$HOME'
+ directory, create the directory, `~/.xemacs/mule-packages' or
+ `~/.xemacs/xemacs-packages', respectively.
+
+ 3. Next, `cd' to the directory under which you want to install the
+ package(s).
+
+ 4. From this directory, uncompress and extract each of the gzip'd
+ tarballs that you downloaded in step 1. Unix and Cygnus cygwin
+ users will typically do this using the commands:
+
+ gunzip < package.tar.gz | tar xvf -
+
+ Above, replace `package.tar.gz' with the filename of the package
+ that you downloaded in step 1.
+
+ Of course, if you use GNU `tar', you could also use:
+
+ tar xvzf package.tar.gz
+
+ 5. That's it. Quit and restart XEmacs to get it to recognize any new
+ or changed packages.
+
+
+\1f
File: xemacs.info, Node: Building Packages, Prev: Using Packages, Up: Packages
Source packages are available from the `packages/source-packages'
* Diary:: Displaying events from your diary.
* Calendar Customization:: Altering the behavior of the features above.
-\1f
-File: xemacs.info, Node: Calendar Motion, Next: Scroll Calendar, Prev: Calendar/Diary, Up: Calendar/Diary
-
-Movement in the Calendar
-------------------------
-
- Calendar mode lets you move through the calendar in logical units of
-time such as days, weeks, months, and years. If you move outside the
-three months originally displayed, the calendar display "scrolls"
-automatically through time to make the selected date visible. Moving to
-a date lets you view its holidays or diary entries, or convert it to
-other calendars; moving longer time periods is also useful simply to
-scroll the calendar.
-
-* Menu:
-
-* Calendar Unit Motion:: Moving by days, weeks, months, and years.
-* Move to Beginning or End:: Moving to start/end of weeks, months, and years.
-* Specified Dates:: Moving to the current date or another
- specific date.
-
-\1f
-File: xemacs.info, Node: Calendar Unit Motion, Next: Move to Beginning or End, Prev: Calendar Motion, Up: Calendar Motion
-
-Motion by Integral Days, Weeks, Months, Years
-.............................................
-
- The commands for movement in the calendar buffer parallel the
-commands for movement in text. You can move forward and backward by
-days, weeks, months, and years.
-
-`C-f'
- Move point one day forward (`calendar-forward-day').
-
-`C-b'
- Move point one day backward (`calendar-backward-day').
-
-`C-n'
- Move point one week forward (`calendar-forward-week').
-
-`C-p'
- Move point one week backward (`calendar-backward-week').
-
-`M-}'
- Move point one month forward (`calendar-forward-month').
-
-`M-{'
- Move point one month backward (`calendar-backward-month').
-
-`C-x ]'
- Move point one year forward (`calendar-forward-year').
-
-`C-x ['
- Move point one year backward (`calendar-backward-year').
-
- The day and week commands are natural analogues of the usual Emacs
-commands for moving by characters and by lines. Just as `C-n' usually
-moves to the same column in the following line, in Calendar mode it
-moves to the same day in the following week. And `C-p' moves to the
-same day in the previous week.
-
- The arrow keys are equivalent to `C-f', `C-b', `C-n' and `C-p', just
-as they normally are in other modes.
-
- The commands for motion by months and years work like those for
-weeks, but move a larger distance. The month commands `M-}' and `M-{'
-move forward or backward by an entire month's time. The year commands
-`C-x ]' and `C-x [' move forward or backward a whole year.
-
- The easiest way to remember these commands is to consider months and
-years analogous to paragraphs and pages of text, respectively. But the
-commands themselves are not quite analogous. The ordinary Emacs
-paragraph commands move to the beginning or end of a paragraph, whereas
-these month and year commands move by an entire month or an entire
-year, which usually involves skipping across the end of a month or year.
-
- All these commands accept a numeric argument as a repeat count. For
-convenience, the digit keys and the minus sign specify numeric
-arguments in Calendar mode even without the Meta modifier. For example,
-`100 C-f' moves point 100 days forward from its present location.
-
-\1f
-File: xemacs.info, Node: Move to Beginning or End, Next: Specified Dates, Prev: Calendar Unit Motion, Up: Calendar Motion
-
-Beginning or End of Week, Month or Year
-.......................................
-
- A week (or month, or year) is not just a quantity of days; we think
-of weeks (months, years) as starting on particular dates. So Calendar
-mode provides commands to move to the beginning or end of a week, month
-or year:
-
-`C-a'
- Move point to start of week (`calendar-beginning-of-week').
-
-`C-e'
- Move point to end of week (`calendar-end-of-week').
-
-`M-a'
- Move point to start of month (`calendar-beginning-of-month').
-
-`M-e'
- Move point to end of month (`calendar-end-of-month').
-
-`M-<'
- Move point to start of year (`calendar-beginning-of-year').
-
-`M->'
- Move point to end of year (`calendar-end-of-year').
-
- These commands also take numeric arguments as repeat counts, with the
-repeat count indicating how many weeks, months, or years to move
-backward or forward.
-
- By default, weeks begin on Sunday. To make them begin on Monday
-instead, set the variable `calendar-week-start-day' to 1.
-
-\1f
-File: xemacs.info, Node: Specified Dates, Prev: Move to Beginning or End, Up: Calendar Motion
-
-Particular Dates
-................
-
- Calendar mode provides commands for moving to a particular date
-specified in various ways.
-
-`g d'
- Move point to specified date (`calendar-goto-date').
-
-`o'
- Center calendar around specified month (`calendar-other-month').
-
-`.'
- Move point to today's date (`calendar-goto-today').
-
- `g d' (`calendar-goto-date') prompts for a year, a month, and a day
-of the month, and then moves to that date. Because the calendar
-includes all dates from the beginning of the current era, you must type
-the year in its entirety; that is, type `1990', not `90'.
-
- `o' (`calendar-other-month') prompts for a month and year, then
-centers the three-month calendar around that month.
-
- You can return to today's date with `.' (`calendar-goto-today').
-
-\1f
-File: xemacs.info, Node: Scroll Calendar, Next: Mark and Region, Prev: Calendar Motion, Up: Calendar/Diary
-
-Scrolling the Calendar through Time
------------------------------------
-
- The calendar display scrolls automatically through time when you
-move out of the visible portion. You can also scroll it manually.
-Imagine that the calendar window contains a long strip of paper with
-the months on it. Scrolling it means moving the strip so that new
-months become visible in the window.
-
-`C-x <'
- Scroll calendar one month forward (`scroll-calendar-left').
-
-`C-x >'
- Scroll calendar one month backward (`scroll-calendar-right').
-
-`C-v'
-`<NEXT>'
- Scroll calendar three months forward
- (`scroll-calendar-left-three-months').
-
-`M-v'
-`<PRIOR>'
- Scroll calendar three months backward
- (`scroll-calendar-right-three-months').
-
- The most basic calendar scroll commands scroll by one month at a
-time. This means that there are two months of overlap between the
-display before the command and the display after. `C-x <' scrolls the
-calendar contents one month to the left; that is, it moves the display
-forward in time. `C-x >' scrolls the contents to the right, which
-moves backwards in time.
-
- The commands `C-v' and `M-v' scroll the calendar by an entire
-"screenful"--three months--in analogy with the usual meaning of these
-commands. `C-v' makes later dates visible and `M-v' makes earlier
-dates visible. These commands take a numeric argument as a repeat
-count; in particular, since `C-u' multiplies the next command by four,
-typing `C-u C-v' scrolls the calendar forward by a year and typing `C-u
-M-v' scrolls the calendar backward by a year.
-
- The function keys <NEXT> and <PRIOR> are equivalent to `C-v' and
-`M-v', just as they are in other modes.
-
-\1f
-File: xemacs.info, Node: Mark and Region, Next: General Calendar, Prev: Scroll Calendar, Up: Calendar/Diary
-
-The Mark and the Region
------------------------
-
- The concept of the mark applies to the calendar just as to any other
-buffer, but it marks a _date_, not a _position_ in the buffer. The
-region consists of the days between the mark and point (including the
-starting and stopping dates).
-
-`C-SPC'
- Set the mark to today's date (`calendar-set-mark').
-
-`C-@'
- The same.
-
-`C-x C-x'
- Interchange mark and point (`calendar-exchange-point-and-mark').
-
-`M-='
- Display the number of days in the current region
- (`calendar-count-days-region').
-
- You set the mark in the calendar, as in any other buffer, by using
-`C-@' or `C-SPC' (`calendar-set-mark'). You return to the marked date
-with the command `C-x C-x' (`calendar-exchange-point-and-mark') which
-puts the mark where point was and point where mark was. The calendar
-is scrolled as necessary, if the marked date was not visible on the
-screen. This does not change the extent of the region.
-
- To determine the number of days in the region, type `M-='
-(`calendar-count-days-region'). The numbers of days printed is
-_inclusive_; that is, it includes the days specified by mark and point.
-
- The main use of the mark in the calendar is to remember dates that
-you may want to go back to. To make this feature more useful, the mark
-ring (*note Mark Ring::) operates exactly as in other buffers: Emacs
-remembers 16 previous locations of the mark. To return to a marked
-date, type `C-u C-SPC' (or `C-u C-@'); this is the command
-`calendar-set-mark' given a numeric argument. It moves point to where
-the mark was, restores the mark from the ring of former marks, and
-stores the previous point at the end of the mark ring. So, repeated
-use of this command moves point through all the old marks on the ring,
-one by one.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Calendar Motion, Next: Scroll Calendar, Prev: Calendar/Diary, Up: Calendar/Diary
+
+Movement in the Calendar
+------------------------
+
+ Calendar mode lets you move through the calendar in logical units of
+time such as days, weeks, months, and years. If you move outside the
+three months originally displayed, the calendar display "scrolls"
+automatically through time to make the selected date visible. Moving to
+a date lets you view its holidays or diary entries, or convert it to
+other calendars; moving longer time periods is also useful simply to
+scroll the calendar.
+
+* Menu:
+
+* Calendar Unit Motion:: Moving by days, weeks, months, and years.
+* Move to Beginning or End:: Moving to start/end of weeks, months, and years.
+* Specified Dates:: Moving to the current date or another
+ specific date.
+
+\1f
+File: xemacs.info, Node: Calendar Unit Motion, Next: Move to Beginning or End, Prev: Calendar Motion, Up: Calendar Motion
+
+Motion by Integral Days, Weeks, Months, Years
+.............................................
+
+ The commands for movement in the calendar buffer parallel the
+commands for movement in text. You can move forward and backward by
+days, weeks, months, and years.
+
+`C-f'
+ Move point one day forward (`calendar-forward-day').
+
+`C-b'
+ Move point one day backward (`calendar-backward-day').
+
+`C-n'
+ Move point one week forward (`calendar-forward-week').
+
+`C-p'
+ Move point one week backward (`calendar-backward-week').
+
+`M-}'
+ Move point one month forward (`calendar-forward-month').
+
+`M-{'
+ Move point one month backward (`calendar-backward-month').
+
+`C-x ]'
+ Move point one year forward (`calendar-forward-year').
+
+`C-x ['
+ Move point one year backward (`calendar-backward-year').
+
+ The day and week commands are natural analogues of the usual Emacs
+commands for moving by characters and by lines. Just as `C-n' usually
+moves to the same column in the following line, in Calendar mode it
+moves to the same day in the following week. And `C-p' moves to the
+same day in the previous week.
+
+ The arrow keys are equivalent to `C-f', `C-b', `C-n' and `C-p', just
+as they normally are in other modes.
+
+ The commands for motion by months and years work like those for
+weeks, but move a larger distance. The month commands `M-}' and `M-{'
+move forward or backward by an entire month's time. The year commands
+`C-x ]' and `C-x [' move forward or backward a whole year.
+
+ The easiest way to remember these commands is to consider months and
+years analogous to paragraphs and pages of text, respectively. But the
+commands themselves are not quite analogous. The ordinary Emacs
+paragraph commands move to the beginning or end of a paragraph, whereas
+these month and year commands move by an entire month or an entire
+year, which usually involves skipping across the end of a month or year.
+
+ All these commands accept a numeric argument as a repeat count. For
+convenience, the digit keys and the minus sign specify numeric
+arguments in Calendar mode even without the Meta modifier. For example,
+`100 C-f' moves point 100 days forward from its present location.
+
+\1f
+File: xemacs.info, Node: Move to Beginning or End, Next: Specified Dates, Prev: Calendar Unit Motion, Up: Calendar Motion
+
+Beginning or End of Week, Month or Year
+.......................................
+
+ A week (or month, or year) is not just a quantity of days; we think
+of weeks (months, years) as starting on particular dates. So Calendar
+mode provides commands to move to the beginning or end of a week, month
+or year:
+
+`C-a'
+ Move point to start of week (`calendar-beginning-of-week').
+
+`C-e'
+ Move point to end of week (`calendar-end-of-week').
+
+`M-a'
+ Move point to start of month (`calendar-beginning-of-month').
+
+`M-e'
+ Move point to end of month (`calendar-end-of-month').
+
+`M-<'
+ Move point to start of year (`calendar-beginning-of-year').
+
+`M->'
+ Move point to end of year (`calendar-end-of-year').
+
+ These commands also take numeric arguments as repeat counts, with the
+repeat count indicating how many weeks, months, or years to move
+backward or forward.
+
+ By default, weeks begin on Sunday. To make them begin on Monday
+instead, set the variable `calendar-week-start-day' to 1.
+
+\1f
+File: xemacs.info, Node: Specified Dates, Prev: Move to Beginning or End, Up: Calendar Motion
+
+Particular Dates
+................
+
+ Calendar mode provides commands for moving to a particular date
+specified in various ways.
+
+`g d'
+ Move point to specified date (`calendar-goto-date').
+
+`o'
+ Center calendar around specified month (`calendar-other-month').
+
+`.'
+ Move point to today's date (`calendar-goto-today').
+
+ `g d' (`calendar-goto-date') prompts for a year, a month, and a day
+of the month, and then moves to that date. Because the calendar
+includes all dates from the beginning of the current era, you must type
+the year in its entirety; that is, type `1990', not `90'.
+
+ `o' (`calendar-other-month') prompts for a month and year, then
+centers the three-month calendar around that month.
+
+ You can return to today's date with `.' (`calendar-goto-today').
+
+\1f
+File: xemacs.info, Node: Scroll Calendar, Next: Mark and Region, Prev: Calendar Motion, Up: Calendar/Diary
+
+Scrolling the Calendar through Time
+-----------------------------------
+
+ The calendar display scrolls automatically through time when you
+move out of the visible portion. You can also scroll it manually.
+Imagine that the calendar window contains a long strip of paper with
+the months on it. Scrolling it means moving the strip so that new
+months become visible in the window.
+
+`C-x <'
+ Scroll calendar one month forward (`scroll-calendar-left').
+
+`C-x >'
+ Scroll calendar one month backward (`scroll-calendar-right').
+
+`C-v'
+`<NEXT>'
+ Scroll calendar three months forward
+ (`scroll-calendar-left-three-months').
+
+`M-v'
+`<PRIOR>'
+ Scroll calendar three months backward
+ (`scroll-calendar-right-three-months').
+
+ The most basic calendar scroll commands scroll by one month at a
+time. This means that there are two months of overlap between the
+display before the command and the display after. `C-x <' scrolls the
+calendar contents one month to the left; that is, it moves the display
+forward in time. `C-x >' scrolls the contents to the right, which
+moves backwards in time.
+
+ The commands `C-v' and `M-v' scroll the calendar by an entire
+"screenful"--three months--in analogy with the usual meaning of these
+commands. `C-v' makes later dates visible and `M-v' makes earlier
+dates visible. These commands take a numeric argument as a repeat
+count; in particular, since `C-u' multiplies the next command by four,
+typing `C-u C-v' scrolls the calendar forward by a year and typing `C-u
+M-v' scrolls the calendar backward by a year.
+
+ The function keys <NEXT> and <PRIOR> are equivalent to `C-v' and
+`M-v', just as they are in other modes.
+
+\1f
+File: xemacs.info, Node: Mark and Region, Next: General Calendar, Prev: Scroll Calendar, Up: Calendar/Diary
+
+The Mark and the Region
+-----------------------
+
+ The concept of the mark applies to the calendar just as to any other
+buffer, but it marks a _date_, not a _position_ in the buffer. The
+region consists of the days between the mark and point (including the
+starting and stopping dates).
+
+`C-SPC'
+ Set the mark to today's date (`calendar-set-mark').
+
+`C-@'
+ The same.
+
+`C-x C-x'
+ Interchange mark and point (`calendar-exchange-point-and-mark').
+
+`M-='
+ Display the number of days in the current region
+ (`calendar-count-days-region').
+
+ You set the mark in the calendar, as in any other buffer, by using
+`C-@' or `C-SPC' (`calendar-set-mark'). You return to the marked date
+with the command `C-x C-x' (`calendar-exchange-point-and-mark') which
+puts the mark where point was and point where mark was. The calendar
+is scrolled as necessary, if the marked date was not visible on the
+screen. This does not change the extent of the region.
+
+ To determine the number of days in the region, type `M-='
+(`calendar-count-days-region'). The numbers of days printed is
+_inclusive_; that is, it includes the days specified by mark and point.
+
+ The main use of the mark in the calendar is to remember dates that
+you may want to go back to. To make this feature more useful, the mark
+ring (*note Mark Ring::) operates exactly as in other buffers: Emacs
+remembers 16 previous locations of the mark. To return to a marked
+date, type `C-u C-SPC' (or `C-u C-@'); this is the command
+`calendar-set-mark' given a numeric argument. It moves point to where
+the mark was, restores the mark from the ring of former marks, and
+stores the previous point at the end of the mark ring. So, repeated
+use of this command moves point through all the old marks on the ring,
+one by one.
+
+\1f
File: xemacs.info, Node: General Calendar, Next: LaTeX Calendar, Prev: Mark and Region, Up: Calendar/Diary
Miscellaneous Calendar Commands
If the value of the sexp is `t', the entry applies to that date. If
the sexp evaluates to `nil', the entry does _not_ apply to that date.
-\1f
-File: xemacs.info, Node: Calendar Customization, Prev: Diary, Up: Calendar/Diary
-
-Customizing the Calendar and Diary
-----------------------------------
-
- There are many customizations that you can use to make the calendar
-and diary suit your personal tastes.
-
-* Menu:
-
-* Calendar Customizing:: Defaults you can set.
-* Holiday Customizing:: Defining your own holidays.
-* Date Display Format:: Changing the format.
-* Time Display Format:: Changing the format.
-* Daylight Savings:: Changing the default.
-* Diary Customizing:: Defaults you can set.
-* Hebrew/Islamic Entries:: How to obtain them.
-* Fancy Diary Display:: Enhancing the diary display, sorting entries.
-* Included Diary Files:: Sharing a common diary file.
-* Sexp Diary Entries:: Fancy things you can do.
-* Appt Customizing:: Customizing appointment reminders.
-
-\1f
-File: xemacs.info, Node: Calendar Customizing, Next: Holiday Customizing, Up: Calendar Customization
-
-Customizing the Calendar
-........................
-
- If you set the variable `view-diary-entries-initially' to `t',
-calling up the calendar automatically displays the diary entries for
-the current date as well. The diary dates appear only if the current
-date is visible. If you add both of the following lines to your
-`.emacs' file:
-
- (setq view-diary-entries-initially t)
- (calendar)
-
-this displays both the calendar and diary windows whenever you start
-Emacs.
-
- Similarly, if you set the variable
-`view-calendar-holidays-initially' to `t', entering the calendar
-automatically displays a list of holidays for the current three-month
-period. The holiday list appears in a separate window.
-
- You can set the variable `mark-diary-entries-in-calendar' to `t' in
-order to mark any dates with diary entries. This takes effect whenever
-the calendar window contents are recomputed. There are two ways of
-marking these dates: by changing the face (*note Faces::), if the
-display supports that, or by placing a plus sign (`+') beside the date
-otherwise.
-
- Similarly, setting the variable `mark-holidays-in-calendar' to `t'
-marks holiday dates, either with a change of face or with an asterisk
-(`*').
-
- The variable `calendar-holiday-marker' specifies how to mark a date
-as being a holiday. Its value may be a character to insert next to the
-date, or a face name to use for displaying the date. Likewise, the
-variable `diary-entry-marker' specifies how to mark a date that has
-diary entries. The calendar creates faces named `holiday-face' and
-`diary-face' for these purposes; those symbols are the default values
-of these variables, when Emacs supports multiple faces on your terminal.
-
- The variable `calendar-load-hook' is a normal hook run when the
-calendar package is first loaded (before actually starting to display
-the calendar).
-
- Starting the calendar runs the normal hook
-`initial-calendar-window-hook'. Recomputation of the calendar display
-does not run this hook. But if you leave the calendar with the `q'
-command and reenter it, the hook runs again.
-
- The variable `today-visible-calendar-hook' is a normal hook run
-after the calendar buffer has been prepared with the calendar when the
-current date is visible in the window. One use of this hook is to
-replace today's date with asterisks; to do that, use the hook function
-`calendar-star-date'.
-
- (add-hook 'today-visible-calendar-hook 'calendar-star-date)
-
-Another standard hook function marks the current date, either by
-changing its face or by adding an asterisk. Here's how to use it:
-
- (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
-
-The variable `calendar-today-marker' specifies how to mark today's
-date. Its value should be a character to insert next to the date or a
-face name to use for displaying the date. A face named
-`calendar-today-face' is provided for this purpose; that symbol is the
-default for this variable when Emacs supports multiple faces on your
-terminal.
-
-A similar normal hook, `today-invisible-calendar-hook' is run if the
-current date is _not_ visible in the window.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Calendar Customization, Prev: Diary, Up: Calendar/Diary
+
+Customizing the Calendar and Diary
+----------------------------------
+
+ There are many customizations that you can use to make the calendar
+and diary suit your personal tastes.
+
+* Menu:
+
+* Calendar Customizing:: Defaults you can set.
+* Holiday Customizing:: Defining your own holidays.
+* Date Display Format:: Changing the format.
+* Time Display Format:: Changing the format.
+* Daylight Savings:: Changing the default.
+* Diary Customizing:: Defaults you can set.
+* Hebrew/Islamic Entries:: How to obtain them.
+* Fancy Diary Display:: Enhancing the diary display, sorting entries.
+* Included Diary Files:: Sharing a common diary file.
+* Sexp Diary Entries:: Fancy things you can do.
+* Appt Customizing:: Customizing appointment reminders.
+
+\1f
+File: xemacs.info, Node: Calendar Customizing, Next: Holiday Customizing, Up: Calendar Customization
+
+Customizing the Calendar
+........................
+
+ If you set the variable `view-diary-entries-initially' to `t',
+calling up the calendar automatically displays the diary entries for
+the current date as well. The diary dates appear only if the current
+date is visible. If you add both of the following lines to your
+`.emacs' file:
+
+ (setq view-diary-entries-initially t)
+ (calendar)
+
+this displays both the calendar and diary windows whenever you start
+Emacs.
+
+ Similarly, if you set the variable
+`view-calendar-holidays-initially' to `t', entering the calendar
+automatically displays a list of holidays for the current three-month
+period. The holiday list appears in a separate window.
+
+ You can set the variable `mark-diary-entries-in-calendar' to `t' in
+order to mark any dates with diary entries. This takes effect whenever
+the calendar window contents are recomputed. There are two ways of
+marking these dates: by changing the face (*note Faces::), if the
+display supports that, or by placing a plus sign (`+') beside the date
+otherwise.
+
+ Similarly, setting the variable `mark-holidays-in-calendar' to `t'
+marks holiday dates, either with a change of face or with an asterisk
+(`*').
+
+ The variable `calendar-holiday-marker' specifies how to mark a date
+as being a holiday. Its value may be a character to insert next to the
+date, or a face name to use for displaying the date. Likewise, the
+variable `diary-entry-marker' specifies how to mark a date that has
+diary entries. The calendar creates faces named `holiday-face' and
+`diary-face' for these purposes; those symbols are the default values
+of these variables, when Emacs supports multiple faces on your terminal.
+
+ The variable `calendar-load-hook' is a normal hook run when the
+calendar package is first loaded (before actually starting to display
+the calendar).
+
+ Starting the calendar runs the normal hook
+`initial-calendar-window-hook'. Recomputation of the calendar display
+does not run this hook. But if you leave the calendar with the `q'
+command and reenter it, the hook runs again.
+
+ The variable `today-visible-calendar-hook' is a normal hook run
+after the calendar buffer has been prepared with the calendar when the
+current date is visible in the window. One use of this hook is to
+replace today's date with asterisks; to do that, use the hook function
+`calendar-star-date'.
+
+ (add-hook 'today-visible-calendar-hook 'calendar-star-date)
+
+Another standard hook function marks the current date, either by
+changing its face or by adding an asterisk. Here's how to use it:
+
+ (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
+
+The variable `calendar-today-marker' specifies how to mark today's
+date. Its value should be a character to insert next to the date or a
+face name to use for displaying the date. A face named
+`calendar-today-face' is provided for this purpose; that symbol is the
+default for this variable when Emacs supports multiple faces on your
+terminal.
+
+A similar normal hook, `today-invisible-calendar-hook' is run if the
+current date is _not_ visible in the window.
+
+\1f
File: xemacs.info, Node: Holiday Customizing, Next: Date Display Format, Prev: Calendar Customizing, Up: Calendar Customization
Customizing the Holidays
For example, `C-c C-x o' invokes the global binding of `C-x o',
which is normally `other-window'.
-\1f
-File: xemacs.info, Node: Paging in Term, Prev: Term Mode, Up: Shell
-
-Paging in the terminal emulator
--------------------------------
-
- Term mode has a pager feature. When the pager is enabled, term mode
-will pause at the end of each screenful.
-
-`C-c C-q'
- Toggles the pager feature: Disables the pager if it is enabled,
- and vice versa. This works in both line and char modes. If the
- pager enabled, the mode-line contains the word `page'.
-
- If the pager is enabled, and Term receives more than a screenful of
-output since your last input, Term will enter More break mode. This is
-indicated by `**MORE**' in the mode-line. Type a `Space' to display
-the next screenful of output. Type `?' to see your other options. The
-interface is similar to the Unix `more' program.
-
-\1f
-File: xemacs.info, Node: Narrowing, Next: Hardcopy, Prev: Shell, Up: Top
-
-Narrowing
-=========
-
- "Narrowing" means focusing in on some portion of the buffer, making
-the rest temporarily invisible and inaccessible. Cancelling the
-narrowing and making the entire buffer once again visible is called
-"widening". The amount of narrowing in effect in a buffer at any time
-is called the buffer's "restriction".
-
-`C-x n n'
- Narrow down to between point and mark (`narrow-to-region').
-
-`C-x n w'
- Widen to make the entire buffer visible again (`widen').
-
- Narrowing sometimes makes it easier to concentrate on a single
-subroutine or paragraph by eliminating clutter. It can also be used to
-restrict the range of operation of a replace command or repeating
-keyboard macro. The word `Narrow' appears in the mode line whenever
-narrowing is in effect. When you have narrowed to a part of the
-buffer, that part appears to be all there is. You can't see the rest,
-can't move into it (motion commands won't go outside the visible part),
-and can't change it in any way. However, the invisible text is not
-gone; if you save the file, it will be saved.
-
- The primary narrowing command is `C-x n n' (`narrow-to-region'). It
-sets the current buffer's restrictions so that the text in the current
-region remains visible but all text before the region or after the
-region is invisible. Point and mark do not change.
-
- Because narrowing can easily confuse users who do not understand it,
-`narrow-to-region' is normally a disabled command. Attempting to use
-this command asks for confirmation and gives you the option of enabling
-it; once you enable the command, confirmation will no longer be
-required. *Note Disabling::.
-
- To undo narrowing, use `C-x n w' (`widen'). This makes all text in
-the buffer accessible again.
-
- Use the `C-x =' command to get information on what part of the
-buffer you narrowed down. *Note Position Info::.
-
-\1f
-File: xemacs.info, Node: Hardcopy, Next: Recursive Edit, Prev: Narrowing, Up: Top
-
-Hardcopy Output
-===============
-
- The XEmacs commands for making hardcopy derive their names from the
-Unix commands `print' and `lpr'.
-
-`M-x print-buffer'
- Print hardcopy of current buffer using Unix command `print'
- (`lpr -p'). This command adds page headings containing the file
- name and page number.
-
-`M-x lpr-buffer'
- Print hardcopy of current buffer using Unix command `lpr'. This
- command does not add page headings.
-
-`M-x print-region'
- Like `print-buffer', but prints only the current region.
-
-`M-x lpr-region'
- Like `lpr-buffer', but prints only the current region.
-
- All the hardcopy commands pass extra switches to the `lpr' program
-based on the value of the variable `lpr-switches'. Its value should be
-a list of strings, each string a switch starting with `-'. For
-example, the value could be `("-Pfoo")' to print on printer `foo'.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Paging in Term, Prev: Term Mode, Up: Shell
+
+Paging in the terminal emulator
+-------------------------------
+
+ Term mode has a pager feature. When the pager is enabled, term mode
+will pause at the end of each screenful.
+
+`C-c C-q'
+ Toggles the pager feature: Disables the pager if it is enabled,
+ and vice versa. This works in both line and char modes. If the
+ pager enabled, the mode-line contains the word `page'.
+
+ If the pager is enabled, and Term receives more than a screenful of
+output since your last input, Term will enter More break mode. This is
+indicated by `**MORE**' in the mode-line. Type a `Space' to display
+the next screenful of output. Type `?' to see your other options. The
+interface is similar to the Unix `more' program.
+
+\1f
+File: xemacs.info, Node: Narrowing, Next: Hardcopy, Prev: Shell, Up: Top
+
+Narrowing
+=========
+
+ "Narrowing" means focusing in on some portion of the buffer, making
+the rest temporarily invisible and inaccessible. Cancelling the
+narrowing and making the entire buffer once again visible is called
+"widening". The amount of narrowing in effect in a buffer at any time
+is called the buffer's "restriction".
+
+`C-x n n'
+ Narrow down to between point and mark (`narrow-to-region').
+
+`C-x n w'
+ Widen to make the entire buffer visible again (`widen').
+
+ Narrowing sometimes makes it easier to concentrate on a single
+subroutine or paragraph by eliminating clutter. It can also be used to
+restrict the range of operation of a replace command or repeating
+keyboard macro. The word `Narrow' appears in the mode line whenever
+narrowing is in effect. When you have narrowed to a part of the
+buffer, that part appears to be all there is. You can't see the rest,
+can't move into it (motion commands won't go outside the visible part),
+and can't change it in any way. However, the invisible text is not
+gone; if you save the file, it will be saved.
+
+ The primary narrowing command is `C-x n n' (`narrow-to-region'). It
+sets the current buffer's restrictions so that the text in the current
+region remains visible but all text before the region or after the
+region is invisible. Point and mark do not change.
+
+ Because narrowing can easily confuse users who do not understand it,
+`narrow-to-region' is normally a disabled command. Attempting to use
+this command asks for confirmation and gives you the option of enabling
+it; once you enable the command, confirmation will no longer be
+required. *Note Disabling::.
+
+ To undo narrowing, use `C-x n w' (`widen'). This makes all text in
+the buffer accessible again.
+
+ Use the `C-x =' command to get information on what part of the
+buffer you narrowed down. *Note Position Info::.
+
+\1f
+File: xemacs.info, Node: Hardcopy, Next: Recursive Edit, Prev: Narrowing, Up: Top
+
+Hardcopy Output
+===============
+
+ The XEmacs commands for making hardcopy derive their names from the
+Unix commands `print' and `lpr'.
+
+`M-x print-buffer'
+ Print hardcopy of current buffer using Unix command `print'
+ (`lpr -p'). This command adds page headings containing the file
+ name and page number.
+
+`M-x lpr-buffer'
+ Print hardcopy of current buffer using Unix command `lpr'. This
+ command does not add page headings.
+
+`M-x print-region'
+ Like `print-buffer', but prints only the current region.
+
+`M-x lpr-region'
+ Like `lpr-buffer', but prints only the current region.
+
+ All the hardcopy commands pass extra switches to the `lpr' program
+based on the value of the variable `lpr-switches'. Its value should be
+a list of strings, each string a switch starting with `-'. For
+example, the value could be `("-Pfoo")' to print on printer `foo'.
+
+\1f
File: xemacs.info, Node: Recursive Edit, Next: Dissociated Press, Prev: Hardcopy, Up: Top
Recursive Editing Levels
the keyboard macro, so that the macro is reassigned the same keys when
you load the file.
-\1f
-File: xemacs.info, Node: Kbd Macro Query, Prev: Save Kbd Macro, Up: Keyboard Macros
-
-Executing Macros With Variations
---------------------------------
-
- You can use `C-x q' (`kbd-macro-query'), to get an effect similar to
-that of `query-replace'. The macro asks you each time whether to make
-a change. When you are defining the macro, type `C-x q' at the point
-where you want the query to occur. During macro definition, the `C-x
-q' does nothing, but when you invoke the macro, `C-x q' reads a
-character from the terminal to decide whether to continue.
-
- The special answers to a `C-x q' query are <SPC>, <DEL>, `C-d',
-`C-l', and `C-r'. Any other character terminates execution of the
-keyboard macro and is then read as a command. <SPC> means to continue.
-<DEL> means to skip the remainder of this repetition of the macro,
-starting again from the beginning in the next repetition. `C-d' means
-to skip the remainder of this repetition and cancel further repetition.
-`C-l' redraws the frame and asks you again for a character to specify
-what to do. `C-r' enters a recursive editing level, in which you can
-perform editing that is not part of the macro. When you exit the
-recursive edit using `C-M-c', you are asked again how to continue with
-the keyboard macro. If you type a <SPC> at this time, the rest of the
-macro definition is executed. It is up to you to leave point and the
-text in a state such that the rest of the macro will do what you want.
-
- `C-u C-x q', which is `C-x q' with a numeric argument, performs a
-different function. It enters a recursive edit reading input from the
-keyboard, both when you type it during the definition of the macro and
-when it is executed from the macro. During definition, the editing you
-do inside the recursive edit does not become part of the macro. During
-macro execution, the recursive edit gives you a chance to do some
-particularized editing. *Note Recursive Edit::.
-
-\1f
-File: xemacs.info, Node: Key Bindings, Next: Syntax, Prev: Keyboard Macros, Up: Customization
-
-Customizing Key Bindings
-========================
-
- This section deals with the "keymaps" that define the bindings
-between keys and functions, and shows how you can customize these
-bindings.
-
- A command is a Lisp function whose definition provides for
-interactive use. Like every Lisp function, a command has a function
-name, which is a Lisp symbol whose name usually consists of lower case
-letters and hyphens.
-
-* Menu:
-
-* Keymaps:: Definition of the keymap data structure.
- Names of Emacs's standard keymaps.
-* Rebinding:: How to redefine one key's meaning conveniently.
-* Disabling:: Disabling a command means confirmation is required
- before it can be executed. This is done to protect
- beginners from surprises.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Kbd Macro Query, Prev: Save Kbd Macro, Up: Keyboard Macros
+
+Executing Macros With Variations
+--------------------------------
+
+ You can use `C-x q' (`kbd-macro-query'), to get an effect similar to
+that of `query-replace'. The macro asks you each time whether to make
+a change. When you are defining the macro, type `C-x q' at the point
+where you want the query to occur. During macro definition, the `C-x
+q' does nothing, but when you invoke the macro, `C-x q' reads a
+character from the terminal to decide whether to continue.
+
+ The special answers to a `C-x q' query are <SPC>, <DEL>, `C-d',
+`C-l', and `C-r'. Any other character terminates execution of the
+keyboard macro and is then read as a command. <SPC> means to continue.
+<DEL> means to skip the remainder of this repetition of the macro,
+starting again from the beginning in the next repetition. `C-d' means
+to skip the remainder of this repetition and cancel further repetition.
+`C-l' redraws the frame and asks you again for a character to specify
+what to do. `C-r' enters a recursive editing level, in which you can
+perform editing that is not part of the macro. When you exit the
+recursive edit using `C-M-c', you are asked again how to continue with
+the keyboard macro. If you type a <SPC> at this time, the rest of the
+macro definition is executed. It is up to you to leave point and the
+text in a state such that the rest of the macro will do what you want.
+
+ `C-u C-x q', which is `C-x q' with a numeric argument, performs a
+different function. It enters a recursive edit reading input from the
+keyboard, both when you type it during the definition of the macro and
+when it is executed from the macro. During definition, the editing you
+do inside the recursive edit does not become part of the macro. During
+macro execution, the recursive edit gives you a chance to do some
+particularized editing. *Note Recursive Edit::.
+
+\1f
+File: xemacs.info, Node: Key Bindings, Next: Syntax, Prev: Keyboard Macros, Up: Customization
+
+Customizing Key Bindings
+========================
+
+ This section deals with the "keymaps" that define the bindings
+between keys and functions, and shows how you can customize these
+bindings.
+
+ A command is a Lisp function whose definition provides for
+interactive use. Like every Lisp function, a command has a function
+name, which is a Lisp symbol whose name usually consists of lower case
+letters and hyphens.
+
+* Menu:
+
+* Keymaps:: Definition of the keymap data structure.
+ Names of Emacs's standard keymaps.
+* Rebinding:: How to redefine one key's meaning conveniently.
+* Disabling:: Disabling a command means confirmation is required
+ before it can be executed. This is done to protect
+ beginners from surprises.
+
+\1f
File: xemacs.info, Node: Keymaps, Next: Rebinding, Up: Key Bindings
Keymaps
possible to set the iconic flag on particular frames (by name) by using
the `Emacs*FRAME-NAME.iconic' resource.
-\1f
-File: xemacs.info, Node: Resource List, Next: Face Resources, Prev: Iconic Resources, Up: X Resources
-
-Resource List
--------------
-
- Emacs frames accept the following resources:
-
-`geometry' (class `Geometry'): string
- Initial geometry for the frame. *Note Geometry Resources::, for a
- complete discussion of how this works.
-
-`iconic' (class `Iconic'): boolean
- Whether this frame should appear in the iconified state.
-
-`internalBorderWidth' (class `InternalBorderWidth'): int
- How many blank pixels to leave between the text and the edge of the
- window.
-
-`interline' (class `Interline'): int
- How many pixels to leave between each line (may not be
- implemented).
-
-`menubar' (class `Menubar'): boolean
- Whether newly-created frames should initially have a menubar. Set
- to true by default.
-
-`initiallyUnmapped' (class `InitiallyUnmapped'): boolean
- Whether XEmacs should leave the initial frame unmapped when it
- starts up. This is useful if you are starting XEmacs as a server
- (e.g. in conjunction with gnuserv or the external client widget).
- You can also control this with the `-unmapped' command-line option.
-
-`barCursor' (class `BarColor'): boolean
- Whether the cursor should be displayed as a bar, or the
- traditional box.
-
-`cursorColor' (class `CursorColor'): color-name
- The color of the text cursor.
-
-`scrollBarWidth' (class `ScrollBarWidth'): integer
- How wide the vertical scrollbars should be, in pixels; 0 means no
- vertical scrollbars. You can also use a resource specification of
- the form `*scrollbar.width', or the usual toolkit scrollbar
- resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
- (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend
- that you use the toolkit resources, though, because they're
- dependent on how exactly your particular build of XEmacs was
- configured.
-
-`scrollBarHeight' (class `ScrollBarHeight'): integer
- How high the horizontal scrollbars should be, in pixels; 0 means no
- horizontal scrollbars. You can also use a resource specification
- of the form `*scrollbar.height', or the usual toolkit scrollbar
- resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
- (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend
- that you use the toolkit resources, though, because they're
- dependent on how exactly your particular build of XEmacs was
- configured.
-
-`scrollBarPlacement' (class `ScrollBarPlacement'): string
- Where the horizontal and vertical scrollbars should be positioned.
- This should be one of the four strings `BOTTOM_LEFT',
- `BOTTOM_RIGHT', `TOP_LEFT', and `TOP_RIGHT'. Default is
- `BOTTOM_RIGHT' for the Motif and Lucid scrollbars and
- `BOTTOM_LEFT' for the Athena scrollbars.
-
-`topToolBarHeight' (class `TopToolBarHeight'): integer
-`bottomToolBarHeight' (class `BottomToolBarHeight'): integer
-`leftToolBarWidth' (class `LeftToolBarWidth'): integer
-`rightToolBarWidth' (class `RightToolBarWidth'): integer
- Height and width of the four possible toolbars.
-
-`topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
-`bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
- Color of the top and bottom shadows for the toolbars. NOTE: These
- resources do _not_ have anything to do with the top and bottom
- toolbars (i.e. the toolbars at the top and bottom of the frame)!
- Rather, they affect the top and bottom shadows around the edges of
- all four kinds of toolbars.
-
-`topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
-`bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
- Pixmap of the top and bottom shadows for the toolbars. If set,
- these resources override the corresponding color resources. NOTE:
- These resources do _not_ have anything to do with the top and
- bottom toolbars (i.e. the toolbars at the top and bottom of the
- frame)! Rather, they affect the top and bottom shadows around the
- edges of all four kinds of toolbars.
-
-`toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
- Thickness of the shadows around the toolbars, in pixels.
-
-`visualBell' (class `VisualBell'): boolean
- Whether XEmacs should flash the screen rather than making an
- audible beep.
-
-`bellVolume' (class `BellVolume'): integer
- Volume of the audible beep.
-
-`useBackingStore' (class `UseBackingStore'): boolean
- Whether XEmacs should set the backing-store attribute of the X
- windows it creates. This increases the memory usage of the X
- server but decreases the amount of X traffic necessary to update
- the screen, and is useful when the connection to the X server goes
- over a low-bandwidth line such as a modem connection.
-
- Emacs devices accept the following resources:
-
-`textPointer' (class `Cursor'): cursor-name
- The cursor to use when the mouse is over text. This resource is
- used to initialize the variable `x-pointer-shape'.
-
-`selectionPointer' (class `Cursor'): cursor-name
- The cursor to use when the mouse is over a selectable text region
- (an extent with the `highlight' property; for example, an Info
- cross-reference). This resource is used to initialize the variable
- `x-selection-pointer-shape'.
-
-`spacePointer' (class `Cursor'): cursor-name
- The cursor to use when the mouse is over a blank space in a buffer
- (that is, after the end of a line or after the end-of-file). This
- resource is used to initialize the variable
- `x-nontext-pointer-shape'.
-
-`modeLinePointer' (class `Cursor'): cursor-name
- The cursor to use when the mouse is over a modeline. This
- resource is used to initialize the variable `x-mode-pointer-shape'.
-
-`gcPointer' (class `Cursor'): cursor-name
- The cursor to display when a garbage-collection is in progress.
- This resource is used to initialize the variable
- `x-gc-pointer-shape'.
-
-`scrollbarPointer' (class `Cursor'): cursor-name
- The cursor to use when the mouse is over the scrollbar. This
- resource is used to initialize the variable
- `x-scrollbar-pointer-shape'.
-
-`pointerColor' (class `Foreground'): color-name
-`pointerBackground' (class `Background'): color-name
- The foreground and background colors of the mouse cursor. These
- resources are used to initialize the variables
- `x-pointer-foreground-color' and `x-pointer-background-color'.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Resource List, Next: Face Resources, Prev: Iconic Resources, Up: X Resources
+
+Resource List
+-------------
+
+ Emacs frames accept the following resources:
+
+`geometry' (class `Geometry'): string
+ Initial geometry for the frame. *Note Geometry Resources::, for a
+ complete discussion of how this works.
+
+`iconic' (class `Iconic'): boolean
+ Whether this frame should appear in the iconified state.
+
+`internalBorderWidth' (class `InternalBorderWidth'): int
+ How many blank pixels to leave between the text and the edge of the
+ window.
+
+`interline' (class `Interline'): int
+ How many pixels to leave between each line (may not be
+ implemented).
+
+`menubar' (class `Menubar'): boolean
+ Whether newly-created frames should initially have a menubar. Set
+ to true by default.
+
+`initiallyUnmapped' (class `InitiallyUnmapped'): boolean
+ Whether XEmacs should leave the initial frame unmapped when it
+ starts up. This is useful if you are starting XEmacs as a server
+ (e.g. in conjunction with gnuserv or the external client widget).
+ You can also control this with the `-unmapped' command-line option.
+
+`barCursor' (class `BarColor'): boolean
+ Whether the cursor should be displayed as a bar, or the
+ traditional box.
+
+`cursorColor' (class `CursorColor'): color-name
+ The color of the text cursor.
+
+`scrollBarWidth' (class `ScrollBarWidth'): integer
+ How wide the vertical scrollbars should be, in pixels; 0 means no
+ vertical scrollbars. You can also use a resource specification of
+ the form `*scrollbar.width', or the usual toolkit scrollbar
+ resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
+ (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend
+ that you use the toolkit resources, though, because they're
+ dependent on how exactly your particular build of XEmacs was
+ configured.
+
+`scrollBarHeight' (class `ScrollBarHeight'): integer
+ How high the horizontal scrollbars should be, in pixels; 0 means no
+ horizontal scrollbars. You can also use a resource specification
+ of the form `*scrollbar.height', or the usual toolkit scrollbar
+ resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
+ (Lucid), or `*Scrollbar.thickness' (Athena). We don't recommend
+ that you use the toolkit resources, though, because they're
+ dependent on how exactly your particular build of XEmacs was
+ configured.
+
+`scrollBarPlacement' (class `ScrollBarPlacement'): string
+ Where the horizontal and vertical scrollbars should be positioned.
+ This should be one of the four strings `BOTTOM_LEFT',
+ `BOTTOM_RIGHT', `TOP_LEFT', and `TOP_RIGHT'. Default is
+ `BOTTOM_RIGHT' for the Motif and Lucid scrollbars and
+ `BOTTOM_LEFT' for the Athena scrollbars.
+
+`topToolBarHeight' (class `TopToolBarHeight'): integer
+`bottomToolBarHeight' (class `BottomToolBarHeight'): integer
+`leftToolBarWidth' (class `LeftToolBarWidth'): integer
+`rightToolBarWidth' (class `RightToolBarWidth'): integer
+ Height and width of the four possible toolbars.
+
+`topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
+`bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
+ Color of the top and bottom shadows for the toolbars. NOTE: These
+ resources do _not_ have anything to do with the top and bottom
+ toolbars (i.e. the toolbars at the top and bottom of the frame)!
+ Rather, they affect the top and bottom shadows around the edges of
+ all four kinds of toolbars.
+
+`topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
+`bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
+ Pixmap of the top and bottom shadows for the toolbars. If set,
+ these resources override the corresponding color resources. NOTE:
+ These resources do _not_ have anything to do with the top and
+ bottom toolbars (i.e. the toolbars at the top and bottom of the
+ frame)! Rather, they affect the top and bottom shadows around the
+ edges of all four kinds of toolbars.
+
+`toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
+ Thickness of the shadows around the toolbars, in pixels.
+
+`visualBell' (class `VisualBell'): boolean
+ Whether XEmacs should flash the screen rather than making an
+ audible beep.
+
+`bellVolume' (class `BellVolume'): integer
+ Volume of the audible beep.
+
+`useBackingStore' (class `UseBackingStore'): boolean
+ Whether XEmacs should set the backing-store attribute of the X
+ windows it creates. This increases the memory usage of the X
+ server but decreases the amount of X traffic necessary to update
+ the screen, and is useful when the connection to the X server goes
+ over a low-bandwidth line such as a modem connection.
+
+ Emacs devices accept the following resources:
+
+`textPointer' (class `Cursor'): cursor-name
+ The cursor to use when the mouse is over text. This resource is
+ used to initialize the variable `x-pointer-shape'.
+
+`selectionPointer' (class `Cursor'): cursor-name
+ The cursor to use when the mouse is over a selectable text region
+ (an extent with the `highlight' property; for example, an Info
+ cross-reference). This resource is used to initialize the variable
+ `x-selection-pointer-shape'.
+
+`spacePointer' (class `Cursor'): cursor-name
+ The cursor to use when the mouse is over a blank space in a buffer
+ (that is, after the end of a line or after the end-of-file). This
+ resource is used to initialize the variable
+ `x-nontext-pointer-shape'.
+
+`modeLinePointer' (class `Cursor'): cursor-name
+ The cursor to use when the mouse is over a modeline. This
+ resource is used to initialize the variable `x-mode-pointer-shape'.
+
+`gcPointer' (class `Cursor'): cursor-name
+ The cursor to display when a garbage-collection is in progress.
+ This resource is used to initialize the variable
+ `x-gc-pointer-shape'.
+
+`scrollbarPointer' (class `Cursor'): cursor-name
+ The cursor to use when the mouse is over the scrollbar. This
+ resource is used to initialize the variable
+ `x-scrollbar-pointer-shape'.
+
+`pointerColor' (class `Foreground'): color-name
+`pointerBackground' (class `Background'): color-name
+ The foreground and background colors of the mouse cursor. These
+ resources are used to initialize the variables
+ `x-pointer-foreground-color' and `x-pointer-background-color'.
+
+\1f
File: xemacs.info, Node: Face Resources, Next: Widgets, Prev: Resource List, Up: X Resources
Face Resources
Entering and Exiting Emacs
**************************
- The usual way to invoke Emacs is to type `emacs <RET>' at the shell
-(for XEmacs, type `xemacs <RET>'). 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 <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
+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.
* ? (Calendar mode): General Calendar.
* ^ (query-replace): Query Replace.
* a (Calendar mode): Holidays.
+* BS: Inserting Text.
* button1: Intro to Keystrokes.
* button1up: Intro to Keystrokes.
* button2: Intro to Keystrokes.
* C-] <1>: Quitting.
* C-]: Recursive Edit.
* C-_: Undo.
-* C-a: Basic.
+* C-a: Moving Point.
* C-a (Calendar mode): Move to Beginning or End.
-* C-b: Basic.
+* C-b: Moving Point.
* C-b (Calendar mode): Calendar Unit Motion.
* C-c: Key Sequences.
* C-c ' (Picture mode): Insert in Picture.
* C-c } (TeX mode): TeX Editing.
* C-d: Killing.
* C-d (Shell mode): Shell Mode.
-* C-e: Basic.
+* C-e: Moving Point.
* C-e (Calendar mode): Move to Beginning or End.
-* C-END: Basic.
-* C-f: Basic.
+* C-END: Moving Point.
+* C-f: Moving Point.
* C-f (Calendar mode): Calendar Unit Motion.
* C-g <1>: Quitting.
* C-g: Minibuffer.
* C-h v <2>: Documentation.
* C-h v: Name Help.
* C-h w: Name Help.
-* C-HOME: Basic.
+* C-HOME: Moving Point.
* C-k: Killing.
* C-l <1>: Scrolling.
-* C-l: Basic.
+* C-l: Moving Point.
* C-l (query-replace): Query Replace.
-* C-LEFT: Basic.
+* C-LEFT: Moving Point.
* C-M-@ <1>: Lists.
* C-M-@: Marking Objects.
* C-M-\ <1>: Multi-line Indent.
* C-M-w: Appending Kills.
* C-M-x <1>: External Lisp.
* C-M-x: Lisp Eval.
-* C-n: Basic.
+* C-n: Moving Point.
* C-n (Calendar mode): Calendar Unit Motion.
* C-o: Blank Lines.
-* C-p: Basic.
+* C-p: Moving Point.
* C-p (Calendar mode): Calendar Unit Motion.
-* C-q: Basic.
+* C-q: Inserting Text.
* C-q (isearch-mode): Incremental Search.
* C-r: Incremental Search.
* C-r (isearch-mode): Incremental Search.
* C-r (query-replace): Query Replace.
-* C-RIGHT: Basic.
+* C-RIGHT: Moving Point.
* C-s: Incremental Search.
* C-s (isearch-mode): Incremental Search.
* C-SPC: Setting Mark.
* C-SPC (Calendar mode): Mark and Region.
* C-t <1>: Transpose.
-* C-t: Basic.
+* C-t: Moving Point.
* C-u: Arguments.
* C-u - C-x ;: Comments.
* C-u C-@: Mark Ring.
* C-u C-x v v: Editing with VC.
* C-u TAB: Multi-line Indent.
* C-v <1>: Scrolling.
-* C-v: Basic.
+* C-v: Moving Point.
* C-v (Calendar mode): Scroll Calendar.
* C-w: Killing.
* C-w (isearch-mode): Incremental Search.
* DEL <1>: Program Modes.
* DEL <2>: Major Modes.
* DEL <3>: Kill Errors.
-* DEL <4>: Killing.
-* DEL: Basic.
+* DEL: Killing.
* DEL (isearch-mode): Incremental Search.
* DEL (query-replace): Query Replace.
-* DOWN: Basic.
-* END: Basic.
+* DOWN: Moving Point.
+* END: Moving Point.
* ESC <1>: Meta Key.
* ESC: Key Sequences.
* ESC (query-replace): Query Replace.
* g m l (Calendar mode): Mayan Calendar.
* h (Calendar mode): Holidays.
* Help: Help.
-* HOME: Basic.
+* HOME: Moving Point.
* hyper key <1>: Super and Hyper Keys.
* hyper key <2>: Representing Keystrokes.
* hyper key: Intro to Keystrokes.
* i m (Calendar mode): Adding to Diary.
* i w (Calendar mode): Adding to Diary.
* i y (Calendar mode): Adding to Diary.
-* LEFT: Basic.
+* LEFT: Moving Point.
* LFD <1>: Basic Indent.
* LFD <2>: Major Modes.
* LFD: String Key Sequences.
* M-/: Dynamic Abbrevs.
* M-1: Arguments.
* M-;: Comments.
-* M-<: Basic.
+* M-<: Moving Point.
* M-< (Calendar mode): Move to Beginning or End.
* M-=: Position Info.
* M-= (Calendar mode): Mark and Region.
-* M->: Basic.
+* M->: Moving Point.
* M-> (Calendar mode): Move to Beginning or End.
* M-?: Nroff Mode.
* M-@ <1>: Words.
* M-p (minibuffer history): Minibuffer History.
* M-p (Shell mode): Shell Mode.
* M-q: Fill Commands.
-* M-r: Basic.
+* M-r: Moving Point.
* M-r (minibuffer history): Minibuffer History.
* M-s: Fill Commands.
* M-s (minibuffer history): Minibuffer History.
* M-TAB (isearch-mode): Incremental Search.
* M-u: Case.
* M-v <1>: Scrolling.
-* M-v: Basic.
+* M-v: Moving Point.
* M-v (Calendar mode): Scroll Calendar.
* M-w: Kill Ring.
* M-x: M-x.
* p (Calendar mode): To Other Calendar.
* p d (Calendar mode): General Calendar.
* pgdn: Scrolling.
-* PGDN: Basic.
+* PGDN: Moving Point.
* pgup: Scrolling.
-* PGUP: Basic.
+* PGUP: Moving Point.
* prior: Scrolling.
* q (Calendar mode): General Calendar.
-* RET: Basic.
+* RET: Inserting Text.
* RET (isearch-mode): Incremental Search.
* RET (Shell mode): Shell Mode.
-* RIGHT: Basic.
+* RIGHT: Moving Point.
* s (Calendar mode): Diary Commands.
* S (Calendar mode): Sunrise/Sunset.
* S-TAB (customization buffer): Changing an Option.
* TAB (Shell mode): Shell Mode.
* u (Calendar mode) <1>: Diary Commands.
* u (Calendar mode): Holidays.
-* UP: Basic.
+* UP: Moving Point.
* x (Calendar mode): Holidays.
* auto-fill-mode: Auto Fill.
* auto-save-mode: Auto Save Control.
* back-to-indentation: Indentation Commands.
-* backward-char: Basic.
+* backward-char: Moving Point.
* backward-delete-char-untabify: Program Modes.
* backward-kill-sentence <1>: Sentences.
* backward-kill-sentence <2>: Kill Errors.
* backward-kill-word <2>: Kill Errors.
* backward-kill-word: Killing.
* backward-list: Lists.
+* backward-or-forward-delete-char: Inserting Text.
* backward-page: Pages.
* backward-paragraph: Paragraphs.
* backward-sentence: Sentences.
* backward-up-list: Lists.
* backward-word: Words.
* batch-byte-compile: Compiling Libraries.
-* beginning-of-buffer: Basic.
+* beginning-of-buffer: Moving Point.
* beginning-of-defun: Defuns.
* beginning-of-fortran-subprogram: Fortran Motion.
-* beginning-of-line: Basic.
+* beginning-of-line: Moving Point.
* bookmark-delete: Bookmarks.
* bookmark-insert: Bookmarks.
* bookmark-insert-location: Bookmarks.
* define-key <1>: Programmatic Rebinding.
* define-key: Interactive Rebinding.
* delete-backward-char <1>: Kill Errors.
-* delete-backward-char <2>: Killing.
-* delete-backward-char: Basic.
+* delete-backward-char: Killing.
* delete-blank-lines <1>: Killing.
* delete-blank-lines: Blank Lines.
* delete-char <1>: Basic Picture.
* enable-command: Disabling.
* enable-menu-item: Menu Customization.
* end-kbd-macro: Basic Kbd Macro.
-* end-of-buffer: Basic.
+* end-of-buffer: Moving Point.
* end-of-defun: Defuns.
* end-of-fortran-subprogram: Fortran Motion.
-* end-of-line: Basic.
+* end-of-line: Moving Point.
* enlarge-window: Change Window.
* enlarge-window-horizontally: Change Window.
* european-calendar: Date Formats.
* fortran-previous-statement: Fortran Motion.
* fortran-split-line: ForIndent Commands.
* fortran-window-create: Fortran Columns.
-* forward-char: Basic.
+* forward-char: Moving Point.
* forward-list: Lists.
* forward-page: Pages.
* forward-paragraph: Paragraphs.
* frame-configuration-to-register: RegConfig.
* global-set-key <1>: Programmatic Rebinding.
* global-set-key: Interactive Rebinding.
-* goto-char: Basic.
-* goto-line: Basic.
+* goto-char: Moving Point.
+* goto-line: Moving Point.
* hanoi: Amusements.
* help-command: Help.
* help-for-help: Help.
* mouse-track-and-copy-to-cutbuffer: Additional Mouse Operations.
* mouse-track-delete-and-insert: Additional Mouse Operations.
* move-over-close-and-reindent: Balanced Editing.
-* move-to-window-line: Basic.
+* move-to-window-line: Moving Point.
* name-last-kbd-macro: Save Kbd Macro.
* narrow-to-region: Narrowing.
* negative-argument: Arguments.
-* newline: Basic.
+* newline: Inserting Text.
* newline-and-indent: Basic Indent.
* next-complex-command: Repetition.
* next-error: Compilation.
* next-history-element: Minibuffer History.
-* next-line: Basic.
+* next-line: Moving Point.
* next-list-mode-item: Completion Commands.
* next-matching-history-element: Minibuffer History.
* not-modified: Saving.
* prepend-to-buffer: Accumulating Text.
* previous-complex-command: Repetition.
* previous-history-element: Minibuffer History.
-* previous-line: Basic.
+* previous-line: Moving Point.
* previous-list-mode-item: Completion Commands.
* previous-matching-history-element: Minibuffer History.
* print-buffer: Hardcopy.
* query-replace-regexp: Query Replace.
* quietly-read-abbrev-file: Saving Abbrevs.
* quit-shell-subjob: Shell Mode.
-* quoted-insert: Basic.
+* quoted-insert: Inserting Text.
* re-search-backward: Regexp Search.
* re-search-forward: Regexp Search.
* read-abbrev-file: Saving Abbrevs.
* read-key-sequence: Representing Keystrokes.
* recenter <1>: Scrolling.
-* recenter: Basic.
+* recenter: Moving Point.
* recover-file: Recover.
* redraw-calendar: General Calendar.
* relabel-menu-item: Menu Customization.
* search-backward: Non-Incremental Search.
* search-forward: Non-Incremental Search.
* select-input-method: Select Input Method.
-* self-insert: Basic.
+* self-insert: Inserting Text.
* send-shell-input: Shell Mode.
* set-buffer-file-coding-system: Specify Coding.
* set-buffer-process-coding-system: Specify Coding.
* set-fill-column: Fill Commands.
* set-fill-prefix: Fill Prefix.
* set-gnu-bindings: Emulation.
-* set-goal-column: Basic.
+* set-goal-column: Moving Point.
* set-gosmacs-bindings: Emulation.
* set-keyboard-coding-system: Specify Coding.
* set-language-environment: Language Environments.
* switch-to-buffer-other-frame: XEmacs under X.
* switch-to-buffer-other-window <1>: Pop Up Window.
* switch-to-buffer-other-window: Select Buffer.
+* switch-to-completions: Completion Commands.
* switch-to-other-buffer: Select Buffer.
* tab-to-tab-stop <1>: Text Mode.
* tab-to-tab-stop: Tab Stops.
* top-level <1>: Quitting.
* top-level: Recursive Edit.
* transpose-chars <1>: Transpose.
-* transpose-chars: Basic.
+* transpose-chars: Moving Point.
* transpose-lines: Transpose.
* transpose-sexps <1>: Lists.
* transpose-sexps: Transpose.
* emacs-roots: Startup Paths.
* EMACSDATA: Startup Paths.
* EMACSLOADPATH: Startup Paths.
-* EMACSLOCKDIR: Startup Paths.
* EMACSPATH: Startup Paths.
* enable-local-variables: File Variables.
* enable-recursive-minibuffers: Minibuffer Edit.
* load-path <1>: Loading.
* load-path: Startup Paths.
* local-holidays: Holiday Customizing.
-* lock-directory: Startup Paths.
* lpr-switches: Hardcopy.
* mail-abbrev-mailrc-file: Mail Headers.
* mail-abbrev-mode-regexp: Mail Headers.
* mode-line-inverse-video: Mode Line.
* modeline-pointer-glyph: Mouse Selection.
* muddle-mode-hook: Program Modes.
+* next-line-add-newlines: Moving Point.
* next-screen-context-lines: Scrolling.
* no-redraw-on-reenter: Display Vars.
* nongregorian-diary-listing-hook: Hebrew/Islamic Entries.
* shell-prompt-pattern: Shell Mode.
* shell-pushd-regexp: Interactive Shell.
* sound-alist: Audible Bell.
-* superlock-file: Startup Paths.
* tab-stop-list: Tab Stops.
* tab-width: Display Vars.
* tag-mark-stack-max: Find Tag.
* text-pointer-glyph: Mouse Selection.
* today-invisible-calendar-hook: Calendar Customizing.
* today-visible-calendar-hook: Calendar Customizing.
-* track-eol: Basic.
+* track-eol: Moving Point.
* truncate-lines: Continuation Lines.
* truncate-partial-width-windows: Split Window.
* vc-command-messages: Variables for Check-in/out.
* apropos: Apropos.
* architecture-specific directories: Startup Paths.
* arguments (from shell): Command Switches.
+* arrow keys: Moving Point.
* ASCII: Intro to Keystrokes.
* Asm mode: Asm Mode.
* astronomical day numbers: Calendar Systems.
* creating files: Visiting.
* current buffer: Buffers.
* current stack frame: Lisp Debug.
-* cursor <1>: Basic.
+* cursor <1>: Inserting Text.
* cursor: Point.
+* cursor motion: Moving Point.
* customization <1>: Customization.
* customization <2>: Lisp Indent.
* customization: Commands.
* default argument: Minibuffer.
* defuns: Defuns.
* Delete Frame menu item: File Menu.
+* deleting blank lines: Blank Lines.
+* deleting characters and lines: Erasing.
* deleting menu items: Menu Customization.
* deletion <1>: Killing.
-* deletion: Basic.
+* deletion: Inserting Text.
* deletion (of files) <1>: Misc File Ops.
* deletion (of files): Dired.
* diary: Diary.
* enabling menu items: Menu Customization.
* encoding of characters: Mule.
* End Macro Recording menu item: Edit Menu.
-* entering Emacs: Entering Emacs.
* entering XEmacs: Entering Emacs.
* environment: Single Shell.
+* erasing characters and lines: Erasing.
* error log: Compilation.
* etags program: Create Tags Table.
* Ethiopic calendar: Calendar Systems.
* file protection: Interlocking.
* files <1>: Visiting.
* files <2>: Files.
-* files: Basic.
+* files: Basic Files.
* fill prefix: Fill Prefix.
* filling: Filling.
* Font menu item: Options Menu.
* function <1>: Key Bindings.
* function: Commands.
* General Public License: License.
+* getting help with keys: Basic Help.
* global keymap: Keymaps.
* global substitution: Replace.
-* graphic characters: Basic.
+* graphic characters: Inserting Text.
* Greek: Mule.
* Gregorian calendar: Other Calendars.
* grinding: Grinding.
* holiday forms: Holiday Customizing.
* holidays: Holidays.
* horizontal scrolling: Horizontal Scrolling.
+* Icomplete mode: Completion Options.
* ignoriginal: Dissociated Press.
* indentation <1>: Comments.
* indentation <2>: Grinding.
* init file: Init File.
* input methods: Input Methods.
* Insert File... menu item: File Menu.
-* insertion: Basic.
+* inserting blank lines: Blank Lines.
+* insertion: Inserting Text.
* international scripts: Mule.
* interval operator (in regexps): Etags Regexps.
* invisible lines: Outline Mode.
* Kill Buffer menu item: File Menu.
* kill ring: Yanking.
* killing: Killing.
+* killing characters and lines: Erasing.
* killing Emacs: Exiting.
* Korean: Mule.
* language environments: Language Environments.
* last package hierarchies: Startup Paths.
* late package hierarchies: Startup Paths.
* LaTeX: TeX Mode.
+* leaving Emacs: Exiting.
* libraries: Lisp Libraries.
* license to copy XEmacs: License.
* line number: Position Info.
+* line wrapping: Continuation Lines.
* Lisp: Programs.
* Lisp mode: Program Modes.
* list: Lists.
* moon, phases of: Lunar Phases.
* mouse operations: Additional Mouse Operations.
* mouse selection: Mouse Selection.
+* movement: Moving Point.
* moving inside the calendar: Calendar Motion.
+* moving point: Moving Point.
* moving text: Yanking.
+* moving the cursor: Moving Point.
* MULE: Mule.
* multi-frame XEmacs: XEmacs under X.
* multibyte characters: Mule.
* named configurations (RCS): Snapshot Caveats.
* narrowing: Narrowing.
* New Frame menu item: File Menu.
-* newline: Basic.
+* newline: Inserting Text.
* non-incremental search: Non-Incremental Search.
* nroff: Nroff Mode.
* numeric arguments: Arguments.
* Persian calendar: Calendar Systems.
* phases of the moon: Lunar Phases.
* pictures: Picture.
-* point <1>: Basic.
+* point <1>: Inserting Text.
* point: Point.
* pointer face: Mouse Selection.
* pointer shapes: Mouse Selection.
* query replace: Query Replace.
* quitting: Quitting.
* quitting (in search): Incremental Search.
-* quoting: Basic.
+* quitting Emacs: Exiting.
+* quoting: Inserting Text.
* random sentences: CONX.
* RCS: Concepts of VC.
* Read Only menu item: Options Menu.
* spelling: Spelling.
* Split Frame: File Menu.
* Start Macro Recording menu item: Edit Menu.
+* starting XEmacs: Entering Emacs.
* startup paths: Startup Paths.
* string substitution: Replace.
* subshell: Shell.
* words <2>: Words.
* words: Fixing Case.
* work file: Concepts of VC.
+* wrapping: Continuation Lines.
* X resources: X Resources.
* yahrzeits <1>: Sexp Diary Entries.
* yahrzeits: From Other Calendar.
=============
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).
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::).
\1f
File: xemacs.info, Node: Command Switches, Next: Startup Paths, Prev: Exiting, Up: Top
`/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
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.
+
+\1f
+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 <DEL>. <DEL> 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 <DEL>, 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 <BS>. <BS> 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 <BS>, they cancel out.
To end a line and start typing a new one, type <RET>. This inserts
a newline character in the buffer. If point is in the middle of a
line, <RET> splits the line. Typing <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.
+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: <DEL>, in most modes, runs the command
-`delete-backward-char'; <RET> 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 <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. *Note Minor Modes::.
Direct insertion works for printing characters and <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 "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 <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.)
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: <DEL>, in most modes, runs the command
+`backward-or-forward-delete-char'; <RET> 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 <DEL> to other commands.
+
+\1f
+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. <LEFT> or <END>) and one that doesn't. The
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
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).
+
+\1f
+File: xemacs.info, Node: Erasing, Next: Basic Files, Prev: Moving Point, Up: Basic
Erasing Text
============
`<DEL>'
- 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').
Kill back to the beginning of the previous word
(`backward-kill-word').
- In contrast to the <DEL> 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 <DEL> 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.
+\1f
+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 <RET>
-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 <RET> 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 <RET> 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::.
+\1f
+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 <F1>, 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::.
\1f
-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').
(`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 <RET>. 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 <RET>', 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 <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 `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 <RET>',
+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.
\1f
File: xemacs.info, Node: Continuation Lines, Next: Position Info, Prev: Blank Lines, Up: Basic
Continuation Lines
==================
- If you add too many characters to one line without breaking with a
-<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 "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
+<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 "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.
\1f
File: xemacs.info, Node: Position Info, Next: Arguments, Prev: Continuation Lines, Up: Basic
`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
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
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
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 <META> key (labelled with a diamond on
Sun-type keyboards and labelled `Alt' on some other keyboards), the
minus sign while holding down the <META> 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
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.
\1f
File: xemacs.info, Node: Undo, Next: Minibuffer, Prev: Basic, Up: Top
* Minibuffer History:: Reusing recent minibuffer arguments.
* Repetition:: Re-executing commands that used the minibuffer.
-\1f
-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-<DEL>' 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.
-
-\1f
-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 <RET> 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.
-
translation approved by the author instead of in the original English.
\1f
+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-<DEL>' 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.
+
+\1f
+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 <RET> 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.
+
+\1f
File: xemacs.info, Node: Completion, Next: Minibuffer History, Prev: Minibuffer Edit, Up: Minibuffer
Completion
no more characters are added; instead, <TAB> displays a list of all
possible completions in another window.
- If you go on to type `f <TAB>', this <TAB> sees `auto-f'. The only
+ If you go on to type `-f <TAB>', this <TAB> 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 <TAB> f <TAB>'. Note that <TAB> has this effect
but you must click in the list of completions, not in the
minibuffer itself.
+`<PRIOR>'
+`M-v'
+ Typing <PRIOR> 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.)
+
`<RET>'
Typing <RET> _in the completion list buffer_ chooses the
completion that point is in or next to (`choose-completion'). To
completions, an extra <RET> 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'.
+
\1f
File: xemacs.info, Node: Minibuffer History, Next: Repetition, Prev: Completion, Up: Minibuffer
Re-execute a recent minibuffer command (`repeat-complex-command').
`M-p'
- Within `C-x <ESC>', move to previous recorded command
+ Within `C-x <ESC> <ESC>', move to previous recorded command
(`previous-history-element').
`M-n'
- Within `C-x <ESC>', move to the next (more recent) recorded
+ Within `C-x <ESC> <ESC>', move to the next (more recent) recorded
command (`next-history-element').
`M-x list-command-history'
up the entire buffer as the region by putting point at the beginning
and the mark at the end.
-\1f
-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-<SPC>' (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-<SPC>' 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-<SPC>' 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.
-
-\1f
-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.
-
translation approved by the author instead of in the original English.
\1f
+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-<SPC>' (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-<SPC>' 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-<SPC>' 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.
+
+\1f
+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.
+
+\1f
File: xemacs.info, Node: Additional Mouse Operations, Next: Killing, Prev: Mouse Selection, Up: Top
Additional Mouse Operations
* Selective Display:: Hiding lines with lots of indentation.
* Display Vars:: Information on variables for customizing display.
-\1f
-File: xemacs.info, Node: Scrolling, Next: Horizontal Scrolling, Prev: Display, Up: Display
-
-Scrolling
-=========
-
- If a buffer contains text that is too large to fit entirely within
-the window that is displaying the buffer, XEmacs shows a contiguous
-section of the text. The section shown always contains point.
-
- "Scrolling" means moving text up or down in the window so that
-different parts of the text are visible. Scrolling forward means that
-text moves up, and new text appears at the bottom. Scrolling backward
-moves text down and new text appears at the top.
-
- Scrolling happens automatically if you move point past the bottom or
-top of the window. You can also explicitly request scrolling with the
-commands in this section.
-
-`C-l'
- Clear frame and redisplay, scrolling the selected window to center
- point vertically within it (`recenter').
-
-`C-v'
-`pgdn'
-`next'
- Scroll forward (a windowful or a specified number of lines)
- (`scroll-up').
-
-`M-v'
-`pgup'
-`prior'
- Scroll backward (`scroll-down').
-
-`ARG C-l'
- Scroll so point is on line ARG (`recenter').
-
- The most basic scrolling command is `C-l' (`recenter') with no
-argument. It clears the entire frame and redisplays all windows. In
-addition, it scrolls the selected window so that point is halfway down
-from the top of the window.
-
- The scrolling commands `C-v' and `M-v' let you move all the text in
-the window up or down a few lines. `C-v' (`scroll-up') with an
-argument shows you that many more lines at the bottom of the window,
-moving the text and point up together as `C-l' might. `C-v' with a
-negative argument shows you more lines at the top of the window.
-`Meta-v' (`scroll-down') is like `C-v', but moves in the opposite
-direction.
-
- To read the buffer a windowful at a time, use `C-v' with no
-argument. `C-v' takes the last two lines at the bottom of the window
-and puts them at the top, followed by nearly a whole windowful of lines
-not previously visible. Point moves to the new top of the window if it
-was in the text scrolled off the top. `M-v' with no argument moves
-backward with similar overlap. The number of lines of overlap across a
-`C-v' or `M-v' is controlled by the variable
-`next-screen-context-lines'; by default, it is two.
-
- Another way to scroll is using `C-l' with a numeric argument. `C-l'
-does not clear the frame when given an argument; it only scrolls the
-selected window. With a positive argument N, `C-l' repositions text to
-put point N lines down from the top. An argument of zero puts point on
-the very top line. Point does not move with respect to the text;
-rather, the text and point move rigidly on the frame. `C-l' with a
-negative argument puts point that many lines from the bottom of the
-window. For example, `C-u - 1 C-l' puts point on the bottom line, and
-`C-u - 5 C-l' puts it five lines from the bottom. Just `C-u' as
-argument, as in `C-u C-l', scrolls point to the center of the frame.
-
- Scrolling happens automatically if point has moved out of the visible
-portion of the text when it is time to display. Usually scrolling is
-done to put point vertically centered within the window. However, if
-the variable `scroll-step' has a non-zero value, an attempt is made to
-scroll the buffer by that many lines; if that is enough to bring point
-back into visibility, that is what happens.
-
- Scrolling happens automatically if point has moved out of the visible
-portion of the text when it is time to display. Usually scrolling is
-done to put point vertically centered within the window. However, if
-the variable `scroll-step' has a non-zero value, an attempt is made to
-scroll the buffer by that many lines; if that is enough to bring point
-back into visibility, that is what happens.
-
- If you set `scroll-step' to a small value because you want to use
-arrow keys to scroll the screen without recentering, the redisplay
-preemption will likely make XEmacs keep recentering the screen when
-scrolling fast, regardless of `scroll-step'. To prevent this, set
-`scroll-conservatively' to a small value, which will have the result of
-overriding the redisplay preemption.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Scrolling, Next: Horizontal Scrolling, Prev: Display, Up: Display
+
+Scrolling
+=========
+
+ If a buffer contains text that is too large to fit entirely within
+the window that is displaying the buffer, XEmacs shows a contiguous
+section of the text. The section shown always contains point.
+
+ "Scrolling" means moving text up or down in the window so that
+different parts of the text are visible. Scrolling forward means that
+text moves up, and new text appears at the bottom. Scrolling backward
+moves text down and new text appears at the top.
+
+ Scrolling happens automatically if you move point past the bottom or
+top of the window. You can also explicitly request scrolling with the
+commands in this section.
+
+`C-l'
+ Clear frame and redisplay, scrolling the selected window to center
+ point vertically within it (`recenter').
+
+`C-v'
+`pgdn'
+`next'
+ Scroll forward (a windowful or a specified number of lines)
+ (`scroll-up').
+
+`M-v'
+`pgup'
+`prior'
+ Scroll backward (`scroll-down').
+
+`ARG C-l'
+ Scroll so point is on line ARG (`recenter').
+
+ The most basic scrolling command is `C-l' (`recenter') with no
+argument. It clears the entire frame and redisplays all windows. In
+addition, it scrolls the selected window so that point is halfway down
+from the top of the window.
+
+ The scrolling commands `C-v' and `M-v' let you move all the text in
+the window up or down a few lines. `C-v' (`scroll-up') with an
+argument shows you that many more lines at the bottom of the window,
+moving the text and point up together as `C-l' might. `C-v' with a
+negative argument shows you more lines at the top of the window.
+`Meta-v' (`scroll-down') is like `C-v', but moves in the opposite
+direction.
+
+ To read the buffer a windowful at a time, use `C-v' with no
+argument. `C-v' takes the last two lines at the bottom of the window
+and puts them at the top, followed by nearly a whole windowful of lines
+not previously visible. Point moves to the new top of the window if it
+was in the text scrolled off the top. `M-v' with no argument moves
+backward with similar overlap. The number of lines of overlap across a
+`C-v' or `M-v' is controlled by the variable
+`next-screen-context-lines'; by default, it is two.
+
+ Another way to scroll is using `C-l' with a numeric argument. `C-l'
+does not clear the frame when given an argument; it only scrolls the
+selected window. With a positive argument N, `C-l' repositions text to
+put point N lines down from the top. An argument of zero puts point on
+the very top line. Point does not move with respect to the text;
+rather, the text and point move rigidly on the frame. `C-l' with a
+negative argument puts point that many lines from the bottom of the
+window. For example, `C-u - 1 C-l' puts point on the bottom line, and
+`C-u - 5 C-l' puts it five lines from the bottom. Just `C-u' as
+argument, as in `C-u C-l', scrolls point to the center of the frame.
+
+ Scrolling happens automatically if point has moved out of the visible
+portion of the text when it is time to display. Usually scrolling is
+done to put point vertically centered within the window. However, if
+the variable `scroll-step' has a non-zero value, an attempt is made to
+scroll the buffer by that many lines; if that is enough to bring point
+back into visibility, that is what happens.
+
+ Scrolling happens automatically if point has moved out of the visible
+portion of the text when it is time to display. Usually scrolling is
+done to put point vertically centered within the window. However, if
+the variable `scroll-step' has a non-zero value, an attempt is made to
+scroll the buffer by that many lines; if that is enough to bring point
+back into visibility, that is what happens.
+
+ If you set `scroll-step' to a small value because you want to use
+arrow keys to scroll the screen without recentering, the redisplay
+preemption will likely make XEmacs keep recentering the screen when
+scrolling fast, regardless of `scroll-step'. To prevent this, set
+`scroll-conservatively' to a small value, which will have the result of
+overriding the redisplay preemption.
+
+\1f
File: xemacs.info, Node: Horizontal Scrolling, Prev: Scrolling, Up: Display
Horizontal Scrolling
that is a correctly spelled English word. It prints a message giving
the answer in the echo area.
-\1f
-File: xemacs.info, Node: Files, Next: Buffers, Prev: Fixit, Up: Top
-
-File Handling
-*************
-
- The basic unit of stored data in Unix is the "file". To edit a file,
-you must tell Emacs to examine the file and prepare a buffer containing
-a copy of the file's text. This is called "visiting" the file. Editing
-commands apply directly to text in the buffer; that is, to the copy
-inside Emacs. Your changes appear in the file itself only when you
-"save" the buffer back into the file.
-
- In addition to visiting and saving files, Emacs can delete, copy,
-rename, and append to files, and operate on file directories.
-
-* Menu:
-
-* File Names:: How to type and edit file name arguments.
-* Visiting:: Visiting a file prepares Emacs to edit the file.
-* Saving:: Saving makes your changes permanent.
-* Reverting:: Reverting cancels all the changes not saved.
-* Auto Save:: Auto Save periodically protects against loss of data.
-* Version Control:: Version control systems (RCS and SCCS).
-* ListDir:: Listing the contents of a file directory.
-* Comparing Files:: Finding where two files differ.
-* Dired:: ``Editing'' a directory to delete, rename, etc.
- the files in it.
-* Misc File Ops:: Other things you can do on files.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Files, Next: Buffers, Prev: Fixit, Up: Top
+
+File Handling
+*************
+
+ The basic unit of stored data in Unix is the "file". To edit a file,
+you must tell Emacs to examine the file and prepare a buffer containing
+a copy of the file's text. This is called "visiting" the file. Editing
+commands apply directly to text in the buffer; that is, to the copy
+inside Emacs. Your changes appear in the file itself only when you
+"save" the buffer back into the file.
+
+ In addition to visiting and saving files, Emacs can delete, copy,
+rename, and append to files, and operate on file directories.
+
+* Menu:
+
+* File Names:: How to type and edit file name arguments.
+* Visiting:: Visiting a file prepares Emacs to edit the file.
+* Saving:: Saving makes your changes permanent.
+* Reverting:: Reverting cancels all the changes not saved.
+* Auto Save:: Auto Save periodically protects against loss of data.
+* Version Control:: Version control systems (RCS and SCCS).
+* ListDir:: Listing the contents of a file directory.
+* Comparing Files:: Finding where two files differ.
+* Dired:: ``Editing'' a directory to delete, rename, etc.
+ the files in it.
+* Misc File Ops:: Other things you can do on files.
+
+\1f
File: xemacs.info, Node: File Names, Next: Visiting, Prev: Files, Up: Files
File Names
Log mode, which involves running two hooks: `text-mode-hook' and
`vc-log-mode-hook'.
-\1f
-File: xemacs.info, Node: Change Logs and VC, Next: Old Versions, Prev: Log Entries, Up: Version Control
-
-Change Logs and VC
-------------------
-
- If you use RCS for a program and also maintain a change log file for
-it (*note Change Log::), you can generate change log entries
-automatically from the version control log entries:
-
-`C-x v a'
- Visit the current directory's change log file and create new
- entries for versions checked in since the most recent entry in the
- change log file (`vc-update-change-log').
-
- This command works with RCS only; it does not work with SCCS.
-
- For example, suppose the first line of `ChangeLog' is dated 10 April
-1992, and that the only check-in since then was by Nathaniel Bowditch
-to `rcs2log' on 8 May 1992 with log text `Ignore log messages that
-start with `#'.'. Then `C-x v a' visits `ChangeLog' and inserts text
-like this:
-
- Fri May 8 21:45:00 1992 Nathaniel Bowditch (nat@apn.org)
-
- * rcs2log: Ignore log messages that start with `#'.
-
-You can then edit the new change log entry further as you wish.
-
- Normally, the log entry for file `foo' is displayed as `* foo: TEXT
-OF LOG ENTRY'. The `:' after `foo' is omitted if the text of the log
-entry starts with `(FUNCTIONNAME): '. For example, if the log entry
-for `vc.el' is `(vc-do-command): Check call-process status.', then the
-text in `ChangeLog' looks like this:
-
- Wed May 6 10:53:00 1992 Nathaniel Bowditch (nat@apn.org)
-
- * vc.el (vc-do-command): Check call-process status.
-
- When `C-x v a' adds several change log entries at once, it groups
-related log entries together if they all are checked in by the same
-author at nearly the same time. If the log entries for several such
-files all have the same text, it coalesces them into a single entry.
-For example, suppose the most recent checkins have the following log
-entries:
-
-For `vc.texinfo':
- Fix expansion typos.
-For `vc.el':
- Don't call expand-file-name.
-For `vc-hooks.el':
- Don't call expand-file-name.
-
- They appear like this in `ChangeLog':
-
- Wed Apr 1 08:57:59 1992 Nathaniel Bowditch (nat@apn.org)
-
- * vc.texinfo: Fix expansion typos.
-
- * vc.el, vc-hooks.el: Don't call expand-file-name.
-
- Normally, `C-x v a' separates log entries by a blank line, but you
-can mark several related log entries to be clumped together (without an
-intervening blank line) by starting the text of each related log entry
-with a label of the form `{CLUMPNAME} '. The label itself is not
-copied to `ChangeLog'. For example, suppose the log entries are:
-
-For `vc.texinfo':
- {expand} Fix expansion typos.
-For `vc.el':
- {expand} Don't call expand-file-name.
-For `vc-hooks.el':
- {expand} Don't call expand-file-name.
-
-Then the text in `ChangeLog' looks like this:
-
- Wed Apr 1 08:57:59 1992 Nathaniel Bowditch (nat@apn.org)
-
- * vc.texinfo: Fix expansion typos.
- * vc.el, vc-hooks.el: Don't call expand-file-name.
-
- A log entry whose text begins with `#' is not copied to `ChangeLog'.
-For example, if you merely fix some misspellings in comments, you can
-log the change with an entry beginning with `#' to avoid putting such
-trivia into `ChangeLog'.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Change Logs and VC, Next: Old Versions, Prev: Log Entries, Up: Version Control
+
+Change Logs and VC
+------------------
+
+ If you use RCS for a program and also maintain a change log file for
+it (*note Change Log::), you can generate change log entries
+automatically from the version control log entries:
+
+`C-x v a'
+ Visit the current directory's change log file and create new
+ entries for versions checked in since the most recent entry in the
+ change log file (`vc-update-change-log').
+
+ This command works with RCS only; it does not work with SCCS.
+
+ For example, suppose the first line of `ChangeLog' is dated 10 April
+1992, and that the only check-in since then was by Nathaniel Bowditch
+to `rcs2log' on 8 May 1992 with log text `Ignore log messages that
+start with `#'.'. Then `C-x v a' visits `ChangeLog' and inserts text
+like this:
+
+ Fri May 8 21:45:00 1992 Nathaniel Bowditch (nat@apn.org)
+
+ * rcs2log: Ignore log messages that start with `#'.
+
+You can then edit the new change log entry further as you wish.
+
+ Normally, the log entry for file `foo' is displayed as `* foo: TEXT
+OF LOG ENTRY'. The `:' after `foo' is omitted if the text of the log
+entry starts with `(FUNCTIONNAME): '. For example, if the log entry
+for `vc.el' is `(vc-do-command): Check call-process status.', then the
+text in `ChangeLog' looks like this:
+
+ Wed May 6 10:53:00 1992 Nathaniel Bowditch (nat@apn.org)
+
+ * vc.el (vc-do-command): Check call-process status.
+
+ When `C-x v a' adds several change log entries at once, it groups
+related log entries together if they all are checked in by the same
+author at nearly the same time. If the log entries for several such
+files all have the same text, it coalesces them into a single entry.
+For example, suppose the most recent checkins have the following log
+entries:
+
+For `vc.texinfo':
+ Fix expansion typos.
+For `vc.el':
+ Don't call expand-file-name.
+For `vc-hooks.el':
+ Don't call expand-file-name.
+
+ They appear like this in `ChangeLog':
+
+ Wed Apr 1 08:57:59 1992 Nathaniel Bowditch (nat@apn.org)
+
+ * vc.texinfo: Fix expansion typos.
+
+ * vc.el, vc-hooks.el: Don't call expand-file-name.
+
+ Normally, `C-x v a' separates log entries by a blank line, but you
+can mark several related log entries to be clumped together (without an
+intervening blank line) by starting the text of each related log entry
+with a label of the form `{CLUMPNAME} '. The label itself is not
+copied to `ChangeLog'. For example, suppose the log entries are:
+
+For `vc.texinfo':
+ {expand} Fix expansion typos.
+For `vc.el':
+ {expand} Don't call expand-file-name.
+For `vc-hooks.el':
+ {expand} Don't call expand-file-name.
+
+Then the text in `ChangeLog' looks like this:
+
+ Wed Apr 1 08:57:59 1992 Nathaniel Bowditch (nat@apn.org)
+
+ * vc.texinfo: Fix expansion typos.
+ * vc.el, vc-hooks.el: Don't call expand-file-name.
+
+ A log entry whose text begins with `#' is not copied to `ChangeLog'.
+For example, if you merely fix some misspellings in comments, you can
+log the change with an entry beginning with `#' to avoid putting such
+trivia into `ChangeLog'.
+
+\1f
File: xemacs.info, Node: Old Versions, Next: VC Status, Prev: Change Logs and VC, Up: Version Control
Examining And Comparing Old Versions
`switch-to-buffer-other-window' and `find-file-other-window' work using
this function.
-\1f
-File: xemacs.info, Node: Change Window, Prev: Pop Up Window, Up: Windows
-
-Deleting and Rearranging Windows
-================================
-
-`C-x 0'
- Get rid of the selected window (`delete-window'). That is a zero.
- If there is more than one Emacs frame, deleting the sole remaining
- window on that frame deletes the frame as well. If the current
- frame is the only frame, it is not deleted.
-
-`C-x 1'
- Get rid of all windows except the selected one
- (`delete-other-windows').
-
-`C-x ^'
- Make the selected window taller, at the expense of the other(s)
- (`enlarge-window').
-
-`C-x }'
- Make the selected window wider (`enlarge-window-horizontally').
-
- To delete a window, type `C-x 0' (`delete-window'). (That is a
-zero.) The space occupied by the deleted window is distributed among
-the other active windows (but not the minibuffer window, even if that
-is active at the time). Once a window is deleted, its attributes are
-forgotten; there is no automatic way to make another window of the same
-shape or showing the same buffer. The buffer continues to exist, and
-you can select it in any window with `C-x b'.
-
- `C-x 1' (`delete-other-windows') is more powerful than `C-x 0'; it
-deletes all the windows except the selected one (and the minibuffer).
-The selected window expands to use the whole frame except for the echo
-area.
-
- To readjust the division of space among existing windows, use `C-x
-^' (`enlarge-window'). It makes the currently selected window longer
-by one line or as many lines as a numeric argument specifies. With a
-negative argument, it makes the selected window smaller. `C-x }'
-(`enlarge-window-horizontally') makes the selected window wider by the
-specified number of columns. The extra screen space given to a window
-comes from one of its neighbors, if that is possible; otherwise, all
-the competing windows are shrunk in the same proportion. If this makes
-some windows too small, those windows are deleted and their space is
-divided up. Minimum window size is specified by the variables
-`window-min-height' and `window-min-width'.
-
- You can also resize windows within a frame by clicking the left mouse
-button on a modeline, and dragging.
-
- Clicking the right button on a mode line pops up a menu of common
-window manager operations. This menu contains the following options:
-
-Delete Window
- Remove the window above this modeline from the frame.
-
-Delete Other Windows
- Delete all windows on the frame except for the one above this
- modeline.
-
-Split Window
- Split the window above the mode line in half, creating another
- window.
-
-Split Window Horizontally
- Split the window above the mode line in half horizontally, so that
- there will be two windows side-by-side.
-
-Balance Windows
- Readjust the sizes of all windows on the frame until all windows
- have roughly the same number of lines.
-
-\1f
-File: xemacs.info, Node: Mule, Next: Major Modes, Prev: Windows, Up: Top
-
-World Scripts Support
-*********************
-
- If you compile XEmacs with mule option, it supports a wide variety of
-world scripts, including Latin script, as well as Arabic script,
-Simplified Chinese script (for mainland of China), Traditional Chinese
-script (for Taiwan and Hong-Kong), Greek script, Hebrew script, IPA
-symbols, Japanese scripts (Hiragana, Katakana and Kanji), Korean scripts
-(Hangul and Hanja) and Cyrillic script (for Beylorussian, Bulgarian,
-Russian, Serbian and Ukrainian). These features have been merged from
-the modified version of Emacs known as MULE (for "MULti-lingual
-Enhancement to GNU Emacs").
-
-* Menu:
-
-* Mule Intro:: Basic concepts of Mule.
-* Language Environments:: Setting things up for the language you use.
-* Input Methods:: Entering text characters not on your keyboard.
-* Select Input Method:: Specifying your choice of input methods.
-* Coding Systems:: Character set conversion when you read and
- write files, and so on.
-* Recognize Coding:: How XEmacs figures out which conversion to use.
-* Specify Coding:: Various ways to choose which conversion to use.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Change Window, Prev: Pop Up Window, Up: Windows
+
+Deleting and Rearranging Windows
+================================
+
+`C-x 0'
+ Get rid of the selected window (`delete-window'). That is a zero.
+ If there is more than one Emacs frame, deleting the sole remaining
+ window on that frame deletes the frame as well. If the current
+ frame is the only frame, it is not deleted.
+
+`C-x 1'
+ Get rid of all windows except the selected one
+ (`delete-other-windows').
+
+`C-x ^'
+ Make the selected window taller, at the expense of the other(s)
+ (`enlarge-window').
+
+`C-x }'
+ Make the selected window wider (`enlarge-window-horizontally').
+
+ To delete a window, type `C-x 0' (`delete-window'). (That is a
+zero.) The space occupied by the deleted window is distributed among
+the other active windows (but not the minibuffer window, even if that
+is active at the time). Once a window is deleted, its attributes are
+forgotten; there is no automatic way to make another window of the same
+shape or showing the same buffer. The buffer continues to exist, and
+you can select it in any window with `C-x b'.
+
+ `C-x 1' (`delete-other-windows') is more powerful than `C-x 0'; it
+deletes all the windows except the selected one (and the minibuffer).
+The selected window expands to use the whole frame except for the echo
+area.
+
+ To readjust the division of space among existing windows, use `C-x
+^' (`enlarge-window'). It makes the currently selected window longer
+by one line or as many lines as a numeric argument specifies. With a
+negative argument, it makes the selected window smaller. `C-x }'
+(`enlarge-window-horizontally') makes the selected window wider by the
+specified number of columns. The extra screen space given to a window
+comes from one of its neighbors, if that is possible; otherwise, all
+the competing windows are shrunk in the same proportion. If this makes
+some windows too small, those windows are deleted and their space is
+divided up. Minimum window size is specified by the variables
+`window-min-height' and `window-min-width'.
+
+ You can also resize windows within a frame by clicking the left mouse
+button on a modeline, and dragging.
+
+ Clicking the right button on a mode line pops up a menu of common
+window manager operations. This menu contains the following options:
+
+Delete Window
+ Remove the window above this modeline from the frame.
+
+Delete Other Windows
+ Delete all windows on the frame except for the one above this
+ modeline.
+
+Split Window
+ Split the window above the mode line in half, creating another
+ window.
+
+Split Window Horizontally
+ Split the window above the mode line in half horizontally, so that
+ there will be two windows side-by-side.
+
+Balance Windows
+ Readjust the sizes of all windows on the frame until all windows
+ have roughly the same number of lines.
+
+\1f
+File: xemacs.info, Node: Mule, Next: Major Modes, Prev: Windows, Up: Top
+
+World Scripts Support
+*********************
+
+ If you compile XEmacs with mule option, it supports a wide variety of
+world scripts, including Latin script, as well as Arabic script,
+Simplified Chinese script (for mainland of China), Traditional Chinese
+script (for Taiwan and Hong-Kong), Greek script, Hebrew script, IPA
+symbols, Japanese scripts (Hiragana, Katakana and Kanji), Korean scripts
+(Hangul and Hanja) and Cyrillic script (for Beylorussian, Bulgarian,
+Russian, Serbian and Ukrainian). These features have been merged from
+the modified version of Emacs known as MULE (for "MULti-lingual
+Enhancement to GNU Emacs").
+
+* Menu:
+
+* Mule Intro:: Basic concepts of Mule.
+* Language Environments:: Setting things up for the language you use.
+* Input Methods:: Entering text characters not on your keyboard.
+* Select Input Method:: Specifying your choice of input methods.
+* Coding Systems:: Character set conversion when you read and
+ write files, and so on.
+* Recognize Coding:: How XEmacs figures out which conversion to use.
+* Specify Coding:: Various ways to choose which conversion to use.
+
+\1f
File: xemacs.info, Node: Mule Intro, Next: Language Environments, Prev: Mule, Up: Mule
Introduction to world scripts
`\begin'). A blank line is inserted between the two, and point is left
there.
-\1f
-File: xemacs.info, Node: TeX Print, Prev: TeX Editing, Up: TeX Mode
-
-TeX Printing Commands
-.....................
-
- You can invoke TeX as an inferior of Emacs on either the entire
-contents of the buffer or just a region at a time. Running TeX in this
-way on just one chapter is a good way to see what your changes look
-like without taking the time to format the entire file.
-
-`C-c C-r'
- Invoke TeX on the current region, plus the buffer's header
- (`tex-region').
-
-`C-c C-b'
- Invoke TeX on the entire current buffer (`tex-buffer').
-
-`C-c C-l'
- Recenter the window showing output from the inferior TeX so that
- the last line can be seen (`tex-recenter-output-buffer').
-
-`C-c C-k'
- Kill the inferior TeX (`tex-kill-job').
-
-`C-c C-p'
- Print the output from the last `C-c C-r' or `C-c C-b' command
- (`tex-print').
-
-`C-c C-q'
- Show the printer queue (`tex-show-print-queue').
-
- You can pass the current buffer through an inferior TeX using `C-c
-C-b' (`tex-buffer'). The formatted output appears in a file in `/tmp';
-to print it, type `C-c C-p' (`tex-print'). Afterward use `C-c C-q'
-(`tex-show-print-queue') to view the progress of your output towards
-being printed.
-
- The console output from TeX, including any error messages, appears
-in a buffer called `*TeX-shell*'. If TeX gets an error, you can switch
-to this buffer and feed it input (this works as in Shell mode; *note
-Interactive Shell::). Without switching to this buffer, you can scroll
-it so that its last line is visible by typing `C-c C-l'.
-
- Type `C-c C-k' (`tex-kill-job') to kill the TeX process if you see
-that its output is no longer useful. Using `C-c C-b' or `C-c C-r' also
-kills any TeX process still running.
-
- You can pass an arbitrary region through an inferior TeX by typing
-`C-c C-r' (`tex-region'). This is tricky, however, because most files
-of TeX input contain commands at the beginning to set parameters and
-define macros. Without them, no later part of the file will format
-correctly. To solve this problem, `C-c C-r' allows you to designate a
-part of the file as containing essential commands; it is included
-before the specified region as part of the input to TeX. The
-designated part of the file is called the "header".
-
- To indicate the bounds of the header in Plain TeX mode, insert two
-special strings in the file: `%**start of header' before the header,
-and `%**end of header' after it. Each string must appear entirely on
-one line, but there may be other text on the line before or after. The
-lines containing the two strings are included in the header. If
-`%**start of header' does not appear within the first 100 lines of the
-buffer, `C-c C-r' assumes there is no header.
-
- In LaTeX mode, the header begins with `\documentstyle' and ends with
-`\begin{document}'. These are commands that LaTeX requires you to use,
-so you don't need to do anything special to identify the header.
-
- When you enter either kind of TeX mode, Emacs calls with no
-arguments the value of the variable `text-mode-hook', if that value
-exists and is not `nil'. Emacs then calls the variable `TeX-mode-hook'
-and either `plain-TeX-mode-hook' or `LaTeX-mode-hook' under the same
-conditions.
-
-\1f
-File: xemacs.info, Node: Outline Mode, Prev: TeX Mode, Up: Text Mode
-
-Outline Mode
-------------
-
- Outline mode is a major mode similar to Text mode but intended for
-editing outlines. It allows you to make parts of the text temporarily
-invisible so that you can see just the overall structure of the
-outline. Type `M-x outline-mode' to turn on Outline mode in the
-current buffer.
-
- When you enter Outline mode, Emacs calls with no arguments the value
-of the variable `text-mode-hook', if that value exists and is not
-`nil'; then it does the same with the variable `outline-mode-hook'.
-
- When a line is invisible in outline mode, it does not appear on the
-screen. The screen appears exactly as if the invisible line were
-deleted, except that an ellipsis (three periods in a row) appears at
-the end of the previous visible line (only one ellipsis no matter how
-many invisible lines follow).
-
- All editing commands treat the text of the invisible line as part of
-the previous visible line. For example, `C-n' moves onto the next
-visible line. Killing an entire visible line, including its
-terminating newline, really kills all the following invisible lines as
-well; yanking everything back yanks the invisible lines and they remain
-invisible.
-
-* Menu:
-
-* Format: Outline Format. What the text of an outline looks like.
-* Motion: Outline Motion. Special commands for moving through outlines.
-* Visibility: Outline Visibility. Commands to control what is visible.
-
* update-elc.sh (ignore_dirs): Ignore lisp/utf-2000 subdirectory.
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
+2000-05-11 Ben Wing <ben@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.33 is released.
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@"
libs_xauth "@libs_xauth@"
lispdir "@lispdir@"
localstatedir "@localstatedir@"
-lockdir "@lockdir@"
lwlib_objs "@lwlib_objs@"
machfile "@machfile@"
mandir "@mandir@"
static LPTSTR
get_command (void)
{
- LPTSTR q, ws, cl = GetCommandLine ();
+ LPTSTR cl = GetCommandLine ();
int ix;
while (1)
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;
}
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)
* files.el (insert-file-contents-literally): Treat file as binary;
call file-name-handlers. [sync with Emacs 20.3.10]
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
+2000-05-20 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
+
+ * font-lock.el (font-lock-keywords): Rewrote docstring
+
+2000-05-22 Karl M. Hegbloom <karlheg@debian.org>
+
+ * loadhist.el (unload-feature): handle case where x is both boundp
+ and fboundp
+
+2000-05-22 Karl M. Hegbloom <karlheg@debian.org>
+
+ * packages.el: It's ok to use built-in macros, but not lisp
+ defined ones.
+
+2000-05-20 Ben Wing <ben@xemacs.org>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * keydefs.el: Define C-x BS to backward-kill-sentence.
+
+2000-05-15 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * files.el (hack-local-variables-prop-line): Use non-greedy
+ matching to process -*-texinfo-*- -*-.
+
+2000-05-11 Jonathan Marten <jonathan.marten@uk.sun.com>
+
+ * 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 <ben@xemacs.org>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * 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 <ben@xemacs.org>
+
+ * 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 <ben@xemacs.org>
+
+ * 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 <mta@arbortext.com>
+
+ * 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 <ben@xemacs.org>
+
+ * 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 <ben@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.33 is released.
(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"))
(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"))
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
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.
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.
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.
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.
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"))
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"))
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"))
(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"))
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"))
(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"))
(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
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."
;;;###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):
+
+ \"\\\\<foo\\\\>\" 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'.
+
+ (\"\\\\<anchor\\\\>\" (0 anchor-face) (\"\\\\<item\\\\>\" 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):
-
- \"\\\\\\=<foo\\\\\\=>\" 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):
-
- (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" 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)
(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)
(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)))
(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))
(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.
; (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)))
\f
;; Syntactic fontification functions.
((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 ())
-
-;; <andy@xemacs.org> 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)
-
\f
;; Various functions.
;; 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:
;;; 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 <cthomp@cs.uiuc.edu>, Ben Wing <ben@xemacs.org>
;; Maintainer: XEmacs Development Team
;;; 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 <X11/cursorfont.h>] 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.
"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.
(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))
(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)
"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
(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)
(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)
)))
(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
: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")
(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"]))
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])])])))))
`[layout :orientation vertical :justify left
:items (,progress-text-glyph
[layout
+ :margin-width 4
:pixel-height progress-glyph-height
:orientation horizontal])]))
(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))
;; 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)
;; 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))
(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.
;; 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)
(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)
(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)
;; 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)))))
;; #### 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]
)
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)))))
\f
(set-menubar default-menubar)
(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)
(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)
((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))
#'(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
(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 ""
(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 ""
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)
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)
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.
;; (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
(if buffer
(set-marker (process-mark proc) (point buffer) buffer))
(unwind-protect
- (progn
+ (prog1
(catch 'call-process-done
(when (not discard)
(set-process-sentinel
"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"
(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.
(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.
;;; 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 <ben@xemacs.org>
;; Keywords: internal, dumped
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'
,(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)))
\f
(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.")
(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
(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))
(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
(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))
(setq start (1+ (match-end 0))))
name))
-;;----------------------------------------------------------------------
-;; Quoting process args
-;;--------------------
-
-(defun nt-quote-args-verbatim (args)
- "Copy ARG list verbatim, separating each arg with space."
- (mapconcat #'identity args " "))
-
-(defun nt-quote-args-prefix-quote (prefix args)
- (mapconcat (lambda (str)
- (concat "\""
- (mapconcat (lambda (ch)
- (concat (if (eq ch ?\") prefix)
- (char-to-string ch)))
- str nil)
- "\""))
- args " "))
-
-(defun nt-quote-args-backslash-quote (args)
- "Place ARG list in quotes, prefixing quotes in args with backslashes."
- (nt-quote-args-prefix-quote "\\" args))
-
-(defun nt-quote-args-double-quote (args)
- "Place ARG list in quotes, doubling quotes in args."
- (nt-quote-args-prefix-quote "\"" args))
-
-(defvar nt-quote-args-functions-alist
- '(("^.?.?sh\\." . nt-quote-args-double-quote))
- "An alist for determining proper argument quoting given executable file name.
-Car of each cons must be a string, a regexp against which a file name sans
-directory is matched. Cdr is a function symbol. The list is mathced in
-forward order, and mathcing entry cdr's funcrion is called with a list of
-strings, process arguments. It must return a string which is passed to
-the newly created process.
-
-If not found, then `nt-quote-args-verbatim' is called on the argument list.")
-
-(defun nt-quote-process-args (args)
- ;;Properly quote process ARGS for executing (car ARGS).
- (let ((fname (file-name-nondirectory (car args)))
- (alist nt-quote-args-functions-alist)
- (case-fold-search nil)
- (return-me nil)
- (assoc nil))
- (while (and alist
- (null return-me))
- (setq assoc (pop alist))
- (if (string-match (car assoc) fname)
- (setq return-me (funcall (cdr assoc) (cdr args)))))
- (or return-me
- (nt-quote-args-verbatim (cdr args)))))
-
;;; winnt.el ends here
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
2000-05-01 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.33 is released.
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
+2000-05-17 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * xemacs/basic.texi: Document translation of tutorial.
+ * xemacs/startup.texi: Remove lock-directory.
+ * xemacs/enterings.texi: Update.
+
+2000-05-17 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * xemacs/basic.texi:
+ * xemacs/enterings.texi:
+ * xemacs/mini.texi:
+ Partial sync with FSF Emacs 20.6 and some update.
+
2000-05-01 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.33 is released.
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
@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.
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
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
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}.
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
@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
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
@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
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
@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
@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},
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,
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:
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
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
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
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.
@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
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}.
* 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.
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}).
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
@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
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
@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
@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.
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
@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
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
@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
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
-
+@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
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
@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.
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}).
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
@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
(@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:
@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
@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
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}).
@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
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
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
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
@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{-}
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
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
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
-
+@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
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}).
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
@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
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
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
@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.
@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,
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
+2000-05-12 Craig Lanning <CraigL@DyCon.com>
+
+ * inc\sys\socket.h: Don't define timeval as ws_timeval for mingw32
+
2000-05-01 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.33 is released.
#endif /* 0 */
/* avoid duplicate definition of timeval */
-#ifdef HAVE_TIMEVAL
+#if defined(HAVE_TIMEVAL) && !defined(__MINGW32__)
#define timeval ws_timeval
#endif
* lisp.h (make_older_vector): New prototype in UTF-2000.
-2000-05-24 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
-
- * unexelf.c: Sync up with Emacs 20.6.90 to fix problem with most
- current development versions of binutils.
-
2000-05-22 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
* lrecord.h (enum lrecord_type): Rename
(Vcharset_thai_tis620): Likewise.
(Vcharset_katakana_jisx0201): Likewise.
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
+2000-05-22 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <CraigL@DyCon.com>
+
+ * 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 <andy@xemacs.org>
+
+ * console-msw.c (mswindows_output_last_error): ; -> ,
+
+2000-05-12 Andy Piper <andy@xemacs.org>
+
+ * console-msw.c (FROB): compare ints with ints.
+
+2000-05-11 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_finalize_image_instance): make minimal build
+ happy.
+
+2000-05-20 Ben Wing <ben@xemacs.org>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * redisplay-tty.c (reset_tty_modes):
+ (tty_redisplay_shutdown): Adjust argument type to
+ tty_frame_output_end.
+
+2000-05-11 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * eval.c (Fbacktrace): Don't output a line with only right
+ parenthesis.
+
+2000-05-17 Kenji Itoh <keit@tpj.co.jp>
+
+ * postgresql.c (Fpq_connect_poll): Replace `PS' with `polling_status'.
+ (Fpq_reset_poll): Ditto.
+
+2000-05-16 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * redisplay-tty.c: Replace tty_output_end with tty_frame_output_end.
+
+2000-05-16 Ben Wing <ben@xemacs.org>
+
+ * 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 <ben@xemacs.org>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ 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 <ben@xemacs.org>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * glyphs.c (image_instantiate): Suppress gcc warnings.
+ (Fmake_image_instance): Fix doc string.
+ * specifier.c (Fmake_specifier): Ditto.
+
+2000-05-02 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * 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 <yoshiki@xemacs.org>
+
+ * fns.c (Ffeaturep): Update e-mail address in doc-string.
+ Document (featurep '(and xemacs 21.02)).
+
+2000-05-09 Ben Wing <ben@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <ben@xemacs.org>
+
+ * ntheap.c (recreate_heap): Changed unknown (VC6 only?) SIZE_T to
+ DWORD.
+
+2000-04-26 Mike Woolley <mike@bulsara.com>
+
+ * 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 <vroonhof@math.ethz.ch>
+
+ * callproc.c (Fold_call_process_internal): GCPRO path
+
+2000-05-08 Jan Vroonhof <jan@xemacs.org>
+
+ 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 <ben@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * nt.c: remove bogus reference to sysmmsystem.h
+
+ * gui-x.c (popup_selection_callback): fix no selection abort.
+
+2000-05-02 Andy Piper <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.33 is released.
#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;
dfc_conversion_data *sink)
{
int count = specpdl_depth ();
+ Extbyte_dynarr *conversion_out_dynarr;
type_checking_assert
(((source_type == DFC_TYPE_DATA) ||
((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
dfc_conversion_data *sink)
{
int count = specpdl_depth ();
+ Bufbyte_dynarr *conversion_in_dynarr;
type_checking_assert
((source_type == DFC_TYPE_DATA ||
(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))
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;
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)
argument to TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT(). */
#define Qnative Qfile_name
-#define GET_C_CHARPTR_EXT_DATA_ALLOCA(ptr, fmt, ptr_out) do \
-{ \
- Extcount gcceda_ignored_len; \
- const Bufbyte *gcceda_ptr_in = (const Bufbyte *) (ptr); \
- Extbyte *gcceda_ptr_out; \
- \
- GET_CHARPTR_EXT_DATA_ALLOCA (gcceda_ptr_in, \
- strlen ((char *) gcceda_ptr_in), \
- fmt, \
- gcceda_ptr_out, \
- gcceda_ignored_len); \
- (ptr_out) = (char *) gcceda_ptr_out; \
-} while (0)
-
-#define GET_C_CHARPTR_EXT_BINARY_DATA_ALLOCA(ptr, ptr_out) \
- GET_C_CHARPTR_EXT_DATA_ALLOCA (ptr, FORMAT_BINARY, ptr_out)
-#define GET_CHARPTR_EXT_BINARY_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
- GET_CHARPTR_EXT_DATA_ALLOCA (ptr, len, FORMAT_BINARY, ptr_out, len_out)
-
-#define GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA(ptr, ptr_out) \
- GET_C_CHARPTR_EXT_DATA_ALLOCA (ptr, FORMAT_FILENAME, ptr_out)
-#define GET_CHARPTR_EXT_FILENAME_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
- GET_CHARPTR_EXT_DATA_ALLOCA (ptr, len, FORMAT_FILENAME, ptr_out, len_out)
-
-#define GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA(ptr, ptr_out) \
- GET_C_CHARPTR_EXT_DATA_ALLOCA (ptr, FORMAT_CTEXT, ptr_out)
-#define GET_CHARPTR_EXT_CTEXT_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
- GET_CHARPTR_EXT_DATA_ALLOCA (ptr, len, FORMAT_CTEXT, ptr_out, len_out)
-
-/* Maybe convert external charptr's data into internal format and store
- the result in alloca()'ed space.
-
- You may wonder why this is written in this fashion and not as a
- function call. With a little trickery it could certainly be
- written this way, but it won't work because of those DAMN GCC WANKERS
- who couldn't be bothered to handle alloca() properly on the x86
- architecture. (If you put a call to alloca() in the argument to
- a function call, the stack space gets allocated right in the
- middle of the arguments to the function call and you are unbelievably
- hosed.) */
-
-#ifdef MULE
-
-#define GET_CHARPTR_INT_DATA_ALLOCA(ptr, len, fmt, ptr_out, len_out) do \
-{ \
- Extcount gcida_len_in = (Extcount) (len); \
- Bytecount gcida_len_out; \
- const Extbyte *gcida_ptr_in = (ptr); \
- Bufbyte *gcida_ptr_out = \
- convert_from_external_format (gcida_ptr_in, gcida_len_in, \
- &gcida_len_out, fmt); \
- /* If the new string is identical to the old (will be the case most \
- of the time), just return the same string back. This saves \
- on alloca()ing, which can be useful on C alloca() machines and \
- on stack-space-challenged environments. */ \
- \
- if (gcida_len_in == gcida_len_out && \
- !memcmp (gcida_ptr_in, gcida_ptr_out, gcida_len_out)) \
- { \
- (ptr_out) = (Bufbyte *) gcida_ptr_in; \
- } \
- else \
- { \
- (ptr_out) = (Extbyte *) alloca (1 + gcida_len_out); \
- memcpy ((void *) ptr_out, gcida_ptr_out, 1 + gcida_len_out); \
- } \
- (len_out) = gcida_len_out; \
-} while (0)
-
-#else /* ! MULE */
-
-#define GET_CHARPTR_INT_DATA_ALLOCA(ptr, len, fmt, ptr_out, len_out) do \
-{ \
- (ptr_out) = (Bufbyte *) (ptr); \
- (len_out) = (Bytecount) (len); \
-} while (0)
-
-#endif /* ! MULE */
-
-#define GET_C_CHARPTR_INT_DATA_ALLOCA(ptr, fmt, ptr_out) do \
-{ \
- Bytecount gccida_ignored_len; \
- const Extbyte *gccida_ptr_in = (const Extbyte *) (ptr); \
- Bufbyte *gccida_ptr_out; \
- \
- GET_CHARPTR_INT_DATA_ALLOCA (gccida_ptr_in, \
- strlen ((char *) gccida_ptr_in), \
- fmt, \
- gccida_ptr_out, \
- gccida_ignored_len); \
- (ptr_out) = gccida_ptr_out; \
-} while (0)
-
-#define GET_C_CHARPTR_INT_BINARY_DATA_ALLOCA(ptr, ptr_out) \
- GET_C_CHARPTR_INT_DATA_ALLOCA (ptr, FORMAT_BINARY, ptr_out)
-#define GET_CHARPTR_INT_BINARY_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
- GET_CHARPTR_INT_DATA_ALLOCA (ptr, len, FORMAT_BINARY, ptr_out, len_out)
-
-#define GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA(ptr, ptr_out) \
- GET_C_CHARPTR_INT_DATA_ALLOCA (ptr, FORMAT_FILENAME, ptr_out)
-#define GET_CHARPTR_INT_FILENAME_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
- GET_CHARPTR_INT_DATA_ALLOCA (ptr, len, FORMAT_FILENAME, ptr_out, len_out)
-
-#define GET_C_CHARPTR_INT_CTEXT_DATA_ALLOCA(ptr, ptr_out) \
- GET_C_CHARPTR_INT_DATA_ALLOCA (ptr, FORMAT_CTEXT, ptr_out)
-#define GET_CHARPTR_INT_CTEXT_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
- GET_CHARPTR_INT_DATA_ALLOCA (ptr, len, FORMAT_CTEXT, ptr_out, len_out)
-
-
-/* Maybe convert Lisp string's data into ext-format and store the result in
- alloca()'ed space.
-
- You may wonder why this is written in this fashion and not as a
- function call. With a little trickery it could certainly be
- written this way, but it won't work because of those DAMN GCC WANKERS
- who couldn't be bothered to handle alloca() properly on the x86
- architecture. (If you put a call to alloca() in the argument to
- a function call, the stack space gets allocated right in the
- middle of the arguments to the function call and you are unbelievably
- hosed.) */
-
-#define GET_STRING_EXT_DATA_ALLOCA(s, fmt, ptr_out, len_out) do \
-{ \
- Extcount gseda_len_out; \
- struct Lisp_String *gseda_s = XSTRING (s); \
- Extbyte * gseda_ptr_out = \
- convert_to_external_format (string_data (gseda_s), \
- string_length (gseda_s), \
- &gseda_len_out, fmt); \
- (ptr_out) = (Extbyte *) alloca (1 + gseda_len_out); \
- memcpy ((void *) ptr_out, gseda_ptr_out, 1 + gseda_len_out); \
- (len_out) = gseda_len_out; \
-} while (0)
-
-
-#define GET_C_STRING_EXT_DATA_ALLOCA(s, fmt, ptr_out) do \
-{ \
- Extcount gcseda_ignored_len; \
- Extbyte *gcseda_ptr_out; \
- \
- GET_STRING_EXT_DATA_ALLOCA (s, fmt, gcseda_ptr_out, \
- gcseda_ignored_len); \
- (ptr_out) = (char *) gcseda_ptr_out; \
-} while (0)
-
-#define GET_STRING_BINARY_DATA_ALLOCA(s, ptr_out, len_out) \
- GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_BINARY, ptr_out, len_out)
-#define GET_C_STRING_BINARY_DATA_ALLOCA(s, ptr_out) \
- GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_BINARY, ptr_out)
-
-#define GET_STRING_FILENAME_DATA_ALLOCA(s, ptr_out, len_out) \
- GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_FILENAME, ptr_out, len_out)
-#define GET_C_STRING_FILENAME_DATA_ALLOCA(s, ptr_out) \
- GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_FILENAME, ptr_out)
-
-#define GET_STRING_OS_DATA_ALLOCA(s, ptr_out, len_out) \
- GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_OS, ptr_out, len_out)
-#define GET_C_STRING_OS_DATA_ALLOCA(s, ptr_out) \
- GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_OS, ptr_out)
-
-#define GET_STRING_CTEXT_DATA_ALLOCA(s, ptr_out, len_out) \
- GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_CTEXT, ptr_out, len_out)
-#define GET_C_STRING_CTEXT_DATA_ALLOCA(s, ptr_out) \
- GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_CTEXT, ptr_out)
-
+#ifdef HAVE_MS_WINDOWS
+/* #### kludge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ Remove this as soon as my Mule code is integrated. */
+#define Qmswindows_tstr Qnative
+#endif
\f
/************************************************************************/
/* */
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.
NUNGCPRO;
}
- GCPRO1 (current_dir);
+ GCPRO2 (current_dir, path);
if (nargs >= 2 && ! NILP (args[1]))
{
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)
{
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));
}
#undef SITELISPDIR_USER_DEFINED
#undef ARCHLIBDIR_USER_DEFINED
#undef ETCDIR_USER_DEFINED
-#undef LOCKDIR_USER_DEFINED
#undef INFODIR_USER_DEFINED
#undef INFOPATH_USER_DEFINED
#include <config.h>
#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 */
/************************************************************************/
#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);
+}
\f
/************************************************************************/
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
#define INCLUDED_console_msw_h_
#include "console.h"
-#include <windows.h>
-#include <ddeml.h> /* DDE management library */
-#if !defined(__CYGWIN32__) && !defined(__MINGW32__) \
- || CYGWIN_VERSION_DLL_MAJOR > 20
-#include <shellapi.h> /* FileManager/Explorer drag and drop */
-#include <commctrl.h>
-#endif
+#include "syswindows.h"
+#include "syscommctrl.h"
#ifdef HAVE_XPM
#include <X11/xpm.h>
/* 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;
int msw_windows9x_p (void);
+
+void mswindows_output_last_error (char *frob);
+
#endif /* INCLUDED_console_msw_h_ */
}
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,
}
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,
{
}
-static void
-stream_clear_frame (struct frame *f)
-{
-}
-
static int
stream_flash (struct device *d)
{
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);
}
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);
#include "frame.h"
#include "sysdep.h"
-#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \
- CYGWIN_VERSION_DLL_MAJOR < 21
-extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
-#else
-#include <winspool.h>
-#endif
-
#if !(defined (__CYGWIN32__) || defined(__MINGW32__))
# include <objbase.h> /* For CoInitialize */
#endif
#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
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.
/* 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 <config.h> 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
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. */
extern Lisp_Object Vlisp_EXEC_SUFFIXES;
\f
-/* 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;
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. */
# 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 */
+
\f
#ifdef SIGDANGER
#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 ();
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;
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 */
}
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)
{
UNGCPRO;
- shut_down_emacs (0, STRINGP (arg) ? arg : Qnil);
+ shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0);
#if defined(GNU_MALLOC)
__free_hook =
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"
#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"
"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;
"(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);
#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 */
*/ );
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.
*/ );
/* 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:
Fprin1 (backlist->args[i], stream);
}
}
+ write_c_string (")\n", stream);
}
- write_c_string (")\n", stream);
backlist = backlist->next;
}
}
/* 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
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.
-/* 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.
#include "process.h"
#include "redisplay.h"
#include "select.h"
+#include "window.h"
#include "sysproc.h"
#include "syswait.h"
#include "systime.h"
# include <shlobj.h> /* For IShellLink */
#endif
-#if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20)
-typedef NMHDR *LPNMHDR;
-#endif
-
#ifdef HAVE_MENUBARS
#define ADJR_MENUFLAG TRUE
#else
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;
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;
}
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 :
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);
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;
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. */
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);
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
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 '@'.
* 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;
* 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)
/* 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;
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;
}
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
(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
(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,
(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;
}
}
/* 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 ();
}
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;
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.
/* 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;
*/ );
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 /*
(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
-<bug-gnu-emacs@prep.ai.mit.edu>.
+<bug-gnu-emacs@gnu.org>.
*/
(fexp))
{
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) =
#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));
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;
#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);
}
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. */
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. */
int modiff;
- /* subwindow cache elements for this frame */
- subwindow_cachel_dynarr *subwindow_cachels;
-
struct expose_ignore* subwindow_exposures;
struct expose_ignore* subwindow_exposures_tail;
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 */
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);
#include <config.h>
#include "lisp.h"
+Lisp_Object Qabort;
Lisp_Object Qactually_requested;
Lisp_Object Qafter;
Lisp_Object Qall;
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;
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;
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;
Lisp_Object Qrassq;
Lisp_Object Qrequire;
Lisp_Object Qresource;
+Lisp_Object Qretry;
Lisp_Object Qreturn;
Lisp_Object Qreverse;
Lisp_Object Qright;
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");
defsymbol (&Qbottom_margin, "bottom-margin");
defsymbol (&Qbuffer, "buffer");
defsymbol (&Qbutton, "button");
+ defsymbol (&Qcancel, "cancel");
defsymbol (&Qcategory, "category");
defsymbol (&Qcenter, "center");
defsymbol (&Qchannel, "channel");
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");
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");
defsymbol (&Qrassq, "rassq");
defsymbol (&Qrequire, "require");
defsymbol (&Qresource, "resource");
+ defsymbol (&Qretry, "retry");
defsymbol (&Qreturn, "return");
defsymbol (&Qreverse, "reverse");
defsymbol (&Qright, "right");
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");
}
#include "buffer.h"
#include "frame.h"
#include "opaque.h"
+#include "window.h"
#include "sysfile.h"
/* 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,
}
/* 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));
}
/* 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));
}
/* 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));
/* Synched up with: Not in FSF. */
-/* written by Andy Piper <andy@xemacs.org> plagerising bits from
+/* written by Andy Piper <andy@xemacs.org> plagiarising bits from
glyphs-x.c */
#include <config.h>
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
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);
*/
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))
{
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;
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--;
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
{
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)));
}
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,
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 */
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. */
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. */
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),
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,
{
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);
/* 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;
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)
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
(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,
(XCOLOR_INSTANCE
(FACE_FOREGROUND
(XIMAGE_INSTANCE_WIDGET_FACE (ii),
- XIMAGE_INSTANCE_SUBWINDOW_FRAME (ii))))));
+ XIMAGE_INSTANCE_FRAME (ii))))));
#endif
}
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++;
{
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 */
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);
};
#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_ */
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;
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))
}
/* 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)
}
/* 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));
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))
}
}
-static void
+static int
widget_layout (Lisp_Object image_instance,
unsigned int width, unsigned int height, Lisp_Object domain)
{
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
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;
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]);
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) =
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))
{
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 ");
/*****************************************************************************
* 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
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
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);
}
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)))
}
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)
{
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)))
{
== 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
/* 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;
}
\f
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 { \
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);
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);
}
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);
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);
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);
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);
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);
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
image_instantiator_tab_control();
image_instantiator_labels();
image_instantiator_layout();
+ image_instantiator_native_layout();
}
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;
}
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
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);
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))
{
#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))
/* 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. */
/* 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);
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;
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);
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 */
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
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);
/* 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))
{
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);
}
{
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
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 */
(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) \
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_ */
/* 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
#include <config.h>
#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 <X11/xpm.h>
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;
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);
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
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;
}
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
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,
}
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);
}
\f
{
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))
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;
}
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))
{
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);
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
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);
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);
{
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
{
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))
break;
case IMAGE_WIDGET:
- case IMAGE_LAYOUT:
if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1),
IMAGE_INSTANCE_WIDGET_TYPE (i2))
&& IMAGE_INSTANCE_SUBWINDOW_ID (i1) ==
&& 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)
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:
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;
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,
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;
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);
case IMAGE_POINTER: return Qpointer;
case IMAGE_SUBWINDOW: return Qsubwindow;
case IMAGE_WIDGET: return Qwidget;
- case IMAGE_LAYOUT: return Qlayout;
default:
abort ();
}
}
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;
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))
{
}
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);
}
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
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, /*
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
return encode_image_instance_type (XIMAGE_INSTANCE_TYPE (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.
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)
&&
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;
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)
&&
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
case IMAGE_POINTER:
case IMAGE_SUBWINDOW:
case IMAGE_WIDGET:
- case IMAGE_LAYOUT:
return make_int (XIMAGE_INSTANCE_HEIGHT (image_instance));
default:
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
case IMAGE_POINTER:
case IMAGE_SUBWINDOW:
case IMAGE_WIDGET:
- case IMAGE_LAYOUT:
return make_int (XIMAGE_INSTANCE_WIDTH (image_instance));
default:
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
case IMAGE_WIDGET:
return FACE_FOREGROUND (
XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
- XIMAGE_INSTANCE_SUBWINDOW_FRAME
+ XIMAGE_INSTANCE_FRAME
(image_instance));
default:
(image_instance))
{
CHECK_IMAGE_INSTANCE (image_instance);
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
switch (XIMAGE_INSTANCE_TYPE (image_instance))
{
case IMAGE_WIDGET:
return FACE_BACKGROUND (
XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
- XIMAGE_INSTANCE_SUBWINDOW_FRAME
+ XIMAGE_INSTANCE_FRAME
(image_instance));
default:
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
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);
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);
||
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))
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
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;
}
/*
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);
}
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;
Charset_ID 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)
}
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);
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,
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));
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))
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)
{
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
}
#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;
}
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 <X11/cursorfont.h>] 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))
{
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) =
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))
{
domain, errb, no_quit, 0,
Qzero);
assert (!UNBOUNDP (image_instance));
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
return image_instance;
}
XGLYPH_DIRTYP (glyph_or_image) = dirty;
}
+ if (!IMAGE_INSTANCEP (instance))
+ return;
+
XIMAGE_INSTANCE_DIRTYP (instance) = dirty;
}
}
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);
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 *
*****************************************************************************/
****************************************************************************/
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;
}
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);
}
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;
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 */
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
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
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,
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);
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, /*
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;
}
/* 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);
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");
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);
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);
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);
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);
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,
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
#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;
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);
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,
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 *****/
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 *****/
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);
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,
#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,
IMAGE_COLOR_PIXMAP,
IMAGE_POINTER,
IMAGE_SUBWINDOW,
- IMAGE_WIDGET,
- IMAGE_LAYOUT
+ IMAGE_WIDGET
};
#define IMAGE_NOTHING_MASK (1 << 0)
#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)
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); \
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. */
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
{
} 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. */
#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))
#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)
#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) \
#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) \
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))
#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) \
#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);
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;
#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);
* 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
{
#include <config.h>
#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"
/*
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;
}
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
}
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))
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
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;
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))
{
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))
{
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))
{
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
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;
}
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)
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)
+
\f
/************************************************************************/
/* Checking for QUIT */
/* 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));
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;
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);
EXFUN (Fforward_line, 2);
EXFUN (Ffset, 2);
EXFUN (Ffuncall, MANY);
+EXFUN (Ffunctionp, 1);
EXFUN (Fgeq, MANY);
EXFUN (Fget, 3);
EXFUN (Fget_buffer_process, 1);
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;
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;
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;
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;
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;
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;
#include <stdlib.h>
#include <stdio.h>
-#include <windows.h>
-#include <mmsystem.h>
+#include "syswindows.h"
#include "nt.h"
#include <sys/dir.h>
return errno = EINVAL;
}
+\f
+/*--------------------------------------------------------------------*/
+/* 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;
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)
#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 */
child_process * cp;
} filedesc;
-extern filedesc fd_info [ MAXDESC ];
+extern filedesc fd_info [];
/* fd_info flag definitions */
#define FILE_READ 0x0001
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_ */
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
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_ */
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.*/
-#include <windows.h>
#include <config.h>
#include <stdio.h>
#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 <mmsystem.h>
-#endif
static int play_sound_data_1 (unsigned char *data, int length,
int volume, int convert);
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)
{
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,
#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;
{
/* 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))
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))
{
{
/* 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;
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))
{
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))
{
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'.
#define PATH_DATA "@ETCDIR@"
#endif
-#ifdef LOCKDIR_USER_DEFINED
-#define PATH_LOCK "@LOCKDIR@"
-#endif
-
#ifdef DOCDIR_USER_DEFINED
#define PATH_DOC "@DOCDIR@"
#endif
(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 */
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);
}
}
(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 */
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
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,
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
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;
}
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;
}
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;
}
#include <config.h>
#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"
/* 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
{
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
}
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
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;
&& 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);
}
/*
- * 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
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.
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;
}
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;
}
}
/*****************************************************************************
- 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();
}
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);
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;
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);
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);
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) &&
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
}
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);
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;
}
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
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;
}
}
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
(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));
+ }
}
}
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));
}
}
}
****************************************************************************/
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);
}
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);
}
struct display_line dl; /* this is fake */
Lisp_Object string =
IMAGE_INSTANCE_TEXT_STRING (childii);
- unsigned char charsets[NUM_LEADING_BYTES];
+ Charset_ID charsets[NUM_LEADING_BYTES];
struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex);
find_charsets_in_bufbyte_string (charsets,
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))
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;
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)
{
}
#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));
}
/*****************************************************************************
}
/* 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). */
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. */
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);
}
/*****************************************************************************
- 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);
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;
}
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)));
}
/*****************************************************************************
/* 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);
}
}
}
/* 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 */
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);
}
/*****************************************************************************
- 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)));
}
/*****************************************************************************
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;
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);
#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. */
/* 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;
case '%':
dst += set_charptr_emchar (dst, '%');
break;
+ /* #### unimplemented */
}
}
}
* - 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;
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;
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;
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);
generate_display_line call. */
if (start_pos > BUF_ZV (b))
break;
+
+ force = 0;
}
if (prop)
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 ();
#### 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. */
/* 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. */
/* 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);
validate_line_start_cache (w);
w->line_cache_validation_override++;
- updating_line_start_cache = 1;
if (from < BUF_BEGV (b))
from = BUF_BEGV (b);
if (from > to)
{
- updating_line_start_cache = 0;
w->line_cache_validation_override--;
return;
}
/* 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;
}
update_internal_cache_list (w, DESIRED_DISP);
if (!Dynarr_length (internal_cache))
{
- updating_line_start_cache = 0;
w->line_cache_validation_override--;
return;
}
{
Dynarr_add_many (cache, Dynarr_atp (internal_cache, 0),
Dynarr_length (internal_cache));
- updating_line_start_cache = 0;
w->line_cache_validation_override--;
return;
}
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;
}
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;
}
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;
}
Dynarr_length (internal_cache) - ic_elt);
}
- updating_line_start_cache = 0;
w->line_cache_validation_override--;
return;
}
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;
startp = new_startp;
if (startp > BUF_ZV (b))
{
- updating_line_start_cache = 0;
w->line_cache_validation_override--;
return;
}
while (to > high_bound);
}
- updating_line_start_cache = 0;
w->line_cache_validation_override--;
assert (to <= high_bound);
}
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
*/
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;
}
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);
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;
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
#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
#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
#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 <commctrl.h> */
#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
#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
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;
}
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;
}
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);
}
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;
}
signal_simple_error ("Invalid specifier domain", domain);
}
-static Lisp_Object
+Lisp_Object
decode_domain (Lisp_Object domain)
{
if (NILP (domain))
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
/* 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 ();
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"
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))
{
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))
{
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))
{
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))
{
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
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))
{
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);
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);
#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
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))
{
-/* Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992, 1993, 1999, 2000
+/* Copyright (C) 1985, 1986, 1987, 1988, 1990, 1992, 1993
Free Software Foundation, Inc.
This file is part of XEmacs.
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Synched up with: FSF 20.6.90. */
+/* Synched up with: FSF 20.4. */
/*
* unexec.c - Convert a running program into an a.out file.
* The value you specify may be rounded down to a suitable boundary
* as required by the machine you are using.
*
+ * Specifying zero for data_start means the boundary between text and data
+ * should not be the same as when the program was loaded.
+ * If NO_REMAP is defined, the argument data_start is ignored and the
+ * segment boundaries are never changed.
+ *
* Bss_start indicates how much of the data segment is to be saved in the
* a.out file and restored when the program is executed. It gives the lowest
* unsaved address, and is rounded up to a page boundary. The default when 0
*
* The new file is set up to start at entry_address.
*
+ * If you make improvements I'd like to get them too.
+ * harpo!utah-cs!thomas, thomas@Utah-20
+ *
*/
/* Even more heavily modified by james@bigtex.cactus.org of Dell Computer Co.
#include <sym.h>
#endif /* __sony_news && _SYSTYPE_SYSV */
#ifdef __sgi
-#include <syms.h> /* for HDRR declaration */
+#include <sym.h> /* for HDRR declaration */
#endif /* __sgi */
#if defined (__alpha__) && !defined (__NetBSD__) && !defined (__OpenBSD__)
# endif
# include <sys/exec_elf.h>
-# ifndef PT_LOAD
-# define PT_LOAD Elf_pt_load
-# define SHT_SYMTAB Elf_sht_symtab
-# define SHT_DYNSYM Elf_sht_dynsym
-# define SHT_NULL Elf_sht_null
-# define SHT_NOBITS Elf_sht_nobits
-# define SHT_REL Elf_sht_rel
-# define SHT_RELA Elf_sht_rela
-
-# define SHN_UNDEF Elf_eshn_undefined
-# define SHN_ABS Elf_eshn_absolute
-# define SHN_COMMON Elf_eshn_common
-# endif
+# define PT_LOAD Elf_pt_load
+# define SHT_SYMTAB Elf_sht_symtab
+# define SHT_DYNSYM Elf_sht_dynsym
+# define SHT_NULL Elf_sht_null
+# define SHT_NOBITS Elf_sht_nobits
+# define SHT_REL Elf_sht_rel
+# define SHT_RELA Elf_sht_rela
+
+# define SHN_UNDEF Elf_eshn_undefined
+# define SHN_ABS Elf_eshn_absolute
+# define SHN_COMMON Elf_eshn_common
# ifdef __alpha__
# include <sys/exec_ecoff.h>
#ifndef ElfW
# ifdef __STDC__
-# define ElfBitsW(bits, type) Elf##bits##_##type
+# define ElfW(type) Elf32_##type
# else
-# define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type
+# define ElfW(type) Elf32_/**/type
# endif
-# ifdef _LP64
-# define ELFSIZE 64
-# else
-# define ELFSIZE 32
-# endif
- /* This macro expands `bits' before invoking ElfBitsW. */
-# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type)
-# define ElfW(type) ElfExpandBitsW (ELFSIZE, type)
#endif
#ifndef ELF_BSS_SECTION_NAME
return x - rem + y;
}
-/* Return the index of the section named NAME.
- SECTION_NAMES, FILE_NAME and FILE_H give information
- about the file we are looking in.
-
- If we don't find the section NAME, that is a fatal error
- if NOERROR is 0; we return -1 if NOERROR is nonzero. */
-
-static int
-find_section (name, section_names, file_name, old_file_h, old_section_h, noerror)
- char *name;
- char *section_names;
- char *file_name;
- ElfW(Ehdr) *old_file_h;
- ElfW(Shdr) *old_section_h;
- int noerror;
-{
- int idx;
-
- for (idx = 1; idx < old_file_h->e_shnum; idx++)
- {
-#ifdef DEBUG
- fprintf (stderr, "Looking for %s - found %s\n", name,
- section_names + OLD_SECTION_H (idx).sh_name);
-#endif
- if (!strcmp (section_names + OLD_SECTION_H (idx).sh_name,
- name))
- break;
- }
- if (idx == old_file_h->e_shnum)
- {
- if (noerror)
- return -1;
- else
- fatal ("Can't find %s in %s.\n", name, file_name, 0);
- }
-
- return idx;
-}
-
/* ****************************************************************
* unexec
*
ElfW(Off) new_data2_offset;
ElfW(Addr) new_data2_addr;
- int n, nn;
- int old_bss_index, old_sbss_index;
- int old_data_index, new_data2_index;
- int old_mdebug_index;
+ int n, nn, old_bss_index, old_data_index, new_data2_index;
+ int old_sbss_index, old_mdebug_index;
struct stat stat_buf;
/* Open the old file & map it into the address space. */
old_section_names = (char *) old_base
+ OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset;
- /* Find the mdebug section, if any. */
-
- old_mdebug_index = find_section (".mdebug", old_section_names,
- old_name, old_file_h, old_section_h, 1);
-
/* Find the old .bss section. Figure out parameters of the new
* data2 and bss sections.
*/
- old_bss_index = find_section (".bss", old_section_names,
- old_name, old_file_h, old_section_h, 0);
-
- old_sbss_index = find_section (".sbss", old_section_names,
- old_name, old_file_h, old_section_h, 1);
- if (old_sbss_index != -1)
- if (OLD_SECTION_H (old_sbss_index).sh_type == SHT_PROGBITS)
- old_sbss_index = -1;
+ for (old_bss_index = 1; old_bss_index < (int) old_file_h->e_shnum;
+ old_bss_index++)
+ {
+#ifdef DEBUG
+ fprintf (stderr, "Looking for .bss - found %s\n",
+ old_section_names + OLD_SECTION_H (old_bss_index).sh_name);
+#endif
+ if (!strcmp (old_section_names + OLD_SECTION_H (old_bss_index).sh_name,
+ ELF_BSS_SECTION_NAME))
+ break;
+ }
+ if (old_bss_index == old_file_h->e_shnum)
+ fatal ("Can't find .bss in %s.\n", old_name, 0);
- if (old_sbss_index == -1)
+ for (old_sbss_index = 1; old_sbss_index < (int) old_file_h->e_shnum;
+ old_sbss_index++)
{
- old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr;
- old_bss_size = OLD_SECTION_H (old_bss_index).sh_size;
+#ifdef DEBUG
+ fprintf (stderr, "Looking for .sbss - found %s\n",
+ old_section_names + OLD_SECTION_H (old_sbss_index).sh_name);
+#endif
+ if (!strcmp (old_section_names + OLD_SECTION_H (old_sbss_index).sh_name,
+ ".sbss"))
+ break;
+ }
+ if (old_sbss_index == old_file_h->e_shnum)
+ {
+ 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_index = old_bss_index;
}
else
{
- 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;
+ 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_index = old_sbss_index;
}
- /* Find the old .data section. Figure out parameters of
- the new data2 and bss sections. */
+ for (old_mdebug_index = 1; old_mdebug_index < (int) old_file_h->e_shnum;
+ old_mdebug_index++)
+ {
+#ifdef DEBUG
+ fprintf (stderr, "Looking for .mdebug - found %s\n",
+ old_section_names + OLD_SECTION_H (old_mdebug_index).sh_name);
+#endif
+ if (!strcmp (old_section_names + OLD_SECTION_H (old_mdebug_index).sh_name,
+ ".mdebug"))
+ break;
+ }
+ if (old_mdebug_index == old_file_h->e_shnum)
+ old_mdebug_index = 0;
- old_data_index = find_section (".data", old_section_names,
- old_name, old_file_h, old_section_h, 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);
if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
-#ifdef __sgi
+#ifdef __mips
/* According to r02kar@x4u2.desy.de (Karsten Kuenne)
and oliva@gnu.org (Alexandre Oliva), on IRIX 5.2, we
always get "Program segment above .bss" when dumping
when the executable doesn't have an sbss section. */
if (old_sbss_index != -1)
-#endif /* __sgi */
+#endif /* __mips */
if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz
> (old_sbss_index == -1
? old_bss_addr
if (NEW_SECTION_H (nn).sh_type != SHT_SYMTAB
&& NEW_SECTION_H (nn).sh_type != SHT_DYNSYM)
PATCH_INDEX (NEW_SECTION_H (nn).sh_info);
-
- if (old_sbss_index != -1)
- if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".sbss"))
- {
- NEW_SECTION_H (nn).sh_offset =
- round_up (NEW_SECTION_H (nn).sh_offset,
- NEW_SECTION_H (nn).sh_addralign);
- NEW_SECTION_H (nn).sh_type = SHT_PROGBITS;
- }
/* Now, start to copy the content of sections. */
if (NEW_SECTION_H (nn).sh_type == SHT_NULL
/* Taking these sections from the current process, breaks
Linux in a subtle way. Binaries only run on the
architecture (e.g. i586 vs i686) of the dumping machine */
+#ifdef __sgi
|| !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
".lit4")
|| !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
".lit8")
|| !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
".got")
+#endif
|| !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
".sdata1")
|| !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
- ".data1")
- || !strcmp (old_section_names + NEW_SECTION_H (nn).sh_name,
- ".sbss"))
+ ".data1"))
src = (caddr_t) OLD_SECTION_H (n).sh_addr;
else
src = old_base + OLD_SECTION_H (n).sh_offset;
#endif /* __alpha__ */
#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
- if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG
- && old_mdebug_index != -1)
+ if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG && old_mdebug_index)
{
int diff = NEW_SECTION_H(nn).sh_offset
- OLD_SECTION_H(old_mdebug_index).sh_offset;
if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data")
|| !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".sdata")
+#ifdef __sgi
|| !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".lit4")
|| !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".lit8")
|| !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".got")
+#endif
|| !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
".sdata1")
|| !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
#include <fcntl.h>
#include <windows.h>
+#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
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,
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
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);
/* #### 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. */
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
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;
window = Fselected_window (Qnil);
else
CHECK_WINDOW (window);
+
w = XWINDOW (window);
/* It's okay to delete an already-deleted 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);
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
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;
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)
+2000-05-28 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.34 is released.
+
2000-05-01 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.33 is released.
;; 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
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