+to 21.2.36 "Notus"
+-- Fix build problems on AIX 4.3 -- Martin Buchholz
+-- Fix build problems on HP-UX 10.20 -- Alexandre Oliva and Martin Buchholz
+-- Fix build problems on SunOS 4.1.4 -- Martin Buchholz
+-- Fix build problems on IA64/Linux -- Martin Buchholz
+-- Fix build problems on Alpha/Linux -- Steve Baur
+-- Fix build problems on Unixware -- Martin Buchholz
+-- Support pty input lines longer than 512 bytes on HP-UX 10.20. -- Martin Buchholz
+-- `equal' of hash tables is now the same as `eq'. -- Martin Buchholz
+-- ucs fixes - Daiki Ueno
+-- Lots of little doc fixes. -- Martin Buchholz
+-- Process-signaling code rewritten -- Martin Buchholz
+-- pty allocation code rewritten -- Martin Buchholz
+-- The byte compiler generates more efficient code -- Martin Buchholz
+-- build-report fixes -- Adrian Aichner
+-- next-window/next-frame functions rewritten -- Martin Buchholz
+-- Windows fixes -- Jonathan Harris
+-- Multiple info buffer support -- Golubev I. N.
+-- regex crash fixes -- Yoshiki Hayashi
+-- Widget/windows fixes -- Andy Piper
+-- structured lisp errors -- Ben Wing
+-- allow modules to define their own lisp object types -- Andrew Begel
+
to 21.2.35 "Nike"
-- You now again build XEmacs in a directory containing a predefined
CPP symbol -- Martin Buchholz
to 21.2.33 "Melpomene"
-- Yet more progress gauge and gutter redisplay fixes from Andy Piper
-- glyph error checking from Andy Piper
--- Proper implementation of string glyps makes them Mule safe (IKEYAMA Tomonori)
+-- Proper implementation of string glyphs makes them Mule safe (IKEYAMA Tomonori)
-- Bug fixes from the usual suspects
-- --with-clash-detection now defaults to `yes', at least for betas.
-- Autoconf support for detecting how to #include header files
-- Internal Postgres RDBMS support from Steve Baur
-- Improve gutter useability
-- Fix window geometry with gutters
--- Fix async updates so that they only occur when neccessary
+-- Fix async updates so that they only occur when necessary
-- Gutter documentation from Stephen Turnbull
-- redisplay-gutter-area fixes from Andy Piper
-- pdump file in MS-Windows executable from Mike Alexander
-- Make XEmacs work on Windows again.
to 21.2.30 "Hygeia"
--- Make (find-tag-other-window) always use other window,
+-- Make (find-tag-other-window) always use other window,
even if tag is found in buffer of current window, Samuel Mikes
-- Make configure complain about broken compiler versions (Jan Vroonhof, Yoshiki Hayashi, Bill Perry)
-- `write-region' now deals properly with non-ASCII file names, Martin Buchholz
to 21.2.29 "Hestia"
-- Fix compile errors on pre-X11R6 systems, introduced in 21.2.28.
--- Fix autodetection of Berkeley DB on Linux Glibc 2 systems.
+-- Fix autodetection of Berkeley DB on Linux Glibc 2 systems.
(but more work needed)
-- Allow non-symbols (anything compared with `eq') in object plists.
-- Cleanup of property frobbing code.
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-08-29 Robert Pluim <rpluim@bigfoot.com>
+
+ * etc/NEWS: fix reference to progress-feedback-use-echo-area
+
+2000-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Big signal/process handling overhaul.
+ Autoconfiscate lots of functions and headers:
+ getpt _getpt grantpt unlockpt ptsname killpg tcgetpgrp
+ openpty pty.h libutil.h sys/stropts.h sys/strtio.h isastream
+
+2000-09-20 Martin Buchholz <martin@xemacs.org>
+
+ * etc/xemacs.1: Spelling fixes. Remove stuff that doesn't belong.
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * *: Spelling mega-patch
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Remove strcasecmp.
+
+ * etc/Emacs.ad: Remove Energize from comments.
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Add -Kalloca to $c_switch_system when using
+ Unixware native compiler (if necessary).
+
+2000-09-15 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Prevent spurious "No" in configure output when not
+ using gcc. Oh, and it's "no", not "No". Oh, and it's "yes", not "Yes".
+
+2000-09-14 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Save 2 sed process invocations per Makefile.
+
+2000-08-22 SL Baur <steve@turbolinux.co.jp>
+
+ * configure.in (after_morecore_hook_exists): Don't add /usr/shlib
+ to link path if compiling on Alpha/Linux.
+
+2000-09-01 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in (depend): cd to the correct directory.
+
+2000-08-31 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: with_widgets is incompatible with X11 R4.
+
+ * configure.in: Make Balloon Help conditional on finding shape.h
+
+2000-08-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * etc/Emacs.ad: Document usage of FontSet resource for menubar.
+
+2000-08-09 Vin Shelton <acs@xemacs.org>
+
+ * configure.in: Check for UNIX98 PTYs. Patch from Florian Weimer
+ <Florian.Weimer@RUS.Uni-Stuttgart.DE>.
+
+2000-07-31 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * configure.usage: Remove lockdir document.
+
+2000-07-31 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in:
+ Make knowledge of machine and opsys optional.
+ Make existence of s&m files optional.
+ Rely on configure alone if s&m files not found.
+
+ * configure.in:
+ Use only configure-time tests to detect getloadavg().
+ Don't check for kstat.h if we have getloadavg().
+ Check for sys/loadavg.h if we have getloadavg().
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * Makefile.in.in (configure):
+ all-elcs target now uses update-elc-2.el not update-elc.sh
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
${srcdir}/lib-src/config.values.in : ${srcdir}/configure
cd ${srcdir} && $(SHELL) lib-src/config.values.sh
-depend ${srcdir}/src/depend :
- cd ${srcdir}/src && $(RECURSIVE_MAKE) depend
+depend ${srcdir}/src/depend:
+ cd ./src && $(RECURSIVE_MAKE) depend
## Build XEmacs and recompile out-of-date and missing .elc files along
## the way.
all-elc all-elcs: lib-src lwlib dump-elcs src
- MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-elc.sh
+ ${blddir}/src/${PROGNAME} -batch -vanilla \
+ -l update-elc-2.el -f batch-update-elc-2 lisp
## Sub-target for all-elc.
dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs
This is usually because xmkmf is not in your path or because you are
using the default cygwin shell. The default cygwin shell (/bin/sh.exe)
-is ash which appears to work in most circumstances but has some wierd
+is ash which appears to work in most circumstances but has some weird
failure modes. I recommend replacing sh.exe with bash.exe, this will
mean configure is slower but more reliable.
Or you could set TERMCAP only when you set TERM--which should not
happen in a non-login shell.
-*** The popup menu appears at the buttom/right of my screen.
+*** The popup menu appears at the bottom/right of my screen.
You probably have something like the following in your ~/.Xdefaults
launched. Forcing a static link of libc.a alone by adding
/usr/lib/libc.a at the end of the link line solves this. Note that
my 9.07 build of 19.14b17 and my (old) build of 19.13 both exhibit
- the same behaviour. I've tried various hpux patches to no avail. If
+ the same behavior. I've tried various hpux patches to no avail. If
this problem cannot be solved before the release date, binary kits
for HP *must* be linked statically against libc, otherwise this
problem will show up. (This is directed at whoever will volunteer
if test -n "$dll_cflags"; then
AC_MSG_RESULT([${dll_cflags}])
-
+
# Check to make sure the dll_cflags actually works.
AC_MSG_CHECKING([if PIC flag ${dll_cflags} really works])
save_CFLAGS="$CFLAGS"
dnl I believe that libtool is incorrect in trying to drive the linker
dnl directly. This can cause considerable problems if the module you are
dnl compiling has C++ or other static initializers. If we use ld directly,
-dnl we dont end up with the crt stuff being linked in, and we dont end up
+dnl we don't end up with the crt stuff being linked in, and we don't end up
dnl with any .init or .fini sections (or the moral equivalent thereof).
-dnl gcc takes great care to do this propperly when invoked in -shared
-dnl mode, and we really do want this behaviour. Perhaps the libtool folks
+dnl gcc takes great care to do this properly when invoked in -shared
+dnl mode, and we really do want this behavior. Perhaps the libtool folks
dnl are not aware that any SVR4 based dynamic loader will automatically
dnl execute code in the .init section before dlopen() returns. This is
-dnl vital, as the module may have been compiled to rely on that behaviour.
+dnl vital, as the module may have been compiled to rely on that behavior.
dnl
dnl So, having said all of that, we diverge from libtool significantly
dnl here. We want to try and use the C compiler as much as possible. Only
dnl gcc uses, which can be the internal collect2 that comes with gcc.
dnl If the user ever changes their compiler version, the paths will no
dnl longer be correct, and ellcc will break. This is clearly unacceptable.
-dnl By using the compiler driver on the path, we dont have this problem.
+dnl By using the compiler driver on the path, we don't have this problem.
dnl If that is not clear, consider that gcc -print-prog-name=ld can
dnl produce something along the lines of:
dnl /usr/local/lib/gcc-lib/OS-NAME/GCC-VERSION/ld
dnl shared objects, we try that. Only if all of that fails do we revert
dnl back to the libtool ld trickery.
dnl
-dnl We dont do ANY of this if we can't produce shared objects.
+dnl We don't do ANY of this if we can't produce shared objects.
dnl
if test "$can_build_shared" = "yes"; then
cc_produces_so=no
dnl Last thing, check how to get a linked executable to have its symbols
dnl exported, so that the modules have access to them.
dnl
-dnl XEmacs FIXME - we need to set ld_dynamic_link_flags propperly for
+dnl XEmacs FIXME - we need to set ld_dynamic_link_flags properly for
dnl most of these systems, which was missing from libtool. I know they
dnl all have a way of doing this, but someone needs to look at this
dnl for each OS and make sure it is correct. Remember that the arguments
clipper-* ) machine=clipper ;;
arm* ) machine=arm ;;
ns32k-* ) machine=ns32000 ;;
- s390-* ) machine=s390 ;;
esac
case "$canonical" in
esac
-if test -z "$machine" -o -z "$opsys"; then
- (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
- echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
- ) >&2
- exit 1
+test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
+test -z "$opsys" && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
+
+if test -r "${srcdir}/src/m/${machine}.h"; then
+ machfile="m/${machine}.h"
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining config_machfile = "$machfile"
+EOF
+cat >> confdefs.h <<EOF
+#define config_machfile "$machfile"
+EOF
+}
+
+else
+ echo "XEmacs has no builtin knowledge of \`$machine' machines."
+ echo "Using configure-time autodetection only."
fi
+if test -r "${srcdir}/src/s/${opsys}.h"; then
+ opsysfile="s/${opsys}.h"
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining config_opsysfile = "$opsysfile"
+EOF
+cat >> confdefs.h <<EOF
+#define config_opsysfile "$opsysfile"
+EOF
+}
+
+else
+ echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
+ echo "Using configure-time autodetection only."
+fi
+
+
if test -z "$dynamic"; then
case "$opsys" in
hpux* | sunos4* ) dynamic=no ;;
}
-machfile="m/${machine}.h"
-opsysfile="s/${opsys}.h"
-
test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
if test "$with_workshop $with_tooltalk" = "yes no"; 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:1595: checking for $ac_word" >&5
+echo "configure:1618: 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:1622: checking for $ac_word" >&5
+echo "configure:1645: 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:1670: checking for $ac_word" >&5
+echo "configure:1693: 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:1699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1722: 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 1712 "configure"
+#line 1735 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1740: \"$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:1745: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1768: 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:1750: checking whether we are using GNU C" >&5
+echo "configure:1773: 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:1757: \"$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:1780: \"$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:1775: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1798: 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:1808: checking for $ac_word" >&5
+echo "configure:1831: 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:1835: checking for $ac_word" >&5
+echo "configure:1858: 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:1883: checking for $ac_word" >&5
+echo "configure:1906: 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:1912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1935: 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 1925 "configure"
+#line 1948 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1953: \"$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:1958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1981: 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:1963: checking whether we are using GNU C" >&5
+echo "configure:1986: 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:1970: \"$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:1993: \"$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:1988: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2011: 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:2021: checking for $ac_word" >&5
+echo "configure:2044: 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:2048: checking for $ac_word" >&5
+echo "configure:2071: 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:2096: checking for $ac_word" >&5
+echo "configure:2119: 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:2125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2148: 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 2138 "configure"
+#line 2161 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2166: \"$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:2171: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2194: 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:2176: checking whether we are using GNU C" >&5
+echo "configure:2199: 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:2183: \"$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:2206: \"$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:2201: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2224: 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:2238: checking how to run the C preprocessor" >&5
+echo "configure:2261: 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 2251 "configure"
+#line 2274 "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:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2280: \"$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 2268 "configure"
+#line 2291 "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:2274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2297: \"$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 2285 "configure"
+#line 2308 "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:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2314: \"$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:2317: checking for AIX" >&5
+echo "configure:2340: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 2319 "configure"
+#line 2342 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2346: checking for GNU libc" >&5
+echo "configure:2369: checking for GNU libc" >&5
cat > conftest.$ac_ext <<EOF
-#line 2348 "configure"
+#line 2371 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
have_glibc=yes
else
esac
cat > conftest.$ac_ext <<EOF
-#line 2437 "configure"
+#line 2460 "configure"
#include "confdefs.h"
int main () {
#if defined __SUNPRO_C
return 11;
#elif defined __DECC
return 12;
+#elif defined __USLC__ && defined __SCO_VERSION__
+return 13;
#else
return 0;
#endif
}
EOF
-if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
case "$conftest_rc" in
11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
+ 13) echo "You appear to be using the SCO C compiler." ; __USLC__=yes ;;
esac
fi
rm -fr conftest*
-cat > $tempcname <<EOF
+cat > $tempcname < confdefs.h
+cat >> $tempcname <<EOF
#define NOT_C_CODE
#define C_SWITCH_SITE
#define C_SWITCH_X_SITE
#define LD_SWITCH_X_SITE
#define LD_SWITCH_X_SITE_AUX
#define OS_RELEASE $os_release
+
+#ifdef config_opsysfile
#include "$srcdir/src/$opsysfile"
+#endif
+
+#ifdef config_machfile
#include "$srcdir/src/$machfile"
+#endif
#ifndef LIBS_MACHINE
#define LIBS_MACHINE
test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
+
test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" && if test "$extra_verbose" = "yes"; then echo " Appending \"-std1\" to \$c_switch_site"; fi
+if test "$__USLC__" = yes; then
+ echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
+echo "configure:2703: checking for whether the -Kalloca compiler flag is needed" >&5
+ need_kalloca=no
+ cat > conftest.$ac_ext <<EOF
+#line 2706 "configure"
+#include "confdefs.h"
+
+int main() {
+void *x = alloca(4);
+; return 0; }
+EOF
+if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ xe_save_c_switch_system="$c_switch_system"
+ c_switch_system="$c_switch_system -Kalloca"
+ cat > conftest.$ac_ext <<EOF
+#line 2724 "configure"
+#include "confdefs.h"
+
+int main() {
+void *x = alloca(4);
+; return 0; }
+EOF
+if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ need_kalloca=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ c_switch_system="$xe_save_c_switch_system"
+fi
+rm -f conftest*
+ echo "$ac_t""$need_kalloca" 1>&6
+ test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" && if test "$extra_verbose" = "yes"; then echo " Appending \"-Kalloca\" to \$c_switch_system"; fi
+fi
+
if test "$cflags_specified" = "no"; then
if test "$GCC" = "yes"; then
CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
if test "$GCC" = "yes"; then
echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
-echo "configure:2685: checking for buggy gcc versions" >&5
+echo "configure:2764: 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.*)
case "$CFLAGS" in
*-fno-schedule-insns*) ;;
*)
- echo "$ac_t""Yes" 1>&6
+ echo "$ac_t""yes" 1>&6
echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
echo "configure: warning: without also using -fno-schedule-insns." 1>&2
{ echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
esac
;;
Linux:alpha:egcs-2.91.*)
- echo "$ac_t""Yes" 1>&6
+ echo "$ac_t""yes" 1>&6
echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
echo "configure: warning: Alpha Linux. There have also been reports that egcs-1.0.3a is O.K." 1>&2
{ echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
case "$CFLAGS" in
*-fno-strength-reduce*) ;;
*)
- echo "$ac_t""Yes" 1>&6
+ echo "$ac_t""yes" 1>&6
echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
echo "configure: warning: -fno-strength-reduce." 1>&2
{ echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
case "$CFLAGS" in
*-fno-caller-saves*) ;;
*)
- echo "$ac_t""Yes" 1>&6
+ echo "$ac_t""yes" 1>&6
echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
echo "configure: warning: -fno-caller-saves." 1>&2
{ echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
esac
;;
esac
+echo "$ac_t""no" 1>&6
fi
-echo "$ac_t""No" 1>&6
if test "$GCC" = "yes"; then
fi
echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2808: checking for dynodump" >&5
+echo "configure:2887: 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:2846: checking for terminateAndUnload in -lC" >&5
+echo "configure:2925: 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 2851 "configure"
+#line 2930 "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:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2941: \"$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:2970: checking "for runtime libraries flag"" >&5
+echo "configure:3049: 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 2992 "configure"
+#line 3071 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
dash_r="$try_dash_r"
else
fi
after_morecore_hook_exists=yes
echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
-echo "configure:3101: checking for malloc_set_state" >&5
+echo "configure:3180: checking for malloc_set_state" >&5
cat > conftest.$ac_ext <<EOF
-#line 3104 "configure"
+#line 3183 "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:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3206: \"$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:3147: checking whether __after_morecore_hook exists" >&5
+echo "configure:3226: checking whether __after_morecore_hook exists" >&5
cat > conftest.$ac_ext <<EOF
-#line 3149 "configure"
+#line 3228 "configure"
#include "confdefs.h"
extern void (* __after_morecore_hook)();
int main() {
__after_morecore_hook = 0
; return 0; }
EOF
-if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3235: \"$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
# 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:3212: checking for $ac_word" >&5
+echo "configure:3291: 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:3267: checking for a BSD compatible install" >&5
+echo "configure:3346: 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:3321: checking for $ac_word" >&5
+echo "configure:3400: checking for $ac_word" >&5
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
test -n "$YACC" || YACC="yacc"
-for ac_hdr in a.out.h cygwin/version.h fcntl.h inttypes.h libgen.h locale.h mach/mach.h sys/param.h sys/pstat.h sys/stropts.h sys/time.h sys/timeb.h sys/un.h kstat.h ulimit.h unistd.h utime.h
+for ac_hdr in a.out.h cygwin/version.h fcntl.h inttypes.h libgen.h locale.h mach/mach.h sys/param.h sys/pstat.h sys/time.h sys/timeb.h sys/un.h ulimit.h unistd.h utime.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3353: checking for $ac_hdr" >&5
+echo "configure:3432: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 3356 "configure"
+#line 3435 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3440: \"$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:3391: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:3470: checking for sys/wait.h that is POSIX.1 compatible" >&5
cat > conftest.$ac_ext <<EOF
-#line 3394 "configure"
+#line 3473 "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:3410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3489: \"$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:3434: checking for ANSI C header files" >&5
+echo "configure:3513: checking for ANSI C header files" >&5
cat > conftest.$ac_ext <<EOF
-#line 3437 "configure"
+#line 3516 "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:3445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3524: \"$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 3462 "configure"
+#line 3541 "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 3480 "configure"
+#line 3559 "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 3498 "configure"
+#line 3577 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3588: \"$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:3535: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3614: checking whether time.h and sys/time.h may both be included" >&5
cat > conftest.$ac_ext <<EOF
-#line 3538 "configure"
+#line 3617 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3626: \"$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:3571: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3650: checking for sys_siglist declaration in signal.h or unistd.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3574 "configure"
+#line 3653 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:3586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3665: \"$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:3611: checking for struct utimbuf" >&5
+echo "configure:3690: checking for struct utimbuf" >&5
cat > conftest.$ac_ext <<EOF
-#line 3613 "configure"
+#line 3692 "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:3632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3711: \"$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:3652: checking return type of signal handlers" >&5
+echo "configure:3731: checking return type of signal handlers" >&5
cat > conftest.$ac_ext <<EOF
-#line 3655 "configure"
+#line 3734 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3751: \"$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:3694: checking for size_t" >&5
+echo "configure:3773: checking for size_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3697 "configure"
+#line 3776 "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:3728: checking for pid_t" >&5
+echo "configure:3807: checking for pid_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3731 "configure"
+#line 3810 "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:3762: checking for uid_t in sys/types.h" >&5
+echo "configure:3841: checking for uid_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3765 "configure"
+#line 3844 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3801: checking for mode_t" >&5
+echo "configure:3880: checking for mode_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3804 "configure"
+#line 3883 "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:3835: checking for off_t" >&5
+echo "configure:3914: checking for off_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3838 "configure"
+#line 3917 "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:3869: checking for ssize_t" >&5
+echo "configure:3948: checking for ssize_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3872 "configure"
+#line 3951 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:3904: checking for socklen_t" >&5
+echo "configure:3983: checking for socklen_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3906 "configure"
+#line 3985 "configure"
#include "confdefs.h"
#include <sys/socket.h>
socklen_t x;
; return 0; }
EOF
-if { (eval echo configure:3915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 3924 "configure"
+#line 4003 "configure"
#include "confdefs.h"
#include <sys/socket.h>
int accept (int, struct sockaddr *, size_t *);
; return 0; }
EOF
-if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""size_t" 1>&6
rm -f conftest*
echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3965: checking for struct timeval" >&5
+echo "configure:4044: checking for struct timeval" >&5
cat > conftest.$ac_ext <<EOF
-#line 3967 "configure"
+#line 4046 "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:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4062: \"$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:4005: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:4084: checking whether struct tm is in sys/time.h or time.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4008 "configure"
+#line 4087 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:4016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4095: \"$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:4040: checking for tm_zone in struct tm" >&5
+echo "configure:4119: checking for tm_zone in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 4043 "configure"
+#line 4122 "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:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4130: \"$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:4074: checking for tzname" >&5
+echo "configure:4153: checking for tzname" >&5
cat > conftest.$ac_ext <<EOF
-#line 4077 "configure"
+#line 4156 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4166: \"$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:4113: checking for working const" >&5
+echo "configure:4192: checking for working const" >&5
cat > conftest.$ac_ext <<EOF
-#line 4116 "configure"
+#line 4195 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4244: \"$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:4190: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:4269: 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:4215: checking whether byte ordering is bigendian" >&5
+echo "configure:4294: 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 4220 "configure"
+#line 4299 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4310: \"$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 4235 "configure"
+#line 4314 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:4246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4325: \"$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 4263 "configure"
+#line 4342 "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:4276: \"$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_c_bigendian=no
else
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:4303: checking size of short" >&5
+echo "configure:4382: checking size of short" >&5
cat > conftest.$ac_ext <<EOF
-#line 4306 "configure"
+#line 4385 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4396: \"$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:4345: checking size of int" >&5
+echo "configure:4424: checking size of int" >&5
cat > conftest.$ac_ext <<EOF
-#line 4348 "configure"
+#line 4427 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4438: \"$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:4381: checking size of long" >&5
+echo "configure:4460: checking size of long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4384 "configure"
+#line 4463 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4474: \"$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:4417: checking size of long long" >&5
+echo "configure:4496: checking size of long long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4420 "configure"
+#line 4499 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4510: \"$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:4453: checking size of void *" >&5
+echo "configure:4532: checking size of void *" >&5
cat > conftest.$ac_ext <<EOF
-#line 4456 "configure"
+#line 4535 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4546: \"$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:4490: checking for long file names" >&5
+echo "configure:4569: 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:4536: checking for sin" >&5
+echo "configure:4615: checking for sin" >&5
cat > conftest.$ac_ext <<EOF
-#line 4539 "configure"
+#line 4618 "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:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4641: \"$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:4580: checking for sin in -lm" >&5
+echo "configure:4659: 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 4585 "configure"
+#line 4664 "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:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4675: \"$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 4640 "configure"
+#line 4719 "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:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4726: \"$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:4664: checking type of mail spool file locking" >&5
+echo "configure:4743: 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:4668: checking for $ac_func" >&5
+echo "configure:4747: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 4671 "configure"
+#line 4750 "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:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4773: \"$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:4776: checking for cma_open in -lpthreads" >&5
+echo "configure:4855: 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 4781 "configure"
+#line 4860 "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:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4871: \"$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:4828: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4907: 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:4840: checking for \"-z ignore\" linker flag" >&5
+echo "configure:4919: 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:4851: checking "for specified window system"" >&5
+echo "configure:4930: 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:4884: checking for X" >&5
+echo "configure:4963: 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 4944 "configure"
+#line 5023 "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:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5028: \"$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 5018 "configure"
+#line 5097 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5104: \"$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:5134: checking whether -R must be followed by a space" >&5
+echo "configure:5213: 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 5137 "configure"
+#line 5216 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5223: \"$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 5160 "configure"
+#line 5239 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
else
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:5203: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:5282: 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 5208 "configure"
+#line 5287 "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:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5298: \"$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:5243: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:5322: 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 5248 "configure"
+#line 5327 "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:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5338: \"$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:5288: checking for gethostbyname" >&5
+echo "configure:5367: checking for gethostbyname" >&5
cat > conftest.$ac_ext <<EOF
-#line 5291 "configure"
+#line 5370 "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:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5393: \"$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:5335: checking for gethostbyname in -lnsl" >&5
+echo "configure:5414: 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 5340 "configure"
+#line 5419 "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:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5430: \"$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:5381: checking for connect" >&5
+echo "configure:5460: checking for connect" >&5
cat > conftest.$ac_ext <<EOF
-#line 5384 "configure"
+#line 5463 "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:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5486: \"$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:5430: checking "$xe_msg_checking"" >&5
+echo "configure:5509: 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 5435 "configure"
+#line 5514 "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:5446: \"$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_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:5470: checking for remove" >&5
+echo "configure:5549: checking for remove" >&5
cat > conftest.$ac_ext <<EOF
-#line 5473 "configure"
+#line 5552 "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:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5575: \"$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:5517: checking for remove in -lposix" >&5
+echo "configure:5596: 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 5522 "configure"
+#line 5601 "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:5533: \"$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_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:5557: checking for shmat" >&5
+echo "configure:5636: checking for shmat" >&5
cat > conftest.$ac_ext <<EOF
-#line 5560 "configure"
+#line 5639 "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:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5662: \"$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:5604: checking for shmat in -lipc" >&5
+echo "configure:5683: 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 5609 "configure"
+#line 5688 "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:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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:5656: checking "$xe_msg_checking"" >&5
+echo "configure:5735: 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 5661 "configure"
+#line 5740 "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:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5751: \"$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
break; fi
done
- if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi
+ case "$opsys" in
+ decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
+ esac
ld_switch_x_site="$X_LIBS"
echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5841: checking for X defines extracted by xmkmf" >&5
+echo "configure:5922: 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:5888: checking for X11/Intrinsic.h" >&5
+echo "configure:5969: checking for X11/Intrinsic.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 5891 "configure"
+#line 5972 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5977: \"$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:5920: checking for XOpenDisplay in -lX11" >&5
+echo "configure:6001: 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 5925 "configure"
+#line 6006 "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:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6017: \"$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:5961: checking "$xe_msg_checking"" >&5
+echo "configure:6042: 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 5966 "configure"
+#line 6047 "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:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6058: \"$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:6004: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:6085: 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 6009 "configure"
+#line 6090 "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:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6101: \"$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:6043: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:6124: 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 6048 "configure"
+#line 6129 "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:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6140: \"$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:6082: checking the version of X11 being used" >&5
+echo "configure:6163: checking the version of X11 being used" >&5
cat > conftest.$ac_ext <<EOF
-#line 6084 "configure"
+#line 6165 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
EOF
-if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
./conftest foobar; x11_release=$?
else
}
+ if test "${x11_release}" = "4"; then
+ case "$with_widgets" in
+ "" | "no") with_widgets=no ;;
+ *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
+ esac
+ fi
+
for ac_func in XConvertCase
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6113: checking for $ac_func" >&5
+echo "configure:6201: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 6116 "configure"
+#line 6204 "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:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6227: \"$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:6171: checking for $ac_hdr" >&5
+echo "configure:6259: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 6174 "configure"
+#line 6262 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6267: \"$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:6210: checking for XFree86" >&5
+echo "configure:6298: 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:6230: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:6318: 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 6235 "configure"
+#line 6323 "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:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6334: \"$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:6285: checking for main in -lXbsd" >&5
+echo "configure:6373: 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 6290 "configure"
+#line 6378 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6385: \"$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:6334: checking for MS-Windows" >&5
+echo "configure:6422: checking for MS-Windows" >&5
echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:6337: checking for main in -lgdi32" >&5
+echo "configure:6425: 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 6342 "configure"
+#line 6430 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6437: \"$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 6415 "configure"
+#line 6503 "configure"
#include "confdefs.h"
#include <fcntl.h>
int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
EOF
-if { (eval echo configure:6420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6508: \"$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
done
fi
+if test "$with_x11" = "yes"; then
+ ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
+echo "configure:6572: checking for X11/extensions/shape.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6575 "configure"
+#include "confdefs.h"
+#include <X11/extensions/shape.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6580: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_BALLOON_HELP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_BALLOON_HELP 1
+EOF
+}
+
+ extra_objs="$extra_objs balloon_help.o balloon-x.o" && if test "$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"balloon_help.o balloon-x.o\""
+ fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
bitmapdir=
case "$window_system" in
esac
echo "checking for WM_COMMAND option" 1>&6
-echo "configure:6495: checking for WM_COMMAND option" >&5;
+echo "configure:6627: 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:6510: checking for X11/Xauth.h" >&5
+echo "configure:6642: checking for X11/Xauth.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6513 "configure"
+#line 6645 "configure"
#include "confdefs.h"
#include <X11/Xauth.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6650: \"$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:6541: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:6673: 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 6546 "configure"
+#line 6678 "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:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6689: \"$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:6602: checking for ${dir}tt_c.h" >&5
+echo "configure:6734: checking for ${dir}tt_c.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6605 "configure"
+#line 6737 "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:6610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6742: \"$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:6646: checking "$xe_msg_checking"" >&5
+echo "configure:6778: 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 6651 "configure"
+#line 6783 "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:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6794: \"$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:6719: checking for Dt/Dt.h" >&5
+echo "configure:6851: checking for Dt/Dt.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6722 "configure"
+#line 6854 "configure"
#include "confdefs.h"
#include <Dt/Dt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6859: \"$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:6750: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:6882: 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 6755 "configure"
+#line 6887 "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:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6898: \"$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:6835: checking if drag and drop API is needed" >&5
+echo "configure:6967: 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:6856: checking for LDAP" >&5
+echo "configure:6988: 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:6859: checking for ldap.h" >&5
+echo "configure:6991: checking for ldap.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6862 "configure"
+#line 6994 "configure"
#include "confdefs.h"
#include <ldap.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6999: \"$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:6890: checking for lber.h" >&5
+echo "configure:7022: checking for lber.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6893 "configure"
+#line 7025 "configure"
#include "confdefs.h"
#include <lber.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7030: \"$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:6922: checking for ldap_search in -lldap" >&5
+echo "configure:7054: 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 6927 "configure"
+#line 7059 "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:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7070: \"$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:6963: checking "$xe_msg_checking"" >&5
+echo "configure:7095: 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 6968 "configure"
+#line 7100 "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:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7111: \"$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:7004: checking "$xe_msg_checking"" >&5
+echo "configure:7136: 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 7009 "configure"
+#line 7141 "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:7020: \"$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_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:7045: checking "$xe_msg_checking"" >&5
+echo "configure:7177: 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 7050 "configure"
+#line 7182 "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:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7193: \"$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:7112: checking for $ac_func" >&5
+echo "configure:7244: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 7115 "configure"
+#line 7247 "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:7138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7270: \"$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
if test "$with_postgresql" != "no"; then
echo "checking for PostgreSQL" 1>&6
-echo "configure:7169: checking for PostgreSQL" >&5
+echo "configure:7301: checking for PostgreSQL" >&5
for header_dir in "" "pgsql/" "postgresql/"; do
ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
-echo "configure:7174: checking for ${header_dir}libpq-fe.h" >&5
+echo "configure:7306: checking for ${header_dir}libpq-fe.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7177 "configure"
+#line 7309 "configure"
#include "confdefs.h"
#include <${header_dir}libpq-fe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7314: \"$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 -n "$libpq_fe_h_file" && {
echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
-echo "configure:7206: 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 7211 "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:7222: \"$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
echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
-echo "configure:7255: checking for PQconnectStart in -lpq" >&5
+echo "configure:7387: 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 7260 "configure"
+#line 7392 "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:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7403: \"$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:7319: checking for graphics libraries" >&5
+echo "configure:7451: 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:7324: checking for Xpm - no older than 3.4f" >&5
+echo "configure:7456: checking for Xpm - no older than 3.4f" >&5
xe_check_libs=-lXpm
cat > conftest.$ac_ext <<EOF
-#line 7327 "configure"
+#line 7459 "configure"
#include "confdefs.h"
#define XPM_NUMBERS
#include <X11/xpm.h>
XpmIncludeVersion != XpmLibraryVersion() ? 1 :
XpmIncludeVersion < 30406 ? 2 : 0 ;}
EOF
-if { (eval echo configure:7336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7468: \"$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:7378: checking for \"FOR_MSW\" xpm" >&5
+echo "configure:7510: checking for \"FOR_MSW\" xpm" >&5
xe_check_libs=-lXpm
cat > conftest.$ac_ext <<EOF
-#line 7381 "configure"
+#line 7513 "configure"
#include "confdefs.h"
int main() {
XpmCreatePixmapFromData()
; return 0; }
EOF
-if { (eval echo configure:7388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7520: \"$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:7414: checking for compface.h" >&5
+echo "configure:7546: checking for compface.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7417 "configure"
+#line 7549 "configure"
#include "confdefs.h"
#include <compface.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7554: \"$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:7445: checking for UnGenFace in -lcompface" >&5
+echo "configure:7577: 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 7450 "configure"
+#line 7582 "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:7461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7593: \"$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:7513: checking for inflate in -lc" >&5
+echo "configure:7645: 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 7518 "configure"
+#line 7650 "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:7529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7661: \"$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:7548: checking for inflate in -lz" >&5
+echo "configure:7680: 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 7553 "configure"
+#line 7685 "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:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7696: \"$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:7583: checking for inflate in -lgz" >&5
+echo "configure:7715: 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 7588 "configure"
+#line 7720 "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:7599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7731: \"$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:7629: checking for jpeglib.h" >&5
+echo "configure:7761: checking for jpeglib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7632 "configure"
+#line 7764 "configure"
#include "confdefs.h"
#include <jpeglib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7769: \"$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:7660: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:7792: 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 7665 "configure"
+#line 7797 "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:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7808: \"$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:7712: checking for pow" >&5
+echo "configure:7844: checking for pow" >&5
cat > conftest.$ac_ext <<EOF
-#line 7715 "configure"
+#line 7847 "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:7738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7870: \"$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:7759: checking for png.h" >&5
+echo "configure:7891: checking for png.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7762 "configure"
+#line 7894 "configure"
#include "confdefs.h"
#include <png.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7899: \"$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:7790: checking for png_read_image in -lpng" >&5
+echo "configure:7922: 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 7795 "configure"
+#line 7927 "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:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7938: \"$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:7829: checking for workable png version information" >&5
+echo "configure:7961: checking for workable png version information" >&5
xe_check_libs="-lpng -lz"
cat > conftest.$ac_ext <<EOF
-#line 7832 "configure"
+#line 7964 "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:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7972: \"$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:7883: checking for tiffio.h" >&5
+echo "configure:8015: checking for tiffio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7886 "configure"
+#line 8018 "configure"
#include "confdefs.h"
#include <tiffio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8023: \"$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:7914: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:8046: 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 7919 "configure"
+#line 8051 "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:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8062: \"$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:7969: checking for X11 graphics libraries" >&5
+echo "configure:8101: checking for X11 graphics libraries" >&5
echo "checking for the Athena widgets" 1>&6
-echo "configure:7972: checking for the Athena widgets" >&5
+echo "configure:8104: 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:7986: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
+echo "configure:8118: 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 7991 "configure"
+#line 8123 "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:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8134: \"$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:8018: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8150: 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 8023 "configure"
+#line 8155 "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:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8166: \"$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:8065: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8197: 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 8070 "configure"
+#line 8202 "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:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8213: \"$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:8099: checking for threeDClassRec in -lXaw" >&5
+echo "configure:8231: 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 8104 "configure"
+#line 8236 "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:8115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8247: \"$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:8146: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8278: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8149 "configure"
+#line 8281 "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:8154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8286: \"$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:8174: checking for X11/Xaw/XawInit.h" >&5
+echo "configure:8306: checking for X11/Xaw/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8177 "configure"
+#line 8309 "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:8182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8314: \"$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:8208: checking for X11/$athena_variant/XawInit.h" >&5
+echo "configure:8340: checking for X11/$athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8211 "configure"
+#line 8343 "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:8216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8348: \"$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:8233: checking for X11/$athena_variant/ThreeD.h" >&5
+echo "configure:8365: checking for X11/$athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8236 "configure"
+#line 8368 "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:8241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8373: \"$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:8269: checking for $athena_variant/XawInit.h" >&5
+echo "configure:8401: checking for $athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8272 "configure"
+#line 8404 "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:8277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8409: \"$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:8294: checking for $athena_variant/ThreeD.h" >&5
+echo "configure:8426: checking for $athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8297 "configure"
+#line 8429 "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:8302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8434: \"$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:8331: checking for X11/Xaw3d/XawInit.h" >&5
+echo "configure:8463: checking for X11/Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8334 "configure"
+#line 8466 "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:8339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8471: \"$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:8356: checking for X11/Xaw3d/ThreeD.h" >&5
+echo "configure:8488: checking for X11/Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8359 "configure"
+#line 8491 "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:8364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8496: \"$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:8396: checking for Xaw3d/XawInit.h" >&5
+echo "configure:8528: checking for Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8399 "configure"
+#line 8531 "configure"
#include "confdefs.h"
#include <Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8536: \"$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:8421: checking for Xaw3d/ThreeD.h" >&5
+echo "configure:8553: checking for Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8424 "configure"
+#line 8556 "configure"
#include "confdefs.h"
#include <Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8561: \"$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:8461: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8593: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8464 "configure"
+#line 8596 "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:8469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8601: \"$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:8504: checking for Xm/Xm.h" >&5
+echo "configure:8636: checking for Xm/Xm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8507 "configure"
+#line 8639 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8644: \"$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:8529: checking for XmStringFree in -lXm" >&5
+echo "configure:8661: 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 8534 "configure"
+#line 8666 "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:8545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8677: \"$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:8574: checking for Lesstif" >&5
+echo "configure:8706: checking for Lesstif" >&5
cat > conftest.$ac_ext <<EOF
-#line 8576 "configure"
+#line 8708 "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:8982: checking for Mule-related features" >&5
+echo "configure:9114: 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:9007: checking for $ac_hdr" >&5
+echo "configure:9139: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 9010 "configure"
+#line 9142 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9147: \"$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:9046: checking for strerror in -lintl" >&5
+echo "configure:9178: 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 9051 "configure"
+#line 9183 "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:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9194: \"$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 Mule input methods" 1>&6
-echo "configure:9095: checking for Mule input methods" >&5
+echo "configure:9227: checking for Mule input methods" >&5
case "$with_xim" in "" | "yes" )
echo "checking for XIM" 1>&6
-echo "configure:9098: checking for XIM" >&5
+echo "configure:9230: checking for XIM" >&5
echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:9101: checking for XOpenIM in -lX11" >&5
+echo "configure:9233: 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 9106 "configure"
+#line 9238 "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:9117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9249: \"$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:9141: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:9273: 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 9146 "configure"
+#line 9278 "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:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9289: \"$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:9222: checking for XFontSet" >&5
+echo "configure:9354: checking for XFontSet" >&5
echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:9225: checking for XmbDrawString in -lX11" >&5
+echo "configure:9357: 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 9230 "configure"
+#line 9362 "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:9241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9373: \"$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:9281: checking for wnn/jllib.h" >&5
+echo "configure:9413: checking for wnn/jllib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9284 "configure"
+#line 9416 "configure"
#include "confdefs.h"
#include <wnn/jllib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9421: \"$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:9314: checking for $ac_func" >&5
+echo "configure:9446: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9317 "configure"
+#line 9449 "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:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9472: \"$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:9369: checking for crypt in -lcrypt" >&5
+echo "configure:9501: 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 9374 "configure"
+#line 9506 "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:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9517: \"$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:9420: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:9552: 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 9425 "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:9436: \"$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 -lwnn4""... $ac_c" 1>&6
-echo "configure:9454: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:9586: 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 9459 "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:9470: \"$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 jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
-echo "configure:9488: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:9620: 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 9493 "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
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:9504: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
-echo "configure:9522: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:9654: 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 9527 "configure"
+#line 9659 "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:9538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9670: \"$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:9586: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:9718: 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 9591 "configure"
+#line 9723 "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:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9734: \"$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:9637: checking for canna/jrkanji.h" >&5
+echo "configure:9769: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9640 "configure"
+#line 9772 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
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:9672: checking for canna/jrkanji.h" >&5
+echo "configure:9804: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9675 "configure"
+#line 9807 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9812: \"$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:9708: checking for canna/RK.h" >&5
+echo "configure:9840: checking for canna/RK.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9711 "configure"
+#line 9843 "configure"
#include "confdefs.h"
#include <canna/RK.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9848: \"$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:9739: checking for RkBgnBun in -lRKC" >&5
+echo "configure:9871: 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 9744 "configure"
+#line 9876 "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:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9887: \"$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:9778: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:9910: 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 9783 "configure"
+#line 9915 "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:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9926: \"$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:9843: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:9975: 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 9848 "configure"
+#line 9980 "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:9859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9991: \"$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
-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
+for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9945: checking for $ac_func" >&5
+echo "configure:10077: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9948 "configure"
+#line 10080 "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:9971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10103: \"$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
+for ac_func in getpt _getpt grantpt unlockpt ptsname killpg tcgetpgrp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10134: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10137 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); 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 $ac_func();
+
+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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10160: \"$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 "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking for openpty""... $ac_c" 1>&6
+echo "configure:10189: checking for openpty" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10192 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char openpty(); 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 openpty();
+
+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_openpty) || defined (__stub___openpty)
+choke me
+#else
+openpty();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_openpty=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_openpty=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ have_openpty=yes
+else
+ echo "$ac_t""no" 1>&6
+
+
+echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
+echo "configure:10234: checking for openpty in -lutil" >&5
+ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lutil "
+cat > conftest.$ac_ext <<EOF
+#line 10239 "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
+ builtin and then its argument prototype would still apply. */
+char openpty();
+
+int main() {
+openpty()
+; return 0; }
+EOF
+if { (eval echo configure:10250: \"$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 "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ have_openpty=yes need_libutil=yes
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+if test "$have_openpty" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_OPENPTY
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_OPENPTY 1
+EOF
+}
+
+ for ac_hdr in pty.h libutil.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10285: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10288 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10293: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lutil\" to \$libs_system"; fi
+fi
+
+for ac_hdr in sys/stropts.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10329: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10332 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10337: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+if test "$ac_cv_header_sys_stropts_h" = "yes"; then
+ for ac_func in isastream
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10370: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10373 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); 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 $ac_func();
+
+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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10396: \"$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 "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_hdr in sys/strtio.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10427: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10430 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10435: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+ fi
+
extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"realpath.o\""
fi
for ac_func in getloadavg
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10006: checking for $ac_func" >&5
+echo "configure:10472: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10009 "configure"
+#line 10475 "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:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10498: \"$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
-if test "$ac_cv_func_getloadavg" != "yes"
-then
- extra_objs="$extra_objs getloadavg.o" && if test "$extra_verbose" = "yes"; then
+if test "$ac_cv_func_getloadavg" = "yes"; then
+ for ac_hdr in sys/loadavg.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10531: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10534 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10539: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+else
+ extra_objs="$extra_objs getloadavg.o" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"getloadavg.o\""
fi
echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:10068: checking for kstat_open in -lkstat" >&5
+echo "configure:10575: 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 10073 "configure"
+#line 10580 "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:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10591: \"$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
+ for ac_hdr in kstat.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10626: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10629 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10634: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:10118: checking for kvm_read in -lkvm" >&5
+echo "configure:10666: 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 10123 "configure"
+#line 10671 "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:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10682: \"$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:10168: checking whether netdb declares h_errno" >&5
+echo "configure:10716: checking whether netdb declares h_errno" >&5
cat > conftest.$ac_ext <<EOF
-#line 10170 "configure"
+#line 10718 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
return h_errno;
; return 0; }
EOF
-if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10725: \"$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:10197: checking for sigsetjmp" >&5
+echo "configure:10745: checking for sigsetjmp" >&5
cat > conftest.$ac_ext <<EOF
-#line 10199 "configure"
+#line 10747 "configure"
#include "confdefs.h"
#include <setjmp.h>
int main() {
sigjmp_buf bar; sigsetjmp (bar, 0);
; return 0; }
EOF
-if { (eval echo configure:10206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10754: \"$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:10226: checking whether localtime caches TZ" >&5
+echo "configure:10774: checking whether localtime caches TZ" >&5
if test "$ac_cv_func_tzset" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 10230 "configure"
+#line 10778 "configure"
#include "confdefs.h"
#include <time.h>
#if STDC_HEADERS
exit (0);
}
EOF
-if { (eval echo configure:10265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10813: \"$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:10295: checking whether gettimeofday accepts one or two arguments" >&5
+echo "configure:10843: checking whether gettimeofday accepts one or two arguments" >&5
cat > conftest.$ac_ext <<EOF
-#line 10297 "configure"
+#line 10845 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
; return 0; }
EOF
-if { (eval echo configure:10318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10866: \"$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:10340: checking for inline" >&5
+echo "configure:10888: checking for inline" >&5
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 10345 "configure"
+#line 10893 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:10352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10900: \"$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:10392: checking for working alloca.h" >&5
+echo "configure:10940: checking for working alloca.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10395 "configure"
+#line 10943 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10950: \"$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:10426: checking for alloca" >&5
+echo "configure:10974: checking for alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 10429 "configure"
+#line 10977 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11005: \"$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:10496: checking whether alloca needs Cray hooks" >&5
+echo "configure:11044: checking whether alloca needs Cray hooks" >&5
cat > conftest.$ac_ext <<EOF
-#line 10499 "configure"
+#line 11047 "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:10523: checking for $ac_func" >&5
+echo "configure:11071: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10526 "configure"
+#line 11074 "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:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11097: \"$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:10579: checking stack direction for C alloca" >&5
+echo "configure:11127: checking stack direction for C alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 10582 "configure"
+#line 11130 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:10601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11149: \"$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:10630: checking for vfork.h" >&5
+echo "configure:11178: checking for vfork.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10633 "configure"
+#line 11181 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11186: \"$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:10666: checking for working vfork" >&5
+echo "configure:11214: checking for working vfork" >&5
cat > conftest.$ac_ext <<EOF
-#line 10669 "configure"
+#line 11217 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
}
}
EOF
-if { (eval echo configure:10764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11312: \"$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:10790: checking for working strcoll" >&5
+echo "configure:11338: checking for working strcoll" >&5
cat > conftest.$ac_ext <<EOF
-#line 10793 "configure"
+#line 11341 "configure"
#include "confdefs.h"
#include <string.h>
main ()
strcoll ("123", "456") >= 0);
}
EOF
-if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11351: \"$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:10831: checking for $ac_func" >&5
+echo "configure:11379: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10834 "configure"
+#line 11382 "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:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11405: \"$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:10885: checking whether getpgrp takes no argument" >&5
+echo "configure:11433: checking whether getpgrp takes no argument" >&5
cat > conftest.$ac_ext <<EOF
-#line 10888 "configure"
+#line 11436 "configure"
#include "confdefs.h"
/*
}
EOF
-if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11491: \"$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:10970: checking for working mmap" >&5
+echo "configure:11518: checking for working mmap" >&5
case "$opsys" in ultrix* ) have_mmap=no ;; *)
cat > conftest.$ac_ext <<EOF
-#line 10973 "configure"
+#line 11521 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <unistd.h>
return 1;
}
EOF
-if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11554: \"$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:11032: checking for M_MMAP_THRESHOLD" >&5
+echo "configure:11580: checking for M_MMAP_THRESHOLD" >&5
cat > conftest.$ac_ext <<EOF
-#line 11034 "configure"
+#line 11582 "configure"
#include "confdefs.h"
#include <malloc.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:11046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11594: \"$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:11071: checking for termios.h" >&5
+echo "configure:11619: checking for termios.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11074 "configure"
+#line 11622 "configure"
#include "confdefs.h"
#include <termios.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11627: \"$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:11122: checking for termio.h" >&5
+echo "configure:11670: checking for termio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11125 "configure"
+#line 11673 "configure"
#include "confdefs.h"
#include <termio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11678: \"$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:11162: checking for socket" >&5
+echo "configure:11710: checking for socket" >&5
cat > conftest.$ac_ext <<EOF
-#line 11165 "configure"
+#line 11713 "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:11188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11736: \"$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:11203: checking for netinet/in.h" >&5
+echo "configure:11751: checking for netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11206 "configure"
+#line 11754 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11759: \"$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:11228: checking for arpa/inet.h" >&5
+echo "configure:11776: checking for arpa/inet.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11231 "configure"
+#line 11779 "configure"
#include "confdefs.h"
#include <arpa/inet.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11784: \"$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:11261: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:11809: checking "for sun_len member in struct sockaddr_un"" >&5
cat > conftest.$ac_ext <<EOF
-#line 11263 "configure"
+#line 11811 "configure"
#include "confdefs.h"
#include <sys/types.h>
static struct sockaddr_un x; x.sun_len = 1;
; return 0; }
EOF
-if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11822: \"$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:11292: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:11840: checking "for ip_mreq struct in netinet/in.h"" >&5
cat > conftest.$ac_ext <<EOF
-#line 11294 "configure"
+#line 11842 "configure"
#include "confdefs.h"
#include <sys/types.h>
static struct ip_mreq x;
; return 0; }
EOF
-if { (eval echo configure:11304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11852: \"$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:11335: checking for msgget" >&5
+echo "configure:11883: checking for msgget" >&5
cat > conftest.$ac_ext <<EOF
-#line 11338 "configure"
+#line 11886 "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:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11909: \"$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:11376: checking for sys/ipc.h" >&5
+echo "configure:11924: checking for sys/ipc.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11379 "configure"
+#line 11927 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11932: \"$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:11401: checking for sys/msg.h" >&5
+echo "configure:11949: checking for sys/msg.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11404 "configure"
+#line 11952 "configure"
#include "confdefs.h"
#include <sys/msg.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11957: \"$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:11447: checking for dirent.h" >&5
+echo "configure:11995: checking for dirent.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11450 "configure"
+#line 11998 "configure"
#include "confdefs.h"
#include <dirent.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12003: \"$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:11482: checking for sys/dir.h" >&5
+echo "configure:12030: checking for sys/dir.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11485 "configure"
+#line 12033 "configure"
#include "confdefs.h"
#include <sys/dir.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12038: \"$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:11523: checking for nlist.h" >&5
+echo "configure:12071: checking for nlist.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11526 "configure"
+#line 12074 "configure"
#include "confdefs.h"
#include <nlist.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12079: \"$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:11561: checking "for sound support"" >&5
+echo "configure:12109: 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:11568: checking for multimedia/audio_device.h" >&5
+echo "configure:12116: checking for multimedia/audio_device.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11571 "configure"
+#line 12119 "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:11576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12124: \"$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:11624: checking for ALopenport in -laudio" >&5
+echo "configure:12172: 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 11629 "configure"
+#line 12177 "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:11640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12188: \"$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:11671: checking for AOpenAudio in -lAlib" >&5
+echo "configure:12219: 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 11676 "configure"
+#line 12224 "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:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12235: \"$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:11725: checking for ${dir}/soundcard.h" >&5
+echo "configure:12273: checking for ${dir}/soundcard.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11728 "configure"
+#line 12276 "configure"
#include "confdefs.h"
#include <${dir}/soundcard.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12281: \"$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:11794: checking for audio/audiolib.h" >&5
+echo "configure:12342: checking for audio/audiolib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11797 "configure"
+#line 12345 "configure"
#include "confdefs.h"
#include <audio/audiolib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12350: \"$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:11820: checking for AuOpenServer in -laudio" >&5
+echo "configure:12368: 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 11825 "configure"
+#line 12373 "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:11836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12384: \"$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 11875 "configure"
+#line 12423 "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:11906: checking for $ac_word" >&5
+echo "configure:12454: 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:11935: checking for esd_play_stream" >&5
+echo "configure:12483: checking for esd_play_stream" >&5
cat > conftest.$ac_ext <<EOF
-#line 11938 "configure"
+#line 12486 "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:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12509: \"$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:12012: checking for TTY-related features" >&5
+echo "configure:12560: 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:12028: checking for tgetent in -lncurses" >&5
+echo "configure:12576: 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 12033 "configure"
+#line 12581 "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:12044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12592: \"$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:12077: checking for ncurses/curses.h" >&5
+echo "configure:12625: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12080 "configure"
+#line 12628 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12633: \"$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:12107: checking for ncurses/term.h" >&5
+echo "configure:12655: checking for ncurses/term.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12110 "configure"
+#line 12658 "configure"
#include "confdefs.h"
#include <ncurses/term.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12663: \"$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:12145: checking for ncurses/curses.h" >&5
+echo "configure:12693: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12148 "configure"
+#line 12696 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12701: \"$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:12188: checking for tgetent in -l$lib" >&5
+echo "configure:12736: 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 12193 "configure"
+#line 12741 "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:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12752: \"$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:12235: checking for tgetent in -lcurses" >&5
+echo "configure:12783: 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 12240 "configure"
+#line 12788 "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:12251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12799: \"$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:12269: checking for tgetent in -ltermcap" >&5
+echo "configure:12817: 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 12274 "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
tgetent()
; return 0; }
EOF
-if { (eval echo configure:12285: \"$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
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:12333: checking for gpm.h" >&5
+echo "configure:12881: checking for gpm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12336 "configure"
+#line 12884 "configure"
#include "confdefs.h"
#include <gpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12889: \"$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:12364: checking for Gpm_Open in -lgpm" >&5
+echo "configure:12912: 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 12369 "configure"
+#line 12917 "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:12380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12928: \"$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:12430: checking for database support" >&5
+echo "configure:12978: 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:12435: checking for ndbm.h" >&5
+echo "configure:12983: checking for ndbm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12438 "configure"
+#line 12986 "configure"
#include "confdefs.h"
#include <ndbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12991: \"$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:12473: checking for dbm_open in -lgdbm" >&5
+echo "configure:13021: 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 12478 "configure"
+#line 13026 "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:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13037: \"$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:12517: checking for dbm_open" >&5
+echo "configure:13065: checking for dbm_open" >&5
cat > conftest.$ac_ext <<EOF
-#line 12520 "configure"
+#line 13068 "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:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13091: \"$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:12562: checking for dbm_open in -ldbm" >&5
+echo "configure:13110: 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 12567 "configure"
+#line 13115 "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:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13126: \"$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:12619: checking for Berkeley db.h" >&5
+echo "configure:13167: checking for Berkeley db.h" >&5
for header in "db/db.h" "db.h"; do
cat > conftest.$ac_ext <<EOF
-#line 12622 "configure"
+#line 13170 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:12644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13192: \"$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:12660: checking for Berkeley DB version" >&5
+echo "configure:13208: checking for Berkeley DB version" >&5
cat > conftest.$ac_ext <<EOF
-#line 12662 "configure"
+#line 13210 "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:12681: checking for $dbfunc" >&5
+echo "configure:13229: checking for $dbfunc" >&5
cat > conftest.$ac_ext <<EOF
-#line 12684 "configure"
+#line 13232 "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:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13255: \"$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:12726: checking for $dbfunc in -ldb" >&5
+echo "configure:13274: 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 12731 "configure"
+#line 13279 "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:12742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13290: \"$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:12806: checking for SOCKSinit in -lsocks" >&5
+echo "configure:13354: 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 12811 "configure"
+#line 13359 "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:12822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13370: \"$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:12877: checking for module support" >&5
+echo "configure:13425: checking for module support" >&5
if test "$with_msw" = "yes"; then
have_dl=yes;
else
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:12884: checking for dlfcn.h" >&5
+echo "configure:13432: checking for dlfcn.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12887 "configure"
+#line 13435 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13440: \"$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:12910: checking for dlopen in -ldl" >&5
+echo "configure:13458: 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 12915 "configure"
+#line 13463 "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:12926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13474: \"$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:12945: checking for dlopen in -lc" >&5
+echo "configure:13493: 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 12950 "configure"
+#line 13498 "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:12961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13509: \"$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:13000: checking for shl_load in -ldld" >&5
+echo "configure:13548: 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 13005 "configure"
+#line 13553 "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:13016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13564: \"$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:13043: checking for dld_init in -ldld" >&5
+echo "configure:13591: 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 13048 "configure"
+#line 13596 "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:13059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13607: \"$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:13104: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:13652: 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:13132: checking checking whether we are using GNU C" >&5
+echo "configure:13680: checking checking whether we are using GNU C" >&5
cat > conftest.$ac_ext <<EOF
-#line 13134 "configure"
+#line 13682 "configure"
#include "confdefs.h"
#ifdef __GNUC__
fi
echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:13156: checking how to produce PIC code" >&5
+echo "configure:13704: checking how to produce PIC code" >&5
wl=
can_build_shared=yes
if test -n "$dll_cflags"; then
echo "$ac_t""${dll_cflags}" 1>&6
-
+
# 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:13252: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:13800: checking if PIC flag ${dll_cflags} really works" >&5
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $dll_cflags -DPIC"
cat > conftest.$ac_ext <<EOF
-#line 13256 "configure"
+#line 13804 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:13263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13811: \"$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:13294: checking if C compiler can produce shared libraries" >&5
+echo "configure:13842: 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 13345 "configure"
+#line 13893 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:13352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13900: \"$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:13377: checking for ld used by GCC" >&5
+echo "configure:13925: 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:13402: checking for GNU ld" >&5
+echo "configure:13950: 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:13440: checking if the linker is GNU ld" >&5
+echo "configure:13988: 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:13468: checking whether the linker supports shared libraries" >&5
+echo "configure:14016: 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:13683: checking for $ac_func" >&5
+echo "configure:14231: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 13686 "configure"
+#line 14234 "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:13709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14257: \"$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 13748 "configure"
+#line 14296 "configure"
#include "confdefs.h"
int main(int c,char *v[]){return 0;}
EOF
-if { (eval echo configure:13752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:14300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
EOF
}
-{ test "$extra_verbose" = "yes" && cat << EOF
- Defining config_machfile = "$machfile"
-EOF
-cat >> confdefs.h <<EOF
-#define config_machfile "$machfile"
-EOF
-}
-
-{ test "$extra_verbose" = "yes" && cat << EOF
- Defining config_opsysfile = "$opsysfile"
-EOF
-cat >> confdefs.h <<EOF
-#define config_opsysfile "$opsysfile"
-EOF
-}
-
null_string=""
if test -n "$runpath"; then
echo " Runtime library search path: $runpath"
fi
-echo " Operating system description file: \`$opsysfile'"
-echo " Machine description file: \`$machfile'"
+
+if test -n "$opsysfile"
+then echo " Operating system description file: \`$opsysfile'"
+else echo " Not using any operating system description file"
+fi
+if test -n "$machfile"
+then echo " Machine description file: \`$machfile'"
+else echo " Not using any machine description file"
+fi
+
echo " Compiler: $CC $CFLAGS"
echo " Relocating allocator for buffers: $rel_alloc"
echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
| sed -e 's/^\#.*//' \
-e 's/^[ ][ ]*$//'\
-e 's/^ / /' \
- | sed -n -e '/^..*$/p' \
- | sed '/^\"/ {
+ -e '/^[ \f]*$/d' \
+ -e '/^\"/ {
s/\\\([\"]\)/\1/g
s/^[ ]*\"//
s/\"[ ]*$//
| sed -e 's/^\#.*//' \
-e 's/^[ ][ ]*$//'\
-e 's/^ / /' \
- | sed -n -e '/^..*$/p' \
- | sed '/^\"/ {
+ -e '/^[ \f]*$/d' \
+ -e '/^\"/ {
s/\\\([\"]\)/\1/g
s/^[ ]*\"//
s/\"[ ]*$//
done
;;
- dnl Has the user specified a prefered Athena widget set?
+ dnl Has the user specified a preferred Athena widget set?
dnl This bit expands any alias names out for us...
"with_athena" )
case "$val" in
clipper-* ) machine=clipper ;;
arm* ) machine=arm ;;
ns32k-* ) machine=ns32000 ;;
- s390-* ) machine=s390 ;;
esac
dnl Straightforward OS determination
esac
-if test -z "$machine" -o -z "$opsys"; then
- (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
- echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
- ) >&2
- exit 1
+dnl Initialize machine and opsys from $canonical if not in our database above.
+test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
+test -z "$opsys" && opsys=`echo $canonical | sed 's/^[^-]*-[^-]*-//'`
+
+dnl Use configure-time autodetection if s&m not available
+if test -r "${srcdir}/src/m/${machine}.h"; then
+ machfile="m/${machine}.h"
+ AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
+else
+ echo "XEmacs has no builtin knowledge of \`$machine' machines."
+ echo "Using configure-time autodetection only."
+fi
+
+if test -r "${srcdir}/src/s/${opsys}.h"; then
+ opsysfile="s/${opsys}.h"
+ AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
+else
+ echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
+ echo "Using configure-time autodetection only."
fi
+
if test -z "$dynamic"; then
case "$opsys" in
hpux* | sunos4* ) dynamic=no ;;
stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher)
-machfile="m/${machine}.h"
-opsysfile="s/${opsys}.h"
-
dnl --------------------------------------------------
dnl Determine the compiler, set up for feature testing
dnl --------------------------------------------------
return 11;
#elif defined __DECC
return 12;
+#elif defined __USLC__ && defined __SCO_VERSION__
+return 13;
#else
return 0;
#endif
[case "$conftest_rc" in
11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
+ 13) echo "You appear to be using the SCO C compiler." ; __USLC__=yes ;;
esac])
[#]endif
])dnl CPP_boolean_to_sh
-cat > $tempcname <<EOF
+cat > $tempcname < confdefs.h
+cat >> $tempcname <<EOF
#define NOT_C_CODE
#define C_SWITCH_SITE
#define C_SWITCH_X_SITE
#define LD_SWITCH_X_SITE
#define LD_SWITCH_X_SITE_AUX
#define OS_RELEASE $os_release
+
+#ifdef config_opsysfile
#include "$srcdir/src/$opsysfile"
+#endif
+
+#ifdef config_machfile
#include "$srcdir/src/$machfile"
+#endif
CPP_to_sh(LIBS_MACHINE, libs_machine)
CPP_to_sh(LIBS_SYSTEM, libs_system)
dnl Non-ordinary link usually requires -lc
test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
+dnl -----------------------
dnl Compiler-specific hacks
+dnl -----------------------
+
dnl DEC C `-std1' means ANSI C mode
test "$__DECC" = "yes" && XE_APPEND(-std1, c_switch_site)
+dnl Some versions of SCO native compiler need -Kalloca
+if test "$__USLC__" = yes; then
+ AC_MSG_CHECKING(for whether the -Kalloca compiler flag is needed)
+ need_kalloca=no
+ AC_TRY_LINK([], [void *x = alloca(4);], [:], [
+ xe_save_c_switch_system="$c_switch_system"
+ c_switch_system="$c_switch_system -Kalloca"
+ AC_TRY_LINK([], [void *x = alloca(4);], [ need_kalloca=yes ])
+ c_switch_system="$xe_save_c_switch_system"])
+ AC_MSG_RESULT($need_kalloca)
+ test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system)
+fi
+
dnl Calculalate value of CFLAGS:
dnl Use either command line flag, environment var, or autodetection
if test "$cflags_specified" = "no"; then
case "$CFLAGS" in
*-fno-schedule-insns*) ;;
*)
- AC_MSG_RESULT(Yes)
+ AC_MSG_RESULT(yes)
AC_MSG_WARN(Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures)
AC_MSG_WARN(without also using -fno-schedule-insns.)
AC_MSG_ERROR(Aborting due to known problem)
dnl egcs-2.91.57 (egcs-1.1 release)
dnl egcs-2.91.66 (egcs-1.1.2 release)
Linux:alpha:egcs-2.91.*)
- AC_MSG_RESULT(Yes)
+ AC_MSG_RESULT(yes)
AC_MSG_WARN(There have been reports of egcs-1.1 not compiling XEmacs correctly on)
AC_MSG_WARN(Alpha Linux. There have also been reports that egcs-1.0.3a is O.K.)
AC_MSG_ERROR(Aborting due to known problem)
case "$CFLAGS" in
*-fno-strength-reduce*) ;;
*)
- AC_MSG_RESULT(Yes)
+ AC_MSG_RESULT(yes)
AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
AC_MSG_WARN(-fno-strength-reduce.)
AC_MSG_ERROR(Aborting due to known problem)
case "$CFLAGS" in
*-fno-caller-saves*) ;;
*)
- AC_MSG_RESULT(Yes)
+ AC_MSG_RESULT(yes)
AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
AC_MSG_WARN(-fno-caller-saves.)
AC_MSG_ERROR(Aborting due to known problem)
esac
;;
esac
+AC_MSG_RESULT(no)
fi
-AC_MSG_RESULT(No)
dnl Inform compiler that certain flags are meant for the linker
dnl XE_PROTECT_LINKER_FLAGS(shell_var)
mach/mach.h dnl
sys/param.h dnl
sys/pstat.h dnl
- sys/stropts.h dnl
sys/time.h dnl
sys/timeb.h dnl
sys/un.h dnl
- kstat.h dnl
ulimit.h dnl
unistd.h dnl
utime.h dnl
done
dnl Avoid version mismatch for shared library libXm.so on osf4
- if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi
+ case "$opsys" in
+ decosf*) if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi ;;
+ esac
ld_switch_x_site="$X_LIBS"
AC_MSG_RESULT(R${x11_release})
AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
+ if test "${x11_release}" = "4"; then
+ case "$with_widgets" in
+ "" | "no") with_widgets=no ;;
+ *) XE_DIE("Widget support requires X11R5 or greater") ;;
+ esac
+ fi
+
AC_CHECK_FUNCS(XConvertCase)
AC_CHECK_HEADERS(X11/Xlocale.h)
done
fi
+dnl Balloon Help requires the Shape extension, not available everywhere,
+dnl for example not on AIX 4.3.
+if test "$with_x11" = "yes"; then
+ AC_CHECK_HEADER(X11/extensions/shape.h, [
+ AC_DEFINE(HAVE_BALLOON_HELP)
+ XE_ADD_OBJS(balloon_help.o balloon-x.o)])
+fi
+
dnl FSF 19.29 has some bitmapdir stuff here.
bitmapdir=
XE_COMPUTE_RUNPATH()
fi
-AC_CHECK_FUNCS(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)
+AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask)
+
+dnl Check for PTY support functions.
+dnl getpt is the preferred pty allocation method on glibc systems.
+dnl _getpt is the preferred pty allocation method on SGI systems.
+dnl grantpt, unlockpt, ptsname are defined by Unix98.
+AC_CHECK_FUNCS(getpt _getpt grantpt unlockpt ptsname killpg tcgetpgrp)
+
+dnl openpty is the preferred pty allocation method on BSD and Tru64 systems.
+dnl openpty might be declared in pty.h or in libutil.h.
+AC_CHECK_FUNC(openpty, have_openpty=yes, [
+ AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)])
+if test "$have_openpty" = "yes"; then
+ AC_DEFINE(HAVE_OPENPTY)
+ AC_CHECK_HEADERS(pty.h libutil.h)
+ test "$need_libutil" = "yes" && XE_APPEND(-lutil, libs_system)
+fi
+
+dnl Check for STREAM support functions.
+dnl Confusingly, "str" means both "string" and "SysV Streams".
+AC_CHECK_HEADERS(sys/stropts.h)
+if test "$ac_cv_header_sys_stropts_h" = "yes"; then
+ AC_CHECK_FUNCS(isastream)
+ AC_CHECK_HEADERS(sys/strtio.h) dnl TIOCSIGNAL
+fi
dnl Use our own realpath always.
XE_ADD_OBJS(realpath.o)
-dnl Check whether the system provides getloadavg (Solaris 7 has it)
+dnl Check whether the system provides getloadavg().
AC_CHECK_FUNCS(getloadavg)
-if test "$ac_cv_func_getloadavg" != "yes"
-then
+if test "$ac_cv_func_getloadavg" = "yes"; then
+ dnl Solaris 8 declares getloadavg() in <sys/loadavg.h>.
+ dnl glibc 2.2 declares getloadavg() in <stdlib.h>...
+ dnl ...if we #define _GNU_SOURCE, which we do.
+ AC_CHECK_HEADERS(sys/loadavg.h)
+else
+ dnl We define our own getloadavg() using lower level functions.
XE_ADD_OBJS(getloadavg.o)
dnl Used by getloadavg() - does not require root priveleges
AC_CHECK_LIB(kstat, kstat_open)
+ AC_CHECK_HEADERS(kstat.h)
dnl Another way to get the load average
AC_CHECK_LIB(kvm, kvm_read)
XE_SPACE(ac_configure_args, $ac_configure_args)
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$configuration")
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
-AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
-AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
dnl Following are deprecated
if test -n "$runpath"; then
echo " Runtime library search path: $runpath"
fi
-echo " Operating system description file: \`$opsysfile'"
-echo " Machine description file: \`$machfile'"
+
+if test -n "$opsysfile"
+then echo " Operating system description file: \`$opsysfile'"
+else echo " Not using any operating system description file"
+fi
+if test -n "$machfile"
+then echo " Machine description file: \`$machfile'"
+else echo " Not using any machine description file"
+fi
+
echo " Compiler: $CC $CFLAGS"
echo " Relocating allocator for buffers: $rel_alloc"
echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
-e 's/^[ TAB][ TAB]*$//'\
-e 's/^ /TAB/' \
dnl Delete blank lines
- | sed -n -e '/^..*$/p' \
+ -e '/^[ \f]*$/d' \
dnl Restore lines quoted above to original contents.
- | sed '/^\"/ {
+ -e '/^\"/ {
s/\\\([\"]\)/\1/g
s/^[ TAB]*\"//
s/\"[ TAB]*$//
--with-debug-malloc Use the debugging malloc package.
--with-clash-detection Use lock files to detect multiple edits of the same
file. The default is to do clash detection.
---lockdir=DIR The directory to put clash detection files in, such as
- `/var/lock/emacs'.
- Defaults to `${statedir}/xemacs/lock'.
You may also specify any of the `path' variables found in Makefile.in,
including --bindir, --libdir, --docdir, --lispdir, --sitelispdir,
* Note. under this mechanism, any data item that undergoes
* relocation and is then further modified during the execution of
* the image before dynodump(3x) is called will lose the
- * modification that occured during the applications execution.
+ * modification that occurred during the applications execution.
*
* N.B. The above commentary is not quite correct in the flags have been hardwired
* to RTLD_SAVREL.
*/
-#pragma ident "@(#) $Id: dynodump.c,v 1.6 1998/03/31 20:10:55 steve Exp $ - SMI"
+#pragma ident "@(#) $Id: dynodump.c,v 1.6.2.2 2000/09/20 02:39:17 martinb Exp $ - SMI"
#define __EXTENSIONS__ 1
* If we had a .heap section, then its size is part of the program
* headers notion of data size. Because we're only going to output one
* heap section (ignoring the one in the running binary) we need to
- * subract the size of that which we're ignoring.
+ * subtract the size of that which we're ignoring.
*/
if (heap_cache) {
edata = S_ROUND((data_phdr->p_vaddr
tibetan-1-column:241:2:94:4:1:0:56:0:Tibetan 1 column glyph
tibetan:252:2:94:4:2:0:55:0:Tibetan characters
lao:167:1:94:3:1:0:49:0:Lao characters (ISO10646 0E80..0EDF)
-indian-1-column:240:2:94:4:1:0:54:0:Indian charset for 2-column width glypps
+indian-1-column:240:2:94:4:1:0:54:0:Indian charset for 2-column width glyphs
indian-2-column:251:2:94:4:2:0:53:0:Indian charset for 2-column width glyphs
indian-is13194:225:1:94:3:2:0:53:1:Generic Indian charset for data exchange with IS 13194
ascii-right-to-left:166:1:94:3:1:1:66:0:ASCII (left half of ISO8859-1) with right-to-left direction
!
! See the NEWS file (C-h n) or XEmacs manual (C-h i) for a description of
! the various resources and the syntax for setting them.
-!
-! Energize users: note that this is not the same app-defaults file that is
-! used with the Energize-specific version of XEmacs.
! Colors and backgrounds.
! Note that the menubar resources do not use the `face' syntax, since they
! are X toolkit widgets and thus outside the domain of XEmacs proper.
!
+! When X Font Sets are enabled with ./configure --with-xfs (eg, for
+! multilingual menubars and XIM), some .font resources (those specific to
+! the Lucid widget set) are ignored in favor of .fontSet resources. This
+! example shows how to add fonts for Japanese menubars:
+!
+! *menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
+! -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
+!
*menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
*popup*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
per X.
The only thing selection doesn't do is set the clipboard automatically
-as this would break the MS-Windows model. If you want this behaviour
-then set `selection-sets-clipboard' to t
+as this would break the MS-Windows model. If you want this behavior
+then set `selection-sets-clipboard' to t.
** Mail spool locking now works correctly.
XEmacs has always come with a little auxiliary program, movemail,
** Pixel-based scrolling has been implemented.
By default this will attempt to scroll in increments equal to the
height of the default face. Set `window-pixel-scroll-increment' to
-modify this behaviour.
+modify this behavior.
** Operation progress can be displayed using graphical widgets.
See `lprogress-display' for details. This support has been switched
on by default for font-lock and some web browsing functions. If you
-do not like this behaviour set `progress-display-use-echo-area'.
+do not like this behavior set `progress-feedback-use-echo-area'.
** The PostgreSQL Relational Database Management System is now supported.
It is now possible to build XEmacs so that the programming interface
for most packages (and some core Lisp files) to use correctly. Also,
the `init-file-user' variable has been obsoleted in the process.
-The user-visible options like `-u' have not changed their behaviour.
+The user-visible options like `-u' have not changed their behavior.
** XEmacs finally has an automated test suite!
Although this is not yet very sophisticated, it is already responsible
(keywordp (intern ":foo")) ; The same as (keywordp :foo)
=> t
-This behaviour is compatible with other code which treats symbols
+This behavior is compatible with other code which treats symbols
beginning with colon as keywords only if they are interned in the
global obarray. `keywordp' used to wrongly return t in both cases
above.
customizable Common Lisp like one (implemented entirely in Emacs
Lisp). During reading of Emacs Lisp source files, it is about 40%
slower than the built-in reader, but there is no difference in
-loading byte compiled files - they dont contain any syntactic sugar
+loading byte compiled files - they don't contain any syntactic sugar
and are loaded with the built in subroutine `load'.
** ediff - Compare and merge files with graphical difference display
which an XEmacs process is currently running.
.PP
\fIgnudoit\fP is a shell script frontend to ``gnuclient -batch -eval form''.
-Its use is depreciated. Try to get used to calling gnuclient directly.
+Its use is deprecated. Try to get used to calling gnuclient directly.
.PP
\fIgnuserv\fP is the server program that is set running by XEmacs to
handle all incoming and outgoing requests. It is not usually invoked
#
# The largish sed script prefixes all version numbers with a sort key.
# That key is constructed by padding out any single or double digits to 3
-# digits from the version number, then converting all occurences of `.' to
+# digits from the version number, then converting all occurrences of `.' to
# `0', and prefixing and suffixing the entire result with an additional
# zero. After sorting, the sort key is stripped from the output.
# We do all this because `sort' cannot numerically sort decimal numbers and
-.TH XEMACS 1 "1998 January 13"
+.TH XEMACS 1 "2000-09-20"
.UC 4
.SH NAME
xemacs \- Emacs: The Next Generation
,
.B \-no-site-file
, and
-.B \-no-packages
+.B \-no-early-packages
\.
.TP
.BI \-u " user, " \-user " user"
(useful with
.BR \-batch ).
.PP
-.SM Using XEmacs with X
+.SM Using XEmacs with X Windows
.PP
.I XEmacs
has been tailored to work well with the X window system.
If you run
.I XEmacs
-from under X windows, it will create its own X window to
-display in. You will probably want to start the editor
-as a background process
-so that you can continue using your original window.
+from under X windows, it will create its own X window to display in.
.PP
.I XEmacs
can be started with the following standard X options:
for more information.
.TP
.B -privateColormap
-Require XEmacs to create and use a private colormap for display. This will keep
-XEmacs from taking colors from the default colormap and keeping them from other
-clients.
+Require XEmacs to create and use a private colormap for display. This
+will keep XEmacs from taking colors from the default colormap and
+keeping them from other clients, at the cost of causing annoying
+flicker when the focus changes. Use this option only if your X server
+does not support 24 bit visuals.
.TP
.BI \-geometry " ##x##+##+##"
Specify the geometry of the initial window. The ##'s represent a number;
.BI \-xrm " argument"
This allows you to set an arbitrary resource on the command line.
.I argument
-should be a resource specification, as might as in your
+should be a resource specification, as might be found in your
.I \.Xresources
or
.I \.Xdefaults
.IR on ,
the window will be displayed in reverse video. Consider
explicitly setting the foreground and background colors instead
-of using this resources.
+of using this resource.
.TP
.B borderWidth (\fPclass\fB BorderWidth)
Sets the window's border width in pixels.
will try to use (as described above).
.TP
.B privateColormap (\fPclass\fB PrivateColormap)
-If set,
+If set,
.I XEmacs
will default to using a private colormap.
.TP
Sets the position of vertical and horizontal scrollbars. Should be one
of the strings "top-left", "bottom-left", "top-right", or "bottom-right".
The default is "bottom-right" for the Motif and Lucid scrollbars and
-"buttom-left" for the Athena scrollbars.
+"bottom-left" for the Athena scrollbars.
.TP
.B topToolBarHeight (\fPclass\fB TopToolBarHeight)
Sets the height of the top toolbar, in pixels. 0 means no top toolbar.
/usr/local/lib/xemacs-$VERSION/info - the Info files may be here instead.
-/usr/local/lib/xemacs-$VERSION/src - C source files and object files.
-(May not be present.)
-
/usr/local/lib/xemacs-$VERSION/lisp/* - Lisp source files and compiled files
that define most editing commands. The files are contained in subdirectories,
categorized by function or individual package. Some are preloaded;
preloaded Lisp functions of \fIXEmacs\fP.
They are stored here to reduce the size of \fIXEmacs\fP proper.
-.br
-/usr/local/lib/xemacs-$VERSION/etc/SERVICE - lists people offering
-various services to assist users of \fIXEmacs\fP,
-including education, troubleshooting, porting and customization.
-
-/usr/local/lib/xemacs/lock - holds lock files that are made for all
-files being modified in
-.IR XEmacs ,
-to prevent simultaneous modification of one file by two users.
-
/usr/local/lib/xemacs/site-lisp - locally-provided Lisp files.
-
-/usr/lib/X11/rgb.txt - list of valid X color names.
.PP
.SH BUGS AND HELP
There is a newsgroup, comp.emacs.xemacs, for reporting
* Menu:
* Introduction:: Introducing Emacs Modules
-* Annatomy of a Module:: Basic module layout and technology
+* Anatomy of a Module:: Basic module layout and technology
* Using ellcc:: How to use the module compiler
* Defining Functions:: Creating new Lisp primitives
* Defining Variables:: Creating new Lisp variables
--- The Detailed Node Listing ---
-Annatomy of a Module
+Anatomy of a Module
* Required Header File:: Always include <emodules.h>
* Required Functions:: Functions you must always provide
* Required Variables:: Variables whose values you must provide
-* Loading other Modules:: How to load dependant modules
+* Loading other Modules:: How to load dependent modules
Using `ellcc'
* Declaring Functions:: Declaring functions to the Lisp reader
\1f
-File: emodules.info, Node: Introduction, Next: Annatomy of a Module, Prev: Top, Up: Top
+File: emodules.info, Node: Introduction, Next: Anatomy of a Module, Prev: Top, Up: Top
Introduction
************
low level access to a system or need to be as quick as possible.
This manual describes a new way of extending XEmacs, by using dynamic
-loadable modules (also knows as dynamicaly loadable libraries (DLLs),
-dynamic shared objects (DSOs) or just simply shared objectcs), which can
+loadable modules (also known as dynamically loadable libraries (DLLs),
+dynamic shared objects (DSOs) or just simply shared objects), which can
be written in C or C++ and loaded into XEmacs at any time. I sometimes
refer to this technology as "CEmacs", which is short for "C Extensible
Emacs".
XEmacs.
* CEmacs also makes all of the relevant XEmacs internal header
- files availible for module authors to use. This is often required
+ files available for module authors to use. This is often required
to get data structure definitions and external variable
declarations. The header files installed include the module
specific header file `emodules.h'. Due to the nature of dynamic
done.
\1f
-File: emodules.info, Node: Annatomy of a Module, Next: Using ellcc, Prev: Introduction, Up: Top
+File: emodules.info, Node: Anatomy of a Module, Next: Using ellcc, Prev: Introduction, Up: Top
-Annatomy of a Module
-********************
+Anatomy of a Module
+*******************
- Each dynamically loadable XEmacs extension (hereafter refered to as a
-module) has a certain compulsory format, and must contain several
+ Each dynamically loadable XEmacs extension (hereafter referred to as
+a module) has a certain compulsory format, and must contain several
pieces of information and several mandatory functions. This chapter
describes the basic layout of a module, and provides a very simple
sample. The source for this sample can be found in the file
* Required Header File:: Always include <emodules.h>
* Required Functions:: Functions you must always provide
* Required Variables:: Variables whose values you must provide
-* Loading other Modules:: How to load dependant modules
+* Loading other Modules:: How to load dependent modules
\1f
-File: emodules.info, Node: Required Header File, Next: Required Functions, Prev: Annatomy of a Module, Up: Annatomy of a Module
+File: emodules.info, Node: Required Header File, Next: Required Functions, Prev: Anatomy of a Module, Up: Anatomy of a Module
Required Header File
====================
variable declarations.
`sysdep.h'
- All system dependant declarations and abstraction macros live
+ All system dependent declarations and abstraction macros live
here. You should never call low level system functions directly.
Rather, you should use the abstraction macros provided in this
header file.
manipulating XEmacs frames.
\1f
-File: emodules.info, Node: Required Functions, Next: Required Variables, Prev: Required Header File, Up: Annatomy of a Module
+File: emodules.info, Node: Required Functions, Next: Required Variables, Prev: Required Header File, Up: Anatomy of a Module
Required Functions
==================
Every module requires several initialization functions. It is the
-responsibility of these functions to load in any dependant modules, and
-to declare all variables and functions which are to be made visibile to
+responsibility of these functions to load in any dependent modules, and
+to declare all variables and functions which are to be made visible to
the XEmacs Lisp reader. Each of these functions performs a very
specific task, and they are executed in the correct order by XEmacs.
All of these functions are `void' functions which take no arguments.
functions and variables declared in your module.
\1f
-File: emodules.info, Node: Required Variables, Next: Loading other Modules, Prev: Required Functions, Up: Annatomy of a Module
+File: emodules.info, Node: Required Variables, Next: Loading other Modules, Prev: Required Functions, Up: Anatomy of a Module
Required Variables
==================
This is a short (typically 10 characters or less) name for the
module, and it is used as a suffix for all of the required
functions. This is also the name by which the module is
- recognised when loading dependant modules. The name does not
+ recognized when loading dependent modules. The name does not
necessarily have to be the same as the physical file name,
although keeping the two names in sync is a pretty good idea. The
name must not be empty, and it must be a valid part of a C
module. The value is set by the `--mod-title' argument to `ellcc'.
\1f
-File: emodules.info, Node: Loading other Modules, Prev: Required Variables, Up: Annatomy of a Module
+File: emodules.info, Node: Loading other Modules, Prev: Required Variables, Up: Anatomy of a Module
Loading other Modules
=====================
function `modules_of_module' to load in any modules which the current
module depends on. If the module is stand-alone, and does not depend
on other modules, then this function can be left empty or even
-undeclared. However, if it does have dependnacies, it must call
+undeclared. However, if it does have dependencies, it must call
`emodules_load':
int emodules_load (const char *module,
successful calls to `emodules_load' at the top level.
\1f
-File: emodules.info, Node: Using ellcc, Next: Defining Functions, Prev: Annatomy of a Module, Up: Top
+File: emodules.info, Node: Using ellcc, Next: Defining Functions, Prev: Anatomy of a Module, Up: Top
Using `ellcc'
*************
The result of running `ellcc' in initialization mode is a C source
file which you compile with (you guessed it) `ellcc' in compile mode.
Initialization mode is where you set the module name, version, title
-and gather together all of the documentaion strings for the functions
-and vairables in your module. There are several options that you are
+and gather together all of the documentation strings for the functions
+and variables in your module. There are several options that you are
required to pass `ellcc' in initialization mode, the first of which is
the mode switch itself, `--mode=init'.
directory. Each sub-directory within it is searched for a given module
when the user attempts to load it. The valid extensions that the
loader attempts to use are `.so', `.ell' and `.dll'. You can use any
-of these extensions, although `.ell' is the prefered extension.
+of these extensions, although `.ell' is the preferred extension.
\1f
File: emodules.info, Node: Link Mode, Next: Other ellcc options, Prev: Initialization Mode, Up: Using ellcc
=========
Once all of your source code files have been compiled (including the
-generated init file) you need to link them all together to created the
+generated init file) you need to link them all together to create the
loadable module. To do this, you invoke `ellcc' in link mode, by
-pasing the `--mode-link' command. You need to specify the final output
-file using the `--mod-output=NAME' command, but other than that all
+passing the `--mode-link' option. You need to specify the final output
+file using the `--mod-output=NAME' option, but other than that all
other arguments are passed on directly to the system compiler or
linker, along with any other required arguments to create the loadable
module.
is displayed.
`--mod-name=NAME'
- Sets the short internaml module NAME to the string specified,
- which must consist only of valid C identifiers. Required during
+ Sets the short internal module NAME to the string specified, which
+ must consist only of valid C identifiers. Required during
initialization mode.
`--mod-version=VERSION'
exit.
`--mod-archdir'
- Prints the name of the root of the architecture-dependant
- directory that XEmacs searches for architecture-dependant files.
+ Prints the name of the root of the architecture-dependent
+ directory that XEmacs searches for architecture-dependent files.
`--mod-config'
Prints the name of the configuration for which XEmacs and `ellcc'
certain rare circumstances you may wish to over-ride the flags passed to
the compiler or linker, and you can do so using environment variables.
The table below lists all of the environment variables that `ellcc'
-recognises.
+recognizes.
`ELLCC'
This is used to over-ride the name of the C compiler that is
DEFUN ("my-function", Fmy_function, 1, 1, "FFile name: ", /*
Sample Emacs primitive function.
- The specified FILE is frobricated before it is fnozzled.
+ The specified FILE is frobnicated before it is fnozzled.
*/
(file))
{
===================
Simply writing the code for a function is not enough to make it
-availible to the Lisp reader. You have to, during module
+available to the Lisp reader. You have to, during module
initialization, let the Lisp reader know about the new function. This
is done by calling `DEFSUBR' with the name of the function. This is
the sole purpose of the initialization function `syms_of_module'.
Rarely will you write a module that only contains functions. It is
common to also provide variables which can be used to control the
-behaviour of the function, or store the results of the function being
+behavior of the function, or store the results of the function being
executed. The actual C variable types are the same for modules and
internal XEmacs primitives, and the declaration of the variables is
identical.
One _very_ important difference between XEmacs variables and module
variables is how you use pure space. Simply put, you *never* use pure
space in XEmacs modules. The pure space storage is of a limited size,
-and is initialized propperly during the dumping of XEmacs. Because
+and is initialized properly during the dumping of XEmacs. Because
variables are being added dynamically to an already running XEmacs when
you load a module, you cannot use pure space. Be warned: *do not use
pure space in modules. Repeat, do not use pure space in modules.*
* Menu:
-* annatomy: Annatomy of a Module.
+* anatomy: Anatomy of a Module.
* compiler: Introduction.
* compiling: Compile Mode.
* config.h: Required Header File.
* DEFVAR_BOOL: Defining Variables.
* DEFVAR_INT: Defining Variables.
* DEFVAR_LISP: Defining Variables.
-* dependancies: Loading other Modules.
+* dependencies: Loading other Modules.
* DLL: Introduction.
* docs_of_module: Required Functions.
* documentation <1>: Initialization Mode.
* emodules.h: Required Header File.
* emodules_load: Loading other Modules.
* environment variables: Environment Variables.
-* format, module: Annatomy of a Module.
+* format, module: Anatomy of a Module.
* functions, declaring: Declaring Functions.
* functions, defining: Using DEFUN.
* functions, Lisp: Using DEFUN.
* linker: Introduction.
* linking: Link Mode.
* module compiler: Using ellcc.
-* module format: Annatomy of a Module.
-* module skeleton: Annatomy of a Module.
+* module format: Anatomy of a Module.
+* module skeleton: Anatomy of a Module.
* modules_of_module <1>: Loading other Modules.
* modules_of_module: Required Functions.
* objects, defining: Defining Variables.
* required variables: Required Variables.
* samples: Introduction.
* shared object: Introduction.
-* skeleton, module: Annatomy of a Module.
+* skeleton, module: Anatomy of a Module.
* subrs: Using DEFUN.
* syms_of_module: Required Functions.
* variables, defining: Defining Variables.
\1f
Tag Table:
Node: Top\7f1536
-Node: Introduction\7f2884
-Node: Annatomy of a Module\7f7393
-Node: Required Header File\7f8209
-Node: Required Functions\7f10130
-Node: Required Variables\7f12379
-Node: Loading other Modules\7f15066
-Node: Using ellcc\7f17124
-Node: Compile Mode\7f18919
-Node: Initialization Mode\7f20287
-Node: Link Mode\7f25319
-Node: Other ellcc options\7f26466
-Node: Environment Variables\7f29046
-Node: Defining Functions\7f30737
-Node: Using DEFUN\7f32748
-Node: Declaring Functions\7f34459
-Node: Defining Variables\7f35802
-Node: Index\7f38047
+Node: Introduction\7f2883
+Node: Anatomy of a Module\7f7391
+Node: Required Header File\7f8205
+Node: Required Functions\7f10124
+Node: Required Variables\7f12371
+Node: Loading other Modules\7f15057
+Node: Using ellcc\7f17114
+Node: Compile Mode\7f18908
+Node: Initialization Mode\7f20276
+Node: Link Mode\7f25310
+Node: Other ellcc options\7f26455
+Node: Environment Variables\7f29034
+Node: Defining Functions\7f30725
+Node: Using DEFUN\7f32736
+Node: Declaring Functions\7f34447
+Node: Defining Variables\7f35790
+Node: Index\7f38033
\1f
End Tag Table
Emacs Info-mode Variables
=========================
- The following variables may modify the behaviour of Info-mode in
+ The following variables may modify the behavior of Info-mode in
Emacs; you may wish to set one or several of these variables
interactively, or in your `~/.emacs' init file. *Note Examining and
Setting Variables: (xemacs)Examining.
Node: Tags\7f29973
Node: Checking\7f31275
Node: Emacs Info Variables\7f32228
-Node: Creating an Info File\7f33218
+Node: Creating an Info File\7f33217
\1f
End Tag Table
\1f
Indirect:
internals.info-1: 1776
-internals.info-2: 46628
-internals.info-3: 94463
-internals.info-4: 143504
-internals.info-5: 193454
-internals.info-6: 243017
-internals.info-7: 286634
-internals.info-8: 335501
+internals.info-2: 46627
+internals.info-3: 94462
+internals.info-4: 144159
+internals.info-5: 194051
+internals.info-6: 243653
+internals.info-7: 287720
+internals.info-8: 336587
\1f
Tag Table:
(Indirect)
Node: The Lisp Language\7f22577
Node: XEmacs From the Perspective of Building\7f32120
Node: XEmacs From the Inside\7f38245
-Node: The XEmacs Object System (Abstractly Speaking)\7f46628
-Node: How Lisp Objects Are Represented in C\7f60714
-Node: Rules When Writing New C Code\7f65391
-Node: General Coding Rules\7f66195
-Node: Writing Lisp Primitives\7f71915
-Node: Adding Global Lisp Variables\7f83084
-Node: Coding for Mule\7f86722
-Node: Character-Related Data Types\7f87701
-Node: Working With Character and Byte Positions\7f90698
-Node: Conversion to and from External Data\7f94463
-Node: General Guidelines for Writing Mule-Aware Code\7f100604
-Node: An Example of Mule-Aware Code\7f103292
-Node: Techniques for XEmacs Developers\7f105273
-Node: A Summary of the Various XEmacs Modules\7f113220
-Node: Low-Level Modules\7f114040
-Node: Basic Lisp Modules\7f121610
-Node: Modules for Standard Editing Operations\7f128220
-Node: Editor-Level Control Flow Modules\7f134108
-Node: Modules for the Basic Displayable Lisp Objects\7f137554
-Node: Modules for other Display-Related Lisp Objects\7f140076
-Node: Modules for the Redisplay Mechanism\7f141153
-Node: Modules for Interfacing with the File System\7f143504
-Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f147202
-Node: Modules for Interfacing with the Operating System\7f152655
-Node: Modules for Interfacing with X Windows\7f160316
-Node: Modules for Internationalization\7f163752
-Node: Allocation of Objects in XEmacs Lisp\7f166389
-Node: Introduction to Allocation\7f166910
-Node: Garbage Collection\7f170596
-Node: GCPROing\7f171752
-Node: Garbage Collection - Step by Step\7f178756
-Node: Invocation\7f179148
-Node: garbage_collect_1\7f182162
-Node: mark_object\7f191642
-Node: gc_sweep\7f193454
-Node: sweep_lcrecords_1\7f198517
-Node: compact_string_chars\7f199512
-Node: sweep_strings\7f201692
-Node: sweep_bit_vectors_1\7f202657
-Node: Integers and Characters\7f203333
-Node: Allocation from Frob Blocks\7f204085
-Node: lrecords\7f205689
-Node: Low-level allocation\7f217424
-Node: Cons\7f221531
-Node: Vector\7f222257
-Node: Bit Vector\7f222834
-Node: Symbol\7f223327
-Node: Marker\7f223681
-Node: String\7f224236
-Node: Compiled Function\7f227849
-Node: Dumping\7f228018
-Node: Overview\7f230239
-Node: Data descriptions\7f230809
-Node: Dumping phase\7f232814
-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\7f321943
-Node: Lstreams\7f322156
-Node: Creating an Lstream\7f323187
-Node: Lstream Types\7f324414
-Node: Lstream Functions\7f324666
-Node: Lstream Methods\7f328232
-Node: Consoles; Devices; Frames; Windows\7f331374
-Node: Introduction to Consoles; Devices; Frames; Windows\7f331689
-Node: Point\7f334222
-Node: Window Hierarchy\7f335501
-Node: The Window Object\7f339949
-Node: The Redisplay Mechanism\7f343386
-Node: Critical Redisplay Sections\7f344178
-Node: Line Start Cache\7f345165
-Node: Redisplay Piece by Piece\7f348401
-Node: Extents\7f350438
-Node: Introduction to Extents\7f350972
-Node: Extent Ordering\7f352114
-Node: Format of the Extent Info\7f353355
-Node: Zero-Length Extents\7f355242
-Node: Mathematics of Extent Ordering\7f356640
-Node: Extent Fragments\7f361397
-Node: Faces\7f362483
-Node: Glyphs\7f362599
-Node: Specifiers\7f365616
-Node: Menus\7f365745
-Node: Subprocesses\7f368003
-Node: Interface to X Windows\7f369979
-Node: Index\7f370150
+Node: The XEmacs Object System (Abstractly Speaking)\7f46627
+Node: How Lisp Objects Are Represented in C\7f60713
+Node: Rules When Writing New C Code\7f65390
+Node: General Coding Rules\7f66194
+Node: Writing Lisp Primitives\7f71914
+Node: Adding Global Lisp Variables\7f83083
+Node: Coding for Mule\7f86721
+Node: Character-Related Data Types\7f87700
+Node: Working With Character and Byte Positions\7f90697
+Node: Conversion to and from External Data\7f94462
+Node: General Guidelines for Writing Mule-Aware Code\7f100603
+Node: An Example of Mule-Aware Code\7f103291
+Node: Techniques for XEmacs Developers\7f105272
+Node: A Summary of the Various XEmacs Modules\7f113219
+Node: Low-Level Modules\7f114039
+Node: Basic Lisp Modules\7f121500
+Node: Modules for Standard Editing Operations\7f128094
+Node: Editor-Level Control Flow Modules\7f133982
+Node: Modules for the Basic Displayable Lisp Objects\7f137493
+Node: Modules for other Display-Related Lisp Objects\7f140446
+Node: Modules for the Redisplay Mechanism\7f141787
+Node: Modules for Interfacing with the File System\7f144159
+Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f147857
+Node: Modules for Interfacing with the Operating System\7f153310
+Node: Modules for Interfacing with X Windows\7f160866
+Node: Modules for Internationalization\7f164349
+Node: Allocation of Objects in XEmacs Lisp\7f166986
+Node: Introduction to Allocation\7f167507
+Node: Garbage Collection\7f171193
+Node: GCPROing\7f172349
+Node: Garbage Collection - Step by Step\7f179353
+Node: Invocation\7f179745
+Node: garbage_collect_1\7f182759
+Node: mark_object\7f192239
+Node: gc_sweep\7f194051
+Node: sweep_lcrecords_1\7f199114
+Node: compact_string_chars\7f200109
+Node: sweep_strings\7f202289
+Node: sweep_bit_vectors_1\7f203254
+Node: Integers and Characters\7f203930
+Node: Allocation from Frob Blocks\7f204682
+Node: lrecords\7f206286
+Node: Low-level allocation\7f218510
+Node: Cons\7f222617
+Node: Vector\7f223343
+Node: Bit Vector\7f223920
+Node: Symbol\7f224413
+Node: Marker\7f224767
+Node: String\7f225322
+Node: Compiled Function\7f228935
+Node: Dumping\7f229104
+Node: Overview\7f231325
+Node: Data descriptions\7f231895
+Node: Dumping phase\7f233900
+Node: Object inventory\7f234303
+Node: Address allocation\7f237157
+Node: The header\7f238544
+Node: Data dumping\7f239052
+Node: Pointers dumping\7f239713
+Node: Reloading phase\7f240931
+Node: Remaining issues\7f242692
+Node: Events and the Event Loop\7f243653
+Node: Introduction to Events\7f244103
+Node: Main Loop\7f246052
+Node: Specifics of the Event Gathering Mechanism\7f249627
+Node: Specifics About the Emacs Event\7f262080
+Node: The Event Stream Callback Routines\7f262335
+Node: Other Event Loop Functions\7f262580
+Node: Converting Events\7f263720
+Node: Dispatching Events; The Command Builder\7f264329
+Node: Evaluation; Stack Frames; Bindings\7f264564
+Node: Evaluation\7f264906
+Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f271461
+Node: Simple Special Forms\7f273845
+Node: Catch and Throw\7f274628
+Node: Symbols and Variables\7f277203
+Node: Introduction to Symbols\7f277467
+Node: Obarrays\7f278535
+Node: Symbol Values\7f282068
+Node: Buffers and Textual Representation\7f284356
+Node: Introduction to Buffers\7f285014
+Node: The Text in a Buffer\7f287720
+Node: Buffer Lists\7f294870
+Node: Markers and Extents\7f296821
+Node: Bufbytes and Emchars\7f299086
+Node: The Buffer Object\7f299301
+Node: MULE Character Sets and Encodings\7f302781
+Node: Character Sets\7f303843
+Node: Encodings\7f307328
+Node: Japanese EUC (Extended Unix Code)\7f308395
+Node: JIS7\7f309227
+Node: Internal Mule Encodings\7f310577
+Node: Internal String Encoding\7f312407
+Node: Internal Character Encoding\7f314552
+Node: CCL\7f316276
+Node: The Lisp Reader and Compiler\7f323029
+Node: Lstreams\7f323242
+Node: Creating an Lstream\7f324273
+Node: Lstream Types\7f325500
+Node: Lstream Functions\7f325752
+Node: Lstream Methods\7f329318
+Node: Consoles; Devices; Frames; Windows\7f332460
+Node: Introduction to Consoles; Devices; Frames; Windows\7f332775
+Node: Point\7f335308
+Node: Window Hierarchy\7f336587
+Node: The Window Object\7f341035
+Node: The Redisplay Mechanism\7f344472
+Node: Critical Redisplay Sections\7f345264
+Node: Line Start Cache\7f346251
+Node: Redisplay Piece by Piece\7f349487
+Node: Extents\7f351524
+Node: Introduction to Extents\7f352058
+Node: Extent Ordering\7f353200
+Node: Format of the Extent Info\7f354441
+Node: Zero-Length Extents\7f356328
+Node: Mathematics of Extent Ordering\7f357726
+Node: Extent Fragments\7f362483
+Node: Faces\7f363569
+Node: Glyphs\7f363685
+Node: Specifiers\7f366704
+Node: Menus\7f366833
+Node: Subprocesses\7f369091
+Node: Interface to X Windows\7f371067
+Node: Index\7f371238
\1f
End Tag Table
When the Lisp initialization code is done, the C code enters the
event loop, and stays there for the duration of the XEmacs process.
-The code for the event loop is contained in `keyboard.c', and is called
+The code for the event loop is contained in `cmdloop.c', and is called
`Fcommand_loop_1()'. Note that this event loop could very well be
written in Lisp, and in fact a Lisp version exists; but apparently,
doing this makes XEmacs run noticeably slower.
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: 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: 1727315
-lispref.info-38: 1776245
-lispref.info-39: 1826066
-lispref.info-40: 1872993
-lispref.info-41: 1921090
-lispref.info-42: 1969207
-lispref.info-43: 2017600
-lispref.info-44: 2066304
-lispref.info-45: 2115864
-lispref.info-46: 2158450
-lispref.info-47: 2187663
+lispref.info-17: 775533
+lispref.info-18: 825531
+lispref.info-19: 875222
+lispref.info-20: 924063
+lispref.info-21: 973600
+lispref.info-22: 1021181
+lispref.info-23: 1067505
+lispref.info-24: 1116678
+lispref.info-25: 1165730
+lispref.info-26: 1215205
+lispref.info-27: 1260832
+lispref.info-28: 1310121
+lispref.info-29: 1357971
+lispref.info-30: 1406195
+lispref.info-31: 1455872
+lispref.info-32: 1504421
+lispref.info-33: 1553719
+lispref.info-34: 1595052
+lispref.info-35: 1641357
+lispref.info-36: 1690574
+lispref.info-37: 1727545
+lispref.info-38: 1776475
+lispref.info-39: 1825715
+lispref.info-40: 1874374
+lispref.info-41: 1922471
+lispref.info-42: 1970588
+lispref.info-43: 2018981
+lispref.info-44: 2067685
+lispref.info-45: 2117245
+lispref.info-46: 2159831
+lispref.info-47: 2189044
\1f
Tag Table:
(Indirect)
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\7f935905
-Node: Creating Toolbar\7f938305
-Node: Toolbar Descriptor Format\7f939222
-Node: Specifying the Toolbar\7f943719
-Node: Other Toolbar Variables\7f947324
-Node: Gutter\7f951750
-Node: Gutter Intro\7f952339
-Node: Creating Gutter\7f954342
-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\7f1712672
-Node: Glyph Convenience Functions\7f1721839
-Node: Glyph Dimensions\7f1725786
-Node: Images\7f1726866
-Node: Image Specifiers\7f1727315
-Node: Image Instantiator Conversion\7f1742661
-Node: Image Instances\7f1744026
-Node: Image Instance Types\7f1744777
-Node: Image Instance Functions\7f1747540
-Node: Glyph Types\7f1754591
-Node: Mouse Pointer\7f1756363
-Node: Redisplay Glyphs\7f1759366
-Node: Subwindows\7f1760399
-Node: Annotations\7f1760642
-Node: Annotation Basics\7f1761658
-Node: Annotation Primitives\7f1765596
-Node: Annotation Properties\7f1766925
-Node: Locating Annotations\7f1769965
-Node: Margin Primitives\7f1770802
-Node: Annotation Hooks\7f1772696
-Node: Display\7f1773356
-Node: Refresh Screen\7f1774334
-Node: Truncation\7f1776245
-Node: The Echo Area\7f1778770
-Node: Warnings\7f1785205
-Node: Invisible Text\7f1789641
-Node: Selective Display\7f1792220
-Node: Overlay Arrow\7f1796346
-Node: Temporary Displays\7f1797699
-Node: Blinking\7f1801820
-Node: Usual Display\7f1804005
-Node: Display Tables\7f1806554
-Node: Display Table Format\7f1807358
-Node: Active Display Table\7f1808800
-Node: Character Descriptors\7f1812795
-Node: Beeping\7f1813552
-Node: Hash Tables\7f1818318
-Node: Introduction to Hash Tables\7f1818926
-Node: Working With Hash Tables\7f1824949
-Node: Weak Hash Tables\7f1826066
-Node: Range Tables\7f1827865
-Node: Introduction to Range Tables\7f1828554
-Node: Working With Range Tables\7f1828985
-Node: Databases\7f1829870
-Node: Connecting to a Database\7f1830169
-Node: Working With a Database\7f1831260
-Node: Other Database Functions\7f1832118
-Node: Processes\7f1832692
-Node: Subprocess Creation\7f1834916
-Node: Synchronous Processes\7f1838205
-Node: MS-DOS Subprocesses\7f1844923
-Node: Asynchronous Processes\7f1845997
-Node: Deleting Processes\7f1849710
-Node: Process Information\7f1851581
-Node: Input to Processes\7f1855507
-Node: Signals to Processes\7f1857797
-Node: Output from Processes\7f1862217
-Node: Process Buffers\7f1863029
-Node: Filter Functions\7f1865896
-Node: Accepting Output\7f1871466
-Node: Sentinels\7f1872993
-Node: Process Window Size\7f1876483
-Node: Transaction Queues\7f1876832
-Node: Network\7f1878530
-Node: System Interface\7f1880364
-Node: Starting Up\7f1881634
-Node: Start-up Summary\7f1882228
-Node: Init File\7f1885782
-Node: Terminal-Specific\7f1888163
-Node: Command Line Arguments\7f1891322
-Node: Getting Out\7f1894811
-Node: Killing XEmacs\7f1895380
-Node: Suspending XEmacs\7f1897049
-Node: System Environment\7f1900391
-Node: User Identification\7f1907058
-Node: Time of Day\7f1910587
-Node: Time Conversion\7f1913374
-Node: Timers\7f1918414
-Node: Terminal Input\7f1920587
-Node: Input Modes\7f1921090
-Node: Translating Input\7f1923503
-Node: Recording Input\7f1927668
-Node: Terminal Output\7f1929768
-Node: Flow Control\7f1933391
-Node: Batch Mode\7f1937183
-Node: X-Windows\7f1938565
-Node: X Selections\7f1939436
-Node: X Server\7f1941646
-Node: Resources\7f1942097
-Node: Server Data\7f1947406
-Node: Grabs\7f1948613
-Node: X Miscellaneous\7f1950193
-Node: ToolTalk Support\7f1952578
-Node: XEmacs ToolTalk API Summary\7f1952795
-Node: Sending Messages\7f1954095
-Node: Example of Sending Messages\7f1954346
-Node: Elisp Interface for Sending Messages\7f1955408
-Node: Receiving Messages\7f1961800
-Node: Example of Receiving Messages\7f1962023
-Node: Elisp Interface for Receiving Messages\7f1962859
-Node: LDAP Support\7f1966684
-Node: Building XEmacs with LDAP support\7f1967178
-Node: XEmacs LDAP API\7f1968155
-Node: LDAP Variables\7f1969207
-Node: The High-Level LDAP API\7f1971807
-Node: The Low-Level LDAP API\7f1975270
-Node: The LDAP Lisp Object\7f1976101
-Node: Opening and Closing a LDAP Connection\7f1976654
-Node: Low-level Operations on a LDAP Server\7f1978454
-Node: LDAP Internationalization\7f1981148
-Node: LDAP Internationalization Variables\7f1982053
-Node: Encoder/Decoder Functions\7f1983782
-Node: Syntax of Search Filters\7f1984821
-Node: PostgreSQL Support\7f1986119
-Node: Building XEmacs with PostgreSQL support\7f1986514
-Node: XEmacs PostgreSQL libpq API\7f1987861
-Node: libpq Lisp Variables\7f1989740
-Node: libpq Lisp Symbols and DataTypes\7f1992704
-Node: Synchronous Interface Functions\7f2005944
-Node: Asynchronous Interface Functions\7f2010435
-Node: Large Object Support\7f2013938
-Node: Other libpq Functions\7f2014565
-Node: Unimplemented libpq Functions\7f2017600
-Node: XEmacs PostgreSQL libpq Examples\7f2022919
-Node: Internationalization\7f2029010
-Node: I18N Levels 1 and 2\7f2029353
-Node: I18N Level 3\7f2030059
-Node: Level 3 Basics\7f2030340
-Node: Level 3 Primitives\7f2031173
-Node: Dynamic Messaging\7f2032779
-Node: Domain Specification\7f2033242
-Node: Documentation String Extraction\7f2035145
-Node: I18N Level 4\7f2036063
-Node: MULE\7f2036255
-Node: Internationalization Terminology\7f2037304
-Node: Charsets\7f2049503
-Node: Charset Properties\7f2050199
-Node: Basic Charset Functions\7f2054914
-Node: Charset Property Functions\7f2057095
-Node: Predefined Charsets\7f2059137
-Node: MULE Characters\7f2062057
-Node: Composite Characters\7f2062904
-Node: Coding Systems\7f2064164
-Node: Coding System Types\7f2066304
-Node: ISO 2022\7f2070288
-Node: EOL Conversion\7f2082563
-Node: Coding System Properties\7f2083735
-Node: Basic Coding System Functions\7f2088052
-Node: Coding System Property Functions\7f2090086
-Node: Encoding and Decoding Text\7f2090644
-Node: Detection of Textual Encoding\7f2091780
-Node: Big5 and Shift-JIS Functions\7f2093316
-Node: Predefined Coding Systems\7f2094442
-Node: CCL\7f2106536
-Node: CCL Syntax\7f2109640
-Node: CCL Statements\7f2111216
-Node: CCL Expressions\7f2115864
-Node: Calling CCL\7f2118403
-Node: CCL Examples\7f2121392
-Node: Category Tables\7f2121529
-Node: Tips\7f2123887
-Node: Style Tips\7f2124528
-Node: Compilation Tips\7f2134047
-Node: Documentation Tips\7f2135961
-Node: Comment Tips\7f2141470
-Node: Library Headers\7f2144472
-Node: Building XEmacs and Object Allocation\7f2148444
-Node: Building XEmacs\7f2149327
-Node: Pure Storage\7f2155662
-Node: Garbage Collection\7f2158450
-Node: Standard Errors\7f2169589
-Node: Standard Buffer-Local Variables\7f2173798
-Node: Standard Keymaps\7f2176431
-Node: Standard Hooks\7f2180163
-Node: Index\7f2187663
+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\7f957226
+Node: Specifying a Gutter\7f961683
+Node: Other Gutter Variables\7f965216
+Node: Common Gutter Widgets\7f969601
+Node: Buffer Tabs\7f970593
+Node: Progress Bars\7f970734
+Node: Scrollbars\7f970879
+Node: Drag and Drop\7f971014
+Node: Supported Protocols\7f972090
+Node: OffiX DND\7f972593
+Node: CDE dt\7f973600
+Node: MSWindows OLE\7f974191
+Node: Loose ends\7f974362
+Node: Drop Interface\7f974754
+Node: Drag Interface\7f975776
+Node: Modes\7f975950
+Node: Major Modes\7f976901
+Node: Major Mode Conventions\7f979816
+Node: Example Major Modes\7f985771
+Node: Auto Major Mode\7f993804
+Node: Mode Help\7f1001252
+Node: Derived Modes\7f1002353
+Node: Minor Modes\7f1004544
+Node: Minor Mode Conventions\7f1005846
+Node: Keymaps and Minor Modes\7f1008709
+Node: Modeline Format\7f1009544
+Node: Modeline Data\7f1011312
+Node: Modeline Variables\7f1016465
+Node: %-Constructs\7f1021181
+Node: Hooks\7f1024168
+Node: Documentation\7f1030930
+Node: Documentation Basics\7f1032353
+Node: Accessing Documentation\7f1035403
+Node: Keys in Documentation\7f1041682
+Node: Describing Characters\7f1045161
+Node: Help Functions\7f1047510
+Node: Obsoleteness\7f1053961
+Node: Files\7f1056955
+Node: Visiting Files\7f1058880
+Node: Visiting Functions\7f1060385
+Node: Subroutines of Visiting\7f1065432
+Node: Saving Buffers\7f1067505
+Node: Reading from Files\7f1073598
+Node: Writing to Files\7f1075755
+Node: File Locks\7f1078472
+Node: Information about Files\7f1081525
+Node: Testing Accessibility\7f1082286
+Node: Kinds of Files\7f1086026
+Node: Truenames\7f1087707
+Node: File Attributes\7f1088709
+Node: Changing File Attributes\7f1093848
+Node: File Names\7f1099254
+Node: File Name Components\7f1100863
+Node: Directory Names\7f1103964
+Node: Relative File Names\7f1107417
+Node: File Name Expansion\7f1108495
+Node: Unique File Names\7f1112402
+Node: File Name Completion\7f1114017
+Node: User Name Completion\7f1116678
+Node: Contents of Directories\7f1118018
+Node: Create/Delete Dirs\7f1121331
+Node: Magic File Names\7f1122437
+Node: Partial Files\7f1128067
+Node: Intro to Partial Files\7f1128295
+Node: Creating a Partial File\7f1129535
+Node: Detached Partial Files\7f1130470
+Node: Format Conversion\7f1131592
+Node: Files and MS-DOS\7f1138108
+Node: Backups and Auto-Saving\7f1140172
+Node: Backup Files\7f1140847
+Node: Making Backups\7f1142244
+Node: Rename or Copy\7f1144993
+Node: Numbered Backups\7f1147486
+Node: Backup Names\7f1149721
+Node: Auto-Saving\7f1153013
+Node: Reverting\7f1161155
+Node: Buffers\7f1164313
+Node: Buffer Basics\7f1165730
+Node: Current Buffer\7f1167783
+Node: Buffer Names\7f1172471
+Node: Buffer File Name\7f1175676
+Node: Buffer Modification\7f1179795
+Node: Modification Time\7f1181988
+Node: Read Only Buffers\7f1185363
+Node: The Buffer List\7f1187781
+Node: Creating Buffers\7f1192611
+Node: Killing Buffers\7f1194757
+Node: Indirect Buffers\7f1198488
+Node: Windows\7f1201060
+Node: Basic Windows\7f1202538
+Node: Splitting Windows\7f1205636
+Node: Deleting Windows\7f1212525
+Node: Selecting Windows\7f1215205
+Node: Cyclic Window Ordering\7f1218334
+Node: Buffers and Windows\7f1222958
+Node: Displaying Buffers\7f1224799
+Node: Choosing Window\7f1229975
+Node: Window Point\7f1237691
+Node: Window Start\7f1239738
+Node: Vertical Scrolling\7f1244228
+Node: Horizontal Scrolling\7f1250365
+Node: Size of Window\7f1253874
+Node: Position of Window\7f1258592
+Node: Resizing Windows\7f1260832
+Node: Window Configurations\7f1266261
+Node: Frames\7f1269686
+Node: Creating Frames\7f1272027
+Node: Frame Properties\7f1273368
+Node: Property Access\7f1274184
+Node: Initial Properties\7f1275033
+Node: X Frame Properties\7f1277519
+Node: Size and Position\7f1282153
+Node: Frame Name\7f1284149
+Node: Frame Titles\7f1285063
+Node: Deleting Frames\7f1286887
+Node: Finding All Frames\7f1287487
+Node: Frames and Windows\7f1289481
+Node: Minibuffers and Frames\7f1291186
+Node: Input Focus\7f1292104
+Node: Visibility of Frames\7f1295181
+Node: Raising and Lowering\7f1297100
+Node: Frame Configurations\7f1299476
+Node: Frame Hooks\7f1300070
+Node: Consoles and Devices\7f1301875
+Node: Basic Console Functions\7f1304618
+Node: Basic Device Functions\7f1305041
+Node: Console Types and Device Classes\7f1305757
+Node: Connecting to a Console or Device\7f1307958
+Node: The Selected Console and Device\7f1310121
+Node: Console and Device I/O\7f1311147
+Node: Positions\7f1311911
+Node: Point\7f1312880
+Node: Motion\7f1315970
+Node: Character Motion\7f1316737
+Node: Word Motion\7f1318974
+Node: Buffer End Motion\7f1320475
+Node: Text Lines\7f1321972
+Node: Screen Lines\7f1326567
+Node: List Motion\7f1330630
+Node: Skipping Characters\7f1334038
+Node: Excursions\7f1336257
+Node: Narrowing\7f1339289
+Node: Markers\7f1344614
+Node: Overview of Markers\7f1345520
+Node: Predicates on Markers\7f1350212
+Node: Creating Markers\7f1351458
+Node: Information from Markers\7f1355495
+Node: Changing Markers\7f1356593
+Node: The Mark\7f1357971
+Node: The Region\7f1366465
+Node: Text\7f1372151
+Node: Near Point\7f1374850
+Node: Buffer Contents\7f1379037
+Node: Comparing Text\7f1380443
+Node: Insertion\7f1381851
+Node: Commands for Insertion\7f1385693
+Node: Deletion\7f1388649
+Node: User-Level Deletion\7f1392244
+Node: The Kill Ring\7f1396405
+Node: Kill Ring Concepts\7f1398579
+Node: Kill Functions\7f1399633
+Node: Yank Commands\7f1401538
+Node: Low-Level Kill Ring\7f1403409
+Node: Internals of Kill Ring\7f1406195
+Node: Undo\7f1408975
+Node: Maintaining Undo\7f1413304
+Node: Filling\7f1415924
+Node: Margins\7f1421918
+Node: Auto Filling\7f1425847
+Node: Sorting\7f1427028
+Node: Columns\7f1436328
+Node: Indentation\7f1438844
+Node: Primitive Indent\7f1439623
+Node: Mode-Specific Indent\7f1440867
+Node: Region Indent\7f1443378
+Node: Relative Indent\7f1446326
+Node: Indent Tabs\7f1448708
+Node: Motion by Indent\7f1450029
+Node: Case Changes\7f1450808
+Node: Text Properties\7f1454059
+Node: Examining Properties\7f1455872
+Node: Changing Properties\7f1457739
+Node: Property Search\7f1461330
+Node: Special Properties\7f1466041
+Node: Saving Properties\7f1466322
+Node: Substitution\7f1469464
+Node: Registers\7f1472734
+Node: Transposition\7f1475277
+Node: Change Hooks\7f1476171
+Node: Transformations\7f1478211
+Node: Searching and Matching\7f1482596
+Node: String Search\7f1483727
+Node: Regular Expressions\7f1488451
+Node: Syntax of Regexps\7f1489818
+Node: Regexp Example\7f1504421
+Node: Regexp Search\7f1506591
+Node: POSIX Regexps\7f1512679
+Node: Search and Replace\7f1514514
+Node: Match Data\7f1517879
+Node: Simple Match Data\7f1519009
+Node: Replacing Match\7f1523274
+Node: Entire Match Data\7f1525608
+Node: Saving Match Data\7f1527599
+Node: Searching and Case\7f1528980
+Node: Standard Regexps\7f1531014
+Node: Syntax Tables\7f1533212
+Node: Syntax Basics\7f1534326
+Node: Syntax Descriptors\7f1537298
+Node: Syntax Class Table\7f1539148
+Node: Syntax Flags\7f1545186
+Node: Syntax Table Functions\7f1548403
+Node: Motion and Syntax\7f1552267
+Node: Parsing Expressions\7f1553719
+Node: Standard Syntax Tables\7f1559788
+Node: Syntax Table Internals\7f1560632
+Node: Abbrevs\7f1561658
+Node: Abbrev Mode\7f1563461
+Node: Abbrev Tables\7f1564181
+Node: Defining Abbrevs\7f1565714
+Node: Abbrev Files\7f1567619
+Node: Abbrev Expansion\7f1569392
+Node: Standard Abbrev Tables\7f1574023
+Node: Extents\7f1575182
+Node: Intro to Extents\7f1576425
+Node: Creating and Modifying Extents\7f1580417
+Node: Extent Endpoints\7f1581924
+Node: Finding Extents\7f1585187
+Node: Mapping Over Extents\7f1588935
+Node: Extent Properties\7f1595052
+Node: Detached Extents\7f1605196
+Node: Extent Parents\7f1607055
+Node: Duplicable Extents\7f1608749
+Node: Extents and Events\7f1611970
+Node: Atomic Extents\7f1613877
+Node: Specifiers\7f1614324
+Node: Introduction to Specifiers\7f1616437
+Node: Specifiers In-Depth\7f1618747
+Node: Specifier Instancing\7f1623659
+Node: Specifier Types\7f1626921
+Node: Adding Specifications\7f1631995
+Node: Retrieving Specifications\7f1641357
+Node: Specifier Tag Functions\7f1645092
+Node: Specifier Instancing Functions\7f1648326
+Node: Specifier Example\7f1651733
+Node: Creating Specifiers\7f1654889
+Node: Specifier Validation Functions\7f1659206
+Node: Other Specification Functions\7f1661590
+Node: Faces and Window-System Objects\7f1665409
+Node: Faces\7f1665733
+Node: Merging Faces\7f1667350
+Node: Basic Face Functions\7f1669311
+Node: Face Properties\7f1671409
+Node: Face Convenience Functions\7f1681651
+Node: Other Face Display Functions\7f1684781
+Node: Fonts\7f1685594
+Node: Font Specifiers\7f1686295
+Node: Font Instances\7f1687480
+Node: Font Instance Names\7f1688447
+Node: Font Instance Size\7f1689288
+Node: Font Instance Characteristics\7f1690574
+Node: Font Convenience Functions\7f1691743
+Node: Colors\7f1693033
+Node: Color Specifiers\7f1693473
+Node: Color Instances\7f1695831
+Node: Color Instance Properties\7f1696575
+Node: Color Convenience Functions\7f1697201
+Node: Glyphs\7f1698254
+Node: Glyph Functions\7f1699855
+Node: Creating Glyphs\7f1700262
+Node: Glyph Properties\7f1712902
+Node: Glyph Convenience Functions\7f1722069
+Node: Glyph Dimensions\7f1726016
+Node: Images\7f1727096
+Node: Image Specifiers\7f1727545
+Node: Image Instantiator Conversion\7f1742891
+Node: Image Instances\7f1744256
+Node: Image Instance Types\7f1745007
+Node: Image Instance Functions\7f1747770
+Node: Glyph Types\7f1754821
+Node: Mouse Pointer\7f1756593
+Node: Redisplay Glyphs\7f1759596
+Node: Subwindows\7f1760629
+Node: Annotations\7f1760872
+Node: Annotation Basics\7f1761888
+Node: Annotation Primitives\7f1765826
+Node: Annotation Properties\7f1767155
+Node: Locating Annotations\7f1770195
+Node: Margin Primitives\7f1771032
+Node: Annotation Hooks\7f1772926
+Node: Display\7f1773586
+Node: Refresh Screen\7f1774564
+Node: Truncation\7f1776475
+Node: The Echo Area\7f1779000
+Node: Warnings\7f1785435
+Node: Invisible Text\7f1789871
+Node: Selective Display\7f1792450
+Node: Overlay Arrow\7f1796576
+Node: Temporary Displays\7f1797929
+Node: Blinking\7f1802050
+Node: Usual Display\7f1804235
+Node: Display Tables\7f1806784
+Node: Display Table Format\7f1807588
+Node: Active Display Table\7f1809030
+Node: Character Descriptors\7f1813025
+Node: Beeping\7f1813782
+Node: Hash Tables\7f1818548
+Node: Introduction to Hash Tables\7f1819156
+Node: Working With Hash Tables\7f1825715
+Node: Weak Hash Tables\7f1826832
+Node: Range Tables\7f1828849
+Node: Introduction to Range Tables\7f1829538
+Node: Working With Range Tables\7f1829969
+Node: Databases\7f1830854
+Node: Connecting to a Database\7f1831153
+Node: Working With a Database\7f1832245
+Node: Other Database Functions\7f1833103
+Node: Processes\7f1833677
+Node: Subprocess Creation\7f1835901
+Node: Synchronous Processes\7f1839190
+Node: MS-DOS Subprocesses\7f1845908
+Node: Asynchronous Processes\7f1846982
+Node: Deleting Processes\7f1850695
+Node: Process Information\7f1852566
+Node: Input to Processes\7f1856492
+Node: Signals to Processes\7f1858782
+Node: Output from Processes\7f1863598
+Node: Process Buffers\7f1864410
+Node: Filter Functions\7f1867277
+Node: Accepting Output\7f1872847
+Node: Sentinels\7f1874374
+Node: Process Window Size\7f1877864
+Node: Transaction Queues\7f1878213
+Node: Network\7f1879911
+Node: System Interface\7f1881745
+Node: Starting Up\7f1883015
+Node: Start-up Summary\7f1883609
+Node: Init File\7f1887163
+Node: Terminal-Specific\7f1889544
+Node: Command Line Arguments\7f1892703
+Node: Getting Out\7f1896192
+Node: Killing XEmacs\7f1896761
+Node: Suspending XEmacs\7f1898430
+Node: System Environment\7f1901772
+Node: User Identification\7f1908439
+Node: Time of Day\7f1911968
+Node: Time Conversion\7f1914755
+Node: Timers\7f1919795
+Node: Terminal Input\7f1921968
+Node: Input Modes\7f1922471
+Node: Translating Input\7f1924884
+Node: Recording Input\7f1929049
+Node: Terminal Output\7f1931149
+Node: Flow Control\7f1934772
+Node: Batch Mode\7f1938564
+Node: X-Windows\7f1939946
+Node: X Selections\7f1940817
+Node: X Server\7f1943027
+Node: Resources\7f1943478
+Node: Server Data\7f1948787
+Node: Grabs\7f1949994
+Node: X Miscellaneous\7f1951574
+Node: ToolTalk Support\7f1953959
+Node: XEmacs ToolTalk API Summary\7f1954176
+Node: Sending Messages\7f1955476
+Node: Example of Sending Messages\7f1955727
+Node: Elisp Interface for Sending Messages\7f1956789
+Node: Receiving Messages\7f1963181
+Node: Example of Receiving Messages\7f1963404
+Node: Elisp Interface for Receiving Messages\7f1964240
+Node: LDAP Support\7f1968065
+Node: Building XEmacs with LDAP support\7f1968559
+Node: XEmacs LDAP API\7f1969536
+Node: LDAP Variables\7f1970588
+Node: The High-Level LDAP API\7f1973188
+Node: The Low-Level LDAP API\7f1976651
+Node: The LDAP Lisp Object\7f1977482
+Node: Opening and Closing a LDAP Connection\7f1978035
+Node: Low-level Operations on a LDAP Server\7f1979835
+Node: LDAP Internationalization\7f1982529
+Node: LDAP Internationalization Variables\7f1983434
+Node: Encoder/Decoder Functions\7f1985163
+Node: Syntax of Search Filters\7f1986202
+Node: PostgreSQL Support\7f1987500
+Node: Building XEmacs with PostgreSQL support\7f1987895
+Node: XEmacs PostgreSQL libpq API\7f1989242
+Node: libpq Lisp Variables\7f1991121
+Node: libpq Lisp Symbols and DataTypes\7f1994085
+Node: Synchronous Interface Functions\7f2007325
+Node: Asynchronous Interface Functions\7f2011816
+Node: Large Object Support\7f2015319
+Node: Other libpq Functions\7f2015946
+Node: Unimplemented libpq Functions\7f2018981
+Node: XEmacs PostgreSQL libpq Examples\7f2024300
+Node: Internationalization\7f2030391
+Node: I18N Levels 1 and 2\7f2030734
+Node: I18N Level 3\7f2031440
+Node: Level 3 Basics\7f2031721
+Node: Level 3 Primitives\7f2032554
+Node: Dynamic Messaging\7f2034160
+Node: Domain Specification\7f2034623
+Node: Documentation String Extraction\7f2036526
+Node: I18N Level 4\7f2037444
+Node: MULE\7f2037636
+Node: Internationalization Terminology\7f2038685
+Node: Charsets\7f2050884
+Node: Charset Properties\7f2051580
+Node: Basic Charset Functions\7f2056295
+Node: Charset Property Functions\7f2058476
+Node: Predefined Charsets\7f2060518
+Node: MULE Characters\7f2063438
+Node: Composite Characters\7f2064285
+Node: Coding Systems\7f2065545
+Node: Coding System Types\7f2067685
+Node: ISO 2022\7f2071669
+Node: EOL Conversion\7f2083944
+Node: Coding System Properties\7f2085116
+Node: Basic Coding System Functions\7f2089433
+Node: Coding System Property Functions\7f2091467
+Node: Encoding and Decoding Text\7f2092025
+Node: Detection of Textual Encoding\7f2093161
+Node: Big5 and Shift-JIS Functions\7f2094697
+Node: Predefined Coding Systems\7f2095823
+Node: CCL\7f2107917
+Node: CCL Syntax\7f2111021
+Node: CCL Statements\7f2112597
+Node: CCL Expressions\7f2117245
+Node: Calling CCL\7f2119784
+Node: CCL Examples\7f2122773
+Node: Category Tables\7f2122910
+Node: Tips\7f2125268
+Node: Style Tips\7f2125909
+Node: Compilation Tips\7f2135428
+Node: Documentation Tips\7f2137342
+Node: Comment Tips\7f2142851
+Node: Library Headers\7f2145853
+Node: Building XEmacs and Object Allocation\7f2149825
+Node: Building XEmacs\7f2150708
+Node: Pure Storage\7f2157043
+Node: Garbage Collection\7f2159831
+Node: Standard Errors\7f2170970
+Node: Standard Buffer-Local Variables\7f2175179
+Node: Standard Keymaps\7f2177812
+Node: Standard Hooks\7f2181544
+Node: Index\7f2189044
\1f
End Tag Table
\1f
Indirect:
xemacs-faq.info-1: 205
-xemacs-faq.info-2: 50085
-xemacs-faq.info-3: 99258
-xemacs-faq.info-4: 149252
-xemacs-faq.info-5: 196331
+xemacs-faq.info-2: 50174
+xemacs-faq.info-3: 99767
+xemacs-faq.info-4: 149758
+xemacs-faq.info-5: 199303
\1f
Tag Table:
(Indirect)
Node: Top\7f205
-Node: Introduction\7f16702
-Node: Q1.0.1\7f20105
-Node: Q1.0.2\7f20641
-Node: Q1.0.3\7f21136
-Node: Q1.0.4\7f21398
-Node: Q1.0.5\7f22848
-Node: Q1.0.6\7f23537
-Node: Q1.0.7\7f24543
-Node: Q1.0.8\7f24792
-Node: Q1.0.9\7f25007
-Node: Q1.0.10\7f25285
-Node: Q1.0.11\7f25528
-Node: Q1.0.12\7f25917
-Node: Q1.0.13\7f26285
-Node: Q1.0.14\7f26534
-Node: Q1.1.1\7f27008
-Node: Q1.1.2\7f28085
-Node: Q1.1.3\7f28478
-Node: Q1.2.1\7f29429
-Node: Q1.2.2\7f30485
-Node: Q1.2.3\7f30919
-Node: Q1.3.1\7f32003
-Node: Q1.3.2\7f35919
-Node: Q1.3.3\7f36474
-Node: Q1.3.4\7f36715
-Node: Q1.3.5\7f37503
-Node: Q1.3.6\7f39918
-Node: Q1.3.7\7f41455
-Node: Q1.4.1\7f42390
-Node: Q1.4.2\7f43252
-Node: Q1.4.3\7f43593
-Node: Q1.4.4\7f44012
-Node: Q1.4.5\7f45552
-Node: Q1.4.6\7f45856
-Node: Installation\7f46849
-Node: Q2.0.1\7f49212
-Node: Q2.0.2\7f50085
-Node: Q2.0.3\7f57537
-Node: Q2.0.4\7f58835
-Node: Q2.0.5\7f59427
-Node: Q2.0.6\7f59795
-Node: Q2.0.7\7f60176
-Node: Q2.0.8\7f60557
-Node: Q2.0.9\7f62134
-Node: Q2.0.10\7f63572
-Node: Q2.0.11\7f64416
-Node: Q2.0.12\7f65357
-Node: Q2.1.1\7f66879
-Node: Q2.1.2\7f69621
-Node: Q2.1.3\7f70798
-Node: Q2.1.4\7f72091
-Node: Q2.1.5\7f72890
-Node: Q2.1.6\7f73252
-Node: Q2.1.7\7f73729
-Node: Q2.1.8\7f74082
-Node: Q2.1.9\7f75616
-Node: Q2.1.10\7f76038
-Node: Q2.1.11\7f76795
-Node: Q2.1.12\7f77660
-Node: Q2.1.13\7f78615
-Node: Q2.1.14\7f79646
-Node: Q2.1.15\7f80757
-Node: Q2.1.16\7f87789
-Node: Q2.1.17\7f88483
-Node: Q2.1.18\7f89080
-Node: Q2.1.19\7f89207
-Node: Q2.1.20\7f89737
-Node: Q2.1.21\7f90119
-Node: Q2.1.22\7f90312
-Node: Q2.1.23\7f91609
-Node: Q2.1.24\7f92277
-Node: Customization\7f92733
-Node: Q3.0.1\7f97571
-Node: Q3.0.2\7f98277
-Node: Q3.0.3\7f98841
-Node: Q3.0.4\7f99258
-Node: Q3.0.5\7f100091
-Node: Q3.0.6\7f100872
-Node: Q3.0.7\7f101452
-Node: Q3.0.8\7f102116
-Node: Q3.0.9\7f103074
-Node: Q3.1.1\7f103635
-Node: Q3.1.2\7f104372
-Node: Q3.1.3\7f104803
-Node: Q3.1.4\7f104992
-Node: Q3.1.5\7f105181
-Node: Q3.1.6\7f105565
-Node: Q3.1.7\7f106274
-Node: Q3.1.8\7f108498
-Node: Q3.2.1\7f109040
-Node: Q3.2.2\7f110693
-Node: Q3.2.3\7f111492
-Node: Q3.2.4\7f112094
-Node: Q3.2.5\7f113128
-Node: Q3.2.6\7f113595
-Node: Q3.3.1\7f114520
-Node: Q3.3.2\7f114950
-Node: Q3.3.3\7f115581
-Node: Q3.3.4\7f115962
-Node: Q3.3.5\7f117063
-Node: Q3.4.1\7f118557
-Node: Q3.4.2\7f119200
-Node: Q3.5.1\7f119712
-Node: Q3.5.2\7f121161
-Node: Q3.5.3\7f121579
-Node: Q3.5.4\7f122417
-Node: Q3.5.5\7f123249
-Node: Q3.5.6\7f124389
-Node: Q3.5.7\7f125379
-Node: Q3.5.8\7f126819
-Node: Q3.5.9\7f127566
-Node: Q3.5.10\7f128346
-Node: Q3.5.11\7f128982
-Node: Q3.6.1\7f129535
-Node: Q3.6.2\7f130280
-Node: Q3.6.3\7f130708
-Node: Q3.7.1\7f131208
-Node: Q3.7.2\7f132096
-Node: Q3.7.3\7f132755
-Node: Q3.7.4\7f133177
-Node: Q3.7.5\7f133520
-Node: Q3.7.6\7f133988
-Node: Q3.7.7\7f134703
-Node: Q3.7.8\7f135723
-Node: Q3.8.1\7f136142
-Node: Q3.8.2\7f136602
-Node: Q3.8.3\7f137065
-Node: Q3.8.4\7f137671
-Node: Q3.8.5\7f138390
-Node: Q3.9.1\7f139175
-Node: Q3.9.2\7f140115
-Node: Q3.9.3\7f140713
-Node: Q3.9.4\7f141375
-Node: Q3.10.1\7f142254
-Node: Q3.10.2\7f143072
-Node: Q3.10.3\7f144077
-Node: Q3.10.4\7f144805
-Node: Q3.10.5\7f145188
-Node: Subsystems\7f146240
-Node: Q4.0.1\7f148727
-Node: Q4.0.2\7f149252
-Node: Q4.0.3\7f149810
-Node: Q4.0.4\7f150131
-Node: Q4.0.5\7f150373
-Node: Q4.0.6\7f150604
-Node: Q4.0.7\7f151192
-Node: Q4.0.8\7f151517
-Node: Q4.0.9\7f152744
-Node: Q4.0.10\7f154782
-Node: Q4.0.11\7f155271
-Node: Q4.0.12\7f156149
-Node: Q4.1.1\7f157122
-Node: Q4.1.2\7f157525
-Node: Q4.1.3\7f157852
-Node: Q4.2.1\7f158161
-Node: Q4.2.2\7f158791
-Node: Q4.2.3\7f159031
-Node: Q4.2.4\7f159575
-Node: Q4.3.1\7f160228
-Node: Q4.3.2\7f160812
-Node: Q4.3.3\7f162293
-Node: Q4.3.4\7f162565
-Node: Q4.3.5\7f163242
-Node: Q4.4.1\7f163870
-Node: Q4.4.2\7f165356
-Node: Q4.5.1\7f166560
-Node: Q4.6.1\7f167329
-Node: Q4.7.1\7f172589
-Node: Q4.7.2\7f173544
-Node: Q4.7.3\7f173841
-Node: Q4.7.4\7f174027
-Node: Q4.7.5\7f174911
-Node: Q4.7.6\7f176552
-Node: Miscellaneous\7f176841
-Node: Q5.0.1\7f180258
-Node: Q5.0.2\7f180997
-Node: Q5.0.3\7f181851
-Node: Q5.0.4\7f182553
-Node: Q5.0.5\7f183492
-Node: Q5.0.6\7f185472
-Node: Q5.0.7\7f186129
-Node: Q5.0.8\7f186734
-Node: Q5.0.9\7f187253
-Node: Q5.0.10\7f187767
-Node: Q5.0.11\7f188015
-Node: Q5.0.12\7f188553
-Node: Q5.0.13\7f189470
-Node: Q5.0.14\7f190154
-Node: Q5.0.15\7f190919
-Node: Q5.0.16\7f191216
-Node: Q5.0.17\7f191728
-Node: Q5.0.18\7f191993
-Node: Q5.0.19\7f192187
-Node: Q5.0.20\7f192611
-Node: Q5.1.1\7f193526
-Node: Q5.1.2\7f195595
-Node: Q5.1.3\7f196331
-Node: Q5.1.4\7f199725
-Node: Q5.1.5\7f200260
-Node: Q5.1.6\7f202384
-Node: Q5.1.7\7f203870
-Node: Q5.1.8\7f205471
-Node: Q5.1.9\7f206023
-Node: Q5.1.10\7f206908
-Node: Q5.1.11\7f208039
-Node: Q5.2.1\7f208588
-Node: Q5.2.2\7f209158
-Node: Q5.2.3\7f209575
-Node: Q5.2.4\7f209810
-Node: Q5.3.1\7f210720
-Node: Q5.3.2\7f211941
-Node: Q5.3.3\7f212717
-Node: Q5.3.4\7f213201
-Node: Q5.3.5\7f213868
-Node: Q5.3.6\7f214737
-Node: Q5.3.7\7f214982
-Node: Q5.3.8\7f217172
-Node: Q5.3.9\7f217419
-Node: Q5.3.10\7f218372
-Node: Q5.3.11\7f220456
-Node: Q5.3.12\7f222047
-Node: MS Windows\7f223321
-Node: Q6.0.1\7f224798
-Node: Q6.0.2\7f225545
-Node: Q6.0.3\7f226010
-Node: Q6.0.4\7f226290
-Node: Q6.1.1\7f228569
-Node: Q6.1.2\7f229440
-Node: Q6.1.3\7f229895
-Node: Q6.1.4\7f230177
-Node: Q6.1.5\7f230555
-Node: Q6.1.6\7f231423
-Node: Q6.2.1\7f233729
-Node: Q6.2.2\7f234630
-Node: Q6.2.3\7f235042
-Node: Q6.3.1\7f235331
-Node: Q6.3.2\7f236425
-Node: Q6.3.3\7f239606
-Node: Q6.4.1\7f239875
-Node: Current Events\7f241210
-Node: Q7.0.1\7f241864
-Node: Q7.0.2\7f242503
-Node: Q7.0.3\7f243576
-Node: Q7.0.4\7f243804
+Node: Introduction\7f16499
+Node: Q1.0.1\7f19941
+Node: Q1.0.2\7f20477
+Node: Q1.0.3\7f21022
+Node: Q1.0.4\7f21284
+Node: Q1.0.5\7f22734
+Node: Q1.0.6\7f23423
+Node: Q1.0.7\7f24429
+Node: Q1.0.8\7f24682
+Node: Q1.0.9\7f24897
+Node: Q1.0.10\7f25175
+Node: Q1.0.11\7f25418
+Node: Q1.0.12\7f25807
+Node: Q1.0.13\7f26175
+Node: Q1.0.14\7f26424
+Node: Q1.1.1\7f26934
+Node: Q1.1.2\7f27976
+Node: Q1.1.3\7f28369
+Node: Q1.2.1\7f29320
+Node: Q1.2.2\7f30376
+Node: Q1.2.3\7f30810
+Node: Q1.3.1\7f31894
+Node: Q1.3.2\7f32545
+Node: Q1.3.3\7f33009
+Node: Q1.3.4\7f33250
+Node: Q1.3.5\7f34023
+Node: Q1.3.6\7f36428
+Node: Q1.3.7\7f37959
+Node: Q1.4.1\7f38894
+Node: Q1.4.2\7f39756
+Node: Q1.4.3\7f40097
+Node: Q1.4.4\7f40516
+Node: Q1.4.5\7f42056
+Node: Q1.4.6\7f42360
+Node: Installation\7f43353
+Node: Q2.0.1\7f45716
+Node: Q2.0.2\7f46516
+Node: Q2.0.3\7f48284
+Node: Q2.0.4\7f49582
+Node: Q2.0.5\7f50174
+Node: Q2.0.6\7f50522
+Node: Q2.0.7\7f50903
+Node: Q2.0.8\7f51284
+Node: Q2.0.9\7f52861
+Node: Q2.0.10\7f54299
+Node: Q2.0.11\7f55143
+Node: Q2.0.12\7f56084
+Node: Q2.1.1\7f57606
+Node: Q2.1.2\7f60348
+Node: Q2.1.3\7f61525
+Node: Q2.1.4\7f62818
+Node: Q2.1.5\7f63617
+Node: Q2.1.6\7f63979
+Node: Q2.1.7\7f64456
+Node: Q2.1.8\7f64809
+Node: Q2.1.9\7f66343
+Node: Q2.1.10\7f66765
+Node: Q2.1.11\7f67522
+Node: Q2.1.12\7f68387
+Node: Q2.1.13\7f69342
+Node: Q2.1.14\7f70373
+Node: Q2.1.15\7f71484
+Node: Q2.1.16\7f78516
+Node: Q2.1.17\7f79210
+Node: Q2.1.18\7f79807
+Node: Q2.1.19\7f79934
+Node: Q2.1.20\7f80464
+Node: Q2.1.21\7f80846
+Node: Q2.1.22\7f81039
+Node: Q2.1.23\7f82336
+Node: Q2.1.24\7f83004
+Node: Customization\7f83460
+Node: Q3.0.1\7f88298
+Node: Q3.0.2\7f89004
+Node: Q3.0.3\7f89568
+Node: Q3.0.4\7f89985
+Node: Q3.0.5\7f90818
+Node: Q3.0.6\7f91599
+Node: Q3.0.7\7f92179
+Node: Q3.0.8\7f92843
+Node: Q3.0.9\7f93801
+Node: Q3.1.1\7f94362
+Node: Q3.1.2\7f95099
+Node: Q3.1.3\7f95530
+Node: Q3.1.4\7f95719
+Node: Q3.1.5\7f95908
+Node: Q3.1.6\7f96292
+Node: Q3.1.7\7f97001
+Node: Q3.1.8\7f99225
+Node: Q3.2.1\7f99767
+Node: Q3.2.2\7f101420
+Node: Q3.2.3\7f102219
+Node: Q3.2.4\7f102821
+Node: Q3.2.5\7f103855
+Node: Q3.2.6\7f104322
+Node: Q3.3.1\7f105247
+Node: Q3.3.2\7f105677
+Node: Q3.3.3\7f106308
+Node: Q3.3.4\7f106689
+Node: Q3.3.5\7f107790
+Node: Q3.4.1\7f109284
+Node: Q3.4.2\7f109927
+Node: Q3.5.1\7f110439
+Node: Q3.5.2\7f111888
+Node: Q3.5.3\7f112306
+Node: Q3.5.4\7f113144
+Node: Q3.5.5\7f113976
+Node: Q3.5.6\7f115116
+Node: Q3.5.7\7f116106
+Node: Q3.5.8\7f117546
+Node: Q3.5.9\7f118293
+Node: Q3.5.10\7f119073
+Node: Q3.5.11\7f119709
+Node: Q3.6.1\7f120262
+Node: Q3.6.2\7f121007
+Node: Q3.6.3\7f121435
+Node: Q3.7.1\7f121935
+Node: Q3.7.2\7f122823
+Node: Q3.7.3\7f123482
+Node: Q3.7.4\7f123904
+Node: Q3.7.5\7f124247
+Node: Q3.7.6\7f124715
+Node: Q3.7.7\7f125430
+Node: Q3.7.8\7f126450
+Node: Q3.8.1\7f126869
+Node: Q3.8.2\7f127329
+Node: Q3.8.3\7f127792
+Node: Q3.8.4\7f128398
+Node: Q3.8.5\7f129117
+Node: Q3.9.1\7f129902
+Node: Q3.9.2\7f130842
+Node: Q3.9.3\7f131440
+Node: Q3.9.4\7f132102
+Node: Q3.10.1\7f132981
+Node: Q3.10.2\7f133799
+Node: Q3.10.3\7f134804
+Node: Q3.10.4\7f135532
+Node: Q3.10.5\7f135915
+Node: Subsystems\7f136967
+Node: Q4.0.1\7f139454
+Node: Q4.0.2\7f139979
+Node: Q4.0.3\7f140537
+Node: Q4.0.4\7f140858
+Node: Q4.0.5\7f141100
+Node: Q4.0.6\7f141331
+Node: Q4.0.7\7f141919
+Node: Q4.0.8\7f142244
+Node: Q4.0.9\7f143471
+Node: Q4.0.10\7f145509
+Node: Q4.0.11\7f145998
+Node: Q4.0.12\7f146876
+Node: Q4.1.1\7f147849
+Node: Q4.1.2\7f148252
+Node: Q4.1.3\7f148579
+Node: Q4.2.1\7f148888
+Node: Q4.2.2\7f149518
+Node: Q4.2.3\7f149758
+Node: Q4.2.4\7f150302
+Node: Q4.3.1\7f150955
+Node: Q4.3.2\7f151539
+Node: Q4.3.3\7f153020
+Node: Q4.3.4\7f153292
+Node: Q4.3.5\7f153969
+Node: Q4.4.1\7f154597
+Node: Q4.4.2\7f156083
+Node: Q4.5.1\7f157287
+Node: Q4.6.1\7f158056
+Node: Q4.7.1\7f163316
+Node: Q4.7.2\7f164271
+Node: Q4.7.3\7f164568
+Node: Q4.7.4\7f164754
+Node: Q4.7.5\7f165638
+Node: Q4.7.6\7f167279
+Node: Miscellaneous\7f167568
+Node: Q5.0.1\7f170981
+Node: Q5.0.2\7f171720
+Node: Q5.0.3\7f172574
+Node: Q5.0.4\7f173276
+Node: Q5.0.5\7f174215
+Node: Q5.0.6\7f176195
+Node: Q5.0.7\7f176852
+Node: Q5.0.8\7f177457
+Node: Q5.0.9\7f177976
+Node: Q5.0.10\7f178490
+Node: Q5.0.11\7f178738
+Node: Q5.0.12\7f179276
+Node: Q5.0.13\7f180193
+Node: Q5.0.14\7f180877
+Node: Q5.0.15\7f181642
+Node: Q5.0.16\7f181939
+Node: Q5.0.17\7f182451
+Node: Q5.0.18\7f182716
+Node: Q5.0.19\7f182910
+Node: Q5.0.20\7f183334
+Node: Q5.1.1\7f184249
+Node: Q5.1.2\7f186318
+Node: Q5.1.3\7f187054
+Node: Q5.1.4\7f190448
+Node: Q5.1.5\7f190983
+Node: Q5.1.6\7f193107
+Node: Q5.1.7\7f194593
+Node: Q5.1.8\7f196186
+Node: Q5.1.9\7f196738
+Node: Q5.1.10\7f197623
+Node: Q5.1.11\7f198754
+Node: Q5.2.1\7f199303
+Node: Q5.2.2\7f199873
+Node: Q5.2.3\7f200290
+Node: Q5.2.4\7f200525
+Node: Q5.3.1\7f201435
+Node: Q5.3.2\7f202656
+Node: Q5.3.3\7f203432
+Node: Q5.3.4\7f203916
+Node: Q5.3.5\7f204583
+Node: Q5.3.6\7f205452
+Node: Q5.3.7\7f205697
+Node: Q5.3.8\7f207887
+Node: Q5.3.9\7f208134
+Node: Q5.3.10\7f209087
+Node: Q5.3.11\7f211171
+Node: Q5.3.12\7f212762
+Node: MS Windows\7f214036
+Node: Q6.0.1\7f215513
+Node: Q6.0.2\7f216260
+Node: Q6.0.3\7f216725
+Node: Q6.0.4\7f217005
+Node: Q6.1.1\7f219284
+Node: Q6.1.2\7f220155
+Node: Q6.1.3\7f220610
+Node: Q6.1.4\7f220892
+Node: Q6.1.5\7f221270
+Node: Q6.1.6\7f222138
+Node: Q6.2.1\7f224444
+Node: Q6.2.2\7f225345
+Node: Q6.2.3\7f225757
+Node: Q6.3.1\7f226046
+Node: Q6.3.2\7f227140
+Node: Q6.3.3\7f230321
+Node: Q6.4.1\7f230590
+Node: Current Events\7f231925
+Node: Q7.0.1\7f232579
+Node: Q7.0.2\7f233218
+Node: Q7.0.3\7f234291
+Node: Q7.0.4\7f234519
\1f
End Tag Table
This is the guide to the XEmacs Frequently Asked Questions list--a
compendium of questions and answers pertaining to one of the finest
-programs ever written. It is much more than just a Text Editor.
+programs ever written. XEmacs is much more than just a Text Editor.
- This FAQ is freely redistributable. I take no liability for the
-correctness and safety of any procedures or advice given here. This
-FAQ is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.
+ This FAQ is freely redistributable. This FAQ is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you have a Web browser, the official hypertext version is at
-`http://www.xemacs.org/faq/xemacs-faq.html'.
-
- This version is somewhat nicer than the unofficial hypertext versions
-that are archived at Utrecht, Oxford, Smart Pages, and other FAQ
-archives.
+`http://www.xemacs.org/faq/xemacs-faq.html'
* Menu:
* Q1.0.4:: Why Another Version of Emacs?
* Q1.0.5:: Why Haven't XEmacs and GNU Emacs Merged?
* Q1.0.6:: Where can I get help?
-* Q1.0.7:: Where is the mailing list archived?
+* Q1.0.7:: Where are the mailing lists archived?
* Q1.0.8:: How do you pronounce XEmacs?
* Q1.0.9:: What does XEmacs look like?
* Q1.0.10:: Is there a port of XEmacs to Microsoft ('95 or NT)?
* Q1.2.3:: Who contributed to the FAQ in the past?
Internationalization:
-* Q1.3.1:: What is the status of XEmacs v20?
-* Q1.3.2:: What is the status of Asian-language support, aka MULE?
+* Q1.3.1:: What is the status of internationalization support aka MULE (including Asian language support?
+* Q1.3.2:: How can I help with internationalization?
* Q1.3.3:: How do I type non-ASCII characters?
* Q1.3.4:: Can XEmacs messages come out in a different language?
-* Q1.3.5:: Please explain the various input methods in MULE/XEmacs 20.0
-* Q1.3.6:: How do I portably code for MULE/XEmacs 20.0?
+* Q1.3.5:: Please explain the various input methods in MULE/XEmacs
+* Q1.3.6:: How do I portably code for MULE/XEmacs?
* Q1.3.7:: How about Cyrillic Modes?
Getting Started:
* Q5.1.4:: What is the performance hit of `let'?
* Q5.1.5:: What is the recommended use of `setq'?
* Q5.1.6:: What is the typical misuse of `setq' ?
-* Q5.1.7:: I like the the `do' form of cl, does it slow things down?
+* Q5.1.7:: I like the `do' form of cl, does it slow things down?
* Q5.1.8:: I like recursion, does it slow things down?
* Q5.1.9:: How do I put a glyph as annotation in a buffer?
* Q5.1.10:: `map-extents' won't traverse all of my extents!
* Q1.0.4:: Why Another Version of Emacs?
* Q1.0.5:: Why Haven't XEmacs and GNU Emacs Merged?
* Q1.0.6:: Where can I get help?
-* Q1.0.7:: Where is the mailing list archived?
+* Q1.0.7:: Where are the mailing lists archived?
* Q1.0.8:: How do you pronounce XEmacs?
* Q1.0.9:: What does XEmacs look like?
* Q1.0.10:: Is there a port of XEmacs to Microsoft ('95 or NT)?
* Q1.2.3:: Who contributed to the FAQ in the past?
Internationalization:
-* Q1.3.1:: What is the status of XEmacs v20?
-* Q1.3.2:: What is the status of Asian-language support, aka MULE?
+* Q1.3.1:: What is the status of internationalization support aka MULE (including Asian language support?
+* Q1.3.2:: How can I help with internationalization?
* Q1.3.3:: How do I type non-ASCII characters?
* Q1.3.4:: Can XEmacs messages come out in a different language?
-* Q1.3.5:: Please explain the various input methods in MULE/XEmacs 20.0
-* Q1.3.6:: How do I portably code for MULE/XEmacs 20.0?
+* Q1.3.5:: Please explain the various input methods in MULE/XEmacs
+* Q1.3.6:: How do I portably code for MULE/XEmacs?
* Q1.3.7:: How about Cyrillic Modes?
Getting Started:
Q1.0.2: What is the current version of XEmacs?
----------------------------------------------
- XEmacs 21.1.8 is the current stable version of XEmacs.
-
- XEmacs 20.4 is a minor upgrade from 20.3, containing many bugfixes.
-It was released in February 1998.
+ XEmacs versions 21.1.* are releases made from the current stable
+sources. XEmacs versions 21.2.* are releases made from the development
+sources. Check at `http://www.xemacs.org' for the current minor
+version.
XEmacs 19.16 was the last release of v19, released in November, 1997,
which was also the last version without international language support.
\1f
File: xemacs-faq.info, Node: Q1.0.7, Next: Q1.0.8, Prev: Q1.0.6, Up: Introduction
-Q1.0.7: Where is the mailing list archived?
--------------------------------------------
+Q1.0.7: Where are the mailing lists archived?
+---------------------------------------------
The archives can be found at `http://www.xemacs.org/Lists/Archive'
TeX, you can generate your own manual from the XEmacs sources.
HTML and Postscript versions of XEmacs manuals may be available from
-the XEmacs web site in the future.
+the XEmacs web site in the future. Send requests to <faq@xemacs.org>.
\1f
File: xemacs-faq.info, Node: Q1.1.1, Next: Q1.1.2, Prev: Q1.0.14, Up: Introduction
Please make sure that `XEmacs FAQ' appears on the Subject: line. If
you think you have a better way of answering a question, or think a
question should be included, we'd like to hear about it. Questions and
-answers included into the FAQ will be edited for spelling and grammar,
+answers included into the FAQ will be edited for spelling and grammar
and will be attributed. Answers appearing without attribution are
-either from versions of the FAQ dated before May 1996, or are from one
-of the four people listed at the top of this document. Answers quoted
-from Usenet news articles will always be attributed, regardless of the
-author.
+either from versions of the FAQ dated before May 1996 or are from
+previous FAQ maintainers. Answers quoted from Usenet news articles will
+always be attributed, regardless of the author.
\1f
File: xemacs-faq.info, Node: Q1.1.2, Next: Q1.1.3, Prev: Q1.1.1, Up: Introduction
1.3: Internationalization
=========================
-Q1.3.1: What is the status of XEmacs v20?
------------------------------------------
+Q1.3.1: What is the status of internationalization support aka MULE (including Asian language support?
+------------------------------------------------------------------------------------------------------
- XEmacs v20 is the version of XEmacs that includes MULE
-(Asian-language) support. XEmacs 20.0 was released in February 1997,
-followed by XEmacs 20.2 in May, XEmacs 20.3 in November and XEmacs 20.4
-in February 1998. When compiled without MULE support, 20.4 is
-approximately as stable as 19.16, and probably faster (due to
-additional optimization work.)
-
- As of XEmacs 20.3, version 20 is _the_ supported version of XEmacs.
-This means that 19.16 will optionally receive stability fixes (if any),
-but that all the real development work will be done on the v20 tree.
-
- The incompatible changes in XEmacs 20 include the additional
-byte-codes, new primitive data types (`character', `char-table', and
-`range-table'). This means that the character-integer equivalence
-inherent to all the previous Emacs and XEmacs releases no longer
-applies.
-
- However, to avoid breaking old code, many functions that should
-normally accept characters work with integers, and vice versa. For more
-information, see the Lisp reference manual. Here is a relevant excerpt,
-for your convenience.
-
- In XEmacs version 19, and in all versions of FSF GNU Emacs, a
- "character" in XEmacs Lisp is nothing more than an integer. This
- is yet another holdover from XEmacs Lisp's derivation from
- vintage-1980 Lisps; modern versions of Lisp consider this
- equivalence a bad idea, and have separate character types. In
- XEmacs version 20, the modern convention is followed, and
- characters are their own primitive types. (This change was
- necessary in order for MULE, i.e. Asian-language, support to be
- correctly implemented.)
-
- Even in XEmacs version 20, remnants of the equivalence between
- characters and integers still exist; this is termed the "char-int
- confoundance disease". In particular, many functions such as `eq',
- `equal', and `memq' have equivalent functions (`old-eq',
- `old-equal', `old-memq', etc.) that pretend like characters are
- integers are the same. Byte code compiled under any version 19
- Emacs will have all such functions mapped to their `old-'
- equivalents when the byte code is read into XEmacs 20. This is to
- preserve compatibility--Emacs 19 converts all constant characters
- to the equivalent integer during byte-compilation, and thus there
- is no other way to preserve byte-code compatibility even if the
- code has specifically been written with the distinction between
- characters and integers in mind.
-
- Every character has an equivalent integer, called the "character
- code". For example, the character `A' is represented as the
- integer 65, following the standard ASCII representation of
- characters. If XEmacs was not compiled with MULE support, the
- range of this integer will always be 0 to 255--eight bits, or one
- byte. (Integers outside this range are accepted but silently
- truncated; however, you should most decidedly _not_ rely on this,
- because it will not work under XEmacs with MULE support.) When
- MULE support is present, the range of character codes is much
- larger. (Currently, 19 bits are used.)
-
- FSF GNU Emacs uses kludgy character codes above 255 to represent
- keyboard input of ASCII characters in combination with certain
- modifiers. XEmacs does not use this (a more general mechanism is
- used that does not distinguish between ASCII keys and other keys),
- so you will never find character codes above 255 in a non-MULE
- XEmacs.
-
- Individual characters are not often used in programs. It is far
- more common to work with _strings_, which are sequences composed of
- characters.
+ Both the stable and development versions of XEmacs include
+internationalization support (aka MULE). MULE currently works on UNIX
+and Linux systems; work for supporting MULE on Windows operating systems
+is in progress. Binaries compiled without MULE support run faster than
+MULE capable XEmacsen.
\1f
File: xemacs-faq.info, Node: Q1.3.2, Next: Q1.3.3, Prev: Q1.3.1, Up: Introduction
-Q1.3.2: What is the status of Asian-language support, aka MULE?
----------------------------------------------------------------
-
- MULE support is now available for UNIX versions of XEmacs.
+Q1.3.2: How can I help with internationalization?
+-------------------------------------------------
If you would like to help, you may want to join the
<xemacs-mule@xemacs.org> mailing list. Especially needed are people
The message-catalog support has mostly been written but doesn't
currently work. The first release of XEmacs 20 will _not_ support it.
-However, menubar localization _does_ work, even in 19.14. To enable
-it, add to your `Emacs' file entries like this:
+However, menubar localization _does_ work. To enable it, add to your
+`Emacs' file entries like this:
Emacs*XlwMenu.resourceLabels: True
Emacs*XlwMenu.file.labelString: Fichier
\1f
File: xemacs-faq.info, Node: Q1.3.5, Next: Q1.3.6, Prev: Q1.3.4, Up: Introduction
-Q1.3.5: Please explain the various input methods in MULE/XEmacs 20.0
---------------------------------------------------------------------
+Q1.3.5: Please explain the various input methods in MULE/XEmacs
+---------------------------------------------------------------
MORIOKA Tomohiko <morioka@jaist.ac.jp> writes:
\1f
File: xemacs-faq.info, Node: Q1.3.6, Next: Q1.3.7, Prev: Q1.3.5, Up: Introduction
-Q1.3.6: How do I portably code for MULE/XEmacs 20?
---------------------------------------------------
+Q1.3.6: How do I portably code for MULE/XEmacs?
+-----------------------------------------------
MORIOKA Tomohiko <morioka@jaist.ac.jp> writes:
Q2.0.1: Running XEmacs without installing
-----------------------------------------
- The `INSTALL' file says that up to 108 MB of space is needed
-temporarily during installation! How can I just try it out?
+ How can I just try XEmacs without installing it?
XEmacs will run in place without requiring installation and copying
of the Lisp directories, and without having to specify a special
This will let you run XEmacs without massive copying.
+\1f
+File: xemacs-faq.info, Node: Q2.0.2, Next: Q2.0.3, Prev: Q2.0.1, Up: Installation
+
+Q2.0.2: XEmacs is too big
+-------------------------
+
+ The space required by the installation directories can be reduced
+dramatically if desired. Gzip all the .el files. Remove all the
+packages you'll never want to use. Remove the TexInfo manuals. Remove
+the Info (and use just hardcopy versions of the manual). Remove most
+of the stuff in etc. Remove or gzip all the source code. Gzip or
+remove the C source code. Configure it so that copies are not made of
+the support lisp.
+
+ These are all Emacs Lisp source code and bytecompiled object code.
+You may safely gzip everything named *.el here. You may remove any
+package you don't use. _Nothing bad will happen if you delete a package
+that you do not use_. You must be sure you do not use it though, so be
+conservative at first.
+
+ Possible candidates for deletion include w3, games, hyperbole, mh-e,
+hm-html-menus, vm, viper, oobr, gnus, etc. Ask yourself, _Do I ever
+want to use this package?_ If the answer is no, then it is a candidate
+for removal.
+
+ First, gzip all the .el files. Then go about package by package and
+start gzipping the .elc files. Then run XEmacs and do whatever it is
+you normally do. If nothing bad happens, then delete the directory. Be
+conservative about deleting directories, and it would be handy to have a
+backup around in case you get too zealous.
+
+ `prim', `modes', `packages', and `utils' are four directories you
+definitely do *not* want to delete, although certain packages can be
+removed from them if you do not use them.
+
+ Online texinfo sources in the `info' can either be compressed them
+or remove them. In either case, `C-h i' (info mode) will no longer
+work.
+
+\1f
+File: xemacs-faq.info, Node: Q2.0.3, Next: Q2.0.4, Prev: Q2.0.2, Up: Installation
+
+Q2.0.3: Compiling XEmacs with Netaudio.
+---------------------------------------
+
+ What is the best way to compile XEmacs with the netaudio system,
+since I have got the netaudio system compiled but installed at a weird
+place, I am not root. Also in the READMEs it does not say anything
+about compiling with the audioserver?
+
+ You should only need to add some stuff to the configure command line.
+To tell it to compile in netaudio support: `--with-sound=both', or
+`--with-sound=nas' if you don't want native sound support for some
+reason.) To tell it where to find the netaudio includes and libraries:
+
+ --site-libraries=WHATEVER
+ --site-includes=WHATEVER
+
+ Then (fingers crossed) it should compile and it will use netaudio if
+you have a server running corresponding to the X server. The netaudio
+server has to be there when XEmacs starts. If the netaudio server goes
+away and another is run, XEmacs should cope (fingers crossed, error
+handling in netaudio isn't perfect).
+
+ BTW, netaudio has been renamed as it has a name clash with something
+else, so if you see references to NAS or Network Audio System, it's the
+same thing. It also might be found at
+`ftp://ftp.x.org/contrib/audio/nas/'.
+
+\1f
+File: xemacs-faq.info, Node: Q2.0.4, Next: Q2.0.5, Prev: Q2.0.3, Up: Installation
+
+Q2.0.4: Problems with Linux and ncurses.
+----------------------------------------
+
+ On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with
+libc 5.2.18, XEmacs 20.0b20 is unable to open a tty device:
+
+ src/xemacs -nw -q
+ Initialization error:
+ Terminal type `xterm' undefined (or can't access database?)
+
+ Ben Wing <ben@xemacs.org> writes:
+
+ Your ncurses configuration is messed up. Your /usr/lib/terminfo
+ is a bad pointer, perhaps to a CD-ROM that is not inserted.
+
END-INFO-DIR-ENTRY
\1f
-File: xemacs-faq.info, Node: Q2.0.2, Next: Q2.0.3, Prev: Q2.0.1, Up: Installation
-
-Q2.0.2: XEmacs is too big
--------------------------
-
- Although this entry has been written for XEmacs 19.13, most of it
-still stands true.
-
- Steve Baur <steve@xemacs.org> writes:
-
- The 45MB of space required by the installation directories can be
- reduced dramatically if desired. Gzip all the .el files. Remove
- all the packages you'll never want to use (or even ones you do
- like the two obsolete mailcrypts and Gnus 4 in 19.13). Remove the
- TexInfo manuals. Remove the Info (and use just hardcopy versions
- of the manual). Remove most of the stuff in etc. Remove or gzip
- all the source code. Gzip or remove the C source code. Configure
- it so that copies are not made of the support lisp. I'm not
- advocating any of these things, just pointing out ways to reduce
- the disk requirements if desired.
-
- Now examine the space used by directory:
-
- 0 /usr/local/bin/xemacs
- 2048 /usr/local/bin/xemacs-19.13
-
- 1546 /usr/local/lib/xemacs-19.13/i486-miranova-sco3.2v4.2
- 1158 /usr/local/lib/xemacs-19.13/i486-unknown-linux1.2.13
-
- You need to keep these. XEmacs isn't stripped by default in
- installation, you should consider stripping. That will save you
- about 5MB right there.
-
- 207 /usr/local/lib/xemacs-19.13/etc/w3
- 122 /usr/local/lib/xemacs-19.13/etc/sounds
- 18 /usr/local/lib/xemacs-19.13/etc/sparcworks
- 159 /usr/local/lib/xemacs-19.13/etc/vm
- 6 /usr/local/lib/xemacs-19.13/etc/e
- 21 /usr/local/lib/xemacs-19.13/etc/eos
- 172 /usr/local/lib/xemacs-19.13/etc/toolbar
- 61 /usr/local/lib/xemacs-19.13/etc/ns
- 43 /usr/local/lib/xemacs-19.13/etc/gnus
-
- These are support directories for various packages. In general
- they match a directory under
- ./xemacs-19.13/lib/xemacs-19.13/lisp/. If you do not require the
- package, you may delete or gzip the support too.
-
- 1959 /usr/local/lib/xemacs-19.13/etc
- 175 /usr/local/lib/xemacs-19.13/lisp/bytecomp
- 340 /usr/local/lib/xemacs-19.13/lisp/calendar
- 342 /usr/local/lib/xemacs-19.13/lisp/comint
- 517 /usr/local/lib/xemacs-19.13/lisp/dired
- 42 /usr/local/lib/xemacs-19.13/lisp/electric
- 212 /usr/local/lib/xemacs-19.13/lisp/emulators
- 238 /usr/local/lib/xemacs-19.13/lisp/energize
- 289 /usr/local/lib/xemacs-19.13/lisp/gnus
- 457 /usr/local/lib/xemacs-19.13/lisp/ilisp
- 1439 /usr/local/lib/xemacs-19.13/lisp/modes
- 2276 /usr/local/lib/xemacs-19.13/lisp/packages
- 1040 /usr/local/lib/xemacs-19.13/lisp/prim
- 176 /usr/local/lib/xemacs-19.13/lisp/pcl-cvs
- 154 /usr/local/lib/xemacs-19.13/lisp/rmail
- 3 /usr/local/lib/xemacs-19.13/lisp/epoch
- 45 /usr/local/lib/xemacs-19.13/lisp/term
- 860 /usr/local/lib/xemacs-19.13/lisp/utils
- 851 /usr/local/lib/xemacs-19.13/lisp/vm
- 13 /usr/local/lib/xemacs-19.13/lisp/vms
- 157 /usr/local/lib/xemacs-19.13/lisp/x11
- 19 /usr/local/lib/xemacs-19.13/lisp/tooltalk
- 14 /usr/local/lib/xemacs-19.13/lisp/sunpro
- 291 /usr/local/lib/xemacs-19.13/lisp/games
- 198 /usr/local/lib/xemacs-19.13/lisp/edebug
- 619 /usr/local/lib/xemacs-19.13/lisp/w3
- 229 /usr/local/lib/xemacs-19.13/lisp/eos
- 55 /usr/local/lib/xemacs-19.13/lisp/iso
- 59 /usr/local/lib/xemacs-19.13/lisp/mailcrypt
- 187 /usr/local/lib/xemacs-19.13/lisp/eterm
- 356 /usr/local/lib/xemacs-19.13/lisp/ediff
- 408 /usr/local/lib/xemacs-19.13/lisp/hyperbole/kotl
- 1262 /usr/local/lib/xemacs-19.13/lisp/hyperbole
- 247 /usr/local/lib/xemacs-19.13/lisp/hm--html-menus
- 161 /usr/local/lib/xemacs-19.13/lisp/mh-e
- 299 /usr/local/lib/xemacs-19.13/lisp/viper
- 53 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-x
- 4 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/DocWindow.nib
- 3 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib
- 3 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/TreeView.nib
- 11 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj
- 53 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx
- 466 /usr/local/lib/xemacs-19.13/lisp/oobr
- 14142 /usr/local/lib/xemacs-19.13/lisp
-
- These are all Emacs Lisp source code and bytecompiled object code.
- You may safely gzip everything named *.el here. You may remove
- any package you don't use. _Nothing bad will happen if you delete
- a package that you do not use_. You must be sure you do not use
- it though, so be conservative at first.
-
- Possible candidates for deletion include w3 (newer versions exist,
- or you may just use Lynx or Netscape for web browsing), games,
- hyperbole, mh-e, hm-html-menus (better packages exist), vm, viper,
- oobr, gnus (new versions exist), etc. Ask yourself, _Do I ever
- want to use this package?_ If the answer is no, then it is a
- candidate for removal.
-
- First, gzip all the .el files. Then go about package by package
- and start gzipping the .elc files. Then run XEmacs and do
- whatever it is you normally do. If nothing bad happens, then
- delete the directory. Be conservative about deleting directories,
- and it would be handy to have a backup tape around in case you get
- too zealous.
-
- `prim', `modes', `packages', and `utils' are four directories you
- definitely do *not* want to delete, although certain packages can
- be removed from them if you do not use them.
-
- 1972 /usr/local/lib/xemacs-19.13/info
-
- These are online texinfo sources. You may either gzip them or
- remove them. In either case, `C-h i' (info mode) will no longer
- work.
-
- 20778 /usr/local/lib/xemacs-19.13
-
- The 20MB achieved is less than half of what the full distribution
- takes up, *and* can be achieved without deleting a single file.
-
- Giacomo Boffi <boffi@hp735.stru.polimi.it> provides this procedure:
-
- Substitute `/usr/local/lib/' with the path where the xemacs tree is
- rooted, then use this script:
-
- #!/bin/sh
-
- r=/usr/local/lib/xemacs-19.13/lisp
-
- cd $r ; rm -f cmpr ; touch cmpr
-
- du -s .
-
- for d in * ; do
- if test -d $d ; then
- cd $d
- for f in *.el ; do
- # compress (remove) only (ONLY) the sources that have a
- # corresponding compiled file --- do not (DO NOT)
- # touch other sources
- if test -f ${f}c ; then gzip -v9 $f >> $r/cmpr ; fi
- done
- cd ..
- fi
- done
-
- du -s .
-
- A step beyond would be substituting `rm -f' for `gzip -v9', but
- you have to be desperate for removing the sources (remember that
- emacs can access compressed files transparently).
-
- Also, a good megabyte could easily be trimmed from the $r/../etc
- directory, e.g., the termcap files, some O+NEWS, others that I
- don't remember as well.
-
- XEmacs 21.0 will unbundle the lisp hierarchy and allow the
- installer to choose exactly how much support code gets installed.
-
-\1f
-File: xemacs-faq.info, Node: Q2.0.3, Next: Q2.0.4, Prev: Q2.0.2, Up: Installation
-
-Q2.0.3: Compiling XEmacs with Netaudio.
----------------------------------------
-
- What is the best way to compile XEmacs with the netaudio system,
-since I have got the netaudio system compiled but installed at a weird
-place, I am not root. Also in the READMEs it does not say anything
-about compiling with the audioserver?
-
- You should only need to add some stuff to the configure command line.
-To tell it to compile in netaudio support: `--with-sound=both', or
-`--with-sound=nas' if you don't want native sound support for some
-reason.) To tell it where to find the netaudio includes and libraries:
-
- --site-libraries=WHATEVER
- --site-includes=WHATEVER
-
- Then (fingers crossed) it should compile and it will use netaudio if
-you have a server running corresponding to the X server. The netaudio
-server has to be there when XEmacs starts. If the netaudio server goes
-away and another is run, XEmacs should cope (fingers crossed, error
-handling in netaudio isn't perfect).
-
- BTW, netaudio has been renamed as it has a name clash with something
-else, so if you see references to NAS or Network Audio System, it's the
-same thing. It also might be found at
-`ftp://ftp.x.org/contrib/audio/nas/'.
-
-\1f
-File: xemacs-faq.info, Node: Q2.0.4, Next: Q2.0.5, Prev: Q2.0.3, Up: Installation
-
-Q2.0.4: Problems with Linux and ncurses.
-----------------------------------------
-
- On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with
-libc 5.2.18, XEmacs 20.0b20 is unable to open a tty device:
-
- src/xemacs -nw -q
- Initialization error:
- Terminal type `xterm' undefined (or can't access database?)
-
- Ben Wing <ben@xemacs.org> writes:
-
- Your ncurses configuration is messed up. Your /usr/lib/terminfo
- is a bad pointer, perhaps to a CD-ROM that is not inserted.
-
-\1f
File: xemacs-faq.info, Node: Q2.0.5, Next: Q2.0.6, Prev: Q2.0.4, Up: Installation
Q2.0.5: Do I need X11 to run XEmacs?
------------------------------------
No. The name "XEmacs" is unfortunate in the sense that it is *not*
-an X Window System-only version of Emacs. Starting with 19.14 XEmacs
-has full color support on a color-capable character terminal.
+an X Window System-only version of Emacs. XEmacs has full color
+support on a color-capable character terminal.
\1f
File: xemacs-faq.info, Node: Q2.0.6, Next: Q2.0.7, Prev: Q2.0.5, Up: Installation
Use `setq-default' instead, since `tab-width' is all-buffer-local.
+\1f
+File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
+
+Q3.0.4: How can I add directories to the `load-path'?
+-----------------------------------------------------
+
+ Here are two ways to do that, one that puts your directories at the
+front of the load-path, the other at the end:
+
+ ;;; Add things at the beginning of the load-path, do not add
+ ;;; duplicate directories:
+ (pushnew "bar" load-path :test 'equal)
+
+ (pushnew "foo" load-path :test 'equal)
+
+ ;;; Add things at the end, unconditionally
+ (setq load-path (nconc load-path '("foo" "bar")))
+
+ keith (k.p.) hanlan <keithh@nortel.ca> writes:
+
+ To add directories using Unix shell metacharacters use
+ `expand-file-name' like this:
+
+ (push (expand-file-name "~keithh/.emacsdir") load-path)
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
+
+Q3.0.5: How to check if a lisp function is defined?
+---------------------------------------------------
+
+ Use the following elisp:
+
+ (fboundp 'foo)
+
+ It's almost always a mistake to test `emacs-version' or any similar
+variables.
+
+ Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
+or even simple behavioral tests, eg.:
+
+ (defvar foo-old-losing-code-p
+ (condition-case nil (progn (losing-code t) nil)
+ (wrong-number-of-arguments t)))
+
+ There is an incredible amount of broken code out there which could
+work much better more often in more places if it did the above instead
+of trying to divine its environment from the value of one variable.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization
+
+Q3.0.6: Can I force the output of `(face-list)' to a buffer?
+------------------------------------------------------------
+
+ It would be good having it in a buffer, as the output of
+`(face-list)' is too wide to fit to a minibuffer.
+
+ Evaluate the expression in the `*scratch*' buffer with point after
+the rightmost paren and typing `C-j'.
+
+ If the minibuffer smallness is the only problem you encounter, you
+can simply press `C-h l' to get the former minibuffer contents in a
+buffer.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization
+
+Q3.0.7: Font selections in don't get saved after `Save Options'.
+----------------------------------------------------------------
+
+ For XEmacs 19.14 and previous:
+
+ John Mann <mannj@ll.mit.edu> writes:
+
+ You have to go to Options->Frame Appearance and unselect
+ `Frame-Local Font Menu'. If this option is selected, font changes
+ are only applied to the _current_ frame and do _not_ get saved
+ when you save options.
+
+ For XEmacs 19.15 and later:
+
+ Implement the above as well as set the following in your `.emacs'
+
+ (setq options-save-faces t)
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization
+
+Q3.0.8: How do I get a single minibuffer frame?
+-----------------------------------------------
+
+ Vin Shelton <acs@acm.org> writes:
+
+ (setq initial-frame-plist '(minibuffer nil))
+ (setq default-frame-plist '(minibuffer nil))
+ (setq default-minibuffer-frame
+ (make-frame
+ '(minibuffer only
+ width 86
+ height 1
+ menubar-visible-p nil
+ default-toolbar-visible-p nil
+ name "minibuffer"
+ top -2
+ left -2
+ has-modeline-p nil)))
+ (frame-notice-user-settings)
+
+ *Please note:* The single minibuffer frame may not be to everyone's
+taste, and there any number of other XEmacs options settings that may
+make it difficult or inconvenient to use.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization
+
+Q3.0.9: What is `Customize'?
+----------------------------
+
+ Starting with XEmacs 20.2 there is new system 'Customize' for
+customizing XEmacs options.
+
+ You can access `Customize' from the `Options' menu or invoking one
+of customize commands by typing eg. `M-x customize', `M-x
+customize-face', `M-x customize-variable' or `M-x customize-apropos'.
+
+ Starting with XEmacs 20.3 there is also new `browser' mode for
+Customize. Try it out with `M-x customize-browse'
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization
+
+3.1: X Window System & Resources
+================================
+
+Q3.1.1: Where is a list of X resources?
+---------------------------------------
+
+ Search through the `NEWS' file for `X Resources'. A fairly
+comprehensive list is given after it.
+
+ In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
+listing the defaults. The file `etc/sample.Xdefaults' gives a set of
+defaults that you might consider. It is essentially the same as
+`etc/Emacs.ad' but some entries are slightly altered. Be careful about
+installing the contents of this file into your `.Xdefaults' or
+`.Xresources' file if you use GNU Emacs under X11 as well.
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization
+
+Q3.1.2: How can I detect a color display?
+-----------------------------------------
+
+ You can test the return value of the function `(device-class)', as
+in:
+
+ (when (eq (device-class) 'color)
+ (set-face-foreground 'font-lock-comment-face "Grey")
+ (set-face-foreground 'font-lock-string-face "Red")
+ ....
+ )
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
+
+Q3.1.3: [This question intentionally left blank]
+------------------------------------------------
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
+
+Q3.1.4: [This question intentionally left blank]
+------------------------------------------------
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization
+
+Q3.1.5: How can I get the icon to just say `XEmacs'?
+----------------------------------------------------
+
+ I'd like the icon to just say `XEmacs', and not include the name of
+the current file in it.
+
+ Add the following line to your `.emacs':
+
+ (setq frame-icon-title-format "XEmacs")
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.6, Next: Q3.1.7, Prev: Q3.1.5, Up: Customization
+
+Q3.1.6: How can I have the window title area display the full path?
+-------------------------------------------------------------------
+
+ I'd like to have the window title area display the full
+directory/name of the current buffer file and not just the name.
+
+ Add the following line to your `.emacs':
+
+ (setq frame-title-format "%S: %f")
+
+ A more sophisticated title might be:
+
+ (setq frame-title-format
+ '("%S: " (buffer-file-name "%f"
+ (dired-directory dired-directory "%b"))))
+
+ That is, use the file name, or the dired-directory, or the buffer
+name.
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.7, Next: Q3.1.8, Prev: Q3.1.6, Up: Customization
+
+Q3.1.7: `xemacs -name junk' doesn't work?
+-----------------------------------------
+
+ When I run `xterm -name junk', I get an xterm whose class name
+according to xprop, is `junk'. This is the way it's supposed to work,
+I think. When I run `xemacs -name junk' the class name is not set to
+`junk'. It's still `emacs'. What does `xemacs -name' really do? The
+reason I ask is that my window manager (fvwm) will make a window sticky
+and I use XEmacs to read my mail. I want that XEmacs window to be
+sticky, without having to use the window manager's function to set the
+window sticky. What gives?
+
+ `xemacs -name' sets the application name for the program (that is,
+the thing which normally comes from `argv[0]'). Using `-name' is the
+same as making a copy of the executable with that new name. The
+`WM_CLASS' property on each frame is set to the frame-name, and the
+application-class. So, if you did `xemacs -name FOO' and then created
+a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
+"Emacs")'. However, the resource hierarchy for this widget would be:
+
+ Name: FOO .shell .container .BAR
+ Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
+
+ instead of the default
+
+ Name: xemacs.shell .container .emacs
+ Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
+
+ It is arguable that the first element of WM_CLASS should be set to
+the application-name instead of the frame-name, but I think that's less
+flexible, since it does not give you the ability to have multiple frames
+with different WM_CLASS properties. Another possibility would be for
+the default frame name to come from the application name instead of
+simply being `emacs'. However, at this point, making that change would
+be troublesome: it would mean that many users would have to make yet
+another change to their resource files (since the default frame name
+would suddenly change from `emacs' to `xemacs', or whatever the
+executable happened to be named), so we'd rather avoid it.
+
+ To make a frame with a particular name use:
+
+ (make-frame '((name . "the-name")))
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.8, Next: Q3.2.1, Prev: Q3.1.7, Up: Customization
+
+Q3.1.8: `-iconic' doesn't work.
+-------------------------------
+
+ When I start up XEmacs using `-iconic' it doesn't work right. Using
+`-unmapped' on the command line, and setting the `initiallyUnmapped' X
+Resource don't seem to help much either...
+
+ Ben Wing <ben@xemacs.org> writes:
+
+ Ugh, this stuff is such an incredible mess that I've about given up
+ getting it to work. The principal problem is numerous
+ window-manager bugs...
+
xemacs.info-1: 1350
xemacs.info-2: 48878
xemacs.info-3: 98489
-xemacs.info-4: 147823
-xemacs.info-5: 197420
-xemacs.info-6: 246860
-xemacs.info-7: 296797
-xemacs.info-8: 343612
-xemacs.info-9: 392237
-xemacs.info-10: 441337
-xemacs.info-11: 489981
-xemacs.info-12: 539920
-xemacs.info-13: 581720
-xemacs.info-14: 631497
-xemacs.info-15: 681144
-xemacs.info-16: 730284
-xemacs.info-17: 778697
-xemacs.info-18: 826295
-xemacs.info-19: 857208
-xemacs.info-20: 888862
-xemacs.info-21: 938210
-xemacs.info-22: 980796
+xemacs.info-4: 147801
+xemacs.info-5: 197397
+xemacs.info-6: 246837
+xemacs.info-7: 296794
+xemacs.info-8: 345041
+xemacs.info-9: 392811
+xemacs.info-10: 442411
+xemacs.info-11: 490852
+xemacs.info-12: 538047
+xemacs.info-13: 586228
+xemacs.info-14: 636005
+xemacs.info-15: 685652
+xemacs.info-16: 734792
+xemacs.info-17: 783205
+xemacs.info-18: 830803
+xemacs.info-19: 862297
+xemacs.info-20: 893951
+xemacs.info-21: 943355
+xemacs.info-22: 985941
\1f
Tag Table:
(Indirect)
Node: Exiting\7f98489
Node: Command Switches\7f102962
Node: Startup Paths\7f112326
-Node: Basic\7f119675
-Node: Inserting Text\7f121084
-Node: Moving Point\7f124080
-Node: Erasing\7f127686
-Node: Basic Files\7f128991
-Node: Basic Help\7f130913
-Node: Blank Lines\7f131508
-Node: Continuation Lines\7f133084
-Node: Position Info\7f134751
-Node: Arguments\7f138167
-Node: Undo\7f142266
-Node: Minibuffer\7f145213
-Node: Minibuffer File\7f147823
-Node: Minibuffer Edit\7f149628
-Node: Completion\7f152569
-Node: Completion Example\7f154500
-Node: Completion Commands\7f155595
-Node: Strict Completion\7f158571
-Node: Completion Options\7f160352
-Node: Minibuffer History\7f161860
-Node: Repetition\7f165044
-Node: M-x\7f167889
-Node: Help\7f172983
-Node: Help Summary\7f174393
-Node: Key Help\7f177179
-Node: Name Help\7f178138
-Node: Apropos\7f180783
-Node: Library Keywords\7f183902
-Node: Help Mode\7f186223
-Node: Misc Help\7f186720
-Node: Mark\7f189869
-Node: Setting Mark\7f191723
-Node: Using Region\7f194845
-Node: Marking Objects\7f195582
-Node: Mark Ring\7f197420
-Node: Mouse Selection\7f199136
-Node: Additional Mouse Operations\7f201143
-Node: Killing\7f205347
-Node: Yanking\7f210983
-Node: Kill Ring\7f211786
-Node: Appending Kills\7f213388
-Node: Earlier Kills\7f215425
-Node: Using X Selections\7f218038
-Node: X Clipboard Selection\7f219288
-Node: X Selection Commands\7f221465
-Node: X Cut Buffers\7f222551
-Node: Active Regions\7f223910
-Node: Accumulating Text\7f228490
-Node: Rectangles\7f231563
-Node: Registers\7f235082
-Node: RegPos\7f236536
-Node: RegText\7f237692
-Node: RegRect\7f238798
-Node: RegConfig\7f239677
-Node: RegNumbers\7f240617
-Node: RegFiles\7f241335
-Node: Bookmarks\7f241993
-Node: Display\7f245365
-Node: Scrolling\7f246860
-Node: Horizontal Scrolling\7f251003
-Node: Selective Display\7f252198
-Node: Display Vars\7f253417
-Node: Search\7f256095
-Node: Incremental Search\7f257288
-Node: Non-Incremental Search\7f266215
-Node: Word Search\7f267657
-Node: Regexp Search\7f269275
-Node: Regexps\7f270811
-Node: Search Case\7f281112
-Node: Replace\7f281893
-Node: Unconditional Replace\7f282841
-Node: Regexp Replace\7f283976
-Node: Replacement and Case\7f284911
-Node: Query Replace\7f285891
-Node: Other Repeating Search\7f289118
-Node: Fixit\7f290373
-Node: Kill Errors\7f290953
-Node: Transpose\7f292286
-Node: Fixing Case\7f294690
-Node: Spelling\7f295336
-Node: Files\7f296797
-Node: File Names\7f298107
-Node: Visiting\7f302444
-Node: Saving\7f309130
-Node: Backup\7f314053
-Node: Backup Names\7f315449
-Node: Backup Deletion\7f316932
-Node: Backup Copying\7f318082
-Node: Interlocking\7f319788
-Node: Reverting\7f323916
-Node: Auto Save\7f325828
-Node: Auto Save Files\7f326795
-Node: Auto Save Control\7f328636
-Node: Recover\7f330474
-Node: Version Control\7f331629
-Node: Concepts of VC\7f333667
-Node: Editing with VC\7f335277
-Node: Variables for Check-in/out\7f340533
-Node: Log Entries\7f342432
-Node: Change Logs and VC\7f343612
-Node: Old Versions\7f346879
-Node: VC Status\7f348882
-Node: Renaming and VC\7f350596
-Node: Snapshots\7f351275
-Node: Making Snapshots\7f351776
-Node: Snapshot Caveats\7f353069
-Node: Version Headers\7f354878
-Node: ListDir\7f357577
-Node: Comparing Files\7f359626
-Node: Dired\7f361159
-Node: Dired Enter\7f361830
-Node: Dired Edit\7f362655
-Node: Dired Deletion\7f364402
-Node: Dired Immed\7f367625
-Node: Misc File Ops\7f368901
-Node: Buffers\7f371389
-Node: Select Buffer\7f373547
-Node: List Buffers\7f375342
-Node: Misc Buffer\7f377100
-Node: Kill Buffer\7f378743
-Node: Several Buffers\7f379873
-Node: Windows\7f383740
-Node: Basic Window\7f384451
-Node: Split Window\7f386170
-Node: Other Window\7f388303
-Node: Pop Up Window\7f390732
-Node: Change Window\7f392237
-Node: Mule\7f395145
-Node: Mule Intro\7f396408
-Node: Language Environments\7f397424
-Node: Input Methods\7f399531
-Node: Select Input Method\7f403251
-Node: Coding Systems\7f405406
-Node: Recognize Coding\7f409592
-Node: Specify Coding\7f412918
-Node: Major Modes\7f417849
-Node: Choosing Modes\7f420068
-Node: Indentation\7f422458
-Node: Indentation Commands\7f424553
-Node: Tab Stops\7f427282
-Node: Just Spaces\7f429131
-Node: Text\7f429946
-Node: Text Mode\7f431929
-Node: Nroff Mode\7f434008
-Node: TeX Mode\7f435651
-Node: TeX Editing\7f437903
-Node: TeX Print\7f441337
-Node: Outline Mode\7f444556
-Node: Outline Format\7f446037
-Node: Outline Motion\7f448837
-Node: Outline Visibility\7f450390
-Node: Words\7f453311
-Node: Sentences\7f456258
-Node: Paragraphs\7f458454
-Node: Pages\7f460742
-Node: Filling\7f463342
-Node: Auto Fill\7f463913
-Node: Fill Commands\7f466060
-Node: Fill Prefix\7f468225
-Node: Case\7f470413
-Node: Programs\7f472441
-Node: Program Modes\7f474991
-Node: Lists\7f477223
-Node: Defuns\7f483063
-Node: Grinding\7f485716
-Node: Basic Indent\7f486344
-Node: Multi-line Indent\7f488365
-Node: Lisp Indent\7f489981
-Node: C Indent\7f493431
-Node: Matching\7f498671
-Node: Comments\7f500193
-Node: Balanced Editing\7f506645
-Node: Lisp Completion\7f507659
-Node: Documentation\7f508674
-Node: Change Log\7f509913
-Node: Tags\7f512491
-Node: Tag Syntax\7f514140
-Node: Create Tags Table\7f518084
-Node: Etags Regexps\7f522144
-Node: Select Tags Table\7f526802
-Node: Find Tag\7f530575
-Node: Tags Search\7f533539
-Node: List Tags\7f536995
-Node: Fortran\7f538024
-Node: Fortran Motion\7f539100
-Node: Fortran Indent\7f539920
-Node: ForIndent Commands\7f540605
-Node: ForIndent Num\7f541750
-Node: ForIndent Conv\7f543024
-Node: ForIndent Vars\7f543800
-Node: Fortran Comments\7f544968
-Node: Fortran Columns\7f548566
-Node: Fortran Abbrev\7f549989
-Node: Asm Mode\7f550898
-Node: Running\7f551450
-Node: Compilation\7f552420
-Node: Lisp Modes\7f557270
-Node: Lisp Libraries\7f558543
-Node: Loading\7f559097
-Node: Compiling Libraries\7f563557
-Node: Mocklisp\7f566448
-Node: Lisp Eval\7f567125
-Node: Lisp Debug\7f570765
-Node: Lisp Interaction\7f576192
-Node: External Lisp\7f577547
-Node: Packages\7f579621
-Node: Package Terminology\7f580362
-Node: Using Packages\7f581720
-Node: Building Packages\7f590598
-Node: Abbrevs\7f593120
-Node: Defining Abbrevs\7f595320
-Node: Expanding Abbrevs\7f597767
-Node: Editing Abbrevs\7f600469
-Node: Saving Abbrevs\7f602342
-Node: Dynamic Abbrevs\7f604297
-Node: Picture\7f605599
-Node: Basic Picture\7f608032
-Node: Insert in Picture\7f610317
-Node: Tabs in Picture\7f611739
-Node: Rectangles in Picture\7f613260
-Node: Sending Mail\7f615168
-Node: Mail Format\7f616879
-Node: Mail Headers\7f618229
-Node: Mail Mode\7f624637
-Node: Reading Mail\7f628250
-Node: Calendar/Diary\7f629825
-Node: Calendar Motion\7f631497
-Node: Calendar Unit Motion\7f632380
-Node: Move to Beginning or End\7f634703
-Node: Specified Dates\7f635836
-Node: Scroll Calendar\7f636724
-Node: Mark and Region\7f638515
-Node: General Calendar\7f640421
-Node: LaTeX Calendar\7f642029
-Node: Holidays\7f644043
-Node: Sunrise/Sunset\7f647145
-Node: Lunar Phases\7f650184
-Node: Other Calendars\7f651569
-Node: Calendar Systems\7f653056
-Node: To Other Calendar\7f656167
-Node: From Other Calendar\7f658158
-Node: Mayan Calendar\7f660463
-Node: Diary\7f663658
-Node: Diary Commands\7f665407
-Node: Format of Diary File\7f668730
-Node: Date Formats\7f671600
-Node: Adding to Diary\7f674174
-Node: Special Diary Entries\7f675805
-Node: Calendar Customization\7f681144
-Node: Calendar Customizing\7f682006
-Node: Holiday Customizing\7f685241
-Node: Date Display Format\7f691728
-Node: Time Display Format\7f692686
-Node: Daylight Savings\7f693824
-Node: Diary Customizing\7f697012
-Node: Hebrew/Islamic Entries\7f701633
-Node: Fancy Diary Display\7f704973
-Node: Included Diary Files\7f706889
-Node: Sexp Diary Entries\7f707870
-Node: Appt Customizing\7f712960
-Node: Sorting\7f714006
-Node: Shell\7f718812
-Node: Single Shell\7f720105
-Node: Interactive Shell\7f721719
-Node: Shell Mode\7f725484
-Node: Terminal emulator\7f727975
-Node: Term Mode\7f730284
-Node: Paging in Term\7f731198
-Node: Narrowing\7f731996
-Node: Hardcopy\7f733946
-Node: Recursive Edit\7f734918
-Node: Dissociated Press\7f737905
-Node: CONX\7f740468
-Node: Amusements\7f741492
-Node: Emulation\7f741972
-Node: Customization\7f743832
-Node: Minor Modes\7f745648
-Node: Variables\7f747280
-Node: Examining\7f749236
-Node: Easy Customization\7f750697
-Node: Customization Groups\7f751711
-Node: Changing an Option\7f754640
-Node: Face Customization\7f760910
-Node: Specific Customization\7f762674
-Node: Edit Options\7f765281
-Node: Locals\7f766865
-Node: File Variables\7f770044
-Node: Keyboard Macros\7f774594
-Node: Basic Kbd Macro\7f776765
-Node: Save Kbd Macro\7f778697
-Node: Kbd Macro Query\7f780355
-Node: Key Bindings\7f782297
-Node: Keymaps\7f783171
-Node: Rebinding\7f787021
-Node: Interactive Rebinding\7f787720
-Node: Programmatic Rebinding\7f789909
-Node: Key Bindings Using Strings\7f792716
-Node: Disabling\7f794343
-Node: Syntax\7f796122
-Node: Syntax Entry\7f797003
-Node: Syntax Change\7f801087
-Node: Init File\7f803256
-Node: Init Syntax\7f804720
-Node: Init Examples\7f807071
-Node: Terminal Init\7f811261
-Node: Audible Bell\7f812998
-Node: Faces\7f816429
-Node: Frame Components\7f821271
-Node: X Resources\7f821716
-Node: Geometry Resources\7f823375
-Node: Iconic Resources\7f825823
-Node: Resource List\7f826295
-Node: Face Resources\7f832802
-Node: Widgets\7f836479
-Node: Menubar Resources\7f837418
-Node: Quitting\7f838351
-Node: Lossage\7f841329
-Node: Stuck Recursive\7f841973
-Node: Screen Garbled\7f842679
-Node: Text Garbled\7f843813
-Node: Unasked-for Search\7f844452
-Node: Emergency Escape\7f845237
-Node: Total Frustration\7f847016
-Node: Bugs\7f847647
-Node: Glossary\7f857208
-Node: Manifesto\7f888862
-Node: Key Index\7f912339
-Node: Command Index\7f938210
-Node: Variable Index\7f980796
-Node: Concept Index\7f996882
+Node: Basic\7f119653
+Node: Inserting Text\7f121062
+Node: Moving Point\7f124058
+Node: Erasing\7f127664
+Node: Basic Files\7f128969
+Node: Basic Help\7f130891
+Node: Blank Lines\7f131486
+Node: Continuation Lines\7f133062
+Node: Position Info\7f134729
+Node: Arguments\7f138145
+Node: Undo\7f142244
+Node: Minibuffer\7f145191
+Node: Minibuffer File\7f147801
+Node: Minibuffer Edit\7f149606
+Node: Completion\7f152547
+Node: Completion Example\7f154478
+Node: Completion Commands\7f155573
+Node: Strict Completion\7f158549
+Node: Completion Options\7f160330
+Node: Minibuffer History\7f161838
+Node: Repetition\7f165022
+Node: M-x\7f167867
+Node: Help\7f172961
+Node: Help Summary\7f174371
+Node: Key Help\7f177157
+Node: Name Help\7f178116
+Node: Apropos\7f180761
+Node: Library Keywords\7f183880
+Node: Help Mode\7f186201
+Node: Misc Help\7f186698
+Node: Mark\7f189846
+Node: Setting Mark\7f191700
+Node: Using Region\7f194822
+Node: Marking Objects\7f195559
+Node: Mark Ring\7f197397
+Node: Mouse Selection\7f199113
+Node: Additional Mouse Operations\7f201120
+Node: Killing\7f205324
+Node: Yanking\7f210960
+Node: Kill Ring\7f211763
+Node: Appending Kills\7f213365
+Node: Earlier Kills\7f215402
+Node: Using X Selections\7f218015
+Node: X Clipboard Selection\7f219265
+Node: X Selection Commands\7f221442
+Node: X Cut Buffers\7f222528
+Node: Active Regions\7f223887
+Node: Accumulating Text\7f228467
+Node: Rectangles\7f231540
+Node: Registers\7f235059
+Node: RegPos\7f236513
+Node: RegText\7f237669
+Node: RegRect\7f238775
+Node: RegConfig\7f239654
+Node: RegNumbers\7f240594
+Node: RegFiles\7f241312
+Node: Bookmarks\7f241970
+Node: Display\7f245342
+Node: Scrolling\7f246837
+Node: Horizontal Scrolling\7f250980
+Node: Selective Display\7f252175
+Node: Display Vars\7f253394
+Node: Search\7f256072
+Node: Incremental Search\7f257265
+Node: Non-Incremental Search\7f266193
+Node: Word Search\7f267635
+Node: Regexp Search\7f269253
+Node: Regexps\7f271623
+Node: Search Case\7f285620
+Node: Replace\7f286401
+Node: Unconditional Replace\7f287349
+Node: Regexp Replace\7f288484
+Node: Replacement and Case\7f289419
+Node: Query Replace\7f290399
+Node: Other Repeating Search\7f293626
+Node: Fixit\7f294881
+Node: Kill Errors\7f295461
+Node: Transpose\7f296794
+Node: Fixing Case\7f299198
+Node: Spelling\7f299844
+Node: Files\7f301305
+Node: File Names\7f302615
+Node: Visiting\7f306952
+Node: Saving\7f313638
+Node: Backup\7f318561
+Node: Backup Names\7f319957
+Node: Backup Deletion\7f321440
+Node: Backup Copying\7f322590
+Node: Interlocking\7f324296
+Node: Reverting\7f328424
+Node: Auto Save\7f330336
+Node: Auto Save Files\7f331303
+Node: Auto Save Control\7f333144
+Node: Recover\7f334982
+Node: Version Control\7f336137
+Node: Concepts of VC\7f338175
+Node: Editing with VC\7f339785
+Node: Variables for Check-in/out\7f345041
+Node: Log Entries\7f346940
+Node: Change Logs and VC\7f348120
+Node: Old Versions\7f351387
+Node: VC Status\7f353390
+Node: Renaming and VC\7f355104
+Node: Snapshots\7f355783
+Node: Making Snapshots\7f356284
+Node: Snapshot Caveats\7f357577
+Node: Version Headers\7f359386
+Node: ListDir\7f362085
+Node: Comparing Files\7f364134
+Node: Dired\7f365667
+Node: Dired Enter\7f366338
+Node: Dired Edit\7f367163
+Node: Dired Deletion\7f368910
+Node: Dired Immed\7f372133
+Node: Misc File Ops\7f373409
+Node: Buffers\7f375897
+Node: Select Buffer\7f378055
+Node: List Buffers\7f379850
+Node: Misc Buffer\7f381608
+Node: Kill Buffer\7f383251
+Node: Several Buffers\7f384381
+Node: Windows\7f388248
+Node: Basic Window\7f388959
+Node: Split Window\7f390678
+Node: Other Window\7f392811
+Node: Pop Up Window\7f395240
+Node: Change Window\7f396745
+Node: Mule\7f399653
+Node: Mule Intro\7f400916
+Node: Language Environments\7f401932
+Node: Input Methods\7f404039
+Node: Select Input Method\7f407759
+Node: Coding Systems\7f409914
+Node: Recognize Coding\7f414100
+Node: Specify Coding\7f417426
+Node: Major Modes\7f422357
+Node: Choosing Modes\7f424576
+Node: Indentation\7f426966
+Node: Indentation Commands\7f429061
+Node: Tab Stops\7f431790
+Node: Just Spaces\7f433639
+Node: Text\7f434454
+Node: Text Mode\7f436437
+Node: Nroff Mode\7f438516
+Node: TeX Mode\7f440159
+Node: TeX Editing\7f442411
+Node: TeX Print\7f445845
+Node: Outline Mode\7f449064
+Node: Outline Format\7f450545
+Node: Outline Motion\7f453345
+Node: Outline Visibility\7f454898
+Node: Words\7f457819
+Node: Sentences\7f460766
+Node: Paragraphs\7f462962
+Node: Pages\7f465250
+Node: Filling\7f467850
+Node: Auto Fill\7f468421
+Node: Fill Commands\7f470568
+Node: Fill Prefix\7f472733
+Node: Case\7f474921
+Node: Programs\7f476949
+Node: Program Modes\7f479499
+Node: Lists\7f481731
+Node: Defuns\7f487571
+Node: Grinding\7f490224
+Node: Basic Indent\7f490852
+Node: Multi-line Indent\7f492873
+Node: Lisp Indent\7f494489
+Node: C Indent\7f497939
+Node: Matching\7f503179
+Node: Comments\7f504701
+Node: Balanced Editing\7f511153
+Node: Lisp Completion\7f512167
+Node: Documentation\7f513182
+Node: Change Log\7f514421
+Node: Tags\7f516999
+Node: Tag Syntax\7f518648
+Node: Create Tags Table\7f522592
+Node: Etags Regexps\7f526652
+Node: Select Tags Table\7f531310
+Node: Find Tag\7f535083
+Node: Tags Search\7f538047
+Node: List Tags\7f541503
+Node: Fortran\7f542532
+Node: Fortran Motion\7f543608
+Node: Fortran Indent\7f544428
+Node: ForIndent Commands\7f545113
+Node: ForIndent Num\7f546258
+Node: ForIndent Conv\7f547532
+Node: ForIndent Vars\7f548308
+Node: Fortran Comments\7f549476
+Node: Fortran Columns\7f553074
+Node: Fortran Abbrev\7f554497
+Node: Asm Mode\7f555406
+Node: Running\7f555958
+Node: Compilation\7f556928
+Node: Lisp Modes\7f561778
+Node: Lisp Libraries\7f563051
+Node: Loading\7f563605
+Node: Compiling Libraries\7f568065
+Node: Mocklisp\7f570956
+Node: Lisp Eval\7f571633
+Node: Lisp Debug\7f575273
+Node: Lisp Interaction\7f580700
+Node: External Lisp\7f582055
+Node: Packages\7f584129
+Node: Package Terminology\7f584870
+Node: Using Packages\7f586228
+Node: Building Packages\7f595106
+Node: Abbrevs\7f597628
+Node: Defining Abbrevs\7f599828
+Node: Expanding Abbrevs\7f602275
+Node: Editing Abbrevs\7f604977
+Node: Saving Abbrevs\7f606850
+Node: Dynamic Abbrevs\7f608805
+Node: Picture\7f610107
+Node: Basic Picture\7f612540
+Node: Insert in Picture\7f614825
+Node: Tabs in Picture\7f616247
+Node: Rectangles in Picture\7f617768
+Node: Sending Mail\7f619676
+Node: Mail Format\7f621387
+Node: Mail Headers\7f622737
+Node: Mail Mode\7f629145
+Node: Reading Mail\7f632758
+Node: Calendar/Diary\7f634333
+Node: Calendar Motion\7f636005
+Node: Calendar Unit Motion\7f636888
+Node: Move to Beginning or End\7f639211
+Node: Specified Dates\7f640344
+Node: Scroll Calendar\7f641232
+Node: Mark and Region\7f643023
+Node: General Calendar\7f644929
+Node: LaTeX Calendar\7f646537
+Node: Holidays\7f648551
+Node: Sunrise/Sunset\7f651653
+Node: Lunar Phases\7f654692
+Node: Other Calendars\7f656077
+Node: Calendar Systems\7f657564
+Node: To Other Calendar\7f660675
+Node: From Other Calendar\7f662666
+Node: Mayan Calendar\7f664971
+Node: Diary\7f668166
+Node: Diary Commands\7f669915
+Node: Format of Diary File\7f673238
+Node: Date Formats\7f676108
+Node: Adding to Diary\7f678682
+Node: Special Diary Entries\7f680313
+Node: Calendar Customization\7f685652
+Node: Calendar Customizing\7f686514
+Node: Holiday Customizing\7f689749
+Node: Date Display Format\7f696236
+Node: Time Display Format\7f697194
+Node: Daylight Savings\7f698332
+Node: Diary Customizing\7f701520
+Node: Hebrew/Islamic Entries\7f706141
+Node: Fancy Diary Display\7f709481
+Node: Included Diary Files\7f711397
+Node: Sexp Diary Entries\7f712378
+Node: Appt Customizing\7f717468
+Node: Sorting\7f718514
+Node: Shell\7f723320
+Node: Single Shell\7f724613
+Node: Interactive Shell\7f726227
+Node: Shell Mode\7f729992
+Node: Terminal emulator\7f732483
+Node: Term Mode\7f734792
+Node: Paging in Term\7f735706
+Node: Narrowing\7f736504
+Node: Hardcopy\7f738454
+Node: Recursive Edit\7f739426
+Node: Dissociated Press\7f742413
+Node: CONX\7f744976
+Node: Amusements\7f746000
+Node: Emulation\7f746480
+Node: Customization\7f748340
+Node: Minor Modes\7f750156
+Node: Variables\7f751788
+Node: Examining\7f753744
+Node: Easy Customization\7f755205
+Node: Customization Groups\7f756219
+Node: Changing an Option\7f759148
+Node: Face Customization\7f765418
+Node: Specific Customization\7f767182
+Node: Edit Options\7f769789
+Node: Locals\7f771373
+Node: File Variables\7f774552
+Node: Keyboard Macros\7f779102
+Node: Basic Kbd Macro\7f781273
+Node: Save Kbd Macro\7f783205
+Node: Kbd Macro Query\7f784863
+Node: Key Bindings\7f786805
+Node: Keymaps\7f787679
+Node: Rebinding\7f791529
+Node: Interactive Rebinding\7f792228
+Node: Programmatic Rebinding\7f794417
+Node: Key Bindings Using Strings\7f797224
+Node: Disabling\7f798851
+Node: Syntax\7f800630
+Node: Syntax Entry\7f801511
+Node: Syntax Change\7f805595
+Node: Init File\7f807764
+Node: Init Syntax\7f809228
+Node: Init Examples\7f811579
+Node: Terminal Init\7f815769
+Node: Audible Bell\7f817506
+Node: Faces\7f820937
+Node: Frame Components\7f825779
+Node: X Resources\7f826224
+Node: Geometry Resources\7f827883
+Node: Iconic Resources\7f830331
+Node: Resource List\7f830803
+Node: Face Resources\7f837310
+Node: Widgets\7f840987
+Node: Menubar Resources\7f841926
+Node: Quitting\7f843440
+Node: Lossage\7f846418
+Node: Stuck Recursive\7f847062
+Node: Screen Garbled\7f847768
+Node: Text Garbled\7f848902
+Node: Unasked-for Search\7f849541
+Node: Emergency Escape\7f850326
+Node: Total Frustration\7f852105
+Node: Bugs\7f852736
+Node: Glossary\7f862297
+Node: Manifesto\7f893951
+Node: Key Index\7f917428
+Node: Command Index\7f943355
+Node: Variable Index\7f985941
+Node: Concept Index\7f1002027
\1f
End Tag Table
the one where it is being built.) Such a directory containing a
hierarchy is called a "root". Whenever this section refers to a
directory using the shorthand `<root>', it means that XEmacs searches
-for it under all hierarchies under all hierarchies XEmacs was able to
-scrounge up. In a running XEmacs, the hierarchy roots are stored in
-the variable `emacs-roots'.
+for it under all hierarchies XEmacs was able to scrounge up. In a
+running XEmacs, the hierarchy roots are stored in the variable
+`emacs-roots'.
Package Hierarchies
-------------------
It is possible to specify at configure-time the location of the
various package hierarchies with the `--package-path' option to
configure. The early, late, and last components of the package path
-are separated by double instead of single colons. If three components
-are present, they are locate the early, late, and last package
+are separated by double instead of single colons. If all three
+components are present, they locate the early, late, and last package
hierarchies respectively. If two components are present, they locate
the early and late hierarchies. If only one component is present, it
locates the late hierarchy. At run time, the package path may also be
displays the file `xemacs/etc/NEWS', which contains documentation on
XEmacs changes arranged chronologically. `C-h F' (`xemacs-local-faq')
displays local version of the XEmacs
-frequentliy-answered-questions-list. `C-h t' (`help-with-tutorial')
+frequently-answered-questions-list. `C-h t' (`help-with-tutorial')
displays the learn-by-doing XEmacs tutorial. `C-h C-c'
(`describe-copying') displays the file `xemacs/etc/COPYING', which
tells you the conditions you must obey in distributing copies of
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-09-30 Martin Buchholz <martin@xemacs.org>
+
+ * gnuserv.c (main): Warning removal.
+
+2000-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * ellcc.c: Make global variables static. Avoids warnings on AIX.
+
+ * fakemail.c (make_file_preface): Use standard type time_t.
+ Actually check that the 25th char returned from ctime is '\n'.
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * *: Spelling mega-patch
+
+2000-09-12 Martin Buchholz <martin@xemacs.org>
+
+ * gnuclient.c (main):
+ * hexl.c (usage):
+ Use `Usage', not `usage', in Usage messages.
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * etags.c (add_regex): added commented out code for use figuring
+ out Windows quoting problems.
+ * hexl.c (main): fixed warnings about possible used uninitialized.
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
* exist in your home directory, containing individual mail messages in
* separate files in the standard gosling emacs mail reader format.
*
- * Program takes one argument: an output file. THis file will contain
+ * Program takes one argument: an output file. This file will contain
* all the messages in Messages directory, in berkeley mail format.
* If no output file is mentioned, messages are put in ~/OMAIL.
*
* In order to get rmail to read the messages, the resulting file must
* be mv'ed to ~/mbox, and then have rmail invoked on them.
- *
+ *
* Author: Larry Kolodney, 1985
*/
fclose (cff);
}
fclose (mddf);
- fclose (mfilef);
+ fclose (mfilef);
return 0;
}
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#define ELLCC_LINK_MODE 1
#define ELLCC_INIT_MODE 2
-int ellcc_mode = ELLCC_COMPILE_MODE;
-char *progname;
-char *mod_name = (char *)0, *mod_version = (char *)0, *mod_title = (char *)0;
-char *mod_output = (char *)0;
-int verbose = 0;
-char **exec_argv;
-int exec_argc = 1, *exec_args;
-int real_argc = 0;
-int prog_argc;
-char **prog_argv;
+static int ellcc_mode = ELLCC_COMPILE_MODE;
+static char *progname;
+static char *mod_name = NULL;
+static char *mod_version = NULL;
+static char *mod_title = NULL;
+static char *mod_output = NULL;
+static int verbose = 0;
+static char **exec_argv;
+static int exec_argc = 1;
+static int *exec_args;
+static int real_argc = 0;
+static int prog_argc;
+static char **prog_argv;
/*
* We allow the user to over-ride things in the environment
patbuf->buffer = NULL;
patbuf->allocated = 0;
+#if 0 /* useful when debugging windows quoting convention problems */
+ printf ("Compiling regex pattern: %s\n", regexp_pattern);
+#endif
+
err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
if (err != NULL)
{
make_file_preface (void)
{
char *the_string, *temp;
- long idiotic_interface;
+ time_t idiotic_interface;
long prefix_length;
long user_length;
long date_length;
the_date = ctime (&idiotic_interface);
/* the_date has an unwanted newline at the end */
date_length = strlen (the_date) - 1;
- the_date[date_length] = '\0';
+ if (the_date[date_length] == '\n')
+ the_date[date_length] = '\0';
#ifdef WIN32_NATIVE
temp = "(null)";
#else
/* Assume relative Unix style path. Get the current directory
and prepend it. FIXME: need to fix the case of DOS paths like
"\foo", where we need to get the current drive. */
-
+
strcat (fullpath, get_current_working_directory ());
len = strlen (fullpath);
{
fprintf (stderr,
#ifdef INTERNET_DOMAIN_SOCKETS
- "usage: %s [-nw] [-display display] [-q] [-v] [-l library]\n"
+ "Usage: %s [-nw] [-display display] [-q] [-v] [-l library]\n"
" [-batch] [-f function] [-eval form]\n"
" [-h host] [-p port] [-r remote-path] [[+line] file] ...\n",
#else /* !INTERNET_DOMAIN_SOCKETS */
- "usage: %s [-nw] [-q] [-v] [-l library] [-f function] [-eval form] "
+ "Usage: %s [-nw] [-q] [-v] [-l library] [-f function] [-eval form] "
"[[+line] path] ...\n",
#endif /* !INTERNET_DOMAIN_SOCKETS */
progname);
progname);
exit (1);
}
- /* Don't do disconnect_from_server becasue we have already read
+ /* Don't do disconnect_from_server because we have already read
data, and disconnect doesn't do anything else. */
#ifndef INTERNET_DOMAIN_SOCKETS
if (connect_type == (int) CONN_IPC)
{
perror(progname);
fprintf(stderr,"%s: unable to select\n",progname);
- exit(1);
+ return 1;
} /* if */
#ifdef UNIX_DOMAIN_SOCKETS
if (FD_ISSET(fileno(stdin), &rmask)) /* from stdin (gnu process) */
handle_response();
#endif /* NOT SYSV_IPC */
- } /* while */
-
- return 0;
+ } /* while (1) */
} /* main */
#endif /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
#endif
for (;;)
{
- register int i, c, d;
+ register int i, c = 0, d;
#define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10)
string[17] = '\0';
for (;;)
{
- register int i, c;
+ register int i, c = 0;
for (i=0; i < 16; ++i)
{
void
usage (void)
{
- (void) fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
+ fprintf (stderr, "Usage: %s [-de] [-iso]\n", progname);
exit (1);
}
-/*
-
-
+/*
+
+
PROPOSAL FOR HOW THIS ALL OUGHT TO WORK
this isn't implemented yet, but this is the plan-in-progress
-
+
In general, it's accepted that the best way to internationalize is for all
messages to be referred to by a symbolic name (or number) and come out of a
table or tables, which are easy to change.
something has gone wrong. (Except to do things like remove assumptions
about the order of words within a sentence, or how pluralization works.)
- There are two parts to the task of displaying translated strings to the
+ There are two parts to the task of displaying translated strings to the
user: the first is to extract the strings which need to be translated from
the sources; and the second is to make some call which will translate those
strings before they are presented to the user.
-
+
The old way was to use the same form to do both, that is, GETTEXT() was both
the tag that we searched for to build a catalog, and was the form which did
the translation. The new plan is to separate these two things more: the
already, and the translation will get done in some more centralized, lower
level place.
- This program (make-msgfile.c) addresses the first part, extracting the
+ This program (make-msgfile.c) addresses the first part, extracting the
strings.
-
+
For the emacs C code, we need to recognize the following patterns:
-
+
message ("string" ... )
error ("string")
report_file_error ("string" ... )
signal_simple_error ("string" ... )
signal_simple_error_2 ("string" ... )
-
+
build_translated_string ("string")
#### add this and use it instead of build_string() in some places.
-
+
yes_or_no_p ("string" ... )
#### add this instead of funcalling Qyes_or_no_p directly.
barf_or_query_if_file_exists #### restructure this
check all callers of Fsignal #### restructure these
signal_error (Qerror ... ) #### change all of these to error()
-
+
And we also parse out the `interactive' prompts from DEFUN() forms.
-
+
#### When we've got a string which is a candidate for translation, we
should ignore it if it contains only format directives, that is, if
there are no alphabetic characters in it that are not a part of a `%'
directive. (Careful not to translate either "%s%s" or "%s: ".)
For the emacs Lisp code, we need to recognize the following patterns:
-
+
(message "string" ... )
(error "string" ... )
(format "string" ... )
(read-file-name "string" ... )
(temp-minibuffer-message "string")
(query-replace-read-args "string" ... )
-
+
I expect there will be a lot like the above; basically, any function which
is a commonly used wrapper around an eventual call to `message' or
`read-from-minibuffer' needs to be recognized by this program.
(dgettext "domain-name" "string") #### do we still need this?
-
+
things that should probably be restructured:
`princ' in cmdloop.el
`insert' in debug.el
face-interactive
help.el, syntax.el all messed up
-
+
Menu descriptors: one way to extract the strings in menu labels would be
to teach this program about "^(defvar .*menu\n" forms; that's probably
"string" ... ;###translate
- where the magic token ";###translate" on a line means that the string
- constant on this line should go into the message catalog. This is analagous
+ where the magic token ";###translate" on a line means that the string
+ constant on this line should go into the message catalog. This is analogous
to the magic ";###autoload" comments, and to the magic comments used in the
EPSF structuring conventions.
translations, there are hooks in a small number of low level places in
emacs.
- Assume the existence of a C function gettext(str) which returns the
+ Assume the existence of a C function gettext(str) which returns the
translation of `str' if there is one, otherwise returns `str'.
- message() takes a char* as its argument, and always filters it through
Solving the "translating too much" problem:
The concern has been raised that in this situation:
- "Help" is a string for which we know a translation;
- - someone visits a file called Help, and someone does something
+ - someone visits a file called Help, and someone does something
contrived like (error buffer-file-name)
then we would display the translation of Help, which would not be correct.
We can solve this by adding a bit to Lisp_String objects which identifies
them as having been read as literal constants from a .el or .elc file (as
- opposed to having been constructed at run time as it would in the above
+ opposed to having been constructed at run time as it would in the above
case.) To solve this:
- Fmessage() takes a lisp string as its first argument.
else
process_Lisp_file ();
fputc ('\n', outfile);
-
+
fclose (infile);
}
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-09-22 Martin Buchholz <martin@xemacs.org>
+
+ * byte-optimize.el (byte-optimize-lapcode): Add an optimizer pass.
+ Optimize the compiled-function-constants vector by byte-code
+ reference counts.
+
+2000-09-25 Robert Pluim <rpluim@bigfoot.com>
+
+ * build-report.el (build-report-delete-regexp): quote value in
+ defcustom
+
+2000-09-24 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * build-report.el (build-report): Don't bind srcdir which we don't
+ use in `multiple-value-bind' to avoid the only byte-compiler
+ warning.
+
+2000-09-23 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * build-report.el: Requires cl and custom now.
+ build-report-version is determined by XEmacs version -- remove
+ build-report-version*.
+ * build-report.el (build-report-version): Removed.
+ * build-report.el (build-report-installation-version-regexp): New.
+ * build-report.el (build-report-version-file-regexp): New.
+ * build-report.el (build-report-installation-srcdir-regexp): New.
+ * build-report.el (build-report-destination): Offer
+ xemacs-build-reports and xemacs-beta.
+ * build-report.el (build-report-keep-regexp): Adjusted.
+ * build-report.el (build-report-delete-regexp): Adjusted.
+ * build-report.el (build-report-make-output-dir): New.
+ * build-report.el (build-report-installation-file): Replace use of
+ `concat' with `expand-file-name'.
+ * build-report.el (build-report-make-output-file): Removed.
+ * build-report.el (build-report-make-output-files): New.
+ * build-report.el (build-report-subject): Identify as
+ user-variable with "*...".
+ * build-report.el (build-report-prompts): Ditto.
+ * build-report.el (build-report-version-file): New.
+ * build-report.el (build-report-file-encoding): Identify as
+ user-variable with "*...".
+ * build-report.el (build-report-make-output-get): New.
+ * build-report.el (build-report-insert-header): Report
+ emacs-version and system-configuration instead of
+ build-report-version.
+ * build-report.el (build-report-insert-make-output): Add file
+ argument.
+ * build-report.el (build-report-insert-installation-file):
+ Re-indent.
+ * build-report.el (build-report-keep): Change docstring,
+ re-indent.
+ * build-report.el (build-report-delete): Ditto.
+ * build-report.el (build-report-installation-data): New.
+ * build-report.el (build-report-version-file-data): New.
+
+2000-09-20 Martin Buchholz <martin@xemacs.org>
+
+ * byte-optimize.el (byte-optimize-lapcode):
+ Fix the optimization of using the first 5 elements of the
+ constants vector for variables.
+ (byte-optimize-lapcode): Fix another ancient broken optimization.
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * *: Spelling mega-patch
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * easymenu.el: doc fixes.
+ (easy-menu-do-define): Use backquote.
+ (easy-menu-change):
+ (easy-menu-add):
+ `when' seems much clearer than `if' here.
+ (easy-menu-remove):
+ (easy-menu-add-item):
+ (easy-menu-item-present-p):
+ (easy-menu-remove-item):
+ Wrap using (when (featurep 'menubar) ...)
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * bytecomp.el (displaying-byte-compile-warnings):
+ Revert Ben's change to this function below so that the compile log
+ is displayed properly for users of the "popper" package.
+
+2000-09-12 Martin Buchholz <martin@xemacs.org>
+
+ * window.el (save-selected-window): Use backquote.
+
+ * bytecomp.el (byte-compile-file-form-defvar-or-defconst):
+ Renamed from `byte-compile-file-form-defvar'.
+ * bytecomp.el (byte-compile-defvar-or-defconst):
+ Only cons onto current-load-list in top-level forms.
+ Else this leaks a cons cell every time a defun is called.
+ Renamed from `byte-compile-defvar', for clarity.
+ Warn when docstring of defvar is not a string.
+ Use consistent error messages.
+ Better comments.
+
+2000-09-11 Martin Buchholz <martin@xemacs.org>
+
+ * simple.el (set-variable):
+ Remove unneeded defvar by rearranging order of let* forms.
+
+ * mule/mule-ccl.el (ccl-get-next-code):
+ * menubar-items.el (bookmark-menu-filter):
+ (language-environment-menu-filter):
+ (tutorials-menu-filter):
+ * toolbar-items.el (toolbar-compile):
+ * byte-optimize.el (disassemble-offset):
+ Use (declare (special ...)) instead of `defvar'.
+
+ * cl-macs.el (cl-do-proclaim):
+ Fix (declare (special ...)) warning suppression syntax.
+
+2000-07-22 Golubev I. N. <gin@mo.msk.ru>
+
+ * info.el (Info-tag-table-marker):
+ (Info-tag-table-buffer):
+ (Info-find-file-node):
+ (Info-read-subfile):
+ (Info-build-node-completions):
+ (Info-search):
+ (Info-mode):
+ Multiple info buffer support.
+
+2000-08-28 Oscar Figueiredo <oscar@cpe.fr>
+
+ * ldap.el (ldap-decode-entry): New defun
+ (ldap-search-entries): Use it in order to decode DN-prefixed
+ entries properly
+
+2000-08-23 Daniel Pittman <daniel@danann.net>
+
+ * mule/mule-cmds.el (coding-system-change-eol-conversion):
+ Use `eq', not `=', to compare symbols.
+
+2000-07-30 Ben Wing <ben@xemacs.org>
+
+ * bytecomp.el (byte-compile-report-error):
+ * bytecomp.el (displaying-byte-compile-warnings):
+ if stack-trace-on-error is set, send out a backtrace when
+ an error is encountered that stops byte compilation. this
+ should make it much much easier to track down those curious
+ problems. also undo the kludge of using a separate "*Show*"
+ buffer for display when there's a temp-buffer-show-function;
+ we can avoid this by just being a little smarter.
+
+ * dialog-items.el:
+ * dialog-items.el (search-dialog-regexp): New.
+ * dialog-items.el (search-dialog-callback):
+ * dialog-items.el (make-search-dialog):
+ add a regexp option to the dialog and clean up a bit.
+
+ * dialog.el:
+ * dialog.el (yes-or-no-p-dialog-box):
+ * dialog.el (get-dialog-box-response):
+ * dialog.el (make-dialog-box):
+ * dialog.el (dialog-box-finish): New.
+ * dialog.el (dialog-box-cancel): New.
+ * dialog.el (internal-make-dialog-box-exit): New.
+ implement [properly!] the :modal property of the new dialog box
+ interface. this is the first time xemacs has ever had *proper*
+ modal dialog boxes, giving the standard window-system feedback.
+ (e.g. under windows, clicking on a disabled frame causes a beep
+ and makes the dialog box flash three times.)
+
+ * dragdrop.el: header keyword frobbing.
+
+ * dumped-lisp.el (preloaded-file-list):
+ renamed winnt.el to win32-native.el.
+
+ * faces.el (face-property):
+ * faces.el (set-face-property):
+ * faces.el (frob-face-property):
+ * faces.el (frob-face-font-2):
+ * faces.el (make-face-bold):
+ * faces.el (make-face-italic):
+ * faces.el (make-face-bold-italic):
+ * faces.el (make-face-unbold):
+ * faces.el (make-face-unitalic):
+ * faces.el (make-face-smaller):
+ * faces.el (make-face-larger):
+ clean up the implementation of these so that window-system-specific
+ methods are called only on objects belonging to that window system.
+ previously, you could have [e.g.] mswindows-make-face-bold called
+ on font object of device type `stream', which is not good and
+ explains the subtle errors Adrian was getting when byte-compiling
+ something that required 'term. (Adrian, now you can use stack-trace-
+ on-error to find the exact place where things are going wrong instead
+ of having to laboriously binary-search your way through.)
+
+ * finder.el (finder-known-keywords):
+ cleaned up -- properly sorted, clarified the meanings of many of
+ the keywords, and added a few -- mswin, gui, content, build, www,
+ user, services. the last two try to distinguish between a package
+ that's used directly by the user, and a package that provides
+ support services to other packages.
+
+ * font-lock.el (lisp-font-lock-keywords-2):
+ update list of lisp control structures to include everything,
+ including new ones i introduced.
+
+ * gutter.el: header keyword frobbing.
+
+ * isearch-mode.el (isearch-ring-adjust1): M-p to recall the most
+ recent isearch element was not doing so! you got the second-most-
+ recent instead.
+
+ * lisp-mode.el (construct-lisp-mode-menu):
+ more menubar cleanups.
+ * lisp-mode.el (with-selected-window):
+ make it indent properly.
+
+ * menubar-items.el (default-menubar): lots of menubar cleanups.
+ rearranged the options menu the most, e.g. splitting up the
+ Keyboard/Mouse menu into a new Editing menu and combining the
+ separate Scrollbar/Gutter/Toolbar submenus into Display.
+ Got rid of General, moved items to Editing or new Troubleshooting.
+ Moved Packages to Tools; doesn't seem to belong under Options.
+ Added stuff to the Cmds menu, e.g. Change Case.
+
+ NB please don't complain about these periodic menubar changes.
+ Anything like this is necessarily incremental in its construction
+ -- By constant use you gradually become more and more aware of
+ better and better ways to group menu items. When we eventually
+ move the options menu to a property sheet, the existing structure
+ will probably be preserved fairly well.
+
+ * minibuf.el (next-history-element): fix problems with pressing
+ down arrow in repeat-complex-command.
+
+ * modeline.el:
+ * modeline.el (modeline-3d-p): New.
+ added custom variable for controlling the 3d modeline. the
+ corresponding Options item has been present for a long time,
+ but commented out with "fix me!" comments. it's fixed now.
+
+ * obsolete.el (add-menu):
+ remove bogus gettexts.
+
+ * process.el (shell-quote-argument):
+ handle this correctly under Windows native with COMMAND.COM/CMD.EXE.
+ For bash under Windows native, see below.
+
+ * simple.el:
+ * simple.el (display-warning-buffer):
+ Fixed the handling of warning display to eliminate the annoying
+ *Show* buffer, like was done for byte-compiler output above.
+
+ * simple.el (debug-print): New.
+ Simple function for sending debug messages to the console and/or
+ other debug places.
+
+ * subr.el (replace-in-string):
+ Rewrite this function to avoid N^2 behavior with large strings --
+ catastrophic with the new Windows selection code! (Apparently the
+ author of this function didn't realize there was a fun
+ replace-match that could make his life much easier, because we
+ duplicated the entire logic. The new version is smaller, easier
+ to understand, much more robust, and has extended features --
+ those of replace-match.)
+
+ * window.el:
+ * window.el (with-selected-window): New.
+ An obvious complement to the existing `with-selected-frame' and
+ `with-current-buffer'.
+
+ * win32-native.el: Renamed from winnt.el.
+ Added a great deal of stuff for properly handling process quoting,
+ somewhat modeled on Kirill's original model (which i later threw
+ away). We should now finally have correctly working process arg
+ quoting/dequoting so that the final app gets exactly what we
+ intended. Because the mechanism is in Lisp, it's easily
+ extendible. (For those running bash and running the native
+ version, I tried hard to do what I thought was correct. But more
+ thought is needed, and ideally the volunteer work of people with
+ these configurations that they generally run on.)
+
+ * x-font-menu.el (x-font-menu-font-data):
+ Put in defvar's to fix byte-compiler warnings.
+
+2000-08-01 Alastair J. Houghton <ajhoughton@lineone.net>
+
+ * select.el (selection-coercion-alist): Initialise.
+ * select.el (select-coerce-to-text): New.
+ * select.el (select-coerce): New.
+ New functions to perform type and value coercion.
+
+ * select.el (select-buffer-killed-default): Keep data if it was
+ on the clipboard.
+
+2000-08-02 Martin Buchholz <martin@xemacs.org>
+
+ * menubar-items.el (default-menubar): Fix typo.
+ (default-menubar): `lambda' was mispelled as `lamda'.
+
+2000-07-31 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * window.el (shrink-window-if-larger-than-buffer): Remove
+ edge checking code.
+
+2000-07-31 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * paths.el (gnus-local-domain): Removed.
+ (gnus-local-organization): Ditto.
+ (gnus-startup-file): Ditto.
+
+2000-07-13 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * files.el (auto-mode-alist): Add .spec for RPM.
+
+2000-07-31 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (update-tab-in-gutter): deprecate :properties.
+
+2000-07-31 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * dragdrop.el (experimental-dragdrop-drop-url-default): Use function
+ browse-url.
+ * help.el (xemacs-www-page): Ditto.
+ (xemacs-www-faq): Ditto.
+ * menubar-items.el (default-menubar): Ditto.
+
+ * wid-edit.el (widget-url-link-action): Ditto.
+ From: Kenichi OKADA <okada@opaopa.org>.
+
+2000-07-31 Martin Buchholz <martin@xemacs.org>
+
+ * finder.el (finder-commentary): Add autoload cookie.
+
+2000-07-28 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * files.el (insert-file-contents-literally): Fix second let
+ binding for `coding-system-for-read' to `coding-system-for-write'
+ as suggested by Dan Holmsand <dan@innehallsbolaget.com>.
+
+1999-06-15 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * files.el (insert-file-contents-literally): Use binary coding
+ system (from Morioka san).
+ (insert-file-contents-literally): Make file-name-handler method.
+
+2000-07-26 Martin Buchholz <martin@xemacs.org>
+
+ * cl-macs.el (get-selection): Add defsetf.
+
+2000-07-25 Steve Youngs <youngs_s@ozlinx.com.au>
+
+ * x-init.el (x-activate-region-as-selection): replace obsolete
+ function x-own-selection with own-selection.
+ (ow-find): replace obsolete functions x-get-selection and
+ x-get-clipboard with get-selection and get-clipboard.
+ (init-post-x-win): replace obsolete function x-disown-selection
+ with disown-selection.
+
+2000-07-20 Mike Sperber <mike@xemacs.org>
+
+ * startup.el (load-user-init-file): Only try to load init file if
+ it exists.
+
+2000-07-10 Andy Piper <andy@xemacs.org>
+
+ * dialog-items.el: sync with Ben's patch.
+
+ * gutter-items.el (buffers-tab-switch-to-buffer): remove now-bogus
+ comment.
+ (progress-text-glyph): deleted.
+ (progress-layout-glyph): make completely minimal.
+ (progress-gauge-glyph): ditto.
+ (progress-display-style): fix to handle dynamic instantiator
+ changes.
+ (progress-text-instantiator): new.
+ (progress-layout-instantiator): new.
+ (progress-gauge-instantiator): new.
+ (set-progress-display-instantiator): renamed and changed from
+ set-progress-display-style.
+ (progress-abort-glyph): use instantiator not glyph.
+ (append-progress-display): use set-progress-display-instantiator
+ and set-glyph-image.
+ (abort-progress-display): ditto.
+ (raw-append-progress-display): ditto.
+
+2000-07-20 Ben Wing <ben@xemacs.org>
+
+ * code-files.el: Move Mule-specific code to mule-coding.el.
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * autoload.el:
+ Fixed comments.
+
+ * cmdloop.el:
+ * cmdloop.el (yes-or-no-p):
+ * cmdloop.el (y-or-n-p):
+ Make these functions use should-use-dialog-box-p and not be
+ overridden in dialog.el.
+
+ * cus-dep.el:
+ * cus-dep.el (Custom-make-dependencies): Removed.
+ * cus-dep.el (Custom-make-dependencies-1): New.
+ * cus-dep.el (Custom-make-one-dependency): New.
+ New entry point for use in Makefiles, to avoid excessive
+ invocations.
+
+ * cus-edit.el (custom-variable-reset-saved):
+ * cus-edit.el (custom-variable-reset-standard):
+ * cus-edit.el (custom-save-resets):
+ Fix bytecompiler warnings.
+
+ * dialog.el:
+ * dialog.el (yes-or-no-p-dialog-box):
+ * dialog.el (yes-or-no-p-maybe-dialog-box): Removed.
+ * dialog.el (y-or-n-p-maybe-dialog-box): Removed.
+ * dialog.el (get-dialog-box-response):
+ * dialog.el (message-or-box):
+ * dialog.el (make-dialog-box):
+ * dialog.el (popup-dialog-box): New.
+ Avoid yes-or-no-p bogosities.
+ Create a general function `make-dialog-box' to encapsulate all
+ dialog box methods; easily extendible. popup-dialog-box now obsolete.
+
+ * dumped-lisp.el (preloaded-file-list):
+ Add dialog-items. Clean up. Group files by types.
+
+ * easymenu.el (easy-menu-add):
+ * easymenu.el (easy-menu-remove):
+ Account for accelerators.
+
+ * extents.el:
+ * extents.el (extent-list): New args, like in map-extents.
+ * extents.el (extent-at-event): New.
+ * extents.el (extents-at-event): New.
+
+ * font-lock.el:
+ * font-lock.el (font-lock-mode):
+ * font-lock.el (font-lock-default-fontify-buffer):
+ * font-lock.el (font-lock-default-unfontify-region):
+ * font-lock.el (font-lock-fontify-syntactically-region):
+ * font-lock.el (font-lock-fontify-keywords-region):
+ Use new progress-feedback names.
+
+ * font-lock.el (java-font-lock-identifier-regexp):
+ * font-lock.el (java-font-lock-class-name-regexp):
+ Fix bytecompiler warnings.
+
+ * gutter-items.el:
+ * gutter-items.el (progress-display-use-echo-area): Removed.
+ * gutter-items.el (progress-feedback-use-echo-area): New.
+ * gutter-items.el (progress-display-popup-period): Removed.
+ * gutter-items.el (progress-feedback-popup-period): New.
+ * gutter-items.el (set-progress-display-style): Removed.
+ * gutter-items.el (set-progress-feedback-style): New.
+ * gutter-items.el (progress-display-style): Removed.
+ * gutter-items.el (progress-feedback-style): New.
+ * gutter-items.el (progress-stack):
+ * gutter-items.el (progress-displayed-p): Removed.
+ * gutter-items.el (progress-feedbacked-p): New.
+ * gutter-items.el (clear-progress-display): Removed.
+ * gutter-items.el (clear-progress-feedback): New.
+ * gutter-items.el (progress-display-clear-when-idle): Removed.
+ * gutter-items.el (progress-feedback-clear-when-idle): New.
+ * gutter-items.el (remove-progress-display): Removed.
+ * gutter-items.el (remove-progress-feedback): New.
+ * gutter-items.el (progress-display-dispatch-non-command-events): Removed.
+ * gutter-items.el (progress-feedback-dispatch-non-command-events): New.
+ * gutter-items.el (append-progress-display): Removed.
+ * gutter-items.el (append-progress-feedback): New.
+ * gutter-items.el (abort-progress-display): Removed.
+ * gutter-items.el (abort-progress-feedback): New.
+ * gutter-items.el (raw-append-progress-display): Removed.
+ * gutter-items.el (raw-append-progress-feedback): New.
+ * gutter-items.el (display-progress-display): Removed.
+ * gutter-items.el (display-progress-feedback): New.
+ * gutter-items.el (current-progress-display): Removed.
+ * gutter-items.el (current-progress-feedback): New.
+ * gutter-items.el (current-progress-display-label): Removed.
+ * gutter-items.el (current-progress-feedback-label): New.
+ * gutter-items.el (progress-display): Removed.
+ * gutter-items.el (progress-feedback): New.
+ Replace "progress-display" with "progress-feedback" globally.
+
+ * gutter-items.el (lprogress-display): Removed.
+ * gutter-items.el (progress-feedback-with-label): New.
+ Rename lprogress-display ==> progress-feedback-with-label.
+
+ * gutter-items.el (search-dialog-direction): Removed.
+ * gutter-items.el (search-dialog-text): Removed.
+ * gutter-items.el (search-dialog-callback): Removed.
+ * gutter-items.el (make-search-dialog): Removed.
+ Move to dialog-items.el.
+
+ * help.el:
+ * help.el (help-mode-quit):
+ * help.el (mode-for-help): New.
+ * help.el (help-sticky-window): New.
+ * help.el (help-window-config): New.
+ * help.el (with-displaying-help-buffer):
+ * help.el (function-at-event): New.
+ * help.el (help-symbol-regexp): New.
+ * help.el (help-symbol-run-function-1): New.
+ * help.el (help-symbol-run-function): New.
+ * help.el (help-symbol-function-context-menu): New.
+ * help.el (help-symbol-variable-context-menu): New.
+ * help.el (help-symbol-function-and-variable-context-menu): New.
+ * help.el (frob-help-extents): New.
+ * help.el (describe-function-1):
+ * help.el (variable-at-point):
+ * help.el (variable-at-event): New.
+ * help.el (describe-variable):
+ Major overhaul.
+ - Make functions and variables be mousable.
+ - Middle button hyperlinks.
+ - New context-menu entries.
+
+ * keydefs.el:
+ * keydefs.el (global-map):
+ New key bindings to move lines up and down.
+
+ * lisp-mode.el:
+ * lisp-mode.el (construct-lisp-mode-menu): New.
+ * lisp-mode.el (emacs-lisp-mode-popup-menu):
+ * lisp-mode.el (lisp-interaction-mode-menubar-menu):
+ * lisp-mode.el (emacs-lisp-mode-menubar-menu):
+ * lisp-mode.el (lisp-indent-function): Indent "flet" entries better.
+ Make popup and menubar menus be different. Popup menu uses
+ clicked location and automatically assumes symbol under the mouse
+ for various commands.
+
+ * menubar-items.el:
+ * menubar-items.el (bookmark-menu-filter): Add accelerators.
+ * menubar-items.el (buffers-menu-omit-chars-list): Include 'd'.
+
+ * menubar-items.el (global-popup-menu): Removed.
+ * menubar-items.el (mode-popup-menu): Removed.
+ * menubar-items.el (activate-popup-menu-hook): Removed.
+ * menubar-items.el (popup-mode-menu): Removed.
+ * menubar-items.el (popup-buffer-menu): Removed.
+ * menubar-items.el (popup-menubar-menu): Removed.
+ Move to menubar.el.
+
+ * menubar.el:
+ * menubar.el (global-popup-menu): New.
+ * menubar.el (mode-popup-menu): New.
+ * menubar.el (activate-popup-menu-hook): New.
+ * menubar.el (last-popup-menu-event): New.
+ * menubar.el (popup-mode-menu): New.
+ * menubar.el (popup-buffer-menu): New.
+ * menubar.el (popup-menubar-menu): New.
+ * menubar.el (menu-call-at-event): New.
+ Move non-content functions here. Add support for context menu
+ items on extents.
+
+ * minibuf.el (minibuffer-history-uniquify):
+ Typo fix.
+
+ * minibuf.el (read-file-name-1):
+ Call new file dialog box if it exists.
+
+ * minibuf.el (mouse-rfn-setup-vars):
+ Clean up "chop" action.
+
+ * mouse.el:
+ * mouse.el (button2): Now bound to mouse-track.
+ * mouse.el (click-inside-extent-p):
+ * mouse.el (point-inside-extent-p):
+ * mouse.el (point-inside-selection-p):
+ * mouse.el (mouse-drag-or-yank): Removed.
+ * mouse.el (mouse-begin-drag-n-drop): New.
+ * mouse.el (mouse-eval-sexp):
+ * mouse.el (mouse-track-activate-strokes): New.
+ * mouse.el (mouse-track-do-activate): New.
+ * mouse.el (mouse-track):
+ * mouse.el (default-mouse-track-event-is-with-button): New.
+ * mouse.el (default-mouse-track-cleanup-hook):
+ * mouse.el (default-mouse-track-drag-hook):
+ * mouse.el (default-mouse-track-drag-up-hook):
+ * mouse.el (default-mouse-track-click-hook):
+ Merge drag-n-drop into mouse-track.
+ Add general "activate" support to replace specific button2 kludges.
+ Use "button modifier" support in mouse-track.
+
+ * package-get.el (package-get-dependencies): Fix bytecompiler warnings.
+
+ * package-ui.el:
+ * package-ui.el (pui-menu):
+ * package-ui.el (pui-popup-context-sensitive): Removed.
+ Fix bytecompiler warnings.
+ Clean up popup code a bit.
+
+ * select.el (get-selection-no-error): Fix bytecompiler warnings.
+
+ * simple.el:
+ * simple.el (transpose-lines):
+ * simple.el (transpose-line-up): New.
+ * simple.el (transpose-line-down): New.
+ * simple.el (transpose-subr):
+ * simple.el (transpose-subr-1): Removed.
+ Clean up, add functions to move lines up and down.
+
+ * startup.el (mail-host-address):
+ * startup.el (user-mail-address):
+ Customize.
+
+ * subr.el:
+ * subr.el (set-symbol-value-in-buffer): New.
+ * subr.el (error):
+ * subr.el (check-argument-type):
+ * subr.el (defined-error-p): New.
+ Add structured error support.
+
+ * toolbar-items.el (toolbar-compile):
+ Use new make-dialog-box.
+
+ * update-elc.el:
+
+ * userlock.el (ask-user-about-lock-dbox):
+ * userlock.el (ask-user-about-supersession-threat-dbox):
+ * userlock.el (ask-user-about-lock):
+ * userlock.el (ask-user-about-supersession-threat):
+ Use new make-dialog-box.
+ Add safety checks; use should use-dialog-box-p.
+
+ * window-xemacs.el:
+ * window-xemacs.el (__buffer-dedicated-frame):
+ * window-xemacs.el (buffer-dedicated-frame): New.
+ * window-xemacs.el (set-buffer-dedicated-frame): New.
+ Move dedicated-frame stuff into lisp.
+
+2000-07-18 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * printer.el (generic-print-region): Do not require that
+ `printer-name' be set.
+ (printer-name): Commentary clarification.
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
2000-04-14 Andy Piper <andy@xemacs.org>
- * gutter-items.el (make-search-dialog): avoid unneccessary futzing
+ * gutter-items.el (make-search-dialog): avoid unnecessary futzing
by using the new widget-callback-current-channel.
(search-dialog-callback): ditto.
(select-safe-coding-system): New function.
(set-language-info): New optional args DESCRIBE-MAP and SETUP-MAP.
(set-language-info-alist): New optionla arg PARENTS. Call
- set-language-info with apropriate DESCRIBE-MAP and SETUP-MAP args.
+ set-language-info with appropriate DESCRIBE-MAP and SETUP-MAP args.
(set-language-environment-coding-systems): New function.
* mule/chinese.el: Remove setting up of
Added interactive function `package-get-delete-package', for
use by users for deleting a package.
- Also modified to not require the prescence of efs.
+ Also modified to not require the presence of efs.
1998-09-22 Hrvoje Niksic <hniksic@srce.hr>
* find-paths.el (paths-emacs-root-p):
Relaxed emacs-root checking of an in-place installation to
- also accomodate the flat layout used on MS Windows.
+ also accommodate the flat layout used on MS Windows.
1998-06-29 John Jones <jj@asu.edu>
* faces.el: move definition of xpm-color-symbols from x-faces.el
to faces. Predicate x-get-resource on the presence of x.
- * msw-faces.el: set 3d-object face rather than modeline. Specifiy
+ * msw-faces.el: set 3d-object face rather than modeline. Specify
faces as specfier defaults.
* package-get.el: don't use package-admin-add-single-file-package.
1998-03-27 Kyle Jones <kyle_jones@wonderworks.com>
- * faces.el: Separated face intializations based on
+ * faces.el: Separated face initializations based on
device classes into device type specific (tag set,
instantiator) pairs.
1998-02-21 Greg Klanderman <greg@alphatech.com>
* (with-displaying-help-buffer): there is no need to kill the buffer
- if it exists, becasuse with-output-to-temp-buffer will clear it.
+ if it exists, because with-output-to-temp-buffer will clear it.
further, killing the buffer violates the rule that
temp-buffer-show-function, if set, has the full responsibility of
showing the temp buffer. killing the buffer fucks with the window
instead of 1000.
(find-tag-internal): Use `letf'.
(tags-delete): Removed -- was unused.
- (set-buffer-tag-table): Use `expland-file-name'.
+ (set-buffer-tag-table): Use `expand-file-name'.
(get-tag-table-buffer): Use `ecase'.
(add-to-tag-completion-table): Mark the filename messages with
progress.
* modes/lazy-shot.el (lazy-shot-mode): Unstall lazy-shot only if
needed.
- (lazy-shot-fontify-internal): Functionality put in seperate function.
+ (lazy-shot-fontify-internal): Functionality put in separate function.
(lazy-shot-lock-extent): Use it.
(lazy-shot-fontify-region): Dumb implementation added.
(lazy-shot-unstall-after-fontify): Needed to disable lazy
;;;***
\f
-;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp/cleantree.el")
-
-(autoload 'batch-remove-old-elc "cleantree" nil nil nil)
-
-;;;***
-\f
;;;### (autoloads (config-value config-value-hash-table) "config" "lisp/config.el")
(autoload 'config-value-hash-table "config" "\
(autoload 'custom-reset-faces "cus-face" "\
Reset the value of the face to values previously defined.
-Assosiate this setting with the 'user' theme.
+Associate this setting with the 'user' theme.
ARGS is defined as for `custom-theme-reset-faces'" nil nil)
;;;***
\f
-;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el")
+;;;### (autoloads (finder-by-keyword finder-commentary) "finder" "lisp/finder.el")
+
+(autoload 'finder-commentary "finder" "\
+Display FILE's commentary section.
+FILE should be in a form suitable for passing to `locate-library'." t nil)
(autoload 'finder-by-keyword "finder" "\
Find packages matching a given keyword." t nil)
;;;***
\f
-;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el")
+;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-find-node Info-query info) "info" "lisp/info.el")
(defvar Info-directory-list nil "\
List of directories to search for Info documentation files.
(autoload 'Info-query "info" "\
Enter Info, the documentation browser. Prompt for name of Info file." t nil)
+(autoload 'Info-find-node "info" "\
+Go to an info node specified as separate FILENAME and NODENAME.
+Look for a plausible filename, or if not found then look for URL's and
+dispatch to the appropriate fn. NO-GOING-BACK is non-nil if
+recovering from an error in this function; it says do not attempt
+further (recursive) error recovery. TRYFILE is ??" nil nil)
+
(autoload 'Info-batch-rebuild-dir "info" "\
(Re)build info `dir' files in the directories remaining on the command line.
Use this from the command line, with `-batch';
when they are selected for the first time. If you add fonts to your system,
or if you change your font path, you can call this to re-initialize the menus." nil nil)
-(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant)))
+(defun* x-font-menu-font-data (face dcache) (defvar x-font-regexp) (defvar x-font-regexp-foundry-and-family) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant)))
;;;***
\f
;; Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
-;; Copyright (C) 1996 Ben Wing.
+;; Copyright (C) 1996, 2000 Ben Wing.
;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
;; Keywords: maint
(directory-file-name
(file-name-directory file))))
"\\\\" "/"))
-
+
;;;###autoload
(defun generate-file-autoloads (file &optional funlist)
"Insert at point a loaddefs autoload section for FILE.
updated.")
(defconst cusload-file-name "custom-load.el"
- "Generic filename ot put custom loads into.
-Unless you are an XEmacs maintainr, it is probably unwise to change this.")
+ "Generic filename to put custom loads into.
+Unless you are an XEmacs maintainer, it is probably unwise to change this.")
;;;###autoload
(defun update-file-autoloads (file)
(goto-char (point-max))
(insert "\n(provide '" sym ")\n")))))
-;; #### this function is almost identical, but subtly different,
-;; from batch-update-autoloads. Steve, it's your responsibility to
-;; clean this up. The two should be merged, but I'm not sure what
-;; package-creation scripts out there might be using this. --ben
+(defvar autoload-package-name nil)
+
+;; #### this function is almost identical to, but subtly different from,
+;; batch-update-autoloads. Both of these functions, unfortunately, are
+;; used in various build scripts in xemacs-packages. They should be
+;; merged. (However, it looks like no scripts pass more than one arg,
+;; making merging easy.) --ben
;;;###autoload
(defun batch-update-directory ()
(setq command-line-args-left nil)))
;; #### i created the following. this one and the last should be merged into
-;; batch-update-autoloads. --ben
+;; batch-update-autoloads and batch-update-one-directory. --ben
;;;###autoload
(defun batch-update-one-directory ()
;; Copyright (C) 1997 Adrian Aichner
;; Author: Adrian Aichner <adrian@xemacs.org>
-;; Date: Sun., Apr. 20, 1997, 1998, 1999.
-;; Version: 1.35
+;; Date: Sun., Apr. 20, 1997-2000.
+;; Version: $Revision: 1.5.2.6 $
;; Keywords: internal
;; This file is part of XEmacs.
;;; Code:
(require 'config)
+(require 'custom)
+(require 'cl)
(provide 'build-report)
-;; Due to recommendation by developers on xemacs-beta@xemacs.org,
-;; release versions are to be checked out using `co -u -kv ...'.
-(defconst build-report-version
- "1.35"
- "Version number of build-report.")
+;;; Constant definitions used internally by `build-report'. These are not
+;;; anticipated to be changed by users of `build-report'.
+;;; If users do need to change the value of any of these, they need to do
+;;; it after `build-report' has been loaded (not just required). Please
+;;; report it to the maintainers of `build-report' when you think you
+;;; need to do this.
+(defconst build-report-installation-version-regexp
+ "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+configured\\s-+for\\s-+`\\(.+\\)'\\."
+ "*REGEXP matching XEmacs Beta Version string in
+`build-report-installation-file' file. This variable is used by
+`build-report-installation-data'.")
+
+(defconst build-report-version-file-regexp
+ "emacs_major_version\\s-*=\\s-*\\([0-9]+\\)
+emacs_minor_version\\s-*=\\s-*\\([0-9]+\\)
+emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)?
+xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\""
+ "*REGEXP matching XEmacs Beta Version variable assignments in
+`build-report-version-file' file. This variable is used by
+`build-report-version-file-data'.")
+
+(defconst build-report-installation-srcdir-regexp
+ "\\s-*Where should the build process find the source code\\?\\s-*\\(.*\\)$"
+ "REGEXP matching XEmacs Beta srcdir as the first substring match in
+`build-report-installation-file' file. This variable is used by
+`build-report-installation-data'.")
+
+;;; Customization support for build-report starts here.
(defgroup build-report nil
- "Package automating the process of sending XEmacs Build Reports."
+ "Standardizes the Creation of XEmacs Build Reports."
+ :load 'build-report
:group 'build)
(defcustom build-report-destination
- "xemacs-build-reports@xemacs.org"
- "The mail address XEmacs Build Reports should go to."
- :type 'string
+ (quote ("XEmacs Build Reports List <xemacs-build-reports@xemacs.org>"
+ "XEmacs Beta List <xemacs-beta@xemacs.org>"))
+ "*The list of mail addresses XEmacs Build Reports should most likely
+go to."
+ :type '(repeat
+ :custom-show t
+ :documentation-shown t
+ string)
:group 'build-report)
(defcustom build-report-keep-regexp
- (list
- "make\\["
- "error"
- "warn"
- "pure.*\\(space\\|size\\)"
- "hides\\b"
- "strange"
- "shadowings"
- "^Compilation"
- "not\\s-+found")
- "Regexp of make process output lines to keep in the report."
- :type '(repeat regexp)
+ (quote ("^\\(cd\\|n?make\\)\\s-" "errors?" "warnings?"
+ "pure.*\\(space\\|size\\)" "hides\\b" "strange" "shadowings"
+ "^Compil\\(ing\\s-+in\\|ation\\)" "^Using" "not\\s-+found"
+ "^While\\s-+compiling.*\\(\n\\s-+.+\\)*" "^Note:"
+ "Installing" "[Ff]ile(s) copied"
+ "\\s-+tests\\s-+"))
+ "*Regexp of make process output lines to keep in the report."
+ :type '(repeat
+ :custom-show t
+ :documentation-shown t
+ regexp)
:group 'build-report)
(defcustom build-report-delete-regexp
- (list
- "confl.*with.*auto-inlining"
- (concat (regexp-quote (gethash 'blddir (config-value-hash-table))) "/lisp/[^ \t\n]+ hides "))
- "Regexp of make process output lines to delete from the report."
- :type '(repeat regexp)
+ (quote ("confl.*with.*auto-inlining" "^Formatting:"))
+ "*Regexp of make process output lines to delete from the report."
+ :type '(repeat
+ :custom-show t
+ :documentation-shown t
+ regexp)
:group 'build-report)
-(defcustom build-report-make-output-file
- (concat (gethash 'blddir (config-value-hash-table)) "/beta.err")
- "Filename where stdout and stderr of XEmacs make process have been stored.
-mk.err will not be created automatically. You'll have to run make with
-output redirection. I use an alias
+(defcustom build-report-make-output-dir
+ (cond
+ ((equal system-type 'windows-nt)
+ (expand-file-name "nt"
+ (gethash 'blddir (config-value-hash-table))))
+ (t
+ (gethash 'blddir (config-value-hash-table))))
+ "*Directory where the build report file is found.
+ If this is empty or nil, the default, it is replaced by the value of
+ the XEmacs build directory."
+ :type '(directory
+ :custom-show t
+ :documentation-shown t)
+ :group 'build-report)
+
+(defcustom build-report-make-output-files
+ (quote ("beta.err"))
+ "*List of Filenames where stdout and stderr of XEmacs make process
+have been stored. These are relative to
+`build-report-make-output-dir`. You'll have to run make with output
+redirection or use the `build' XEmacs package to save this output. You
+may use following alias
+
alias mk 'make \!* >>&\! \!$.err &'
-for that, so that I get beta.err went I run `mk beta'."
- :type 'file
+
+under csh, so that you get beta.err went you run `mk beta'."
+ :type '(repeat
+ :custom-show t
+ :documentation-shown t
+ file)
:group 'build-report)
(defcustom build-report-installation-file
- (concat (gethash 'blddir (config-value-hash-table)) "/Installation")
- "Installation file produced by XEmacs configure process."
- :type 'file
+ (expand-file-name "Installation"
+ (gethash 'blddir (config-value-hash-table)))
+ "*Installation file produced by XEmacs configure process."
+ :type '(file
+ :custom-show t
+ :documentation-shown t)
:group 'build-report)
-(defcustom build-report-installation-insert-all nil
- "Tell build-report to insert the whole Installation file
-instead of just the last report."
+(defcustom build-report-version-file
+ (expand-file-name
+ "version.sh"
+ (gethash 'blddir (config-value-hash-table)))
+ "*version.sh file identifying XEmacs (Beta) Distribution."
+ :type '(file
+ :custom-show t
+ :documentation-shown t)
+ :group 'build-report)
+
+(defcustom build-report-installation-insert-all
+ nil
+ "*Tell build-report to insert the whole Installation file
+ instead of just the last report."
:type 'boolean
:group 'build-report)
(defcustom build-report-subject
(concat "[%s] " emacs-version " on " system-configuration)
- "XEmacs Build Report Subject Line. %s-sequences will be substituted
-with user input through `build-report' according to
-`build-report-prompts' using `format'."
- :type 'string
+ "*XEmacs Build Report Subject Line. %s-sequences will be substituted
+ with user input through `build-report' according to
+ `build-report-prompts' using `format'."
+ :type '(string
+ :custom-show t
+ :documentation-shown t)
:group 'build-report)
(defcustom build-report-prompts
- '(("Status?: " "Success" "Failure"))
- "XEmacs Build Report Prompt(s). This is a list of prompt-string
-lists used by `build-report' in conjunction with
-`build-report-subject'. Each list consists of a prompt string
-followed by any number of strings which can be chosen via the history
-mechanism."
+ (quote (("Status?: " ("Success" "Failure"))))
+ "*XEmacs Build Report Prompt(s). This is a list of prompt-string
+ lists used by `build-report' in conjunction with
+ `build-report-subject'. Each list consists of a prompt string
+ followed by any number of strings which can be chosen via the history
+ mechanism."
+ :type '(repeat
+ :custom-show t
+ :documentation-shown t
+ (list
+ :tag "Prompt"
+ string
+ (repeat
+ :tag "Values"
+ string)))
:group 'build-report)
(defcustom build-report-file-encoding
"7bit"
- "XEmacs Build Report File Encoding to be used when MIME support is
-available."
+ "*XEmacs Build Report File Encoding to be used when MIME support is
+ available."
:group 'build-report)
;; Symbol Name mappings from TM to SEMI serving as Compatibility
(defalias 'mime-edit-insert-binary-file
'mime-editor/insert-binary-file)))
+(defun build-report-make-output-get ()
+ "Returns the filename the XEmacs make output is saved in."
+ (interactive)
+ (if (or (string-equal build-report-make-output-dir "")
+ (null build-report-make-output-dir))
+ (mapcar
+ (function
+ (lambda (f)
+ (expand-file-name
+ f
+ (file-name-as-directory
+ (gethash 'blddir (config-value-hash-table))))))
+ build-report-make-output-files)
+ (mapcar
+ (function
+ (lambda (f)
+ (expand-file-name
+ f
+ (file-name-as-directory build-report-make-output-dir))))
+ build-report-make-output-files)))
+
;;;###autoload
(defun build-report (&rest args)
- "Initializes a fresh mail composition buffer using `compose-mail'
-with the contents of XEmacs Installation file and excerpts from XEmacs
-make output and errors and leaves point at the beginning of the mail text.
- See also
-`compose-mail', `mail-user-agent',
-`build-report-destination',
-`build-report-keep-regexp',
-`build-report-delete-regexp',
-`build-report-make-output-file' and
-`build-report-installation-file'."
+ "Composes a fresh mail message with the contents of the built XEmacs
+Installation file and excerpts from XEmacs make output.
+`compose-mail' is used to create the mail message. Point is left at
+the beginning of the mail text. You may add some personal notes if
+you like and send the report.
+See also
+ `compose-mail', `mail-user-agent',
+ `build-report-destination',
+ `build-report-keep-regexp',
+ `build-report-delete-regexp',
+ `build-report-make-output-dir',
+ `build-report-make-output-files', and
+ `build-report-installation-file'."
+ ;; `interactive' form returns value for formal parameter `args'.
(interactive
(let (prompt
- hist
- arg
- (prompts build-report-prompts))
+ hist
+ arg
+ (prompts build-report-prompts))
(progn
(while prompts
- (defvar hist)
- (setq prompt (caar prompts))
- (setq hist (cdar prompts))
- (setq prompts (cdr prompts))
- (setq arg (cons (read-string prompt "" 'hist) arg)))
+ (defvar hist)
+ (setq prompt (caar prompts))
+ (setq hist (cdar prompts))
+ ;; `build-report-prompts' used to be a list of lists, the
+ ;; first element of each list being the prompt, the rest being
+ ;; the history. The history is now in a separate list. We
+ ;; better check for that.
+ (if (listp (car hist))
+ (setq hist (car hist)))
+ (setq prompts (cdr prompts))
+ (setq arg (cons (read-string prompt "" 'hist) arg)))
arg)))
(save-excursion
+ (if (file-exists-p build-report-installation-file)
+ (multiple-value-bind
+ (major minor beta codename configuration)
+ (build-report-installation-data build-report-installation-file)
+ (setq build-report-subject
+ (format "[%%s] XEmacs %s.%s%s \"%s\", %s"
+ major minor beta codename configuration)))
+ (multiple-value-bind
+ (major minor beta codename)
+ (build-report-version-file-data build-report-version-file)
+ (setq build-report-subject
+ (format "[%%s] XEmacs %s.%s%s \"%s\", %s"
+ major minor beta codename system-configuration))))
(compose-mail
- build-report-destination
+ ;; `build-report-destination' used to be a single string, so
+ ;; let's test if we really get a list of destinations.
+ (if (listp build-report-destination)
+ (read-string
+ "Build Report Destination: "
+ (car build-report-destination)
+ 'build-report-destination)
+ (read-string
+ "Build Report Destination: "
+ build-report-destination)
+ )
(apply 'format build-report-subject args)
nil
nil
nil
nil
nil)
- (let ((report-begin (point)))
- (insert (build-report-insert-make-output report-begin))
- (insert (build-report-insert-installation-file
- report-begin
- build-report-installation-insert-all))
+ (let* ((report-begin (point))
+ (files (reverse (build-report-make-output-get)))
+ (file (car files)))
+ (while file
+ (if (file-exists-p file)
+ (insert (build-report-insert-make-output report-begin file))
+ (insert (format "%s not found!\n" file)))
+ (insert "\n")
+ (setq files (cdr files))
+ (setq file (car files)))
+ (if (file-exists-p build-report-installation-file)
+ (insert (build-report-insert-installation-file
+ report-begin
+ build-report-installation-insert-all))
+ (insert (format "%s not found!\n" build-report-installation-file)))
+;;; (when (and (>= major 21) (>= minor 2) (or (null beta) (>= beta 32)))
+;;; (insert "\n")
+;;; (insert (build-report-insert-config-inc report-begin)))
+ (insert "\n")
(insert (build-report-insert-header report-begin))
(goto-char report-begin))))
"Inserts the build-report-header at the point specified by `where'."
(goto-char where)
(with-temp-buffer
- (insert "\n> XEmacs Build Report as generated\n> by"
- " build-report-version "
- build-report-version " follows:\n\n")
+ (insert
+ (format "
+> XEmacs Build Report generated by emacs-version
+> %s
+> with system-configuration
+> %s
+> follows:\n\n" emacs-version system-configuration))
(buffer-string)))
-(defun build-report-insert-make-output (where)
- "Inserts the output of the XEmacs Beta make run.
+(defun build-report-insert-make-output (where file)
+ "Inserts the output of the XEmacs Beta make run in the
+current buffer at position WHERE.
The make process output must have been saved in
-`build-report-make-output-file' during the XEmacs Beta building."
+`build-report-make-output-files' during the XEmacs Beta building."
(goto-char where)
(with-temp-buffer
- (if (file-exists-p build-report-make-output-file)
- (progn
- (if (featurep 'mime-setup)
- (progn
- (mime-edit-insert-tag
- "text"
- "plain"
- (concat
- "\nContent-Disposition: attachment;"
- " filename=\""
- (file-name-nondirectory
- build-report-make-output-file)
- "\""))
- (mime-edit-insert-binary-file
- build-report-make-output-file
- build-report-file-encoding))
- (insert-file-contents build-report-make-output-file))
- (goto-char (point-min))
- (delete-non-matching-lines (build-report-keep))
- (goto-char (point-min))
- (delete-matching-lines (build-report-delete))
- (goto-char (point-min))
- (insert "> Contents of "
- build-report-make-output-file
- "\n> keeping lines matching\n> \""
- (build-report-keep)
- "\"\n> and then deleting lines matching\n> \""
- (build-report-delete)
- "\"\n\n"))
- (insert "> " build-report-make-output-file
- " does not exist!\n\n"))
+ (if (file-exists-p file)
+ (progn
+ (if (featurep 'mime-setup)
+ (progn
+ (mime-edit-insert-tag
+ "text"
+ "plain"
+ (concat
+ "\nContent-Disposition: attachment;"
+ " filename=\""
+ (file-name-nondirectory
+ file)
+ "\""))
+ (mime-edit-insert-binary-file
+ file
+ build-report-file-encoding))
+ (insert-file-contents file))
+ (when build-report-keep-regexp
+ (goto-char (point-min))
+ (delete-non-matching-lines (build-report-keep)))
+ (when build-report-delete-regexp
+ (goto-char (point-min))
+ (delete-matching-lines (build-report-delete)))
+ (goto-char (point-min))
+ (if build-report-keep-regexp
+ (insert
+ (format
+ "> keeping lines matching
+> \"%s\"
+"
+ (build-report-keep))))
+ (if build-report-delete-regexp
+ (insert
+ (format
+ "> %sdeleting lines matching
+> \"%s\"
+"
+ (if build-report-keep-regexp
+ "and then "
+ "")
+ (build-report-delete))))
+ (insert "\n")
+ (goto-char (point-min))
+ (insert
+ (format "> Contents of %s\n" file)))
+ (insert "> " file
+ " does not exist!\n\n"))
(buffer-string)))
(defun build-report-insert-installation-file (where all)
(goto-char where)
(with-temp-buffer
(if (file-exists-p build-report-installation-file)
- (let (file-begin last-configure)
- (insert "> Contents of "
- build-report-installation-file
- ":\n")
- (insert
- (format
- "> (Output from %s of ./configure)\n\n"
- (if all "all runs" "most recent run")))
- (if (featurep 'mime-setup)
- (progn
- (mime-edit-insert-tag
- "text"
- "plain"
- (concat
- "\nContent-Disposition: attachment;"
- " filename=\""
- (file-name-nondirectory
- build-report-installation-file)
- "\""))
- (mime-edit-insert-binary-file
- build-report-installation-file
- build-report-file-encoding)
- (setq file-begin (mime-edit-content-beginning)))
- (setq file-begin (point))
- (insert-file-contents
- build-report-installation-file))
- (unless all
- (setq last-configure
- (search-backward-regexp
- "^\\(uname.*\\|osversion\\):\\s-+" file-begin t))
- (if (and file-begin last-configure)
- (delete-region file-begin last-configure))))
+ (let (file-begin last-configure)
+ (insert "> Contents of "
+ build-report-installation-file
+ ":\n")
+ (insert
+ (format
+ "> (Output from %s of ./configure)\n\n"
+ (if all "all runs" "most recent run")))
+ (if (featurep 'mime-setup)
+ (progn
+ (mime-edit-insert-tag
+ "text"
+ "plain"
+ (concat
+ "\nContent-Disposition: attachment;"
+ " filename=\""
+ (file-name-nondirectory
+ build-report-installation-file)
+ "\""))
+ (mime-edit-insert-binary-file
+ build-report-installation-file
+ build-report-file-encoding)
+ (setq file-begin (mime-edit-content-beginning)))
+ (setq file-begin (point))
+ (insert-file-contents
+ build-report-installation-file))
+ (unless all
+ (setq last-configure
+ (search-backward-regexp
+ "^\\(uname.*\\|osversion\\|OS\\):\\s-+" file-begin t))
+ (if (and file-begin last-configure)
+ (delete-region file-begin last-configure))))
(insert "> " build-report-installation-file
- " does not exist!\n\n"))
+ " does not exist!\n\n"))
(buffer-string)))
(defun build-report-keep ()
- "build-report-internal function of no general value."
+ "Concatenate elements of `build-report-keep-regexp' and a general
+MIME tag REGEXP. The result is a REGEXP string matching either of the
+REGEXPs in `build-report-keep-regexp' or a general MIME tag REGEXP."
(mapconcat #'identity
- (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
+ (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
(defun build-report-delete ()
- "build-report-internal function of no general value."
- (mapconcat #'identity
- build-report-delete-regexp "\\|"))
+ "Concatenate elements of `build-report-delete-regexp' and a general
+MIME tag REGEXP. The result is a REGEXP string matching either of the
+REGEXPs in `build-report-delete-regexp' or a general MIME tag REGEXP."
+ (mapconcat '(lambda (item) item)
+ build-report-delete-regexp "\\|"))
+
+(defun build-report-installation-data (&optional file)
+ "Return a list of XEmacs installation data containing MAJOR_NUMBER
+MINOR_NUMBER BETA_STRING CODENAME CONFIGURATION SRCDIR from FILE,
+which defaults to `build-report-installation-file'."
+ (interactive "fInstallation file: ")
+ (unless file
+ (setq file build-report-installation-file))
+ (let
+ (major minor beta codename configuration srcdir)
+ (save-window-excursion
+ (find-file-read-only file)
+ (goto-char (point-min))
+ (while (< (point) (point-max))
+ (cond
+ ((looking-at build-report-installation-version-regexp)
+ (goto-char (match-end 0))
+ (setq major (match-string 1))
+ (setq minor (match-string 2))
+ (setq beta (match-string 3))
+ (setq codename (match-string 6))
+ (setq configuration (match-string 7)))
+ ((looking-at build-report-installation-srcdir-regexp)
+ (goto-char (match-end 0))
+ (setq srcdir (match-string 1)))
+ ;; We avoid matching a potentially zero-length string to avoid
+ ;; infinite looping.
+ ((looking-at
+ "^.+$")
+ (goto-char (match-end 0)))
+ ((looking-at "\n")
+ (goto-char (match-end 0)))))
+ (values major minor (or beta "") codename configuration srcdir))))
+
+(defun build-report-version-file-data (&optional file)
+ "Return a list of XEmacs version information containing
+MAJOR_NUMBER MINOR_NUMBER BETA_STRING CODENAME from FILE, which
+defaults to `build-report-version-file'."
+ (interactive "fversion.sh file: ")
+ (unless file
+ (setq file build-report-version-file))
+ (let
+ (major minor beta codename)
+ (save-window-excursion
+ (find-file-read-only file)
+ (goto-char (point-min))
+ (while (< (point) (point-max))
+ (cond
+ ((looking-at build-report-version-file-regexp)
+ (goto-char (match-end 0))
+ (setq major (match-string 1))
+ (setq minor (match-string 2))
+ (setq beta (match-string 3))
+ (setq codename (match-string 4)))
+ ;; We avoid matching a potentially zero-length string to avoid
+ ;; infinite looping.
+ ((looking-at
+ "^.+$")
+ (goto-char (match-end 0)))
+ ((looking-at "\n")
+ (goto-char (match-end 0)))))
+ (values major minor (or beta "") codename))))
;;; build-report.el ends here
;; fetch and return the offset for the current opcode.
;; return NIL if this opcode has no offset
;; OP, PTR and BYTES are used and set dynamically
- (defvar op)
- (defvar ptr)
- (defvar bytes)
+ (declare (special op ptr bytes))
(cond ((< op byte-nth)
(let ((tem (logand op 7)))
(setq op (logand op 248))
(defun byte-optimize-lapcode (lap &optional for-effect)
"Simple peephole optimizer. LAP is both modified and returned."
- (let (lap0 ;; off0 unused
- lap1 ;; off1
- lap2 ;; off2
+ (let (lap0
+ lap1
+ lap2
+ variable-frequency
(keep-going 'first-time)
(add-depth 0)
rest tmp tmp2 tmp3
;; Rebuild byte-compile-constants / byte-compile-variables.
;; Simple optimizations that would inhibit other optimizations if they
;; were done in the optimizing loop, and optimizations which there is no
- ;; need to do more than once.
+ ;; need to do more than once.
(setq byte-compile-constants nil
- byte-compile-variables nil)
+ byte-compile-variables nil
+ variable-frequency (make-hash-table :test 'eq))
(setq rest lap)
(while rest
(setq lap0 (car rest)
lap1 (nth 1 rest))
- (if (memq (car lap0) byte-constref-ops)
- (if (eq (cdr lap0) 'byte-constant)
- (or (memq (cdr lap0) byte-compile-variables)
- (setq byte-compile-variables (cons (cdr lap0)
- byte-compile-variables)))
- (or (memq (cdr lap0) byte-compile-constants)
- (setq byte-compile-constants (cons (cdr lap0)
- byte-compile-constants)))))
+ (case (car lap0)
+ ((byte-varref byte-varset byte-varbind)
+ (incf (gethash (cdr lap0) variable-frequency 0))
+ (unless (memq (cdr lap0) byte-compile-variables)
+ (push (cdr lap0) byte-compile-variables)))
+ ((byte-constant)
+ (unless (memq (cdr lap0) byte-compile-constants)
+ (push (cdr lap0) byte-compile-constants))))
(cond (;;
- ;; const-C varset-X const-C --> const-C dup varset-X
+ ;; const-C varset-X const-C --> const-C dup varset-X
;; const-C varbind-X const-C --> const-C dup varbind-X
;;
(and (eq (car lap0) 'byte-constant)
(eq (car (nth 2 rest)) 'byte-constant)
- (eq (cdr lap0) (car (nth 2 rest)))
+ (eq (cdr lap0) (cdr (nth 2 rest)))
(memq (car lap1) '(byte-varbind byte-varset)))
(byte-compile-log-lap " %s %s %s\t-->\t%s dup %s"
lap0 lap1 lap0 lap0 lap1)
(setcdr lap1 (+ (cdr lap1) (cdr lap0))))
)
(setq rest (cdr rest)))
+ ;; Since the first 6 entries of the compiled-function constants
+ ;; vector are most efficient for varref/set/bind ops, we sort by
+ ;; reference count. This generates maximally space efficient and
+ ;; pretty time-efficient byte-code. See `byte-compile-constants-vector'.
+ (setq byte-compile-variables
+ (sort byte-compile-variables
+ #'(lambda (v1 v2)
+ (< (gethash v1 variable-frequency)
+ (gethash v2 variable-frequency)))))
+ ;; Another hack - put the most used variable in position 6, for
+ ;; better locality of reference with adjoining constants.
+ (let ((tail (last byte-compile-variables 6)))
+ (setq byte-compile-variables
+ (append (nbutlast byte-compile-variables 6)
+ (nreverse tail))))
(setq byte-compile-maxdepth (+ byte-compile-maxdepth add-depth)))
lap)
;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc.
;;; Copyright (C) 1996 Ben Wing.
-;; Author: Jamie Zawinski <jwz@jwz.org>
+;; Authors: Jamie Zawinski <jwz@jwz.org>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
-;; Keywords: internal
+;; Ben Wing <ben@xemacs.org>
+;; Martin Buchholz <martin@xemacs.org>
+;; Richard Stallman <rms@gnu.org>
+;; Keywords: internal lisp
-;; Subsequently modified by RMS and others.
-
-(defconst byte-compile-version (purecopy "2.26 XEmacs; 1998-10-07."))
+(defconst byte-compile-version (purecopy "2.27 XEmacs; 2000-09-12."))
;; This file is part of XEmacs.
;;; Commentary:
;; The Emacs Lisp byte compiler. This crunches lisp source into a
-;; sort of p-code which takes up less space and can be interpreted
-;; faster. The user entry points are byte-compile-file,
+;; sort of p-code (`bytecode') which takes up less space and can be
+;; interpreted faster. First, the source code forms are converted to
+;; an intermediate form, `lapcode' [`LAP' == `Lisp Assembly Program']
+;; which is much easier to manipulate than bytecode. Then the lapcode
+;; is converted to bytecode, which can be considered to be actual
+;; machine language. Optimizations can occur at either the source
+;; level or the lapcode level.
+
+;; The user entry points are byte-compile-file,
;; byte-recompile-directory and byte-compile-buffer.
;;; Code:
(concat "!! "
(format (if (cdr error-info) "%s (%s)" "%s")
(get (car error-info) 'error-message)
- (prin1-to-string (cdr error-info))))))
+ (prin1-to-string (cdr error-info)))))
+ (if stack-trace-on-error
+ (backtrace nil t)))
;;; Used by make-obsolete.
(defun byte-compile-obsolete (form)
(point-max byte-compile-log-buffer))))
(unwind-protect
- (condition-case error-info
- (progn ,@body)
- (error
- (byte-compile-report-error error-info)))
-
+ (call-with-condition-handler
+ #'(lambda (error-info)
+ (byte-compile-report-error error-info))
+ #'(lambda ()
+ (progn ,@body)))
;; Always set point in log to start of interesting output.
(with-current-buffer byte-compile-log-buffer
(let ((show-begin
;; No doc string, so we can compile this as a normal form.
(byte-compile-keep-pending form 'byte-compile-normal-call)))
-(put 'defvar 'byte-hunk-handler 'byte-compile-file-form-defvar)
-(put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar)
-(defun byte-compile-file-form-defvar (form)
+(put 'defvar 'byte-hunk-handler 'byte-compile-file-form-defvar-or-defconst)
+(put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar-or-defconst)
+(defun byte-compile-file-form-defvar-or-defconst (form)
+ ;; (defvar|defconst VAR [VALUE [DOCSTRING]])
(if (> (length form) 4)
- (byte-compile-warn "%s used with too many args (%s)"
- (car form) (nth 1 form)))
+ (byte-compile-warn
+ "%s %s called with %d arguments, but accepts only %s"
+ (car form) (nth 1 form) (length (cdr form)) 3))
(if (and (> (length form) 3) (not (stringp (nth 3 form))))
(byte-compile-warn "Third arg to %s %s is not a string: %s"
(car form) (nth 1 form) (nth 3 form)))
(byte-defop-compiler-1 defun)
(byte-defop-compiler-1 defmacro)
(byte-defop-compiler-1 defvar)
-(byte-defop-compiler-1 defconst byte-compile-defvar)
+(byte-defop-compiler-1 defvar byte-compile-defvar-or-defconst)
+(byte-defop-compiler-1 defconst byte-compile-defvar-or-defconst)
(byte-defop-compiler-1 autoload)
;; According to Mly this can go now that lambda is a macro
;(byte-defop-compiler-1 lambda byte-compile-lambda-form)
(list 'quote (cons 'macro (eval code))))))
(list 'quote (nth 1 form)))))
-(defun byte-compile-defvar (form)
- ;; This is not used for file-level defvar/consts with doc strings:
- ;; byte-compile-file-form-defvar will be used in that case.
- (let ((var (nth 1 form))
+(defun byte-compile-defvar-or-defconst (form)
+ ;; This is not used for file-level defvar/defconsts with doc strings:
+ ;; byte-compile-file-form-defvar-or-defconst will be used in that case.
+ ;; (defvar|defconst VAR [VALUE [DOCSTRING]])
+ (let ((fun (nth 0 form))
+ (var (nth 1 form))
(value (nth 2 form))
(string (nth 3 form)))
- (if (> (length form) 4)
- (byte-compile-warn "%s used with too many args" (car form)))
- (if (memq 'free-vars byte-compile-warnings)
- (setq byte-compile-bound-variables
- (cons (cons var byte-compile-global-bit)
- byte-compile-bound-variables)))
+ (when (> (length form) 4)
+ (byte-compile-warn
+ "%s %s called with %d arguments, but accepts only %s"
+ fun var (length (cdr form)) 3))
+ (when (memq 'free-vars byte-compile-warnings)
+ (push (cons var byte-compile-global-bit) byte-compile-bound-variables))
(byte-compile-body-do-effect
- (list (if (cdr (cdr form))
- (if (eq (car form) 'defconst)
- (list 'setq var value)
- (list 'or (list 'boundp (list 'quote var))
- (list 'setq var value))))
- ;; Put the defined variable in this library's load-history entry
- ;; just as a real defvar would.
- (list 'setq 'current-load-list
- (list 'cons (list 'quote var)
- 'current-load-list))
- (if string
- (list 'put (list 'quote var) ''variable-documentation string))
- (list 'quote var)))))
+ (list
+ ;; Put the defined variable in this library's load-history entry
+ ;; just as a real defvar would, but only in top-level forms.
+ (when (null byte-compile-current-form)
+ `(push ',var current-load-list))
+ (when (> (length form) 3)
+ (when (and string (not (stringp string)))
+ (byte-compile-warn "Third arg to %s %s is not a string: %s"
+ fun var string))
+ `(put ',var 'variable-documentation ,string))
+ (if (cdr (cdr form)) ; `value' provided
+ (if (eq fun 'defconst)
+ ;; `defconst' sets `var' unconditionally.
+ `(setq ,var ,value)
+ ;; `defvar' sets `var' only when unbound.
+ `(if (not (boundp ',var)) (setq ,var ,value))))
+ `',var))))
(defun byte-compile-autoload (form)
(and (byte-compile-constp (nth 1 form))
(cond ((eq (car-safe spec) 'special)
(if (boundp 'byte-compile-bound-variables)
(setq byte-compile-bound-variables
- ;; todo: this should compute correct binding bits vs. 0
- (append (mapcar #'(lambda (v) (cons v 0))
- (cdr spec))
- byte-compile-bound-variables))))
+ (append
+ (mapcar #'(lambda (v) (cons v byte-compile-global-bit))
+ (cdr spec))
+ byte-compile-bound-variables))))
((eq (car-safe spec) 'inline)
(while (setq spec (cdr spec))
(defsetf x-get-cut-buffer x-store-cut-buffer t) ; groan.
(defsetf x-get-secondary-selection x-own-secondary-selection t)
(defsetf x-get-selection x-own-selection t)
+(defsetf get-selection own-selection t)
;;; More complex setf-methods.
;;; These should take &environment arguments, but since full arglists aren't
(remove* cl-item cl-seq ':test 'equal))
(defun remq (cl-elt cl-list)
- "Remove all occurances of ELT in LIST, comparing with `eq'.
+ "Remove all occurrences of ELT in LIST, comparing with `eq'.
This is a non-destructive function; it makes a copy of LIST to avoid
corrupting the original LIST.
Also see: `delq', `delete', `delete*', `remove', `remove*'."
Otherwise, the macro is expanded and the expansion is considered
in place of FORM. When a non-macro-call results, it is returned.
-The second optional arg ENVIRONMENT species an environment of macro
+The second optional arg ENVIRONMENT specifies an environment of macro
definitions to shadow the loaded ones for use in file byte-compilation."
(let ((cl-macro-environment cl-env))
(while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env))
(sleep-for 2))))
ans)))
-;; these may be redefined later, but make the original def easily encapsulable
-(define-function 'yes-or-no-p 'yes-or-no-p-minibuf)
-(define-function 'y-or-n-p 'y-or-n-p-minibuf)
+(defun yes-or-no-p (prompt)
+ "Ask user a yes-or-no question. Return t if answer is yes.
+The question is asked with a dialog box or the minibuffer, as appropriate.
+Takes one argument, which is the string to display to ask the question.
+It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it.
+The user must confirm the answer with RET,
+and can edit it until it as been confirmed."
+ (if (should-use-dialog-box-p)
+ (yes-or-no-p-dialog-box prompt)
+ (yes-or-no-p-minibuf prompt)))
+
+(defun y-or-n-p (prompt)
+ "Ask user a \"y or n\" question. Return t if answer is \"y\".
+Takes one argument, which is the string to display to ask the question.
+The question is asked with a dialog box or the minibuffer, as appropriate.
+It should end in a space; `y-or-n-p' adds `(y or n) ' to it.
+No confirmation of the answer is requested; a single character is enough.
+Also accepts Space to mean yes, or Delete to mean no."
+ (if (should-use-dialog-box-p)
+ (yes-or-no-p-dialog-box prompt)
+ (y-or-n-p-minibuf prompt)))
+
\f
(defun read-char ()
start end filename append visit lockname
coding-system)))
-;;; The following was all that remained in mule-files.el, so I moved it
-;;; here for neatness. -sb
-(when (featurep 'mule)
- (setq-default buffer-file-coding-system 'iso-2022-8))
-
;;; code-files.el ends here
(Transmission Control Protocol) and 'udp (User Datagram Protocol) are
supported. When omitted, 'tcp is assumed.
-Ouput via `process-send-string' and input via buffer or filter (see
+Output via `process-send-string' and input via buffer or filter (see
`set-process-filter') are stream-oriented. That means UDP datagrams are
not guaranteed to be sent and received in discrete packets. (But small
datagrams around 500 bytes that are not truncated by `process-send-string'
;;; Commentary:
;; This file generates the custom-load files, loaded by cus-load.el.
-;; The only entry point is `Custom-make-dependencies'.
+;; Entry points are `Custom-make-dependencies' and
+;; `Custom-make-one-dependency'.
;; It works by scanning all the `.el' files in a directory, and
;; evaluates any `defcustom', `defgroup', or `defface' expression that
;; understand, but is in fact very easy to break. Be sure to read and
;; understand the commentary above!
-;;;###autoload
-(defun Custom-make-dependencies (&optional subdirs)
- "Extract custom dependencies from .el files in SUBDIRS.
-SUBDIRS is a list of directories. If it is nil, the command-line
-arguments are used. If it is a string, only that directory is
-processed. This function is especially useful in batch mode.
-
-Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS"
- (interactive "DDirectory: ")
- (and (stringp subdirs)
- (setq subdirs (list subdirs)))
- (or subdirs
- ;; Usurp the command-line-args
- (setq subdirs command-line-args-left
- command-line-args-left nil))
+(defun Custom-make-dependencies-1 (subdirs)
(setq subdirs (mapcar #'expand-file-name subdirs))
(with-temp-buffer
(let ((enable-local-eval nil)
(insert "\n;;; custom-load.el ends here\n"))
(clrhash hash)))))))))
+(defun Custom-make-one-dependency ()
+ "Extract custom dependencies from .el files in one dir, on the command line.
+Like `Custom-make-dependencies' but snarfs only one command-line argument,
+making it useful in a chain of batch commands in a single XEmacs invocation."
+ (let ((subdir (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (Custom-make-dependencies-1 (list subdir))))
+
+;;;###autoload
+(defun Custom-make-dependencies (&optional subdirs)
+ "Extract custom dependencies from .el files in SUBDIRS.
+SUBDIRS is a list of directories. If it is nil, the command-line
+arguments are used. If it is a string, only that directory is
+processed. This function is especially useful in batch mode.
+
+Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS"
+ (interactive "DDirectory: ")
+ (and (stringp subdirs)
+ (setq subdirs (list subdirs)))
+ (or subdirs
+ ;; Usurp the command-line-args
+ (setq subdirs command-line-args-left
+ command-line-args-left nil))
+ (Custom-make-dependencies-1 subdirs))
+
(provide 'cus-dep)
;;; cus-dep.el ends here
(defun custom-save-resets (property setter special)
(let (started-writing ignored-special)
+ (setq ignored-special ignored-special) ;; suppress byte-compiler warning
;; (custom-save-delete setter) Done by caller
(let ((standard-output (current-buffer))
(mapper `(lambda (object)
(setq ignored-special special)
(mapatoms mapper)
(when started-writing
- (princ ")\n")))))
+ (princ ")\n"))))
+ )
(defun custom-save-loaded-themes ()
(defun custom-theme-reset-faces (theme &rest args)
(custom-check-theme theme)
"Reset the value of the face to values previously defined.
-Assosiate this setting with THEME.
+Associate this setting with THEME.
ARGS is a list of lists of the form
;;;###autoload
(defun custom-reset-faces (&rest args)
"Reset the value of the face to values previously defined.
-Assosiate this setting with the 'user' theme.
+Associate this setting with the 'user' theme.
ARGS is defined as for `custom-theme-reset-faces'"
(apply #'custom-theme-reset-faces 'user args))
(defun make-custom-file-name (init-file &optional force-new)
"Construct the default custom file name from the init file name.
If FORCE-NEW is non-nil, force post-migration location."
- (let* ((init-file (or init-file user-init-file))
- (init-file-directory (file-name-directory init-file)))
+ (let ((init-file (or init-file user-init-file)))
(if (or force-new
- (string= init-file-directory
+ (not init-file)
+ (string= (file-name-directory init-file)
(expand-file-name
(file-name-as-directory user-init-directory))))
(expand-file-name custom-file-base user-init-directory)
(custom-add-loads 'menu '("menubar-items"))
(custom-add-loads 'minibuffer '("simple" "minibuf"))
(custom-add-loads 'log-message '("simple"))
-(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound"))
+(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter" "toolbar-items" "x-init" "cus-edit" "gnuserv" "sound"))
(custom-add-loads 'sound '("sound"))
(custom-add-loads 'pui '("package-ui"))
(custom-add-loads 'terminals '("gnuserv"))
(custom-add-loads 'auto-save '("files" "auto-save"))
-(custom-add-loads 'mail '("simple"))
+(custom-add-loads 'mail '("simple" "startup"))
(custom-add-loads 'custom-menu '("cus-edit"))
(custom-add-loads 'docs '("hyper-apropos" "info"))
(custom-add-loads 'tools '("etags" "hyper-apropos"))
(custom-add-loads 'languages '("lisp-mode" "cus-edit" "font-lock"))
(custom-add-loads 'fill '("simple" "fill"))
(custom-add-loads 'custom-magic-faces '("cus-edit"))
-(custom-add-loads 'display '("toolbar" "scrollbar" "auto-show"))
+(custom-add-loads 'display '("modeline" "toolbar" "scrollbar" "auto-show"))
(custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit"))
(custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get"))
(custom-add-loads 'processes '("process" "gnuserv"))
the current value for that symbol. The default is
`default-value'.
:require VALUE should be a feature symbol. Each feature will be
- required after initialization, of the the user have saved this
+ required after initialization, of the user have saved this
option.
Read the section about customization in the Emacs Lisp manual for more
"(deftheme THEME &optional DOC &key KEYWORDS)
Define a theme labeled by SYMBOL THEME. The optional argument DOC is a
-doc string describing the the theme. It is optionally followed by the
+doc string describing the theme. It is optionally followed by the
following keyboard arguments
:short-description DESC
(defun custom-theme-load-themes (by-theme &rest body)
"Load the themes specified by BODY and record them as required by
-theme BY-THEME. BODY is a secuence of
+theme BY-THEME. BODY is a sequence of
- a SYMBOL
require the theme SYMBOL
- a list (reset THEME)
(defsubst copy-upto-last (elt list)
- "Copy all the elements of the list upto the last occurence of elt"
+ "Copy all the elements of the list upto the last occurrence of elt"
;; Is it faster to do more work in C than to do less in elisp?
(nreverse (cdr (member elt (reverse list)))))
(defun custom-theme-reset-variables (theme &rest args)
"Reset the value of the variables to values previously defined.
-Assosiate this setting with THEME.
+Associate this setting with THEME.
ARGS is a list of lists of the form
(defun custom-reset-variables (&rest args)
"Reset the value of the variables to values previously defined.
-Assosiate this setting with the `user' theme.
+Associate this setting with the `user' theme.
The ARGS are as in `custom-theme-reset-variables'."
(apply #'custom-theme-reset-variables 'user args))
;;; dialog.el --- Dialog-box support for XEmacs
;; Copyright (C) 1991-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, internal, dumped
Return t if the answer is \"yes\".
Takes one argument, which is the string to display to ask the question."
(save-selected-frame
- (popup-dialog-box
- (list prompt ["Yes" yes t] ["No" no t] nil ["Cancel" cancel t]))
- (let (event)
- (catch 'ynp-done
- (while t
- (setq event (next-command-event event))
- (when (misc-user-event-p event)
- (message "%s" (event-object event))
- (case (event-object event)
- ((yes) (throw 'ynp-done t))
- ((no) (throw 'ynp-done nil))
- ((cancel menu-no-selection-hook) (signal 'quit nil))))
- (unless (button-release-event-p event) ; don't beep twice
- (beep)
- (message "please answer the dialog box")))))))
-
-(defun yes-or-no-p-maybe-dialog-box (prompt)
- "Ask user a yes-or-no question. Return t if answer is yes.
-The question is asked with a dialog box or the minibuffer, as appropriate.
-Takes one argument, which is the string to display to ask the question.
-It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it.
-The user must confirm the answer with RET,
-and can edit it until it as been confirmed."
- (if (should-use-dialog-box-p)
- (yes-or-no-p-dialog-box prompt)
- (yes-or-no-p-minibuf prompt)))
-
-(defun y-or-n-p-maybe-dialog-box (prompt)
- "Ask user a \"y or n\" question. Return t if answer is \"y\".
-Takes one argument, which is the string to display to ask the question.
-The question is asked with a dialog box or the minibuffer, as appropriate.
-It should end in a space; `y-or-n-p' adds `(y or n) ' to it.
-No confirmation of the answer is requested; a single character is enough.
-Also accepts Space to mean yes, or Delete to mean no."
- (if (should-use-dialog-box-p)
- (yes-or-no-p-dialog-box prompt)
- (y-or-n-p-minibuf prompt)))
-
-(when (fboundp 'popup-dialog-box)
- (fset 'yes-or-no-p 'yes-or-no-p-maybe-dialog-box)
- (fset 'y-or-n-p 'y-or-n-p-maybe-dialog-box))
+ (make-dialog-box 'question
+ :question prompt
+ :modal t
+ :buttons '(["Yes" (dialog-box-finish t)]
+ ["No" (dialog-box-finish nil)]
+ nil
+ ["Cancel" (dialog-box-cancel)]))))
-;; this is call-compatible with the horribly-named FSF Emacs function
-;; `x-popup-dialog'. I refuse to use that name.
+;; FSF has a similar function `x-popup-dialog'.
(defun get-dialog-box-response (position contents)
- ;; by Stig@hackvan.com
- ;; modified by pez@atlantic2.sbi.com
"Pop up a dialog box and return user's selection.
POSITION specifies which frame to use.
This is normally an event or a window or frame.
(select-frame position))
((windowp position)
(select-window position)))
- (let ((dbox (cons (car contents)
- (mapcar #'(lambda (x)
- (cond
- ((null x)
- nil)
- ((stringp x)
- `[,x 'ignore nil]) ;this will never get
- ;selected
- (t
- `[,(car x) (throw 'result ',(cdr x)) t])))
- (cdr contents))
- )))
- (catch 'result
- (popup-dialog-box dbox)
- (dispatch-event (next-command-event)))))
+ (make-dialog-box 'question
+ :question (car contents)
+ :modal t
+ :buttons
+ (mapcar #'(lambda (x)
+ (cond
+ ((null x)
+ nil)
+ ((stringp x)
+ ;;this will never get selected
+ `[,x 'ignore nil])
+ (t
+ `[,(car x) (dialog-box-finish ',(cdr x)) t])))
+ (cdr contents))))
(defun message-box (fmt &rest args)
"Display a message, in a dialog box if possible.
str)))
(defun message-or-box (fmt &rest args)
- "Display a message in a dialog box or in the echo area.\n\
-If this command was invoked with the mouse, use a dialog box.\n\
+ "Display a message in a dialog box or in the echo area.
+If this command was invoked with the mouse, use a dialog box.
Otherwise, use the echo area.
The arguments are the same as to `format'.
(apply 'message-box fmt args)
(apply 'message fmt args)))
-(defun make-dialog-box (&optional spec props parent)
- "Create a frame suitable for use as a general dialog box.
-The frame is made a child of PARENT (defaults to the selected frame),
-and has additional properties PROPS, as well as `dialog-frame-plist'.
-SPEC is a string or glyph to be placed in the gutter. If INVISIBLE is
-non-nil then the frame is initially unmapped.
-Normally the created frame has no modelines, menubars, scrollbars,
-minibuffer or toolbars and is entirely covered by its gutter."
- (or parent (setq parent (selected-frame)))
- (let* ((ftop (frame-property parent 'top))
- (fleft (frame-property parent 'left))
- (fwidth (frame-pixel-width parent))
- (fheight (frame-pixel-height parent))
- (fonth (font-height (face-font 'default)))
- (fontw (font-width (face-font 'default)))
- (props (append props dialog-frame-plist))
- (dfheight (plist-get props 'height))
- (dfwidth (plist-get props 'width))
- (unmapped (plist-get props 'initially-unmapped))
- (gutter-spec spec)
- (name (or (plist-get props 'name) "XEmacs"))
- (frame nil))
- (plist-remprop props 'initially-unmapped)
- ;; allow the user to just provide a glyph
- (when (glyphp spec)
- (setq gutter-spec (copy-sequence "\n"))
- (set-extent-begin-glyph (make-extent 0 1 gutter-spec) spec))
- ;; under FVWM at least, if I don't specify the initial position,
- ;; it ends up always at (0, 0). xwininfo doesn't tell me
- ;; that there are any program-specified position hints, so
- ;; it must be an FVWM bug. So just be smashing and position
- ;; in the center of the selected frame.
- (setq frame (make-frame
- (append props
- `(popup ,parent initially-unmapped t
- menubar-visible-p nil
- has-modeline-p nil
- default-toolbar-visible-p nil
- top-gutter-visible-p t
- top-gutter-height ,(* dfheight fonth)
- top-gutter ,gutter-spec
- minibuffer none
- name ,name
- modeline-shadow-thickness 0
- vertical-scrollbar-visible-p nil
- horizontal-scrollbar-visible-p nil
- unsplittable t
- left ,(+ fleft (- (/ fwidth 2)
- (/ (* dfwidth fontw)
- 2)))
- top ,(+ ftop (- (/ fheight 2)
- (/ (* dfheight fonth)
- 2)))))))
- (set-face-foreground 'modeline [default foreground] frame)
- (set-face-background 'modeline [default background] frame)
- (unless unmapped (make-frame-visible frame))
- frame))
+(defun make-dialog-box (type &rest cl-keys)
+ "Pop up a dialog box.
+TYPE is a symbol, the type of dialog box. Remaining arguments are
+keyword-value pairs, specifying the particular characteristics of the
+dialog box. The allowed keywords are particular to each type, but
+some standard keywords are common to many types:
+
+:title
+ The title of the dialog box's window.
+
+:modal
+ If true, indicates that XEmacs will wait until the user is \"done\"
+ with the dialog box (usually, this means that a response has been
+ given). Typically, the response is returned. NOTE: Some dialog
+ boxes are always modal. If the dialog box is modal, `make-dialog-box'
+ returns immediately. The return value will be either nil or a
+ dialog box handle of some sort, e.g. a frame for type `general'.
+
+---------------------------------------------------------------------------
+
+Recognized types are
+
+general
+ A dialog box consisting of an XEmacs glyph, typically a `layout'
+ widget specifying a dialog box arrangement. This is the most
+ general and powerful dialog box type, but requires more work than
+ the other types below.
+
+question
+ A simple dialog box that displays a question and contains one or
+ more user-defined buttons to specify possible responses. (This is
+ compatible with the old built-in dialog boxes formerly specified
+ using `popup-dialog-box'.)
+
+file
+ A file dialog box, of the type typically used in the window system
+ XEmacs is running on.
+
+color
+ A color picker.
+
+find
+ A find dialog box.
+
+font
+ A font chooser.
+
+print
+ A dialog box used when printing (e.g. number of pages, printer).
+
+page-setup
+ A dialog box for setting page options (e.g. margins) for printing.
+
+replace
+ A find/replace dialog box.
+
+mswindows-message
+ An MS Windows-specific standard dialog box type similar to `question'.
+
+---------------------------------------------------------------------------
+
+For type `general':
+
+This type creates a frame and puts the specified widget layout in it.
+\(Currently this is done by eliminating all areas but the gutter and placing
+the layout there; but this is an implementation detail and may change.)
+
+The keywords allowed for `general' are
+
+:spec
+ The widget spec -- anything that can be passed to `make-glyph'.
+
+:title
+ The title of the frame.
+:parent
+ The frame is made a child of this frame (defaults to the selected frame).
+
+:properties
+ Additional properties of the frame, as well as `dialog-frame-plist'.
+
+---------------------------------------------------------------------------
+
+For type `question':
+
+The keywords allowed are
+
+:modal
+ t or nil. When t, the dialog box callback should exit the dialog box
+ using the functions `dialog-box-finish' or `dialog-box-cancel'.
+:title
+ The title of the frame.
+:question
+ A string, the question.
+:buttons
+ A list, describing the buttons below the question. Each of these is a
+ vector, the syntax of which is essentially the same as that of popup menu
+ items. They may have any of the following forms:
+
+ [ \"name\" callback <active-p> ]
+ [ \"name\" callback <active-p> \"suffix\" ]
+ [ \"name\" callback :<keyword> <value> :<keyword> <value> ... ]
+
+ The name is the string to display on the button; it is filtered through the
+ resource database, so it is possible for resources to override what string
+ is actually displayed.
+
+ Accelerators can be indicated in the string by putting the sequence
+ \"%_\" before the character corresponding to the key that will invoke
+ the button. Uppercase and lowercase accelerators are equivalent. The
+ sequence \"%%\" is also special, and is translated into a single %.
+
+ If the `callback' of a button is a symbol, then it must name a command.
+ It will be invoked with `call-interactively'. If it is a list, then it is
+ evaluated with `eval'.
+
+ One (and only one) of the buttons may be `nil'. This marker means that all
+ following buttons should be flushright instead of flushleft.
+
+ Though the keyword/value syntax is supported for dialog boxes just as in
+ popup menus, the only keyword which is both meaningful and fully implemented
+ for dialog box buttons is `:active'.
+
+---------------------------------------------------------------------------
+
+For type `file':
+
+The keywords allowed are
+
+:initial-filename
+ The initial filename to be placed in the dialog box (defaults to nothing).
+:initial-directory
+ The initial directory to be selected in the dialog box (defaults to the
+ current buffer's `default-directory).
+:filter-list
+ A list of (filter-desc filter ...)
+:title
+ The title of the dialog box (defaults to \"Open\").
+:allow-multi-select t or nil
+:create-prompt-on-nonexistent t or nil
+:overwrite-prompt t or nil
+:file-must-exist t or nil
+:no-network-button t or nil
+:no-read-only-return t or nil
+
+---------------------------------------------------------------------------
+
+For type `print':
+
+This invokes the Windows standard Print dialog.
+This dialog is usually invoked when the user selects the Print command.
+After the user presses OK, the program should start actual printout.
+
+The keywords allowed are
+
+:device
+ An 'msprinter device.
+:print-settings
+ A printer settings object.
+
+Exactly one of these keywords must be given.
+
+The function brings up the Print dialog, where the user can
+select a different printer and/or change printer options. Connection
+name can change as a result of selecting a different printer device. If
+a printer is specified, then changes are stored into the settings object
+currently selected into that printer. If a settings object is supplied,
+then changes are recorded into it, and, it it is selected into a
+printer, then changes are propagated to that printer
+too.
+
+Return value is nil if the user has canceled the dialog. Otherwise, it
+is a new plist, with the following properties:
+ name Printer device name, even if unchanged by the user.
+ from-page First page to print, 1-based. If not specified by the user,
+ then this value is not included in the plist.
+ to-page Last page to print, inclusive, 1-based. If not specified by
+ the user, then this value is not included in the plist.
+ copies Number of copies to print. Always returned.
+
+The DEVICE is destroyed and an error is signaled in case of
+initialization problem with the new printer.
+
+See also the `page-setup' and `print-setup' dialog boxes.
+
+---------------------------------------------------------------------------
+
+For type `page-setup':
+
+This invokes the Windows standard Page Setup dialog.
+This dialog is usually invoked in response to the Page Setup command, and
+used to chose such parameters as page orientation, print margins etc.
+Note that this dialog contains the \"Printer\" button, which invokes
+the Printer Setup dialog (see `msprinter-print-setup-dialog') so that the
+user can update the printer options or even select a different printer
+as well.
+
+The keywords allowed are
+
+:device
+ An 'msprinter device.
+:print-settings
+ A printer settings object.
+:properties
+ A plist of job properties.
+
+Exactly one of these keywords must be given.
+
+The function brings up the Page Setup dialog, where the user
+can select a different printer and/or change printer options.
+Connection name can change as a result of selecting a different printer
+device. If a printer is specified, then changes are stored into the
+settings object currently selected into that printer. If a settings
+object is supplied, then changes are recorded into it, and, it it is
+selected into a printer, then changes are propagated to that printer
+too.
+
+:properties specifies a plist of job properties;
+see `default-msprinter-frame-plist' for the complete list. The plist
+is used to initialize the dialog.
+
+Return value is nil if the user has canceled the dialog. Otherwise,
+it is a new plist, containing the new list of properties.
+
+The DEVICE is destroyed and an error is signaled in case of
+initialization problem with the new printer.
+
+See also the `print' and `print-setup' dialogs.
+
+---------------------------------------------------------------------------
+
+For type `print-setup':
+
+This invokes the Windows standard Print Setup dialog.
+This dialog is usually invoked when the user selects the Printer Setup
+command.
+
+The keywords allowed are
+
+:device
+ An 'msprinter device.
+:print-settings
+ A printer settings object.
+
+Exactly one of these keywords must be given.
+
+The function brings up the Print Setup dialog, where the user
+can select a different printer and/or change printer options.
+Connection name can change as a result of selecting a different printer
+device. If a printer is specified, then changes are stored into the
+settings object currently selected into that printer. If a settings
+object is supplied, then changes are recorded into it, and, it it is
+selected into a printer, then changes are propagated to that printer
+too.
+
+Return value is nil if the user has canceled the dialog. Otherwise, it
+is a new plist, with the following properties:
+ name Printer device name, even if unchanged by the user.
+
+The printer device is destroyed and an error is signaled if new printer
+is selected by the user, but cannot be initialized.
+
+See also the `print' and `page-setup' dialogs.
+
+---------------------------------------------------------------------------
+
+For type `mswindows-message':
+
+The keywords allowed are
+
+:title
+ The title of the dialog box.
+:message
+ The string to display.
+:flags
+ A symbol or list of symbols:
+
+ -- 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."
+ (flet ((dialog-box-modal-loop (thunk)
+ (let* ((frames (frame-list))
+ (result
+ ;; ok, this is extremely tricky. normally a modal
+ ;; dialog will pop itself down using (dialog-box-finish)
+ ;; or (dialog-box-cancel), which throws back to this
+ ;; catch. but question dialog boxes pop down themselves
+ ;; regardless, so a badly written question dialog box
+ ;; that does not use (dialog-box-finish) could seriously
+ ;; wedge us. furthermore, we disable all other frames
+ ;; in order to implement modality; we need to restore
+ ;; them before the dialog box is destroyed, because
+ ;; otherwise windows at least will notice that no top-
+ ;; level window can have the focus and will shift the
+ ;; focus to a different app, raising it and obscuring us.
+ ;; so we create `delete-dialog-box-hook', which is
+ ;; called right *before* the dialog box gets destroyed.
+ ;; here, we put a hook on it, and when it's our dialog
+ ;; box and not someone else's that's being destroyed,
+ ;; we reenable all the frames and remove the hook.
+ ;; BUT ... we still have to deal with exiting the
+ ;; modal loop in case it doesn't happen before us.
+ ;; we can't do this until after the callbacks for this
+ ;; dialog box get executed, and that doesn't happen until
+ ;; after the dialog box is destroyed. so to keep things
+ ;; synchronous, we enqueue an eval event, which goes into
+ ;; the same queue as the misc-user events encapsulating
+ ;; the dialog callbacks and will go after it (because
+ ;; destroying the dialog box happens after processing
+ ;; its selection). if the dialog boxes are written
+ ;; properly, we don't see this eval event, because we've
+ ;; already exited our modal loop. (Thus, we make sure the
+ ;; function given in this eval event is actually defined
+ ;; and does nothing.) If we do see it, though, we know
+ ;; that we encountered a badly written dialog box and
+ ;; need to exit now. Currently we just return nil, but
+ ;; maybe we should signal an error or issue a warning.
+ (catch 'internal-dialog-box-finish
+ (let ((id (eval thunk))
+ (sym (gensym)))
+ (fset sym
+ `(lambda (did)
+ (when (eq ',id did)
+ (mapc 'enable-frame ',frames)
+ (enqueue-eval-event
+ 'internal-make-dialog-box-exit did)
+ (remove-hook 'delete-dialog-box-hook
+ ',sym))))
+ (add-hook 'delete-dialog-box-hook sym)
+ (mapc 'disable-frame frames)
+ (block nil
+ (while t
+ (let ((event (next-event)))
+ (if (and (eval-event-p event)
+ (eq (event-function event)
+ 'internal-make-dialog-box-exit)
+ (eq (event-object event) id))
+ (return '(nil))
+ (dispatch-event event)))))))))
+ (if (listp result)
+ (car result)
+ (signal 'quit nil)))))
+ (case type
+ (general
+ (cl-parsing-keywords
+ ((:title "XEmacs")
+ (:parent (selected-frame))
+ :modal
+ :properties
+ :spec)
+ ()
+ (flet ((create-dialog-box-frame ()
+ (let* ((ftop (frame-property cl-parent 'top))
+ (fleft (frame-property cl-parent 'left))
+ (fwidth (frame-pixel-width cl-parent))
+ (fheight (frame-pixel-height cl-parent))
+ (fonth (font-height (face-font 'default)))
+ (fontw (font-width (face-font 'default)))
+ (cl-properties (append cl-properties
+ dialog-frame-plist))
+ (dfheight (plist-get cl-properties 'height))
+ (dfwidth (plist-get cl-properties 'width))
+ (unmapped (plist-get cl-properties
+ 'initially-unmapped))
+ (gutter-spec cl-spec)
+ (name (or (plist-get cl-properties 'name) "XEmacs"))
+ (frame nil))
+ (plist-remprop cl-properties 'initially-unmapped)
+ ;; allow the user to just provide a glyph
+ (or (glyphp cl-spec) (setq cl-spec (make-glyph cl-spec)))
+ (setq gutter-spec (copy-sequence "\n"))
+ (set-extent-begin-glyph (make-extent 0 1 gutter-spec)
+ cl-spec)
+ ;; under FVWM at least, if I don't specify the
+ ;; initial position, it ends up always at (0, 0).
+ ;; xwininfo doesn't tell me that there are any
+ ;; program-specified position hints, so it must be
+ ;; an FVWM bug. So just be smashing and position in
+ ;; the center of the selected frame.
+ (setq frame
+ (make-frame
+ (append cl-properties
+ `(popup ,cl-parent initially-unmapped t
+ menubar-visible-p nil
+ has-modeline-p nil
+ default-toolbar-visible-p nil
+ top-gutter-visible-p t
+ top-gutter-height ,
+ (* dfheight fonth)
+ top-gutter ,gutter-spec
+ minibuffer none
+ name ,name
+ modeline-shadow-thickness 0
+ vertical-scrollbar-visible-p nil
+ horizontal-scrollbar-visible-p nil
+ unsplittable t
+ left ,(+ fleft (- (/ fwidth 2)
+ (/ (* dfwidth
+ fontw)
+ 2)))
+ top ,(+ ftop (- (/ fheight 2)
+ (/ (* dfheight
+ fonth)
+ 2)))))))
+ (set-face-foreground 'modeline [default foreground] frame)
+ (set-face-background 'modeline [default background] frame)
+ (unless unmapped (make-frame-visible frame))
+ (let ((newbuf (generate-new-buffer " *dialog box*")))
+ (set-buffer-dedicated-frame newbuf frame)
+ (set-frame-property frame 'dialog-box-buffer newbuf)
+ (with-current-buffer newbuf
+ (setq frame-title-format cl-title)
+ (make-local-hook 'delete-frame-hook)
+ (add-hook 'delete-frame-hook
+ #'(lambda (frame)
+ (kill-buffer
+ (frame-property
+ frame
+ 'dialog-box-buffer))))))
+ frame)))
+ (if cl-modal
+ (dialog-box-modal-loop '(create-dialog-box-frame))
+ (create-dialog-box-frame)))))
+ (question
+ (cl-parsing-keywords
+ ((:modal nil))
+ t
+ (remf cl-keys :modal)
+ (if cl-modal
+ (dialog-box-modal-loop `(make-dialog-box-internal ',type
+ ',cl-keys))
+ (make-dialog-box-internal type cl-keys))))
+ (t
+ (make-dialog-box-internal type cl-keys)))))
+
+(defun dialog-box-finish (result)
+ "Exit a modal dialog box, returning RESULT.
+This is meant to be executed from a dialog box callback function."
+ (throw 'internal-dialog-box-finish (list result)))
+
+(defun dialog-box-cancel ()
+ "Cancel a modal dialog box.
+This is meant to be executed from a dialog box callback function."
+ (throw 'internal-dialog-box-finish 'cancel))
+
+;; an eval event, used as a trigger inside of the dialog modal loop.
+(defun internal-make-dialog-box-exit (did)
+ nil)
+
+(make-obsolete 'popup-dialog-box 'make-dialog-box)
+(defun popup-dialog-box (desc)
+ "Obsolete equivalent of (make-dialog-box 'question ...).
+
+\(popup-dialog-box (QUESTION BUTTONS ...)
+
+is equivalent to
+\(make-dialog-box 'question :question QUESTION :buttons BUTTONS)"
+ (check-argument-type 'stringp (car desc))
+ (or (consp (cdr desc))
+ (error 'syntax-error
+ "Dialog descriptor must supply at least one button"
+ desc))
+ (make-dialog-box 'question :question (car desc) :buttons (cdr desc)))
;;; dialog.el ends here
;; Copyright (C) 1998 Oliver Graf <ograf@fga.de>
;; Maintainer: XEmacs Development Team, Oliver Graf <ograf@fga.de>
-;; Keywords: drag, drop, dumped
+;; Keywords: mouse, gui, dumped
;; This file is part of XEmacs.
;; to-do: open ftp URLs with efs...
(t
;; some other URL, try to fire up some browser for it
- (if (boundp 'browse-url-browser-function)
- (funcall browse-url-browser-function (car data))
+ (if (fboundp 'browse-url)
+ (browse-url (car data))
(display-message 'error
"Can't show URL, no browser selected"))))
(undo-boundary)
"fill"
"auto-save" ; Added for 20.4
"movemail" ; Added for 21.2
- (when-feature windows-nt "winnt")
+ (when-feature windows-nt "win32-native")
(when-feature lisp-float-type "float-sup")
"itimer" ; for vars auto-save-timeout and
; auto-gc-threshold
"itimer-autosave"
"printer"
+
+ ;;;;;;;;;;;;;;;;;; GUI support
+ (when-feature window-system "gui")
+ (when-feature window-system "mouse")
+ (when-feature window-system "mode-motion")
(when-feature toolbar "toolbar")
(when-feature scrollbar "scrollbar")
(when-feature menubar "menubar")
(when-feature dialog "dialog")
- (when-feature mule "mule-charset")
+ (when-feature gutter "gutter")
+ (when-feature dragdrop-api "dragdrop")
+ "select"
+
+ ;;;;;;;;;;;;;;;;;; Content for GUI's
+ ;; There used to be window-system inserted in the when-feature,
+ ;; but IMHO your configure script should turn off the menubar,
+ ;; toolbar, etc. features when there is no window system. We
+ ;; should just be able to assume that, if (featurep 'menubar),
+ ;; the menubar should work and if items are added, they can be
+ ;; seen clearly and usefully.
+ (when-feature (and (not infodock) menubar) "menubar-items")
+ (when-feature (and gutter) "gutter-items")
+ (when-feature (and (not infodock) toolbar) "toolbar-items")
+ (when-feature (and (not infodock) dialog) "dialog-items")
+
+ ;;;;;;;;;;;;;;;;;; Coding-system support
(when-feature file-coding "coding")
- (when-feature mule "mule-coding")
-;; Handle I/O of files with extended characters.
(when-feature file-coding "code-files")
-;; Handle process with encoding/decoding non-ascii coding-system.
(when-feature file-coding "code-process")
+
+ ;;;;;;;;;;;;;;;;;; MULE support
+ (when-feature mule "mule-charset")
+ (when-feature mule "mule-coding")
+ ;; All files after this can have extended characters in them.
(when-feature mule "mule-help")
-;; Load the remaining basic files.
(when-feature mule "mule-category")
(when-feature mule "mule-ccl")
(when-feature mule "mule-misc")
;; Moved to sunpro-load.el - the default only for Sun.
;;(pureload "mime-setup")
;;; mule-load.el ends here
- (when-feature (and gutter window-system) "gutter")
- (when-feature window-system "gui")
- (when-feature window-system "mode-motion")
- (when-feature window-system "mouse")
- "select"
- (when-feature dragdrop-api "dragdrop")
-;; preload the X code, for faster startup.
- (when-feature (and (not infodock)
- (or x mswindows) menubar) "menubar-items")
+
+;; preload InfoDock stuff. should almost certainly not be here if
+;; id-menus is not here. infodock needs to figure out a clever way to
+;; advise this stuff or we need to export a clean way for infodock or
+;; others to control this programmatically.
(when-feature (and infodock (or x mswindows) menubar) "id-menus")
- (when-feature (and gutter window-system) "gutter-items")
+;; preload the X code.
(when-feature x "x-faces")
(when-feature x "x-iso8859-1")
(when-feature x "x-mouse")
(when-feature (and x scrollbar) "x-scrollbar")
(when-feature x "x-misc")
(when-feature x "x-init")
- (when-feature (and (not infodock)
- window-system toolbar) "toolbar-items")
(when-feature x "x-win-xfree86")
(when-feature x "x-win-sun")
;; preload the mswindows code.
;; 02111-1307, USA.
;;; Synched up with: Not synched with FSF but coordinated with the FSF
-;;; easymenu maintor for compatibility with FSF 20.4.
+;;; easymenu maintainer for compatibility with FSF 20.4.
;;; Please: Coordinate changes with Inge Frick <inge@nada.kth.se>
;; Commentary:
;; Easymenu allows you to define menus for both Emacs 19 and XEmacs.
-;; This file
+;; This file
;; The advantages of using easymenu are:
;; - Easier to use than either the Emacs 19 and XEmacs menu syntax.
-;; - Common interface for Emacs 18, Emacs 19, and XEmacs.
+;; - Common interface for Emacs 18, Emacs 19, and XEmacs.
;; (The code does nothing when run under Emacs 18).
;; The public functions are:
;; - Function: easy-menu-define SYMBOL MAPS DOC MENU
;; SYMBOL is both the name of the variable that holds the menu and
-;; the name of a function that will present a the menu.
+;; the name of a function that will present the menu.
;; MAPS is a list of keymaps where the menu should appear in the menubar.
;; DOC is the documentation string for the variable.
-;; MENU is an XEmacs style menu description.
+;; MENU is an XEmacs style menu description.
;; See the documentation for easy-menu-define for details.
;; - Function: easy-menu-change PATH NAME ITEMS
;; Change an existing menu.
;; The menu must already exist and be visible on the menu bar.
-;; PATH is a list of strings used for locating the menu on the menu bar.
-;; NAME is the name of the menu.
+;; PATH is a list of strings used for locating the menu on the menu bar.
+;; NAME is the name of the menu.
;; ITEMS is a list of menu items, as defined in `easy-menu-define'.
;; - Function: easy-menu-add MENU [ MAP ]
ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil.
-Alternatively, a menu item may have the form:
+Alternatively, a menu item may have the form:
[ NAME CALLBACK [ KEYWORD ARG ] ... ]
NAME is a string; the name of an argument to CALLBACK.
:style STYLE
-
+
STYLE is a symbol describing the type of menu item. The following are
-defined:
+defined:
-toggle: A checkbox.
+toggle: A checkbox.
Currently just prepend the name with the string \"Toggle \".
-radio: A radio button.
+radio: A radio button.
nil: An ordinary menu item.
:selected SELECTED
(easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu)))
(defun easy-menu-do-define (symbol maps doc menu)
- (if (featurep 'menubar)
- (progn
- (set symbol menu)
- (fset symbol (list 'lambda '(e)
- doc
- '(interactive "@e")
- '(run-hooks 'activate-menubar-hook)
- '(setq zmacs-region-stays 't)
- (list 'popup-menu symbol))))))
+ (when (featurep 'menubar)
+ (set symbol menu)
+ (fset symbol `(lambda (e)
+ ,doc
+ (interactive "@e")
+ (run-hooks 'activate-menubar-hook)
+ (setq zmacs-region-stays 't)
+ (popup-menu ,symbol)))))
(defun easy-menu-change (&rest args)
(when (featurep 'menubar)
(defun easy-menu-add (menu &optional map)
"Add MENU to the current menu bar."
- (if (featurep 'menubar)
- (progn
- (unless (member menu easy-menu-all-popups)
- (push menu easy-menu-all-popups))
- (setq mode-popup-menu (if (> (length easy-menu-all-popups) 1)
- (cons (easy-menu-title)
- (reverse easy-menu-all-popups))
- (car easy-menu-all-popups)))
-
- (cond ((null current-menubar)
- ;; Don't add it to a non-existing menubar.
- nil)
- ((assoc (car menu) current-menubar)
- ;; Already present.
- nil)
- ((equal current-menubar '(nil))
- ;; Set at left if only contains right marker.
- (set-buffer-menubar (list menu nil)))
- (t
- ;; Add at right.
- (set-buffer-menubar (copy-sequence current-menubar))
- (add-menu nil (car menu) (cdr menu)))))))
+ (when (featurep 'menubar)
+ (unless (member menu easy-menu-all-popups)
+ (push menu easy-menu-all-popups))
+ (setq mode-popup-menu (if (> (length easy-menu-all-popups) 1)
+ (cons (easy-menu-title)
+ (reverse easy-menu-all-popups))
+ (let ((same-as-menu
+ (car easy-menu-all-popups)))
+ (cons (normalize-menu-item-name
+ (car same-as-menu))
+ (cdr same-as-menu)))))
+
+ (cond ((null current-menubar)
+ ;; Don't add it to a non-existing menubar.
+ nil)
+ ((assoc (car menu) current-menubar)
+ ;; Already present.
+ nil)
+ ((equal current-menubar '(nil))
+ ;; Set at left if only contains right marker.
+ (set-buffer-menubar (list menu nil)))
+ (t
+ ;; Add at right.
+ (set-buffer-menubar (copy-sequence current-menubar))
+ (add-menu nil (car menu) (cdr menu))))))
(defun easy-menu-remove (menu)
"Remove MENU from the current menu bar."
- (if (featurep 'menubar)
- (progn
- (setq easy-menu-all-popups (delq menu easy-menu-all-popups)
- mode-popup-menu (if (< (length easy-menu-all-popups) 1)
- (cons (easy-menu-title)
- (reverse easy-menu-all-popups))
- (car easy-menu-all-popups)))
-
- (and current-menubar
- (assoc (car menu) current-menubar)
- (delete-menu-item (list (car menu)))))))
+ (when (featurep 'menubar)
+ (setq easy-menu-all-popups (delq menu easy-menu-all-popups)
+ mode-popup-menu (if (< (length easy-menu-all-popups) 1)
+ (cons (easy-menu-title)
+ (reverse easy-menu-all-popups))
+ (let ((same-as-menu
+ (car easy-menu-all-popups)))
+ (cons (normalize-menu-item-name
+ (car same-as-menu))
+ (cdr same-as-menu)))))
+
+ (and current-menubar
+ (assoc (car menu) current-menubar)
+ (delete-menu-item (list (car menu))))))
(defsubst easy-menu-normalize (menu)
(if (symbolp menu)
menu))
(defun easy-menu-add-item (menu path item &optional before)
- "At the end of the submenu of MENU with path PATH add ITEM.
+ "At the end of the submenu of MENU with path PATH, add ITEM.
If ITEM is already present in this submenu, then this item will be changed.
otherwise ITEM will be added at the end of the submenu, unless the optional
argument BEFORE is present, in which case ITEM will instead be added
before the item named BEFORE.
MENU is either a symbol, which have earlier been used as the first
argument in a call to `easy-menu-define', or the value of such a symbol
-i.e. a menu, or nil which stands for the current menubar.
+i.e. a menu, or nil, which stands for the current menubar.
PATH is a list of strings for locating the submenu where ITEM is to be
added. If PATH is nil, MENU itself is used. Otherwise, the first
element should be the name of a submenu directly under MENU. This
ITEM is either defined as in `easy-menu-define', a menu defined earlier
by `easy-menu-define' or `easy-menu-create-menu' or an item returned
from `easy-menu-item-present-p' or `easy-menu-remove-item'."
- (add-menu-button path item before (easy-menu-normalize menu)))
+ (when (featurep 'menubar)
+ (add-menu-button path item before (easy-menu-normalize menu))))
(defun easy-menu-item-present-p (menu path name)
"In submenu of MENU with path PATH, return true iff item NAME is present.
MENU and PATH are defined as in `easy-menu-add-item'.
NAME should be a string, the name of the element to be looked for.
-The return value can be used as as an argument to `easy-menu-add-item'."
- (car (find-menu-item (or (easy-menu-normalize menu) current-menubar)
- (append path (list name)))))
+The return value can be used as an argument to `easy-menu-add-item'."
+ (if (featurep 'menubar)
+ (car (find-menu-item (or (easy-menu-normalize menu) current-menubar)
+ (append path (list name))))
+ nil))
(defun easy-menu-remove-item (menu path name)
- "From submenu of MENU with path PATH remove item NAME.
+ "From submenu of MENU with path PATH, remove item NAME.
MENU and PATH are defined as in `easy-menu-add-item'.
NAME should be a string, the name of the element to be removed.
-The return value can be used as as an argument to `easy-menu-add-item'."
- (delete-menu-item (append path (list name))
- (easy-menu-normalize menu)))
-
+The return value can be used as an argument to `easy-menu-add-item'."
+ (when (featurep 'menubar)
+ (delete-menu-item (append path (list name))
+ (easy-menu-normalize menu))))
+
;;; extents.el --- miscellaneous extent functions not written in C
;; Copyright (C) 1993-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 2000 Ben Wing.
;; Keywords: internal, dumped
;;; Commentary:
-;; some help from stig@hackvan.com here.
+;;; Authorship:
+
+;; Created 1995 Ben Wing.
+;; mapcar-extents (and extent-list?) from stig@hackvan.com, c. 1996.
;;; Code:
buffer-or-string from to nil flags property value)
(nreverse *result*)))
-(defun extent-list (&optional buffer-or-string from to flags)
+(defun extent-list (&optional buffer-or-string from to flags property value)
"Return a list of the extents in BUFFER-OR-STRING.
BUFFER-OR-STRING defaults to the current buffer if omitted.
FROM and TO can be used to limit the range over which extents are
end of BUFFER-OR-STRING, respectively.
FLAGS controls how end cases are treated. For a discussion of this,
-and exactly what ``overlap'' means, see `map-extents'.
+and exactly what ``overlap'' means, see `map-extents'. PROPERTY and VALUE
+are also as in `map-extents'.
If you want to map a function over the extents in a buffer or string,
-consider using `map-extents' or `mapcar-extents' instead."
- (mapcar-extents 'identity nil buffer-or-string from to flags))
+consider using `map-extents' or `mapcar-extents' instead.
+
+See also `extents-at'."
+ (mapcar-extents 'identity nil buffer-or-string from to flags property value))
+
+(defun extent-at-event (event &optional property before at-flag)
+ "Return the smallest extent under EVENT, if any.
+PROPERTY, BEFORE, and AT-FLAG are as in `extent-at'."
+ (let* ((win (event-window event))
+ (p (event-point event)))
+ (and win p (extent-at p (window-buffer win) property before at-flag))))
+
+(defun extents-at-event (event &optional property before at-flag)
+ "Return a list of all extents under EVENT.
+PROPERTY, BEFORE, and AT-FLAG are as in `extent-at'."
+ (let* ((win (event-window event))
+ (p (event-point event)))
+ (and win p (extents-at p (window-buffer win) property before at-flag))))
(defun extent-string (extent)
"Return the string delimited by the bounds of EXTENT."
The specifications in a specifier determine what the value of
PROPERTY will be in a particular \"domain\" or set of circumstances,
which is typically a particular Emacs window along with the buffer
- it contains and the frame and device it lies within. The value
- is derived from the instantiator associated with the most specific
+ it contains and the frame and device it lies within. The value is
+ derived from the instantiator associated with the most specific
locale (in the order buffer, window, frame, device, and 'global)
that matches the domain in question. In other words, given a domain
- (i.e. an Emacs window, usually), the specifier for PROPERTY will first
- be searched for a specification whose locale is the buffer contained
- within that window; then for a specification whose locale is the window
- itself; then for a specification whose locale is the frame that the
- window is contained within; etc. The first instantiator that is
- valid for the domain (usually this means that the instantiator is
- recognized by the device [i.e. the X server or TTY device] that the
- domain is on. The function `face-property-instance' actually does
- all this, and is used to determine how to display the face.
+ (i.e. an Emacs window, usually), the specifier for PROPERTY will
+ first be searched for a specification whose locale is the buffer
+ contained within that window; then for a specification whose locale
+ is the window itself; then for a specification whose locale is the
+ frame that the window is contained within; etc. The first
+ instantiator that is valid for the domain (usually this means that
+ the instantiator is recognized by the device [i.e. MS Windows, the X
+ server or TTY device] that the domain is on. The function
+ `face-property-instance' actually does all this, and is used to
+ determine how to display the face.
See `set-face-property' for the built-in property-names."
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.
+ Only used by faces on X and MS Windows devices.
For valid instantiators, see `make-image-specifier'.
underline Underline all text covered by this face.
;; WE DEMAND LEXICAL SCOPING!!!
;; WE DEMAND LEXICAL SCOPING!!!
;; WE DEMAND LEXICAL SCOPING!!!
-(defun frob-face-property (face property func &optional locale tags)
+(defun frob-face-property (face property func device-tags &optional
+locale tags)
"Change the specifier for FACE's PROPERTY according to FUNC, in LOCALE.
This function is ugly and messy and is primarily used as an internal
helper function for `make-face-bold' et al., so you probably don't
first valid instantiator is used), and that result substituted for
the specification; otherwise, the process just outlined is
iterated over each existing device and the concatenated results
-substituted for the specification."
+substituted for the specification.
+
+DEVICE-TAGS is a list of tags that each device must match in order for
+the function to be called on it."
(let ((sp (face-property face property))
temp-sp)
(if (valid-specifier-domain-p locale)
;; this is easy.
(let* ((inst (face-property-instance face property locale))
- (name (and inst (funcall func inst (dfw-device locale)))))
+ (name (and inst
+ (device-matches-specifier-tag-set-p
+ (dfw-device locale) device-tags)
+ (funcall func inst (dfw-device locale)))))
(when name
(add-spec-to-specifier sp name locale tags)))
;; otherwise, map over all specifications ...
;; Otherwise map frob-face-property-1 over each device.
(result
(if device
- (list (frob-face-property-1 sp-arg device inst-list func))
+ (list (and (device-matches-specifier-tag-set-p
+ device device-tags)
+ (frob-face-property-1 sp-arg device inst-list
+ func)))
(mapcar (lambda (device)
- (frob-face-property-1 sp-arg device
- inst-list func))
+ (and (device-matches-specifier-tag-set-p
+ device device-tags)
+ (frob-face-property-1 sp-arg device
+ inst-list func)))
(device-list))))
new-result)
;; remove duplicates and nils from the obtained list of
(setq arg (cons tags arg))
(setcar arg (append tags (delete 'default
(car arg))))))
- (when (and arg (not (member arg new-result)))
+ (when (and arg (not (member arg new-result)))
(setq new-result (cons arg new-result))))
result)
;; add back in.
(or result first-valid)))
(defun frob-face-font-2 (face locale tags unfrobbed-face frobbed-face
- tty-thunk x-thunk standard-face-mapping)
+ tty-thunk ws-thunk standard-face-mapping)
;; another kludge to make things more intuitive. If we're
;; inheriting from a standard face in this locale, frob the
- ;; inheritance as appropriate. Else, if, after the first X frobbing
- ;; pass, the face hasn't changed and still looks like the standard
- ;; unfrobbed face (e.g. 'default), make it inherit from the standard
- ;; frobbed face (e.g. 'bold). Regardless of things, do the TTY
- ;; frobbing.
+ ;; inheritance as appropriate. Else, if, after the first
+ ;; window-system frobbing pass, the face hasn't changed and still
+ ;; looks like the standard unfrobbed face (e.g. 'default), make it
+ ;; inherit from the standard frobbed face (e.g. 'bold). Regardless
+ ;; of things, do the TTY frobbing.
;; yuck -- The LOCALE argument to make-face-bold is not actually a locale,
;; but is a "locale, locale-type, or nil for all". So ... do our extra
(t nil)))
(inst (and domain (face-property-instance face 'font domain))))
(funcall tty-thunk)
- (funcall x-thunk)
+ (funcall ws-thunk)
;; If it's reasonable to do the inherit-from-standard-face trick,
;; and it's called for, then do it now.
(or (null domain)
(defun make-face-bold (face &optional locale tags)
"Make FACE bold in LOCALE, if possible.
-This will attempt to make the font bold for X locales and will set the
+This will attempt to make the font bold for X/MSW locales and will set the
highlight flag for TTY locales.
If LOCALE is nil, omitted, or `all', this will attempt to frob all
(when (featurep 'tty)
(set-face-highlight-p face t locale (cons 'tty tags))))
(lambda ()
- ;; handle X specific entries
+ ;; handle X/MS Windows specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-make-font-bold locale tags))
+ (frob-face-property face 'font 'x-make-font-bold
+ '(x) locale tags))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-make-font-bold locale tags))
+ (frob-face-property face 'font 'mswindows-make-font-bold
+ '(mswindows) locale tags))
)
'(([default] . [bold])
([bold] . t)
(defun make-face-italic (face &optional locale tags)
"Make FACE italic in LOCALE, if possible.
-This will attempt to make the font italic for X locales and will set
-the underline flag for TTY locales.
-See `make-face-bold' for the semantics of the LOCALE argument and
-for more specifics on exactly how this function works."
+This will attempt to make the font italic for X/MS Windows locales and
+will set the underline flag for TTY locales. See `make-face-bold' for
+the semantics of the LOCALE argument and for more specifics on exactly
+how this function works."
(interactive (list (read-face-name "Make which face italic: ")))
(frob-face-font-2
face locale tags 'default 'italic
(lambda ()
;; handle X specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-make-font-italic locale tags))
+ (frob-face-property face 'font 'x-make-font-italic
+ '(x) locale tags))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-make-font-italic locale tags))
+ (frob-face-property face 'font 'mswindows-make-font-italic
+ '(mswindows) locale tags))
)
'(([default] . [italic])
([bold] . [bold-italic])
(defun make-face-bold-italic (face &optional locale tags)
"Make FACE bold and italic in LOCALE, if possible.
-This will attempt to make the font bold-italic for X locales and will
-set the highlight and underline flags for TTY locales.
-See `make-face-bold' for the semantics of the LOCALE argument and
-for more specifics on exactly how this function works."
+This will attempt to make the font bold-italic for X/MS Windows
+locales and will set the highlight and underline flags for TTY
+locales. See `make-face-bold' for the semantics of the LOCALE
+argument and for more specifics on exactly how this function works."
(interactive (list (read-face-name "Make which face bold-italic: ")))
(frob-face-font-2
face locale tags 'default 'bold-italic
(lambda ()
;; handle X specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-make-font-bold-italic locale tags))
+ (frob-face-property face 'font 'x-make-font-bold-italic
+ '(x) locale tags))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-make-font-bold-italic locale tags))
+ (frob-face-property face 'font 'mswindows-make-font-bold-italic
+ '(mswindows) locale tags))
)
'(([default] . [italic])
([bold] . [bold-italic])
(defun make-face-unbold (face &optional locale tags)
"Make FACE non-bold in LOCALE, if possible.
-This will attempt to make the font non-bold for X locales and will
-unset the highlight flag for TTY locales.
-See `make-face-bold' for the semantics of the LOCALE argument and
-for more specifics on exactly how this function works."
+This will attempt to make the font non-bold for X/MS Windows locales
+and will unset the highlight flag for TTY locales. See
+`make-face-bold' for the semantics of the LOCALE argument and for more
+specifics on exactly how this function works."
(interactive (list (read-face-name "Make which face non-bold: ")))
(frob-face-font-2
face locale tags 'bold 'default
(lambda ()
;; handle X specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-make-font-unbold locale tags))
+ (frob-face-property face 'font 'x-make-font-unbold
+ '(x) locale tags))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-make-font-unbold locale tags))
+ (frob-face-property face 'font 'mswindows-make-font-unbold
+ '(mswindows) locale tags))
)
'(([default] . t)
([bold] . [default])
(defun make-face-unitalic (face &optional locale tags)
"Make FACE non-italic in LOCALE, if possible.
-This will attempt to make the font non-italic for X locales and will
-unset the underline flag for TTY locales.
-See `make-face-bold' for the semantics of the LOCALE argument and
-for more specifics on exactly how this function works."
+This will attempt to make the font non-italic for X/MS Windows locales
+and will unset the underline flag for TTY locales. See
+`make-face-bold' for the semantics of the LOCALE argument and for more
+specifics on exactly how this function works."
(interactive (list (read-face-name "Make which face non-italic: ")))
(frob-face-font-2
face locale tags 'italic 'default
(lambda ()
;; handle X specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-make-font-unitalic locale tags))
+ (frob-face-property face 'font 'x-make-font-unitalic
+ '(x) locale tags))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-make-font-unitalic locale tags))
+ (frob-face-property face 'font 'mswindows-make-font-unitalic
+ '(mswindows) locale tags))
)
'(([default] . t)
([bold] . t)
(interactive (list (read-face-name "Shrink which face: ")))
;; handle X specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-find-smaller-font locale))
+ (frob-face-property face 'font 'x-find-smaller-font
+ '(x) locale))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-find-smaller-font locale)))
+ (frob-face-property face 'font 'mswindows-find-smaller-font
+ '(mswindows) locale)))
(defun make-face-larger (face &optional locale)
"Make the font of FACE be larger, if possible.
(interactive (list (read-face-name "Enlarge which face: ")))
;; handle X specific entries
(when (featurep 'x)
- (frob-face-property face 'font 'x-find-larger-font locale))
+ (frob-face-property face 'font 'x-find-larger-font
+ '(x) locale))
(when (featurep 'mswindows)
- (frob-face-property face 'font 'mswindows-find-larger-font locale)))
+ (frob-face-property face 'font 'mswindows-find-larger-font
+ '(mswindows) locale)))
(defun invert-face (face &optional locale)
"Swap the foreground and background colors of the face."
(defvar default-custom-frame-properties nil
"The frame properties used for the global faces.
-Frames not matching these propertiess should have frame local faces.
+Frames not matching these properties should have frame local faces.
The value should be nil, if uninitialized, or a plist otherwise.
See `defface' for a list of valid keys and values for the plist.")
(defun insert-file-contents-literally (filename &optional visit beg end replace)
"Like `insert-file-contents', q.v., but only reads in the file.
A buffer may be modified in several ways after reading into the buffer due
-to advanced Emacs features, such as file-name-handlers, format decoding,
-find-file-hooks, etc.
+to advanced Emacs features, such as format decoding, character code
+conversion,find-file-hooks, automatic uncompression, etc.
+
This function ensures that none of these modifications will take place."
- (let ((file-name-handler-alist nil)
- (format-alist nil)
- (after-insert-file-functions nil)
- (find-buffer-file-type-function
- (if (fboundp 'find-buffer-file-type)
- (symbol-function 'find-buffer-file-type)
- nil)))
- (unwind-protect
- (progn
- (fset 'find-buffer-file-type (lambda (filename) t))
- (insert-file-contents filename visit beg end replace))
- (if find-buffer-file-type-function
- (fset 'find-buffer-file-type find-buffer-file-type-function)
- (fmakunbound 'find-buffer-file-type)))))
+ (let ((wrap-func (find-file-name-handler filename
+ 'insert-file-contents-literally)))
+ (if wrap-func
+ (funcall wrap-func 'insert-file-contents-literally filename
+ visit beg end replace)
+ (let ((file-name-handler-alist nil)
+ (format-alist nil)
+ (after-insert-file-functions nil)
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary)
+ (find-buffer-file-type-function
+ (if (fboundp 'find-buffer-file-type)
+ (symbol-function 'find-buffer-file-type)
+ nil)))
+ (unwind-protect
+ (progn
+ (fset 'find-buffer-file-type (lambda (filename) t))
+ (insert-file-contents filename visit beg end replace))
+ (if find-buffer-file-type-function
+ (fset 'find-buffer-file-type find-buffer-file-type-function)
+ (fmakunbound 'find-buffer-file-type)))))))
(defun find-file-noselect (filename &optional nowarn rawfile)
"Read file FILENAME into a buffer and return the buffer.
("/\\.\\(?:bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode)
("/\\.\\(?:[ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
("/\\.\\(?:[kz]shenv\\|xsession\\)\\'" . sh-mode)
+ ("\\.m?spec$" .sh-mode)
;; The following come after the ChangeLog pattern for the sake of
;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too.
("\\.[12345678]\\'" . nroff-mode)
(defun paths-decode-directory-path (string &optional drop-empties)
"Split STRING at path separators into a directory list.
-Non-\"\" comonents are converted into directory form.
+Non-\"\" components are converted into directory form.
If DROP-EMPTIES is non-NIL, \"\" components are dropped from the output.
Otherwise, they are left alone."
(let* ((components (split-path string))
`(
(abbrev . "abbreviation handling, typing shortcuts, macros")
(bib . "code related to the `bib' bibliography processor")
+ (build . "code used to build XEmacs")
(c . "C, C++, and Objective-C language support")
(calendar . "calendar and time management support")
(comm . "communications, networking, remote access to files")
+ (content . "contains content (menu/dialog box descs, text, images, &c)")
(data . "support for editing files of data")
- (docs . "support for Emacs documentation")
- (dumped . "files preloaded into Emacs")
+ (docs . "support for XEmacs documentation")
+ (dumped . "files preloaded into XEmacs")
(emulations . "emulations of other editors")
(extensions . "Emacs Lisp language extensions")
(faces . "support for multiple fonts")
- (frames . "support for Emacs frames and window systems")
+ (frames . "support for XEmacs frames and window systems")
(games . "games, jokes and amusements")
+ (gui . "support for menubars, dialog boxes, and other GUI features")
(hardware . "support for interfacing with exotic hardware")
(help . "support for on-line help systems")
(hypermedia . "support for links between text or other media types")
(i18n . "internationalization and alternate character-set support")
- (internal . "code for Emacs internals, build process, defaults")
+ (internal . "code implementing core functionality in XEmacs")
(languages . "specialized modes for editing programming languages")
(lisp . "Lisp support, including Emacs Lisp")
(local . "code local to your site")
- (maint . "maintenance aids for the Emacs development group")
(mail . "modes for electronic-mail handling")
+ (maint . "maintenance aids for the Emacs development group")
(matching . "various sorts of searching and matching")
(mouse . "mouse support")
+ (mswin . "support for anything running on MS Windows")
,(when (featurep 'mule)
(cons 'mule "multi-language extensions"))
(news . "support for netnews reading and posting")
(oop . "support for object-oriented programming")
(outlines . "support for hierarchical outlining")
(processes . "process, subshell, compilation, and job control support")
+ (services . "provides services for use by other programs (cf `user')")
(terminals . "support for terminal types")
(tex . "code related to the TeX formatter")
(tools . "programming tools")
(unix . "front-ends/assistants for, or emulators of, UNIX features")
+ (user . "program interacts directly with the user (cf `services'")
(vms . "support code for vms")
(wp . "word processing")
+ (www . "support for the Web (WWW, the World Wide Web)")
))
(defvar finder-mode-map nil)
(setq dirs (cdr dirs)))
found)))
+;;;###autoload
(defun finder-commentary (file)
"Display FILE's commentary section.
FILE should be in a form suitable for passing to `locate-library'."
"\\<finder-mode-map>\\[finder-select] = select, \\[finder-list-keywords] = keywords, \\[finder-edit] = edit, \\[finder-view] = view, \\[finder-exit] = quit, \\[finder-summary] = help")))
(defun finder-exit ()
- "Exit Finder mode and kill the buffer"
+ "Exit Finder mode and kill the buffer."
(interactive)
;; XEmacs change
(or (one-window-p t 0)
;; Copyright (C) 1992-1995, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Amdahl Corporation.
-;; Copyright (C) 1996 Ben Wing.
+;; Copyright (C) 1996, 2000 Ben Wing.
;; Author: Jamie Zawinski <jwz@jwz.org>, for the LISPM Preservation Society.
;; Minimally merged with FSF 19.34 by Barry Warsaw <bwarsaw@python.org>
((or (null maximum-size) (<= (buffer-size) maximum-size))
(font-lock-fontify-buffer))
(font-lock-verbose
- (lprogress-display 'font-lock
- "Fontifying %s... buffer too big." 'abort
- (buffer-name)))))
+ (progress-feedback-with-label
+ 'font-lock
+ "Fontifying %s... buffer too big." 'abort
+ (buffer-name)))))
(font-lock-fontified
(setq font-lock-fontified nil)
(font-lock-unfontify-region (point-min) (point-max))
(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))))
+ (progress-feedback-with-label 'font-lock "Fontifying %s... aborted."
+ 'abort (buffer-name))))
(run-hooks 'font-lock-after-fontify-buffer-hook)))
(defun font-lock-default-unfontify-buffer ()
(defun font-lock-default-unfontify-region (beg end &optional maybe-loudly)
(when (and maybe-loudly font-lock-verbose
(>= (- end beg) font-lock-message-threshold))
- (lprogress-display 'font-lock "Fontifying %s..." 0 (buffer-name)))
+ (progress-feedback-with-label 'font-lock "Fontifying %s..." 0
+ (buffer-name)))
(let ((modified (buffer-modified-p))
(buffer-undo-list t) (inhibit-read-only t)
buffer-file-name buffer-file-truename)
nil
(when (and font-lock-verbose
(>= (- end start) font-lock-message-threshold))
- (lprogress-display 'font-lock "Fontifying %s... (syntactically)" 5
- (buffer-name)))
+ (progress-feedback-with-label 'font-lock
+ "Fontifying %s... (syntactically)" 5
+ (buffer-name)))
(font-lock-unfontify-region start end loudly)
(goto-char start)
(if (> end (point-max)) (setq end (point-max)))
(+ (/ (* (- (point) start) 95) (* (- end start) nkeywords))
(/ (* iter 95) nkeywords) 5))
(when (and loudly (> progress old-progress))
- (lprogress-display 'font-lock "Fontifying %s... (regexps)"
- progress bufname))
+ (progress-feedback-with-label 'font-lock
+ "Fontifying %s... (regexps)"
+ progress bufname))
(setq old-progress progress)
;; Apply each highlight to this instance of `matcher', which may be
;; specific highlights or more keywords anchored to `matcher'.
(setq highlights (cdr highlights))))
(setq iter (1+ iter))
(setq keywords (cdr keywords))))
- (if loudly (lprogress-display 'font-lock "Fontifying %s... " 100 (buffer-name)))))
+ (if loudly
+ (progress-feedback-with-label 'font-lock "Fontifying %s... " 100
+ (buffer-name)))))
\f
;; Various functions.
;;
;; Control structures. ELisp and CLisp combined.
;;
- ;;(regexp-opt
- ;; '("cond" "if" "while" "let" "let*" "prog" "progn" "prog1"
- ;; "prog2" "progv" "catch" "throw" "save-restriction"
- ;; "save-excursion" "save-window-excursion"
- ;; "save-current-buffer" "with-current-buffer"
- ;; "with-temp-file" "with-temp-buffer" "with-output-to-string"
- ;; "with-string-as-buffer-contents"
- ;; "save-selected-window" "save-match-data" "unwind-protect"
- ;; "condition-case" "track-mouse" "autoload"
- ;; "eval-after-load" "eval-and-compile" "eval-when-compile"
- ;; "when" "unless" "do" "dolist" "dotimes" "flet" "labels"
- ;; "lambda" "return" "return-from"))
(cons
(concat
"(\\("
- "autoload\\|c\\(atch\\|ond\\(ition-case\\)?\\)\\|do\\(list\\|"
- "times\\)?\\|eval-\\(a\\(fter-load\\|nd-compile\\)\\|when-compile\\)\\|"
- "flet\\|if\\|l\\(a\\(bels\\|mbda\\)\\|et\\*?\\)\\|"
- "prog[nv12\\*]?\\|return\\(-from\\)?\\|save-\\(current-buffer\\|"
- "excursion\\|match-data\\|restriction\\|selected-window\\|"
- "window-excursion\\)\\|t\\(hrow\\|rack-mouse\\)\\|un\\(less\\|"
- "wind-protect\\)\\|w\\(h\\(en\\|ile\\)\\|ith-\\(current-buffer\\|"
- "output-to-string\\|string-as-buffer-contents\\|temp-\\(buffer\\|"
- "file\\)\\)\\)"
+ ;; beginning of generated stuff
+ ;; to regenerate, use the regexp-opt below, then delete the outermost
+ ;; grouping, then use the macro below to break up the string.
+ ;; (regexp-opt
+ ;; '("cond" "if" "while" "let" "let*" "prog" "progn" "prog1"
+ ;; "prog2" "progv" "catch" "throw" "save-restriction"
+ ;; "save-excursion" "save-window-excursion"
+ ;; "save-current-buffer" "with-current-buffer"
+ ;; "save-selected-window" "with-selected-window"
+ ;; "save-selected-frame" "with-selected-frame"
+ ;; "with-temp-file" "with-temp-buffer" "with-output-to-string"
+ ;; "with-string-as-buffer-contents"
+ ;; "save-match-data" "unwind-protect" "call-with-condition-handler"
+ ;; "condition-case" "track-mouse" "autoload"
+ ;; "eval-after-load" "eval-and-compile" "eval-when-compile"
+ ;; "when" "unless" "do" "dolist" "dotimes" "flet" "labels"
+ ;; "lambda" "block" "return" "return-from" "loop") t)
+ ;; (setq last-kbd-macro
+ ;; (read-kbd-macro "\" C-7 C-1 <right> C-r \\\\| 3*<right> \" RET"))
+ "autoload\\|block\\|c\\(?:a\\(?:ll-with-condition-handler\\|tch\\)\\|"
+ "ond\\(?:ition-case\\)?\\)\\|do\\(?:list\\|times\\)?\\|"
+ "eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|when-compile\\)\\|flet\\|"
+ "if\\|l\\(?:a\\(?:bels\\|mbda\\)\\|et\\*?\\|oop\\)\\|prog[12nv]?\\|"
+ "return\\(?:-from\\)?\\|save-\\(?:current-buffer\\|excursion\\|"
+ "match-data\\|restriction\\|selected-\\(?:frame\\|window\\)\\|"
+ "window-excursion\\)\\|t\\(?:hrow\\|rack-mouse\\)\\|un\\(?:less\\|"
+ "wind-protect\\)\\|w\\(?:h\\(?:en\\|ile\\)\\|ith-\\(?:current-buffer\\|"
+ "output-to-string\\|s\\(?:elected-\\(?:frame\\|window\\)\\|"
+ "tring-as-buffer-contents\\)\\|temp-\\(?:buffer\\|file\\)\\)\\)"
+ ;; end of generated stuff
"\\)\\>") 1)
;;
;; Feature symbols as references.
"\\|long\\|short\\|void\\)\\>")
"Regexp which should match a primitive type.")
-(let ((capital-letter "A-Z\300-\326\330-\337")
- (letter "a-zA-Z_$\300-\326\330-\366\370-\377")
- (digit "0-9"))
(defvar java-font-lock-identifier-regexp
- (concat "\\<\\([" letter "][" letter digit "]*\\)\\>")
+ (let ((letter "a-zA-Z_$\300-\326\330-\366\370-\377")
+ (digit "0-9"))
+ (concat "\\<\\([" letter "][" letter digit "]*\\)\\>"))
"Regexp which should match all Java identifiers.")
(defvar java-font-lock-class-name-regexp
- (concat "\\<\\([" capital-letter "][" letter digit "]*\\)\\>")
+ (let ((capital-letter "A-Z\300-\326\330-\337")
+ (letter "a-zA-Z_$\300-\326\330-\366\370-\377")
+ (digit "0-9"))
+ (concat "\\<\\([" capital-letter "][" letter digit "]*\\)\\>"))
"Regexp which should match a class or an interface name.
The name is assumed to begin with a capital letter.")
-)
-
(let ((java-modifier-regexp
(concat "\\<\\(abstract\\|const\\|final\\|native\\|"
See `glyph-property-instance' for more information."
(glyph-property-instance glyph 'image domain default no-fallback))
+(defun glyph-image-property (glyph prop &optional domain default no-fallback)
+ "Return property PROP of the instance of GLYPH's image in DOMAIN.
+
+Normally DOMAIN will be a window or nil (meaning the selected window).
+The value returned is dependent on the image instance type."
+ (image-instance-property
+ (glyph-image-instance glyph domain default no-fallback) prop))
+
(defun set-glyph-image (glyph spec &optional locale tag-set how-to-add)
"Change the image of GLYPH in LOCALE.
`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
+ by using `set-frame-pointer', which takes an image instance, 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'.)
(device-console device))))
(turn-off-gpm-mouse-tracking device)))
-;; Restore normal mouse behaviour outside Emacs
+;; Restore normal mouse behavior outside Emacs
(add-hook 'suspend-hook 'turn-off-gpm-mouse-tracking)
(add-hook 'suspend-resume-hook 'turn-on-gpm-mouse-tracking)
;; Copyright (C) 1999 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000 Andy Piper.
+;; Copyright (C) 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: frames, extensions, internal, dumped
;; that the current buffer is at the front of the buffers list.
;; for example, select an item and then do M-C-l
;; (switch-to-other-buffer). Things get way confused.
- ;;
- ;; Andy, if you want to maintain the current look, you must
- ;; *uncouple* the gutter order and buffers order.
(if (> (length (windows-of-buffer buffer)) 0)
(select-window (car (windows-of-buffer buffer)))
(switch-to-buffer buffer))))
(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)))
+ :items (buffers-tab-items nil frame force-selection))
frame)))))
;; A myriad of different update hooks all doing slightly different things
;; progress display
;; ripped off from message display
;;
-(defcustom progress-display-use-echo-area nil
+(defcustom progress-feedback-use-echo-area nil
"*Whether progress gauge display should display in the echo area.
If NIL then progress gauges will be displayed with whatever native widgets
are available on the current console. If non-NIL then progress display will be
(defvar progress-glyph-height 24
"Height of the progress gauge glyph.")
-(defvar progress-display-popup-period 0.5
+(defvar progress-feedback-popup-period 0.5
"The time that the progress gauge should remain up after completion")
-;; private variables
-(defvar progress-text-glyph
- (make-glyph [string :data ""]))
-
-(defvar progress-layout-glyph nil)
-(defvar progress-gauge-glyph
- (make-glyph
- `[progress-gauge
- :pixel-height (eval progress-glyph-height)
- :pixel-width 250
- :descriptor "Progress"]))
-
-(defun set-progress-display-style (style)
- "Control the appearance of the progress gauge.
-If STYLE is 'large, the default, then the progress-display text is
-displayed above the gauge itself. If STYLE is 'small then the gauge
-and text are arranged side-by-side."
- (cond
- ((eq style 'small)
- (setq progress-glyph-height 16)
- (setq progress-layout-glyph
- (make-glyph
- `[layout
- :orientation horizontal
- :margin-width 4
- :items (,progress-gauge-glyph
- [button
- :pixel-height (eval progress-glyph-height)
- ;; 'quit is special and acts "asynchronously".
- :descriptor "Stop" :callback 'quit]
- ,progress-text-glyph)])))
- (t
- (setq progress-glyph-height 24)
- (setq progress-layout-glyph
- (make-glyph
- `[layout
- :orientation vertical :justify left
- :margin-width 4
- :items (,progress-text-glyph
- [layout
- :orientation horizontal
- :items (,progress-gauge-glyph
- [button
- :pixel-height (eval progress-glyph-height)
- :descriptor " Stop "
- ;; 'quit is special and acts "asynchronously".
- :callback 'quit])])])))))
-
-(defcustom progress-display-style 'large
+(defcustom progress-feedback-style 'large
"*Control the appearance of the progress gauge.
-If 'large, the default, then the progress-display text is displayed
+If 'large, the default, then the progress-feedback text is displayed
above the gauge itself. If 'small then the gauge and text are arranged
side-by-side."
:group 'gutter
:type '(choice (const :tag "large" large)
- (const :tag "small" small))
- :set #'(lambda (var val)
- (set-progress-display-style val)))
+ (const :tag "small" small)))
+
+;; private variables
+(defvar progress-text-instantiator [string :data ""])
+(defvar progress-layout-glyph (make-glyph))
+(defvar progress-layout-instantiator nil)
+
+(defvar progress-gauge-instantiator
+ [progress-gauge
+ :value 0
+ :pixel-height (eval progress-glyph-height)
+ :pixel-width 250
+ :descriptor "Progress"])
+
+(defun set-progress-feedback-instantiator (&optional locale)
+ (cond
+ ((eq progress-feedback-style 'small)
+ (setq progress-glyph-height 16)
+ (setq progress-layout-instantiator
+ `[layout
+ :orientation horizontal
+ :margin-width 4
+ :items (,progress-gauge-instantiator
+ [button
+ :pixel-height (eval progress-glyph-height)
+ ;; 'quit is special and acts "asynchronously".
+ :descriptor "Stop" :callback 'quit]
+ ,progress-text-instantiator)])
+ (set-glyph-image progress-layout-glyph progress-layout-instantiator locale))
+ (t
+ (setq progress-glyph-height 24)
+ (setq progress-layout-instantiator
+ `[layout
+ :orientation vertical :justify left
+ :margin-width 4
+ :items (,progress-text-instantiator
+ [layout
+ :orientation horizontal
+ :items (,progress-gauge-instantiator
+ [button
+ :pixel-height (eval progress-glyph-height)
+ :descriptor " Stop "
+ ;; 'quit is special and acts "asynchronously".
+ :callback 'quit])])])
+ (set-glyph-image progress-layout-glyph progress-layout-instantiator locale))))
(defvar progress-stack nil
"An alist of label/string pairs representing active progress gauges.
The first element in the list is currently displayed in the gutter area.
-Do not modify this directly--use the `progress-display' or
-`display-progress-display'/`clear-progress-display' functions.")
+Do not modify this directly--use the `progress-feedback' or
+`display-progress-feedback'/`clear-progress-feedback' functions.")
(defvar progress-abort-glyph
(make-glyph
`[layout :orientation vertical :justify left
- :items (,progress-text-glyph
+ :items (,progress-text-instantiator
[layout
:margin-width 4
:pixel-height progress-glyph-height
:orientation horizontal])]))
-(defun progress-displayed-p (&optional return-string frame)
+(defun progress-feedback-displayed-p (&optional return-string frame)
"Return a non-nil value if a progress gauge is presently displayed in the
gutter area. If optional argument RETURN-STRING is non-nil,
return a string containing the message, otherwise just return t."
;;; Returns the string which remains in the echo area, or nil if none.
;;; If label is nil, the whole message stack is cleared.
-(defun clear-progress-display (&optional label frame no-restore)
+(defun clear-progress-feedback (&optional label frame no-restore)
"Remove any progress gauge with LABEL from the progress gauge-stack,
erasing it from the gutter area if it's currently displayed there.
If a message remains at the head of the progress-stack and NO-RESTORE
Unless you need the return value or you need to specify a label,
you should just use (progress nil)."
(if (or (not (valid-image-instantiator-format-p 'progress-gauge frame))
- progress-display-use-echo-area)
+ progress-feedback-use-echo-area)
(clear-message label frame nil no-restore)
(or frame (setq frame (selected-frame)))
- (remove-progress-display label frame)
+ (remove-progress-feedback label frame)
(let ((inhibit-read-only t)
(zmacs-region-stays zmacs-region-stays)) ; preserve from change
(erase-buffer (get-buffer-create " *Gutter Area*")))
nil ; just preparing to put another msg up
(if progress-stack
(let ((oldmsg (cdr (car progress-stack))))
- (raw-append-progress-display oldmsg nil frame)
+ (raw-append-progress-feedback oldmsg nil frame)
oldmsg)
;; nothing to display so get rid of the gauge
(set-specifier bottom-gutter-border-width 0 frame)
(set-gutter-element-visible-p bottom-gutter-visible-p
'progress nil frame)))))
-(defun progress-display-clear-when-idle (&optional label)
+(defun progress-feedback-clear-when-idle (&optional label)
(add-one-shot-hook 'pre-idle-hook
`(lambda ()
- (clear-progress-display ',label))))
+ (clear-progress-feedback ',label))))
-(defun remove-progress-display (&optional label frame)
+(defun remove-progress-feedback (&optional label frame)
;; If label is nil, we want to remove all matching progress gauges.
(while (and progress-stack
(or (null label) ; null label means clear whole stack
(setcdr s (cdr (cdr s))))
(setq s (cdr s)))))))
-(defun progress-display-dispatch-non-command-events ()
+(defun progress-feedback-dispatch-non-command-events ()
;; don't allow errors to hose things
(condition-case t
;; (sit-for 0) is too agressive and cause more display than we
(dispatch-non-command-events)
nil))
-(defun append-progress-display (label message &optional value frame)
+(defun append-progress-feedback (label message &optional value frame)
(or frame (setq frame (selected-frame)))
;; Add a new entry to the message-stack, or modify an existing one
(let* ((top (car progress-stack))
(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))
- :value value)
- (raw-append-progress-display message value frame))
+ (progn
+ (set-instantiator-property progress-gauge-instantiator :value value)
+ (set-progress-feedback-instantiator (frame-selected-window frame)))
+ (raw-append-progress-feedback message value frame))
(redisplay-gutter-area))
(push (cons label message) progress-stack)
- (raw-append-progress-display message value frame))
- (progress-display-dispatch-non-command-events)
+ (raw-append-progress-feedback message value frame))
+ (progress-feedback-dispatch-non-command-events)
;; either get command events or sit waiting for them
(when (eq value 100)
-; (sit-for progress-display-popup-period nil)
- (clear-progress-display label))))
+; (sit-for progress-feedback-popup-period nil)
+ (clear-progress-feedback label))))
-(defun abort-progress-display (label message &optional frame)
+(defun abort-progress-feedback (label message &optional frame)
(if (or (not (valid-image-instantiator-format-p 'progress-gauge frame))
- progress-display-use-echo-area)
+ progress-feedback-use-echo-area)
(display-message label (concat message "aborted.") frame)
(or frame (setq frame (selected-frame)))
;; Add a new entry to the message-stack, or modify an existing one
;; 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)
+ (set-instantiator-property progress-text-instantiator :datat message)
+ (set-progress-feedback-instantiator (frame-selected-window frame))
(set-specifier bottom-gutter-height 'autodetect frame)
(set-gutter-element-visible-p bottom-gutter-visible-p
'progress t frame)
;; we have to do this so redisplay is up-to-date and so
;; redisplay-gutter-area performs optimally.
(redisplay-gutter-area)
- (sit-for progress-display-popup-period nil)
- (clear-progress-display label frame)
+ (sit-for progress-feedback-popup-period nil)
+ (clear-progress-feedback label frame)
(set-extent-begin-glyph ext progress-layout-glyph)
(set-gutter-element bottom-gutter 'progress gutter-string frame)
)))))
-(defun raw-append-progress-display (message &optional value frame)
+(defun raw-append-progress-feedback (message &optional value frame)
(unless (equal message "")
(let* ((inhibit-read-only t)
(zmacs-region-stays zmacs-region-stays)
;; 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))
- :value val)
- (set-image-instance-property
- (glyph-image-instance progress-text-glyph (frame-selected-window frame))
- :data message)
+ (set-instantiator-property progress-gauge-instantiator :value val)
+ (set-progress-feedback-instantiator (frame-selected-window frame))
+
+ (set-instantiator-property progress-text-instantiator :data message)
+ (set-progress-feedback-instantiator (frame-selected-window frame))
(if (and (eq (specifier-instance bottom-gutter-height frame)
'autodetect)
(gutter-element-visible-p bottom-gutter-visible-p
;; checking for user events
(progn
(redisplay-gutter-area)
- (progress-display-dispatch-non-command-events))
+ (progress-feedback-dispatch-non-command-events))
;; otherwise make the gutter visible and redraw the frame
(set-specifier bottom-gutter-height 'autodetect frame)
(set-gutter-element-visible-p bottom-gutter-visible-p
;; we have to do this so redisplay is up-to-date and so
;; redisplay-gutter-area performs optimally. This may also
;; make sure the frame geometry looks ok.
- (progress-display-dispatch-non-command-events)
+ (progress-feedback-dispatch-non-command-events)
(redisplay-frame frame)
))))
-(defun display-progress-display (label message &optional value frame)
+(defun display-progress-feedback (label message &optional value frame)
"Display a progress gauge and message in the bottom gutter area.
First argument LABEL is an identifier for this message. MESSAGE is
-the string to display. Use `clear-progress-display' to remove a labelled
+the string to display. Use `clear-progress-feedback' to remove a labelled
message."
(cond ((eq value 'abort)
- (abort-progress-display label message frame))
+ (abort-progress-feedback label message frame))
((or (not (valid-image-instantiator-format-p 'progress-gauge frame))
- progress-display-use-echo-area)
+ progress-feedback-use-echo-area)
(display-message label
(concat message (if (eq value 100) "done."
(make-string (/ value 5) ?.)))
frame))
(t
- (append-progress-display label message value frame))))
+ (append-progress-feedback label message value frame))))
-(defun current-progress-display (&optional frame)
+(defun current-progress-feedback (&optional frame)
"Return the current progress gauge in the gutter area, or nil.
The FRAME argument is currently unused."
(cdr (car progress-stack)))
;;; may eventually be frame-dependent
-(defun current-progress-display-label (&optional frame)
+(defun current-progress-feedback-label (&optional frame)
(car (car progress-stack)))
-(defun progress-display (fmt &optional value &rest args)
+(defun progress-feedback (fmt &optional value &rest args)
"Print a progress gauge and message in the bottom gutter area of the frame.
The arguments are the same as to `format'.
(save-excursion
(if (and (null fmt) (null args))
(prog1 nil
- (clear-progress-display nil))
+ (clear-progress-feedback nil))
(let ((str (apply 'format fmt args)))
- (display-progress-display 'progress str value)
+ (display-progress-feedback 'progress str value)
str))))
-(defun lprogress-display (label fmt &optional value &rest args)
+(defun progress-feedback-with-label (label fmt &optional value &rest args)
"Print a progress gauge and message in the bottom gutter area of the frame.
First argument LABEL is an identifier for this progress gauge. The rest of the
arguments are the same as to `format'."
(save-excursion
(if (and (null fmt) (null args))
(prog1 nil
- (clear-progress-display label nil))
+ (clear-progress-feedback label nil))
(let ((str (apply 'format fmt args)))
- (display-progress-display label str value)
+ (display-progress-feedback label str value)
str))))
-;;
-;; Simple search dialog
-;;
-(defvar search-dialog-direction t)
-(defvar search-dialog-text
- (make-glyph
- [edit-field :width 15 :descriptor "" :active t :face default]))
-
-(defun search-dialog-callback (parent image-instance event)
- (save-selected-frame
- (select-frame parent)
- (funcall (if search-dialog-direction
- 'search-forward 'search-backward)
- (image-instance-property
- (glyph-image-instance search-dialog-text
- (frame-selected-window
- (event-channel event))) :text))
- (isearch-highlight (match-beginning 0) (match-end 0))))
-
-(defun make-search-dialog ()
- "Popup a search dialog box."
- (interactive)
- (let* ((parent (selected-frame)))
- (set-buffer-dedicated-frame
- (get-buffer-create "Dialog")
- (make-dialog-box
- (make-glyph
- `[layout
- :orientation horizontal :justify left
- :height 10 :width 40
- :border [string :data "Search"]
- :items
- ([layout :orientation vertical :justify left
- :items
- ([string :data "Search for:"]
- [button :descriptor "Match case"
- :style toggle
- :selected (not case-fold-search)
- :callback (setq case-fold-search
- (not case-fold-search))]
- [button :descriptor "Forwards"
- :style radio
- :selected search-dialog-direction
- :callback (setq search-dialog-direction t)]
- [button :descriptor "Backwards"
- :style radio
- :selected (not search-dialog-direction)
- :callback (setq search-dialog-direction nil)]
- )]
- [layout :orientation vertical :justify left
- :items
- (search-dialog-text
- [button :width 10 :descriptor "Find Next"
- :callback-ex
- (lambda (image-instance event)
- (search-dialog-callback ,parent
- image-instance event))]
- [button :width 10 :descriptor "Cancel"
- :callback-ex
- (lambda (image-instance event)
- (isearch-dehighlight)
- (delete-frame
- (event-channel event)))])])])
- '(height 10 width 40)))))
-
(provide 'gutter-items)
;;; gutter-items.el ends here.
;; Copyright (C) 1999, 2000 Andy Piper.
;; Maintainer: XEmacs Development Team
-;; Keywords: frames, extensions, internal, dumped
+;; Keywords: frames, gui, internal, dumped
;; This file is part of XEmacs.
"Input from the gutters."
:group 'environment)
-;; Although these customizations appear bogus, they are neccessary in
+;; Although these customizations appear bogus, they are necessary in
;; order to be able to save options through the options menu.
(defcustom default-gutter-position
(default-gutter-position)
(when (glyphp val)
(setq spec (copy-sequence "\n"))
(set-extent-begin-glyph (make-extent 0 1 spec) val))
- (map-extents #'(lambda (extent arg)
+ (map-extents #'(lambda (extent arg)
(set-extent-property extent 'duplicable t)) spec)
(modify-specifier-instances gutter-specifier #'plist-put (list prop spec)
'force nil locale tag-set)))
locale tag-set)
"Change the visibility of gutter elements.
Set the visibility of element PROP to VISIBLE-P for
-GUTTER-SPECIFIER-VISIBLE-P in optional LOCALE.
+GUTTER-SPECIFIER-VISIBLE-P in optional LOCALE.
This is a convenience function for hiding and showing gutter elements."
- (modify-specifier-instances
+ (modify-specifier-instances
gutter-visible-specifier-p #'(lambda (spec prop visible-p)
(if (consp spec)
- (if visible-p
- (if (memq prop spec) spec
+ (if visible-p
+ (if (memq prop spec) spec
(cons prop spec))
(delq prop spec))
(if visible-p (list prop))))
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
+size of the gutter will be adjusted to just accommodate the gutters
contents. 'autodetect only works for top and bottom gutters."
(make-specifier-and-init 'gutter-size spec-list))
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
+corresponding 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))
otherwise it is killed."
(interactive)
(let ((buf (current-buffer)))
- (cond ((frame-property (selected-frame) 'help-window-config)
- (set-window-configuration
- (frame-property (selected-frame) 'help-window-config))
- (set-frame-property (selected-frame) 'help-window-config nil))
+ (cond (help-window-config
+ (set-window-configuration help-window-config))
((not (one-window-p))
(delete-window)))
(if bury
;; another name (which is a shame, because w-d-h-b is a perfect name
;; for a macro) that uses with-displaying-help-buffer internally.
+(defcustom mode-for-help 'help-mode
+ "*Mode that help buffers are put into.")
+
+(defvar help-sticky-window nil
+;; Window into which help buffers will be displayed, rather than
+;; always searching for a new one. This is INTERNAL and liable to
+;; change its interface and/or name at any moment. It should be
+;; bound, not set.
+)
+
+(defvar help-window-config nil)
+
+(make-variable-buffer-local 'help-window-config)
+(put 'help-window-config 'permanent-local t)
+
(defun with-displaying-help-buffer (thunk &optional name)
"Form which makes a help buffer with given NAME and evaluates BODY there.
The actual name of the buffer is generated by the function `help-buffer-name'."
(mapcar 'window-frame
(windows-of-buffer buffer-name)))))))
(help-register-and-maybe-prune-excess buffer-name)
- (prog1 (with-output-to-temp-buffer buffer-name
- (prog1 (funcall thunk)
- (save-excursion
- (set-buffer standard-output)
- (help-mode))))
+ ;; if help-sticky-window is bogus or deleted, get rid of it.
+ (if (and help-sticky-window (or (not (windowp help-sticky-window))
+ (not (window-live-p help-sticky-window))))
+ (setq help-sticky-window nil))
+ (prog1
+ (let ((temp-buffer-show-function
+ (if help-sticky-window
+ #'(lambda (buffer)
+ (set-window-buffer help-sticky-window buffer))
+ temp-buffer-show-function)))
+ (with-output-to-temp-buffer buffer-name
+ (prog1 (funcall thunk)
+ (save-excursion
+ (set-buffer standard-output)
+ (funcall mode-for-help)))))
(let ((helpwin (get-buffer-window buffer-name)))
(when helpwin
- (with-current-buffer (window-buffer helpwin)
- ;; If the *Help* buffer is already displayed on this
- ;; frame, don't override the previous configuration
- (when help-not-visible
- (set-frame-property (selected-frame)
- 'help-window-config winconfig)))
+ ;; If the *Help* buffer is already displayed on this
+ ;; frame, don't override the previous configuration
+ (when help-not-visible
+ (with-current-buffer (window-buffer helpwin)
+ (setq help-window-config winconfig)))
(when help-selects-help-window
(select-window helpwin))
(cond ((eq helpwin (selected-window))
(defun xemacs-www-page ()
"Go to the XEmacs World Wide Web page."
(interactive)
- (if (boundp 'browse-url-browser-function)
- (funcall browse-url-browser-function "http://www.xemacs.org/")
+ (if (fboundp 'browse-url)
+ (browse-url "http://www.xemacs.org/")
(error "xemacs-www-page requires browse-url")))
(defun xemacs-www-faq ()
"View the latest and greatest XEmacs FAQ using the World Wide Web."
(interactive)
- (if (boundp 'browse-url-browser-function)
- (funcall browse-url-browser-function
- "http://www.xemacs.org/faq/index.html")
+ (if (fboundp 'browse-url)
+ (browse-url "http://www.xemacs.org/faq/index.html")
(error "xemacs-www-faq requires browse-url")))
(defun xemacs-local-faq ()
(setq obj (read (current-buffer)))
(and (symbolp obj) (fboundp obj) obj)))))))
+(defun function-at-event (event)
+ "Return the function whose name is around the position of EVENT.
+EVENT should be a mouse event. When calling from a popup or context menu,
+use `last-popup-menu-event' to find out where the mouse was clicked.
+\(You cannot use (interactive \"e\"), unfortunately. This returns a
+misc-user event.)
+
+If the event contains no position, or the position is not over text, or
+there is no function around that point, nil is returned."
+ (if (and event (event-buffer event) (event-point event))
+ (save-excursion
+ (set-buffer (event-buffer event))
+ (goto-char (event-point event))
+ (function-at-point))))
+
;; Default to nil for the non-hackers? Not until we find a way to
;; distinguish hackers from non-hackers automatically!
(defcustom describe-function-show-arglist t
(string-match "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" doc))
(setq doc (substring doc 0 (match-beginning 0))))
doc))
+; (let ((name-char "[-+a-zA-Z0-9_*]") (sym-char "[-+a-zA-Z0-9_:*]"))
+; (list
+; ;;
+; ;; The symbol itself.
+; (list (concat "\\`\\(" name-char "+\\)\\(:\\)?")
+; '(1 (if (match-beginning 2)
+; 'font-lock-function-name-face
+; 'font-lock-variable-name-face)
+; nil t))
+; ;;
+; ;; Words inside `' which tend to be symbol names.
+; (list (concat "`\\(" sym-char sym-char "+\\)'")
+; 1 '(prog1
+; 'font-lock-reference-face
+; (add-list-mode-item (match-beginning 1)
+; (match-end 1)
+; nil
+; 'help-follow-reference))
+; t)
+; ;;
+; ;; CLisp `:' keywords as references.
+; (list (concat "\\<:" sym-char "+\\>") 0 'font-lock-reference-face t)))
+
+(defvar help-symbol-regexp
+ (let ((sym-char "[+a-zA-Z0-9_:*]")
+ (sym-char-no-dash "[-+a-zA-Z0-9_:*]"))
+ (concat "\\("
+ ;; a symbol with a - in it.
+ "\\<\\(" sym-char-no-dash "+\\(-" sym-char-no-dash "+\\)+\\)\\>"
+ "\\|"
+ "`\\(" sym-char "+\\)'"
+ "\\)")))
+
+(defun help-symbol-run-function-1 (ev ex fun)
+ (let ((help-sticky-window
+ ;; if we were called from a help buffer, make sure the new help
+ ;; goes in the same window.
+ (if (and (event-buffer ev)
+ (symbol-value-in-buffer 'help-window-config
+ (event-buffer ev)))
+ (event-window ev)
+ help-sticky-window)))
+ (funcall fun (extent-property ex 'help-symbol))))
+
+(defun help-symbol-run-function (fun)
+ (let ((ex (extent-at-event last-popup-menu-event 'help-symbol)))
+ (when ex
+ (help-symbol-run-function-1 last-popup-menu-event ex fun))))
+
+(defvar help-symbol-function-context-menu
+ '("---"
+ ["View %_Documentation" (help-symbol-run-function 'describe-function)]
+ ["Find %_Function Source" (help-symbol-run-function 'find-function)]
+ ))
+
+(defvar help-symbol-variable-context-menu
+ '("---"
+ ["View %_Documentation" (help-symbol-run-function 'describe-variable)]
+ ["Find %_Variable Source" (help-symbol-run-function 'find-variable)]
+ ))
+
+(defvar help-symbol-function-and-variable-context-menu
+ '("---"
+ ["View Function %_Documentation" (help-symbol-run-function
+ 'describe-function)]
+ ["View Variable D%_ocumentation" (help-symbol-run-function
+ 'describe-variable)]
+ ["Find %_Function Source" (help-symbol-run-function 'find-function)]
+ ["Find %_Variable Source" (help-symbol-run-function 'find-variable)]
+ ))
+
+(defun frob-help-extents (buffer)
+ ;; Look through BUFFER, starting at the buffer's point and continuing
+ ;; till end of file, and find documented functions and variables.
+ ;; any such symbol found is tagged with an extent, that sets up these
+ ;; properties:
+ ;; 1. mouse-face is 'highlight (so the extent gets highlighted on mouse over)
+ ;; 2. help-symbol is the name of the symbol.
+ ;; 3. context-menu is a list of context menu items, specific to whether
+ ;; the symbol is a function, variable, or both.
+ ;; 4. activate-function will cause the function or variable to be described,
+ ;; replacing the existing help contents.
+ (save-excursion
+ (set-buffer buffer)
+ (let (b e name)
+ (while (re-search-forward help-symbol-regexp nil t)
+ (setq b (or (match-beginning 2) (match-beginning 4)))
+ (setq e (or (match-end 2) (match-end 4)))
+ (setq name (buffer-substring b e))
+ (let* ((sym (intern-soft name))
+ (var (and sym (boundp sym)
+ (documentation-property sym
+ 'variable-documentation t)))
+ (fun (and sym (fboundp sym)
+ (documentation sym t))))
+ (when (or var fun)
+ (let ((ex (make-extent b e)))
+ (set-extent-property ex 'mouse-face 'highlight)
+ (set-extent-property ex 'help-symbol sym)
+ (set-extent-property
+ ex 'context-menu
+ (cond ((and var fun)
+ help-symbol-function-and-variable-context-menu)
+ (var help-symbol-variable-context-menu)
+ (fun help-symbol-function-context-menu)))
+ (set-extent-property
+ ex 'activate-function
+ (if fun
+ #'(lambda (ev ex)
+ (help-symbol-run-function-1 ev ex 'describe-function))
+ #'(lambda (ev ex)
+ (help-symbol-run-function-1 ev ex 'describe-variable))))
+ ))))))) ;; 11 parentheses!
(defun describe-function-1 (function &optional nodoc)
"This function does the work for `describe-function'."
(unless (and obsolete aliases)
(let ((doc (function-documentation function t)))
(princ "Documentation:\n")
- (princ doc)
+ (let ((oldp (point standard-output))
+ newp)
+ (princ doc)
+ (setq newp (point standard-output))
+ (goto-char oldp standard-output)
+ (frob-help-extents standard-output)
+ (goto-char newp standard-output))
(unless (or (equal doc "")
(eq ?\n (aref doc (1- (length doc)))))
(terpri)))))))))
(message nil)
(message (function-arglist function)))
-
(defun variable-at-point ()
(ignore-errors
(with-syntax-table emacs-lisp-mode-syntax-table
(let ((obj (read (current-buffer))))
(and (symbolp obj) (boundp obj) obj))))))
+(defun variable-at-event (event)
+ "Return the variable whose name is around the position of EVENT.
+EVENT should be a mouse event. When calling from a popup or context menu,
+use `last-popup-menu-event' to find out where the mouse was clicked.
+\(You cannot use (interactive \"e\"), unfortunately. This returns a
+misc-user event.)
+
+If the event contains no position, or the position is not over text, or
+there is no variable around that point, nil is returned."
+ (if (and event (event-buffer event) (event-point event))
+ (save-excursion
+ (set-buffer (event-buffer event))
+ (goto-char (event-point event))
+ (variable-at-point))))
+
(defun variable-obsolete-p (variable)
"Return non-nil if VARIABLE is obsolete."
(not (null (get variable 'byte-obsolete-variable))))
(when (or (not obsolete) (not aliases))
(if doc
;; note: documentation-property calls substitute-command-keys.
- (princ doc)
+ (let ((oldp (point standard-output))
+ newp)
+ (princ doc)
+ (setq newp (point standard-output))
+ (goto-char oldp standard-output)
+ (frob-help-extents standard-output)
+ (goto-char newp standard-output))
(princ "not documented as a variable."))))
(terpri)))
(format "variable `%s'" variable)))
(with-displaying-help-buffer
(insert string)))))
-
;;; help.el ends here
(defvar Info-current-node nil
"Name of node that Info is now looking at, or nil.")
-(defvar Info-tag-table-marker (make-marker)
+(defvar Info-tag-table-marker nil
"Marker pointing at beginning of current Info file's tag table.
Marker points nowhere if file has no tag table.")
+(defvar Info-tag-table-buffer nil)
+
(defvar Info-current-file-completions nil
"Cached completion list for current Info file.")
;; should be locked up where they can't do any more harm.
;; Go into info buffer.
- (switch-to-buffer "*info*")
+ (or (eq major-mode 'Info-mode)
+ (switch-to-buffer "*info*"))
(buffer-disable-undo (current-buffer))
(run-hooks 'Info-startup-hook)
(or (eq major-mode 'Info-mode)
(equal Info-current-file filename)
(not Info-novice)
(string= "dir" (file-name-nondirectory Info-current-file))
- (if (y-or-n-p-maybe-dialog-box
+ (if (y-or-n-p
(format "Leave Info file `%s'? "
(file-name-nondirectory Info-current-file)))
(message "")
(looking-at "(Indirect)\n"))
;; It is indirect. Copy it to another buffer
;; and record that the tag table is in that buffer.
- (save-excursion
- (let ((buf (current-buffer)))
- (set-buffer
- (get-buffer-create " *info tag table*"))
- (buffer-disable-undo (current-buffer))
- (setq case-fold-search t)
- (erase-buffer)
- (insert-buffer-substring buf)
- (set-marker Info-tag-table-marker
- (match-end 0))))
+ (let ((buf (current-buffer))
+ (m Info-tag-table-marker))
+ (or
+ Info-tag-table-buffer
+ (setq
+ Info-tag-table-buffer
+ (generate-new-buffer " *info tag table*")))
+ (save-excursion
+ (set-buffer Info-tag-table-buffer)
+ (buffer-disable-undo (current-buffer))
+ (setq case-fold-search t)
+ (erase-buffer)
+ (insert-buffer-substring buf)
+ (set-marker m (match-end 0))))
(set-marker Info-tag-table-marker pos))))
(setq Info-current-file
(file-name-sans-versions buffer-file-name))))
;; Also, if this is an indirect info file,
;; read the proper subfile into this buffer.
(if (marker-position Info-tag-table-marker)
- (save-excursion
- (set-buffer (marker-buffer Info-tag-table-marker))
- (goto-char Info-tag-table-marker)
- (if (re-search-forward regexp nil t)
- (progn
- (setq guesspos (read (current-buffer)))
- ;; If this is an indirect file,
- ;; determine which file really holds this node
- ;; and read it in.
- (if (not (eq (current-buffer) (get-buffer "*info*")))
- (setq guesspos
- (Info-read-subfile guesspos)))))))
+ (let (foun found-mode (m Info-tag-table-marker))
+ (save-excursion
+ (set-buffer (marker-buffer Info-tag-table-marker))
+ (goto-char m)
+ (setq foun (re-search-forward regexp nil t))
+ (if foun
+ (setq guesspos (read (current-buffer))))
+ (setq found-mode major-mode))
+ (if foun
+ ;; If this is an indirect file,
+ ;; determine which file really holds this node
+ ;; and read it in.
+ (if (not (eq major-mode found-mode))
+ (setq guesspos
+ (Info-read-subfile guesspos))))))
(goto-char (max (point-min) (- guesspos 1000)))
;; Now search from our advised position (or from beg of buffer)
;; to find the actual node.
(if p (file-name-nondirectory file) file)))
(defun Info-read-subfile (nodepos)
- (set-buffer (marker-buffer Info-tag-table-marker))
- (goto-char (point-min))
- (search-forward "\n\^_")
(let (lastfilepos
lastfilename)
- (forward-line 2)
- (catch 'foo
- (while (not (looking-at "\^_"))
- (if (not (eolp))
- (let ((beg (point))
- thisfilepos thisfilename)
- (search-forward ": ")
- (setq thisfilename (buffer-substring beg (- (point) 2)))
- (setq thisfilepos (read (current-buffer)))
- ;; read in version 19 stops at the end of number.
- ;; Advance to the next line.
- (if (eolp)
- (forward-line 1))
- (if (> thisfilepos nodepos)
- (throw 'foo t))
- (setq lastfilename thisfilename)
- (setq lastfilepos thisfilepos))
- (throw 'foo t))))
- (set-buffer (get-buffer "*info*"))
+ (save-excursion
+ (set-buffer (marker-buffer Info-tag-table-marker))
+ (goto-char (point-min))
+ (search-forward "\n\^_")
+ (forward-line 2)
+ (catch 'foo
+ (while (not (looking-at "\^_"))
+ (if (not (eolp))
+ (let ((beg (point))
+ thisfilepos thisfilename)
+ (search-forward ": ")
+ (setq thisfilename (buffer-substring beg (- (point) 2)))
+ (setq thisfilepos (read (current-buffer)))
+ ;; read in version 19 stops at the end of number.
+ ;; Advance to the next line.
+ (if (eolp)
+ (forward-line 1))
+ (if (> thisfilepos nodepos)
+ (throw 'foo t))
+ (setq lastfilename thisfilename)
+ (setq lastfilepos thisfilepos))
+ (throw 'foo t)))))
(or (equal Info-current-subfile lastfilename)
(let ((buffer-read-only nil))
(setq buffer-file-name nil)
(defun Info-build-node-completions ()
(or Info-current-file-completions
- (let ((compl (Info-build-annotation-completions)))
+ (let ((m Info-tag-table-marker)
+ (compl (Info-build-annotation-completions)))
(save-excursion
(save-restriction
(widen)
(if (marker-buffer Info-tag-table-marker)
(progn
(set-buffer (marker-buffer Info-tag-table-marker))
- (goto-char Info-tag-table-marker)
+ (goto-char m)
(while (re-search-forward "\nNode: \\(.*\\)\177" nil t)
(setq compl
(cons (list (buffer-substring (match-beginning 1)
(if (not found) ;can only happen in subfile case -- else would have erred
(unwind-protect
(let ((list ()))
- (set-buffer (marker-buffer Info-tag-table-marker))
- (goto-char (point-min))
- (search-forward "\n\^_\nIndirect:")
- (save-restriction
- (narrow-to-region (point)
- (progn (search-forward "\n\^_")
- (1- (point))))
- (goto-char (point-min))
- (search-forward (concat "\n" osubfile ": "))
- (beginning-of-line)
- (while (not (eobp))
- (re-search-forward "\\(^.*\\): [0-9]+$")
- (goto-char (+ (match-end 1) 2))
- (setq list (cons (cons (read (current-buffer))
- (buffer-substring (match-beginning 1)
- (match-end 1)))
- list))
- (goto-char (1+ (match-end 0))))
- (setq list (nreverse list)
- list (cdr list)))
+ (save-excursion
+ (set-buffer (marker-buffer Info-tag-table-marker))
+ (goto-char (point-min))
+ (search-forward "\n\^_\nIndirect:")
+ (save-restriction
+ (narrow-to-region (point)
+ (progn (search-forward "\n\^_")
+ (1- (point))))
+ (goto-char (point-min))
+ (search-forward (concat "\n" osubfile ": "))
+ (beginning-of-line)
+ (while (not (eobp))
+ (re-search-forward "\\(^.*\\): [0-9]+$")
+ (goto-char (+ (match-end 1) 2))
+ (setq list (cons (cons (read (current-buffer))
+ (buffer-substring (match-beginning 1)
+ (match-end 1)))
+ list))
+ (goto-char (1+ (match-end 0))))
+ (setq list (nreverse list)
+ list (cdr list))))
(while list
(message "Searching subfile %s..." (cdr (car list)))
(Info-read-subfile (car (car list)))
(make-local-variable 'Info-current-subfile)
(make-local-variable 'Info-current-node)
(make-local-variable 'Info-tag-table-marker)
+ (setq Info-tag-table-marker (make-marker))
+ (make-local-variable 'Info-tag-table-buffer)
+ (setq Info-tag-table-buffer nil)
(make-local-variable 'Info-current-file-completions)
(make-local-variable 'Info-current-annotation-completions)
(make-local-variable 'Info-index-alternatives)
(interactive)
;; Do this first, so nothing has changed if user C-g's at query.
(and (buffer-modified-p)
- (y-or-n-p-maybe-dialog-box "Save the file? ")
+ (y-or-n-p "Save the file? ")
(save-buffer))
(use-local-map Info-mode-map)
(setq major-mode 'Info-mode)
(set yank-pointer-name
(setq yank-pointer
(mod (+ (or yank-pointer 0)
- (if advance -1 1))
+ ;; XEmacs change
+ (if advance -1 (if yank-pointer 1 0)))
length)))
(setq isearch-string (nth yank-pointer ring)
isearch-message (mapconcat 'isearch-text-char-description
(define-key global-map "\M-\C-t" 'transpose-sexps)
(define-key global-map "\C-x\C-t" 'transpose-lines)
+;; XEmacs: much more reasonable and useful key definitions.
+(define-key global-map '(control T) 'transpose-line-down)
+(define-key global-map '(meta T) 'transpose-line-up)
+
(define-key global-map "\M-;" 'indent-for-comment)
(define-key global-map "\M-j" 'indent-new-comment-line)
(define-key global-map "\M-\C-j" 'indent-new-comment-line)
;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
;; Created: Jan 1998
-;; Version: $Revision: 1.7.2.7 $
+;; Version: $Revision: 1.7.2.8 $
;; Keywords: help comm
;; This file is part of XEmacs
(if decoder
(cons name (mapcar decoder values))
attr)))
-
+
+(defun ldap-decode-entry (entry)
+ "Decode the attributes of ENTRY according to LDAP rules."
+ (let (dn decoded)
+ (setq dn (car entry))
+ (if (stringp dn)
+ (setq entry (cdr entry))
+ (setq dn nil))
+ (setq decoded (mapcar 'ldap-decode-attribute entry))
+ (if dn
+ (cons dn decoded)
+ decoded)))
+
(defun ldap-search (arg1 &rest args)
"Perform an LDAP search."
(apply (if (ldapp arg1)
(ldap-close ldap)
(if ldap-ignore-attribute-codings
result
- (mapcar (function
- (lambda (record)
- (mapcar 'ldap-decode-attribute record)))
- result))))
+ (mapcar 'ldap-decode-entry result))))
(defun ldap-add-entries (entries &optional host binddn passwd)
"Add entries to an LDAP directory.
(defvar emacs-lisp-mode-syntax-table nil)
(defvar lisp-mode-abbrev-table nil)
-;; XEmacs change
-(defvar lisp-interaction-mode-popup-menu
- (purecopy '("Lisp-Interaction"
- ["Evaluate Last %_S-expression" eval-last-sexp]
- ["Evaluate %_Whole Buffer" eval-current-buffer]
- ["Evaluate Re%_gion" eval-region
- :active (region-exists-p)]
- "---"
- ["%_Evaluate This Defun" eval-defun]
- ["%_Instrument This Defun for Debugging" edebug-defun]
- "---"
- ["Find %_Function Source..." find-function
+(defun construct-lisp-mode-menu (popup-p emacs-lisp-p)
+ (flet ((popup-wrap (form)
+ (if popup-p `(menu-call-at-event ',form) form)))
+ `(,@(if emacs-lisp-p
+ `(["%_Byte-Compile This File" ,(popup-wrap
+ 'emacs-lisp-byte-compile)]
+ ["B%_yte-Compile/Load This File"
+ ,(popup-wrap 'emacs-lisp-byte-compile-and-load)]
+ ["Byte-%_Recompile Directory..."
+ ,(popup-wrap 'byte-recompile-directory)]
+ "---"))
+ ["%_Evaluate Region or Defun"
+ ,(popup-wrap '(if (region-exists-p)
+ (call-interactively 'eval-region)
+ (call-interactively 'eval-defun)))]
+ ["Evaluate %_Whole Buffer" ,(popup-wrap 'eval-current-buffer)]
+ ["Evaluate Last %_S-expression" ,(popup-wrap 'eval-last-sexp)]
+ "---"
+ ,@(if popup-p
+ '(["%_Find Function"
+ (find-function (menu-call-at-event '(function-at-point)))
+ :suffix (let ((fun (menu-call-at-event '(function-at-point))))
+ (if fun (symbol-name fun) ""))
+ :active (and (fboundp 'find-function)
+ (menu-call-at-event '(function-at-point)))]
+ ["%_Find Variable"
+ (find-variable (menu-call-at-event '(variable-at-point)))
+ :suffix (let ((fun (menu-call-at-event '(variable-at-point))))
+ (if fun (symbol-name fun) ""))
+ :active (and (fboundp 'find-variable)
+ (menu-call-at-event '(variable-at-point)))]
+ ["%_Help on Function"
+ (describe-function (menu-call-at-event '(function-at-point)))
+ :suffix (let ((fun (menu-call-at-event '(function-at-point))))
+ (if fun (symbol-name fun) ""))
+ :active (and (fboundp 'describe-function)
+ (menu-call-at-event '(function-at-point)))]
+ ["%_Help on Variable"
+ (describe-variable (menu-call-at-event '(variable-at-point)))
+ :suffix (let ((fun (menu-call-at-event '(variable-at-point))))
+ (if fun (symbol-name fun) ""))
+ :active (and (fboundp 'describe-variable)
+ (menu-call-at-event '(variable-at-point)))])
+ '(["Find %_Function..." find-function
:active (fboundp 'find-function)]
- ["Find %_Variable Source..." find-variable
+ ["Find %_Variable..." find-variable
:active (fboundp 'find-variable)]
- ["%_Trace Function..." trace-function-background]
- ["%_Untrace All Functions" untrace-all
- :active (fboundp 'untrace-all)]
- "---"
- ["%_Comment Out Region" comment-region
- :active (region-exists-p)]
- "---"
- ["Indent %_Line or Region"
- (if (region-exists-p)
- (call-interactively 'indent-region)
- (call-interactively 'lisp-indent-line))]
- ["Indent B%_alanced Expression" indent-sexp]
- ["Indent %_Defun"
- (progn
- (beginning-of-defun)
- (indent-sexp))]
- "---"
- "Look for debug-on-error under Options->General"
- )))
+ ["%_Help on Function..." describe-function
+ :active (fboundp 'describe-function)]
+ ["Hel%_p on Variable..." describe-variable
+ :active (fboundp 'describe-variable)]))
+ "---"
+ ["Instrument This Defun for %_Debugging" ,(popup-wrap 'edebug-defun)]
+ ["%_Trace Function..." trace-function-background]
+ ["%_Untrace All Functions" untrace-all
+ :active (fboundp 'untrace-all)]
+ "---"
+ ["%_Comment Out Region" comment-region :active (region-exists-p)]
+ "---"
+ ["%_Indent Region or Balanced Expression"
+ ,(popup-wrap '(if (region-exists-p)
+ (call-interactively 'indent-region)
+ (call-interactively 'indent-sexp)))]
+ ["I%_ndent Defun"
+ ,(popup-wrap '(progn
+ (beginning-of-defun)
+ (indent-sexp)))]
+ "---"
+ "Look for debug-on-error under Options->Troubleshooting"
+ )))
+
+(defvar lisp-interaction-mode-popup-menu
+ (cons "Lisp-Interaction" (construct-lisp-mode-menu t nil)))
(defvar emacs-lisp-mode-popup-menu
- (purecopy
- (nconc
- '("Emacs-Lisp"
- ["%_Byte-Compile This File" emacs-lisp-byte-compile]
- ["B%_yte-Compile/Load This File" emacs-lisp-byte-compile-and-load]
- ["Byte-%_Recompile Directory..." byte-recompile-directory]
- "---")
- (cdr lisp-interaction-mode-popup-menu))))
+ (cons "Emacs-Lisp" (construct-lisp-mode-menu t t)))
;Don't have a menubar entry in Lisp Interaction mode. Otherwise, the
;*scratch* buffer has a Lisp menubar item! Very confusing.
;Jan Vroonhof really wants this, so it's back. --ben
(defvar lisp-interaction-mode-menubar-menu
- (purecopy (cons "%_Lisp" (cdr lisp-interaction-mode-popup-menu))))
+ (cons "%_Lisp" (construct-lisp-mode-menu nil nil)))
(defvar emacs-lisp-mode-menubar-menu
- (purecopy (cons "%_Lisp" (cdr emacs-lisp-mode-popup-menu))))
+ (cons "%_Lisp" (construct-lisp-mode-menu nil t)))
(if (not emacs-lisp-mode-syntax-table)
(let ((i 0))
(let ((function (buffer-substring (point)
(progn (forward-sexp 1) (point))))
method)
- (setq method (or (get (intern-soft function) 'lisp-indent-function)
- (get (intern-soft function) 'lisp-indent-hook)))
+ (if (condition-case nil
+ (save-excursion
+ (backward-up-list 1)
+ (backward-up-list 1)
+ (backward-up-list 1)
+ (looking-at "(flet\\s-"))
+ (error nil))
+ (setq method 'defun)
+ (setq method (or (get (intern-soft function) 'lisp-indent-function)
+ (get (intern-soft function) 'lisp-indent-hook))))
(cond ((or (eq method 'defun)
(and (null method)
(> (length function) 3)
(put 'save-excursion 'lisp-indent-function 0)
(put 'save-window-excursion 'lisp-indent-function 0)
(put 'save-selected-window 'lisp-indent-function 0)
+(put 'with-selected-window 'lisp-indent-function 1)
(put 'save-selected-frame 'lisp-indent-function 0)
(put 'with-selected-frame 'lisp-indent-function 1)
(put 'save-restriction 'lisp-indent-function 0)
;;; Code:
-;;; Warning-free compile
-(eval-when-compile
- (defvar language-environment-list)
- (defvar bookmark-alist)
- (defvar language-info-alist)
- (defvar current-language-environment)
- (defvar tutorial-supported-languages))
-
(defun menu-truncate-list (list n)
(if (<= (length list) n)
list
["Save %_As..." write-file]
["Save So%_me Buffers" save-some-buffers]
"-----"
- ["%_Print Buffer" generic-print-buffer
+ ["%_Print" generic-print-buffer
:active (or (valid-specifier-tag-p 'msprinter)
(and (not (eq system-type 'windows-nt))
(fboundp 'lpr-buffer)))
- :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
- ["Prett%_y-Print Buffer" ps-print-buffer-with-faces
+ :suffix (if put-buffer-names-in-file-menu (concat (buffer-name) "...")
+ "...")]
+ ["Prett%_y-Print" ps-print-buffer-with-faces
:active (fboundp 'ps-print-buffer-with-faces)
:suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
"-----"
:active (selection-owner-p)]
"----"
["Select %_All" mark-whole-buffer]
- ["Select %_Page" mark-page]
- "----"
- ["%_Search..." make-search-dialog]
- ["%_1 Replace..." query-replace]
+ ["Select Pa%_ge" mark-page]
"----"
- ["%_2 Search (Regexp)..." isearch-forward-regexp]
- ["%_3 Search Backward (Regexp)..." isearch-backward-regexp]
- ["%_4 Replace (Regexp)..." query-replace-regexp]
-
+ ["%_Find..." make-search-dialog]
+ ["R%_eplace..." query-replace]
+ ["Replace (Rege%_xp)..." query-replace-regexp]
+ ["%_List Matching Lines..." list-matching-lines]
,@(when (featurep 'mule)
'("----"
("%_Multilingual (\"Mule\")"
:style toggle :selected mouse-track-rectangle-p]
)
("%_Sort"
- ["%_Lines" sort-lines :active (region-exists-p)]
- ["%_Paragraphs" sort-paragraphs :active (region-exists-p)]
- ["P%_ages" sort-pages :active (region-exists-p)]
- ["%_Columns" sort-columns :active (region-exists-p)]
+ ["%_Lines in Region" sort-lines :active (region-exists-p)]
+ ["%_Paragraphs in Region" sort-paragraphs :active (region-exists-p)]
+ ["P%_ages in Region" sort-pages :active (region-exists-p)]
+ ["%_Columns in Region" sort-columns :active (region-exists-p)]
["%_Regexp..." sort-regexp-fields :active (region-exists-p)]
)
- ("%_Center"
+ ("%_Change Case"
+ ["%_Upcase Region" upcase-region :active (region-exists-p)]
+ ["%_Downcase Region" downcase-region :active (region-exists-p)]
+ ["%_Capitalize Region" capitalize-region :active (region-exists-p)]
+ ["%_Title-Case Region" capitalize-region-as-title
+ :active (region-exists-p)]
+ )
+ ("Ce%_nter"
["%_Line" center-line]
["%_Paragraph" center-paragraph]
["%_Region" center-region :active (region-exists-p)]
)
("%_Tools"
+ ("%_Packages"
+ ("%_Add Download Site"
+ :filter (lambda (&rest junk)
+ (submenu-generate-accelerator-spec
+ (package-get-download-menu))))
+ ["%_Update Package Index" package-get-update-base]
+ ["%_List and Install" pui-list-packages]
+ ["U%_pdate Installed Packages" package-get-update-all]
+ ;; hack-o-matic, we can't force a load of package-base here
+ ;; since it triggers dialog box interactions which we can't
+ ;; deal with while using a menu
+ ("Using %_Custom"
+ :filter (lambda (&rest junk)
+ (if package-get-base
+ (submenu-generate-accelerator-spec
+ (cdr (custom-menu-create 'packages)))
+ '("Please load Package Index"))))
+
+ ["%_Help" (Info-goto-node "(xemacs)Packages")])
("%_Internet"
["Read Mail %_1 (VM)..." vm
:active (fboundp 'vm)]
["Se%_t..." customize-customized]
["%_Apropos..." customize-apropos]
["%_Browse..." customize-browse])
- ("Manage %_Packages"
- ("%_Add Download Site"
- :filter (lambda (&rest junk)
- (submenu-generate-accelerator-spec
- (package-get-download-menu))))
- ["%_Update Package Index" package-get-update-base]
- ["%_List and Install" pui-list-packages]
- ["U%_pdate Installed Packages" package-get-update-all]
- ;; hack-o-matic, we can't force a load of package-base here
- ;; since it triggers dialog box interactions which we can't
- ;; deal with while using a menu
- ("Using %_Custom"
- :filter (lambda (&rest junk)
- (if package-get-base
- (submenu-generate-accelerator-spec
- (cdr (custom-menu-create 'packages)))
- '(["Please load Package Index"
- (lamda (&rest junk) ()) nil]))))
-
- ["%_Help" (Info-goto-node "(xemacs)Packages")])
"---"
- ("%_Keyboard and Mouse"
- ["%_Abbrev Mode"
- (customize-set-variable 'abbrev-mode
- (not (default-value 'abbrev-mode)))
- :style toggle
- :selected (default-value 'abbrev-mode)]
- ["%_Delete Key Deletes Selection"
- (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
- :style toggle
- :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
- :active (boundp 'pending-delete-mode)]
+ ("%_Editing"
+ ["This Buffer %_Read Only" (toggle-read-only)
+ :style toggle :selected buffer-read-only]
["%_Yank/Kill Interact With Clipboard"
(if (eq interprogram-cut-function 'own-clipboard)
(progn
(setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
(customize-set-variable 'overwrite-mode overwrite-mode))
:style toggle :selected overwrite-mode]
- ("`%_kill-line' Behavior..."
- ["Kill %_Whole Line"
- (customize-set-variable 'kill-whole-line 'always)
- :style radio :selected (eq kill-whole-line 'always)]
- ["Kill to %_End of Line"
- (customize-set-variable 'kill-whole-line nil)
- :style radio :selected (eq kill-whole-line nil)]
- ["Kill Whole Line at %_Beg, Otherwise to End"
- (customize-set-variable 'kill-whole-line t)
- :style radio :selected (eq kill-whole-line t)])
- ["Size for %_Block-Movement Commands..."
- (customize-set-variable 'block-movement-size
- (read-number "Block Movement Size: "
- t block-movement-size))]
- ["%_VI Emulation"
- (progn
- (toggle-viper-mode)
- (customize-set-variable 'viper-mode viper-mode))
- :style toggle :selected (and (boundp 'viper-mode) viper-mode)
- :active (fboundp 'toggle-viper-mode)]
+ ["%_Abbrev Mode"
+ (customize-set-variable 'abbrev-mode
+ (not (default-value 'abbrev-mode)))
+ :style toggle
+ :selected (default-value 'abbrev-mode)]
["Active Re%_gions"
(customize-set-variable 'zmacs-regions (not zmacs-regions))
:style toggle :selected zmacs-regions]
- "----"
- ["%_Set Key..." global-set-key]
- ["%_Unset Key..." global-unset-key]
"---"
["%_Case Sensitive Search"
(customize-set-variable 'case-fold-search
(setq case-fold-search (not case-fold-search)))
:style toggle :selected (not case-fold-search)]
- ["Case Matching %_Replace"
+ ["Case %_Matching Replace"
(customize-set-variable 'case-replace (not case-replace))
:style toggle :selected case-replace]
"---"
["Add Newline When Moving Past %_End"
(customize-set-variable 'next-line-add-newlines
(not next-line-add-newlines))
- :style toggle :selected next-line-add-newlines]
+ :style toggle :selected next-line-add-newlines])
+ ("%_Keyboard and Mouse"
+ ["%_Delete Key Deletes Selection"
+ (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
+ :style toggle
+ :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
+ :active (boundp 'pending-delete-mode)]
+ ("`%_kill-line' Behavior..."
+ ["Kill %_Whole Line"
+ (customize-set-variable 'kill-whole-line 'always)
+ :style radio :selected (eq kill-whole-line 'always)]
+ ["Kill to %_End of Line"
+ (customize-set-variable 'kill-whole-line nil)
+ :style radio :selected (eq kill-whole-line nil)]
+ ["Kill Whole Line at %_Beg, Otherwise to End"
+ (customize-set-variable 'kill-whole-line t)
+ :style radio :selected (eq kill-whole-line t)])
+ ["Size for %_Block-Movement Commands..."
+ (customize-set-variable 'block-movement-size
+ (read-number "Block Movement Size: "
+ t block-movement-size))]
+ ["%_VI Emulation"
+ (progn
+ (toggle-viper-mode)
+ (customize-set-variable 'viper-mode viper-mode))
+ :style toggle :selected (and (boundp 'viper-mode) viper-mode)
+ :active (fboundp 'toggle-viper-mode)]
+ "----"
+ ["%_Set Key..." global-set-key]
+ ["%_Unset Key..." global-unset-key]
"---"
- ["%_Mouse Paste at Text Cursor"
+ ["%_Mouse Paste at Text Cursor (not Clicked Location)"
(customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
:style toggle :selected mouse-yank-at-point]
- ["A%_void Text..."
- (customize-set-variable 'mouse-avoidance-mode
- (if mouse-avoidance-mode nil 'banish))
- :style toggle
- :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode)
- :active (and (boundp 'mouse-avoidance-mode)
- (device-on-window-system-p))]
- ["%_Strokes Mode"
- (customize-set-variable 'strokes-mode (not strokes-mode))
- :style toggle
- :selected (and (boundp 'strokes-mode) strokes-mode)
- :active (and (boundp 'strokes-mode)
- (device-on-window-system-p))]
- )
- ("%_General"
- ["This Buffer %_Read Only" (toggle-read-only)
- :style toggle :selected buffer-read-only]
+ "---"
["%_Teach Extended Commands"
(customize-set-variable 'teach-extended-commands-p
(not teach-extended-commands-p))
:style toggle :selected teach-extended-commands-p]
- ["Debug on %_Error"
- (customize-set-variable 'debug-on-error (not debug-on-error))
- :style toggle :selected debug-on-error]
- ["Debug on %_Quit"
- (customize-set-variable 'debug-on-quit (not debug-on-quit))
- :style toggle :selected debug-on-quit]
- ["Debug on %_Signal"
- (customize-set-variable 'debug-on-signal (not debug-on-signal))
- :style toggle :selected debug-on-signal]
)
-
("%_Printing"
["Set Printer %_Name for Generic Print Support..."
(customize-set-variable
(eq browse-url-browser-function 'browse-url-kfm))
:active (and (boundp 'browse-url-browser-function)
(fboundp 'browse-url-kfm))]
- ))
-
-
+ ))
+ ("%_Troubleshooting"
+ ["%_Debug on Error"
+ (customize-set-variable 'debug-on-error (not debug-on-error))
+ :style toggle :selected debug-on-error]
+ ["Debug on %_Quit"
+ (customize-set-variable 'debug-on-quit (not debug-on-quit))
+ :style toggle :selected debug-on-quit]
+ ["Debug on S%_ignal"
+ (customize-set-variable 'debug-on-signal (not debug-on-signal))
+ :style toggle :selected debug-on-signal]
+ ["%_Stack Trace on Error"
+ (customize-set-variable 'stack-trace-on-error
+ (not stack-trace-on-error))
+ :style toggle :selected stack-trace-on-error]
+ ["Stack Trace on Si%_gnal"
+ (customize-set-variable 'stack-trace-on-signal
+ (not stack-trace-on-signal))
+ :style toggle :selected stack-trace-on-signal]
+ )
"-----"
- ("Display"
+ ("%_Display"
,@(if (featurep 'scrollbar)
'(["%_Scrollbars"
(customize-set-variable 'scrollbars-visible-p
(not scrollbars-visible-p))
:style toggle
:selected scrollbars-visible-p]))
- ;; I don't think this is of any interest. - dverna apr. 98
- ;; #### I beg to differ! Many FSFmacs converts hate the 3D
- ;; modeline, and it was perfectly fine to be able to turn them
- ;; off through the Options menu. I would have uncommented this
- ;; source, but the code for saving options would not save the
- ;; modeline 3D-ness. Grrr. --hniksic
- ;; ["%_3D Modeline"
- ;; (progn
- ;; (if (zerop (specifier-instance modeline-shadow-thickness))
- ;; (set-specifier modeline-shadow-thickness 2)
- ;; (set-specifier modeline-shadow-thickness 0))
- ;; (redraw-modeline t))
- ;; :style toggle
- ;; :selected (let ((thickness
- ;; (specifier-instance modeline-shadow-thickness)))
- ;; (and (integerp thickness)
- ;; (> thickness 0)))]
- ["%_Truncate Lines"
+ ["%_3D Modeline"
+ (customize-set-variable 'modeline-3d-p
+ (not modeline-3d-p))
+ :style toggle
+ :selected modeline-3d-p]
+ ["%_Wrap Long Lines"
(progn;; becomes buffer-local
(setq truncate-lines (not truncate-lines))
(customize-set-variable 'truncate-lines truncate-lines))
:style toggle
- :selected truncate-lines]
+ :selected (not truncate-lines)]
+ ,@(if (featurep 'toolbar)
+ '("---"
+ ["%_Toolbars Visible"
+ (customize-set-variable 'toolbar-visible-p
+ (not toolbar-visible-p))
+ :style toggle
+ :selected toolbar-visible-p]
+ ["Toolbars Ca%_ptioned"
+ (customize-set-variable 'toolbar-captioned-p
+ (not toolbar-captioned-p))
+ :style toggle
+ :active toolbar-visible-p
+ :selected toolbar-captioned-p]
+ ("Default Toolba%_r Location"
+ ["%_Top"
+ (customize-set-variable 'default-toolbar-position 'top)
+ :style radio
+ :active toolbar-visible-p
+ :selected (eq default-toolbar-position 'top)]
+ ["%_Bottom"
+ (customize-set-variable 'default-toolbar-position 'bottom)
+ :style radio
+ :active toolbar-visible-p
+ :selected (eq default-toolbar-position 'bottom)]
+ ["%_Left"
+ (customize-set-variable 'default-toolbar-position 'left)
+ :style radio
+ :active toolbar-visible-p
+ :selected (eq default-toolbar-position 'left)]
+ ["%_Right"
+ (customize-set-variable 'default-toolbar-position 'right)
+ :style radio
+ :active toolbar-visible-p
+ :selected (eq default-toolbar-position 'right)]
+ )
+ ))
+ ,@(if (featurep 'gutter)
+ '("---"
+ ["B%_uffers Tab Visible"
+ (customize-set-variable 'gutter-buffers-tab-visible-p
+ (not gutter-buffers-tab-visible-p))
+ :style toggle
+ :selected gutter-buffers-tab-visible-p]
+ ("Default %_Gutter Location"
+ ["%_Top"
+ (customize-set-variable 'default-gutter-position 'top)
+ :style radio
+ :selected (eq default-gutter-position 'top)]
+ ["%_Bottom"
+ (customize-set-variable 'default-gutter-position 'bottom)
+ :style radio
+ :selected (eq default-gutter-position 'bottom)]
+ ["%_Left"
+ (customize-set-variable 'default-gutter-position 'left)
+ :style radio
+ :selected (eq default-gutter-position 'left)]
+ ["%_Right"
+ (customize-set-variable 'default-gutter-position 'right)
+ :style radio
+ :selected (eq default-gutter-position 'right)]
+ )
+ ))
+ "-----"
["%_Blinking Cursor"
(customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
:style toggle
:selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
:active (boundp 'blink-cursor-mode)]
- "-----"
["Bl%_ock Cursor"
(progn
(customize-set-variable 'bar-cursor nil)
(force-cursor-redisplay))
:style radio
:selected (and bar-cursor (not (eq bar-cursor t)))]
+ "----"
+ ("Pa%_ren Highlighting"
+ ["%_None"
+ (customize-set-variable 'paren-mode nil)
+ :style radio
+ :selected (and (boundp 'paren-mode) (not paren-mode))
+ :active (boundp 'paren-mode)]
+ ["%_Blinking Paren"
+ (customize-set-variable 'paren-mode 'blink-paren)
+ :style radio
+ :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren))
+ :active (boundp 'paren-mode)]
+ ["%_Steady Paren"
+ (customize-set-variable 'paren-mode 'paren)
+ :style radio
+ :selected (and (boundp 'paren-mode) (eq paren-mode 'paren))
+ :active (boundp 'paren-mode)]
+ ["%_Expression"
+ (customize-set-variable 'paren-mode 'sexp)
+ :style radio
+ :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp))
+ :active (boundp 'paren-mode)]
+ ;; ["Nes%_ted Shading"
+ ;; (customize-set-variable 'paren-mode 'nested)
+ ;; :style radio
+ ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
+ ;; :active (boundp 'paren-mode)]
+ )
"------"
["%_Line Numbers"
(progn
:style radio
:selected (null get-frame-for-buffer-default-instance-limit)]
["Other Frame (%_2 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2)
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit
+ 2)
:style radio
:selected (eq 2 get-frame-for-buffer-default-instance-limit)]
["Other Frame (%_3 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3)
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit
+ 3)
:style radio
:selected (eq 3 get-frame-for-buffer-default-instance-limit)]
["Other Frame (%_4 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4)
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit
+ 4)
:style radio
:selected (eq 4 get-frame-for-buffer-default-instance-limit)]
["Other Frame (%_5 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5)
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit
+ 5)
:style radio
:selected (eq 5 get-frame-for-buffer-default-instance-limit)]
["Always Create %_New Frame"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0)
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit
+ 0)
:style radio
:selected (eq 0 get-frame-for-buffer-default-instance-limit)]
"-----"
:selected (null temp-buffer-show-function)]
"-----"
["%_Make Current Frame Gnuserv Target"
- (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t))
+ (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil
+ t))
:style toggle
:selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
:active (boundp 'gnuserv-frame)]
:selected (and (boundp 'font-menu-ignore-scaled-fonts)
font-menu-ignore-scaled-fonts)]
)
- ,@(if (featurep 'toolbar)
- '(("%_Toolbars"
- ["%_Visible"
- (customize-set-variable 'toolbar-visible-p
- (not toolbar-visible-p))
- :style toggle
- :selected toolbar-visible-p]
- ["%_Captioned"
- (customize-set-variable 'toolbar-captioned-p
- (not toolbar-captioned-p))
- :style toggle
- :selected toolbar-captioned-p]
- ("%_Default Location"
- ["%_Top"
- (customize-set-variable 'default-toolbar-position 'top)
- :style radio
- :selected (eq default-toolbar-position 'top)]
- ["%_Bottom"
- (customize-set-variable 'default-toolbar-position 'bottom)
- :style radio
- :selected (eq default-toolbar-position 'bottom)]
- ["%_Left"
- (customize-set-variable 'default-toolbar-position 'left)
- :style radio
- :selected (eq default-toolbar-position 'left)]
- ["%_Right"
- (customize-set-variable 'default-toolbar-position 'right)
- :style radio
- :selected (eq default-toolbar-position 'right)]
- )
- )))
- ,@(if (featurep 'gutter)
- '(("G%_utters"
- ["Buffers Tab %_Visible"
- (customize-set-variable 'gutter-buffers-tab-visible-p
- (not gutter-buffers-tab-visible-p))
- :style toggle
- :selected gutter-buffers-tab-visible-p]
- ("%_Default Location"
- ["%_Top"
- (customize-set-variable 'default-gutter-position 'top)
- :style radio
- :selected (eq default-gutter-position 'top)]
- ["%_Bottom"
- (customize-set-variable 'default-gutter-position 'bottom)
- :style radio
- :selected (eq default-gutter-position 'bottom)]
- ["%_Left"
- (customize-set-variable 'default-gutter-position 'left)
- :style radio
- :selected (eq default-gutter-position 'left)]
- ["%_Right"
- (customize-set-variable 'default-gutter-position 'right)
- :style radio
- :selected (eq default-gutter-position 'right)]
- )
- )))
- "-----"
("S%_yntax Highlighting"
["%_In This Buffer"
(progn;; becomes buffer local
:selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
:active (fboundp 'font-lock-mode)]
"-----"
+ ["Force %_Rehighlight in this Buffer"
+ (customize-set-variable 'font-lock-auto-fontify
+ (not font-lock-auto-fontify))
+ :style toggle
+ :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
+ :active (fboundp 'font-lock-mode)]
+ "-----"
["%_Fonts"
(progn
(require 'font-lock)
:selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
:active (boundp 'font-lock-mode)]
"-----"
- ["%_Least"
+ ["%_1 Least"
(progn
(require 'font-lock)
(if (or (and (not (integerp font-lock-maximum-decoration))
(font-lock-recompute-variables)))
:style radio
:active (fboundp 'font-lock-mode)
- :selected (and (boundp 'font-lock-maximium-decoration)
+ :selected (and (boundp 'font-lock-maximum-decoration)
(or (and (not (integerp font-lock-maximum-decoration))
(not (eq t font-lock-maximum-decoration)))
(and (integerp font-lock-maximum-decoration)
(<= font-lock-maximum-decoration 0))))]
- ["M%_ore"
+ ["%_2 More"
(progn
(require 'font-lock)
(if (and (integerp font-lock-maximum-decoration)
(font-lock-recompute-variables)))
:style radio
:active (fboundp 'font-lock-mode)
- :selected (and (boundp 'font-lock-maximium-decoration)
+ :selected (and (boundp 'font-lock-maximum-decoration)
(integerp font-lock-maximum-decoration)
(= 1 font-lock-maximum-decoration))]
- ["%_Even More"
+ ["%_3 Even More"
(progn
(require 'font-lock)
(if (and (integerp font-lock-maximum-decoration)
:selected (and (boundp 'font-lock-maximum-decoration)
(integerp font-lock-maximum-decoration)
(= 2 font-lock-maximum-decoration))]
- ["%_Most"
+ ["%_4 Most"
(progn
(require 'font-lock)
(if (or (eq font-lock-maximum-decoration t)
(and (integerp font-lock-maximum-decoration)
(>= font-lock-maximum-decoration 3))))]
"-----"
- ["La%_zy"
+ ["Lazy %_Lock"
+ (progn;; becomes buffer local
+ (lazy-lock-mode)
+ (customize-set-variable 'lazy-lock-mode lazy-lock-mode)
+ ;; this shouldn't be necessary so there has to
+ ;; be a redisplay bug lurking somewhere (or
+ ;; possibly another event handler bug)
+ (redraw-modeline))
+ :active (and (boundp 'font-lock-mode) (boundp 'lazy-lock-mode)
+ font-lock-mode)
+ :style toggle
+ :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)]
+ ["Lazy %_Shot"
(progn;; becomes buffer local
(lazy-shot-mode)
(customize-set-variable 'lazy-shot-mode lazy-shot-mode)
:style toggle
:selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
)
- ("Pa%_ren Highlighting"
- ["%_None"
- (customize-set-variable 'paren-mode nil)
- :style radio
- :selected (and (boundp 'paren-mode) (not paren-mode))
- :active (boundp 'paren-mode)]
- ["%_Blinking Paren"
- (customize-set-variable 'paren-mode 'blink-paren)
- :style radio
- :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren))
- :active (boundp 'paren-mode)]
- ["%_Steady Paren"
- (customize-set-variable 'paren-mode 'paren)
- :style radio
- :selected (and (boundp 'paren-mode) (eq paren-mode 'paren))
- :active (boundp 'paren-mode)]
- ["%_Expression"
- (customize-set-variable 'paren-mode 'sexp)
- :style radio
- :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp))
- :active (boundp 'paren-mode)]
- ;; ["Nes%_ted Shading"
- ;; (customize-set-variable 'paren-mode 'nested)
- ;; :style radio
- ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
- ;; :active (boundp 'paren-mode)]
- )
- "-----"
+ ("%_Font" :filter font-menu-family-constructor)
+ ("Font Si%_ze" :filter font-menu-size-constructor)
+ ;; ("Font Weig%_ht" :filter font-menu-weight-constructor)
["Edit Fa%_ces..." (customize-face nil)]
- ("Fo%_nt" :filter font-menu-family-constructor)
- ("Si%_ze" :filter font-menu-size-constructor)
- ;; ("Weig%_ht" :filter font-menu-weight-constructor)
"-----"
- ["%_Edit Init (.emacs) File"
+ ["Edit I%_nit File"
;; #### 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"))
+ (progn (find-file (or user-init-file "~/.xemacs/init.el"))
(or (eq major-mode 'emacs-lisp-mode)
(emacs-lisp-mode)))]
- ["%_Save Options to .emacs File" customize-save-customized]
+ ["%_Save Options to Init File" customize-save-customized]
)
("%_Buffers"
("XEmacs %_FAQ"
["%_FAQ (local)" xemacs-local-faq]
["FAQ via %_WWW" xemacs-www-faq
- :active (boundp 'browse-url-browser-function)]
+ :active (fboundp 'browse-url)]
["%_Home Page" xemacs-www-page
- :active (boundp 'browse-url-browser-function)])
+ :active (fboundp 'browse-url)])
("%_Tutorials"
:filter tutorials-menu-filter)
("%_Samples"
;;; The Bookmarks menu
(defun bookmark-menu-filter (&rest ignore)
+ (declare (special bookmark-alist))
(let ((definedp (and (boundp 'bookmark-alist)
bookmark-alist
t)))
`(,(if definedp
'("%_Jump to Bookmark"
:filter (lambda (&rest junk)
- (mapcar #'(lambda (bmk)
- `[,bmk (bookmark-jump ',bmk)])
- (bookmark-all-names))))
+ (submenu-generate-accelerator-spec
+ (mapcar #'(lambda (bmk)
+ `[,bmk (bookmark-jump ',bmk)])
+ (bookmark-all-names)))))
["%_Jump to Bookmark" nil nil])
["Set %_Bookmark" bookmark-set
:active (fboundp 'bookmark-set)]
,(if definedp
'("%_Delete Bookmark"
:filter (lambda (&rest junk)
- (mapcar #'(lambda (bmk)
- `[,bmk (bookmark-delete ',bmk)])
- (bookmark-all-names))))
+ (submenu-generate-accelerator-spec
+ (mapcar #'(lambda (bmk)
+ `[,bmk (bookmark-delete ',bmk)])
+ (bookmark-all-names)))))
["%_Delete Bookmark" nil nil])
["%_Edit Bookmark List" bookmark-bmenu-list ,definedp]
"---"
"Customization of `Buffers' menu."
:group 'menu)
-(defvar buffers-menu-omit-chars-list '(?b ?p ?l))
+(defvar buffers-menu-omit-chars-list '(?b ?p ?l ?d))
(defcustom buffers-menu-max-size 25
"*Maximum number of entries which may appear on the \"Buffers\" menu.
(defun language-environment-menu-filter (menu)
"This is the menu filter for the \"Language Environment\" submenu."
+ (declare (special language-environment-list))
(let ((n 0))
(mapcar (lambda (env-sym)
(setq n (1+ n))
;;; The Help menu
(defun tutorials-menu-filter (menu-items)
- (append
+ (declare (special language-info-alist
+ current-language-environment
+ tutorial-supported-languages))
+ (append
+ (if (featurep 'mule)
+ (if (assq 'tutorial
+ (assoc current-language-environment language-info-alist))
+ `([,(concat "%_Default (" current-language-environment ")")
+ help-with-tutorial]))
+ '(["%_English" help-with-tutorial]))
+ (submenu-generate-accelerator-spec
(if (featurep 'mule)
- (if (assq 'tutorial
- (assoc current-language-environment language-info-alist))
- `([,(concat "%_Default (" current-language-environment ")")
- help-with-tutorial]))
- '(["%_English" help-with-tutorial]))
- (submenu-generate-accelerator-spec
- (if (featurep 'mule)
- ;; Mule tutorials.
- (mapcan #'(lambda (lang)
- (let ((tut (assq 'tutorial lang)))
- (and tut
- (not (string= (car lang) "ASCII"))
- ;; skip current language, since we already
- ;; included it first
- (not (string= (car lang)
- 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)))))
+ ;; Mule tutorials.
+ (mapcan #'(lambda (lang)
+ (let ((tut (assq 'tutorial lang)))
+ (and tut
+ (not (string= (car lang) "ASCII"))
+ ;; skip current language, since we already
+ ;; included it first
+ (not (string= (car lang)
+ 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)))))
-\f
(set-menubar default-menubar)
\f
["U%_nsplit Window" delete-other-windows]
))
-(defvar global-popup-menu nil
- "The global popup menu. This is present in all modes.
-See the function `popup-menu' for a description of menu syntax.")
-
-(defvar mode-popup-menu nil
- "The mode-specific popup menu. Automatically buffer local.
-This is appended to the default items in `global-popup-menu'.
-See the function `popup-menu' for a description of menu syntax.")
-(make-variable-buffer-local 'mode-popup-menu)
-
;; In an effort to avoid massive menu clutter, this mostly worthless menu is
;; superseded by any local popup menu...
(setq-default mode-popup-menu default-popup-menu)
-(defvar activate-popup-menu-hook nil
- "Function or functions run before a mode-specific popup menu is made visible.
-These functions are called with no arguments, and should interrogate and
-modify the value of `global-popup-menu' or `mode-popup-menu' as desired.
-Note: this hook is only run if you use `popup-mode-menu' for activating the
-global and mode-specific commands; if you have your own binding for button3,
-this hook won't be run.")
-
-(defun popup-mode-menu ()
- "Pop up a menu of global and mode-specific commands.
-The menu is computed by combining `global-popup-menu' and `mode-popup-menu'."
- (interactive "@_")
- (run-hooks 'activate-popup-menu-hook)
- (popup-menu
- (cond ((and global-popup-menu mode-popup-menu)
- ;; Merge global-popup-menu and mode-popup-menu
- (check-menu-syntax mode-popup-menu)
- (let* ((title (car mode-popup-menu))
- (items (cdr mode-popup-menu))
- mode-filters)
- ;; Strip keywords from local menu for attaching them at the top
- (while (and items
- (keywordp (car items)))
- ;; Push both keyword and its argument.
- (push (pop items) mode-filters)
- (push (pop items) mode-filters))
- (setq mode-filters (nreverse mode-filters))
- ;; If mode-filters contains a keyword already present in
- ;; `global-popup-menu', you will probably lose.
- (append (list (car global-popup-menu))
- mode-filters
- (cdr global-popup-menu)
- '("---" "---")
- (if popup-menu-titles (list title))
- (if popup-menu-titles '("---" "---"))
- items)))
- (t
- (or mode-popup-menu
- global-popup-menu
- (error "No menu defined in this buffer"))))))
-
-(defun popup-buffer-menu (event)
- "Pop up a copy of the Buffers menu (from the menubar) where the mouse is clicked."
- (interactive "e")
- (let ((window (and (event-over-text-area-p event) (event-window event)))
- (bmenu nil))
- (or window
- (error "Pointer must be in a normal window"))
- (select-window window)
- (if current-menubar
- (setq bmenu (assoc "%_Buffers" current-menubar)))
- (if (null bmenu)
- (setq bmenu (assoc "%_Buffers" default-menubar)))
- (if (null bmenu)
- (error "Can't find the Buffers menu"))
- (popup-menu bmenu)))
-
-(defun popup-menubar-menu (event)
- "Pop up a copy of menu that also appears in the menubar."
- (interactive "e")
- (let ((window (and (event-over-text-area-p event) (event-window event)))
- popup-menubar)
- (or window
- (error "Pointer must be in a normal window"))
- (select-window window)
- (and current-menubar (run-hooks 'activate-menubar-hook))
- ;; #### Instead of having to copy this just to safely get rid of
- ;; any nil what we should really do is fix up the internal menubar
- ;; code to just ignore nil if generating a popup menu
- (setq popup-menubar (delete nil (copy-sequence (or current-menubar
- default-menubar))))
- (popup-menu (cons "%_Menubar Menu" popup-menubar))
- ))
-
-(global-set-key 'button3 'popup-mode-menu)
-;; shift button3 and shift button2 are reserved for Hyperbole
-(global-set-key '(meta control button3) 'popup-buffer-menu)
-;; The following command is way too dangerous with Custom.
-;; (global-set-key '(meta shift button3) 'popup-menubar-menu)
-
-;; Here's a test of the cool new menu features (from Stig).
-
-;;(setq mode-popup-menu
-;; '("Test Popup Menu"
-;; :filter cdr
-;; ["this item won't appear because of the menu filter" ding t]
-;; "--:singleLine"
-;; "singleLine"
-;; "--:doubleLine"
-;; "doubleLine"
-;; "--:singleDashedLine"
-;; "singleDashedLine"
-;; "--:doubleDashedLine"
-;; "doubleDashedLine"
-;; "--:noLine"
-;; "noLine"
-;; "--:shadowEtchedIn"
-;; "shadowEtchedIn"
-;; "--:shadowEtchedOut"
-;; "shadowEtchedOut"
-;; "--:shadowDoubleEtchedIn"
-;; "shadowDoubleEtchedIn"
-;; "--:shadowDoubleEtchedOut"
-;; "shadowDoubleEtchedOut"
-;; "--:shadowEtchedInDash"
-;; "shadowEtchedInDash"
-;; "--:shadowEtchedOutDash"
-;; "shadowEtchedOutDash"
-;; "--:shadowDoubleEtchedInDash"
-;; "shadowDoubleEtchedInDash"
-;; "--:shadowDoubleEtchedOutDash"
-;; "shadowDoubleEtchedOutDash"
-;; ))
+\f
+;; misc
(defun xemacs-splash-buffer ()
"Redisplay XEmacs splash screen in a buffer."
(enable-menu-item-1 path t nil))
\f
+
+;;;;;;; popup menus
+
+(defvar global-popup-menu nil
+ "The global popup menu. This is present in all modes.
+See the function `popup-menu' for a description of menu syntax.")
+
+(defvar mode-popup-menu nil
+ "The mode-specific popup menu. Automatically buffer local.
+This is appended to the default items in `global-popup-menu'.
+See the function `popup-menu' for a description of menu syntax.")
+(make-variable-buffer-local 'mode-popup-menu)
+
+(defvar activate-popup-menu-hook nil
+ "Function or functions run before a mode-specific popup menu is made visible.
+These functions are called with no arguments, and should interrogate and
+modify the value of `global-popup-menu' or `mode-popup-menu' as desired.
+Note: this hook is only run if you use `popup-mode-menu' for activating the
+global and mode-specific commands; if you have your own binding for button3,
+this hook won't be run.")
+
+(defvar last-popup-menu-event nil
+ "The mouse event that invoked the last popup menu.
+NOTE: This is EXPERIMENTAL and may change at any time.")
+
+(defun popup-mode-menu (&optional event)
+ "Pop up a menu of global and mode-specific commands.
+The menu is computed by combining `global-popup-menu' and `mode-popup-menu'
+with any items derived from the `context-menu' property of the extent where the
+button was clicked."
+ (interactive "_e")
+ (setq last-popup-menu-event
+ (or (and event (button-event-p event) event)
+ (let* ((mouse-pos (mouse-position))
+ (win (car mouse-pos))
+ (x (cadr mouse-pos))
+ (y (cddr mouse-pos))
+ (edges (window-pixel-edges win))
+ (winx (first edges))
+ (winy (second edges))
+ (x (+ x winx))
+ (y (+ y winy)))
+ (make-event 'button-press
+ `(button 3 x ,x y ,y channel ,(window-frame win)
+ timestamp ,(current-event-timestamp
+ (cdfw-console win)))))))
+ (run-hooks 'activate-popup-menu-hook)
+ (let* ((context-window (and event (event-window event)))
+ (context-point (and event (event-point event)))
+ (context-extents (and context-window
+ context-point
+ (extents-at context-point
+ (window-buffer context-window)
+ 'context-menu)))
+ (context-menu-items
+ (apply 'append (mapcar #'(lambda (extent)
+ (extent-property extent 'context-menu))
+ context-extents))))
+ (popup-menu
+ (cond ((and global-popup-menu mode-popup-menu)
+ ;; Merge global-popup-menu and mode-popup-menu
+ (check-menu-syntax mode-popup-menu)
+ (let* ((title (car mode-popup-menu))
+ (items (cdr mode-popup-menu))
+ mode-filters)
+ ;; Strip keywords from local menu for attaching them at the top
+ (while (and items
+ (keywordp (car items)))
+ ;; Push both keyword and its argument.
+ (push (pop items) mode-filters)
+ (push (pop items) mode-filters))
+ (setq mode-filters (nreverse mode-filters))
+ ;; If mode-filters contains a keyword already present in
+ ;; `global-popup-menu', you will probably lose.
+ (append (list (car global-popup-menu))
+ mode-filters
+ (cdr global-popup-menu)
+ '("---" "---")
+ (if popup-menu-titles (list title))
+ (if popup-menu-titles '("---" "---"))
+ items
+ context-menu-items)))
+ (t
+ (append
+ (or mode-popup-menu
+ global-popup-menu
+ (error "No menu defined in this buffer"))
+ context-menu-items))))
+
+ (while (popup-up-p)
+ (dispatch-event (next-event)))
+
+ ))
+
+(defun popup-buffer-menu (event)
+ "Pop up a copy of the Buffers menu (from the menubar) where the mouse is clicked."
+ (interactive "e")
+ (let ((window (and (event-over-text-area-p event) (event-window event)))
+ (bmenu nil))
+ (or window
+ (error "Pointer must be in a normal window"))
+ (select-window window)
+ (if current-menubar
+ (setq bmenu (assoc "%_Buffers" current-menubar)))
+ (if (null bmenu)
+ (setq bmenu (assoc "%_Buffers" default-menubar)))
+ (if (null bmenu)
+ (error "Can't find the Buffers menu"))
+ (popup-menu bmenu)))
+
+(defun popup-menubar-menu (event)
+ "Pop up a copy of menu that also appears in the menubar."
+ (interactive "e")
+ (let ((window (and (event-over-text-area-p event) (event-window event)))
+ popup-menubar)
+ (or window
+ (error "Pointer must be in a normal window"))
+ (select-window window)
+ (and current-menubar (run-hooks 'activate-menubar-hook))
+ ;; #### Instead of having to copy this just to safely get rid of
+ ;; any nil what we should really do is fix up the internal menubar
+ ;; code to just ignore nil if generating a popup menu
+ (setq popup-menubar (delete nil (copy-sequence (or current-menubar
+ default-menubar))))
+ (popup-menu (cons "%_Menubar Menu" popup-menubar))
+ ))
+
+(defun menu-call-at-event (form &optional event default-behavior-fallback)
+ "Call FORM while temporarily setting point to the position in EVENT.
+NOTE: This is EXPERIMENTAL and may change at any time.
+
+FORM is called the way forms in menu specs are: i.e. if a symbol, it's called
+with `call-interactively', otherwise with `eval'. EVENT defaults to
+`last-popup-menu-event', making this function especially useful in popup
+menus. The buffer and point are set temporarily within a `save-excursion'.
+If EVENT is not a mouse event, or was not over a buffer, nothing
+happens unless DEFAULT-BEHAVIOR-FALLBACK is non-nil, in which case the
+FORM is called normally."
+ (or event (setq event last-popup-menu-event))
+ (let ((buf (event-buffer event))
+ (p (event-closest-point event)))
+ (cond ((and buf p (> p 0))
+ (save-excursion
+ (set-buffer buf)
+ (goto-char p)
+ (if (symbolp form)
+ (call-interactively form)
+ (eval form))))
+ (default-behavior-fallback
+ (if (symbolp form)
+ (call-interactively form)
+ (eval form))))))
+
+(global-set-key 'button3 'popup-mode-menu)
+;; shift button3 and shift button2 are reserved for Hyperbole
+(global-set-key '(meta control button3) 'popup-buffer-menu)
+;; The following command is way too dangerous with Custom.
+;; (global-set-key '(meta shift button3) 'popup-menubar-menu)
+
+;; Here's a test of the cool new menu features (from Stig).
+
+;;(setq mode-popup-menu
+;; '("Test Popup Menu"
+;; :filter cdr
+;; ["this item won't appear because of the menu filter" ding t]
+;; "--:singleLine"
+;; "singleLine"
+;; "--:doubleLine"
+;; "doubleLine"
+;; "--:singleDashedLine"
+;; "singleDashedLine"
+;; "--:doubleDashedLine"
+;; "doubleDashedLine"
+;; "--:noLine"
+;; "noLine"
+;; "--:shadowEtchedIn"
+;; "shadowEtchedIn"
+;; "--:shadowEtchedOut"
+;; "shadowEtchedOut"
+;; "--:shadowDoubleEtchedIn"
+;; "shadowDoubleEtchedIn"
+;; "--:shadowDoubleEtchedOut"
+;; "shadowDoubleEtchedOut"
+;; "--:shadowEtchedInDash"
+;; "shadowEtchedInDash"
+;; "--:shadowEtchedOutDash"
+;; "shadowEtchedOutDash"
+;; "--:shadowDoubleEtchedInDash"
+;; "shadowDoubleEtchedInDash"
+;; "--:shadowDoubleEtchedOutDash"
+;; "shadowDoubleEtchedOutDash"
+;; ))
+
(defun get-popup-menu-response (menu-desc &optional event)
"Pop up the given menu and wait for a response.
This blocks until the response is received, and returns the misc-user
(defcustom minibuffer-history-uniquify t
"*Non-nil means when adding an item to a minibuffer history, remove
-previous occurances of the same item from the history list first,
+previous occurrences of the same item from the history list first,
rather than just consing the new element onto the front of the list."
:type 'boolean
:group 'minibuffer)
current-minibuffer-point (point)))
(let ((narg (- minibuffer-history-position n))
(minimum (if minibuffer-default -1 0)))
+ ;; a weird special case here; when in repeat-complex-command, we're
+ ;; trying to edit the top command, and minibuffer-history-position
+ ;; points to 1, the next-to-top command. in this case, the top
+ ;; command in the history is suppressed in favor of the one being
+ ;; edited, and there is no more command below it, except maybe the
+ ;; default.
+ (if (and (zerop narg) (eq minibuffer-history-position
+ initial-minibuffer-history-position))
+ (setq minimum (1+ minimum)))
(cond ((< narg minimum)
(error (if minibuffer-default
"No following item in %s"
(progn
(insert current-minibuffer-contents)
(goto-char current-minibuffer-point))
- (let ((elt (if (>= narg 0)
+ (let ((elt (if (> narg 0)
(nth (1- minibuffer-history-position)
(symbol-value minibuffer-history-variable))
minibuffer-default)))
must-match initial-contents
completer)
(if (should-use-dialog-box-p)
- ;; this calls read-file-name-2
- (mouse-read-file-name-1 history prompt dir default must-match
- initial-contents completer)
+ (condition-case nil
+ (let ((file
+ (apply #'make-dialog-box
+ 'file `(:title ,(capitalize-string-as-title
+ ;; Kludge: Delete ": " off the end.
+ (replace-in-string prompt ": $" ""))
+ ,@(and dir (list :initial-directory
+ dir))
+ :file-must-exist ,must-match
+ ,@(and initial-contents
+ (list :initial-filename
+ initial-contents))))))
+ ;; hack -- until we implement reading a directory properly,
+ ;; allow a file as indicating the directory it's in
+ (if (and (eq completer 'read-directory-name-internal)
+ (not (file-directory-p file)))
+ (file-name-directory file)
+ file))
+ (unimplemented
+ ;; this calls read-file-name-2
+ (mouse-read-file-name-1 history prompt dir default must-match
+ initial-contents completer)
+ ))
(add-one-shot-hook
'minibuffer-setup-hook
(lambda ()
;; a specifier would be nice.
(set (make-local-variable 'frame-title-format)
(capitalize-string-as-title
- ;; Delete ": " off the end. There must be an easier way!
- (let ((end-pos (length prompt)))
- (if (and (> end-pos 0) (eq (aref prompt (1- end-pos)) ? ))
- (setq end-pos (1- end-pos)))
- (if (and (> end-pos 0) (eq (aref prompt (1- end-pos)) ?:))
- (setq end-pos (1- end-pos)))
- (substring prompt 0 end-pos))))
+ ;; Kludge: Delete ": " off the end.
+ (replace-in-string prompt ": $" "")))
;; ensure that killing the frame works right,
;; instead of leaving us in the minibuffer.
(add-local-hook 'delete-frame-hook
"Modeline customizations."
:group 'environment)
+(defcustom modeline-3d-p ;; added for the options menu
+ (let ((thickness
+ (specifier-instance modeline-shadow-thickness)))
+ (and (integerp thickness)
+ (> thickness 0)))
+ "Whether the default toolbar is globally visible. This option can be
+customized through the options menu."
+ :group 'display
+ :type 'boolean
+ :set #'(lambda (var val)
+ (if val
+ (set-specifier modeline-shadow-thickness 2)
+ (set-specifier modeline-shadow-thickness 0))
+ (redraw-modeline t)
+ (setq modeline-3d-p val))
+ )
+
(defcustom drag-divider-event-lag 150
"*The pause (in msecs) between divider drag events before redisplaying.
If this value is too small, dragging will be choppy because redisplay cannot
;; Copyright (C) 1988, 1992-4, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Tinker Systems
-;; Copyright (C) 1995, 1996 Ben Wing.
+;; Copyright (C) 1995, 1996, 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: mouse, dumped
;; This file is dumped with XEmacs (when window system support is compiled in).
+;;; Authorship:
+
+;; Probably originally derived from FSF 19 pre-release.
+;; much hacked upon by Jamie Zawinski and crew, pre-1994.
+;; (only mouse-motion stuff currently remains from that era)
+;; all mouse-track stuff completely rewritten by Ben Wing, 1995-1996.
+;; mouse-eval-sexp and *-inside-extent-p from Stig, 1995.
+;; vertical divider code c. 1998 from ?.
+
;;; Code:
(provide 'mouse)
(global-set-key '(control button1) 'mouse-track-insert)
(global-set-key '(control shift button1) 'mouse-track-delete-and-insert)
(global-set-key '(meta button1) 'mouse-track-do-rectangle)
-
-;; drops are now handled in dragdrop.el (ograf@fga.de)
-
-;; enable drag regions (ograf@fga.de)
-;; if button2 is dragged from within a region, this becomes a drop
-;;
-;; this must be changed to the new api
-(if (featurep '(or offix cde mswindows))
- (global-set-key 'button2 'mouse-drag-or-yank)
- (global-set-key 'button2 'mouse-yank))
+(global-set-key 'button2 'mouse-track)
(defgroup mouse nil
"Window system-independent mouse support."
(defun click-inside-extent-p (click extent)
"Return non-nil if the button event is within the primary selection-extent.
Return nil otherwise."
- ;; stig@hackvan.com
(let ((ewin (event-window click))
(epnt (event-point click)))
(and ewin
"Return t if point is within the bounds of the primary selection extent.
Return t is point is at the end position of the extent.
Return nil otherwise."
- ;; stig@hackvan.com
(and extent
(eq (current-buffer)
(extent-object extent))
(>= (extent-end-position extent) (point))))
(defun point-inside-selection-p ()
- ;; by Stig@hackvan.com
(or (point-inside-extent-p primary-selection-extent)
(point-inside-extent-p zmacs-region-extent)))
-(defun mouse-drag-or-yank (event)
- "Either drag or paste the current selection.
-If the variable `mouse-yank-at-point' is non-nil,
-move the cursor to the location of the click before pasting.
-This functions has to be improved. Currently it is just a (working) test."
- ;; by Oliver Graf <ograf@fga.de>
- (interactive "e")
- (if (click-inside-extent-p event zmacs-region-extent)
- ;; okay, this is a drag
- (cond ((featurep 'offix)
- (offix-start-drag-region
- event
- (extent-start-position zmacs-region-extent)
- (extent-end-position zmacs-region-extent)))
- ((featurep 'cde)
- ;; should also work with CDE
- (cde-start-drag-region event
- (extent-start-position zmacs-region-extent)
- (extent-end-position zmacs-region-extent)))
- (t (error "No offix or CDE support compiled in")))
- ;; no drag, call region-funct
- (and (not mouse-yank-at-point)
- (mouse-set-point event))
- (funcall mouse-yank-function))
- )
+(defun mouse-begin-drag-n-drop (event)
+ "Begin a drag-n-drop operation.
+EVENT should be the button event that initiated the drag.
+Returns whether a drag was begun."
+ ;; #### barely implemented.
+ (when (click-inside-selection-p event)
+ (cond ((featurep 'offix)
+ (offix-start-drag-region
+ event
+ (extent-start-position zmacs-region-extent)
+ (extent-end-position zmacs-region-extent))
+ t)
+ ((featurep 'cde)
+ ;; should also work with CDE
+ (cde-start-drag-region event
+ (extent-start-position zmacs-region-extent)
+ (extent-end-position zmacs-region-extent))
+ t))))
(defun mouse-eval-sexp (click force-window)
"Evaluate the sexp under the mouse. Usually, this is the last sexp before
you can use `mouse-eval-sexp' to interactively test code that acts upon a
buffer...something you cannot do with the standard `eval-last-sexp' function.
It's also fantastic for debugging regular expressions."
- ;; by Stig@hackvan.com
(interactive "e\nP")
(let (exp val result-str)
(setq exp (save-window-excursion
:type '(choice integer (const :tag "Disabled" nil))
:group 'mouse)
+(defcustom mouse-track-activate-strokes '(button1-double-click button2-click)
+ "List of mouse strokes that can cause \"activation\" of the text extent
+under the mouse. The exact meaning of \"activation\" is dependent on the
+text clicked on and the mode of the buffer, but typically entails actions
+such as following a hyperlink or selecting an entry in a completion buffer.
+
+Possible list entries are
+
+button1-click
+button1-double-click
+button1-triple-click
+button1-down
+button2-click
+button2-double-click
+button2-triple-click
+button2-down
+
+As a general rule, you should not use the \"-down\" values, because this
+makes it impossible to have other simultaneous actions, such as selection."
+ :type '(set
+ button1-click
+ button1-double-click
+ button1-triple-click
+ button1-down
+ button2-click
+ button2-double-click
+ button2-triple-click
+ button2-down)
+ :group 'mouse)
+
(defvar mouse-track-x-threshold '(face-width 'default)
"Minimum number of pixels in the X direction for a drag to be initiated.
If the mouse is moved more than either the X or Y threshold while the
'mouse-track-scroll-undefined
(copy-event event)))))
+(defun mouse-track-do-activate (event)
+ "Execute the activate function under EVENT, if any.
+Return true if the function was activated."
+ (let ((ex (extent-at-event event 'activate-function)))
+ (when ex
+ (funcall (extent-property ex 'activate-function)
+ event ex)
+ t)))
+
(defun mouse-track-run-hook (hook event &rest args)
;; ugh, can't use run-hook-with-args-until-success because we have
;; to get the value using symbol-value-in-buffer. Doing a
)
(defun mouse-track (event)
- "Make a selection with the mouse. This should be bound to a mouse button.
-The behavior of XEmacs during mouse selection is customizable using various
-hooks and variables: see `mouse-track-click-hook', `mouse-track-drag-hook',
+ "Generalized mouse-button handler. This should be bound to a mouse button.
+The behavior of this function is customizable using various hooks and
+variables: see `mouse-track-click-hook', `mouse-track-drag-hook',
`mouse-track-drag-up-hook', `mouse-track-down-hook', `mouse-track-up-hook',
`mouse-track-cleanup-hook', `mouse-track-multi-click-time',
`mouse-track-scroll-delay', `mouse-track-x-threshold', and
(disown-selection)))))
(setq default-mouse-track-down-event nil))))
+;; return t if the button or motion event involved the specified button.
+(defun default-mouse-track-event-is-with-button (event n)
+ (cond ((button-event-p event)
+ (= n (event-button event)))
+ ((motion-event-p event)
+ (memq (cdr
+ (assq n '((1 . button1) (2 . button2) (3 . button3)
+ (4 . button4) (5 . button5))))
+ (event-modifiers event)))))
+
(defun default-mouse-track-down-hook (event click-count)
- (setq default-mouse-track-down-event (copy-event event))
- nil)
+ (cond ((default-mouse-track-event-is-with-button event 1)
+ (if (and (memq 'button1-down mouse-track-activate-strokes)
+ (mouse-track-do-activate event))
+ t
+ (setq default-mouse-track-down-event (copy-event event))
+ nil))
+ ((default-mouse-track-event-is-with-button event 2)
+ (and (memq 'button2-down mouse-track-activate-strokes)
+ (mouse-track-do-activate event)))))
(defun default-mouse-track-cleanup-extents-hook ()
(remove-hook 'pre-command-hook 'default-mouse-track-cleanup-extents-hook)
(if (consp extent) ; rectangle-p
(mapcar func extent)
(if extent
- (funcall func extent))))))
+ (funcall func extent)))))
+ t)
(defun default-mouse-track-cleanup-extent ()
(let ((dead-func
(setq default-mouse-track-extent nil)))))
(defun default-mouse-track-drag-hook (event click-count was-timeout)
- (default-mouse-track-deal-with-down-event click-count)
- (default-mouse-track-set-point event default-mouse-track-window)
- (default-mouse-track-cleanup-extent)
- (default-mouse-track-next-move default-mouse-track-min-anchor
- default-mouse-track-max-anchor
- default-mouse-track-extent)
- t)
+ (cond ((default-mouse-track-event-is-with-button event 1)
+ (default-mouse-track-deal-with-down-event click-count)
+ (default-mouse-track-set-point event default-mouse-track-window)
+ (default-mouse-track-cleanup-extent)
+ (default-mouse-track-next-move default-mouse-track-min-anchor
+ default-mouse-track-max-anchor
+ default-mouse-track-extent)
+ t)
+ ((default-mouse-track-event-is-with-button event 2)
+ (mouse-begin-drag-n-drop event))))
(defun default-mouse-track-return-dragged-selection (event)
(default-mouse-track-cleanup-extent)
result))
(defun default-mouse-track-drag-up-hook (event click-count)
- (let ((result (default-mouse-track-return-dragged-selection event)))
- (if result
- (default-mouse-track-maybe-own-selection result 'PRIMARY)))
- t)
+ (when (default-mouse-track-event-is-with-button event 1)
+ (let ((result (default-mouse-track-return-dragged-selection event)))
+ (if result
+ (default-mouse-track-maybe-own-selection result 'PRIMARY)))
+ t))
(defun default-mouse-track-click-hook (event click-count)
- (default-mouse-track-drag-hook event click-count nil)
- (default-mouse-track-drag-up-hook event click-count)
- t)
+ (cond ((default-mouse-track-event-is-with-button event 1)
+ (if (and
+ (or (and (= click-count 1)
+ (memq 'button1-click
+ mouse-track-activate-strokes))
+ (and (= click-count 2)
+ (memq 'button1-double-click
+ mouse-track-activate-strokes))
+ (and (= click-count 3)
+ (memq 'button1-triple-click
+ mouse-track-activate-strokes)))
+ (mouse-track-do-activate event))
+ t
+ (default-mouse-track-drag-hook event click-count nil)
+ (default-mouse-track-drag-up-hook event click-count)
+ t))
+ ((default-mouse-track-event-is-with-button event 2)
+ (if (and
+ (or (and (= click-count 1)
+ (memq 'button2-click
+ mouse-track-activate-strokes))
+ (and (= click-count 2)
+ (memq 'button2-double-click
+ mouse-track-activate-strokes))
+ (and (= click-count 3)
+ (memq 'button2-triple-click
+ mouse-track-activate-strokes)))
+ (mouse-track-do-activate event))
+ t
+ (mouse-yank event)
+ t))))
+
(add-hook 'mouse-track-down-hook 'default-mouse-track-down-hook)
(add-hook 'mouse-track-drag-hook 'default-mouse-track-drag-hook)
;;
(defun drag-window-divider (event)
"Handle resizing windows by dragging window dividers.
-This is an intenal function, normally bound to button1 event in
+This is an internal function, normally bound to button1 event in
window-divider-map. You would not call it, but you may bind it to
other mouse buttons."
(interactive "e")
(if stuff
(intern stuff)
configure-mail-lock-method))
- "mail spool locking method used by thios instance of XEmacs.
+ "mail spool locking method used by this instance of XEmacs.
This must be one of the symbols in MAIL-LOCK-METHODS.")
(defun move-mail-spool (from to &optional buffer pop-password)
;; (setq args (cdr args)))))
\f
-;;; CCL dump staffs
-
-;; To avoid byte-compiler warning.
-(defvar ccl-code)
+;;; CCL dump stuff
;;;###autoload
(defun ccl-dump (ccl-code)
;; Return a CCL code in `ccl-code' at `ccl-current-ic'.
(defun ccl-get-next-code ()
+ (declare (special ccl-code))
(prog1
(aref ccl-code ccl-current-ic)
(setq ccl-current-ic (1+ ccl-current-ic))))
(let ((base (coding-system-base coding-system)))
(if (not eol-type)
base
- (if (= eol-type orig-eol-type)
+ (if (eq eol-type orig-eol-type)
coding-system
(setq orig-eol-type (coding-system-eol-type base))
(if (null orig-eol-type)
But, if this flag is non-nil, it displays them in echo area instead.")
(defvar input-method-exit-on-invalid-key nil
- "This flag controls the behaviour of an input method on invalid key input.
+ "This flag controls the behavior of an input method on invalid key input.
Usually, when a user types a key which doesn't start any character
handled by the input method, the key is handled by turning off the
input method temporarily. After that key, the input method is re-enabled.
(set-coding-category-system 'iso-lock-shift 'iso-2022-lock)
(set-coding-category-system 'no-conversion 'no-conversion)
+(setq-default buffer-file-coding-system 'iso-2022-8)
+
;;; mule-coding.el ends here
(defun add-menu (menu-path menu-name menu-items &optional before)
"See the function `add-submenu'."
- (or menu-name (error (gettext "must specify a menu name")))
- (or menu-items (error (gettext "must specify some menu items")))
+ (or menu-name (error "must specify a menu name"))
+ (or menu-items (error "must specify some menu items"))
(add-submenu menu-path (cons menu-name menu-items) before))
;; Can't make this obsolete. easymenu depends on it.
(make-compatible 'add-menu 'add-submenu)
;; Delete empty directories.
(if dirs
(let ( (orig-default-directory default-directory)
- directory files file )
+ ;; directory files file
+ )
;; Make sure we preserve the existing `default-directory'.
;; JV, why does this change the default directory? Does it indeed?
(unwind-protect
(mapcar
#'(lambda (reqd)
(let* ((reqd-package (package-get-package-provider reqd))
- (reqd-version (cadr reqd-package))
(reqd-name (car reqd-package)))
(if (null reqd-name)
(error "Unable to find a provider for %s" reqd))
(error "No package under cursor!")))
)))
-;;; "Why is there no standard function to do this?"
-(defun pui-popup-context-sensitive (event)
- (interactive "e")
- (save-excursion
- (set-buffer (event-buffer event))
- (goto-char (event-point event))
- (popup-menu pui-menu event)
- ;; I agree with dired.el - this is seriously bogus.
- (while (popup-menu-up-p)
- (dispatch-event (next-event)))))
-
(defvar pui-menu
'("Packages"
["Toggle install " pui-toggle-package-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))]
["Help" pui-help t]
["Quit" pui-quit t]))
+;;; "Why is there no standard function to do this?"
+(defun pui-popup-context-sensitive (event)
+ (interactive "e")
+ (save-excursion
+ (set-buffer (event-buffer event))
+ (goto-char (event-point event))
+ (popup-menu pui-menu event)
+ ;; I agree with dired.el - this is seriously bogus.
+ (while (popup-up-p)
+ (dispatch-event (next-event)))))
(defun list-packages-mode ()
"Symbols in the leftmost column:
;Go to a local news spool if its value is nil, in which case `gnus-nntp-server'
;should be set to `(system-name)'.")
-(defvar gnus-local-domain nil
- "*Your domain name without a host name: for example, \"ai.mit.edu\".
-The DOMAINNAME environment variable is used instead if defined.
-If the function `system-name' returns a fully qualified domain name,
-there is no need to set this variable.")
-
-(defvar gnus-local-organization nil
- "*The name of your organization, as a string.
-The `ORGANIZATION' environment variable is used instead if defined.")
-
(defvar mh-progs nil
"Directory containing MH commands.")
(defvar rmail-file-name (purecopy "~/RMAIL")
"Name of user's primary mail file.")
-(defvar gnus-startup-file (purecopy "~/.newsrc")
- "The file listing groups to which user is subscribed.
-Will use `gnus-startup-file'-SERVER instead if exists.")
-
(defconst rmail-spool-directory nil
"Name of directory used by system mailer for delivering new mail.
Its name should end with a slash.")
"Generic printing support."
:group 'wp)
-(defcustom printer-name nil ; "Okidata OL610e/PS PostScript"
+(defcustom printer-name nil
"*Name of printer to print to.
If nil, use default.
-Under MS Windows, this can have the form `\\\\STOLI\\HP-345-PS'."
+Under Windows, use `mswindows-printer-list' to get names of installed
+printers."
:type 'string
:group 'printing)
buffer, or the `ps-print' package is used to pretty-print the buffer to a
PostScript printer. Under MS Windows, the built-in printing support is used."
(cond ((valid-specifier-tag-p 'msprinter)
- (or (stringp printer-name)
- (error "Please set `printer-name'"))
(let (d f)
(setq buf (decode-buffer buf))
(unwind-protect
(Transmission Control Protocol) and 'udp (User Datagram Protocol) are
supported. When omitted, 'tcp is assumed.
-Ouput via `process-send-string' and input via buffer or filter (see
+Output via `process-send-string' and input via buffer or filter (see
`set-process-filter') are stream-oriented. That means UDP datagrams are
not guaranteed to be sent and received in discrete packets. (But small
datagrams around 500 bytes that are not truncated by `process-send-string'
(defun shell-quote-argument (argument)
"Quote an argument for passing as argument to an inferior shell."
(if (and (eq system-type 'windows-nt)
- ;; #### this is a temporary hack. a better solution needs
- ;; futzing with the c code. i'll do this shortly.
(let ((progname (downcase (file-name-nondirectory
shell-file-name))))
(or (equal progname "command.com")
(equal progname "cmd.exe"))))
- argument
+ ;; the expectation is that you can take the result of
+ ;; shell-quote-argument and pass it to as an arg to
+ ;; (start-process shell-quote-argument ...) and have it end
+ ;; up as-is in the program's argv[] array. to do this, we
+ ;; need to protect against both the shell's and the program's
+ ;; quoting conventions (and our own conventions in
+ ;; mswindows-construct-process-command-line!). Putting quotes
+ ;; around shell metachars gets through the last two, and applying
+ ;; the normal VC runtime quoting works with practically all apps.
+ (mswindows-quote-one-vc-runtime-arg argument t)
;; Quote everything except POSIX filename characters.
;; This should be safe enough even for really weird shells.
(let ((result "") (start 0) end)
;; XEmacs
(defun perform-replace-next-event (event)
- (if isearch-highlight
+ (if search-highlight
(let ((aborted t))
(unwind-protect
(progn
The argument TYPE (default `PRIMARY') says which selection,
and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
says how to convert the data. Returns NIL if there is no selection"
- (condition-case err (get-selection type data-type) (t nil)))
+ (condition-case nil (get-selection type data-type) (t nil)))
(defun get-selection (&optional type data-type)
"Return the value of a window-system selection.
that can be converted using the function corresponding to DATA-TYPE
in `select-converter-alist'---strings are the usual choice, but
other types may be permissible depending on the DATA-TYPE parameter
-(if DATA-TYPE is not supplied, the default behaviour is window
+(if DATA-TYPE is not supplied, the default behavior is window
system specific, but strings are always accepted).
HOW-TO-ADD may be any of the following:
or an overlay. In these cases, the selection is considered to be the text
between the markers *at whatever time the selection is examined* (note
that the window system clipboard does not necessarily duplicate this
-behaviour - it doesn't on mswindows for example).
+behavior - it doesn't on mswindows for example).
Thus, editing done in the buffer after you specify the selection
can alter the effective value of the selection.
;;; Functions to convert the selection into various other selection
;;; types.
-;; These two functions get called by C code...
+;; These next three functions get called by C code...
(defun select-convert-in (selection type value)
"Attempt to convert the specified external VALUE to the specified DATA-TYPE,
for the specified SELECTION. Return nil if this is impossible, or a
(when handler-fn
(apply handler-fn (list selection type value))))))
+(defun select-coerce (selection type value)
+ "Attempt to convert the specified internal VALUE to a representation
+suitable for return from `get-selection' in the specified DATA-TYPE. Return
+nil if this is impossible, or a suitable representation otherwise."
+ (when value
+ (let ((handler-fn (cdr (assq type selection-coercion-alist))))
+ (when handler-fn
+ (apply handler-fn (list selection type value))))))
+
;; The rest of the functions on this "page" are conversion handlers,
;; append handlers and buffer-kill handlers.
(defun select-convert-to-text (selection type value)
(buffer-substring (car value) (cdr value)))))
(t nil)))
+(defun select-coerce-to-text (selection type value)
+ (select-convert-to-text selection type value))
+
(defun select-convert-from-text (selection type value)
(when (stringp value)
value))
(defun select-convert-to-string (selection type value)
(let ((outval (select-convert-to-text selection type value)))
- ;; force the string to be not in Compound Text format.
+ ;; force the string to be not in Compound Text format. This grubby
+ ;; hack will go soon, to be replaced by a more general mechanism.
(if (stringp outval)
(cons 'STRING outval)
outval)))
(user-full-name))
(defun select-convert-to-class (selection type size)
- x-emacs-application-class)
+ (symbol-value 'x-emacs-application-class))
;; We do not try to determine the name Emacs was invoked with,
;; because it is not clean for a program's behavior to depend on that.
;;; Buffer kill handlers
-;; #### Should this function take the text *out* of the buffer that's
-;; being killed? Or should it do what the original code did and just
-;; destroy the selection?
(defun select-buffer-killed-default (selection type value buffer)
;; This handler gets used if the type is "nil".
(cond ((extentp value)
- (unless (eq (extent-object value) buffer)
+ (if (eq (extent-object value) buffer)
+ ; If this selection is on the clipboard, grab it quick
+ (when (eq selection 'CLIPBOARD)
+ (save-excursion
+ (set-buffer (extent-object value))
+ (save-restriction
+ (widen)
+ (buffer-substring (extent-start-position value)
+ (extent-end-position value)))))
value))
((markerp value)
(unless (eq (marker-buffer value) buffer)
((and (consp value)
(markerp (car value))
(markerp (cdr value)))
- (unless (or (eq (marker-buffer (car value)) buffer)
- (eq (marker-buffer (cdr value)) buffer))
- value))
+ (if (or (eq (marker-buffer (car value)) buffer)
+ (eq (marker-buffer (cdr value)) buffer))
+ ; If this selection is on the clipboard, grab it quick
+ (when (eq selection 'CLIPBOARD)
+ (save-excursion
+ (set-buffer (marker-buffer (car value)))
+ (save-restriction
+ (widen)
+ (buffer-substring (car value) (cdr value)))))
+ value))
(t value)))
(defun select-buffer-killed-text (selection type value buffer)
(CF_TEXT . select-convert-from-cf-text)
))
+;; Types listed here have special coercion functions that can munge
+;; other types. This can also be used to add special features - e.g.
+;; being able to pass a region or a cons of markers to own-selection,
+;; but getting the *current* text in the region back when calling
+;; get-selection.
+;;
+;; Any function listed in here *will be called* whenever a value of
+;; its type is retrieved from the internal selection cache, or when
+;; no suitable values could be found in which case XEmacs looks for
+;; values with types listed in selection-coercible-types.
+(setq selection-coercion-alist
+ '((TEXT . select-coerce-to-text)
+ (STRING . select-coerce-to-text)
+ (COMPOUND_TEXT . select-coerce-to-text)
+ (CF_TEXT . select-coerce-to-text)))
+
;; Types listed here can be appended by own-selection
(setq selection-appender-alist
'((nil . select-append-default)
(forward-line arg)))
arg))
-(eval-when-compile
- ;; avoid byte-compiler warnings...
- (defvar start1)
- (defvar start2)
- (defvar end1)
- (defvar end2))
+(defun transpose-line-up (arg)
+ "Move current line one line up, leaving point at beginning of that line.
+This can be run repeatedly to move to current line up a number of lines."
+ (interactive "*p")
+ ;; Move forward over a line,
+ ;; but create a newline if none exists yet.
+ (end-of-line)
+ (if (eobp)
+ (newline)
+ (forward-char 1))
+ (transpose-lines (- arg))
+ (forward-line -1))
+
+(defun transpose-line-down (arg)
+ "Move current line one line down, leaving point at beginning of that line.
+This can be run repeatedly to move to current line down a number of lines."
+ (interactive "*p")
+ ;; Move forward over a line,
+ ;; but create a newline if none exists yet.
+ (end-of-line)
+ (if (eobp)
+ (newline)
+ (forward-char 1))
+ (transpose-lines arg)
+ (forward-line -1))
-; start[12] and end[12] used in transpose-subr-1 below
(defun transpose-subr (mover arg)
(let (start1 end1 start2 end2)
- (if (= arg 0)
- (progn
- (save-excursion
- (funcall mover 1)
- (setq end2 (point))
- (funcall mover -1)
- (setq start2 (point))
- (goto-char (mark t)) ; XEmacs
- (funcall mover 1)
- (setq end1 (point))
- (funcall mover -1)
- (setq start1 (point))
- (transpose-subr-1))
- (exchange-point-and-mark t))) ; XEmacs
- (while (> arg 0)
- (funcall mover -1)
- (setq start1 (point))
- (funcall mover 1)
- (setq end1 (point))
- (funcall mover 1)
- (setq end2 (point))
- (funcall mover -1)
- (setq start2 (point))
- (transpose-subr-1)
- (goto-char end2)
- (setq arg (1- arg)))
- (while (< arg 0)
- (funcall mover -1)
- (setq start2 (point))
- (funcall mover -1)
- (setq start1 (point))
- (funcall mover 1)
- (setq end1 (point))
- (funcall mover 1)
- (setq end2 (point))
- (transpose-subr-1)
- (setq arg (1+ arg)))))
-
-; start[12] and end[12] used free
-(defun transpose-subr-1 ()
- (if (> (min end1 end2) (max start1 start2))
- (error "Don't have two things to transpose"))
- (let ((word1 (buffer-substring start1 end1))
- (word2 (buffer-substring start2 end2)))
- (delete-region start2 end2)
- (goto-char start2)
- (insert word1)
- (goto-char (if (< start1 start2) start1
- (+ start1 (- (length word1) (length word2)))))
- (delete-char (length word1))
- (insert word2)))
+ ;; XEmacs -- use flet instead of defining a separate function and
+ ;; relying on dynamic scope!!!
+ (flet ((transpose-subr-1 ()
+ (if (> (min end1 end2) (max start1 start2))
+ (error "Don't have two things to transpose"))
+ (let ((word1 (buffer-substring start1 end1))
+ (word2 (buffer-substring start2 end2)))
+ (delete-region start2 end2)
+ (goto-char start2)
+ (insert word1)
+ (goto-char (if (< start1 start2) start1
+ (+ start1 (- (length word1) (length word2)))))
+ (delete-char (length word1))
+ (insert word2))))
+ (if (= arg 0)
+ (progn
+ (save-excursion
+ (funcall mover 1)
+ (setq end2 (point))
+ (funcall mover -1)
+ (setq start2 (point))
+ (goto-char (mark t)) ; XEmacs
+ (funcall mover 1)
+ (setq end1 (point))
+ (funcall mover -1)
+ (setq start1 (point))
+ (transpose-subr-1))
+ (exchange-point-and-mark t))) ; XEmacs
+ (while (> arg 0)
+ (funcall mover -1)
+ (setq start1 (point))
+ (funcall mover 1)
+ (setq end1 (point))
+ (funcall mover 1)
+ (setq end2 (point))
+ (funcall mover -1)
+ (setq start2 (point))
+ (transpose-subr-1)
+ (goto-char end2)
+ (setq arg (1- arg)))
+ (while (< arg 0)
+ (funcall mover -1)
+ (setq start2 (point))
+ (funcall mover -1)
+ (setq start1 (point))
+ (funcall mover 1)
+ (setq end1 (point))
+ (funcall mover 1)
+ (setq end2 (point))
+ (transpose-subr-1)
+ (setq arg (1+ arg))))))
+
\f
(defcustom comment-column 32
"*Column to indent right-margin comments to.
;Turned off because it makes dbx bomb out.
(setq blink-paren-function 'blink-matching-open)
\f
-(eval-when-compile (defvar myhelp)) ; suppress compiler warning
;; XEmacs: Some functions moved to cmdloop.el:
;; keyboard-quit
(let* ((var (read-variable "Set variable: "))
;; #### - yucky code replication here. This should use something
;; from help.el or hyper-apropos.el
- (minibuffer-help-form
- '(funcall myhelp))
(myhelp
#'(lambda ()
(with-output-to-temp-buffer "*Help*"
(save-excursion
(set-buffer standard-output)
(help-mode))
- nil))))
+ nil)))
+ (minibuffer-help-form
+ '(funcall myhelp)))
(list var
(let ((prop (get var 'variable-interactive)))
(if prop
(setq warning-marker (make-marker))
(set-marker warning-marker 1 buffer))
(if temp-buffer-show-function
- (let ((show-buffer (get-buffer-create "*Warnings-Show*")))
- (save-excursion
- (set-buffer show-buffer)
- (setq buffer-read-only nil)
- (erase-buffer))
- (save-excursion
- (set-buffer buffer)
- (copy-to-buffer show-buffer
- (marker-position warning-marker)
- (point-max)))
- (funcall temp-buffer-show-function show-buffer))
+ (progn
+ (funcall temp-buffer-show-function buffer)
+ (mapc #'(lambda (win) (set-window-start win warning-marker))
+ (windows-of-buffer buffer nil t)))
(set-window-start (display-buffer buffer) warning-marker))
(set-marker warning-marker (point-max buffer) buffer)))
(cond ((featurep 'infodock) "InfoDock")
((featurep 'xemacs) "XEmacs")
(t "Emacs")))
+
+(defun debug-print (format &rest args)
+ "Send a string to the debugging output.
+The string is formatted using (apply #'format FORMAT ARGS)."
+ (princ (apply #'format format args) 'external-debugging-output))
;;; simple.el ends here
;;We do that if this regexp matches the locale name
;;specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
-(defvar mail-host-address nil
- "*Name of this machine, for purposes of naming users.")
+(defcustom mail-host-address nil
+ "*Name of this machine, for purposes of naming users."
+ :type 'string
+ :group 'mail)
-(defvar user-mail-address nil
+(defcustom user-mail-address nil
"*Full mailing address of this user.
This is initialized based on `mail-host-address',
-after your init file is read, in case it sets `mail-host-address'.")
+after your init file is read, in case it sets `mail-host-address'."
+ :type 'string
+ :group 'mail)
(defvar auto-save-list-file-prefix "~/.saves-"
"Prefix for generating auto-save-list-file-name.
(catch 'found
(dolist (file user-init-file-base-list)
(let ((expanded (expand-file-name file init-directory)))
- (when (file-exists-p expanded)
+ (when (file-readable-p expanded)
(throw 'found expanded)))))))
(defun find-user-home-directory-init-file (&optional home-directory)
(catch 'found
(dolist (file user-home-init-file-base-list)
(let ((expanded (expand-file-name file home-directory)))
- (when (file-exists-p expanded)
+ (when (file-readable-p expanded)
(throw 'found expanded))))
nil)))
"Ask user if she wants to migrate the init file(s) to new location."
(if (and (not load-home-init-file)
(not (find-user-init-directory-init-file user-init-directory))
- (file-exists-p user-init-file))
+ (stringp user-init-file)
+ (file-readable-p user-init-file))
(if (with-output-to-temp-buffer (help-buffer-name nil)
(progn
(princ "XEmacs recommends that the initialization code in
(defun load-user-init-file ()
"This function actually reads the init file."
- (if (or user-init-file
- (setq user-init-file (find-user-init-file user-init-directory)))
+ (if (not user-init-file)
+ (setq user-init-file
+ (find-user-init-file user-init-directory)))
+ (if (and user-init-file
+ (file-readable-p user-init-file))
(load user-init-file t t t))
(if (not custom-file)
(setq custom-file (make-custom-file-name user-init-file)))
- (if (and (not (string= custom-file user-init-file))
- (file-exists-p custom-file))
+ (if (and custom-file
+ (or (not user-init-file)
+ (not (string= custom-file user-init-file)))
+ (file-readable-p custom-file))
(load custom-file t t t))
(unless inhibit-default-init
(let ((inhibit-startup-message nil))
(setplist new (copy-list (symbol-plist symbol))))
new))
+(defun set-symbol-value-in-buffer (sym val buffer)
+ "Set the value of SYM to VAL in BUFFER. Useful with buffer-local variables.
+If SYM has a buffer-local value in BUFFER, or will have one if set, this
+function allows you to set the local value.
+
+NOTE: At some point, this will be moved into C and will be very fast."
+ (with-current-buffer buffer
+ (set sym val)))
+
;;;; String functions.
;; XEmacs
"Replace all matches in STR for REGEXP with NEWTEXT string,
and returns the new string.
Optional LITERAL non-nil means do a literal replacement.
-Otherwise treat \\ in NEWTEXT string as special:
- \\& means substitute original matched text,
- \\N means substitute match for \(...\) number N,
- \\\\ means insert one \\."
+Otherwise treat `\\' in NEWTEXT as special:
+ `\\&' in NEWTEXT means substitute original matched text.
+ `\\N' means substitute what matched the Nth `\\(...\\)'.
+ If Nth parens didn't match, substitute nothing.
+ `\\\\' means insert one `\\'.
+ `\\u' means upcase the next character.
+ `\\l' means downcase the next character.
+ `\\U' means begin upcasing all following characters.
+ `\\L' means begin downcasing all following characters.
+ `\\E' means terminate the effect of any `\\U' or `\\L'."
(check-argument-type 'stringp str)
(check-argument-type 'stringp newtext)
- (let ((rtn-str "")
- (start 0)
- (special)
- match prev-start)
- (while (setq match (string-match regexp str start))
- (setq prev-start start
- start (match-end 0)
- rtn-str
- (concat
- rtn-str
- (substring str prev-start match)
- (cond (literal newtext)
- (t (mapconcat
- (lambda (c)
- (if special
- (progn
- (setq special nil)
- (cond ((eq c ?\\) "\\")
- ((eq c ?&)
- (substring str
- (match-beginning 0)
- (match-end 0)))
- ((and (>= c ?0) (<= c ?9))
- (if (> c (+ ?0 (length
- (match-data))))
- ;; Invalid match num
- (error "Invalid match num: %c" c)
- (setq c (- c ?0))
- (substring str
- (match-beginning c)
- (match-end c))))
- (t (char-to-string c))))
- (if (eq c ?\\) (progn (setq special t) nil)
- (char-to-string c))))
- newtext ""))))))
- (concat rtn-str (substring str start))))
+ (if (> (length str) 50)
+ (with-temp-buffer
+ (insert str)
+ (goto-char 1)
+ (while (re-search-forward regexp nil t)
+ (replace-match newtext t literal))
+ (buffer-string))
+ (let ((start 0) newstr)
+ (while (string-match regexp str start)
+ (setq newstr (replace-match newtext t literal str)
+ start (+ (match-end 0) (- (length newstr) (length str)))
+ str newstr))
+ str)))
(defun split-string (string &optional pattern)
"Return a list of substrings of STRING which are separated by PATTERN.
\f
;;; Error functions
-(defun error (&rest args)
- "Signal an error, making error message by passing all args to `format'.
-This error is not continuable: you cannot continue execution after the
-error using the debugger `r' command. See also `cerror'."
- (while t
- (apply 'cerror args)))
+(defun error (datum &rest args)
+ "Signal a non-continuable error.
+DATUM should normally be an error symbol, i.e. a symbol defined using
+`define-error'. ARGS will be made into a list, and DATUM and ARGS passed
+as the two arguments to `signal', the most basic error handling function.
-(defun cerror (&rest args)
+This error is not continuable: you cannot continue execution after the
+error using the debugger `r' command. See also `cerror'.
+
+The correct semantics of ARGS varies from error to error, but for most
+errors that need to be generated in Lisp code, the first argument
+should be a string describing the *context* of the error (i.e. the
+exact operation being performed and what went wrong), and the remaining
+arguments or \"frobs\" (most often, there is one) specify the
+offending object(s) and/or provide additional details such as the exact
+error when a file error occurred, e.g.:
+
+-- the buffer in which an editing error occurred.
+-- an invalid value that was encountered. (In such cases, the string
+ should describe the purpose or \"semantics\" of the value [e.g. if the
+ value is an argument to a function, the name of the argument; if the value
+ is the value corresponding to a keyword, the name of the keyword; if the
+ value is supposed to be a list length, say this and say what the purpose
+ of the list is; etc.] as well as specifying why the value is invalid, if
+ that's not self-evident.)
+-- the file in which an error occurred. (In such cases, there should be a
+ second frob, probably a string, specifying the exact error that occurred.
+ This does not occur in the string that precedes the first frob, because
+ that frob describes the exact operation that was happening.
+
+For historical compatibility, DATUM can also be a string. In this case,
+DATUM and ARGS are passed together as the arguments to `format', and then
+an error is signalled using the error symbol `error' and formatted string.
+Although this usage of `error' is very common, it is deprecated because it
+totally defeats the purpose of having structured errors. There is now
+a rich set of defined errors you can use:
+
+error
+ syntax-error
+ invalid-read-syntax
+ list-formation-error
+ malformed-list
+ malformed-property-list
+ circular-list
+ circular-property-list
+
+ invalid-argument
+ wrong-type-argument
+ args-out-of-range
+ wrong-number-of-arguments
+ invalid-function
+ no-catch
+
+ invalid-state
+ void-function
+ cyclic-function-indirection
+ void-variable
+ cyclic-variable-indirection
+
+ invalid-operation
+ invalid-change
+ setting-constant
+ editing-error
+ beginning-of-buffer
+ end-of-buffer
+ buffer-read-only
+ io-error
+ end-of-file
+ arith-error
+ range-error
+ domain-error
+ singularity-error
+ overflow-error
+ underflow-error
+
+The five most common errors you will probably use or base your new
+errors off of are `syntax-error', `invalid-argument', `invalid-state',
+`invalid-operation', and `invalid-change'. Note the semantic differences:
+
+-- `syntax-error' is for errors in complex structures: parsed strings, lists,
+ and the like.
+-- `invalid-argument' is for errors in a simple value. Typically, the entire
+ value, not just one part of it, is wrong.
+-- `invalid-state' means that some settings have been changed in such a way
+ that their current state is unallowable. More and more, code is being
+ written more carefully, and catches the error when the settings are being
+ changed, rather than afterwards. This leads us to the next error:
+-- `invalid-change' means that an attempt is being made to change some settings
+ into an invalid state. `invalid-change' is a type of `invalid-operation'.
+-- `invalid-operation' refers to all cases where code is trying to do something
+ that's disallowed. This includes file errors, buffer errors (e.g. running
+ off the end of a buffer), `invalid-change' as just mentioned, and
+ arithmetic errors.
+
+See also `cerror', `signal', and `signal-error'."
+ (while t (apply
+ 'cerror datum args)))
+
+(defun cerror (datum &rest args)
"Like `error' but signals a continuable error."
- (signal 'error (list (apply 'format args))))
+ (cond ((stringp datum)
+ (signal 'error (list (apply 'format datum args))))
+ ((defined-error-p datum)
+ (signal datum args))
+ (t
+ (error 'invalid-argument "datum not string or error symbol" datum))))
(defmacro check-argument-type (predicate argument)
"Check that ARGUMENT satisfies PREDICATE.
-If not, signal a continuable `wrong-type-argument' error until the
-returned value satisfies PREDICATE, and assign the returned value
-to ARGUMENT."
- `(if (not (,(eval predicate) ,argument))
- (setq ,argument
- (wrong-type-argument ,predicate ,argument))))
+This is a macro, and ARGUMENT is not evaluated. If ARGUMENT is an lvalue,
+this function signals a continuable `wrong-type-argument' error until the
+returned value satisfies PREDICATE, and assigns the returned value
+to ARGUMENT. Otherwise, this function signals a non-continuable
+`wrong-type-argument' error if the returned value does not satisfy PREDICATE."
+ (if (symbolp argument)
+ `(if (not (,(eval predicate) ,argument))
+ (setq ,argument
+ (wrong-type-argument ,predicate ,argument)))
+ `(if (not (,(eval predicate) ,argument))
+ (signal-error 'wrong-type-argument (list ,predicate ,argument)))))
(defun signal-error (error-symbol data)
"Signal a non-continuable error. Args are ERROR-SYMBOL, and associated DATA.
(or conds (signal-error 'error (list "Not an error symbol" error-sym)))
(put error-sym 'error-conditions (cons error-sym conds))))
+(defun defined-error-p (sym)
+ "Returns non-nil if SYM names a currently-defined error."
+ (and (symbolp sym) (not (null (get sym 'error-conditions)))))
+
;;;; Miscellanea.
;; This is now in C.
(require 'gdbsrc)
(call-interactively 'gdbsrc)))
-(defvar compile-command)
-(defvar toolbar-compile-already-run nil)
-
(defun toolbar-compile ()
"Run compile without having to touch the keyboard."
(interactive)
+ (declare (special compile-command toolbar-compile-already-run))
(require 'compile)
- (if toolbar-compile-already-run
+ (if (boundp 'toolbar-compile-already-run)
(compile compile-command)
(setq toolbar-compile-already-run t)
(if (should-use-dialog-box-p)
- (popup-dialog-box
- `(,(concat "Compile:\n " compile-command)
- ["Compile" (compile compile-command) t]
- ["Edit command" compile t]
- nil
- ["Cancel" (message "Quit") t]))
+ (make-dialog-box 'question
+ :question (concat "Compile:\n " compile-command)
+ :buttons
+ '(["Compile" (compile compile-command) t]
+ ["Edit command" compile t]
+ nil
+ ["Cancel" (message "Quit") t]))
(compile compile-command))))
;;
;;; update-elc.el --- Bytecompile out-of-date dumped files
;; Copyright (C) 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1996 Unknown
+;; Copyright (C) 1996 Sun Microsystems, Inc.
+;; Author: Ben Wing <ben@xemacs.org>, Steven L Baur <steve@xemacs.org>
;; Maintainer: XEmacs Development Team
;; Keywords: internal
;; (the idea here is that you can bootstrap if your .ELC files
;; are missing or badly out-of-date)
+;; See also update-elc-2.el
+
;;; Code:
(defvar processed nil)
;;; dialog-box versions [XEmacs]
(defun ask-user-about-lock-dbox (fn opponent)
- (let ((echo-keystrokes 0)
- (dbox
- (cons
- (format "%s is locking %s\n
+ (let ((echo-keystrokes 0))
+ (make-dialog-box
+ 'question
+ :question (format "%s is locking %s\n
It has been detected that you want to modify a file that
someone else has already started modifying in XEmacs."
- opponent fn)
- '(["Steal Lock\n\nThe other user will\nbecome the intruder" steal t]
- ["Proceed\n\nEdit file at your own\n\(and the other user's) risk"
- proceed t]
- nil
- ["Abort\n\nDon't modify the buffer\n" yield t]))))
- (popup-dialog-box dbox)
+ opponent fn)
+ :buttons
+ '(["Steal Lock\n\nThe other user will\nbecome the intruder" steal t]
+ ["Proceed\n\nEdit file at your own\n\(and the other user's) risk"
+ proceed t]
+ nil
+ ["Abort\n\nDon't modify the buffer\n" yield t]))
(catch 'aual-done
(while t
(let ((event (next-command-event)))
- (cond ((and (misc-user-event-p event) (eq (event-object event) 'proceed))
+ (cond ((and (misc-user-event-p event)
+ (eq (event-object event) 'proceed))
(throw 'aual-done nil))
- ((and (misc-user-event-p event) (eq (event-object event) 'steal))
+ ((and (misc-user-event-p event)
+ (eq (event-object event) 'steal))
(throw 'aual-done t))
- ((and (misc-user-event-p event) (eq (event-object event) 'yield))
+ ((and (misc-user-event-p event)
+ (eq (event-object event) 'yield))
(signal 'file-locked (list "File is locked" fn opponent)))
((and (misc-user-event-p event)
(eq (event-object event) 'menu-no-selection-hook))
(signal 'quit nil))
+ ;; safety check, so we're not endlessly stuck when no
+ ;; dialog box up
+ ((not (popup-up-p))
+ (signal 'quit nil))
((button-release-event-p event) ;; don't beep twice
nil)
(t
(message "please answer the dialog box"))))))))
(defun ask-user-about-supersession-threat-dbox (fn)
- (let ((echo-keystrokes 0)
- (dbox
- (cons
- (format "File %s has changed on disk
+ (let ((echo-keystrokes 0))
+ (make-dialog-box
+ 'question
+ :question
+ (format "File %s has changed on disk
since its buffer was last read in or saved.
Do you really want to edit the buffer? " fn)
- '(["Yes\n\nEdit the buffer anyway,\nignoring the disk file"
- proceed t]
- ["No\n\nDon't modify the buffer\n" yield t]
- nil
- ["No\n\nDon't modify the buffer\nbut revert it" revert t]
- ))))
- (popup-dialog-box dbox)
+ :buttons
+ '(["Yes\n\nEdit the buffer anyway,\nignoring the disk file"
+ proceed t]
+ ["No\n\nDon't modify the buffer\n" yield t]
+ nil
+ ["No\n\nDon't modify the buffer\nbut revert it" revert t]
+ ))
(catch 'auast-done
(while t
(let ((event (next-command-event)))
((and (misc-user-event-p event)
(eq (event-object event) 'menu-no-selection-hook))
(signal 'quit nil))
+ ;; safety check, so we're not endlessly stuck when no
+ ;; dialog box up
+ ((not (popup-up-p))
+ (signal 'quit nil))
((button-release-event-p event) ;; don't beep twice
nil)
(t
return nil (edit the file even though it is locked).
You can rewrite it to use any criterion you like to choose which one to do."
(discard-input)
- (if (and (fboundp 'popup-dialog-box)
- (or (button-press-event-p last-command-event)
- (button-release-event-p last-command-event)
- (misc-user-event-p last-command-event)))
+ (if (should-use-dialog-box-p)
(ask-user-about-lock-dbox fn opponent)
(ask-user-about-lock-minibuf fn opponent)))
You can rewrite this to use any criterion you like to choose which one to do.
The buffer in question is current when this function is called."
(discard-input)
- (if (and (fboundp 'popup-dialog-box)
- (or (button-press-event-p last-command-event)
- (button-release-event-p last-command-event)
- (misc-user-event-p last-command-event)))
+ (if (should-use-dialog-box-p)
(ask-user-about-supersession-threat-dbox fn)
(ask-user-about-supersession-threat-minibuf fn)))
(defun widget-url-link-action (widget &optional event)
"Open the url specified by WIDGET."
- (if (boundp 'browse-url-browser-function)
- (funcall browse-url-browser-function (widget-value widget))
+ (if (fboundp 'browse-url)
+ (browse-url (widget-value widget))
(error "Cannot follow URLs in this XEmacs")))
;;; The `function-link' Widget.
\f
;;;;;;;;;;;;; display-buffer, moved here from C. Hallelujah.
+(make-variable-buffer-local '__buffer-dedicated-frame)
+
+(defun buffer-dedicated-frame (&optional buffer)
+ "Return the frame dedicated to this BUFFER, or nil if there is none.
+No argument or nil as argument means use current buffer as BUFFER."
+ (let ((buffer (decode-buffer buffer)))
+ (let ((frame (symbol-value-in-buffer '__buffer-dedicated-frame buffer)))
+ ;; XEmacs addition: if the frame is dead, silently make it go away.
+ (when (and (framep frame) (not (frame-live-p frame)))
+ (with-current-buffer buffer
+ (setq __buffer-dedicated-frame nil))
+ (setq frame nil))
+ frame)))
+
+(defun set-buffer-dedicated-frame (buffer frame)
+ "For this BUFFER, set the FRAME dedicated to it.
+FRAME must be a frame or nil."
+ (let ((buffer (decode-buffer buffer)))
+ (and frame
+ (check-argument-type #'frame-live-p frame))
+ (with-current-buffer buffer
+ (setq __buffer-dedicated-frame frame))))
+
(defvar display-buffer-function nil
"If non-nil, function to call to handle `display-buffer'.
It will receive three args: the same as those to `display-buffer'.")
(defmacro save-selected-window (&rest body)
"Execute BODY, then select the window that was selected before BODY."
- (list 'let
- '((save-selected-window-window (selected-window)))
- (list 'unwind-protect
- (cons 'progn body)
- (list 'and ; XEmacs
- (list 'window-live-p 'save-selected-window-window)
- (list 'select-window 'save-selected-window-window)))))
+ `(let ((save-selected-window-window (selected-window)))
+ (unwind-protect
+ (progn ,@body)
+ (when (window-live-p save-selected-window-window)
+ (select-window save-selected-window-window)))))
+
+(defmacro with-selected-window (window &rest body)
+ "Execute forms in BODY with WINDOW as the selected window.
+The value returned is the value of the last form in BODY."
+ `(save-selected-window
+ (select-window ,window)
+ ,@body))
+
\f
(defun count-windows (&optional minibuf)
"Return the number of visible windows.
(if (and (not (eobp))
(eq ?\n (char-after (1- (point-max)))))
1 0)))
- (mini (frame-property (window-frame window) 'minibuffer))
- (edges (window-pixel-edges (selected-window))))
+ (mini (frame-property (window-frame window) 'minibuffer)))
(if (and (< 1 (let ((frame (selected-frame)))
(select-frame (window-frame window))
(unwind-protect
;; of the frame
(window-leftmost-p window)
(window-rightmost-p window)
- (zerop (nth 0 edges))
;; The whole buffer must be visible.
(pos-visible-in-window-p (point-min) window)
;; The frame must not be minibuffer-only.
"Given an X font specification, this attempts to make a `bold-italic' font.
If it fails, it returns nil."
;; This is haired up to avoid loading the "intermediate" fonts.
- (if *try-oblique-before-italic-fonts*
+ (if try-oblique-before-italic-fonts
(or (try-font-name
(x-frob-font-slant (x-frob-font-weight font "bold") "o") device)
(try-font-name
;; get the truename and use the possibly suboptimal data from that.
;;;###autoload
(defun* x-font-menu-font-data (face dcache)
+ (defvar x-font-regexp)
+ (defvar x-font-regexp-foundry-and-family)
(let* ((case-fold-search t)
(domain (if font-menu-this-frame-only-p
(selected-frame)
(defun x-activate-region-as-selection ()
(if (marker-buffer (mark-marker t))
- (x-own-selection (cons (point-marker t) (mark-marker t)))))
+ (own-selection (cons (point-marker t) (mark-marker t)))))
;; OpenWindows-like "find" processing. These functions are really Sunisms,
;; but we put them here instead of in x-win-sun.el in case someone wants
(defun ow-find (&optional backward-p)
"Search forward the next occurrence of the text of the selection."
(interactive)
- (let ((sel (condition-case () (x-get-selection) (error nil)))
- (clip (condition-case () (x-get-clipboard) (error nil)))
+ (let ((sel (ignore-errors (get-selection)))
+ (clip (ignore-errors (get-clipboard)))
text)
(setq text (cond
(sel)
(add-hook 'zmacs-deactivate-region-hook
(lambda ()
(when (console-on-window-system-p)
- (x-disown-selection))))
+ (disown-selection))))
(add-hook 'zmacs-activate-region-hook
(lambda ()
(when (console-on-window-system-p)
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * *: Spelling mega-patch
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * lwlib.c (ascii_strcasecmp): New.
+ * lwlib.c (find_in_table): Use ascii_strcasecmp.
+ Avoid using non-standard non-portable strcasecmp.
+
+2000-08-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * xlwmenu.c (XlwMenuInitialize): make comment on algorithm for
+ setting fontList match code. Suggest using same algorithm for
+ X Font Set resources in native lw code.
+
+2000-07-30 Ben Wing <ben@xemacs.org>
+
+ * lwlib-Xaw.c (xaw_update_one_widget):
+ Remove accelerator specs from buttons, since Athena doesn't handle
+ them.
+
+ * lwlib.c (lw_remove_accelerator_spec):
+ * lwlib.h:
+ Define function and prototype to do this.
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * xlwradioP.h:
+ Remove duplicate definition of streq().
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
}
#endif /* ! LWLIB_DIALOGS_ATHENA3D */
+ lw_remove_accelerator_spec (val->value);
XtSetArg (al [0], XtNlabel, val->value);
XtSetArg (al [1], XtNsensitive, val->enabled);
/* Force centered button text. See above. */
{
name_string =
XmStringCreateLtoR (res_name, XmSTRING_DEFAULT_CHARSET);
-
+
value_name = XtMalloc (strlen (val->value) + 2);
*value_name = 0;
strcat (value_name, " ");
strcat (value_name, val->value);
-
+
val_string =
XmStringCreateLtoR (value_name, XmSTRING_DEFAULT_CHARSET);
-
+
built_string =
XmStringConcat (name_string, val_string);
-
+
XtFree (value_name);
}
}
val->edited = True;
}
}
- else if (class == xmListWidgetClass
+ else if (class == xmListWidgetClass
#if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1
|| class == xmComboBoxWidgetClass
#endif
n_children++;
}
- /* invisible seperator button */
+ /* invisible separator button */
ac = 0;
XtSetArg (al[ac], XmNmappedWhenManaged, FALSE); ac++;
children [n_children] = XmCreateLabel (row, "separator_button",
XtSetArg(al[ac], XmNrightOffset, 13); ac++;
value = XmCreateScrolledList (form, "list", al, ac);
- /* this is the easiest way I found to have the dble click in the
+ /* this is the easiest way I found to have the double click in the
list activate the default button */
XtAddCallback (value, XmNdefaultActionCallback, activate_button, button);
}
} widget_creation_entry;
/* update all other instances of a widget. Can be used in a callback when
- a wiget has been used by the user */
+ a widget has been used by the user */
void
lw_internal_update_other_instances (Widget widget, XtPointer closure,
XtPointer call_data);
/* Make a complete copy of a widget_value tree. Store CHANGE into
the widget_value tree's `change' field. */
-static widget_value *
+widget_value *
copy_widget_value_tree (widget_value *val, change_type change)
{
widget_value *copy;
val->change = NO_CHANGE;
}
+/* strcasecmp() is not sufficiently portable or standard,
+ and it's easier just to write our own. */
+static int
+ascii_strcasecmp (const char *s1, const char *s2)
+{
+ while (1)
+ {
+ char c1 = *s1++;
+ char c2 = *s2++;
+ if (c1 >= 'A' && c1 <= 'Z') c1 += 'a' - 'A';
+ if (c2 >= 'A' && c2 <= 'Z') c2 += 'a' - 'A';
+ if (c1 != c2) return c1 - c2;
+ if (c1 == '\0') return 0;
+ }
+}
static widget_creation_function
find_in_table (const char *type, widget_creation_entry *table)
{
widget_creation_entry *cur;
for (cur = table; cur->type; cur++)
- if (!strcasecmp (type, cur->type))
+ if (!ascii_strcasecmp (type, cur->type))
return cur->function;
return NULL;
}
}
}
+/* Remove %_ and convert %% to %. We can do this in-place because we
+ are always shortening, never lengthening, the string. */
+void
+lw_remove_accelerator_spec (char *val)
+{
+ char *foo = val, *bar = val;
+
+ while (*bar)
+ {
+ if (*bar == '%' && *(bar+1) == '_')
+ bar += 2;
+ else if (*bar == '%' && *(bar+1) == '%')
+ {
+ *foo++ = *bar++;
+ bar++;
+ }
+ else
+ *foo++ = *bar++;
+ }
+ *foo = '\0';
+}
void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset);
void lw_add_widget_value_arg (widget_value* wv, String name, XtArgVal value);
void lw_copy_widget_value_args (widget_value* copy, widget_value* val);
+widget_value * copy_widget_value_tree (widget_value *val, change_type change);
widget_value *malloc_widget_value (void);
void free_widget_value (widget_value *);
/* Silly Energize hack to invert the "sheet" button */
void lw_show_busy (Widget w, Boolean busy);
+void lw_remove_accelerator_spec (char *val);
+
#endif /* INCLUDED_lwlib_h_ */
*
* Author: Edward A. Falk
* falk@falconer.vip.best.com
- *
+ *
* Date: June 30, 1997
*
* Overview: This widget is identical to the Radio widget in behavior,
CheckboxClassRec checkboxClassRec = {
{
- (WidgetClass) SuperClass, /* superclass */
+ (WidgetClass) SuperClass, /* superclass */
"Checkbox", /* class_name */
sizeof(CheckboxRec), /* size */
CheckboxClassInit, /* class_initialize */
NULL /* extension */
}, /* CoreClass fields initialization */
{
- XtInheritChangeSensitive /* change_sensitive */
+ XtInheritChangeSensitive /* change_sensitive */
}, /* SimpleClass fields initialization */
#ifdef _ThreeDP_h
{
/* Function Name: CheckboxDestroy
* Description: Destroy Callback for checkbox widget.
* Arguments: w - the checkbox widget that is being destroyed.
- * junk, grabage - not used.
+ * junk, garbage - not used.
* Returns: none.
*/
-/* Gauge Widget for XEmacs.
+/* Gauge Widget for XEmacs.
Copyright (C) 1999 Edward A. Falk
This file is part of XEmacs.
*
* Author: Edward A. Falk
* falk@falconer.vip.best.com
- *
+ *
* Date: July 9, 1997
*
* Note: for fun and demonstration purposes, I have added selection
GaugeClassRec gaugeClassRec = {
{
-/* core_class fields */
+/* core_class fields */
/* superclass */ (WidgetClass) &labelClassRec,
/* class_name */ "Gauge",
/* widget_size */ sizeof(GaugeRec),
}
else
{
- gw->gauge.margin0 =
+ gw->gauge.margin0 =
gw->gauge.margin1 = lh / 2 ;
size += lwm + vmargin ;
}
}
/* if the gauge is selected, signify by drawing the background
- * in a constrasting color.
+ * in a contrasting color.
*/
if( gw->gauge.selected )
else
GaugeResize(new) ;
}
-
+
if( gw->gauge.update != oldgw->gauge.update )
{
if( gw->gauge.update > 0 )
return True ;
}
- else
+ else
#endif
if( *target == XA_INTEGER )
{
return True ;
}
- else if( *target == XA_STRING
+ else if( *target == XA_STRING
#ifdef HAVE_XMU
- ||
- *target == XA_TEXT(XtDisplay(w))
+ ||
+ *target == XA_TEXT(XtDisplay(w))
#endif
)
{
if( XmuConvertStandardSelection(w, req->time, selection, target,
type, (XPointer *) value, length, format) )
return True ;
- else
+ else
#endif
{
printf(
XawGaugeSetValue(w, *iptr) ;
}
- else if( *type == XA_STRING
+ else if( *type == XA_STRING
#ifdef HAVE_XMU
||
- *type == XA_TEXT(dpy)
+ *type == XA_TEXT(dpy)
#endif
- )
+ )
{
cptr = (char *)value ;
XawGaugeSetValue(w, atoi(cptr)) ;
*
* Author: Edward A. Falk
* falk@falconer.vip.best.com
- *
+ *
* Date: July 8, 1997
*/
+++ Labels is an array of nul-terminated strings to be used as labels.
If this field is NULL but nlabels is > 0, then numeric labels will be
provided. NOTE: the labels are not copied to any internal memory; they
- must be stored in static memory provided by the appliction.
+ must be stored in static memory provided by the application.
++++ AutoScale allows the gauge to set its own value limits. Default is
False unless upper & lower limits are both 0.
{
*(Cardinal *)rval = value ;
}
-
+
*/
/*
/* Tabs Widget for XEmacs.
Copyright (C) 1999 Edward A. Falk
-
+
This file is part of XEmacs.
-
+
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-
+
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-
+
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
+
/* Synched up with: Gcs.c 1.7 */
-
+
/* #### This code is duplicated many times within lwlib and XEmacs. It
should be modularised. */
*
* If the widget's background is solid white or solid black,
* this code just picks some numbers. (The choice is designed
- * to be compatibile with ThreeD interface.)
+ * to be compatible with ThreeD interface.)
*/
GCFont|GCSubwindowMode|GCGraphicsExposures|
GCDashOffset|GCDashList|GCArcMode) ;
}
- else
+ else
#endif
{
values.foreground = AllocShadowPixel(w, 100-contrast) ;
/* Tabs Widget for XEmacs.
Copyright (C) 1999 Edward A. Falk
-
+
This file is part of XEmacs.
-
+
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-
+
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-
+
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
+
/* Synched up with: Gcs 1.7 */
-
+
#ifndef GCS_H
#define GCS_H
* AllocShadeGC()
* Given foreground, background, a contrast value & be_nice_to_colormap
* flag, return a GC suitable for rendering in an intermediate color,
- * as determined by constrast. May return a dither pattern or a
+ * as determined by contrast. May return a dither pattern or a
* solid color, as appropriate.
*
* Contrast 0 = background color, 100 = foreground color. It is legal
#include <dmalloc.h>
#endif
-/* simple, naieve integer maximum */
+/* simple, naive integer maximum */
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif
{XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
offset(menu.font), XtRString, (XtPointer) "XtDefaultFont"},
# ifdef USE_XFONTSET
+ /* #### Consider using the same method as for Motif; see the comment in
+ XlwMenuInitialize(). */
{XtNfontSet, XtCFontSet, XtRFontSet, sizeof(XFontSet),
offset(menu.font_set), XtRString, (XtPointer) "XtDefaultFontSet"},
# endif
/* Unused */
#if 0
-/* These two routines should be a seperate file..djw */
+/* These two routines should be a separate file..djw */
static char *
xlw_create_localized_string (Widget w,
char *name,
else
return TEXT_TYPE;
#else
- else
+ else
abort();
return UNSPECIFIED_TYPE; /* Not reached */
#endif
mw->menu.old_depth = new_depth;
- /* refresh the last seletion */
+ /* refresh the last selection */
selection_position.x = 0;
selection_position.y = 0;
display_menu (mw, last_same, new_selection == old_selection,
gray_width, gray_height, 1, 0, 1);
#ifdef NEED_MOTIF
+ /* #### Even if it's a kludge!!!, we should consider doing the same for
+ X Font Sets. */
/* The menu.font_list slot came from the *fontList resource (Motif standard.)
The menu.font_list_2 slot came from the *font resource, for backward
compatibility with older versions of this code, and consistency with the
- rest of emacs. If both font and fontList are specified, we use font.
+ rest of emacs. If both font and fontList are specified, we use fontList.
If only one is specified, we use that. If neither are specified, we
use the "fallback" value. What a kludge!!!
*
* Author: Edward A. Falk
* falk@falconer.vip.best.com
- *
+ *
* Date: June 30, 1997
*
*
RadioClassRec radioClassRec = {
{
- (WidgetClass) SuperClass, /* superclass */
+ (WidgetClass) SuperClass, /* superclass */
"Radio", /* class_name */
sizeof(RadioRec), /* size */
RadioClassInit, /* class_initialize */
NULL /* extension */
}, /* CoreClass fields initialization */
{
- XtInheritChangeSensitive /* change_sensitive */
+ XtInheritChangeSensitive /* change_sensitive */
}, /* SimpleClass fields initialization */
#ifdef _ThreeDP_h
{
/* Function Name: RadioDestroy
* Description: Destroy Callback for radio widget.
* Arguments: w - the radio widget that is being destroyed.
- * junk, grabage - not used.
+ * junk, garbage - not used.
* Returns: none.
*/
{
RadioSize(newrw, &newrw->core.width, &newrw->core.height) ;
}
-
- /* The label set values routine can resize the widget. We need to
+
+ /* The label set values routine can resize the widget. We need to
* recalculate if this is true.
*/
if (newrw->label.label_x != oldrw->label.label_x)
* border.
*/
-static void
+static void
DrawHighlight (Widget w,
GC gc)
{
/* ARGSUSED */
-void
+void
RadioSet (Widget w,
XEvent *event,
String *params, /* unused */
/* ARGSUSED */
-void
+void
RadioUnset (Widget w,
XEvent *event,
String *params, /* unused */
*
***********************************************************************/
-#define streq(a, b) ( strcmp((a), (b)) == 0 )
+/* Already in Xaw/ToggleP.h, and not used by us.
+ #define streq(a, b) ( strcmp((a), (b)) == 0 )
+*/
typedef void (*XawDiamondProc) (Widget);
/* Tabs Widget for XEmacs.
Copyright (C) 1999 Edward A. Falk
-
+
This file is part of XEmacs.
-
+
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
-
+
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-
+
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
+
/* Synched up with: Tabs.c 1.27 */
-
+
/*
* Tabs.c - Index Tabs composite widget
*
* Window system will handle the redraws.
*/
- if( tw->tabs.topWidget != curtw->tabs.topWidget )
+ if( tw->tabs.topWidget != curtw->tabs.topWidget )
{
if( XtIsRealized(tw->tabs.topWidget) )
{
/*
* Return preferred size. Happily accept anything >= our preferred size.
* (TODO: is that the right thing to do? Should we always return "almost"
- * if offerred more than we need?)
+ * if offered more than we need?)
*/
static XtGeometryResult
if( !XtIsRealized((Widget)tw))
return ;
-
+
/* draw tabs and frames by row except for the top tab, which
* is drawn last. (This is inefficiently written, but should not
* be too slow as long as there are not a lot of rows.)
if (!query_only)
tw->tabs.displayChildren++;
}
- /* If there was only one row, increse the height by TABDELTA */
+ /* If there was only one row, increase the height by TABDELTA */
if( ++row == 1 )
{
y = TABDELTA ;
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * lispref/processes.texi (Signals to Processes): Many corrections.
+
+2000-09-20 Martin Buchholz <martin@xemacs.org>
+
+ * xemacs/startup.texi (Startup Paths): Minor fixes.
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * *: Spelling mega-patch
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi (Low-Level Modules):
+ Correct the list of source files.
+
+2000-08-24 Adrian Aichner <aichner@ecf.teradyne.com>
+
+ * emodules.texi (Introduction): Trivial typo fix.
+
+2000-08-24 Martin Buchholz <martin@xemacs.org>
+
+ * emodules.texi (Initialization Mode): Spell-Check.
+
+2000-08-24 Martin Buchholz <martin@xemacs.org>
+
+ * lispref/databases.texi (Connecting to a Database):
+ s/berkeley_db/berkeley-db/. Too much C programming.
+
+2000-08-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * xemacs/custom.texi (Menubar Resources): Document FontSet resource.
+
+2000-07-30 Ben Wing <ben@xemacs.org>
+
+ * xemacs\search.texi (Regexp Search):
+ * xemacs\search.texi (Regexps):
+ Synch up with updated docs below (describing non-greedy
+ operators and such).
+
+2000-07-30 Ben Wing <ben@xemacs.org>
+
+ * lispref\searching.texi (Syntax of Regexps):
+ Document ??, which we've supported since 20.4.
+
+2000-07-31 Sandra Wambold <wambold@cygnus.com>
+
+ * xemacs-faq.texi: Minor updates in first two sections
+
+2000-07-27 Andy Piper <andy@xemacs.org>
+
+ * lispref/hash-tables.texi: add new hash table type.
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
* info.texi: Fixed @setfilename and a typo.
* standards.texi: Added NEXT to @node Preface. See ALL.
* texinfo.texi: Fixed section names, quoted usage of @TeX{},
- changed some occurences of `:' to `colon'.
+ changed some occurrences of `:' to `colon'.
* xemacs-faq.texi: See ALL.
* internals/internals.texi: See ALL.
* lispref/back.texi: Fixed @setfilename.
support documentation.
@menu
* Introduction:: Introducing Emacs Modules
-* Annatomy of a Module:: Basic module layout and technology
+* Anatomy of a Module:: Basic module layout and technology
* Using ellcc:: How to use the module compiler
* Defining Functions:: Creating new Lisp primitives
* Defining Variables:: Creating new Lisp variables
--- The Detailed Node Listing ---
-Annatomy of a Module
+Anatomy of a Module
* Required Header File:: Always include <emodules.h>
* Required Functions:: Functions you must always provide
* Required Variables:: Variables whose values you must provide
-* Loading other Modules:: How to load dependant modules
+* Loading other Modules:: How to load dependent modules
Using @code{ellcc}
@end ifinfo
-@node Introduction, Annatomy of a Module, Top, Top
+@node Introduction, Anatomy of a Module, Top, Top
@chapter Introduction
@value{emacs} is a powerful, extensible editor. The traditional way of
implications. Like all other interpreted languages (like Java), Elisp
is often suitable only for certain types of application or extension.
So although Elisp is a general purpose language, and very high level,
-there are times when it is desirable to descend to a lower level compiled
+there are times when it is desirable to descend to a lower level compiled
language for speed purposes.
Secondly, Elisp (or Lisp in general) is not a very common language any
more, except for certain circles in the computer industry. C is a far
-more commonly known language, and because it is compiled, more suited to
+more commonly known language, and because it is compiled, more suited to
a wider range of applications, especially those that require low level
access to a system or need to be as quick as possible.
@cindex DSO
@cindex shared object
This manual describes a new way of extending @value{emacs}, by using dynamic
-loadable modules (also knows as dynamicaly loadable libraries (DLLs),
-dynamic shared objects (DSOs) or just simply shared objectcs), which can
+loadable modules (also known as dynamically loadable libraries (DLLs),
+dynamic shared objects (DSOs) or just simply shared objects), which can
be written in C or C++ and loaded into @value{emacs} at any time. I sometimes
refer to this technology as @dfn{CEmacs}, which is short for @dfn{C
Extensible Emacs}.
compile and link all objects that will make up the final shared object,
and accepts all common C compiler flags. @code{ellcc} also sets up the
correct environment for compiling modules by enabling any special
-compiler modes (such as PIC mode), setting the correct include paths for
+compiler modes (such as PIC mode), setting the correct include paths for
the location of @value{emacs} internal header files etc. The program will also
invoke the linker correctly to created the final shared object which is
loaded into @value{emacs}.
@item
@cindex header files
CEmacs also makes all of the relevant @value{emacs} internal header files
-availible for module authors to use. This is often required to get data
+available for module authors to use. This is often required to get data
structure definitions and external variable declarations. The header
files installed include the module specific header file
@file{emodules.h}. Due to the nature of dynamic modules, most of the
internals of @value{emacs} are exposed.
-@xref{Top,,,internals,@value{emacs} Internals Manual}, for a
-more complete discussion on how to extend and understand @value{emacs}. All of
+@xref{Top,,,internals,@value{emacs} Internals Manual}, for a
+more complete discussion on how to extend and understand @value{emacs}. All of
the rules for C modules are discussed there.
@item
deal to look at the actual @value{emacs} source code to see how things are
done.
-@node Annatomy of a Module, Using ellcc, Introduction, Top
-@chapter Annatomy of a Module
-@cindex annatomy
+@node Anatomy of a Module, Using ellcc, Introduction, Top
+@chapter Anatomy of a Module
+@cindex anatomy
@cindex module skeleton
@cindex skeleton, module
@cindex module format
@cindex format, module
- Each dynamically loadable @value{emacs} extension (hereafter refered to as a
-module) has a certain compulsory format, and must contain several
-pieces of information and several mandatory functions. This chapter
+ Each dynamically loadable @value{emacs} extension (hereafter referred to as a
+module) has a certain compulsory format, and must contain several
+pieces of information and several mandatory functions. This chapter
describes the basic layout of a module, and provides a very simple
sample. The source for this sample can be found in the file
@file{modules/simple/sample.c} in the main @value{emacs} source code tree.
* Required Header File:: Always include <emodules.h>
* Required Functions:: Functions you must always provide
* Required Variables:: Variables whose values you must provide
-* Loading other Modules:: How to load dependant modules
+* Loading other Modules:: How to load dependent modules
@end menu
-@node Required Header File, Required Functions, Annatomy of a Module, Annatomy of a Module
+@node Required Header File, Required Functions, Anatomy of a Module, Anatomy of a Module
@section Required Header File
@cindex required header
@cindex include files
@cindex emodules.h
@cindex config.h
Every module must include the file @file{<emodules.h>}. This
-will include several other @value{emacs} internal header files, and will set up
+will include several other @value{emacs} internal header files, and will set up
certain vital macros. One of the most important files included by
@file{emodules.h} is the generated @file{config.h} file, which contains
all of the required system abstraction macros and definitions. Most
constants defined in @file{config.h}. Please read that file to
familiarize yourself with the macros defined there.
- Depending on exactly what your module will be doing, you will probably
+ Depending on exactly what your module will be doing, you will probably
need to include one or more of the @value{emacs} internal header files. When
-you @code{#include <emodules.h>}, you will get a few of the most important
+you @code{#include <emodules.h>}, you will get a few of the most important
@value{emacs} header files included automatically for you. The files included
are:
@table @file
@item lisp.h
-This file contains most of the macros required for declaring Lisp object
+This file contains most of the macros required for declaring Lisp object
types, macros for accessing Lisp objects, and global variable
declarations.
@item sysdep.h
-All system dependant declarations and abstraction macros live here. You
+All system dependent declarations and abstraction macros live here. You
should never call low level system functions directly. Rather, you
should use the abstraction macros provided in this header file.
manipulating @value{emacs} frames.
@end table
-@node Required Functions, Required Variables, Required Header File, Annatomy of a Module
+@node Required Functions, Required Variables, Required Header File, Anatomy of a Module
@section Required Functions
@cindex initialization
@cindex functions, required
@cindex required functions
Every module requires several initialization functions. It is the
-responsibility of these functions to load in any dependant modules, and to
-declare all variables and functions which are to be made visibile to the
+responsibility of these functions to load in any dependent modules, and to
+declare all variables and functions which are to be made visible to the
@value{emacs} Lisp reader. Each of these functions performs a very specific
task, and they are executed in the correct order by @value{emacs}. All of
these functions are @code{void} functions which take no arguments.
@table @code
@item syms_of_module
@findex syms_of_module
-This required function is responsible for introducing to the Lisp reader
+This required function is responsible for introducing to the Lisp reader
all functions that you have defined in your module using
@code{DEFUN()}. Note that @emph{only} functions are declared here, using
the @code{DEFSUBR()} macro. No variables are declared.
@item modules_of_module
@findex modules_of_module
This optional function should be used to load in any modules which your
-module depends on. The @value{emacs} module loading code makes sure that the
+module depends on. The @value{emacs} module loading code makes sure that the
same module is not loaded twice, so several modules can safely call the
module load function for the same module. Only one copy of each module
(at a given version) will ever be loaded.
functions and variables declared in your module.
@end table
-@node Required Variables, Loading other Modules, Required Functions, Annatomy of a Module
+@node Required Variables, Loading other Modules, Required Functions, Anatomy of a Module
@section Required Variables
@cindex initialization
@cindex variables, required
Not only does a module need to declare the initialization functions
mentioned above, it is also required to provide certain variables which
-the module loading code searches for in order to determine the viability
+the module loading code searches for in order to determine the viability
of a module. You are @emph{not} required to provide these variables in
your source files. They are automatically set up in the module
initialization file by the @code{ellcc} compiler. These variables are
version of the @value{emacs} loading technology that was used to produce the
module being loaded. This version number is completely unrelated to
the @value{emacs} version number, as a given module may quite well work
-regardless of the version of @value{emacs} that was installed at the time the
+regardless of the version of @value{emacs} that was installed at the time the
module was created.
The @value{emacs} modules version is used to differentiate between major
@item emodules_name
This is a short (typically 10 characters or less) name for the module,
and it is used as a suffix for all of the required functions. This is
-also the name by which the module is recognised when loading dependant
+also the name by which the module is recognized when loading dependent
modules. The name does not necessarily have to be the same as the
physical file name, although keeping the two names in sync is a pretty
-good idea. The name must not be empty, and it must be a valid part of a
-C function name. The value of this variable is appended to the function
+good idea. The name must not be empty, and it must be a valid part of a
+C function name. The value of this variable is appended to the function
names @code{syms_of_}, @code{vars_of_}, @code{modules_of_} and
@code{docs_of_} to form the actual function names that the module
loading code looks for when loading a module.
@code{--mod-title} argument to @code{ellcc}.
@end table
-@node Loading other Modules, , Required Variables, Annatomy of a Module
+@node Loading other Modules, , Required Variables, Anatomy of a Module
@section Loading other Modules
-@cindex dependancies
+@cindex dependencies
@findex modules_of_module
@findex emodules_load
@code{modules_of_module} to load in any modules which the current module
depends on. If the module is stand-alone, and does not depend on other
modules, then this function can be left empty or even undeclared.
-However, if it does have dependnacies, it must call
+However, if it does have dependencies, it must call
@code{emodules_load}:
@example
@end cartouche
@end example
-The first argument @var{module} is the name of the actual shared object
+The first argument @var{module} is the name of the actual shared object
or DLL. You can omit the @file{.so}, @file{.ell} or @file{.dll}
extension of you wish. If you do not specify an absolute path name,
then the same rules as apply to loading Lisp modules are applied when
searching for the module. If the module cannot be found in any of the
standard places, and an absolute path name was not specified,
-@code{emodules_load} will signal an error and loading of the module
+@code{emodules_load} will signal an error and loading of the module
will stop.
The second argument (@var{modname}) is the module name to load, and
must match the contents of the variable @var{emodule_name} in the
-module to be loaded. A mis-match will cause the module load to fail. If
+module to be loaded. A mis-match will cause the module load to fail. If
this parameter is @code{NULL} or empty, then no checks are performed
against the target module's @var{emodule_name} variable.
or empty, and the match fails, then the load of the module will fail.
@code{emodules_load} can be called recursively. If, at any point
-during the loading of modules a failure is encountered, then all modules
+during the loading of modules a failure is encountered, then all modules
that were loaded since the top level call to @code{emodules_load}
will be unloaded. This means that if any child modules fail to load,
then their parents will also fail to load. This does not include
previous successful calls to @code{emodules_load} at the top level.
-@node Using ellcc, Defining Functions, Annatomy of a Module, Top
+@node Using ellcc, Defining Functions, Anatomy of a Module, Top
@chapter Using @code{ellcc}
@cindex @code{ellcc}
@cindex module compiler
an Emacs module rather than a static C object.
@code{ellcc} has three distinct modes of operation. It can be run in
-compile, link or initialization mode. These modes are discussed in more
+compile, link or initialization mode. These modes are discussed in more
detail below. If you want @code{ellcc} to show the commands it is
executing, you can specify the option @code{--mode=verbose} to
@code{ellcc}. Specifying this option twice will enable certain extra
@cindex compiling
By default, @code{ellcc} is in @dfn{compile} mode. This means that it
-assumes that all of the command line arguments are C compiler arguments,
+assumes that all of the command line arguments are C compiler arguments,
and that you want to compile the specified source file or files. You
can force compile mode by specifying the @code{--mode=compile} argument
to @code{ellcc}.
same exit codes and messages that your C compiler does.
By far the easiest way to compile modules is to construct a
-@file{Makefile} as you would for a normal program, and simply insert, at
+@file{Makefile} as you would for a normal program, and simply insert, at
some appropriate place something similar to:
@example
and variables passed as static strings in the source code, the
documentation is included as a C comment. A special program, called
@file{make-docfile}, is used to scan the source code files and extract
-the documentation from these comments, producing the @value{emacs} @file{DOC}
+the documentation from these comments, producing the @value{emacs} @file{DOC}
file, which the internal help engine scans when the documentation for a
function or variable is requested.
Due to the internal construction of Lisp objects, subrs and other such
things, adding documentation for a compiled function or variable in a
compiled module, at any time after @value{emacs} has been @dfn{dumped} is
-somewhat problematic. Fortunately, as a module writer you are insulated
+somewhat problematic. Fortunately, as a module writer you are insulated
from the difficulties thanks to your friend @code{ellcc} and some
internal trickery in the module loading code. This is all done using
the @dfn{initialization} mode of @code{ellcc}.
The result of running @code{ellcc} in initialization mode is a C source
file which you compile with (you guessed it) @code{ellcc} in compile
mode. Initialization mode is where you set the module name, version,
-title and gather together all of the documentaion strings for the
-functions and vairables in your module. There are several options that
+title and gather together all of the documentation strings for the
+functions and variables in your module. There are several options that
you are required to pass @code{ellcc} in initialization mode, the first
of which is the mode switch itself, @code{--mode=init}.
screen.
Following all of these parameters, you need to provide the list of all
-source code modules that make up your module. These are the files which
-are scanned by @file{make-docfile}, and provide the information required
+source code modules that make up your module. These are the files which
+are scanned by @file{make-docfile}, and provide the information required
to populate the @code{docs_of_module} function. Below is a sample
@file{Makefile} fragment which indicates how all of this is used.
searched for a given module when the user attempts to load it. The
valid extensions that the loader attempts to use are @file{.so},
@file{.ell} and @file{.dll}. You can use any of these extensions,
-although @file{.ell} is the prefered extension.
+although @file{.ell} is the preferred extension.
@node Link Mode, Other ellcc options, Initialization Mode, Using ellcc
@section Link Mode
@cindex linking
Once all of your source code files have been compiled (including the
-generated init file) you need to link them all together to created the
+generated init file) you need to link them all together to create the
loadable module. To do this, you invoke @code{ellcc} in link mode, by
-pasing the @code{--mode-link} command. You need to specify the final
-output file using the @code{--mod-output=NAME} command, but other than
+passing the @code{--mode-link} option. You need to specify the final
+output file using the @code{--mod-output=NAME} option, but other than
that all other arguments are passed on directly to the system compiler
or linker, along with any other required arguments to create the
loadable module.
Aside from the three main @code{ellcc} modes described above,
@code{ellcc} can accept several other options. These are typically used
-in a @file{Makefile} to determine installation paths. @code{ellcc} also
+in a @file{Makefile} to determine installation paths. @code{ellcc} also
allows you to over-ride several of its built-in compiler and linker
options using environment variables. Here is the complete list of
options that @code{ellcc} accepts.
@item --mode=init
Used to create the documentation function and to initialize other
-required variables. Produces a C source file that must be compiled with
+required variables. Produces a C source file that must be compiled with
@code{ellcc} in compile mode before linking the final module.
@item --mode=verbose
Enables verbose mode. This will show you the commands that are being
-executed, as well as the version number of @code{ellcc}. If you specify
+executed, as well as the version number of @code{ellcc}. If you specify
this option twice, then some extra debugging information is displayed.
@item --mod-name=NAME
-Sets the short internaml module @var{NAME} to the string specified,
+Sets the short internal module @var{NAME} to the string specified,
which must consist only of valid C identifiers. Required during
initialization mode.
final loadable module to @var{FILENAME}.
@item --mod-location
-This will print the name of the standard module installation path on the
+This will print the name of the standard module installation path on the
standard output and immediately exit @code{ellcc}. Use this option to
determine the directory prefix of where you should install your modules.
This will print the name of the site specific module location and exit.
@item --mod-archdir
-Prints the name of the root of the architecture-dependant directory that
-@value{emacs} searches for architecture-dependant files.
+Prints the name of the root of the architecture-dependent directory that
+@value{emacs} searches for architecture-dependent files.
@item --mod-config
-Prints the name of the configuration for which @value{emacs} and @code{ellcc}
+Prints the name of the configuration for which @value{emacs} and @code{ellcc}
were compiled.
@end table
During its normal operation, @code{ellcc} uses the compiler and linker
flags that were determined at the time @value{emacs} was configured. In
-certain rare circumstances you may wish to over-ride the flags passed to
+certain rare circumstances you may wish to over-ride the flags passed to
the compiler or linker, and you can do so using environment variables.
-The table below lists all of the environment variables that @code{ellcc}
-recognises.
+The table below lists all of the environment variables that @code{ellcc}
+recognizes.
@table @code
@item ELLCC
One of the main reasons you would ever write a module is to
provide one or more @dfn{functions} for the user or the editor to use.
-The term
+The term
@dfn{function} is a bit overloaded here, as it refers to both a C
function and the way it appears to Lisp, which is a @dfn{subroutine}, or
simply a @dfn{subr}. A Lisp subr is also known as a Lisp primitive, but
that term applies less to dynamic modules. @xref{Writing Lisp
Primitives,,,internals,@value{emacs} Internals Manual}, for details on how to
declare functions. You should familiarize yourself with the
-instructions there. The format of the function declaration is identical
+instructions there. The format of the function declaration is identical
in modules.
- Normal Lisp primitives document the functions they defining by including
+ Normal Lisp primitives document the functions they defining by including
the documentation as a C comment. During the build process, a program
called @file{make-docfile} is run, which will extract all of these
comments, build up a single large documentation file, and will store
When using @code{DEFUN} in normal @value{emacs} C code, the sixth
``parameter'' is a C comment which documents the function. For a
dynamic module, we of course need to convert the C comment to a usable
-string, and we need to set the documentation pointer of the subr to this
+string, and we need to set the documentation pointer of the subr to this
string. As a module programmer, you don't actually need to do any work
for this to happen. It is all taken care of in the
@code{docs_of_module} function created by @code{ellcc}.
@cindex functions, Lisp
@cindex functions, defining
- Although the full syntax of a function declaration is discussed in the
+ Although the full syntax of a function declaration is discussed in the
@value{emacs} internals manual in greater depth, what follows is a brief
description of how to define and implement a new Lisp primitive in a
module. This is done using the @code{DEFUN} macro. Here is a small
DEFUN ("my-function", Fmy_function, 1, 1, "FFile name: ", /*
Sample Emacs primitive function.
-The specified FILE is frobricated before it is fnozzled.
+The specified FILE is frobnicated before it is fnozzled.
*/
(file))
@{
@end example
The first argument is the name of the function as it will appear to the
-Lisp reader. This must be provided as a string. The second argument is
+Lisp reader. This must be provided as a string. The second argument is
the name of the actual C function that will be created. This is
-typically the Lisp function name with a preceding capital @code{F}, with
+typically the Lisp function name with a preceding capital @code{F}, with
hyphens converted to underscores. This must be a valid C function
name. Next come the minimum and maximum number of arguments,
respectively. This is used to ensure that the correct number of
@cindex functions, declaring
Simply writing the code for a function is not enough to make it
-availible to the Lisp reader. You have to, during module
+available to the Lisp reader. You have to, during module
initialization, let the Lisp reader know about the new function. This
is done by calling @code{DEFSUBR} with the name of the function. This
is the sole purpose of the initialization function
Rarely will you write a module that only contains functions. It is
common to also provide variables which can be used to control the
-behaviour of the function, or store the results of the function being
+behavior of the function, or store the results of the function being
executed. The actual C variable types are the same for modules
and internal @value{emacs} primitives, and the declaration of the variables
is identical.
- @xref{Adding Global Lisp Variables,,,internals,XEmacs Internals Manual},
+ @xref{Adding Global Lisp Variables,,,internals,XEmacs Internals Manual},
for more information on variables and naming conventions.
Once your variables are defined, you need to initialize them and make
the Lisp reader aware of them. This is done in the
@code{vars_of_module} initialization function using special @value{emacs}
-macros such as @code{DEFVAR_LISP}, @code{DEFVAR_BOOL}, @code{DEFVAR_INT}
-etc. The best way to see how to use these macros is to look at existing
+macros such as @code{DEFVAR_LISP}, @code{DEFVAR_BOOL}, @code{DEFVAR_INT}
+etc. The best way to see how to use these macros is to look at existing
source code, or read the internals manual.
One @emph{very} important difference between @value{emacs} variables and
module variables is how you use pure space. Simply put, you
@strong{never} use pure space in @value{emacs} modules. The pure space
-storage is of a limited size, and is initialized propperly during the
+storage is of a limited size, and is initialized properly during the
dumping of @value{emacs}. Because variables are being added dynamically to
an already running @value{emacs} when you load a module, you cannot use pure
space. Be warned: @strong{do not use pure space in modules. Repeat, do
@setfilename ../info/info.info
@settitle Info
@comment %**end of header
-@comment $Id: info.texi,v 1.4.2.4 2000/01/18 07:27:42 yoshiki Exp $
+@comment $Id: info.texi,v 1.4.2.5 2000/09/13 10:57:18 martinb Exp $
@dircategory Texinfo documentation system
@direntry
@node Emacs Info Variables, , Checking, Advanced Info
@section Emacs Info-mode Variables
-The following variables may modify the behaviour of Info-mode in Emacs;
+The following variables may modify the behavior of Info-mode in Emacs;
you may wish to set one or several of these variables interactively, or
in your @file{~/.emacs} init file. @xref{Examining, Examining and
Setting Variables, Examining and Setting Variables, xemacs, XEmacs
When the Lisp initialization code is done, the C code enters the event
loop, and stays there for the duration of the XEmacs process. The code
-for the event loop is contained in @file{keyboard.c}, and is called
+for the event loop is contained in @file{cmdloop.c}, and is called
@code{Fcommand_loop_1()}. Note that this event loop could very well be
written in Lisp, and in fact a Lisp version exists; but apparently,
doing this makes XEmacs run noticeably slower.
@example
-crt0.c
+ecrt0.c
lastfile.c
pre-crt0.c
@end example
@example
-prefix-args.c
-@end example
-
-This is actually the source for a small, self-contained program
-used during building.
-
-
-@example
universe.h
@end example
@section Basic Lisp Modules
@example
-emacsfns.h
lisp-disunion.h
lisp-union.h
lisp.h
@example
event-Xt.c
+event-msw.c
event-stream.c
event-tty.c
+events-mod.h
+gpmevent.c
+gpmevent.h
events.c
events.h
@end example
@example
-keyboard.c
+cmdloop.c
@end example
-@file{keyboard.c} contains functions that implement the actual editor
+@file{cmdloop.c} contains functions that implement the actual editor
command loop---i.e. the event loop that cyclically retrieves and
dispatches events. This code is also rather tricky, just like
@file{event-stream.c}.
@section Modules for the Basic Displayable Lisp Objects
@example
-device-ns.h
-device-stream.c
-device-stream.h
+console-msw.c
+console-msw.h
+console-stream.c
+console-stream.h
+console-tty.c
+console-tty.h
+console-x.c
+console-x.h
+console.c
+console.h
+@end example
+
+These modules implement the @dfn{console} Lisp object type. A console
+contains multiple display devices, but only one keyboard and mouse.
+Most of the time, a console will contain exactly one device.
+
+Consoles are the top of a lisp object inclusion hierarchy. Consoles
+contain devices, which contain frames, which contain windows.
+
+
+
+@example
+device-msw.c
device-tty.c
-device-tty.h
device-x.c
-device-x.h
device.c
device.h
@end example
@example
-frame-ns.h
+frame-msw.c
frame-tty.c
frame-x.c
-frame-x.h
frame.c
frame.h
@end example
@example
bitmaps.h
-glyphs-ns.h
+glyphs-eimage.c
+glyphs-msw.c
+glyphs-msw.h
+glyphs-widget.c
glyphs-x.c
glyphs-x.h
glyphs.c
@example
-objects-ns.h
+objects-msw.c
+objects-msw.h
objects-tty.c
objects-tty.h
objects-x.c
@example
+menubar-msw.c
+menubar-msw.h
menubar-x.c
menubar.c
+menubar.h
@end example
@example
+scrollbar-msw.c
+scrollbar-msw.h
scrollbar-x.c
scrollbar-x.h
scrollbar.c
@example
+toolbar-msw.c
toolbar-x.c
toolbar.c
toolbar.h
@end example
These modules decode GIF-format image files, for use with glyphs.
+These files were removed due to Unisys patent infringement concerns.
@example
redisplay-output.c
+redisplay-msw.c
redisplay-tty.c
redisplay-x.c
redisplay.c
Similar to other subsystems in XEmacs, lstreams are separated into
generic functions and a set of methods for the different types of
lstreams. @file{lstream.c} provides implementations of many different
-types of streams; others are provided, e.g., in @file{mule-coding.c}.
+types of streams; others are provided, e.g., in @file{file-coding.c}.
-@example
-msdos.c
-msdos.h
-@end example
-
-These modules are used for MS-DOS support, which does not work in
-XEmacs.
-
-
-
@node Modules for Interfacing with X Windows, Modules for Internationalization, Modules for Interfacing with the Operating System, A Summary of the Various XEmacs Modules
@section Modules for Interfacing with X Windows
@example
-xselect.c
+select-msw.c
+select-x.c
+select.c
+select.h
@end example
@cindex selections
mule-ccl.c
mule-charset.c
mule-charset.h
-mule-coding.c
-mule-coding.h
+file-coding.c
+file-coding.h
mule-mcpath.c
mule-mcpath.h
mule-wnnfns.c
just Asian languages (although they are generally the most complicated
to support). This code is still in beta.
-@file{mule-charset.*} and @file{mule-coding.*} provide the heart of the
+@file{mule-charset.*} and @file{file-coding.*} provide the heart of the
XEmacs MULE support. @file{mule-charset.*} implements the @dfn{charset}
Lisp object type, which encapsulates a character set (an ordered one- or
two-dimensional set of characters, such as US ASCII or JISX0208 Japanese
Kanji).
-@file{mule-coding.*} implements the @dfn{coding-system} Lisp object
+@file{file-coding.*} implements the @dfn{coding-system} Lisp object
type, which encapsulates a method of converting between different
encodings. An encoding is a representation of a stream of characters,
possibly from multiple character sets, using a stream of bytes or words,
file. To create one of these, copy an existing model and modify as
necessary.
+ @strong{Please note:} If you define an lrecord in an external
+dynamically-loaded module, you must use @code{DECLARE_EXTERNAL_LRECORD},
+@code{DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION}, and
+@code{DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION} instead of the
+non-EXTERNAL forms. These macros will dynamically add new type numbers
+to the global enum that records them, whereas the non-EXTERNAL forms
+assume that the programmer has already inserted the correct type numbers
+into the enum's code at compile-time.
+
The various methods in the lrecord implementation structure are:
@enumerate
tree recursively.
This has desirable properties such as lw_modify_all_widgets which is
-called from glyphs-x.c and updates all the properties of a widget
+called from @file{glyphs-x.c} and updates all the properties of a widget
without having to know what the widget is or what toolkit it is from.
Unfortunately this also has hairy properties such as making the lwlib
code quite complex. And of course lwlib has to know at some level what
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
+data type. You can think of the contents of a buffer as an extendible
string; insertions and deletions may occur in any part of the buffer.
@xref{Text}.
@defun valid-device-type-p device-type
This function returns whether @var{device-type} (which should be a symbol)
-species a valid device type.
+specifies a valid device type.
@end defun
@defun valid-device-class-p device-class
This function returns whether @var{device-class} (which should be a symbol)
-species a valid device class.
+specifies a valid device class.
@end defun
@defvar terminal-device
permissions @var{mode}. @var{access} can be any combination of @code{r}
@code{w} and @code{+}, for read, write, and creation flags.
-@var{type} can have the value @code{'dbm} or @code{'berkeley_db} to
+@var{type} can have the value @code{'dbm} or @code{'berkeley-db} to
select the type of database file to use. (Note: XEmacs may not
support both of these types.)
For a @var{type} of @code{'dbm}, there are no subtypes, so
@var{subtype} should be @code{nil}.
-For a @var{type} of @code{'berkeley_db}, the following subtypes are
+For a @var{type} of @code{'berkeley-db}, the following subtypes are
available: @code{'hash}, @code{'btree}, and @code{'recno}. See the
-manpages for the Berkeley DB functions to more information about these
+manpages for the Berkeley DB functions for more information about these
types.
@end defun
Keyword @code{:rehash-threshold} must be a float between 0.0 and 1.0,
and specifies the load factor of the hash table which triggers enlarging.
-Keyword @code{:weakness} can be @code{nil} (default), @code{t},
-@code{key} or @code{value}.
-
-A weak hash table is one whose pointers do not count as GC referents:
-for any key-value pair in the hash table, if the only remaining pointer
-to either the key or the value is in a weak hash table, then the pair
-will be removed from the hash table, and the key and value collected.
-A non-weak hash table (or any other pointer) would prevent the object
-from being collected.
+Non-standard keyword @code{:weakness} can be @code{nil} (default),
+@code{t}, @code{key-and-value}, @code{key}, @code{value} or
+@code{key-or-value}. @code{t} is an alias for @code{key-and-value}.
+
+A key-and-value-weak hash table, also known as a fully-weak or simply
+as a weak hash table, is one whose pointers do not count as GC
+referents: for any key-value pair in the hash table, if the only
+remaining pointer to either the key or the value is in a weak hash
+table, then the pair will be removed from the hash table, and the key
+and value collected. A non-weak hash table (or any other pointer)
+would prevent the object from being collected.
A key-weak hash table is similar to a fully-weak hash table except that
a key-value pair will be removed only if the key remains unmarked
unmarked outside of weak hash tables. The pair will remain in the
hash table if the value is pointed to by something other than a weak
hash table, even if the key is not.
+
+A key-or-value-weak hash table is similar to a fully-weak hash table except
+that a key-value pair will be removed only if the value and the key remain
+unmarked outside of weak hash tables. The pair will remain in the
+hash table if the value or key are pointed to by something other than a weak
+hash table, even if the other is not.
@end defun
@defun copy-hash-table hash-table
(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:
+There are four types of weak hash tables:
@table @asis
-@item fully weak hash tables
-In these hash tables, a pair disappears if either the key or the value
-is unreferenced outside of the table.
+@item key-and-value-weak hash tables
+In these hash tables, also known as fully weak or simply as weak hash
+tables, a pair disappears if either the key or the value is unreferenced
+outside of the table.
@item 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.
@item 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.
+@item key-or-value-weak hash tables
+In these hash tables, a pair disappears if both the key and the value
+are unreferenced outside of the table.
@end table
Also see @ref{Weak Lists}.
This command unloads the library that provided feature @var{feature}.
It undefines all functions, macros, and variables defined in that
library with @code{defconst}, @code{defvar}, @code{defun},
-@code{defmacro}, @code{defsubst}, @code{definf-function} and
+@code{defmacro}, @code{defsubst}, @code{define-function} and
@code{defalias}. It then restores any autoloads formerly associated
with those symbols. (Loading saves these in the @code{autoload}
property of the symbol.)
@end example
@end defun
-@defun read-command prompt &optinal default-value
+@defun read-command prompt &optional default-value
This function reads the name of a command and returns it as a Lisp
symbol. The argument @var{prompt} is used as in
@code{read-from-minibuffer}. Recall that a command is anything for
byte 0x8F.
The advantage of a modal encoding is that it is generally more
-space-efficient, and is easily extendable because there are essentially
+space-efficient, and is easily extendible because there are essentially
an arbitrary number of escape sequences that can be created. The
disadvantage, however, is that it is much more difficult to work with
if it is not being processed in a sequential manner. In the non-modal
@c -*-texinfo-*-
@c This is part of the XEmacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/processes.info
@node Processes, System Interface, Databases, Top
argument, @var{args}. The @var{args} must all be strings, and they are
supplied to @var{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.
+since they are passed directly to the specified program.
@strong{Please note:} The argument @var{program} contains only the
name of the program; it may not contain any command-line arguments. You
specify overrides for it with @code{process-environment}. @xref{System
Environment}.
-@defvar exec-directory
+@defvar exec-directory
@pindex wakeup
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
@smallexample
@group
-(call-process-region
- start end
+(call-process-region
+ start end
shell-file-name ; @r{Name of program.}
nil ; @r{Do not delete region.}
buffer ; @r{Send output to @code{buffer}.}
section. XEmacs also sends signals automatically at certain times:
killing a buffer sends a @code{SIGHUP} signal to all its associated
processes; killing XEmacs sends a @code{SIGHUP} signal to all remaining
-processes. (@code{SIGHUP} is a signal that usually indicates that the
-user hung up the phone.)
+processes. (@code{SIGHUP} is a signal that indicates that the
+connection between the user and the process is broken, for example if a
+connection via a telephone line is hung up.)
Each of the signal-sending functions takes two optional arguments:
-@var{process-name} and @var{current-group}.
+@var{process} and @var{current-group}.
- The argument @var{process-name} must be either a process, the name of
-one, or @code{nil}. If it is @code{nil}, the process defaults to the
-process associated with the current buffer. An error is signaled if
-@var{process-name} does not identify a process.
+ The argument @var{process} must be either a process or a buffer,
+the name of one, or @code{nil}. If it is @code{nil}, the process
+defaults to the process associated with the current buffer. An error is
+signaled if @var{process} does not identify a process.
The argument @var{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-@code{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 @code{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.
+is non-@code{nil}, then the signal is sent to the current foreground
+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 @code{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 @var{current-group} has no effect when a pipe is used to
communicate with the subprocess, because the operating system does not
job-control shells won't work when a pipe is used. See
@code{process-connection-type} in @ref{Asynchronous Processes}.
-@defun interrupt-process &optional process-name current-group
-This function interrupts the process @var{process-name} by sending the
-signal @code{SIGINT}. Outside of XEmacs, typing the ``interrupt
-character'' (normally @kbd{C-c} on some systems, and @code{DEL} on
-others) sends this signal. When the argument @var{current-group} is
-non-@code{nil}, you can think of this function as ``typing @kbd{C-c}''
-on the terminal by which XEmacs talks to the subprocess.
+ Some of the functions below take a @var{signal} argument, which
+identifies a signal to be sent. It must be either an integer or a
+symbol which names the signal, like @code{SIGSEGV}.
+
+@defun process-send-signal signal &optional process current-group
+This function sends the signal @var{signal} to the process @var{process}.
+The following functions can be implemented in terms of
+@code{process-send-signal}.
+@end defun
+
+@defun interrupt-process &optional process current-group
+This function interrupts the process @var{process} by sending the signal
+@code{SIGINT}. Outside of XEmacs, typing the ``interrupt character''
+(normally @kbd{C-c}) sends this signal. When the argument
+@var{current-group} is non-@code{nil}, you can think of this function as
+``typing @kbd{C-c}'' on the terminal by which XEmacs talks to the
+subprocess.
@end defun
-@defun kill-process &optional process-name current-group
-This function kills the process @var{process-name} by sending the
+@defun kill-process &optional process current-group
+This function kills the process @var{process} by sending the
signal @code{SIGKILL}. This signal kills the subprocess immediately,
and cannot be handled by the subprocess.
@end defun
-@defun quit-process &optional process-name current-group
+@defun quit-process &optional process current-group
This function sends the signal @code{SIGQUIT} to the process
-@var{process-name}. This signal is the one sent by the ``quit
-character'' (usually @kbd{C-b} or @kbd{C-\}) when you are not inside
-XEmacs.
+@var{process}. This signal is the one sent by the ``quit
+character'' (usually @kbd{C-\}) when you are not inside XEmacs.
@end defun
-@defun stop-process &optional process-name current-group
-This function stops the process @var{process-name} by sending the
+@defun stop-process &optional process current-group
+This function stops the process @var{process} by sending the
signal @code{SIGTSTP}. Use @code{continue-process} to resume its
execution.
on the terminal XEmacs uses to communicate with the subprocess.
@end defun
-@defun continue-process &optional process-name current-group
+@defun continue-process &optional process current-group
This function resumes execution of the process @var{process} by sending
-it the signal @code{SIGCONT}. This presumes that @var{process-name} was
+it the signal @code{SIGCONT}. This presumes that @var{process} was
stopped previously.
@end defun
-@c Emacs 19 feature
@defun signal-process pid signal
-This function sends a signal to process @var{pid}, which need not be
-a child of XEmacs. The argument @var{signal} specifies which signal
-to send; it should be an integer.
+This function sends a signal to the process with process id @var{pid},
+which need not be a child of XEmacs. The argument @var{signal}
+specifies which signal to send.
@end defun
@node Output from Processes
The string describing the event looks like one of the following:
@itemize @bullet
-@item
+@item
@code{"finished\n"}.
@item
@dfn{non-greedy} quantifier, a regexp construct borrowed from Perl.
@c Did perl get this from somewhere? What's the real history of *? ?
-This construct very useful for when you want to match the text inside a
-pair of delimiters. For instance, @samp{/\*.*?\*/} will match C
-comments in a string. This could not be achieved without the use of
-greedy quantifier.
+This construct is very useful for when you want to match the text inside
+a pair of delimiters. For instance, @samp{/\*.*?\*/} will match C
+comments in a string. This could not easily be achieved without the use
+of a non-greedy quantifier.
This construct has not been available prior to XEmacs 20.4. It is not
available in FSF Emacs.
@item +?
@cindex @samp{+?} in regexp
-is the @samp{+} analog to @samp{*?}.
+is the non-greedy version of @samp{+}.
+
+@item ??
+@cindex @samp{??} in regexp
+is the non-greedy version of @samp{?}.
@item \@{n,m\@}
@c Note the spacing after the close brace is deliberate.
more than @var{m} times. This syntax is supported by most Unix regexp
utilities, and has been introduced to XEmacs for the version 20.3.
+Unfortunately, the non-greedy version of this quantifier does not exist
+currently, although it does in Perl.
+
@item [ @dots{} ]
@cindex character set (in regexp)
@cindex @samp{[} in regexp
substring to be recorded for future reference.
This is useful when you need a lot of grouping @samp{\( @dots{} \)}
-constructs, but only want to remember one or two. Then you can use
-not want to remember them for later use with @code{match-string}.
+constructs, but only want to remember one or two -- or if you have
+more than nine groupings and need to use backreferences to refer to
+the groupings at the end.
Using @samp{\(?: @dots{} \)} rather than @samp{\( @dots{} \)} when you
don't need the captured substrings ought to speed up your programs some,
must do. The actual performance gain to be observed has not been
measured or quantified as of this writing.
@c This is used to good advantage by the font-locking code, and by
-@c `regexp-opt.el'. ... It will be. It's not yet, but will be.
+@c `regexp-opt.el'.
The shy grouping operator has been borrowed from Perl, and has not been
available prior to XEmacs 20.3, nor is it available in FSF Emacs.
@defun window-point window
This function returns the current position of point in @var{window}.
-For a nonselected window, this is the value point would have (in that
+For a non-selected window, this is the value point would have (in that
window's buffer) if that window were selected.
When @var{window} is the selected window and its buffer is also the
@finalout
@titlepage
@title XEmacs FAQ
-@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/07/08 09:14:11 $
+@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/09/19 07:50:41 $
@sp 1
@author Tony Rossini <rossini@@biostat.washington.edu>
@author Ben Wing <ben@@xemacs.org>
This is the guide to the XEmacs Frequently Asked Questions list---a
compendium of questions and answers pertaining to one of the finest
-programs ever written. It is much more than just a Text Editor.
+programs ever written. XEmacs is much more than just a Text Editor.
-This FAQ is freely redistributable. I take no liability for the
-correctness and safety of any procedures or advice given here. This
-FAQ is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.
+This FAQ is freely redistributable. This FAQ is distributed in the hope
+that it will be useful, but WITHOUT ANY WARRANTY; without even the
+implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you have a Web browser, the official hypertext version is at
@iftex
@*
@end iftex
-@uref{http://www.xemacs.org/faq/xemacs-faq.html}.
-
-This version is somewhat nicer than the unofficial hypertext versions
-that are archived at Utrecht, Oxford, Smart Pages, and other FAQ
-archives.
+@uref{http://www.xemacs.org/faq/xemacs-faq.html}
@ifset CANONICAL
@html
* Q1.0.4:: Why Another Version of Emacs?
* Q1.0.5:: Why Haven't XEmacs and GNU Emacs Merged?
* Q1.0.6:: Where can I get help?
-* Q1.0.7:: Where is the mailing list archived?
+* Q1.0.7:: Where are the mailing lists archived?
* Q1.0.8:: How do you pronounce XEmacs?
* Q1.0.9:: What does XEmacs look like?
* Q1.0.10:: Is there a port of XEmacs to Microsoft ('95 or NT)?
* Q1.2.3:: Who contributed to the FAQ in the past?
Internationalization:
-* Q1.3.1:: What is the status of XEmacs v20?
-* Q1.3.2:: What is the status of Asian-language support, aka @var{mule}?
+* Q1.3.1:: What is the status of internationalization support aka MULE (including Asian language support?
+* Q1.3.2:: How can I help with internationalization?
* Q1.3.3:: How do I type non-ASCII characters?
* Q1.3.4:: Can XEmacs messages come out in a different language?
-* Q1.3.5:: Please explain the various input methods in MULE/XEmacs 20.0
-* Q1.3.6:: How do I portably code for MULE/XEmacs 20.0?
+* Q1.3.5:: Please explain the various input methods in MULE/XEmacs
+* Q1.3.6:: How do I portably code for MULE/XEmacs?
* Q1.3.7:: How about Cyrillic Modes?
Getting Started:
* Q5.1.4:: What is the performance hit of @code{let}?
* Q5.1.5:: What is the recommended use of @code{setq}?
* Q5.1.6:: What is the typical misuse of @code{setq} ?
-* Q5.1.7:: I like the the @code{do} form of cl, does it slow things down?
+* Q5.1.7:: I like the @code{do} form of cl, does it slow things down?
* Q5.1.8:: I like recursion, does it slow things down?
* Q5.1.9:: How do I put a glyph as annotation in a buffer?
* Q5.1.10:: @code{map-extents} won't traverse all of my extents!
* Q1.0.4:: Why Another Version of Emacs?
* Q1.0.5:: Why Haven't XEmacs and GNU Emacs Merged?
* Q1.0.6:: Where can I get help?
-* Q1.0.7:: Where is the mailing list archived?
+* Q1.0.7:: Where are the mailing lists archived?
* Q1.0.8:: How do you pronounce XEmacs?
* Q1.0.9:: What does XEmacs look like?
* Q1.0.10:: Is there a port of XEmacs to Microsoft ('95 or NT)?
* Q1.2.3:: Who contributed to the FAQ in the past?
Internationalization:
-* Q1.3.1:: What is the status of XEmacs v20?
-* Q1.3.2:: What is the status of Asian-language support, aka @var{mule}?
+* Q1.3.1:: What is the status of internationalization support aka MULE (including Asian language support?
+* Q1.3.2:: How can I help with internationalization?
* Q1.3.3:: How do I type non-ASCII characters?
* Q1.3.4:: Can XEmacs messages come out in a different language?
-* Q1.3.5:: Please explain the various input methods in MULE/XEmacs 20.0
-* Q1.3.6:: How do I portably code for MULE/XEmacs 20.0?
+* Q1.3.5:: Please explain the various input methods in MULE/XEmacs
+* Q1.3.6:: How do I portably code for MULE/XEmacs?
* Q1.3.7:: How about Cyrillic Modes?
Getting Started:
@node Q1.0.2, Q1.0.3, Q1.0.1, Introduction
@unnumberedsubsec Q1.0.2: What is the current version of XEmacs?
-XEmacs 21.1.8 is the current stable version of XEmacs.
-
-XEmacs 20.4 is a minor upgrade from 20.3, containing many bugfixes. It
-was released in February 1998.
+XEmacs versions 21.1.* are releases made from the current stable
+sources. XEmacs versions 21.2.* are releases made from the development
+sources. Check at @uref{http://www.xemacs.org} for the current minor
+version.
XEmacs 19.16 was the last release of v19, released in November, 1997,
which was also the last version without international language support.
@samp{unsubscribe} to be removed.
@node Q1.0.7, Q1.0.8, Q1.0.6, Introduction
-@unnumberedsubsec Q1.0.7: Where is the mailing list archived?
+@unnumberedsubsec Q1.0.7: Where are the mailing lists archived?
The archives can be found at @uref{http://www.xemacs.org/Lists/Archive}
TeX, you can generate your own manual from the XEmacs sources.
HTML and Postscript versions of XEmacs manuals may be available from the
-XEmacs web site in the future.
-
+XEmacs web site in the future. Send requests to @email{faq@@xemacs.org}.
@node Q1.1.1, Q1.1.2, Q1.0.14, Introduction
@unnumberedsec 1.1: Policies
Please make sure that @samp{XEmacs FAQ} appears on the Subject: line.
If you think you have a better way of answering a question, or think a
question should be included, we'd like to hear about it. Questions and
-answers included into the FAQ will be edited for spelling and grammar,
+answers included into the FAQ will be edited for spelling and grammar
and will be attributed. Answers appearing without attribution are
-either from versions of the FAQ dated before May 1996, or are from one
-of the four people listed at the top of this document. Answers quoted
-from Usenet news articles will always be attributed, regardless of the
-author.
+either from versions of the FAQ dated before May 1996 or are from
+previous FAQ maintainers. Answers quoted from Usenet news articles will
+always be attributed, regardless of the author.
@node Q1.1.2, Q1.1.3, Q1.1.1, Introduction
@unnumberedsubsec Q1.1.2: How do I become a Beta Tester?
@node Q1.3.1, Q1.3.2, Q1.2.3, Introduction
@unnumberedsec 1.3: Internationalization
-@unnumberedsubsec Q1.3.1: What is the status of XEmacs v20?
-
-XEmacs v20 is the version of XEmacs that includes MULE (Asian-language)
-support. XEmacs 20.0 was released in February 1997, followed by XEmacs
-20.2 in May, XEmacs 20.3 in November and XEmacs 20.4 in February 1998. When compiled without MULE
-support, 20.4 is approximately as stable as 19.16, and probably faster
-(due to additional optimization work.)
-
-As of XEmacs 20.3, version 20 is @emph{the} supported version of
-XEmacs. This means that 19.16 will optionally receive stability fixes
-(if any), but that all the real development work will be done on the v20
-tree.
-
-The incompatible changes in XEmacs 20 include the additional byte-codes,
-new primitive data types (@code{character}, @code{char-table}, and
-@code{range-table}). This means that the character-integer equivalence
-inherent to all the previous Emacs and XEmacs releases no longer
-applies.
-
-However, to avoid breaking old code, many functions that should normally
-accept characters work with integers, and vice versa. For more
-information, see the Lisp reference manual. Here is a relevant excerpt,
-for your convenience.
+@unnumberedsubsec Q1.3.1: What is the status of internationalization support aka MULE (including Asian language support?
-@quotation
- In XEmacs version 19, and in all versions of FSF GNU Emacs, a
-@dfn{character} in XEmacs Lisp is nothing more than an integer.
-This is yet another holdover from XEmacs Lisp's derivation from
-vintage-1980 Lisps; modern versions of Lisp consider this equivalence
-a bad idea, and have separate character types. In XEmacs version 20,
-the modern convention is followed, and characters are their own
-primitive types. (This change was necessary in order for @sc{mule},
-i.e. Asian-language, support to be correctly implemented.)
-
- Even in XEmacs version 20, remnants of the equivalence between
-characters and integers still exist; this is termed the @dfn{char-int
-confoundance disease}. In particular, many functions such as @code{eq},
-@code{equal}, and @code{memq} have equivalent functions (@code{old-eq},
-@code{old-equal}, @code{old-memq}, etc.) that pretend like characters
-are integers are the same. Byte code compiled under any version 19
-Emacs will have all such functions mapped to their @code{old-} equivalents
-when the byte code is read into XEmacs 20. This is to preserve
-compatibility---Emacs 19 converts all constant characters to the equivalent
-integer during byte-compilation, and thus there is no other way to preserve
-byte-code compatibility even if the code has specifically been written
-with the distinction between characters and integers in mind.
-
- Every character has an equivalent integer, called the @dfn{character
-code}. For example, the character @kbd{A} is represented as the
-@w{integer 65}, following the standard @sc{ascii} representation of
-characters. If XEmacs was not compiled with @sc{mule} support, the
-range of this integer will always be 0 to 255---eight bits, or one
-byte. (Integers outside this range are accepted but silently truncated;
-however, you should most decidedly @emph{not} rely on this, because it
-will not work under XEmacs with @sc{mule} support.) When @sc{mule}
-support is present, the range of character codes is much
-larger. (Currently, 19 bits are used.)
-
- FSF GNU Emacs uses kludgy character codes above 255 to represent
-keyboard input of @sc{ascii} characters in combination with certain
-modifiers. XEmacs does not use this (a more general mechanism is
-used that does not distinguish between @sc{ascii} keys and other
-keys), so you will never find character codes above 255 in a
-non-@sc{mule} XEmacs.
-
- Individual characters are not often used in programs. It is far more
-common to work with @emph{strings}, which are sequences composed of
-characters.
-@end quotation
+Both the stable and development versions of XEmacs include
+internationalization support (aka MULE). MULE currently works on UNIX
+and Linux systems; work for supporting MULE on Windows operating systems
+is in progress. Binaries compiled without MULE support run faster than
+MULE capable XEmacsen.
@node Q1.3.2, Q1.3.3, Q1.3.1, Introduction
-@unnumberedsubsec Q1.3.2: What is the status of Asian-language support, aka MULE?
-
-MULE support is now available for UNIX versions of XEmacs.
+@unnumberedsubsec Q1.3.2: How can I help with internationalization?
If you would like to help, you may want to join the
@email{xemacs-mule@@xemacs.org} mailing list. Especially needed are
The message-catalog support has mostly been written but doesn't
currently work. The first release of XEmacs 20 will @emph{not} support
-it. However, menubar localization @emph{does} work, even in 19.14. To
+it. However, menubar localization @emph{does} work. To
enable it, add to your @file{Emacs} file entries like this:
@example
removing punctuation and capitalizing as above.
@node Q1.3.5, Q1.3.6, Q1.3.4, Introduction
-@unnumberedsubsec Q1.3.5: Please explain the various input methods in MULE/XEmacs 20.0
+@unnumberedsubsec Q1.3.5: Please explain the various input methods in MULE/XEmacs
@email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes:
@end quotation
@node Q1.3.6, Q1.3.7, Q1.3.5, Introduction
-@unnumberedsubsec Q1.3.6: How do I portably code for MULE/XEmacs 20?
+@unnumberedsubsec Q1.3.6: How do I portably code for MULE/XEmacs?
@email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes:
@node Q2.0.1, Q2.0.2, Installation, Installation
@unnumberedsec 2.0: Installation
@unnumberedsubsec Q2.0.1: Running XEmacs without installing
-The @file{INSTALL} file says that up to 108 MB of space is needed
-temporarily during installation! How can I just try it out?
+
+How can I just try XEmacs without installing it?
XEmacs will run in place without requiring installation and copying of
the Lisp directories, and without having to specify a special build-time
@node Q2.0.2, Q2.0.3, Q2.0.1, Installation
@unnumberedsubsec Q2.0.2: XEmacs is too big
-Although this entry has been written for XEmacs 19.13, most of it still
-stands true.
-
-@email{steve@@xemacs.org, Steve Baur} writes:
-
-@quotation
-The 45MB of space required by the installation directories can be
+The space required by the installation directories can be
reduced dramatically if desired. Gzip all the .el files. Remove all
-the packages you'll never want to use (or even ones you do like the two
-obsolete mailcrypts and Gnus 4 in 19.13). Remove the TexInfo manuals.
+the packages you'll never want to use. Remove the TexInfo manuals.
Remove the Info (and use just hardcopy versions of the manual). Remove
most of the stuff in etc. Remove or gzip all the source code. Gzip or
remove the C source code. Configure it so that copies are not made of
-the support lisp. I'm not advocating any of these things, just pointing
-out ways to reduce the disk requirements if desired.
-
-Now examine the space used by directory:
-
-@format
-0 /usr/local/bin/xemacs
-2048 /usr/local/bin/xemacs-19.13
-
-1546 /usr/local/lib/xemacs-19.13/i486-miranova-sco3.2v4.2
-1158 /usr/local/lib/xemacs-19.13/i486-unknown-linux1.2.13
-@end format
-
-You need to keep these. XEmacs isn't stripped by default in
-installation, you should consider stripping. That will save you about
-5MB right there.
-
-@format
-207 /usr/local/lib/xemacs-19.13/etc/w3
-122 /usr/local/lib/xemacs-19.13/etc/sounds
-18 /usr/local/lib/xemacs-19.13/etc/sparcworks
-159 /usr/local/lib/xemacs-19.13/etc/vm
-6 /usr/local/lib/xemacs-19.13/etc/e
-21 /usr/local/lib/xemacs-19.13/etc/eos
-172 /usr/local/lib/xemacs-19.13/etc/toolbar
-61 /usr/local/lib/xemacs-19.13/etc/ns
-43 /usr/local/lib/xemacs-19.13/etc/gnus
-@end format
-
-These are support directories for various packages. In general they
-match a directory under ./xemacs-19.13/lib/xemacs-19.13/lisp/. If you
-do not require the package, you may delete or gzip the support too.
-
-@format
-1959 /usr/local/lib/xemacs-19.13/etc
-175 /usr/local/lib/xemacs-19.13/lisp/bytecomp
-340 /usr/local/lib/xemacs-19.13/lisp/calendar
-342 /usr/local/lib/xemacs-19.13/lisp/comint
-517 /usr/local/lib/xemacs-19.13/lisp/dired
-42 /usr/local/lib/xemacs-19.13/lisp/electric
-212 /usr/local/lib/xemacs-19.13/lisp/emulators
-238 /usr/local/lib/xemacs-19.13/lisp/energize
-289 /usr/local/lib/xemacs-19.13/lisp/gnus
-457 /usr/local/lib/xemacs-19.13/lisp/ilisp
-1439 /usr/local/lib/xemacs-19.13/lisp/modes
-2276 /usr/local/lib/xemacs-19.13/lisp/packages
-1040 /usr/local/lib/xemacs-19.13/lisp/prim
-176 /usr/local/lib/xemacs-19.13/lisp/pcl-cvs
-154 /usr/local/lib/xemacs-19.13/lisp/rmail
-3 /usr/local/lib/xemacs-19.13/lisp/epoch
-45 /usr/local/lib/xemacs-19.13/lisp/term
-860 /usr/local/lib/xemacs-19.13/lisp/utils
-851 /usr/local/lib/xemacs-19.13/lisp/vm
-13 /usr/local/lib/xemacs-19.13/lisp/vms
-157 /usr/local/lib/xemacs-19.13/lisp/x11
-19 /usr/local/lib/xemacs-19.13/lisp/tooltalk
-14 /usr/local/lib/xemacs-19.13/lisp/sunpro
-291 /usr/local/lib/xemacs-19.13/lisp/games
-198 /usr/local/lib/xemacs-19.13/lisp/edebug
-619 /usr/local/lib/xemacs-19.13/lisp/w3
-229 /usr/local/lib/xemacs-19.13/lisp/eos
-55 /usr/local/lib/xemacs-19.13/lisp/iso
-59 /usr/local/lib/xemacs-19.13/lisp/mailcrypt
-187 /usr/local/lib/xemacs-19.13/lisp/eterm
-356 /usr/local/lib/xemacs-19.13/lisp/ediff
-408 /usr/local/lib/xemacs-19.13/lisp/hyperbole/kotl
-1262 /usr/local/lib/xemacs-19.13/lisp/hyperbole
-247 /usr/local/lib/xemacs-19.13/lisp/hm--html-menus
-161 /usr/local/lib/xemacs-19.13/lisp/mh-e
-299 /usr/local/lib/xemacs-19.13/lisp/viper
-53 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-x
-4 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/DocWindow.nib
-3 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib
-3 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/TreeView.nib
-11 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj
-53 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx
-466 /usr/local/lib/xemacs-19.13/lisp/oobr
-14142 /usr/local/lib/xemacs-19.13/lisp
-@end format
+the support lisp.
These are all Emacs Lisp source code and bytecompiled object code. You
may safely gzip everything named *.el here. You may remove any package
that you do not use}. You must be sure you do not use it though, so be
conservative at first.
-Possible candidates for deletion include w3 (newer versions exist, or
-you may just use Lynx or Netscape for web browsing), games, hyperbole,
-mh-e, hm--html-menus (better packages exist), vm, viper, oobr, gnus (new
-versions exist), etc. Ask yourself, @emph{Do I ever want to use this
-package?} If the answer is no, then it is a candidate for removal.
+Possible candidates for deletion include w3, games, hyperbole, mh-e,
+hm-html-menus, vm, viper, oobr, gnus, etc. Ask yourself, @emph{Do I
+ever want to use this package?} If the answer is no, then it is a
+candidate for removal.
First, gzip all the .el files. Then go about package by package and
start gzipping the .elc files. Then run XEmacs and do whatever it is
you normally do. If nothing bad happens, then delete the directory. Be
conservative about deleting directories, and it would be handy to have a
-backup tape around in case you get too zealous.
+backup around in case you get too zealous.
@file{prim}, @file{modes}, @file{packages}, and @file{utils} are four
directories you definitely do @strong{not} want to delete, although
certain packages can be removed from them if you do not use them.
-@example
-1972 /usr/local/lib/xemacs-19.13/info
-@end example
-
-These are online texinfo sources. You may either gzip them or remove
-them. In either case, @kbd{C-h i} (info mode) will no longer work.
-
-@example
-20778 /usr/local/lib/xemacs-19.13
-@end example
-
-The 20MB achieved is less than half of what the full distribution takes up,
-@strong{and} can be achieved without deleting a single file.
-@end quotation
-
-@email{boffi@@hp735.stru.polimi.it, Giacomo Boffi} provides this procedure:
-
-@quotation
-Substitute @file{/usr/local/lib/} with the path where the xemacs tree is
-rooted, then use this script:
-
-@example
-#!/bin/sh
-
-r=/usr/local/lib/xemacs-19.13/lisp
-
-cd $r ; rm -f cmpr ; touch cmpr
-
-du -s .
-
-for d in * ; do
- if test -d $d ; then
- cd $d
- for f in *.el ; do
-# compress (remove) only (ONLY) the sources that have a
-# corresponding compiled file --- do not (DO NOT)
-# touch other sources
- if test -f $@{f@}c ; then gzip -v9 $f >> $r/cmpr ; fi
- done
- cd ..
- fi
-done
-
-du -s .
-@end example
-
-A step beyond would be substituting @samp{rm -f} for @samp{gzip -v9},
-but you have to be desperate for removing the sources (remember that
-emacs can access compressed files transparently).
-
-Also, a good megabyte could easily be trimmed from the $r/../etc
-directory, e.g., the termcap files, some O+NEWS, others that I don't
-remember as well.
-@end quotation
-
-@quotation
-XEmacs 21.0 will unbundle the lisp hierarchy and allow the installer
-to choose exactly how much support code gets installed.
-@end quotation
+Online texinfo sources in the @file{info} can either be compressed them
+or remove them. In either case, @kbd{C-h i} (info mode) will no longer
+work.
@node Q2.0.3, Q2.0.4, Q2.0.2, Installation
@unnumberedsubsec Q2.0.3: Compiling XEmacs with Netaudio.
@unnumberedsubsec Q2.0.5: Do I need X11 to run XEmacs?
No. The name @dfn{XEmacs} is unfortunate in the sense that it is
-@strong{not} an X Window System-only version of Emacs. Starting with
-19.14 XEmacs has full color support on a color-capable character
-terminal.
+@strong{not} an X Window System-only version of Emacs. XEmacs has
+full color support on a color-capable character terminal.
@node Q2.0.6, Q2.0.7, Q2.0.5, Installation
@unnumberedsubsec Q2.0.6: I'm having strange crashes. What do I do?
* Q5.1.4:: What is the performance hit of @code{let}?
* Q5.1.5:: What is the recommended use of @code{setq}?
* Q5.1.6:: What is the typical misuse of @code{setq}?
-* Q5.1.7:: I like the the @code{do} form of cl, does it slow things down?
+* Q5.1.7:: I like the @code{do} form of cl, does it slow things down?
* Q5.1.8:: I like recursion, does it slow things down?
* Q5.1.9:: How do I put a glyph as annotation in a buffer?
* Q5.1.10:: @code{map-extents} won't traverse all of my extents!
@end lisp
@node Q5.1.7, Q5.1.8, Q5.1.6, Miscellaneous
-@unnumberedsubsec Q5.1.7: I like the the @code{do} form of cl, does it slow things down?
+@unnumberedsubsec Q5.1.7: I like the @code{do} form of cl, does it slow things down?
It shouldn't. Here is what Dave Gillespie has to say about cl.el
performance:
list. That is inappropriate. Whether you use Auto Fill mode or not is
a matter of personal taste, not a matter of the contents of particular
files. If you want to use Auto Fill, set up major mode hooks with your
-file file to turn it on (when appropriate) for you alone
+init file to turn it on (when appropriate) for you alone
(@pxref{Init File}). Don't try to use a local variable list that would
impose your taste on everyone working with the file.
colors: It uses whatever resources are appropriate to the type of widget
which is used to implement it.
-If Emacs was compiled to use only the Motif-lookalike menu widgets, then one
-way to specify the font of the menubar would be
+If Emacs was compiled to use only the Lucid Motif-lookalike menu widgets,
+then one way to specify the font of the menubar would be
@example
Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
@end example
+If both the Lucid Motif-lookalike menu widgets and X Font Sets are
+configured to allow multilingual menubars, then one uses
+
+@example
+*menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
+ -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
+@end example
+
+That would specify fonts for a Japanese menubar. Specifying only one
+XLFD is acceptable; specifying more than one for a given registry
+(language) is also allowed. When X Font Sets are configured, some .font
+resources (eg, menubars) are ignored in favor of the corresponding
+.fontSet resources.
+
If the Motif library is being used, then one would have to use
@example
keyboards lacking a @key{META} key. Unlike the @key{META} key (which,
like the @key{SHIFT} key, is held down while another character is
typed), the @key{ESC} key is pressed and released, and applies to the
-next character typed.
+next character typed.
@item Fill Prefix
The fill prefix is a string that Emacs enters at the beginning
@item Scrolling
Scrolling means shifting the text in the Emacs window to make a
-different part ot the buffer visible. @xref{Display,Scrolling}.
+different part of the buffer visible. @xref{Display,Scrolling}.
@item Searching
Searching means moving point to the next occurrence of a specified
A termscript file contains a record of all characters Emacs sent to
the terminal. It is used for tracking down bugs in Emacs redisplay.
Emacs does not make a termscript file unless explicitly instructed to do
-so.
+so.
@xref{Bugs}.
@item Text
@xref{Windows}, for commands to control the use of windows. Note that if
you are running Emacs under X, terminology can be confusing: Each Emacs
frame occupies a separate X window and can, in turn, be divided into
-different subwindows.
+different subwindows.
@item Word Abbrev
Synonymous with `abbrev'.
n} (@code{view-emacs-news}) displays the file @file{xemacs/etc/NEWS},
which contains documentation on XEmacs changes arranged chronologically.
@kbd{C-h F} (@code{xemacs-local-faq}) displays local version of the
-XEmacs frequentliy-answered-questions-list. @kbd{C-h t}
+XEmacs frequently-answered-questions-list. @kbd{C-h t}
(@code{help-with-tutorial}) displays the learn-by-doing XEmacs
tutorial. @kbd{C-h C-c} (@code{describe-copying}) displays the file
@file{xemacs/etc/COPYING}, which tells you the conditions you must obey
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,
+(Hangul and Hanja) and Cyrillic script (for Byelorussian, 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'').
within searches (@kbd{C-q}, @kbd{C-w}, @kbd{C-r}, @kbd{C-s}, or @kbd{C-y}).
Sometimes you search for @samp{FOO} and find it, but were actually
-looking for a different occurence of it. To move to the next occurrence
+looking for a different occurrence of it. To move to the next occurrence
of the search string, type another @kbd{C-s}. Do this as often as
necessary. If you overshoot, you can cancel some @kbd{C-s}
characters with @key{DEL}.
@cindex regexp
A @dfn{regular expression} (@dfn{regexp}, for short) is a pattern that
-denotes a set of strings, possibly an infinite set. Searching for matches
+denotes a (possibly infinite) set of strings. Searching for matches
for a regexp is a powerful operation that editors on Unix systems have
-traditionally offered. In XEmacs, you can search for the next match for
-a regexp either incrementally or not.
+traditionally offered.
+
+ To gain a thorough understanding of regular expressions and how to use
+them to best advantage, we recommend that you study @cite{Mastering
+Regular Expressions, by Jeffrey E.F. Friedl, O'Reilly and Associates,
+1997}. (It's known as the "Hip Owls" book, because of the picture on its
+cover.) You might also read the manuals to @ref{(gawk)Top},
+@ref{(ed)Top}, @cite{sed}, @cite{grep}, @ref{(perl)Top},
+@ref{(regex)Top}, @ref{(rx)Top}, @cite{pcre}, and @ref{(flex)Top}, which
+also make good use of regular expressions.
+
+ The XEmacs regular expression syntax most closely resembles that of
+@cite{ed}, or @cite{grep}, the GNU versions of which all utilize the GNU
+@cite{regex} library. XEmacs' version of @cite{regex} has recently been
+extended with some Perl--like capabilities, described in the next
+section.
+
+ In XEmacs, you can search for the next match for a regexp either
+incrementally or not.
@kindex M-C-s
+@kindex M-C-r
@findex isearch-forward-regexp
@findex isearch-backward-regexp
Incremental search for a regexp is done by typing @kbd{M-C-s}
regexp rather than looking for an exact match against the text in the
buffer. Each time you add text to the search string, you make the regexp
longer, and the new regexp is searched for. A reverse regexp search command
-@code{isearch-backward-regexp} also exists, but no key runs it.
+@code{isearch-backward-regexp} also exists, bound to @kbd{M-C-r}.
All of the control characters that do special things within an ordinary
incremental search have the same functionality in incremental regexp search.
@code{re-search-forward} and @code{re-search-backward}. You can invoke
them with @kbd{M-x} or bind them to keys. You can also call
@code{re-search-forward} by way of incremental regexp search with
-@kbd{M-C-s @key{RET}}.
+@kbd{M-C-s @key{RET}}; similarly for @code{re-search-backward} with
+@kbd{M-C-r @key{RET}}.
@node Regexps, Search Case, Regexp Search, Search
@section Syntax of Regular Expressions
-Regular expressions have a syntax in which a few characters are special
-constructs and the rest are @dfn{ordinary}. An ordinary character is a
-simple regular expression which matches that character and nothing else.
-The special characters are @samp{$}, @samp{^}, @samp{.}, @samp{*},
-@samp{+}, @samp{?}, @samp{[}, @samp{]} and @samp{\}; no new special
-characters will be defined. Any other character appearing in a regular
-expression is ordinary, unless a @samp{\} precedes it.@refill
+ Regular expressions have a syntax in which a few characters are
+special constructs and the rest are @dfn{ordinary}. An ordinary
+character is a simple regular expression that matches that character and
+nothing else. The special characters are @samp{.}, @samp{*}, @samp{+},
+@samp{?}, @samp{[}, @samp{]}, @samp{^}, @samp{$}, and @samp{\}; no new
+special characters will be defined in the future. Any other character
+appearing in a regular expression is ordinary, unless a @samp{\}
+precedes it.
For example, @samp{f} is not a special character, so it is ordinary, and
-therefore @samp{f} is a regular expression that matches the string @samp{f}
-and no other string. (It does @i{not} match the string @samp{ff}.) Likewise,
-@samp{o} is a regular expression that matches only @samp{o}.@refill
+therefore @samp{f} is a regular expression that matches the string
+@samp{f} and no other string. (It does @emph{not} match the string
+@samp{ff}.) Likewise, @samp{o} is a regular expression that matches
+only @samp{o}.@refill
Any two regular expressions @var{a} and @var{b} can be concatenated. The
-result is a regular expression which matches a string if @var{a} matches
+result is a regular expression that matches a string if @var{a} matches
some amount of the beginning of that string and @var{b} matches the rest of
the string.@refill
-As a simple example, you can concatenate the regular expressions @samp{f}
+As a simple example, we can concatenate the regular expressions @samp{f}
and @samp{o} to get the regular expression @samp{fo}, which matches only
-the string @samp{fo}. To do something nontrivial, you
-need to use one of the following special characters:
+the string @samp{fo}. Still trivial. To do something more powerful, you
+need to use one of the special characters. Here is a list of them:
+@need 1200
@table @kbd
@item .@: @r{(Period)}
+@cindex @samp{.} in regexp
is a special character that matches any single character except a newline.
-Using concatenation, you can make regular expressions like @samp{a.b}, which
-matches any three-character string which begins with @samp{a} and ends with
+Using concatenation, we can make regular expressions like @samp{a.b}, which
+matches any three-character string that begins with @samp{a} and ends with
@samp{b}.@refill
@item *
-is not a construct by itself; it is a suffix, which means the
-preceding regular expression is to be repeated as many times as
+@cindex @samp{*} in regexp
+is not a construct by itself; it is a quantifying suffix operator that
+means to repeat the preceding regular expression as many times as
possible. In @samp{fo*}, the @samp{*} applies to the @samp{o}, so
@samp{fo*} matches one @samp{f} followed by any number of @samp{o}s.
The case of zero @samp{o}s is allowed: @samp{fo*} does match
@samp{f}.@refill
-@samp{*} always applies to the @i{smallest} possible preceding
+@samp{*} always applies to the @emph{smallest} possible preceding
expression. Thus, @samp{fo*} has a repeating @samp{o}, not a
repeating @samp{fo}.@refill
-The matcher processes a @samp{*} construct by immediately matching
-as many repetitions as it can find. Then it continues with the rest
-of the pattern. If that fails, backtracking occurs, discarding some
-of the matches of the @samp{*}-modified construct in case that makes
-it possible to match the rest of the pattern. For example, matching
-@samp{ca*ar} against the string @samp{caaar}, the @samp{a*} first
-tries to match all three @samp{a}s; but the rest of the pattern is
-@samp{ar} and there is only @samp{r} left to match, so this try fails.
-The next alternative is for @samp{a*} to match only two @samp{a}s.
-With this choice, the rest of the regexp matches successfully.@refill
+The matcher processes a @samp{*} construct by matching, immediately, as
+many repetitions as can be found; it is "greedy". Then it continues
+with the rest of the pattern. If that fails, backtracking occurs,
+discarding some of the matches of the @samp{*}-modified construct in
+case that makes it possible to match the rest of the pattern. For
+example, in matching @samp{ca*ar} against the string @samp{caaar}, the
+@samp{a*} first tries to match all three @samp{a}s; but the rest of the
+pattern is @samp{ar} and there is only @samp{r} left to match, so this
+try fails. The next alternative is for @samp{a*} to match only two
+@samp{a}s. With this choice, the rest of the regexp matches
+successfully.@refill
+
+Nested repetition operators can be extremely slow if they specify
+backtracking loops. For example, it could take hours for the regular
+expression @samp{\(x+y*\)*a} to match the sequence
+@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}. The slowness is because
+Emacs must try each imaginable way of grouping the 35 @samp{x}'s before
+concluding that none of them can work. To make sure your regular
+expressions run fast, check nested repetitions carefully.
@item +
-is a suffix character similar to @samp{*} except that it requires that
-the preceding expression be matched at least once. For example,
-@samp{ca+r} will match the strings @samp{car} and @samp{caaaar}
-but not the string @samp{cr}, whereas @samp{ca*r} would match all
-three strings.@refill
+@cindex @samp{+} in regexp
+is a quantifying suffix operator similar to @samp{*} except that the
+preceding expression must match at least once. It is also "greedy".
+So, for example, @samp{ca+r} matches the strings @samp{car} and
+@samp{caaaar} but not the string @samp{cr}, whereas @samp{ca*r} matches
+all three strings.
@item ?
-is a suffix character similar to @samp{*} except that it can match the
-preceding expression either once or not at all. For example,
-@samp{ca?r} will match @samp{car} or @samp{cr}; nothing else.
+@cindex @samp{?} in regexp
+is a quantifying suffix operator similar to @samp{*}, except that the
+preceding expression can match either once or not at all. For example,
+@samp{ca?r} matches @samp{car} or @samp{cr}, but does not match anything
+else.
+
+@item *?
+@cindex @samp{*?} in regexp
+works just like @samp{*}, except that rather than matching the longest
+match, it matches the shortest match. @samp{*?} is known as a
+@dfn{non-greedy} quantifier, a regexp construct borrowed from Perl.
+@c Did perl get this from somewhere? What's the real history of *? ?
+
+This construct is very useful for when you want to match the text inside
+a pair of delimiters. For instance, @samp{/\*.*?\*/} will match C
+comments in a string. This could not easily be achieved without the use
+of a non-greedy quantifier.
+
+This construct has not been available prior to XEmacs 20.4. It is not
+available in FSF Emacs.
+
+@item +?
+@cindex @samp{+?} in regexp
+is the non-greedy version of @samp{+}.
+
+@item ??
+@cindex @samp{??} in regexp
+is the non-greedy version of @samp{?}.
+
+@item \@{n,m\@}
+@c Note the spacing after the close brace is deliberate.
+@cindex @samp{\@{n,m\@} }in regexp
+serves as an interval quantifier, analogous to @samp{*} or @samp{+}, but
+specifies that the expression must match at least @var{n} times, but no
+more than @var{m} times. This syntax is supported by most Unix regexp
+utilities, and has been introduced to XEmacs for the version 20.3.
+
+Unfortunately, the non-greedy version of this quantifier does not exist
+currently, although it does in Perl.
@item [ @dots{} ]
+@cindex character set (in regexp)
+@cindex @samp{[} in regexp
+@cindex @samp{]} in regexp
@samp{[} begins a @dfn{character set}, which is terminated by a
-@samp{]}. In the simplest case, the characters between the two form
-the set. Thus, @samp{[ad]} matches either one @samp{a} or one
-@samp{d}, and @samp{[ad]*} matches any string composed of just
-@samp{a}s and @samp{d}s (including the empty string), from which it
-follows that @samp{c[ad]*r} matches @samp{cr}, @samp{car}, @samp{cdr},
+@samp{]}. In the simplest case, the characters between the two brackets
+form the set. Thus, @samp{[ad]} matches either one @samp{a} or one
+@samp{d}, and @samp{[ad]*} matches any string composed of just @samp{a}s
+and @samp{d}s (including the empty string), from which it follows that
+@samp{c[ad]*r} matches @samp{cr}, @samp{car}, @samp{cdr},
@samp{caddaar}, etc.@refill
-You can include character ranges in a character set by writing two
+The usual regular expression special characters are not special inside a
+character set. A completely different set of special characters exists
+inside character sets: @samp{]}, @samp{-} and @samp{^}.@refill
+
+@samp{-} is used for ranges of characters. To write a range, write two
characters with a @samp{-} between them. Thus, @samp{[a-z]} matches any
-lower-case letter. Ranges may be intermixed freely with individual
-characters, as in @samp{[a-z$%.]}, which matches any lower-case letter
-or @samp{$}, @samp{%}, or period.
-@refill
+lower case letter. Ranges may be intermixed freely with individual
+characters, as in @samp{[a-z$%.]}, which matches any lower case letter
+or @samp{$}, @samp{%}, or a period.@refill
-Note that inside a character set the usual special characters are not
-special any more. A completely different set of special characters
-exists inside character sets: @samp{]}, @samp{-}, and @samp{^}.@refill
+To include a @samp{]} in a character set, make it the first character.
+For example, @samp{[]a]} matches @samp{]} or @samp{a}. To include a
+@samp{-}, write @samp{-} as the first character in the set, or put it
+immediately after a range. (You can replace one individual character
+@var{c} with the range @samp{@var{c}-@var{c}} to make a place to put the
+@samp{-}.) There is no way to write a set containing just @samp{-} and
+@samp{]}.
-To include a @samp{]} in a character set, you must make it the first
-character. For example, @samp{[]a]} matches @samp{]} or @samp{a}. To
-include a @samp{-}, write @samp{---}, which is a range containing only
-@samp{-}. To include @samp{^}, make it other than the first character
-in the set.@refill
+To include @samp{^} in a set, put it anywhere but at the beginning of
+the set.
@item [^ @dots{} ]
+@cindex @samp{^} in regexp
@samp{[^} begins a @dfn{complement character set}, which matches any
character except the ones specified. Thus, @samp{[^a-z0-9A-Z]}
-matches all characters @i{except} letters and digits.@refill
+matches all characters @emph{except} letters and digits.@refill
@samp{^} is not special in a character set unless it is the first
character. The character following the @samp{^} is treated as if it
-were first (@samp{-} and @samp{]} are not special there).
+were first (thus, @samp{-} and @samp{]} are not special there).
Note that a complement character set can match a newline, unless
newline is mentioned as one of the characters not to match.
@item ^
-is a special character that matches the empty string, but only if at
-the beginning of a line in the text being matched. Otherwise, it fails
-to match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs
-at the beginning of a line.
+@cindex @samp{^} in regexp
+@cindex beginning of line in regexp
+is a special character that matches the empty string, but only at the
+beginning of a line in the text being matched. Otherwise it fails to
+match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at
+the beginning of a line.
+
+When matching a string instead of a buffer, @samp{^} matches at the
+beginning of the string or after a newline character @samp{\n}.
@item $
+@cindex @samp{$} in regexp
is similar to @samp{^} but matches only at the end of a line. Thus,
-@samp{xx*$} matches a string of one @samp{x} or more at the end of a line.
+@samp{x+$} matches a string of one @samp{x} or more at the end of a line.
+
+When matching a string instead of a buffer, @samp{$} matches at the end
+of the string or before a newline character @samp{\n}.
@item \
-does two things: it quotes the special characters (including
+@cindex @samp{\} in regexp
+has two functions: it quotes the special characters (including
@samp{\}), and it introduces additional special constructs.
Because @samp{\} quotes special characters, @samp{\$} is a regular
expression that matches only @samp{$}, and @samp{\[} is a regular
-expression that matches only @samp{[}, and so on.@refill
+expression that matches only @samp{[}, and so on.
+
+@c Removed a paragraph here in lispref about doubling backslashes inside
+@c of Lisp strings.
+
@end table
-Note: for historical compatibility, special characters are treated as
-ordinary ones if they are in contexts where their special meanings make no
-sense. For example, @samp{*foo} treats @samp{*} as ordinary since there is
-no preceding expression on which the @samp{*} can act. It is poor practice
-to depend on this behavior; better to quote the special character anyway,
-regardless of where is appears.@refill
+@strong{Please note:} For historical compatibility, special characters
+are treated as ordinary ones if they are in contexts where their special
+meanings make no sense. For example, @samp{*foo} treats @samp{*} as
+ordinary since there is no preceding expression on which the @samp{*}
+can act. It is poor practice to depend on this behavior; quote the
+special character anyway, regardless of where it appears.@refill
-Usually, @samp{\} followed by any character matches only
+For the most part, @samp{\} followed by any character matches only
that character. However, there are several exceptions: characters
-which, when preceded by @samp{\}, are special constructs. Such
+that, when preceded by @samp{\}, are special constructs. Such
characters are always ordinary when encountered on their own. Here
-is a table of @samp{\} constructs.
+is a table of @samp{\} constructs:
@table @kbd
@item \|
+@cindex @samp{|} in regexp
+@cindex regexp alternative
specifies an alternative.
Two regular expressions @var{a} and @var{b} with @samp{\|} in
-between form an expression that matches anything @var{a} or
+between form an expression that matches anything that either @var{a} or
@var{b} matches.@refill
Thus, @samp{foo\|bar} matches either @samp{foo} or @samp{bar}
Full backtracking capability exists to handle multiple uses of @samp{\|}.
@item \( @dots{} \)
+@cindex @samp{(} in regexp
+@cindex @samp{)} in regexp
+@cindex regexp grouping
is a grouping construct that serves three purposes:
@enumerate
Thus, @samp{\(foo\|bar\)x} matches either @samp{foox} or @samp{barx}.
@item
-To enclose a complicated expression for the postfix @samp{*} to operate on.
-Thus, @samp{ba\(na\)*} matches @samp{bananana}, etc., with any (zero or
-more) number of @samp{na} strings.@refill
+To enclose an expression for a suffix operator such as @samp{*} to act
+on. Thus, @samp{ba\(na\)*} matches @samp{bananana}, etc., with any
+(zero or more) number of @samp{na} strings.@refill
@item
-To mark a matched substring for future reference.
-
+To record a matched substring for future reference.
@end enumerate
This last application is not a consequence of the idea of a
-parenthetical grouping; it is a separate feature which happens to be
+parenthetical grouping; it is a separate feature that happens to be
assigned as a second meaning to the same @samp{\( @dots{} \)} construct
-because in practice there is no conflict between the two meanings.
-Here is an explanation:
+because there is no conflict in practice between the two meanings.
+Here is an explanation of this feature:
@item \@var{digit}
-after the end of a @samp{\( @dots{} \)} construct, the matcher remembers the
-beginning and end of the text matched by that construct. Then, later on
-in the regular expression, you can use @samp{\} followed by @var{digit}
-to mean ``match the same text matched the @var{digit}'th time by the
-@samp{\( @dots{} \)} construct.''@refill
-
-The strings matching the first nine @samp{\( @dots{} \)} constructs appearing
-in a regular expression are assigned numbers 1 through 9 in order that the
-open-parentheses appear in the regular expression. @samp{\1} through
-@samp{\9} may be used to refer to the text matched by the corresponding
+matches the same text that matched the @var{digit}th occurrence of a
@samp{\( @dots{} \)} construct.
+In other words, after the end of a @samp{\( @dots{} \)} construct. the
+matcher remembers the beginning and end of the text matched by that
+construct. Then, later on in the regular expression, you can use
+@samp{\} followed by @var{digit} to match that same text, whatever it
+may have been.
+
+The strings matching the first nine @samp{\( @dots{} \)} constructs
+appearing in a regular expression are assigned numbers 1 through 9 in
+the order that the open parentheses appear in the regular expression.
+So you can use @samp{\1} through @samp{\9} to refer to the text matched
+by the corresponding @samp{\( @dots{} \)} constructs.
+
For example, @samp{\(.*\)\1} matches any newline-free string that is
composed of two identical halves. The @samp{\(.*\)} matches the first
half, which may be anything, but the @samp{\1} that follows must match
the same exact text.
+@item \(?: @dots{} \)
+@cindex @samp{\(?:} in regexp
+@cindex regexp grouping
+is called a @dfn{shy} grouping operator, and it is used just like
+@samp{\( @dots{} \)}, except that it does not cause the matched
+substring to be recorded for future reference.
+
+This is useful when you need a lot of grouping @samp{\( @dots{} \)}
+constructs, but only want to remember one or two -- or if you have
+more than nine groupings and need to use backreferences to refer to
+the groupings at the end.
+
+Using @samp{\(?: @dots{} \)} rather than @samp{\( @dots{} \)} when you
+don't need the captured substrings ought to speed up your programs some,
+since it shortens the code path followed by the regular expression
+engine, as well as the amount of memory allocation and string copying it
+must do. The actual performance gain to be observed has not been
+measured or quantified as of this writing.
+@c This is used to good advantage by the font-locking code, and by
+@c `regexp-opt.el'.
+
+The shy grouping operator has been borrowed from Perl, and has not been
+available prior to XEmacs 20.3, nor is it available in FSF Emacs.
+
+@item \w
+@cindex @samp{\w} in regexp
+matches any word-constituent character. The editor syntax table
+determines which characters these are. @xref{Syntax}.
+
+@item \W
+@cindex @samp{\W} in regexp
+matches any character that is not a word constituent.
+
+@item \s@var{code}
+@cindex @samp{\s} in regexp
+matches any character whose syntax is @var{code}. Here @var{code} is a
+character that represents a syntax code: thus, @samp{w} for word
+constituent, @samp{-} for whitespace, @samp{(} for open parenthesis,
+etc. @xref{Syntax}, for a list of syntax codes and the characters that
+stand for them.
+
+@item \S@var{code}
+@cindex @samp{\S} in regexp
+matches any character whose syntax is not @var{code}.
+@end table
+
+ The following regular expression constructs match the empty string---that is,
+they don't use up any characters---but whether they match depends on the
+context.
+
+@table @kbd
@item \`
-matches the empty string, provided it is at the beginning
-of the buffer.
+@cindex @samp{\`} in regexp
+matches the empty string, but only at the beginning
+of the buffer or string being matched against.
@item \'
-matches the empty string, provided it is at the end of
-the buffer.
+@cindex @samp{\'} in regexp
+matches the empty string, but only at the end of
+the buffer or string being matched against.
+
+@item \=
+@cindex @samp{\=} in regexp
+matches the empty string, but only at point.
+(This construct is not defined when matching against a string.)
@item \b
-matches the empty string, provided it is at the beginning or
+@cindex @samp{\b} in regexp
+matches the empty string, but only at the beginning or
end of a word. Thus, @samp{\bfoo\b} matches any occurrence of
@samp{foo} as a separate word. @samp{\bballs?\b} matches
@samp{ball} or @samp{balls} as a separate word.@refill
@item \B
-matches the empty string, provided it is @i{not} at the beginning or
+@cindex @samp{\B} in regexp
+matches the empty string, but @emph{not} at the beginning or
end of a word.
@item \<
-matches the empty string, provided it is at the beginning of a word.
+@cindex @samp{\<} in regexp
+matches the empty string, but only at the beginning of a word.
@item \>
-matches the empty string, provided it is at the end of a word.
-
-@item \w
-matches any word-constituent character. The editor syntax table
-determines which characters these are.
-
-@item \W
-matches any character that is not a word-constituent.
-
-@item \s@var{code}
-matches any character whose syntax is @var{code}. @var{code} is a
-character which represents a syntax code: thus, @samp{w} for word
-constituent, @samp{-} for whitespace, @samp{(} for open-parenthesis,
-etc. @xref{Syntax}.@refill
-
-@item \S@var{code}
-matches any character whose syntax is not @var{code}.
+@cindex @samp{\>} in regexp
+matches the empty string, but only at the end of a word.
@end table
Here is a complicated regexp used by Emacs to recognize the end of a
@cindex root of a hierarchy
Whenever this section refers to a directory using the shorthand
@code{<root>}, it means that XEmacs searches for it under all
-hierarchies under all hierarchies XEmacs was able to scrounge up. In a
+hierarchies XEmacs was able to scrounge up. In a
running XEmacs, the hierarchy roots are stored in the variable
@code{emacs-roots}.
@vindex emacs-roots
package hierarchies with the @code{--package-path} option to configure.
@cindex package path
The early, late, and last components of the package path are separated
-by double instead of single colons. If three components are present,
-they are locate the early, late, and last package hierarchies
+by double instead of single colons. If all three components are
+present, they locate the early, late, and last package hierarchies
respectively. If two components are present, they locate the early and
-late hierarchies. If only one component is present, it locates the late
-hierarchy. At run time, the package path may also be specified via the
-@code{EMACSPACKAGEPATH} environment variable.
+late hierarchies. If only one component is present, it locates the
+late hierarchy. At run time, the package path may also be specified via
+the @code{EMACSPACKAGEPATH} environment variable.
An XEmacs package is laid out just like a normal installed XEmacs lisp
directory. It may have @file{lisp}, @file{etc}, @file{info}, and
/*
* Each dynamically loaded Emacs module is given a name at compile
* time. This is a short name, and must be a valid part of a C
- * identifier. This name is used to contruct the name of several
+ * identifier. This name is used to construct the name of several
* functions which must appear in the module source code.
- * The first such function, modules_of_XXXX, should load in any dependant
+ * The first such function, modules_of_XXXX, should load in any dependent
* modules. This function is optional, and the module will still load if
* it is not present in the module.
*
{
/*
* This function isn't actually required as we will not be loading
- * in any dependant modules, but if we were, we would do something like:
- * emodules_load ("dependant.ell", "sample2", "1.0.0");
+ * in any dependent modules, but if we were, we would do something like:
+ * emodules_load ("dependent.ell", "sample2", "1.0.0");
*/
}
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-09-30 Martin Buchholz <martin@xemacs.org>
+
+ * config.h (HAVE_STRCASECMP): Remove.
+
+2000-09-07 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * xemacs.mak:
+ Make src\depend parsing recognise "#if defined" instead of "#ifdef".
+ Use matching single quotes to keep 4dos shell happy.
+
+2000-08-07 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak: add getloadavg.c.
+
+2000-07-30 Ben Wing <ben@xemacs.org>
+
+ * README (NOTE):
+ Improve X documentation.
+ Document nascent Mule support.
+ Document current MS Windows contributors.
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak:
+ added new file win32.c.
+ took out unused alloca.c.
+ * xemacs.mak (update-elc-2): added new target for rebuilding the
+ remaining .elcs after dumped. its dependency is added for target
+ all.
+ * xemacs.mak (update-auto-and-custom):
+ cleaned up ; now it byte-compiles custom-load.el.
+ * xemacs.mak (mostlyclean):
+ * xemacs.mak (clean):
+ * xemacs.mak (nicenclean):
+ * xemacs.mak (distclean):
+ * xemacs.mak (realclean):
+ * xemacs.mak (versionclean):
+ Redid all the clean targets, to be similar to what's in the
+ standard Makefile.
+
+2000-07-18 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * xemacs.mak ($(PROGNAME)): Do check error code from temacs during
+ dumping.
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
Rebindind C-x and C-c is trickier because by default these are prefix
keys in XEmacs. See the "Key Bindings" node in the XEmacs manual.
-** Behaviour of selected regions
+** Behavior of selected regions
Selected regions behave differently in XEmacs from typical Windows
programs. The pc-select package provides various functions to enable
-the standard Windows behaviour for selected regions (eg mark via
+the standard Windows behavior for selected regions (eg mark via
shift-arrow, self-inserting deletes region, etc).
** Limitations on the use of the AltGr key.
-Building and Installing XEmacs on Windows 95/98/NT -*- mode:outline -*-
+Building and Installing XEmacs on Windows 95/98/NT/2000 -*- mode:outline -*-
David Hobley
Marc Paquette
Jonathan Harris
Ben Wing
-This is a port of XEmacs to Windows 95/98/NT. If you are looking for a port
-of GNU Emacs, see http://www.cs.washington.edu/homes/voelker/ntemacs.html.
-
+This is a port of XEmacs to Windows 95/98/NT/2000. If you are looking for a
+port of GNU Emacs, see http://www.cs.washington.edu/homes/voelker/ntemacs.html.
+NT 3.51 or later is required for building on Windows NT. Note that the
+developers typically use NT 4.0 and Windows 2000, and there may possibly be
+problems under Windows 95/98 and NT 3.51. If so, please report them to
+xemacs-nt@xemacs.org; we are committed to maintaining compatibility with all
+systems listed.
* Required tools and sources
============================
Your PATH environment variable also needs to include the DevStudio
vc\bin and sharedide\bin directories.
- Visual C++ V5.0 installs a batch file called vcvars32.bat in
+ Visual C++ V5.0 and later install a batch file called vcvars32.bat in
c:\Program Files\DevStudio\VC\bin\ (or wherever you installed it) that you
can run before building to set up all of these environment variables.
+ Alternatively, you can choose at setup time to have these
+ environment variables automatically set up in the registry, which
+ is generally a good idea.
+
2. Grab the latest XEmacs source from
ftp://ftp.xemacs.org/pub/xemacs/
- or one of its mirrors listed at http://www.xemacs.org/Download/index.html .
+ or one of its mirrors listed at http://www.xemacs.org/Download/index.html.
+
+ (NOTE: If you are behind a firewall and have problems with FTP access,
+ the URL http://ftp.xemacs.org/pub/xemacs/ works just as well.)
You'll also need the packages. You probably want to get the unified
packages bundle from
ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
+ If you are building with international support, you also need
+
+ ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz
+
Although we don't recommend it, you can also retrieve just the packages
you really need if you have an extremely slow net connection or are very
short on disk space. You can find the various packages in
- ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the
- xemacs-base package. You'll also need the texinfo package unless you
- have a copy of makeinfo.exe on your machine. If you want to download
- additional or updated packages from within XEmacs you'll need the efs,
- dired and vm packages. You'll probably also want at least the
- edit-utils, text-modes, fsf-compat, cc-mode, prog-modes and xemacs-devel
- packages.
+ ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base
+ package (and mule-base, if building with international support). You'll
+ also need the texinfo package unless you have a copy of makeinfo.exe on
+ your machine. If you want to download additional or updated packages
+ from within XEmacs you'll need the efs, dired and vm packages. You'll
+ probably also want at least the edit-utils, text-modes, fsf-compat,
+ cc-mode, prog-modes and xemacs-devel packages.
Unpack the packages into "x:\your\choice\XEmacs\xemacs-packages",
for example "c:\Program Files\XEmacs\xemacs-packages".
** Extra tools and sources required for X
+NOTE: XEmacs has not been tested with X support under the native
+Windows build for a long, long time! It may not even compile any
+more. If you are interested in X support, you're better off compiling
+the Cygwin version of XEmacs, which can handle both Win32 native and X
+frames (in the same binary, in fact, but not at the same time), and is
+actively tested with X support.
+
If you want support for X you will also need:
-1. An X server. MI/X is available on the Internet as trialware; it is
- available from: http://www.microimages.com/www/html/mix/
+1. An X server. XEmacs has been tested and runs well under MI/X,
+ available from: http://www.microimages.com/mix/. (International aka
+ "Mule" support even works under this X server!) Unfortunately, this is
+ not free, but is trialware; you have to pay $25 if you want to use it
+ for more than 15 days. XEmacs also runs (barely) under the free XWin
+ server that comes as part of the Cygwin XFree86 package, available at
+
+ ftp://sources.redhat.com/pub/cygwin/xfree/
-2. Source for the MIT X11R6.3 libraries, available from: ftp.x.org
+ or numerous mirrors, such as
+
+ ftp://ftp.freesoftware.com/pub/sourceware/cygwin/xfree/
+
+ There are numerous other X servers available in the same package or at
+ the same location, but unfortunately most of them behave even worse
+ than XWin. If you have any luck with any of these, *PLEASE* email
+ the maintainers at xemacs-nt@xemacs.org, and we'll add the info here.
+
+2. Source for the MIT X11R6.3 libraries, available from ftp.x.org.
3. You'll need to compile the MIT libraries without multi-thread support.
To do this, there is an example Win32.cf and site.def provided which set
config.inc.samp to config.inc. Make any necessary modifications. This
file controls the options that XEmacs is built with:
+ -- If you want international (aka "Mule") support, modify the appropriate
+ line in config.inc as follows:
+
+ HAVE_MULE=1
+
+ NOTE: This support is still quite raw under the Win32 native GUI,
+ but works well if you compile the Cygwin version with X support
+ and disable native Win32 support (--with-msw=no).
+
-- If you're building with XPM support, modify the appropriate lines in
config.inc as follows:
(By default, XEmacs will be installed in directories under the directory
"c:\Program Files\XEmacs\XEmacs-21.2".)
-2. If you want to build xemacs on the command line, use
+3. If you want to build xemacs on the command line, use
`nmake install -f xemacs.mak', or just `nmake -f xemacs.mak' if you want
to run XEmacs from its build directory. nmake will build temacs, the DOC
file, update the elc's, dump xemacs and (optionally) install the relevant
You may want to create a shortcut to the file from your Desktop or
Start Menu.
-3. To build using MS Developer Studio, you can use the workspace file
- `nt/xemacs.dsw'. This was prepared for Visual C++ 5.0; if you have
- a different version and this file doesn't work, just open up
- `nt/xemacs.mak' from within MS Developer Studio and it will offer to
- wrap this Makefile in a workspace file, from which you can build.
- Assuming you want to run from the build directory (which you will
- want to do if you are planning on doing any development work on XEmacs),
- use the following settings in Project/Settings...:
+4. To build using MS Developer Studio, you can use the workspace file
+ `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you are using
+ Visual C++ 5.0, you can use the workspace file `nt/xemacs-vc50.dsw'. If
+ you have a different version and neither file works, just open up
+ `nt/xemacs.mak' from within MS Developer Studio and it will offer to wrap
+ this Makefile in a workspace file, from which you can build. Assuming
+ you want to run from the build directory (which you will want to do if
+ you are planning on doing any development work on XEmacs), use the
+ following settings in Project/Settings...:
Under the General tab:
The XEmacs NT Mailing List: xemacs-nt@xemacs.org
Subscribe address: xemacs-nt-request@xemacs.org
-David Hobley
-Marc Paquette
-August Hill
-Jonathan Harris
-Ben Wing
+Ben Wing (current primary MS Windows maintainer; author of the MS Windows
+ Mule code and some of the dialog box code)
+Andy Piper (MS Windows contributor; author of the Cygwin support and the
+ MS Windows glyph and widget code)
+Jonathan Harris (MS Windows contributor; author of the MS Windows redisplay
+ and underlying GUI code)
+Kirill Katsnelson (MS Windows contributor; author of the MS Windows process
+ and printing code and some of the dialog box code;
+ general guru on obscure MS Windows programming topics)
+David Hobley (early MS Windows contributor)
+Marc Paquette (early MS Windows contributor)
+August Hill (early MS Windows contributor)
and others.
#undef HAVE_SIGHOLD
#undef HAVE_SIGPROCMASK
#undef HAVE_SIGSETJMP
-#undef HAVE_STRCASECMP
#define HAVE_STRERROR
#undef HAVE_TZSET
#undef HAVE_UTIMES
/* If you wish to compile with support for the Network Audio System
system define HAVE_NAS_SOUND.
- NAS_NO_ERROR_JUMP means that the NAS libraries don't inlcude some
+ NAS_NO_ERROR_JUMP means that the NAS libraries don't include some
error handling changes.
*/
#undef HAVE_NAS_SOUND
# Microsoft Developer Studio Project File - Name="xemacs" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) External Target" 0x0106
!MESSAGE
# Begin Project
+# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-Microsoft Developer Studio Workspace File, Format Version 5.00
+Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
-Project: "xemacs"=".\xemacs.dsp" - Package Owner=<4>
+Project: "xemacs"=.\xemacs.dsp - Package Owner=<4>
Package=<5>
{{{
# Makefile for Microsoft NMAKE
# Copyright (C) 1995 Board of Trustees, University of Illinois.
-# Copyright (C) 1995, 1996 Ben Wing.
+# Copyright (C) 1995, 1996, 2000 Ben Wing.
# Copyright (C) 1995 Sun Microsystems, Inc.
# Copyright (C) 1998 Free Software Foundation, Inc.
#
# #### here, it doesn't seem to matter if we double ^'s!
# results are the same with all single ^ and all double ^^!
# see comment below.
-! if [perl -p -e "s/^\x23ifdef (.+)/!if defined($$1)/; s/^\x23e/!e/;" \
+! if [perl -p -e "s/^\x23if defined(.+)/!if defined$$1/; s/^\x23e/!e/;" \
-e "s/([\s=^])([\w\d\.\-^]+\.[ch^])/$$1$(SRC:\=\\)\\$$2/g;" \
-e "s/^(.+)\.o:(.+)/$(OUTDIR:\=\\)\\$$1.obj:$$2 $(NT:\=\\)\\config.inc/;" \
< $(SRC)\depend > $(OUTDIR)\depend.tmp]
DOC_SRC1=\
$(SRC)\abbrev.c \
$(SRC)\alloc.c \
- $(SRC)\alloca.c \
$(SRC)\blocktype.c \
$(SRC)\buffer.c \
$(SRC)\bytecode.c \
$(SRC)\font-lock.c \
$(SRC)\frame.c \
$(SRC)\general.c \
+ $(SRC)\getloadavg.c \
$(SRC)\glyphs.c \
$(SRC)\glyphs-eimage.c \
$(SRC)\glyphs-widget.c \
$(SRC)\tparam.c \
$(SRC)\undo.c \
$(SRC)\window.c \
+ $(SRC)\win32.c \
$(SRC)\widget.c
!if $(HAVE_X_WINDOWS)
$(TEMACS_DUMP_OBJS)\
$(OUTDIR)\abbrev.obj \
$(OUTDIR)\alloc.obj \
- $(OUTDIR)\alloca.obj \
$(OUTDIR)\blocktype.obj \
$(OUTDIR)\buffer.obj \
$(OUTDIR)\bytecode.obj \
$(OUTDIR)\font-lock.obj \
$(OUTDIR)\frame.obj \
$(OUTDIR)\general.obj \
+ $(OUTDIR)\getloadavg.obj \
$(OUTDIR)\glyphs.obj \
$(OUTDIR)\glyphs-eimage.obj \
$(OUTDIR)\glyphs-widget.obj \
$(OUTDIR)\tparam.obj \
$(OUTDIR)\undo.obj \
$(OUTDIR)\widget.obj \
- $(OUTDIR)\window.obj
+ $(OUTDIR)\window.obj \
+ $(OUTDIR)\win32.obj
# Rules
if exist "$(MAKEINFO)" goto test_done
@$(XEMACS_BATCH) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
@if not errorlevel 1 goto suggest_makeinfo
-@echo XEmacs `info' cannot be built!
-@echo Install XEmacs package `texinfo' (see README.packages).
+@echo XEmacs 'info' cannot be built!
+@echo Install XEmacs package 'texinfo' (see README.packages).
:suggest_makeinfo
@echo Consider specifying path to makeinfo program: MAKEINFO=path
-@echo as this will build info docs faster than XEmacs using `texinfo'.
+@echo as this will build info docs faster than XEmacs using 'texinfo'.
@if errorlevel 1 exit 1
:test_done
<<NOKEEP
cd $(TEMACS_DIR)
set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
- -1 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\loadup.el dump
+ $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\loadup.el dump
!if $(USE_PORTABLE_DUMPER)
rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc
link.exe @<<
# use this rule to build the complete system
all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \
$(LIB_SRC_TOOLS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \
- update-auto-and-custom info
+ update-elc-2 update-auto-and-custom info
temacs: $(LASTFILE) $(TEMACS)
@$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder"
@$(DEL) PlaceHolder
-distclean:
- $(DEL) *.bak
- $(DEL) *.orig
- $(DEL) *.rej
- $(DEL) *.tmp
+mostlyclean:
$(DEL) $(XEMACS)\Installation
- cd $(OUTDIR)
- $(DEL) *.lib
- $(DEL) *.obj
- $(DEL) *.pdb
- $(DEL) *.res
- $(DEL) *.sbr
- cd $(XEMACS)\$(TEMACS_DIR)
- $(DEL) config.h
- $(DEL) paths.h
- $(DEL) Emacs.ad.h
- $(DEL) *.bak
- $(DEL) *.orig
- $(DEL) *.rej
- $(DEL) *.exe
- $(DEL) *.map
- $(DEL) *.bsc
- $(DEL) *.pdb
- cd $(LIB_SRC)
- $(DEL) DOC
- $(DEL) *.bak
- $(DEL) *.orig
- $(DEL) *.rej
- $(DEL) *.exe
- $(DEL) *.obj
- $(DEL) *.pdb
- $(DEL) *.res
- $(DEL) $(CONFIG_VALUES)
- cd $(LISP)
- $(DEL) /s /q *.bak *.elc *.orig *.rej
- cd $(INFODIR)
- $(DEL) *.info*
+ $(DEL) $(OUTDIR)\*.lib $(OUTDIR)\*.obj $(OUTDIR)\*.pdb
+ $(DEL) $(OUTDIR)\*.res $(OUTDIR)\*.sbr
+ $(DEL) $(SRC)\*.exe $(SRC)\*.map $(SRC)\*.bsc $(SRC)\*.pdb
+ $(DEL) $(LIB_SRC)\*.exe $(LIB_SRC)\*.obj $(LIB_SRC)\*.pdb
+ $(DEL) $(LIB_SRC)\*.res
+
+clean: mostlyclean versionclean
+ $(DEL) $(XEMACS)\TAGS
+
+nicenclean: clean
+ $(DEL) $(NT)\*.bak $(NT)\*.orig $(NT)\*.rej $(NT)\*.tmp
+ $(DEL) $(LIB_SRC)\*.bak $(LIB_SRC)\*.orig $(LIB_SRC)\*.rej
+ $(DEL) $(LIB_SRC)\*.tmp
+ $(DEL) $(SRC)\*.bak $(SRC)\*.orig $(SRC)\*.rej $(SRC)\*.tmp
+ $(DEL) /s $(LISP)\*.bak $(LISP)\*.orig $(LISP)\*.rej $(LISP)\*.tmp
+
+## This is used in making a distribution.
+## Do not use it on development directories!
+distclean: nicenclean
+ $(DEL) $(SRC)\config.h $(SRC)\paths.h $(SRC)\Emacs.ad.h
+ $(DEL) $(LIB_SRC)\$(CONFIG_VALUES)
+ $(DEL) $(INFODIR)\*.info*
+ $(DEL) /s /q $(LISP)\*.elc
+
+realclean: distclean
+
+versionclean:
+ $(DEL) $(SRC)\xemacs.exe $(LIB_SRC)\DOC
+
+#not sure about those wildcards. DOS wildcards are stupid compared to Unix,
+#and could end up deleting *everything* instead of just backup files or
+#whatever.
+#extraclean: realclean
+# $(DEL) *~ *.*~ #* m\*~ m\#* s\*~ s\#*
depend:
cd $(SRC)
@type $(XEMACS)\Installation
@echo --------------------------------------------------------------------
-# Update auto-autoloads.el and custom-load.el similar to what
-# XEmacs.rules does for xemacs-packages.
+# Update out-of-date .elcs, other than needed for dumping.
+update-elc-2:
+ $(XEMACS_BATCH) -l update-elc-2.el -f batch-update-elc-2 $(LISP)
+
+# Update auto-autoloads.el and custom-load.el, similar to what
+# XEmacs.rules does for xemacs-packages. This used to delete
+# auto-autoloads.el first, but that's a bad idea, because it forces
+# rebuilding from scratch, which is time-consuming; and the autoload
+# code is specifically written to do in-place updating. However, if
+# your auto-autoload file is messed up and you want it rebuilt from
+# scratch, delete it from the command line and then nmake with this
+# target.
update-auto-and-custom:
-# Don't delete this, because it forces rebuilding from scratch,
-# which is time-consuming; and the autoload code is specifically
-# written to do in-place updating.
-# @$(DEL) $(LISP)\auto-autoloads.el
# Combine into one invocation to avoid repeated startup penalty.
- $(XEMACS_BATCH) -l autoload -f batch-update-one-directory $(LISP) -f batch-byte-compile-one-file $(LISP)\auto-autoloads.el -l cus-dep -f Custom-make-dependencies $(LISP)
+ $(XEMACS_BATCH) -l autoload -f batch-update-one-directory $(LISP) -f batch-byte-compile-one-file $(LISP)\auto-autoloads.el -l cus-dep -f Custom-make-one-dependency $(LISP) -f batch-byte-compile-one-file $(LISP)\custom-load.el
@$(DEL) $(LISP)\auto-autoloads.el~
+ @$(DEL) $(LISP)\custom-load.el~
# DO NOT DELETE THIS LINE -- make depend depends on it.
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-08-31 Daiki Ueno <ueno@unixuser.org>
+
+ * lread.c (locate_file): Check the path element is non-nil.
+
+2000-10-02 Martin Buchholz <martin@xemacs.org>
+
+ * lisp.h: Warning suppression for SCO compilers.
+
+ * redisplay-tty.c (reset_tty_modes): Fix crash.
+ E.g. from xemacs running on X: (delete-device (make-device 'tty nil))
+
+2000-09-27 Martin Buchholz <martin@xemacs.org>
+
+ Big signal/process handling overhaul. Bugs fixed:
+ M-x shell, type `sleep 10000', M-x comint-interrupt-subjob and
+ M-x comint-kill-subjob should work for both values nil and t of
+ process-connection-type. It was broken on most platforms.
+ Testing on Irix and Cygwin still needed. Other plaforms tested.
+ * sysdep.c: Move #include of stropts.h into sysproc.h. Use pid_t.
+ * process-unix.c: Signal/Process handling overhaul.
+ (pty_name): make 64 bytes, as `expect' does, for paranoia.
+ (allocate_pty): Use all available modern methods of allocating
+ ptys, falling back to old style BSD allocation as a last resort.
+ Use allegedly more secure Unix98 pty allocation by default.
+ (allocate_pty_the_old_fashioned_way): New. the last resort.
+ (unix_create_process): Push ptem, ldterm, ttcompat where
+ available. Autoconfiscate.
+ (try_to_initialize_subtty): New.
+ (unix_kill_child_process): Proper signal handling for ptys on most
+ platforms, using special knowledge of AIX, BSD, etc...
+ (unix_create_process): Always disconnect_controlling_terminal() for
+ subprocesses, whether using ptys or not.
+ * process.h: Remove old getpt-dependent PTY code.
+ * process.c (Fprocess_send_signal): New, obvious generic function.
+ (decode_signal): New.
+ (Finterrupt_process):
+ (Fkill_process):
+ (Fquit_process):
+ (Fstop_process):
+ (Fcontinue_process):
+ (Fsignal_process): Use decode_signal.
+ (process_send_signal):
+ Many docstring corrections.
+ Allow any signal to be sent to a process object.
+ * config.h.in: Add symbols for big signal/process overhaul.
+ * syssignal.h (EMACS_KILLPG): Use HAVE_KILLPG. Use `pid', not `gid'.
+ * sysproc.h: Include process-related headers, where available:
+ sys/stropts.h sys/strtio.h pty.h libutil.h
+ * s/irix4-0.h:
+ * s/irix5-0.h:
+ * s/cygwin32.h:
+ * s/gnu.h:
+ * s/linux.h:
+ * s/hpux.h:
+ * s/aix3-1.h:
+ Remove old S&M pty stuff.
+ * console-tty.c (tty_init_console): Use pid_t, not int, for pids.
+ * systty.h: Simplify cpp hackery, improve comments.
+ Favor BSD ioctl(TIOCGPGRP) over Posix tcgetpgrp().
+
+ * editfns.c (Fformat_time_string):
+ Be a little more paranoid with the return value of ctime.
+
+ * fileio.c (check_executable):
+ (check_writable):
+ Use symbolic constants X_OK, W_OK.
+
+ * console-x.c (split_up_display_spec): Fix a warning.
+
+2000-10-02 Martin Buchholz <martin@xemacs.org>
+
+ * gui-x.c (add_accel_and_to_external): strlen ==> XSTRING_LENGTH
+ * ntproc.c (sys_spawnve): make_string ==> build_string
+ Small clarity improvements.
+
+2000-09-30 Martin Buchholz <martin@xemacs.org>
+
+ * events.c (WRONG_EVENT_TYPE_FOR_PROPERTY): Warning removal.
+
+ * s/windowsnt.h (HAVE_STRCASECMP): Remove.
+
+ * config.h.in (HAVE_STRCASECMP): Remove.
+
+2000-09-29 Martin Buchholz <martin@xemacs.org>
+
+ * redisplay-output.c (redisplay_output_pixmap):
+ Cleaner and possibly more 64-bit correct code.
+
+2000-09-28 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * dumper.c (pdump_load_finish): move restoration of
+ `noninteractive1' to emacs.c (main_1).
+ * emacs.c (main_1): protect LISP-visible command-line flags
+ from pdump_load().
+
+2000-09-26 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * Makefile.in.in (versionclean): Use EXE_TARGET and
+ DUMP_TARGET instead of literal program names.
+
+2000-09-20 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in: Recent purify's require absolute paths for cache-dir.
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * *: Spelling mega-patch
+
+2000-09-19 Martin Buchholz <martin@xemacs.org>
+
+ * fns.c (bad_bad_turtle):
+ Delete "Eek!" comment, since we fixed the bug to which it refers.
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * alloca.c: Replace REGISTER with register.
+
+2000-09-16 Daiki Ueno <ueno@unixuser.org>
+
+ * file-coding.c (ucs_to_char): Use countof.
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * file-coding.c: (ucs_to_char):
+ (complex_vars_of_file_coding):
+ Use countof instead of sizeof.
+ Use CHECK_NATNUM instead of CHECK_INT.
+
+ * sysdep.c (strcasecmp): Remove.
+ * device-x.c (ascii_strcasecmp): New.
+ * device-x.c (Fx_get_resource): Use ascii_strcasecmp.
+ Avoid using non-standard non-portable strcasecmp.
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in (mostlyclean): remove reference to prefix-args.
+ * font-lock.c: remove reference to emacsfns.h.
+ * search.c: small doc improvement.
+ * event-Xt.c: correct file names in comments.
+ * console-x.h Correct file names in comments.
+ * frame.c: Correct file names in comments.
+ * event-stream.c: remove Energize from comments.
+
+2000-09-15 Martin Buchholz <martin@xemacs.org>
+
+ * symeval.h (DEFERROR_STANDARD):
+ (DEFERROR):
+ (DEFSYMBOL):
+ (DEFSYMBOL_NO_DUMP):
+ (DEFSYMBOL_MULTIWORD_PREDICATE):
+ (DEFSYMBOL_MULTIWORD_PREDICATE_NO_DUMP):
+ (DEFKEYWORD):
+ The construct &##name is not sensible C.
+ Fixes compilation errors with Unixware native compiler.
+
+2000-09-14 Martin Buchholz <martin@xemacs.org>
+
+ * frame.c (device_matches_console_spec): no longer takes a `frame' arg
+ (next_frame_internal): Removed. We now just have next_frame.
+ (next_frame):
+ Write a simpler and cleaner one-pass algorithm.
+ Remove called_from_delete_device arg and #ifdefed-out code.
+ (previous_frame):
+ Renamed from prev_frame. Update callers.
+ Cleaned up to have an analogous implementation to next_frame.
+ (other_visible_frames_internal): Remove the
+ called_from_delete_device bogus arg, and hence, remove this
+ function. Just use other_visible_frames().
+
+ * window.c (Fnext_window):
+ Prettify docstring.
+ Since next_frame() is guaranteed to return a frame, remove check
+ for nil inserted in previous patch.
+ (Fprevious_window):
+ Prettify docstring.
+ Make code look more like Fnext_window.
+ (window_loop):
+ Respect the `console' arg when iterating through windows.
+ Fixes bug: (get-buffer-window buffer t device) not respecting
+ the `device' arg.
+ This function needs more work, as others have pointed out.
+
+ * frame.h: Rename prev_frame to previous_frame.
+ device_matches_console_spec no longer takes a `frame' arg.
+
+ * s/gnu.h:
+ * s/linux.h:
+ * s/hpux.h:
+ Use EMACS_BLOCK_SIGNAL instead of sigblock.
+ From "Golubev I. N." <gin@mo.msk.ru>.
+
+ * make-src-depend: Fix typo.
+
+2000-09-13 Martin Buchholz <martin@xemacs.org>
+
+ * window.c (Fnext_window):
+ next_frame() might return nil, not a frame.
+ Fixes this crash:
+ (gdb) run -eval '(progn (make-device (quote x) "polgar:0") (next-window (minibuffer-window) t (quote visible) (second (device-list))))'
+
+ * frame.c (next_frame_internal):
+ We've passed a frame if we've passed its device.
+ Fixes this crash:
+ (gdb) run -eval '(progn (make-frame nil (make-device (quote x) "polgar:0")) (next-window (minibuffer-window) t (quote visible) (second (device-list))))'
+Fatal error: assertion failed, file /project/xemacs/ws/dev/src/frame.h, line 245, RECORD_TYPEP (obj, lrecord_type_frame)
+
+2000-09-11 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * menubar-msw.c (mswindows_translate_menu_or_dialog_item):
+ Allow option to suppress accelerators in menu/dialog items.
+ (populate_or_checksum_helper): Pass dialog title through above.
+
+2000-09-10 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * event-msw.c (mswindows_key_to_emacs_keysym):
+ Add "pause" key, fix "menu" key.
+
+2000-09-09 Martin Buchholz <martin@xemacs.org>
+
+ * eval.c (reinit_vars_of_eval):
+ Increase max_lisp_eval_depth to 1000,
+ required for thai-xtis.el to byte-compile under some circumstances.
+
+2000-09-04 Martin Buchholz <martin@xemacs.org>
+
+ * event-Xt.c (x_to_emacs_keysym): Increase size of `buffer' to 513.
+ From Kenichi Handa.
+
+2000-09-01 Martin Buchholz <martin@xemacs.org>
+
+ * make-src-depend: Make the generated Makefiles smaller.
+
+ * s/hpux.h (SETUP_SLAVE_PTY):
+ Provide a %d in the format string for the errno argument.
+
+ * editfns.c (Ftemp_directory):
+ Warning fix.
+ Avoid buffer overrun on very long file name.
+
+ * input-method-xlib.c (XIM_init_device):
+ 6th parameter of XRegisterIMInstantiateCallback has different
+ pointer types on different OSes, so simply cast to (void *).
+
+ * unexhp9k800.c: Warning fixes. Fiddly changes.
+
+ * sysdll.c (dll_open):
+ shl_load will hang hard if passed a NULL filename.
+ Simply return NULL for compatibility with dlopen.
+ * sysdll.c: Conform to XEmacs coding standards.
+
+ * sysdep.c (get_pty_max_bytes):
+ Support pty input lines longer than 512 bytes on HP-UX 10.20.
+
+2000-08-31 Martin Buchholz <martin@xemacs.org>
+
+ * tooltalk.c: Add #include <syssignal.h>
+
+2000-08-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * s/hpux.h: Don't use undefined function sigunblock().
+
+2000-08-31 Martin Buchholz <martin@xemacs.org>
+
+ * config.h.in: Add HAVE_BALLOON_HELP.
+ * emacs.c: Use HAVE_BALLOON_HELP.
+ * Makefile.in.in (x_objs):
+ Make Balloon Help conditional on finding shape.h.
+
+2000-08-23 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * syntax.c (regex_emacs_buffer_p): New variable.
+ * syntax.h (regex_emacs_buffer_p): extern.
+ * search.c (looking_at_1):
+ (string_match_1):
+ (fast_string_match):
+ (search_buffer): Set regex_emacs_buffer_p.
+ * regex.c (re_match_2_internal): Reference regex_emacs_buffer_p
+ when before_dot, at_dot, after_dot.
+
+2000-08-23 Andy Piper <andy@xemacs.org>
+
+ * gui-x.c (popup_selection_callback): Only set action_occurred
+ when we really have an image instance.
+ * gui-msw.c (mswindows_handle_gui_wm_command): ditto.
+
+2000-08-23 Andy Piper <andy@xemacs.org>
+
+ * gui-msw.c (mswindows_handle_gui_wm_command): set
+ action_occurred.
+ * gui-x.c (popup_selection_callback): ditto.
+
+ * glyphs.h (IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED): new accessor.
+ (XIMAGE_INSTANCE_WIDGET_ACTION_OCCURRED): ditto.
+ (struct Lisp_Image_Instance): add action_occurred flag.
+
+ * glyphs.c (redisplay_subwindow): use action_occurred flag.
+ (image_instance_changed): ditto.
+ (reset_frame_subwindow_instance_cache): only unmap windows - do
+ not remove them from the cache also.
+
+ * glyphs-widget.c (tab_control_update): better debug.
+ (progress_gauge_update): ditto.
+ (layout_update): ditto.
+ (layout_instantiate): ditto.
+ (tab_control_order_only_changed): cope with null pending items.
+
+ * glyphs-msw.c (mswindows_tab_control_redisplay): add better
+ debug. Force selection of an item when an action occurred. Cope
+ with null pending_items.
+ (mswindows_progress_gauge_redisplay): better debug.
+ * glyphs-x.c (x_tab_control_redisplay): ditto.
+
+ * redisplay.c (redisplay_frame): reset the frame cache if the
+ frame is garbaged.
+
+ * window.c (Fset_window_configuration): potentially re-enable
+ frame cache reset.
+ (window_unmap_subwindows): need to finalize instances here since
+ it is only used in mark_window_as_deleted.
+
+2000-08-22 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * nas.c (SndOpenDataForReading):
+ nas.c (WaveOpenDataForReading):
+ nas.c (readChunk): {BIG,LITTLE}_ENDIAN -> NAS_{BIG,LITTLE}_ENDIAN.
+ Somehow escaped from the 2000-08-14 patch.
+
+2000-08-14 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * nas.c: Preprocessor trickery to use NAS_LITTLE_ENDIAN instead
+ of LITTLE_ENDIAN (conflicts with glibc, at least) in NAS <= 1.2p5.
+
+2000-08-21 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_map_subwindow): Minor optimization - only map the
+ window if it is not already displayed.
+
+ * glyphs-msw.c (mswindows_map_subwindow): only map the window if
+ it is not already displayed.
+
+ * window.c (Fset_window_configuration): don't reset the frame
+ cache.
+
+ * glyphs.c (unmap_subwindow_instance_cache_mapper): only remove
+ instances from the frame cache if we are actually finalizing them.
+ (reset_frame_subwindow_instance_cache): reset frame cache only
+ after unmapping everything.
+ (map_subwindow): set displayed flag after mapping.
+
+2000-08-21 Martin Buchholz <martin@xemacs.org>
+
+ * data.c (indirect_function):
+ Rename ERRORP to non-misleading VOID_FUNCTION_ERRORP.
+
+ * eval.c (function_argcount):
+ Use original function when signaling errors.
+
+2000-08-18 Andy Piper <andy@xemacs.org>
+
+ * frame.c (delete_frame_internal): use new
+ free_frame_subwindow_instances name.
+
+ * glyphs-msw.c (mswindows_tab_control_instantiate): verify index.
+ (add_tab_item): make return type correct.
+ (mswindows_tab_control_instantiate): assert index of tab.
+ (mswindows_tab_control_redisplay): Re-code to use
+ gui_item_equal_sans_selected and gui_item_list_find_selected.
+
+ * glyphs-widget.c (tab_control_update): Correct comment.
+
+ * window.c (window_unmap_subwindows): use new
+ unmap_subwindow_instance_cache_mapper.
+ (window_unmap_subwindows_cache_mapper): deleted.
+ (Fset_window_configuration): comparisons should now be with
+ EQ. Preserve the subwindow instance cache across configuration
+ changes.
+ (allocate_window): ditto.
+ (make_dummy_parent): ditto.
+
+ * glyphs.c (free_frame_subwindow_instances): rename from
+ free_frame_subwindow_instance_cache. finalize all instances rather
+ than just those in the display cache.
+ (finalize_all_subwindow_instances): walk windows unmapping and
+ finalizing subwindows.
+ (unmap_subwindow_instance_cache_mapper): moved from
+ window.c. Allow finalization as well as unmapping.
+
+ * gui.c (gui_item_list_find_selected): new function.
+
+ * gui.h (gui_item_list_find_selected): declare.
+
+ * glyphs-x.c (x_tab_control_redisplay): pick tab
+ explicitly. Re-code to use gui_item_equal_sans_selected and
+ gui_item_list_find_selected.
+
+ * glyphs-x.h: add lwlib-utils.h
+
+ * buffer.c (Frecord_buffer): undo previous change.
+
+2000-08-09 Vin Shelton <acs@xemacs.org>
+
+ * config.h.in, s/gnu.h, s/hpux.h, s/linux.h: Use UNIX98 PTYs if
+ possible. Create temporary files more securely. The patch was
+ generated by Torsten Duwe <duwe@caldera.de>, Florian Weimer
+ <Florian.Weimer@RUS.Uni-Stuttgart.DE> and Olaf Kirch. See
+ http://www.xemacs.org/list-archives/xemacs-patches/200007/msg00123.html
+ for details.
+
+2000-08-07 Ben Wing <ben@xemacs.org>
+
+ * getloadavg.c: remove duplicate (and windows-breaking)
+ includes of fcntl.h and sys/file.h.
+
+ * nt.c: remove duplicate getloadavg() definition.
+
+ * sysdll.h (Qdll_filename_encoding): add missing stand-in
+ encodings.
+
+2000-08-07 Gunnar Evermann <ge204@eng.cam.ac.uk>
+
+ * eval.c (function_argcount): If function needs to be autoloaded
+ actually use the loaded definition.
+ GCPRO function.
+
+2000-08-05 Ben Wing <ben@xemacs.org>
+
+ * getloadavg.c: add prototype for getloadavg(). remove
+ duplicate WIN32_NATIVE/CYGWIN code (already in the middle
+ of the code). remove duplicate header includes.
+
+ * s\cygwin32.h, s\mingw32.h: remove stray NO_ARG_ARRAY.
+
+ * s\cygwin32.h, s\mingw32.h, m\windowsnt.h:
+ don't define LOAD_AVE_TYPE/LOAD_AVE_CVT because we have no
+ useful load average.
+
+ * alloc.c (reinit_alloc_once_early): removed references to
+ VIRT_ADDR_VARIES, malloc_sbrk_used/free, and data-bytes-used/free.
+ the lisp vars are the only things referencing the malloc_sbrk_*
+ vars, and they were already if 0'd out. these vars only exist
+ in the older malloc.c, which is basically unused, and they're
+ only for informational purposes.
+
+ * m\*.h: removed useless VIRT_ADDR_VARIES.
+
+ * m\powerpc.h: removed stray NO_ARG_ARRAY.
+
+2000-04-26 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * redisplay-msw.c (mswindows_output_dibitmap): Set foreground
+ color if the image is a mono pixmap.
+
+2000-07-30 Ben Wing <ben@xemacs.org>
+
+ * Makefile.in.in (release):
+ Remove stray @.
+
+ * buffer.c (directory_is_current_directory):
+ * dired-msw.c (mswindows_get_files):
+ * dired.c:
+ * dired.c (Fdirectory_files):
+ * dired.c (file_name_completion_stat):
+ * dired.c (Ffile_attributes):
+ [[[[1]]]]: Rename stat() -> xemacs_stat() and eliminate nasty
+ preprocessor tricks, to avoid problems on some machines
+ (e.g. SCO).
+
+ * callproc.c (egetenv): GC docs.
+
+ * console-msw.h:
+ * console-msw.h (struct mswindows_dialog_id):
+ * lrecord.h (lrecord_type):
+ New object for use with MSW dialogs.
+
+ * console.h (struct console_methods):
+ New enable/disable frame methods, for proper modal dialogs.
+
+ * device-msw.c (msprinter_default_printer): Fix to follow
+ proper Mule conventions.
+
+ * device-msw.c:
+ * device-msw.c (signal_open_printer_error):
+ * device-msw.c (msprinter_init_device):
+ * device-msw.c (ensure_not_printing):
+ * device-msw.c (plist_get_margin):
+ * device-msw.c (Fmsprinter_select_settings):
+ * device-msw.c (finalize_devmode):
+ * device-msw.c (Fmsprinter_settings_despecialize):
+ * device-msw.c (signal_enum_priner_error):
+ * extents.c (decode_extent):
+ * extents.c (decode_map_extents_flags):
+ * extents.c (decode_extent_at_flag):
+ * extents.c (Fextent_at):
+ * extents.c (Fextents_at):
+ * extents.c (symbol_to_glyph_layout):
+ [[[[2]]]] Use structured errors.
+
+ * dialog-msw.c:
+ * dialog-msw.c (mswindows_is_dialog_msg):
+ * dialog-msw.c (mark_mswindows_dialog_id):
+ * dialog-msw.c (dialog_proc):
+ * dialog-msw.c (handle_question_dialog_box):
+ * dialog-msw.c (syms_of_dialog_mswindows):
+ Define new object to clean up marking; use it as a dialog identifier.
+ Call new delete-dialog-box-hook.
+
+ * dialog-x.c (dbox_selection_callback):
+ * dialog-x.c (dbox_descriptor_to_widget_value):
+ * dialog-x.c (x_make_dialog_box_internal):
+ Call new delete-dialog-box-hook.
+ Return an id.
+
+ * dialog.c:
+ * dialog.c (syms_of_dialog):
+ * dialog.c (vars_of_dialog):
+ Define new delete-dialog-box-hook, for use w/modal dialog boxes.
+
+ * eval.c:
+ * eval.c (signal_call_debugger):
+ when noninteractive, output stack traces on the console instead
+ of in a (never-seen) buffer.
+
+ * eval.c (signal_type_error):
+ * eval.c (invalid_argument_2):
+ * lisp.h:
+ new funs for use w/structured errors.
+
+ * event-Xt.c:
+ * event-Xt.c (x_to_emacs_keysym):
+ * event-Xt.c (describe_event):
+ * event-Xt.c (emacs_Xt_event_handler):
+ * event-Xt.c (vars_of_event_Xt):
+ * event-msw.c:
+ * event-msw.c (mswindows_wnd_proc):
+ * event-msw.c (vars_of_event_mswindows):
+ rename {x,mswindows}-debug-events to debug-{}-events for
+ consistency with other debug-foo variables.
+
+ * event-stream.c:
+ document next-event more clearly.
+
+ * fileio.c (Ffile_name_directory):
+ * fileio.c (Ffile_name_nondirectory):
+ * fileio.c (Funhandled_file_name_directory):
+ * fileio.c (file_name_as_directory):
+ * fileio.c (Ffile_name_as_directory):
+ * fileio.c (directory_file_name):
+ * fileio.c (Fdirectory_file_name):
+ * fileio.c (Fmake_temp_name):
+ * fileio.c (Ffile_truename):
+ * fileio.c (Fsubstitute_in_file_name):
+ * fileio.c (expand_and_dir_to_file):
+ * fileio.c (barf_or_query_if_file_exists):
+ * fileio.c (check_executable):
+ * fileio.c (Ffile_exists_p):
+ * fileio.c (Ffile_writable_p):
+ * fileio.c (Ffile_directory_p):
+ * fileio.c (Ffile_regular_p):
+ * fileio.c (Ffile_modes):
+ * fileio.c (Ffile_newer_than_file_p):
+ * fileio.c (Fverify_visited_file_modtime):
+ * fileio.c (Fset_visited_file_modtime):
+ * fileio.c (auto_save_1):
+ (1). (2).
+ fix up gcpro's.
+
+ * frame-msw.c:
+ * frame-msw.c (mswindows_init_frame_1):
+ * frame-msw.c (mswindows_enable_frame):
+ * frame-msw.c (error_frame_unsizable):
+ * frame-msw.c (msprinter_init_frame_1):
+ * frame-msw.c (msprinter_init_frame_3):
+ * frame-msw.c (console_type_create_frame_mswindows):
+ (2).
+ implement new enable/disable frame methods.
+
+ * frame-x.c:
+ * frame-x.c (x_enable_frame):
+ * frame-x.c (console_type_create_frame_x):
+ implement new enable/disable frame methods.
+
+ * frame.c:
+ * frame.c (Fdisable_frame):
+ * frame.c (syms_of_frame):
+ * frame.h (struct frame):
+ implement new enable/disable frame methods/functions.
+
+ * general-slots.h:
+ add initial-focus.
+
+ * glyphs-msw.c (mswindows_widget_instantiate):
+ comment that initial-focus should be implemented.
+
+ * glyphs-widget.c:
+ * glyphs-widget.c (check_valid_instantiator):
+ * glyphs-widget.c (check_valid_orientation):
+ * glyphs-widget.c (check_valid_tab_orientation):
+ * glyphs-widget.c (check_valid_justification):
+ * glyphs-widget.c (check_valid_border):
+ * glyphs-widget.c (check_valid_callback):
+ * glyphs-widget.c (check_valid_int_or_function):
+ * glyphs-widget.c (check_valid_string_or_vector):
+ * glyphs-widget.c (check_valid_item_list_1):
+ * glyphs-widget.c (widget_validate):
+ * glyphs-widget.c (combo_box_validate):
+ * glyphs-widget.c (widget_instantiate):
+ * glyphs-widget.c (syms_of_glyphs_widget):
+ * glyphs-widget.c (VALID_WIDGET_KEYWORDS):
+ * glyphs-widget.c (image_instantiator_combo_box):
+ * glyphs-widget.c (image_instantiator_scrollbar):
+ * glyphs-widget.c (image_instantiator_tab_control):
+ * glyphs-widget.c (VALID_LAYOUT_KEYWORDS):
+ (2).
+ support (unimplemented) keyword initial-focus.
+ reindent long macros.
+
+ * glyphs-x.c (x_redisplay_widget):
+ * glyphs-x.c (x_button_instantiate):
+ * glyphs-x.c (x_button_redisplay):
+ * glyphs-x.c (x_progress_gauge_instantiate):
+ * glyphs-x.c (x_edit_field_instantiate):
+ * glyphs-x.c (x_combo_box_instantiate):
+ * glyphs-x.c (x_tab_control_instantiate):
+ * glyphs-x.c (x_label_instantiate):
+ * gui-x.c:
+ * gui-x.c (button_item_to_widget_value):
+ * gui-x.c (gui_items_to_widget_values_1):
+ * gui-x.c (gui_item_children_to_widget_values):
+ * gui-x.c (gui_items_to_widget_values):
+ * gui-x.h:
+ * menubar-x.c (menu_item_descriptor_to_widget_value_1):
+ add new flag to gui-parsing routines to indicate whether
+ accelerator specs should be supported.
+
+ * glyphs.c (syms_of_glyphs): use DEFSYMBOL.
+
+ * glyphs.h (struct Lisp_Image_Instance):
+ * glyphs.h (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS):
+ add initial-focus flag.
+
+ * gui.c:
+ * gui.c (syms_of_gui):
+ * gui.c (vars_of_gui):
+ clean up menu-no-selection-hook.
+
+ * gui.h:
+ support delete-dialog-box-hook.
+
+ * lread.c (Fload_internal):
+ * lread.c (locate_file_in_directory_mapper):
+ (1).
+
+ * lrecord.h:
+ * lrecord.h (struct toolbar_button):
+ * lrecord.h (syms_of_toolbar):
+ document how to create a new object.
+
+ * menubar-msw.c (mswindows_char_is_accelerator):
+ may be called on frames w/o menus.
+
+ * menubar.c (vars_of_menubar):
+ clean up :filter docs.
+
+ * nt.c (readdir):
+ * ntproc.c:
+ (1).
+
+ * process-nt.c:
+ * process-nt.c (validate_signal_number):
+ * process-nt.c (signal_cannot_launch):
+ * process-nt.c (nt_create_process):
+ * process-nt.c (nt_send_process):
+ * process-nt.c (nt_kill_child_process):
+ * process-nt.c (nt_open_network_stream):
+ * process-nt.c (syms_of_process_nt):
+ (2).
+ delete quote-handling. call new lisp code that does it better.
+
+ * process-unix.c (connect_to_file_descriptor):
+ * process-unix.c (allocate_pty):
+ * process-unix.c (unix_send_process):
+ * process-unix.c (unix_kill_child_process):
+ * process-unix.c (unix_open_network_stream):
+ * process-unix.c (unix_open_multicast_group):
+ (1). (2).
+
+ * process.c:
+ * process.c (Fstart_process_internal):
+ (2). need to canonicalize process path even if absolute.
+
+ * select-msw.c (symbol_to_ms_cf):
+ * select-msw.c (ms_cf_to_symbol):
+ * select-msw.c (cf_is_autofreed):
+ * select-msw.c (mswindows_destroy_selection):
+ * select.c:
+ * select.c (syms_of_select):
+ * select.h:
+ support dibv5, fix bugs. (from Mike Alexander)
+
+ * select.c (Fget_selection_internal):
+ * select.c (select_convert_out):
+
+ * sysdep.c:
+ * sysdep.c (xemacs_stat):
+ renamed.
+
+ * sysdep.c (mkdir):
+ * sysdep.c (rmdir):
+ but keep original stat() here because we provide encapsulation
+ around these funs.
+
+ * sysfile.h:
+ * sysfile.h (fstat):
+ remove stat garbage.
+
+ * syswindows.h:
+ fix X/MSW conflict.
+ don't include tchar.h. it's inappropriate because it makes
+ compile-time distinctions when we want runtime distinctions.
+ (we provide our own tchar replacements)
+
+ * toolbar.c:
+ use default object printer for toolbar-button.
+
+ * unexcw.c:
+ make sure we don't encapsulate.
+
+ * window.c (vars_of_window):
+ emphasize that temp-buffer-show-hook is obsolete.
+
+2000-08-05 Martin Buchholz <martin@xemacs.org>
+
+ * glyphs.c (image_instance_hash): HASH2 wants EMACS_INT args.
+ (Fimage_instance_subwindow_id): make_int wants EMACS_INT arg.
+
+ * events.c (Fevent_timestamp_lessp):
+ Not 64-bit clean. Use EMACS_INT, not int.
+
+2000-06-05 Andrew Begel <abegel@cs.berkeley.edu>
+
+ * lrecord.h (lrecord_types): Changed lrecord_type_count to an
+ unsigned int and changed the last enum to
+ lrecord_type_last_built_in_type.
+ (lrecord_implementations_table): changed prototype to know how
+ long the array is supposed to be.
+ (lrecord_type_count): new unsigned int to keep track of the
+ current number of lisp lrecord types.
+ (DEFINE_EXTERNAL_LRECORD):
+ (DECLARE_EXTERNAL_LRECORD): Added these two for external
+ dynamic-modules to declare new lisp types. They are the same
+ as the non-EXTERNAL forms, but declare an lrecord_type unsigned
+ int for each new type, and increment lrecord_type_count by 1.
+
+ * alloc.c (lrecord_implementations_table): Changed to reference
+ lrecord_type_last_built_in_type for the size of the array.
+ Moved MODULE_DEFINABLE_TYPE_COUNT to lrecord.h.
+
+2000-08-03 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * glyphs.h (check_valid_item_list): Renamed from
+ check_valid_item_list_1.
+
+2000-08-01 Alastair J. Houghton <ajhoughton@lineone.net>
+
+ * select.c (Qselect_coerce): New.
+ * select.c (Vselection_coercion_alist): New.
+ * select.c (syms_of_select): Declare.
+ * select.c (get-selection-internal): Use it.
+ Use the new select-coerce functionality.
+
+ * select.c (select_coerce): New.
+ * select.h (select_coerce): Declare.
+ New function to coerce one type of data into another.
+
+2000-08-03 Martin Buchholz <martin@xemacs.org>
+
+ * callproc.c (Fcall_process_internal):
+ (Fcall_process_internal):
+ * process-unix.c (unix_create_process):
+ Save and restore the value of errno, so that error messages are accurate.
+
+2000-08-01 Martin Buchholz <martin@xemacs.org>
+
+ * elhash.c (print_hash_table):
+ Fix printing of hash tables to also use `key-and-value' instead of `t'.
+ Prettify docstrings and indentation.
+
+2000-07-31 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * window.c (Fwindow_pixel_edges): Subtract frame border and
+ gutter size.
+
+2000-07-31 Andy Piper <andy@xemacs.org>
+
+ * buffer.c (Frecord_buffer): make absolutely sure that redisplay
+ will acknowledge the change.
+
+ * glyphs.h: declare tab_control_order_only_changed.
+
+ * glyphs-x.c (x_tab_control_redisplay): use
+ tab_control_order_only_changed.
+
+ * glyphs-widget.c (tab_control_order_only_changed): new function.
+
+ * glyphs-msw.c (mswindows_tab_control_redisplay): use
+ tab_control_order_only_changed.
+
+ * gui.c (gui_item_equal_sans_selected): new function.
+ (gui_item_equal): use it.
+
+ * glyphs-msw.c (mswindows_combo_box_instantiate): deprecate
+ :properties in favor of :items..
+
+ * glyphs-widget.c (check_valid_item_list): rename from
+ check_valid_item_list_1.
+ (check_valid_item_list_1): renamed.
+ (combo_box_validate): deprecate :properties in favor of :items.
+ (widget_instantiate): ditto.
+ (tab_control_update): ditto.
+ (image_instantiator_combo_box): ditto.
+ (image_instantiator_tree_view): ditto.
+ (image_instantiator_tab_control): ditto.
+ (layout_post_instantiate): remove dead code.
+
+ * print.c (debug_print_no_newline): only write to debugger if in
+ WIN32_NATIVE.
+
+ * elhash.c (Fmake_hash_table): update doc string.
+
+ * event-msw.c (mswindows_wnd_proc): don't allow processing of
+ messages whilst in GC. This at least stops XEmacs crashing but has
+ the potential for wierd behaviour.
+
+2000-07-31 Martin Buchholz <martin@xemacs.org>
+
+ * config.h.in:
+ Make existence of s&m files optional.
+
+ * s/bsd386.h: Remove HAVE_GETLOADAVG.
+ * s/freebsd.h: Remove HAVE_GETLOADAVG.
+ * s/gnu.h: Remove HAVE_GETLOADAVG.
+ * s/netbsd.h: Remove HAVE_GETLOADAVG.
+ * s/sol2.h: Remove HAVE_GETLOADAVG.
+ * lisp.h: Remove getloadavg() declaration.
+ * fns.c:
+ Include <sys/loadavg.h> if available.
+ Don't declare our own getloadavg() if HAVE_GETLOADAVG.
+ * config.h.in: Group together getloadavg()-related macros.
+ Use only configure-time tests to detect getloadavg().
+
+2000-07-30 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in (TransientEmacsShell.o): Fix race condition.
+
+2000-07-25 Andy Piper <andy@xemacs.org>
+
+ * syswindows.h: add tchar.h for native builds.
+
+ * frame.c (syms_of_frame): remove set-glyph-image.
+
+ * general-slots.h: add Qset_glyph_image.
+
+ * glyphs-widget.c (layout_update): add domain arg to
+ set-glyph-image.
+ (syms_of_glyphs_widget): remove set-glyph-image.
+
+2000-07-23 Ben Wing <ben@xemacs.org>
+
+ * dialog-msw.c (vars_of_dialog_mswindows): need to staticpro
+ Vpopup_frame_list.
+
+2000-07-22 Andy Piper <andy@xemacs.org>
+
+ * symsinit.h: add syms_of_win32().
+
+ * gui-msw.c (syms_of_gui_mswindows): remove
+ Fmswindows_shell_execute.
+ (Fmswindows_shell_execute): moved to win32.c.
+
+ * emacs.c (main_1): add syms_of_win32 ().
+
+ * win32.c (init_potentially_nonexistent_functions): rewrite in
+ compiler-friendly terms.
+ (Fmswindows_shell_execute): move here from gui-msw.c.
+ (syms_of_win32): new.
+
+ * device-msw.c (Fmswindows_printer_list): clean up args to
+ EnumPrinters.
+ Don't include tchar under cygwin or mingw.
+ (msprinter_default_printer): make cygwin-friendly.
+
+2000-07-21 Andy Piper <andy@xemacs.org>
+
+ * glyphs-widget.c (image_instantiator_tree_view): use tab
+ control's update function.
+ (layout_property): new function. Retrieve items.
+
+ * glyphs-msw.c (mswindows_tree_view_redisplay): new
+ function. Re-populate the tree view from the pending items.
+
+ * glyphs.c (instantiate_image_instantiator): Make sure the domain
+ is designated the parent if the domain is an image instance. This
+ is needed so that dirtiness can be cascade up the hierarchy and
+ thus for layout children to be redisplayed correctly.
+ (allocate_image_instance): rename glyph -> parent.
+
+ * redisplay.h: change redisplay_output_layout signature.
+
+ * redisplay-msw.c (mswindows_output_display_block): use domain
+ arg.
+
+ * redisplay-x.c (x_output_display_block): use domain arg.
+
+2000-07-10 Andy Piper <andy@xemacs.org>
+
+ * window.c (Fset_window_configuration): add comment.
+
+ * redisplay-output.c (compare_runes):
+ (redisplay_output_subwindow): redisplay rather than update subwindow.
+ (redisplay_output_layout): ditto.
+
+ * redisplay-msw.c (mswindows_frame_output_end):
+ (mswindows_frame_output_end): make defer window pos optional.
+
+ * lisp.h: add Flast.
+
+ * glyphs.h (struct image_instantiator_methods): add dest_mask top
+ normalize method. Change update method to be for changed
+ instantiators. Add redisplay method. Change signature of layout
+ method.
+ (struct Lisp_Image_Instance): add instantiator.
+ (IMAGE_INSTANCE_INSTANTIATOR): new.
+ (IMAGE_INSTANCE_SUBWINDOW_FACE): new.
+ (XIMAGE_INSTANCE_INSTANTIATOR): new.
+ (XIMAGE_INSTANCE_SUBWINDOW_FACE): new.
+
+ * glyphs.c:
+ (find_instantiator_differences): new function.
+ (Fset_instantiator_property): new convenience function.
+ (check_image_instance_structure): strictly check for vector
+ instantiators.
+ (normalize_image_instantiator): make non-static.
+ (instantiate_image_instantiator): pass on dest_mask and use new
+ signatures for image_instance_layout and friends.
+ (mark_image_instance): mark the instantiator. Mark the subwindow
+ face not the widget face.
+ (image_instance_equal): add instantiator.
+ (image_instance_hash): ditto.
+ (allocate_image_instance): ditto.
+ (Fset_image_instance_property): removed.
+ (Fimage_instance_file_name): ditto.
+ (Fcolorize_image_instance): ditto.
+ (image_instance_layout): add offsets to be set.
+ (update_image_instance): new function. update an image instance
+ from its changed instantiator.
+ (inherit_normalize): add dest_mask.
+ (xbm_normalize): ditto.
+ (xface_normalize): ditto.
+ (xpm_normalize): ditto.
+ (text_update): set_property -> update.
+ (image_instantiate): use the glyph identity as a hash key, not the
+ instantiator.
+ (glyph_width): use new image_instance_layout signature.
+ (glyph_ascent): ditto.
+ (glyph_descent): ditto.
+ (glyph_height): ditto.
+ (glyph_query_geometry): ressurrect.
+ (glyph_layout): ditto.
+ (redisplay_subwindow): update -> redisplay.
+ (syms_of_glyphs): add Fset_instantiator_property.
+ (image_instantiator_format_create): set_property -> update.
+
+ * glyphs-x.c:
+ (autodetect_normalize): add dest_maks to signature.
+ (x_redisplay_subwindow): update -> redisplay.
+ (x_redisplay_widget): ditto.
+ (x_button_redisplay): ditto.
+ (x_progress_gauge_redisplay): ditto.
+ (x_tab_control_redisplay): ditto. Rewrite to cope with changed
+ stacking order.
+ (console_type_create_glyphs_x): update -> redisplay.
+ (image_instantiator_format_create_glyphs_x): ditto.
+
+ * glyphs-widget.c:
+ (check_valid_instantiator): disallow glyphs in the instantiator,
+ they must now be vectors.
+ (check_valid_instantiator_list): ditto.
+ (glyph_instantiator_to_glyph): use internal symbol rather than
+ intern.
+ (widget_update): renamed from widget_set_property. Call cascaded
+ update methods.
+ (redisplay_widget): renamed from update_widget.
+ (widget_layout): image_instance_layout now takes position as well
+ as size.
+ (widget_normalize): ditto.
+ (widget_instantiate): ditto.
+ (tab_control_query_geometry) ditto.:
+ (tab_control_update): renamed from tab_control_set_property.
+ (progress_gauge_update): set_property -> update.
+ (layout_normalize): rewrite so that child instantiators are
+ normalized also.
+ (layout_update): new function. Create glyphs from the normalized
+ children and cope with any other layout keywords. We do not
+ instantiate children here that will be take care of by
+ redisplay_output_layout.
+ (layout_instantiate): call layout_update and not much else.
+ (layout_post_instantiate): not sure whether this is needed
+ anymore.
+ (layout_query_geometry): query glyph geometry rather than
+ image_instance geometry.
+ (layout_layout): set offsets from pass in parameters. Use glyph
+ geometry and layout functions rather than image instance ones.
+ (native_layout_layout): ditto.
+ (syms_of_glyphs_widget): add make-glyph and set-glyph-image.
+ (image_instantiator_widget): set_property -> update.
+ (image_instantiator_buttons): ditto.
+ (image_instantiator_progress_guage): ditto.
+ (image_instantiator_tab_control): ditto.
+ (VALID_LAYOUT_KEYWORDS): instantiators must now be vectors.
+ (image_instantiator_layout): add update method.
+
+ * glyphs-msw.c (bmp_normalize):
+ (mswindows_resource_normalize): add dest_mask so that it can be
+ proprogated by layout_normalize.
+ (begin_defer_window_pos): make optional because it may not be the
+ right thing to do and it introduces differences with X.
+ (mswindows_unmap_subwindow): ditto.
+ (mswindows_map_subwindow): ditto.
+ (mswindows_redisplay_subwindow): renamed from
+ mswindows_update_subwindow.
+ (mswindows_redisplay_widget): ditto.
+ (mswindows_button_redisplay): renamed from
+ mswindows_button_update. Update is now what the instantiation
+ function does for a changed instantiator.
+ (mswindows_progress_gauge_instantiate): set the progress value
+ here if appropriate.
+ (mswindows_tab_control_redisplay): cope with re-ordering of the
+ members of the tab widget by simply selecting the new top
+ widget. This makes things appear ok if you click on a tab.
+ (mswindows_combo_box_instantiate): image_instance_layout now takes
+ position as well as size.
+ (mswindows_progress_gauge_redisplay): renamed from
+ mswindows_progress_gauge_update.
+ (console_type_create_glyphs_mswindows): fix update -> redisplay.
+ (image_instantiator_format_create_glyphs_mswindows): ditto.
+
+ * glyphs-eimage.c (jpeg_normalize):
+ (gif_normalize):
+ (png_normalize):
+ (tiff_normalize): add dest_mask so that it can be proprogated by
+ layout_normalize.
+
+ * elhash.c:
+ (print_hash_table):
+ (hash_table_weakness_validate):
+ (decode_hash_table_weakness):
+ (Fhash_table_weakness):
+ (Fhash_table_type):
+ (syms_of_elhash): use Ben's naming scheme for hashtable types..
+
+ * console.h (struct console_methods): move update_* to
+ redisplay_*.
+
+2000-07-20 Ben Wing <ben@xemacs.org>
+
+ * *.[ch] (XSETOBJ): remove unused middle argument.
+ lisp-disunion.h: correct wrap_object() to one argument.
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * s/cygwin32.h:
+ * s/cygwin32.h (CYGWIN_CONV_PATH):
+ Add missing logb prototype for v1.1.
+ Use post-b20 names and alias to pre-b20 names when pre-b20.
+
+ * s/windowsnt.h: [5].
+
+2000-07-15 Ben Wing <ben@xemacs.org>
+
+ * Makefile.in.in (x_objs):
+ * Makefile.in.in (sheap_objs):
+ * Makefile.in.in (objs):
+ added win32.o, cosmetic cleanups.
+
+ * alloc.c (Fmake_byte_code):
+ [[[1]]]: Changes for new LIST_LOOP, EXTERNAL_LIST_LOOP,
+ etc. macros which declare their own args now.
+
+ * alloc.c (syms_of_alloc):
+ [[[2]]]: Use DEFSYMBOL, DEFKEYWORD, DEFERROR and friends.
+
+ * buffer.c:
+ Moved buffer-dedicated-frame, set-buffer-dedicated-frame into lisp.
+
+ * buffer.c (Fget_file_buffer):
+ Fixed GCPRO problem.
+
+ * buffer.c (get_truename_buffer):
+ Fixed comment about GC checking.
+
+ * buffer.c (syms_of_buffer):
+ Undeclared those dedicated frame funs.
+ [2].
+
+ * buffer.h:
+ Define convenience macros for internal/external conversions.
+ [[[3]]]: Define codesys aliases Qcommand_argument_encoding
+ and Qenvironment_variable_encoding for cleaner code.
+
+ * bufslots.h:
+ Remove dedicated-frame; in lisp.
+
+ * bytecode.c (funcall_compiled_function):
+ [1].
+
+ * bytecode.c (syms_of_bytecode):
+ [2].
+
+ * console-msw.c:
+ * console-msw.c (mswindows_show_console): Rewrote.
+
+ * console-msw.c (Fmswindows_debugging_output): New.
+ Sends to OutputDebugString (special MSWin debugger interface).
+
+ * console-msw.c (Fmswindows_message_box):
+ Fixed stupid bugs so it works when called from kill-emacs.
+
+ * console-msw.c (syms_of_console_mswindows):
+ Declare Fmswindows_debugging_output.
+
+ * console-msw.h:
+ New MSWin prototypes.
+
+ * console-msw.h (struct mswindows_frame):
+ New entry last-click-mods for improved button-modifier support.
+
+ * console-msw.h (FRAME_MSWINDOWS_POPUP):
+ New struct entry `popup' with corresponding accessor.
+
+ * console-x.c:
+ * console-x.c (split_up_display_spec):
+ * console-x.c (get_display_arg_connection):
+ * console-x.c (x_semi_canonicalize_console_connection):
+ * console-x.c (x_canonicalize_device_connection):
+ [[[6]]]: Change char to more specific type.
+ [[[8]]]: Make use of abstracting codesys aliases defined in [3], [4];
+
+ * console-x.c (x_semi_canonicalize_console_connection):
+ * console-x.c (x_canonicalize_device_connection):
+ [[[9]]]: Fix up error signalling to use new structured error system.
+
+ * console-x.h:
+ [[[4]]]: Define codesys aliases:
+ Qlwlib_encoding, Qx_atom_name_encoding, Qx_font_name_encoding,
+ Qx_color_name_encoding, Qx_display_name_encoding.
+
+ * console.h (struct console_methods):
+ New method make_dialog_box_internal supersedes older
+ popup_dialog_box method.
+
+ * data.c:
+ Define many new errors, part of new structured errors.
+
+ * data.c (init_errors_once_early):
+ * data.c (syms_of_data):
+ [2].
+
+ * device-msw.c (mswindows_init_device):
+ [[[5]]]: Cleanup to support NT 3.51.
+
+ * device-msw.c (decode_devmode): Cleanup.
+
+ * device-msw.c (mswindows_handle_print_setup_dialog_box):
+ * device-msw.c (mswindows_handle_print_dialog_box):
+ * device-msw.c (mswindows_handle_page_setup_dialog_box):
+ * device-msw.c (syms_of_device_mswindows):
+ Delete the dialog box primitives recently introduced by Kirill and
+ instead interface to general dialog box interface.
+
+ * device-x.c:
+ * device-x.c (compute_x_app_name):
+ * device-x.c (x_init_device):
+ * device-x.c (Fx_valid_keysym_name_p):
+ * device-x.c (Fx_set_font_path):
+ [6].
+ [7].
+
+ * device.h (wrap_device): New.
+ First of its kind; meant to replace XSETDEVICE.
+
+ * dialog-msw.c: Many file-dialog symbols.
+
+ * dialog-msw.c (mswindows_register_popup_frame): New.
+ * dialog-msw.c (mswindows_is_dialog_msg): New.
+ For supporting kbd traversal in dialog boxes.
+
+ * dialog-msw.c (dialog_proc):
+ Support hitting ESC in dialogs.
+
+ * dialog-msw.c (struct):
+ Common dialog box errors.
+
+ * dialog-msw.c (handle_file_dialog_box): New.
+ Add file dialog code.
+
+ * dialog-msw.c (handle_question_dialog_box):
+ Redo existing code to support new question dialog syntax.
+
+ * dialog-msw.c (console_type_create_dialog_mswindows):
+ We support new dialog console method.
+
+ * dialog-msw.c (syms_of_dialog_mswindows):
+ * dialog-msw.c (vars_of_dialog_mswindows):
+ New file dialog symbols, vars.
+
+ * dialog-x.c:
+ * dialog-x.c (maybe_run_dbox_text_callback):
+ * dialog-x.c (dbox_descriptor_to_widget_value):
+ * dialog-x.c (x_make_dialog_box_internal):
+ * dialog-x.c (console_type_create_dialog_x):
+ Mule-ize entire file.
+ Redo to support question dialog syntax.
+ [6].
+
+ * dialog.c:
+ * dialog.c (Fmake_dialog_box_internal):
+ * dialog.c (syms_of_dialog):
+ Kill old popup-dialog-box, replace with new primitive.
+ Just call device method or signal error.
+
+ * eldap.c (Fldap_open):
+ * eldap.c (Fldap_search_basic):
+ * eldap.c (Fldap_add):
+ * eldap.c (Fldap_modify):
+ [1].
+ [7].
+
+ * emacs.c:
+ * emacs.c (make_arg_list_1):
+ * emacs.c (make_arg_list):
+ Mule-ize call to dll_init().
+ [6].
+ [8].
+
+ * emacs.c (make_argc_argv):
+ * emacs.c (free_argc_argv):
+ * emacs.c (init_cmdargs):
+ * emacs.c (main_1):
+ * emacs.c (Fkill_emacs):
+ * emacs.c (Fdump_emacs):
+ Update comments about what can be used in syms_* etc.
+ Call init_win32() when necessary.
+ Fix up MS Win dialog box in kill-buffer to actually work right.
+ [7].
+
+ * eval.c:
+ * eval.c (For):
+ * eval.c (Fand):
+ * eval.c (Fprogn):
+ * eval.c (Fprog1):
+ * eval.c (Fprog2):
+ * eval.c (FletX):
+ * eval.c (Flet):
+ * eval.c (condition_case_3):
+ * eval.c (Feval):
+ * eval.c (function_argcount):
+ * eval.c (funcall_lambda):
+ [1].
+
+ * eval.c (type_error): New.
+ * eval.c (maybe_type_error): New.
+ * eval.c (continuable_type_error): New.
+ * eval.c (maybe_continuable_type_error): New.
+ * eval.c (type_error_with_frob): New.
+ * eval.c (maybe_type_error_with_frob): New.
+ * eval.c (continuable_type_error_with_frob): New.
+ * eval.c (maybe_continuable_type_error_with_frob): New.
+ New functions for use with structured errors.
+
+ * event-Xt.c:
+ * event-Xt.c (x_event_to_emacs_event):
+ Buttons are now modifiers too.
+
+ * event-Xt.c (emacs_Xt_current_event_timestamp):
+ Implement new event method.
+ * event-Xt.c (reinit_vars_of_event_Xt): Set it.
+
+ * event-msw.c:
+ * event-msw.c (ntpipe_shove_writer): [5].
+ * event-msw.c (mswindows_enqueue_mouse_button_event):
+ * event-msw.c (mswindows_drain_windows_queue):
+ * event-msw.c (mswindows_wnd_proc): [7].
+ * event-msw.c (mswindows_current_layout_has_AltGr): [5].
+ * event-msw.c (mswindows_modifier_state):
+ Throughout: support new button modifiers.
+
+ * event-msw.c (emacs_mswindows_current_event_timestamp):
+ Implement new event method.
+ * event-msw.c (reinit_vars_of_event_mswindows): Set it.
+
+ * event-stream.c:
+ * event-stream.c (event_stream_current_event_timestamp): New.
+ * event-stream.c (maybe_kbd_translate): New functionality.
+ * event-stream.c (vars_of_event_stream):
+ Document new kbd-translate-table functionality.
+
+ * event-stream.c (Fcurrent_event_timestamp): New.
+ New primitive for use in fabricated events.
+ * event-stream.c (syms_of_event_stream): [2]. Declare new primitive.
+
+ * events-mod.h (XEMACS_MOD_BUTTON1): new button modifiers.
+
+ * events.c:
+ * events.c (Fmake_event):
+ * events.c (WRONG_EVENT_TYPE_FOR_PROPERTY):
+ [1].
+ [9].
+
+ * events.c (format_event_object): fix gcc warnings.
+
+ * events.c (Fevent_timestamp): Document new primitives.
+
+ * events.c (TIMESTAMP_HALFSPACE): New.
+
+ * events.c (Fevent_timestamp_lessp): New. New primitive for
+ comparing timestamps correctly (half-space algorithm).
+
+ * events.c (Fevent_modifier_bits): Doc fix.
+
+ * events.c (Fevent_modifiers): Major doc addition.
+ * events.c (event_x_y_pixel_internal): Typo fix.
+ * events.c (syms_of_events): Declare new primitives.
+
+ * events.h:
+ Update long comment for button modifiers, timestamps.
+
+ * events.h (struct event_stream):
+ New current_event_timestamp method.
+
+ * extents.c:
+ * extents.c (extent_in_region_p):
+ * extents.c (decode_extent):
+ * extents.c (Fset_extent_parent):
+ * extents.c (decode_map_extents_flags):
+ Fix gcc warnings.
+ [9].
+
+ * extents.c (struct extent_at_arg):
+ * extents.c (decode_extent_at_flag):
+ * extents.c (extent_at_mapper):
+ * extents.c (extent_at_bytind):
+ * extents.c (Fextent_at): Adapt to new lower-level interface. [9].
+ * extents.c (Fextents_at): New primitive. [9].
+ * extents.c (symbol_to_glyph_layout): [9].
+ Support new primitive `extents-at'.
+
+
+ * extents.c (get_text_property_bytind):
+ extent_at_bytind has another arg.
+ [9].
+
+ * extents.c (syms_of_extents): New primitive.
+
+ * file-coding.c (Fmake_coding_system): [1].
+ * file-coding.c (subsidiary_coding_system): fix gcc warning
+ * file-coding.c (syms_of_file_coding): [2].
+
+ * fileio.c (Fexpand_file_name):
+ * fileio.c (Fsysnetunam):
+ * fileio.c (Ffile_exists_p):
+ * fileio.c (Ffile_executable_p):
+ * fileio.c (Fverify_visited_file_modtime):
+ Clean up GCPROing.
+
+ * fileio.c (syms_of_fileio): [2].
+
+ * filelock.c (lock_file_1):
+ * filelock.c (current_lock_owner):
+ * filelock.c (lock_if_free):
+ * filelock.c (lock_file):
+ * filelock.c (unlock_file):
+ Clean up GCPROing.
+
+ * fns.c (concat): Fix gcc warning.
+
+ * fns.c (Fmember):
+ * fns.c (Fold_member):
+ * fns.c (Fmemq):
+ * fns.c (Fold_memq):
+ * fns.c (memq_no_quit):
+ * fns.c (Fassoc):
+ * fns.c (Fold_assoc):
+ * fns.c (Fassq):
+ * fns.c (Fold_assq):
+ * fns.c (assq_no_quit):
+ * fns.c (Frassoc):
+ * fns.c (Fold_rassoc):
+ * fns.c (Frassq):
+ * fns.c (Fold_rassq):
+ * fns.c (rassq_no_quit):
+ * fns.c (Fdelete):
+ * fns.c (Fold_delete):
+ * fns.c (Fdelq):
+ * fns.c (Fold_delq):
+ * fns.c (delq_no_quit):
+ * fns.c (Fremassoc):
+ * fns.c (Fremassq):
+ * fns.c (remassq_no_quit):
+ * fns.c (Fremrassoc):
+ * fns.c (Fremrassq):
+ * fns.c (remrassq_no_quit):
+ * fns.c (Freverse):
+ * fns.c (mapcar1):
+ [1].
+
+ * frame-msw.c (mswindows_init_frame_1):
+ * frame-msw.c (mswindows_delete_frame):
+ Register popups with dialog code so keyboard traversing works.
+
+ * frame-tty.c (tty_raise_frame_no_select): [1].
+
+ * frame-x.c:
+ * frame-x.c (x_set_frame_text_value):
+ * frame-x.c (x_set_frame_properties):
+ * frame-x.c (x_create_widgets):
+ [7].
+
+ * frame.c:
+ * frame.c (Fmouse_pixel_position): Minor doc fixes.
+
+ * frame.h (wrap_frame): New.
+ Macro like wrap_device.
+
+ * general.c:
+ * general.c (SYMBOL):
+ * general.c (syms_of_general):
+ Major reorg. This is now just a wrapper and symbols themselves
+ are listed in general-slots.h.
+
+ * glyphs-eimage.c (tiff_instantiate): Need cast to fix warning.
+ * glyphs-msw.c (mswindows_resource_instantiate): [5].
+
+ * glyphs-msw.c (mswindows_native_layout_instantiate):
+ Add DS_CONTROL so keyboard traversal will work.
+
+ * glyphs-widget.c:
+ * glyphs-widget.c (syms_of_glyphs_widget):
+ Move some symbols to general-slots.h.
+
+ * glyphs-x.c:
+ * glyphs-x.c (xbm_instantiate_1):
+ * glyphs-x.c (x_xbm_instantiate):
+ * glyphs-x.c (x_xface_instantiate):
+ * glyphs-x.c (autodetect_instantiate):
+ * glyphs-x.c (cursor_font_instantiate):
+ * glyphs-x.c (x_update_widget):
+ * glyphs-x.c (x_widget_instantiate):
+ * glyphs.c (bitmap_to_lisp_data):
+ * glyphs.c (pixmap_to_lisp_data):
+ [7].
+
+ * glyphs.c (syms_of_glyphs):
+ [2].
+
+ * gui-x.c:
+ * gui-x.c (print_widget_value):
+ * gui-x.c (menu_separator_style_and_to_external):
+ * gui-x.c (add_accel_and_to_external):
+ * gui-x.c (button_item_to_widget_value):
+ * gui-x.c (gui_items_to_widget_values_1):
+ * gui-x.c (gui_items_to_widget_values):
+ * gui-x.c (syms_of_gui_x):
+ * gui-x.c (vars_of_gui_x):
+ Mule-ize entire file. Move menu-no-selection-hook to gui.c.
+ [9].
+
+ * gui-x.h:
+ Muleize, prototype changes matching gui-x.c.
+
+ * gui.c:
+ * gui.c (separator_string_p):
+ * gui.c (gui_item_add_keyval_pair):
+ * gui.c (make_gui_item_from_keywords_internal):
+ * gui.c (signal_too_long_error):
+ * gui.c (parse_gui_item_tree_item):
+ * gui.c (syms_of_gui):
+ * gui.c (vars_of_gui):
+ * gui.h:
+ menu-no-selection-hook moved here (used by MSWin).
+ Move some symbols to general-slots.h.
+ [6].
+ [9].
+
+ * insdel.c (get_buffer_pos_char):
+ * insdel.c (get_buffer_range_char):
+ Add GC comments.
+
+ * keymap.c (keymap_lookup_directly):
+ * keymap.c (keymap_store):
+ * keymap.c (ensure_meta_prefix_char_keymapp):
+ * keymap.c (describe_map):
+ * keymap.h:
+ Support new button modifiers.
+
+ * lisp-disunion.h (wrap_object):
+ * lisp-disunion.h (XSETOBJ):
+ Rename make_obj to wrap_object.
+
+ * lisp-union.h:
+ * lisp-union.h (make_int):
+ * lisp-union.h (make_char):
+ Support wrap_object.
+
+ * lisp.h:
+ * lisp.h (LIST_LOOP):
+ * lisp.h (EXTERNAL_LIST_LOOP):
+ * lisp.h (LIST_LOOP_2):
+ * lisp.h (EXTERNAL_LIST_LOOP_1):
+ * lisp.h (EXTERNAL_LIST_LOOP_2):
+ * lisp.h (EXTERNAL_LIST_LOOP_3):
+ * lisp.h (EXTERNAL_LIST_LOOP_4_NO_DECLARE):
+ * lisp.h (PRIVATE_EXTERNAL_LIST_LOOP_6):
+ * lisp.h (GET_EXTERNAL_LIST_LENGTH):
+ * lisp.h (EXTERNAL_ALIST_LOOP_5):
+ * lisp.h (EXTERNAL_ALIST_LOOP_6):
+ * lisp.h (EXTERNAL_ALIST_LOOP_6_NO_DECLARE):
+ * lisp.h (EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE):
+ * lisp.h (EXTERNAL_PROPERTY_LIST_LOOP_7):
+ * lisp.h (struct Lisp_Symbol):
+ * lisp.h (maybe_continuable_error_with_frob):
+ Fix up section comments.
+ Add new types for char to indicate usage.
+ Delete symbols auto-generated from general-slots.h.
+ Add prototypes for structured error functions.
+ Add long comments describing looping macros and change interface
+ so that lvalues are automatically declared.
+ Add NO_DECLARE macro in case callers want to declare lvalues
+ themselves.
+
+ * lread.c (read_syntax_error):
+ * lread.c (continuable_read_syntax_error):
+ * lread.c (read_structure):
+ * lread.c (sequence_reader):
+ * lread.c (read_list_conser):
+ * lread.c (read_compiled_function):
+ Rename syntax_error and continuable_syntax_error to avoid clash
+ with same-named structured error functions.
+
+ * menubar-msw.c (mswindows_translate_menu_or_dialog_item):
+ * menubar-msw.c (populate_menu_add_item):
+ * menubar-msw.c (populate_or_checksum_helper):
+ [5].
+ [9].
+
+ * menubar-x.c:
+ * menubar-x.c (menu_item_descriptor_to_widget_value_1):
+ Mule-ize whole file.
+
+ * menubar.c (Fnormalize_menu_item_name): Add optimization.
+
+ * mule-charset.c (Fmake_charset):
+ * mule-wnnfns.c (Fwnn_set_param):
+ [1].
+
+ * ntproc.c (create_child):
+ * ntproc.c (Fwin32_set_current_locale):
+ Add comments portending doom.
+
+ * objects-msw.c:
+ * objects-msw.c (old_font_enum_callback_2):
+ * objects-msw.c (font_enum_callback_1):
+ * objects-msw.c (mswindows_enumerate_fonts):
+ [5].
+
+ * objects-x.c:
+ * objects-x.c (allocate_nearest_color):
+ * objects-x.c (x_parse_nearest_color):
+ * objects-x.c (x_initialize_color_instance):
+ * objects-x.c (x_print_color_instance):
+ * objects-x.c (x_finalize_color_instance):
+ * objects-x.c (x_valid_color_name_p):
+ * objects-x.c (x_initialize_font_instance):
+ * objects-x.c (x_print_font_instance):
+ * objects-x.c (valid_x_font_name_p):
+ * objects-x.c (truename_via_FONT_prop):
+ * objects-x.c (truename_via_random_props):
+ * objects-x.c (truename_via_XListFonts):
+ * objects-x.c (x_font_truename):
+ * objects-x.c (x_font_instance_truename):
+ * objects-x.c (x_font_instance_properties):
+ * objects-x.c (x_list_fonts):
+ * objects-x.c (x_find_charset_font):
+ Mule-ize entire file.
+ [7].
+
+ * objects-x.h:
+ Mule-verify.
+
+ * print.c:
+ * print.c (std_handle_out_external):
+ * print.c (debug_print_no_newline):
+ * print.c (syms_of_print):
+ Output to all debugger kinds in debug-print.
+ Fix console-output code under MSWin to actually work.
+
+ * process-nt.c (send_signal):
+ * process-nt.c (nt_create_process):
+ Use newer Unicode macros.
+
+ * process-unix.c (unix_create_process):
+ * process-unix.c (unix_canonicalize_host_name):
+ * process-unix.c (unix_open_network_stream):
+ [7].
+
+ * scrollbar-x.c:
+ Mule-verify.
+
+ * search.c (syms_of_search):
+ [2].
+
+ * select-msw.c (mswindows_destroy_selection):
+ Use LIST_LOOP_2.
+
+ * select-x.c (symbol_to_x_atom):
+ [7].
+
+ * select.c (syms_of_select):
+ [2].
+
+ * sound.c (Fplay_sound_file):
+ [7].
+
+ * specifier.c:
+ * specifier.c (decode_specifier_type):
+ * specifier.c (Fvalid_specifier_locale_type_p):
+ * specifier.c (check_valid_locale_or_locale_type):
+ * specifier.c (decode_locale):
+ * specifier.c (decode_locale_type):
+ * specifier.c (decode_locale_list):
+ * specifier.c (check_valid_domain):
+ * specifier.c (decode_specifier_tag_set):
+ * specifier.c (Fcanonicalize_tag_set):
+ * specifier.c (Fdefine_specifier_tag):
+ * specifier.c (Fspecifier_tag_predicate):
+ * specifier.c (check_valid_inst_list):
+ * specifier.c (check_valid_spec_list):
+ * specifier.c (decode_how_to_add_specification):
+ * specifier.c (check_modifiable_specifier):
+ * specifier.c (specifier_add_spec):
+ * specifier.c (boolean_validate):
+ * specifier.c (display_table_validate):
+ [9].
+
+ * specifier.c (syms_of_specifier):
+ Move some symbols to general-slots.h.
+ [2].
+
+ * symbols.c:
+ * symbols.c (Fmapatoms):
+ * symbols.c (Fapropos_internal):
+ Add GCPROs.
+
+ * symbols.c (set_default_buffer_slot_variable):
+ * symbols.c (set_default_console_slot_variable):
+ [1].
+
+ * symbols.c (defsymbol_massage_name_1):
+ * symbols.c (defkeyword_massage_name):
+ * symbols.c (deferror_1):
+ * symbols.c (deferror):
+ * symbols.c (deferror_massage_name_and_message):
+ * symeval.h:
+ * symeval.h (DEFSYMBOL):
+ Support DEFSYMBOL*, DEFKEYWORD, DEFERROR
+
+ * symbols.c (syms_of_symbols):
+ [2].
+
+ * symsinit.h:
+ * symsinit.h (init_win32): New.
+ Also new is syms_of_dialog_mswindows.
+
+ * syswindows.h:
+ Add new Unicode macros, missing Cygwin wide-char functions,
+ convenience conversion macros for Qmswindows_tstr, macros for
+ encapsulating required MSWin <-> Cygwin filename conversions,
+ prototype for dynamically-extracted (not in NT 3.51) functions.
+
+ * toolbar-x.c:
+ Mule-verify.
+
+ * tooltalk.c (Fadd_tooltalk_message_arg):
+ * tooltalk.c (Fadd_tooltalk_pattern_attribute):
+ * tooltalk.c (Fadd_tooltalk_pattern_arg):
+ [7].
+
+ * tooltalk.c (syms_of_tooltalk):
+ [2].
+
+ * unexnt.c:
+ * unexnt.c (unexec):
+ Fix up headers, declaration of unexec() to be more standard.
+
+2000-07-20 Martin Buchholz <martin@xemacs.org>
+
+ * offix.h: Revert change to guard macros - they're used in offix.c!
+
+2000-07-18 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * lisp.h: Defsubred Fdelete.
+
+ * console-msw.h: (msprinter_default_printer): Added.
+
+ * console-msw.c (msprinter_canonicalize_console_connection):
+ (msprinter_canonicalize_device_connection): Added.
+
+ * device-msw.c (msprinter_default_printer):
+ (Fmswingows_get_default_printer):
+ (signal_enum_priner_error):
+ (Fmswingows_printer_list): Added.
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
* 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_layout): return something. Fail if not initialized.
(layout_query_geometry): ditto.
(image_instantiator_native_layout): new function. Initialized the
native layout type.
minibuffer being the selected window when the gutter content is
instantiated.
- * gui.c (parse_gui_item_tree_list): add probably unneccessary
+ * gui.c (parse_gui_item_tree_list): add probably unnecessary
gcpros.
(parse_gui_item_tree_children): ditto.
(parse_gui_item_tree_item): ditto.
* redisplay.c (generate_modeline): don't take gutters into account.
(generate_modeline): ditto.
- (redisplay_frame): small gutter display optimisation.
+ (redisplay_frame): small gutter display optimization.
* redisplay-x.c (x_output_vertical_divider): don't take gutters into account.
(end_of_text):
(end_of_data): Do not compile in if using PDUMP.
- * symsinit.h: Protptyped vars_of_nt().
+ * symsinit.h: Prototyped vars_of_nt().
* ntproc.c (windows9x_p): Added, instead of os_subtype.
(find_child_console): Use it.
xnew_array_and_zero, thereby simplifying the code.
* mule-charset.c (make_charset): Make sure entire object is
- intialized, to avoid Purify warnings.
+ initialized, to avoid Purify warnings.
* alloc.c (resize_string): Fix unlikely crash with big strings.
2000-01-23 Martin Buchholz <martin@xemacs.org>
- * alloc.c (make_float): Make sure entire object is intialized, to
+ * alloc.c (make_float): Make sure entire object is initialized, to
avoid Purify warnings.
(pdump_register_sub): Remove useless assignment.
(pdump): Use xmalloc, not malloc.
(image_instantiator_tab_control):
(image_instantiator_labels):
(image_instantiator_layout): ditto.
- (image_instantiator_format_create_glyphs_widget): Call preceeding
+ (image_instantiator_format_create_glyphs_widget): Call preceding
functions.
2000-01-22 Martin Buchholz <martin@xemacs.org>
* redisplay.c:
(generate_formatted_string_db): new flag to distinguish a modeline
string from a title or icon one, plus use a negative first pos to
- indicate the modeline hscroll ammount.
+ indicate the modeline hscroll amount.
(add_string_to_fstring_db_runes): completely rewrote this function
to handle the case of scrolled modelines.
(add_glyph_to_fstring_db_runes): handle the case of scrolled
* window.c:
(Fmodeline_hscroll): new function to return the modeline current
- horizontal scroll ammount.
+ horizontal scroll amount.
(Fset_modeline_hscroll): new function to scroll the modeline
horizontaly.
Plus some updates related to this new functionality (windows
HEAP_IN_DATA is defined. beef up error message about what to do if
sheap space runs out.
- * sysdep.c: make start_of_data reurn something sensible for
+ * sysdep.c: make start_of_data return something sensible for
HEAP_IN_DATA.
* systime.h: don't use itimer stuff on cygwin b19.
* opaque.c: opaque objects given hash and equal methods, so they
can be compared with 'equal. Menubar uses opaque pointers as
- hash keys in an 'equal style hastable.
+ hash keys in an 'equal style hashtable.
* Most of the above touched files: Eliminated compiler warnings.
(Ffile_newer_than_file_p): ditto
(Fset_visited_file_modtime): ditto
- *fileio.c (Ffile_truename): Unneccessary GC protection.
+ *fileio.c (Ffile_truename): Unnecessary GC protection.
(Fdelete_directory): Fix broken caller-must-GC-protect call.
* filelock.c (lock_file): New comments warning that this function
* keymap.c (lookup_keys): Wrong sense in test.
- * Makefile.in.in: Dont dump font.elc.
+ * Makefile.in.in: Don't dump font.elc.
Sat Feb 15 02:30:51 1997 Steven L Baur <steve@altair.xemacs.org>
(mswindows_tab_control_instantiate): ditto.
(mswindows_tab_control_set_property): ditto.
(image_instantiator_format_create_glyphs_mswindows): predicate
- existance of widgets on HAVE_WIDGETS.
+ existence of widgets on HAVE_WIDGETS.
* frame.h (struct frame): add subwindow_exposures variables.
* systime.h: ditto.
* systty.h: ditto.
- * config.h.in: dont turn on DEBUG_ENCAPSULATION by default because
+ * config.h.in: don't turn on DEBUG_ENCAPSULATION by default because
some systems don't have all of the encapsulated system calls.
* callproc.c: warning elimination.
subwindows on a msw frame.
(mswindows_map_subwindow): ditto.
(mswindows_register_image_instance): register instantiated widgets
- with the widget hastable.
+ with the widget hashtable.
(mswindows_button_instantiate): instantiate a button type widget
on an msw frame.
(mswindows_subwindow_instantiate): instanttiate a subwindow on a
* fileio.c: (expand_file_name): under win32: Don't treat names
as UNC names if a drive letter has been specified. If a drive
- has been specified, strip out extra directory-seperators that
+ has been specified, strip out extra directory-separators that
reportedly cause problems under Win95.
1998-07-09 Jonathan Harris <jhar@tardis.ed.ac.uk>
* fileio.c: (expand_file_name): under win32: Don't treat names as
UNC names if a drive letter has been specified. If a drive has
- been specified, strip out extra directory-seperators that
+ been specified, strip out extra directory-separators that
reportedly cause problems under Win95.
1998-07-05 Andy Piper <andyp@parallax.co.uk>
1998-06-24 Jonathan Harris <jhar@tardis.ed.ac.uk>
- * fileio.c: Don't do directory seperator canonicalisation in
+ * fileio.c: Don't do directory separator canonicalisation in
substitute-in-file-name because we don't know that the
filename refers to a local file.
* objects-msw.c: Added helper function match_font used by
mswindows_initialize_font_instance and mswindows_list_fonts.
Allow a charset to be specified in a font string, even if
- previous fields havn't been specified.
+ previous fields haven't been specified.
1998-06-23 Greg Klanderman <greg@alphatech.com>
* objects-msw.c: Added helper function match_font used by
mswindows_initialize_font_instance and mswindows_list_fonts.
Allow a charset to be specified in a font string, even if
- previous fields havn't been specified.
+ previous fields haven't been specified.
1998-06-15 Jonathan Harris <jhar@tardis.ed.ac.uk>
parameters. define macors to access it.
* frame-msw.c (mswindows_init_frame_1): use new target_rect
- parameter to intialise desired sizing. (mswindows_init_frame_2):
+ parameter to initialize desired sizing. (mswindows_init_frame_2):
enable and size the frame to something sensible when we get
here. (mswindows_set_frame_properites): use new
mswindows_size_frame_internal function and size frame if frame
(set_frame_toolbar): Removed allocation of toolbar_data lrecord.
(update_frame_toolbars): Do not check for changed buffer
here. Toolbar information is provided by cached specs in
- windows. The check for buffer is eliminated becuase toolbars are
+ windows. The check for buffer is eliminated because toolbars are
marked changed in set_frame_selected_window() in frame.c
Added check for changed toolbars geometry.
(compute_frame_toolbars_data): Removed unused second parameter;
$(lwlib_libs) :
cd ../lwlib && $(RECURSIVE_MAKE)
-x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
+x_objs=console-x.o device-x.o event-Xt.o frame-x.o\
glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
#ifdef AIX4
X11_libs = $(LIBI18N)
#endif /* HAVE_X_WINDOWS */
-#if defined (HEAP_IN_DATA) && !defined(PDUMP)
-sheap_obj=sheap.o
+#if defined (HEAP_IN_DATA) && !defined (PDUMP)
+sheap_objs=sheap.o
#endif
-#if defined(MINGW) || defined(CYGWIN)
-res_obj=xemacs_res.o
+#if defined (WIN32_NATIVE) || defined (CYGWIN)
+win32_objs=win32.o xemacs_res.o
#endif
## -Demacs is needed to make some files produce the correct version
macros.o marker.o md5.o minibuf.o objects.o opaque.o\
print.o process.o profile.o\
rangetab.o redisplay.o redisplay-output.o regex.o\
- search.o select.o $(sheap_obj) signal.o sound.o\
+ search.o select.o $(sheap_objs) signal.o sound.o\
specifier.o strftime.o symbols.o syntax.o sysdep.o\
- undo.o $(x_objs) widget.o window.o $(res_obj)
+ undo.o $(x_objs) widget.o window.o $(win32_objs)
obj_rtl = $(objs:.o=.c.rtl)
./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
$(RM) SATISFIED; exit 0; fi; \
if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
- @$(RM) $@; \
+ $(RM) $@; \
$(RECURSIVE_MAKE) $@;
#else
@$(RM) $@
-search-mmaps=yes\
#endif
-chain-length=32 -ignore-signals=SIGPOLL -threads=yes\
- -cache-dir=./purecache -always-use-cache-dir=yes
+ -cache-dir=${srcdir}/purecache -always-use-cache-dir=yes
PURIFY_LIBS = -lpthread
puremacs: $(temacs_deps)
$(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
+## The above rules are subject to a race condition if using a parallel make.
+TransientEmacsShell.o : TopLevelEmacsShell.o
+TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
+
## Position-independent code for shared library creation
#if USE_GCC
pic_arg = -fpic
.PHONY: mostlyclean clean distclean realclean versionclean extraclean
mostlyclean:
- $(RM) temacs puremacs quantmacs prefix-args *.o *.i \
+ $(RM) temacs puremacs quantmacs *.o *.i \
core temacs.exe sheap-adjust.h
clean: mostlyclean versionclean
$(RM) libextcli* update-elc.stamp
GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.*
realclean: distclean
versionclean:
- $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC
+ $(RM) ${EXE_TARGET} ${DUMP_TARGET} ${libsrc}DOC
extraclean: realclean
$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
static const char gc_default_message[] = "Garbage collecting";
Lisp_Object Qgarbage_collecting;
-#ifndef VIRT_ADDR_VARIES
-extern
-#endif /* VIRT_ADDR_VARIES */
- EMACS_INT malloc_sbrk_used;
-
-#ifndef VIRT_ADDR_VARIES
-extern
-#endif /* VIRT_ADDR_VARIES */
- EMACS_INT malloc_sbrk_unused;
-
/* Non-zero means we're in the process of doing the dump */
int purify_flag;
/* Check for valid formal parameter list now, to allow us to use
SPECBIND_FAST_UNSAFE() later in funcall_compiled_function(). */
{
- Lisp_Object symbol, tail;
EXTERNAL_LIST_LOOP_3 (symbol, arglist, tail)
{
CHECK_SYMBOL (symbol);
{
Lisp_Object val;
- XSETOBJ (val, Lisp_Type_Record,
- alloc_lcrecord (list->size, list->implementation));
+ XSETOBJ (val, alloc_lcrecord (list->size, list->implementation));
return val;
}
}
/* All the built-in lisp object types are enumerated in `enum lrecord_type'.
Additional ones may be defined by a module (none yet). We leave some
room in `lrecord_implementations_table' for such new lisp object types. */
-#define MODULE_DEFINABLE_TYPE_COUNT 32
-const struct lrecord_implementation *lrecord_implementations_table[lrecord_type_count + MODULE_DEFINABLE_TYPE_COUNT];
-
+const struct lrecord_implementation *lrecord_implementations_table[(unsigned int)lrecord_type_last_built_in_type + MODULE_DEFINABLE_TYPE_COUNT];
+unsigned int lrecord_type_count = (unsigned int)lrecord_type_last_built_in_type;
/* Object marker functions are in the lrecord_implementation structure.
But copying them to a parallel array is much more cache-friendly.
This hack speeds up (garbage-collect) by about 5%. */
#else
gc_cons_threshold = 15000; /* debugging */
#endif
-#ifdef VIRT_ADDR_VARIES
- malloc_sbrk_unused = 1<<22; /* A large number */
- malloc_sbrk_used = 100000; /* as reasonable as any number */
-#endif /* VIRT_ADDR_VARIES */
lrecord_uid_counter = 259;
debug_string_purity = 0;
gcprolist = 0;
void
syms_of_alloc (void)
{
- defsymbol (&Qpre_gc_hook, "pre-gc-hook");
- defsymbol (&Qpost_gc_hook, "post-gc-hook");
- defsymbol (&Qgarbage_collecting, "garbage-collecting");
+ DEFSYMBOL (Qpre_gc_hook);
+ DEFSYMBOL (Qpost_gc_hook);
+ DEFSYMBOL (Qgarbage_collecting);
DEFSUBR (Fcons);
DEFSUBR (Flist);
Number of bytes of sharable Lisp data allocated so far.
*/ );
-#if 0
- DEFVAR_INT ("data-bytes-used", &malloc_sbrk_used /*
-Number of bytes of unshared memory allocated in this session.
-*/ );
-
- DEFVAR_INT ("data-bytes-free", &malloc_sbrk_unused /*
-Number of bytes of unshared memory remaining available in this session.
-*/ );
-#endif
-
#ifdef DEBUG_XEMACS
DEFVAR_INT ("debug-allocation", &debug_allocation /*
If non-zero, print out information to stderr about all objects allocated.
/* Synched up with: FSF 19.30. */
-/* Authorsip:
+/* Authorship:
FSF: A long time ago.
Very few changes for XEmacs.
unsigned size;
{
auto char probe; /* Probes stack depth: */
- REGISTER char *depth = ADDRESS_FUNCTION (probe);
+ register char *depth = ADDRESS_FUNCTION (probe);
#if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
was allocated from deeper in the stack than currently. */
{
- REGISTER header *hp; /* Traverses linked list. */
+ register header *hp; /* Traverses linked list. */
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
{
- REGISTER header *np = hp->h.next;
+ register header *np = hp->h.next;
free ((pointer) hp); /* Collect garbage. */
/* Allocate combined header + user data storage. */
{
- REGISTER pointer new = malloc (sizeof (header) + size);
+ register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
((header *) new)->h.next = last_alloca_header;
*/
(filename))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked and fixed 7-11-2000 ben. */
REGISTER Lisp_Object buf;
struct gcpro gcpro1;
dn = Ffile_name_directory (filename);
fn = Ffile_truename (dn, Qnil);
if (! NILP (fn)) dn = fn;
- fn = Fexpand_file_name (Ffile_name_nondirectory (filename),
- dn);
+ /* Formerly the two calls below were combined, but that is
+ not GC-safe because the first call returns unprotected
+ data and the second call can GC. --ben */
+ fn = Ffile_name_nondirectory (filename);
+ fn = Fexpand_file_name (fn, dn);
}
filename = fn;
NUNGCPRO;
}
{
- Lisp_Object elt;
LIST_LOOP_2 (elt, Vbuffer_alist)
{
buf = Fcdr (elt);
Lisp_Object
get_truename_buffer (REGISTER Lisp_Object filename)
{
+ /* This function can GC. GC correct 7-11-00 ben */
/* FSFmacs has its own code here and doesn't call get-file-buffer.
That's because their equivalent of find-file-compare-truenames
(find-file-existing-other-name) isn't looked at in get-file-buffer.
return result;
}
-DEFUN ("buffer-dedicated-frame", Fbuffer_dedicated_frame, 0, 1, 0, /*
-Return the frame dedicated to this BUFFER, or nil if there is none.
-No argument or nil as argument means use current buffer as BUFFER.
-*/
- (buffer))
-{
- struct buffer *buf = decode_buffer (buffer, 0);
-
- /* XEmacs addition: if the frame is dead, silently make it go away. */
- if (!NILP (buf->dedicated_frame) &&
- !FRAME_LIVE_P (XFRAME (buf->dedicated_frame)))
- buf->dedicated_frame = Qnil;
-
- return buf->dedicated_frame;
-}
-
-DEFUN ("set-buffer-dedicated-frame", Fset_buffer_dedicated_frame, 2, 2, 0, /*
-For this BUFFER, set the FRAME dedicated to it.
-FRAME must be a frame or nil.
-*/
- (buffer, frame))
-{
- struct buffer *buf = decode_buffer (buffer, 0);
-
- if (!NILP (frame))
- CHECK_LIVE_FRAME (frame); /* XEmacs change */
-
- return buf->dedicated_frame = frame;
-}
-
-
\f
DEFUN ("buffer-modified-p", Fbuffer_modified_p, 0, 1, 0, /*
Return t if BUFFER was modified since its file was last read or saved.
to access data internal to select.c that can't be seen from
Lisp (so the Lisp code would just call into C anyway. */
select_notify_buffer_kill (buf);
-
+
unbind_to (speccount, Qnil);
UNGCPRO;
b = XBUFFER (buf); /* Hypothetical relocating GC. */
DEFSUBR (Fbuffer_base_buffer);
DEFSUBR (Fbuffer_indirect_children);
DEFSUBR (Fbuffer_local_variables);
- DEFSUBR (Fbuffer_dedicated_frame);
- DEFSUBR (Fset_buffer_dedicated_frame);
DEFSUBR (Fbuffer_modified_p);
DEFSUBR (Fset_buffer_modified_p);
DEFSUBR (Fbuffer_modified_tick);
DEFSUBR (Fbuffer_memory_usage);
#endif
- deferror (&Qprotected_field, "protected-field",
- "Attempt to modify a protected field", Qerror);
+ DEFERROR (Qprotected_field, "Attempt to modify a protected field",
+ Qinvalid_change);
}
void
Qfile_name);
return (IS_DIRECTORY_SEP (*pwd_internal)
- && stat ((char *) pwd_internal, &pwdstat) == 0
- && stat (".", &dotstat) == 0
+ && xemacs_stat ((char *) pwd_internal, &pwdstat) == 0
+ && xemacs_stat (".", &dotstat) == 0
&& dotstat.st_ino == pwdstat.st_ino
&& dotstat.st_dev == pwdstat.st_dev
&& pwd_internal_len < MAXPATHLEN);
/* WARNING: These use a static buffer. This can lead to disaster if
these functions are not used *very* carefully. Another reason to only use
- TO_EXTERNAL_FORMATf() and TO_INTERNAL_FORMAT(). */
+ TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT(). */
void
dfc_convert_to_external_format (dfc_conversion_type source_type,
dfc_conversion_data *source,
argument to TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT(). */
#define Qnative Qfile_name
-#ifdef HAVE_MS_WINDOWS
+#if defined (WIN32_NATIVE) || defined (CYGWIN)
/* #### kludge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Remove this as soon as my Mule code is integrated. */
#define Qmswindows_tstr Qnative
#endif
+
+/* More stand-ins */
+#define Qcommand_argument_encoding Qnative
+#define Qenvironment_variable_encoding Qnative
+
+/* Convenience macros for extremely common invocations */
+#define C_STRING_TO_EXTERNAL(in, out, coding_system) \
+ TO_EXTERNAL_FORMAT (C_STRING, in, C_STRING_ALLOCA, out, coding_system)
+#define C_STRING_TO_EXTERNAL_MALLOC(in, out, coding_system) \
+ TO_EXTERNAL_FORMAT (C_STRING, in, C_STRING_MALLOC, out, coding_system)
+#define EXTERNAL_TO_C_STRING(in, out, coding_system) \
+ TO_INTERNAL_FORMAT (C_STRING, in, C_STRING_ALLOCA, out, coding_system)
+#define EXTERNAL_TO_C_STRING_MALLOC(in, out, coding_system) \
+ TO_INTERNAL_FORMAT (C_STRING, in, C_STRING_MALLOC, out, coding_system)
+#define LISP_STRING_TO_EXTERNAL(in, out, coding_system) \
+ TO_EXTERNAL_FORMAT (LISP_STRING, in, C_STRING_ALLOCA, out, coding_system)
+#define LISP_STRING_TO_EXTERNAL_MALLOC(in, out, coding_system) \
+ TO_EXTERNAL_FORMAT (LISP_STRING, in, C_STRING_MALLOC, out, coding_system)
+
\f
/************************************************************************/
/* */
/* FSFmacs has overlay stuff here. We have extent info elsewhere in the
struct buffer. */
- /* If dedicated_frame is non-nil, display_buffer tries to use it instead
- of the current frame */
- MARKED_SLOT (dedicated_frame);
+ /* dedicated_frame in lisp */
/* Lisp of symbols naming the file format used for visited file. */
MARKED_SLOT (file_format);
funcall_compiled_function (Lisp_Object fun, int nargs, Lisp_Object args[])
{
/* This function can GC */
- Lisp_Object symbol, tail;
int speccount = specpdl_depth();
REGISTER int i = 0;
Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
and local variables of fun. So just reserve it once. */
SPECPDL_RESERVE (f->specpdl_depth);
- /* Fmake_byte_code() guaranteed that f->arglist is a valid list
- containing only non-constant symbols. */
- LIST_LOOP_3 (symbol, f->arglist, tail)
- {
- if (EQ (symbol, Qand_rest))
- {
- tail = XCDR (tail);
- symbol = XCAR (tail);
- SPECBIND_FAST_UNSAFE (symbol, Flist (nargs - i, &args[i]));
- goto run_code;
- }
- else if (EQ (symbol, Qand_optional))
- optional = 1;
- else if (i == nargs && !optional)
- goto wrong_number_of_arguments;
- else
- SPECBIND_FAST_UNSAFE (symbol, i < nargs ? args[i++] : Qnil);
- }
+ {
+ /* Fmake_byte_code() guaranteed that f->arglist is a valid list
+ containing only non-constant symbols. */
+ LIST_LOOP_3 (symbol, f->arglist, tail)
+ {
+ if (EQ (symbol, Qand_rest))
+ {
+ tail = XCDR (tail);
+ symbol = XCAR (tail);
+ SPECBIND_FAST_UNSAFE (symbol, Flist (nargs - i, &args[i]));
+ goto run_code;
+ }
+ else if (EQ (symbol, Qand_optional))
+ optional = 1;
+ else if (i == nargs && !optional)
+ goto wrong_number_of_arguments;
+ else
+ SPECBIND_FAST_UNSAFE (symbol, i < nargs ? args[i++] : Qnil);
+ }
+ }
if (i < nargs)
goto wrong_number_of_arguments;
{
INIT_LRECORD_IMPLEMENTATION (compiled_function);
- deferror (&Qinvalid_byte_code, "invalid-byte-code",
- "Invalid byte code", Qerror);
+ DEFERROR_STANDARD (Qinvalid_byte_code, Qinvalid_state);
defsymbol (&Qbyte_code, "byte-code");
defsymbol (&Qcompiled_functionp, "compiled-function-p");
if (fd_error < 0)
{
+ int save_errno = errno;
close (filefd);
close (fd[0]);
if (fd1 >= 0)
close (fd1);
+ errno = save_errno;
report_file_error ("Cannot open", Fcons(error_file, Qnil));
}
#ifndef WIN32_NATIVE
if (pid < 0)
{
+ int save_errno = errno;
if (fd[0] >= 0)
close (fd[0]);
+ errno = save_errno;
report_file_error ("Doing fork", Qnil);
}
#endif
char *
egetenv (const char *var)
{
+ /* This cannot GC -- 7-28-00 ben */
Bufbyte *value;
Bytecount valuelen;
#undef INFODOCK_MINOR_VERSION
#undef INFODOCK_BUILD_VERSION
-/* Make all functions from all IEEE Stds 1003.[123] available. */
+/* Make functions from IEEE Stds 1003.[123] available. */
#undef _POSIX_C_SOURCE
-/* Make all functions from Unix98 available. */
+/* Make some functions from Unix98 available. */
#undef _XOPEN_SOURCE
-/* Make extensions from Unix98 available. */
+/* Make "extensions" from Unix98 available. */
#undef _XOPEN_SOURCE_EXTENDED
/* Make all functions available on AIX. See AC_AIX. */
#undef HAVE_XCONVERTCASE
+#undef HAVE_BALLOON_HELP
+
/* Where do we find bitmaps? */
#undef BITMAPDIR
#undef HAVE_MACH_MACH_H
#undef HAVE_SYS_PARAM_H
#undef HAVE_SYS_PSTAT_H
-#undef HAVE_SYS_STROPTS_H
#undef HAVE_SYS_TIME_H
#undef HAVE_SYS_TIMEB_H
#undef HAVE_SYS_UN_H
#undef TIME_WITH_SYS_TIME
#undef WORDS_BIGENDIAN
#undef HAVE_VFORK_H
-#undef HAVE_KSTAT_H
#undef vfork
#undef HAVE_LONG_FILE_NAMES
#undef HAVE_SHLIB
#undef HAVE_DLFCN_H
-#undef HAVE_LIBKSTAT
#undef HAVE_LIBINTL
#undef HAVE_LIBDNET
#undef HAVE_LIBRESOLV
#undef HAVE_TM_ZONE
#undef HAVE_TZNAME
+/* For `getloadavg' provided by system */
+#undef HAVE_GETLOADAVG
+#undef HAVE_SYS_LOADAVG_H
+/* For implementing `getloadavg' ourselves */
+#undef HAVE_LIBKSTAT
+#undef HAVE_KSTAT_H
+
/* Is `h_errno' declared by <netdb.h>? */
#undef HAVE_H_ERRNO
#undef HAVE_GETTIMEOFDAY
#undef HAVE_GETWD
#undef HAVE_GETCWD
-#undef HAVE_GETPT
#undef HAVE_LOGB
#undef HAVE_LRAND48
#undef HAVE_MATHERR
#undef HAVE_SIGSETJMP
#undef HAVE_SNPRINTF
#undef HAVE_STPCPY
-#undef HAVE_STRCASECMP
#undef HAVE_STRERROR
#undef HAVE_TZSET
#undef HAVE_ULIMIT
#undef HAVE_UTIMES
#undef HAVE_WAITPID
#undef HAVE_VSNPRINTF
+
+/* PTY support functions */
+#undef HAVE_GETPT /* glibc's easy pty allocation function */
+#undef HAVE__GETPT /* SGI's easy pty allocation function */
+#undef HAVE_OPENPTY /* BSD's easy pty allocation function */
+#undef HAVE_GRANTPT /* Unix98 */
+#undef HAVE_UNLOCKPT /* Unix98 */
+#undef HAVE_PTSNAME /* Unix98 */
+#undef HAVE_KILLPG /* BSD */
+#undef HAVE_TCGETPGRP /* Posix 1 */
+#undef HAVE_ISASTREAM /* SysV streams */
+#undef HAVE_PTY_H /* Linux, Tru64 openpty */
+#undef HAVE_LIBUTIL_H /* BSD openpty */
+#undef HAVE_SYS_STROPTS_H /* SysV streams */
+#undef HAVE_SYS_STRTIO_H /* SysV streams TIOCSIGNAL */
+
#undef HAVE_SOCKETS
#undef HAVE_SOCKADDR_SUN_LEN
#undef HAVE_MULTICAST
definitions isn't right with 64-bit systems. */
#undef USE_UNION_TYPE
-/* The configuration script defines opsysfile to be the name of the
- s/...h file that describes the system type you are using.
- The file is chosen based on the configuration name you give.
-
- See the file ../etc/MACHINES for a list of systems and the
- configuration names to use for them.
-
- See s/template.h for documentation on writing s/...h files. */
+/* The configuration script may define `opsysfile' to be the name of
+ the s/...h file that describes your operating system.
+ The file name is chosen based on the configuration name. */
#if defined (__cplusplus) && !defined (NOT_C_CODE)
extern "C" {
#endif
+
#undef config_opsysfile
+#ifdef config_opsysfile
#include config_opsysfile
+#endif
-/* The configuration script defines machfile to be the name of the
- m/...h file that describes the machine you are using. The file is
- chosen based on the configuration name you give.
-
- See the file ../etc/MACHINES for a list of machines and the
- configuration names to use for them.
+/* The configuration script may define `machfile' to be the name of
+ the m/...h file that describes the machine you are using.
+ The file name is chosen based on the configuration name. */
- See m/template.h for documentation on writing m/...h files. */
#undef config_machfile
+#ifdef config_machfile
#include config_machfile
+#endif
+
#if defined (__cplusplus) && !defined (NOT_C_CODE)
}
#endif
void
mswindows_show_console (void)
{
+ /* What I really want is for the console window to appear on top of other
+ windows, but NOT get the focus. This seems hard-to-impossible under
+ Windows. The following sequence seems to do the best possible, along
+ with keeping the console window on top when xemacs --help is used. */
HWND hwnd = mswindows_get_console_hwnd ();
- ShowWindow (hwnd, SW_SHOWNA);
-
- /* I tried to raise the window to the top without activating
- it, but this fails. Apparently Windows just doesn't like
- having the active window not be on top. So instead, we
- at least put it just below our own window, where part of it
- will likely be seen. */
- SetWindowPos (hwnd, GetForegroundWindow (), 0, 0, 0, 0,
- SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING |
- SWP_NOACTIVATE);
+ HWND hwndf = GetFocus ();
+ ShowWindow (hwnd, SW_SHOW);
+ BringWindowToTop (hwnd);
+ SetFocus (hwndf);
}
static int mswindows_console_buffered = 0;
return GetVersion () & 0x80000000;
}
+DEFUN ("mswindows-debugging-output", Fmswindows_debugging_output, 1, 1, 0, /*
+Write CHAR-OR-STRING to the Windows debugger, using OutputDebugString().
+This function can be used as the STREAM argument of Fprint() or the like.
+*/
+ (char_or_string))
+{
+ Extbyte *extstr;
+
+ if (STRINGP (char_or_string))
+ {
+ TO_EXTERNAL_FORMAT (LISP_STRING, char_or_string,
+ C_STRING_ALLOCA, extstr,
+ Qmswindows_tstr);
+ OutputDebugString (extstr);
+ }
+ else
+ {
+ Bufbyte str[MAX_EMCHAR_LEN + 1];
+ Bytecount len;
+
+ CHECK_CHAR_COERCE_INT (char_or_string);
+ len = set_charptr_emchar (str, XCHAR (char_or_string));
+ str[len] = '\0';
+ TO_EXTERNAL_FORMAT (C_STRING, str,
+ C_STRING_ALLOCA, extstr,
+ Qmswindows_tstr);
+ OutputDebugString (extstr);
+ }
+
+ return char_or_string;
+}
#ifdef DEBUG_XEMACS
Extbyte *titleout = 0;
UINT sty = 0;
- if (noninteractive)
- return Qcancel;
-
- if (!CONSP (flags))
+ if (!LISTP (flags))
{
CHECK_SYMBOL (flags);
flags = list1 (flags);
frob, errval, (char*)lpMsgBuf);
}
+static Lisp_Object
+msprinter_canonicalize_console_connection (Lisp_Object connection,
+ Error_behavior errb)
+{
+ /* If nil connection is specified, transform it into the name
+ of the default printer */
+ if (NILP (connection))
+ {
+ connection = msprinter_default_printer ();
+ if (NILP (connection))
+ {
+ if (ERRB_EQ (errb, ERROR_ME))
+ error ("There is no default printer in the system");
+ else
+ return Qunbound;
+ }
+ }
+
+ CHECK_STRING (connection);
+ return connection;
+}
+
+static Lisp_Object
+msprinter_canonicalize_device_connection (Lisp_Object connection,
+ Error_behavior errb)
+{
+ return msprinter_canonicalize_console_connection (connection, errb);
+}
+
\f
/************************************************************************/
/* initialization */
void
syms_of_console_mswindows (void)
{
+ DEFSUBR (Fmswindows_debugging_output);
+
defsymbol (&Qabortretryignore, "abortretryignore");
defsymbol (&Qapplmodal, "applmodal");
defsymbol (&Qdefault_desktop_only, "default-desktop-only");
/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */
INITIALIZE_CONSOLE_TYPE (msprinter, "msprinter", "console-msprinter-p");
+ CONSOLE_HAS_METHOD (msprinter, canonicalize_console_connection);
+ CONSOLE_HAS_METHOD (msprinter, canonicalize_device_connection);
}
void
typedef struct Lisp_Devmode
{
struct lcrecord_header header;
-
+
/* Pointer to the DEVMODE structure */
DEVMODE* devmode;
/* Full printer name. It can be longer than devmode->dmDeviceName
- can accomodate, so need to keep it separately */
+ can accommodate, so need to keep it separately */
char* printer_name;
/* Printer device this object is currently selected in, or Qnil
Lisp_Object fontlist; /* List of strings, device fonts */
HDC hcdc; /* Compatible DC */
DWORD update_tick; /* Used when device is modified through
- Windows mwssages, see WM_DISPLAYCHANGE
+ Windows messages, see WM_DISPLAYCHANGE
in event-msw.c */
};
/* Time of last click event, for button 2 emul */
DWORD last_click_time;
+ /* Mods of last click event */
+ DWORD last_click_mods;
+
/* Coordinates of last click event, screen-relative */
POINTS last_click_point;
#ifdef HAVE_TOOLBARS
int ignore_next_rbutton_up : 1;
int sizing : 1;
int paint_pending : 1; /* Whether a WM_PAINT magic event has been queued */
+ int popup : 1; /* frame is a popup frame */
/* Geometry, in characters, as specified by proplist during frame
- creation. Memebers are set to -1 for unspecified */
+ creation. Members are set to -1 for unspecified */
XEMACS_RECT_WH* target_rect;
};
#define FRAME_MSWINDOWS_CHARWIDTH(f) (FRAME_MSWINDOWS_DATA (f)->charwidth)
#define FRAME_MSWINDOWS_CHARHEIGHT(f) (FRAME_MSWINDOWS_DATA (f)->charheight)
#define FRAME_MSWINDOWS_TARGET_RECT(f) (FRAME_MSWINDOWS_DATA (f)->target_rect)
+#define FRAME_MSWINDOWS_POPUP(f) (FRAME_MSWINDOWS_DATA (f)->popup)
/* Frame check and validation macros */
#define FRAME_MSWINDOWS_P(frm) CONSOLE_TYPESYM_MSWINDOWS_P (FRAME_TYPE (frm))
{
int left_margin, top_margin, /* All in twips */
right_margin, bottom_margin;
- int charheight, charwidth; /* As per proplist or -1 if not gven */
+ int charheight, charwidth; /* As per proplist or -1 if not given */
int pix_left, pix_top; /* Calculated in init_frame_*, VP offset */
int job_started : 1;
int page_started : 1;
UINT msg, WPARAM wParam,
LPARAM lParam);
-void mswindows_redraw_exposed_area (struct frame *f, int x, int y,
+void mswindows_redraw_exposed_area (struct frame *f, int x, int y,
int width, int height);
void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest);
HWND mswindows_get_selected_frame_hwnd (void);
void mswindows_enqueue_magic_event (HWND hwnd, UINT msg);
+int mswindows_is_dialog_msg (MSG *msg);
/* win32 DDE management library */
#define MSWINDOWS_DDE_ITEM_OPEN "Open"
int mswindows_windows9x_p (void);
-
void mswindows_output_last_error (char *frob);
+Lisp_Object mswindows_handle_print_dialog_box (struct frame *f,
+ Lisp_Object keys);
+Lisp_Object mswindows_handle_page_setup_dialog_box (struct frame *f,
+ Lisp_Object keys);
+Lisp_Object mswindows_handle_print_setup_dialog_box (struct frame *f,
+ Lisp_Object keys);
+
+void mswindows_register_popup_frame (Lisp_Object frame);
+void mswindows_unregister_popup_frame (Lisp_Object frame);
+
+void mswindows_destroy_selection (Lisp_Object selection);
+
+Lisp_Object msprinter_default_printer (void);
+
+struct mswindows_dialog_id
+{
+ struct lcrecord_header header;
+
+ Lisp_Object frame;
+ Lisp_Object callbacks;
+ HWND hwnd;
+};
+
+DECLARE_LRECORD (mswindows_dialog_id, struct mswindows_dialog_id);
+#define XMSWINDOWS_DIALOG_ID(x) XRECORD (x, mswindows_dialog_id, struct mswindows_dialog_id)
+#define XSETMSWINDOWS_DIALOG_ID(x, p) XSETRECORD (x, p, mswindows_dialog_id)
+#define MSWINDOWS_DIALOG_IDP(x) RECORDP (x, mswindows_dialog_id)
+#define CHECK_MSWINDOWS_DIALOG_ID(x) CHECK_RECORD (x, mswindows_dialog_id)
+#define CONCHECK_MSWINDOWS_DIALOG_ID(x) CONCHECK_RECORD (x, mswindows_dialog_id)
+
#endif /* INCLUDED_console_msw_h_ */
if (NILP (CONSOLE_NAME (con)))
CONSOLE_NAME (con) = Ffile_name_nondirectory (tty);
{
- int tty_pg;
- int controlling_tty_pg;
+ pid_t tty_pg;
+ pid_t controlling_tty_pg;
int cfd;
/* OK, the only sure-fire way I can think of to determine
/* Synched up with: Not in FSF. */
+/* This file Mule-ized by Ben Wing, 7-10-00. */
+
/* Authorship:
Ben Wing: January 1996, for 19.14.
#include "lisp.h"
#include "console-x.h"
+#include "buffer.h"
#include "process.h" /* canonicalize_host_name */
#include "redisplay.h" /* for display_arg */
split_up_display_spec (Lisp_Object display, int *hostname_length,
int *display_length, int *screen_length)
{
- char *dotptr;
+ Bufbyte *dotptr;
dotptr = strrchr ((char *) XSTRING_DATA (display), ':');
if (!dotptr)
}
else
{
- *hostname_length = dotptr - (char *) XSTRING_DATA (display);
+ *hostname_length = dotptr - XSTRING_DATA (display);
- dotptr = strchr (dotptr, '.');
+ dotptr = strchr ((char *) dotptr, '.');
if (dotptr)
- *display_length = (dotptr - (char *) XSTRING_DATA (display)
- - *hostname_length);
+ *display_length = (dotptr - XSTRING_DATA (display) - *hostname_length);
else
*display_length = XSTRING_LENGTH (display) - *hostname_length;
}
static Lisp_Object
get_display_arg_connection (void)
{
- const char *disp_name;
+ const Extbyte *disp_name;
/* If the user didn't explicitly specify a display to use when
they called make-x-device, then we first check to see if a
{
int elt;
int argc;
- char **argv;
+ Extbyte **argv;
Lisp_Object conn;
make_argc_argv (Vx_initial_argv_list, &argc, &argv);
if (elt + 1 == argc)
{
suppress_early_error_handler_backtrace = 1;
- error ("-display specified with no arg");
+ type_error (Qinvalid_argument,
+ "-display specified with no arg");
}
else
{
/* assert: display_arg is only set if we found the display
arg earlier so we can't fail to find it now. */
assert (disp_name != NULL);
- conn = build_ext_string (disp_name, Qctext);
+ conn = build_ext_string (disp_name, Qcommand_argument_encoding);
free_argc_argv (argv);
return conn;
}
else
- return build_ext_string (XDisplayName (0), Qctext);
+ return build_ext_string (XDisplayName (0), Qx_display_name_encoding);
}
/* "semi-canonicalize" means convert to a nicer form for printing, but
/* Check for a couple of standard special cases */
if (string_byte (XSTRING (connection), 0) == ':')
connection = concat2 (build_string ("localhost"), connection);
- else if (!strncmp ((const char *) XSTRING_DATA (connection),
- "unix:", 5))
+ else if (!strncmp (XSTRING_DATA (connection), "unix:", 5))
connection = concat2 (build_string ("localhost:"),
Fsubstring (connection, make_int (5), Qnil));
split_up_display_spec (connection, &hostname_length, &display_length,
&screen_length);
- screen_str = build_string ((const char *) XSTRING_DATA (connection)
+ screen_str = build_string (XSTRING_DATA (connection)
+ hostname_length + display_length);
connection = x_canonicalize_console_connection (connection, errb);
Pixmap gray_pixmap;
/* Atoms associated with this device. */
- /* allocated in Xatoms_of_xfns in xfns.c */
+ /* allocated in Xatoms_of_device_x */
Atom Xatom_WM_PROTOCOLS;
Atom Xatom_WM_DELETE_WINDOW;
Atom Xatom_WM_SAVE_YOURSELF;
Atom Xatom_WM_TAKE_FOCUS;
Atom Xatom_WM_STATE;
- /* allocated in Xatoms_of_select_x in xselect.c */
+ /* allocated in Xatoms_of_select_x */
Atom Xatom_CLIPBOARD;
Atom Xatom_TIMESTAMP;
Atom Xatom_TEXT;
Atom Xatom_ATOM_PAIR;
Atom Xatom_COMPOUND_TEXT;
- /* allocated in Xatoms_of_objects_x in objects-x.c */
+ /* allocated in Xatoms_of_objects_x */
Atom Xatom_FOUNDRY;
Atom Xatom_FAMILY_NAME;
Atom Xatom_WEIGHT_NAME;
#define DEVICE_X_FONTSET(d) (DEVICE_X_DATA (d)->fontset)
#endif /* HAVE_XIM */
-/* allocated in Xatoms_of_xfns in xfns.c */
+/* allocated in Xatoms_of_device_x */
#define DEVICE_XATOM_WM_PROTOCOLS(d) (DEVICE_X_DATA (d)->Xatom_WM_PROTOCOLS)
#define DEVICE_XATOM_WM_DELETE_WINDOW(d) (DEVICE_X_DATA (d)->Xatom_WM_DELETE_WINDOW)
#define DEVICE_XATOM_WM_SAVE_YOURSELF(d) (DEVICE_X_DATA (d)->Xatom_WM_SAVE_YOURSELF)
#define DEVICE_XATOM_WM_TAKE_FOCUS(d) (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
#define DEVICE_XATOM_WM_STATE(d) (DEVICE_X_DATA (d)->Xatom_WM_STATE)
-/* allocated in Xatoms_of_select_x in xselect.c */
+/* allocated in Xatoms_of_select_x */
#define DEVICE_XATOM_CLIPBOARD(d) (DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
#define DEVICE_XATOM_TIMESTAMP(d) (DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
#define DEVICE_XATOM_TEXT(d) (DEVICE_X_DATA (d)->Xatom_TEXT)
#define DEVICE_XATOM_ATOM_PAIR(d) (DEVICE_X_DATA (d)->Xatom_ATOM_PAIR)
#define DEVICE_XATOM_COMPOUND_TEXT(d) (DEVICE_X_DATA (d)->Xatom_COMPOUND_TEXT)
-/* allocated in Xatoms_of_objects_x in objects-x.c */
+/* allocated in Xatoms_of_objects_x */
#define DEVICE_XATOM_FOUNDRY(d) (DEVICE_X_DATA (d)->Xatom_FOUNDRY)
#define DEVICE_XATOM_FAMILY_NAME(d) (DEVICE_X_DATA (d)->Xatom_FAMILY_NAME)
#define DEVICE_XATOM_WEIGHT_NAME(d) (DEVICE_X_DATA (d)->Xatom_WEIGHT_NAME)
extern Lisp_Object Vx_initial_argv_list; /* #### ugh! */
+/* Standins for various X encodings, until we know them better */
+
+/* !!#### Need to verify the encoding used in lwlib -- Qnative or Qctext?
+ Almost certainly the former. Use a standin for now. */
+#define Qlwlib_encoding Qnative
+
+#define Qx_atom_name_encoding Qctext
+/* font names are often stored in atoms, so it gets sticky if we set this
+ to something different from atom-name encoding */
+#define Qx_font_name_encoding Qctext
+
+#define Qx_color_name_encoding Qctext
+
+/* the following probably must agree with Qcommand_argument_encoding and
+ Qenvironment_variable_encoding */
+#define Qx_display_name_encoding Qnative
+
#endif /* HAVE_X_WINDOWS */
#endif /* INCLUDED_console_x_h_ */
void (*focus_on_frame_method) (struct frame *);
void (*raise_frame_method) (struct frame *);
void (*lower_frame_method) (struct frame *);
+ void (*enable_frame_method) (struct frame *);
+ void (*disable_frame_method) (struct frame *);
int (*get_mouse_position_method) (struct device *d, Lisp_Object *frame,
int *x, int *y);
void (*set_mouse_position_method) (struct window *w, int x, int y);
void (*map_subwindow_method) (Lisp_Image_Instance *, int x, int y,
struct display_glyph_area* dga);
void (*resize_subwindow_method) (Lisp_Image_Instance *, int w, int h);
- void (*update_subwindow_method) (Lisp_Image_Instance *);
- void (*update_widget_method) (Lisp_Image_Instance *);
+ void (*redisplay_subwindow_method) (Lisp_Image_Instance *);
+ void (*redisplay_widget_method) (Lisp_Image_Instance *);
int (*image_instance_equal_method) (Lisp_Image_Instance *,
Lisp_Image_Instance *,
int depth);
#ifdef HAVE_DIALOGS
/* dialog methods */
- void (*popup_dialog_box_method) (struct frame *, Lisp_Object dbox_desc);
+ Lisp_Object (*make_dialog_box_internal_method) (struct frame *,
+ Lisp_Object type,
+ Lisp_Object keys);
#endif
};
/* Primitive operations on Lisp data types for XEmacs Lisp interpreter.
Copyright (C) 1985, 1986, 1988, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound;
Lisp_Object Qerror_conditions, Qerror_message;
-Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range;
-Lisp_Object Qvoid_variable, Qcyclic_variable_indirection;
-Lisp_Object Qvoid_function, Qcyclic_function_indirection;
-Lisp_Object Qsetting_constant, Qinvalid_read_syntax;
+Lisp_Object Qerror, Qquit, Qsyntax_error, Qinvalid_read_syntax;
+Lisp_Object Qlist_formation_error;
Lisp_Object Qmalformed_list, Qmalformed_property_list;
Lisp_Object Qcircular_list, Qcircular_property_list;
-Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
+Lisp_Object Qinvalid_argument, Qwrong_type_argument, Qargs_out_of_range;
+Lisp_Object Qwrong_number_of_arguments, Qinvalid_function, Qno_catch;
+Lisp_Object Qinternal_error, Qinvalid_state;
+Lisp_Object Qvoid_variable, Qcyclic_variable_indirection;
+Lisp_Object Qvoid_function, Qcyclic_function_indirection;
+Lisp_Object Qinvalid_operation, Qinvalid_change;
+Lisp_Object Qsetting_constant;
+Lisp_Object Qediting_error;
+Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
Lisp_Object Qio_error, Qend_of_file;
Lisp_Object Qarith_error, Qrange_error, Qdomain_error;
Lisp_Object Qsingularity_error, Qoverflow_error, Qunderflow_error;
-Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
Lisp_Object Qintegerp, Qnatnump, Qsymbolp;
Lisp_Object Qlistp, Qtrue_list_p, Qweak_listp;
Lisp_Object Qconsp, Qsubrp;
return it. If there is a cycle in the function chain, signal a
cyclic-function-indirection error.
- This is like Findirect_function, except that it doesn't signal an
- error if the chain ends up unbound. */
+ This is like Findirect_function when VOID_FUNCTION_ERRORP is true.
+ When VOID_FUNCTION_ERRORP is false, no error is signaled if the end
+ of the chain ends up being Qunbound. */
Lisp_Object
-indirect_function (Lisp_Object object, int errorp)
+indirect_function (Lisp_Object object, int void_function_errorp)
{
#define FUNCTION_INDIRECTION_SUSPICION_LENGTH 16
Lisp_Object tortoise, hare;
return Fsignal (Qcyclic_function_indirection, list1 (object));
}
- if (errorp && UNBOUNDP (hare))
+ if (void_function_errorp && UNBOUNDP (hare))
return signal_void_function_error (object);
return hare;
void
init_errors_once_early (void)
{
- defsymbol (&Qerror_conditions, "error-conditions");
- defsymbol (&Qerror_message, "error-message");
+ DEFSYMBOL (Qerror_conditions);
+ DEFSYMBOL (Qerror_message);
/* We declare the errors here because some other deferrors depend
on some of the errors below. */
/* ERROR is used as a signaler for random errors for which nothing
else is right */
- deferror (&Qerror, "error", "error", Qnil);
- deferror (&Qquit, "quit", "Quit", Qnil);
+ DEFERROR (Qerror, "error", Qnil);
+ DEFERROR_STANDARD (Qquit, Qnil);
- deferror (&Qwrong_type_argument, "wrong-type-argument",
- "Wrong type argument", Qerror);
- deferror (&Qargs_out_of_range, "args-out-of-range", "Args out of range",
- Qerror);
- deferror (&Qvoid_function, "void-function",
- "Symbol's function definition is void", Qerror);
- deferror (&Qcyclic_function_indirection, "cyclic-function-indirection",
- "Symbol's chain of function indirections contains a loop", Qerror);
- deferror (&Qvoid_variable, "void-variable",
- "Symbol's value as variable is void", Qerror);
- deferror (&Qcyclic_variable_indirection, "cyclic-variable-indirection",
- "Symbol's chain of variable indirections contains a loop", Qerror);
- deferror (&Qsetting_constant, "setting-constant",
- "Attempt to set a constant symbol", Qerror);
- deferror (&Qinvalid_read_syntax, "invalid-read-syntax",
- "Invalid read syntax", Qerror);
+ DEFERROR (Qunimplemented, "Feature not yet implemented", Qerror);
+ DEFERROR_STANDARD (Qsyntax_error, Qerror);
+ DEFERROR_STANDARD (Qinvalid_read_syntax, Qsyntax_error);
+ DEFERROR_STANDARD (Qlist_formation_error, Qsyntax_error);
/* Generated by list traversal macros */
- deferror (&Qmalformed_list, "malformed-list",
- "Malformed list", Qerror);
- deferror (&Qmalformed_property_list, "malformed-property-list",
- "Malformed property list", Qmalformed_list);
- deferror (&Qcircular_list, "circular-list",
- "Circular list", Qerror);
- deferror (&Qcircular_property_list, "circular-property-list",
- "Circular property list", Qcircular_list);
-
- deferror (&Qinvalid_function, "invalid-function", "Invalid function",
- Qerror);
- deferror (&Qwrong_number_of_arguments, "wrong-number-of-arguments",
- "Wrong number of arguments", Qerror);
- deferror (&Qno_catch, "no-catch", "No catch for tag",
- Qerror);
- deferror (&Qbeginning_of_buffer, "beginning-of-buffer",
- "Beginning of buffer", Qerror);
- deferror (&Qend_of_buffer, "end-of-buffer", "End of buffer", Qerror);
- deferror (&Qbuffer_read_only, "buffer-read-only", "Buffer is read-only",
- Qerror);
+ DEFERROR_STANDARD (Qmalformed_list, Qlist_formation_error);
+ DEFERROR_STANDARD (Qmalformed_property_list, Qmalformed_list);
+ DEFERROR_STANDARD (Qcircular_list, Qlist_formation_error);
+ DEFERROR_STANDARD (Qcircular_property_list, Qcircular_list);
+
+ DEFERROR_STANDARD (Qinvalid_argument, Qerror);
+ DEFERROR_STANDARD (Qwrong_type_argument, Qinvalid_argument);
+ DEFERROR_STANDARD (Qargs_out_of_range, Qinvalid_argument);
+ DEFERROR_STANDARD (Qwrong_number_of_arguments, Qinvalid_argument);
+ DEFERROR_STANDARD (Qinvalid_function, Qinvalid_argument);
+ DEFERROR (Qno_catch, "No catch for tag", Qinvalid_argument);
- deferror (&Qio_error, "io-error", "IO Error", Qerror);
- deferror (&Qend_of_file, "end-of-file", "End of stream", Qio_error);
+ DEFERROR_STANDARD (Qinternal_error, Qerror);
- deferror (&Qarith_error, "arith-error", "Arithmetic error", Qerror);
- deferror (&Qrange_error, "range-error", "Arithmetic range error",
- Qarith_error);
- deferror (&Qdomain_error, "domain-error", "Arithmetic domain error",
- Qarith_error);
- deferror (&Qsingularity_error, "singularity-error",
- "Arithmetic singularity error", Qdomain_error);
- deferror (&Qoverflow_error, "overflow-error",
- "Arithmetic overflow error", Qdomain_error);
- deferror (&Qunderflow_error, "underflow-error",
- "Arithmetic underflow error", Qdomain_error);
+ DEFERROR (Qinvalid_state, "Properties or values have been set incorrectly",
+ Qerror);
+ DEFERROR (Qvoid_function, "Symbol's function definition is void",
+ Qinvalid_state);
+ DEFERROR (Qcyclic_function_indirection,
+ "Symbol's chain of function indirections contains a loop",
+ Qinvalid_state);
+ DEFERROR (Qvoid_variable, "Symbol's value as variable is void",
+ Qinvalid_state);
+ DEFERROR (Qcyclic_variable_indirection,
+ "Symbol's chain of variable indirections contains a loop",
+ Qinvalid_state);
+
+ DEFERROR (Qinvalid_operation,
+ "Operation not allowed or error during operation", Qerror);
+ DEFERROR (Qinvalid_change, "Attempt to set properties or values incorrectly",
+ Qinvalid_operation);
+ DEFERROR (Qsetting_constant, "Attempt to set a constant symbol",
+ Qinvalid_change);
+
+ DEFERROR (Qediting_error, "Invalid operation during editing",
+ Qinvalid_operation);
+ DEFERROR_STANDARD (Qbeginning_of_buffer, Qediting_error);
+ DEFERROR_STANDARD (Qend_of_buffer, Qediting_error);
+ DEFERROR (Qbuffer_read_only, "Buffer is read-only", Qediting_error);
+
+ DEFERROR (Qio_error, "IO Error", Qinvalid_operation);
+ DEFERROR (Qend_of_file, "End of file or stream", Qio_error);
+
+ DEFERROR (Qarith_error, "Arithmetic error", Qinvalid_operation);
+ DEFERROR (Qrange_error, "Arithmetic range error", Qarith_error);
+ DEFERROR (Qdomain_error, "Arithmetic domain error", Qarith_error);
+ DEFERROR (Qsingularity_error, "Arithmetic singularity error", Qdomain_error);
+ DEFERROR (Qoverflow_error, "Arithmetic overflow error", Qdomain_error);
+ DEFERROR (Qunderflow_error, "Arithmetic underflow error", Qdomain_error);
}
void
{
INIT_LRECORD_IMPLEMENTATION (weak_list);
- defsymbol (&Qquote, "quote");
- defsymbol (&Qlambda, "lambda");
- defsymbol (&Qlistp, "listp");
- defsymbol (&Qtrue_list_p, "true-list-p");
- defsymbol (&Qconsp, "consp");
- defsymbol (&Qsubrp, "subrp");
- defsymbol (&Qsymbolp, "symbolp");
- defsymbol (&Qintegerp, "integerp");
- defsymbol (&Qcharacterp, "characterp");
- defsymbol (&Qnatnump, "natnump");
- defsymbol (&Qstringp, "stringp");
- defsymbol (&Qarrayp, "arrayp");
- defsymbol (&Qsequencep, "sequencep");
- defsymbol (&Qbufferp, "bufferp");
- defsymbol (&Qbitp, "bitp");
- defsymbol (&Qbit_vectorp, "bit-vector-p");
- defsymbol (&Qvectorp, "vectorp");
- defsymbol (&Qchar_or_string_p, "char-or-string-p");
- defsymbol (&Qmarkerp, "markerp");
- defsymbol (&Qinteger_or_marker_p, "integer-or-marker-p");
- defsymbol (&Qinteger_or_char_p, "integer-or-char-p");
- defsymbol (&Qinteger_char_or_marker_p, "integer-char-or-marker-p");
- defsymbol (&Qnumberp, "numberp");
- defsymbol (&Qnumber_char_or_marker_p, "number-char-or-marker-p");
- defsymbol (&Qcdr, "cdr");
- defsymbol (&Qweak_listp, "weak-list-p");
+ DEFSYMBOL (Qquote);
+ DEFSYMBOL (Qlambda);
+ DEFSYMBOL (Qlistp);
+ DEFSYMBOL (Qtrue_list_p);
+ DEFSYMBOL (Qconsp);
+ DEFSYMBOL (Qsubrp);
+ DEFSYMBOL (Qsymbolp);
+ DEFSYMBOL (Qintegerp);
+ DEFSYMBOL (Qcharacterp);
+ DEFSYMBOL (Qnatnump);
+ DEFSYMBOL (Qstringp);
+ DEFSYMBOL (Qarrayp);
+ DEFSYMBOL (Qsequencep);
+ DEFSYMBOL (Qbufferp);
+ DEFSYMBOL (Qbitp);
+ DEFSYMBOL_MULTIWORD_PREDICATE (Qbit_vectorp);
+ DEFSYMBOL (Qvectorp);
+ DEFSYMBOL (Qchar_or_string_p);
+ DEFSYMBOL (Qmarkerp);
+ DEFSYMBOL (Qinteger_or_marker_p);
+ DEFSYMBOL (Qinteger_or_char_p);
+ DEFSYMBOL (Qinteger_char_or_marker_p);
+ DEFSYMBOL (Qnumberp);
+ DEFSYMBOL (Qnumber_char_or_marker_p);
+ DEFSYMBOL (Qcdr);
+ DEFSYMBOL_MULTIWORD_PREDICATE (Qweak_listp);
#ifdef LISP_FLOAT_TYPE
- defsymbol (&Qfloatp, "floatp");
+ DEFSYMBOL (Qfloatp);
#endif /* LISP_FLOAT_TYPE */
DEFSUBR (Fwrong_type_argument);
-## This file automatically generated by make-src-depend. Do not modify.
+## This file is automatically generated by `make-src-depend'. Do not modify.
-#ifdef USE_UNION_TYPE
+#if defined(USE_UNION_TYPE)
LISP_UNION_H=lisp-union.h
#else
LISP_UNION_H=lisp-disunion.h
#endif
-LISP_H = lisp.h config.h $(LISP_UNION_H)
-#ifdef HAVE_MS_WINDOWS
-console-msw.o: $(LISP_H) conslots.h console-msw.h console.h events.h lisp-disunion.h lisp-union.h lrecord.h opaque.h symeval.h symsinit.h systime.h
-device-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h
-dialog-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
-dired-msw.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h nt.h regex.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h systime.h
-event-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events-mod.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h menubar-msw.h menubar.h mule-charset.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h select.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h
-frame-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-glyphs-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h file-coding.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h window.h winslots.h
-gui-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
-menubar-msw.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h menubar-msw.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-objects-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h hash.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-msw.h objects.h specifier.h symeval.h symsinit.h
-redisplay-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h debug.h device.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-ccl.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h window.h winslots.h
-scrollbar-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-select-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h
-toolbar-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+LISP_H=lisp.h lrecord.h config.h general-slots.h symsinit.h symeval.h $(LISP_UNION_H)
+#if defined(HAVE_MS_WINDOWS)
+console-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h events.h mule-charset.h opaque.h syscommctrl.h systime.h syswindows.h
+device-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysdep.h systime.h syswindows.h toolbar.h window.h winslots.h
+dialog-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h syscommctrl.h syswindows.h toolbar.h window.h winslots.h
+dired-msw.o: $(LISP_H) buffer.h bufslots.h mule-charset.h ndir.h nt.h regex.h sysdir.h sysfile.h sysproc.h systime.h syswindows.h
+event-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events-mod.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lstream.h menubar-msw.h menubar.h mule-charset.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h select.h specifier.h syscommctrl.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h toolbar.h window.h winslots.h
+frame-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h syscommctrl.h systime.h syswindows.h toolbar.h window.h winslots.h
+glyphs-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h file-coding.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h lstream.h mule-charset.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysfile.h syswindows.h toolbar.h window.h winslots.h
+gui-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h syscommctrl.h systime.h syswindows.h toolbar.h window.h winslots.h
+menubar-msw.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h menubar-msw.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h syscommctrl.h systime.h syswindows.h toolbar.h window.h winslots.h
+objects-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h hash.h insdel.h mule-charset.h objects-msw.h objects.h specifier.h syscommctrl.h syswindows.h
+redisplay-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h debug.h device.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h gutter.h mule-ccl.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysdep.h systime.h syswindows.h toolbar.h window.h winslots.h
+scrollbar-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h syscommctrl.h systime.h syswindows.h toolbar.h window.h winslots.h
+select-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h file-coding.h frame.h frameslots.h glyphs.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h select.h specifier.h syscommctrl.h syswindows.h toolbar.h window.h winslots.h
+toolbar-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syscommctrl.h syswindows.h toolbar.h window.h winslots.h
#endif
-#ifdef HAVE_X_WINDOWS
-balloon-x.o: $(LISP_H) balloon_help.h conslots.h console-x.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h xintrinsic.h
-console-x.o: $(LISP_H) conslots.h console-x.h console.h lisp-disunion.h lisp-union.h lrecord.h process.h redisplay.h symeval.h symsinit.h xintrinsic.h
-device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h
-dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
-frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h conslots.h console-x.h console.h device.h dragdrop.h events-mod.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
-glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h window.h winslots.h xintrinsic.h xmu.h
-gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h xintrinsic.h
-input-method-xfs.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
-input-method-xlib.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
-menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
-objects-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h specifier.h symeval.h symsinit.h xintrinsic.h
-redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h conslots.h console-x.h console.h debug.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-ccl.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmprimitivep.h
-scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h
-select-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h systime.h toolbar.h xintrinsic.h
-toolbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h
+#if defined(HAVE_X_WINDOWS)
+balloon-x.o: $(LISP_H) balloon_help.h conslots.h console-x.h console.h device.h xintrinsic.h
+console-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h mule-charset.h process.h redisplay.h xintrinsic.h
+device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h sysfile.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h
+dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h conslots.h console-x.h console.h device.h dragdrop.h events-mod.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
+glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h imgproc.h insdel.h lstream.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h toolbar.h window.h winslots.h xintrinsic.h xmu.h
+gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h keymap.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+objects-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h insdel.h mule-charset.h objects-x.h objects.h specifier.h xintrinsic.h
+redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h conslots.h console-x.h console.h debug.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h mule-ccl.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysproc.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmprimitivep.h
+scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h redisplay.h scrollbar-x.h scrollbar.h specifier.h toolbar.h window.h winslots.h xintrinsic.h
+select-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+toolbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h
#endif
-#ifdef HAVE_DATABASE
-database.o: $(LISP_H) buffer.h bufslots.h database.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfile.h
+#if defined(HAVE_TTY)
+console-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systty.h toolbar.h window.h winslots.h
+device-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
+event-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+frame-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h redisplay.h scrollbar.h specifier.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
+objects-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h insdel.h mule-charset.h objects-tty.h objects.h specifier.h syssignal.h systty.h
+redisplay-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
#endif
-#ifdef MULE
-mule-canna.o: $(LISP_H) buffer.h bufslots.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-mule-ccl.o: $(LISP_H) buffer.h bufslots.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h mule-ccl.h mule-charset.h symeval.h symsinit.h
-mule-charset.o: $(LISP_H) buffer.h bufslots.h chartab.h conslots.h console.h device.h elhash.h faces.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-ccl.h mule-charset.h symeval.h symsinit.h
-mule-mcpath.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfile.h
-mule-wnnfns.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h window.h winslots.h
-mule.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h regex.h symeval.h symsinit.h
+#if defined(HAVE_DATABASE)
+database.o: $(LISP_H) buffer.h bufslots.h database.h mule-charset.h sysfile.h
#endif
-#ifdef EXTERNAL_WIDGET
+#if defined(MULE)
+mule-canna.o: $(LISP_H) buffer.h bufslots.h file-coding.h mule-charset.h
+mule-ccl.o: $(LISP_H) buffer.h bufslots.h file-coding.h mule-ccl.h mule-charset.h
+mule-charset.o: $(LISP_H) buffer.h bufslots.h chartab.h conslots.h console.h device.h elhash.h faces.h lstream.h mule-ccl.h mule-charset.h
+mule-wnnfns.o: $(LISP_H) buffer.h bufslots.h mule-charset.h redisplay.h scrollbar.h sysdep.h window.h winslots.h
+mule.o: $(LISP_H) regex.h
+#endif
+#if defined(EXTERNAL_WIDGET)
ExternalClient-Xlib.o: extw-Xlib.h
ExternalClient.o: ExternalClient.h ExternalClientP.h config.h extw-Xlib.h extw-Xt.h xintrinsicp.h
ExternalShell.o: ExternalShell.h ExternalShellP.h config.h extw-Xlib.h extw-Xt.h xintrinsic.h xintrinsicp.h
extw-Xlib.o: config.h extw-Xlib.h
extw-Xt.o: config.h extw-Xlib.h extw-Xt.h
#endif
-EmacsFrame.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
+EmacsFrame.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
EmacsManager.o: EmacsManager.h EmacsManagerP.h config.h xintrinsicp.h xmmanagerp.h
EmacsShell-sub.o: EmacsShell.h EmacsShellP.h config.h xintrinsic.h xintrinsicp.h
EmacsShell.o: EmacsShell.h ExternalShell.h config.h xintrinsicp.h
-abbrev.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h window.h winslots.h
-alloc.o: $(LISP_H) alloc.h backtrace.h buffer.h bufslots.h bytecode.h chartab.h conslots.h console-stream.h console.h device.h dumper.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h toolbar.h window.h winslots.h
+abbrev.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h insdel.h mule-charset.h redisplay.h scrollbar.h syntax.h window.h winslots.h
+alloc.o: $(LISP_H) alloc.h backtrace.h buffer.h bufslots.h bytecode.h chartab.h conslots.h console-stream.h console.h device.h dumper.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h toolbar.h window.h winslots.h
alloca.o: config.h
balloon_help.o: balloon_help.h config.h xintrinsic.h
-blocktype.o: $(LISP_H) blocktype.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-buffer.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h
-bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h syntax.h
-callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h commands.h events.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h window.h winslots.h
-callproc.o: $(LISP_H) buffer.h bufslots.h commands.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h nt.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h window.h winslots.h
-casefiddle.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
-casetab.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h
-chartab.o: $(LISP_H) buffer.h bufslots.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
-cm.o: $(LISP_H) conslots.h console-tty.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systty.h toolbar.h
-cmdloop.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-cmds.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
-console-stream.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
-console-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systty.h toolbar.h
-console.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
-data.o: $(LISP_H) buffer.h bufslots.h bytecode.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfloat.h syssignal.h
-debug.o: $(LISP_H) bytecode.h debug.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-device-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h
-device.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h toolbar.h window.h winslots.h
-dgif_lib.o: gifrlib.h
-dialog.o: $(LISP_H) conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
-dired.o: $(LISP_H) buffer.h bufslots.h commands.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h opaque.h regex.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h
-doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfile.h
-doprnt.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h
-dragdrop.o: $(LISP_H) dragdrop.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-dumper.o: $(LISP_H) alloc.h conslots.h console-stream.h console.h dump-id.h dumper.h elhash.h lisp-disunion.h lisp-union.h lrecord.h specifier.h symeval.h symsinit.h sysfile.h
-dynarr.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+blocktype.o: $(LISP_H) blocktype.h
+buffer.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h process.h redisplay.h scrollbar.h select.h specifier.h syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h
+bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h chartab.h mule-charset.h opaque.h syntax.h
+callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h commands.h events.h insdel.h mule-charset.h redisplay.h scrollbar.h systime.h window.h winslots.h
+callproc.o: $(LISP_H) buffer.h bufslots.h commands.h file-coding.h insdel.h lstream.h mule-charset.h nt.h process.h redisplay.h scrollbar.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h window.h winslots.h
+casefiddle.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h mule-charset.h syntax.h
+casetab.o: $(LISP_H) buffer.h bufslots.h mule-charset.h opaque.h
+chartab.o: $(LISP_H) buffer.h bufslots.h chartab.h mule-charset.h syntax.h
+cm.o: $(LISP_H) conslots.h console-tty.h console.h device.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h syssignal.h systty.h toolbar.h window.h winslots.h
+cmdloop.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h
+cmds.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h insdel.h mule-charset.h syntax.h
+console-stream.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
+console.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
+data.o: $(LISP_H) buffer.h bufslots.h bytecode.h mule-charset.h sysfloat.h syssignal.h
+debug.o: $(LISP_H) bytecode.h debug.h
+device.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs.h gui.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h toolbar.h window.h winslots.h
+dgif_lib.o: $(LISP_H) gifrlib.h sysfile.h
+dialog.o: $(LISP_H) conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+dired.o: $(LISP_H) buffer.h bufslots.h commands.h elhash.h mule-charset.h ndir.h opaque.h regex.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h
+doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h insdel.h keymap.h mule-charset.h sysfile.h
+doprnt.o: $(LISP_H) buffer.h bufslots.h lstream.h mule-charset.h
+dragdrop.o: $(LISP_H) dragdrop.h
+dumper.o: $(LISP_H) alloc.h conslots.h console-stream.h console.h dump-id.h dumper.h elhash.h nt.h specifier.h sysfile.h syswindows.h
+dynarr.o: $(LISP_H)
ecrt0.o: config.h
-editfns.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syspwd.h systime.h toolbar.h window.h winslots.h
-eldap.o: $(LISP_H) buffer.h bufslots.h eldap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h sysdep.h
-elhash.o: $(LISP_H) bytecode.h elhash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h commands.h conslots.h console.h device.h dump-id.h dumper.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h paths.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h syssignal.h systime.h systty.h toolbar.h
-emodules.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h emodules.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h toolbar.h window.h winslots.h
-esd.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h
-eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h commands.h conslots.h console.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h
-event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h dragdrop.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h toolbar.h xintrinsic.h xintrinsicp.h
-event-stream.o: $(LISP_H) blocktype.h buffer.h bufslots.h commands.h conslots.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h macros.h menubar.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h
-event-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h
-event-unixoid.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h
-events.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h
-extents.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
-faces.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-file-coding.o: $(LISP_H) buffer.h bufslots.h chartab.h elhash.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-ccl.h mule-charset.h opaque.h symeval.h symsinit.h
-fileio.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h ndir.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h systime.h toolbar.h window.h winslots.h
-filelock.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h paths.h symeval.h symsinit.h sysdir.h sysfile.h syspwd.h syssignal.h
-filemode.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
-floatfns.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfloat.h syssignal.h
-fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h
-font-lock.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
-frame-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h
-frame.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-free-hook.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-general.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-getloadavg.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
-gif_io.o: gifrlib.h sysfile.h
-glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h file-coding.h frame.h frameslots.h gifrlib.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h
-glyphs-widget.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h chartab.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+editfns.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syspwd.h systime.h toolbar.h window.h winslots.h
+eldap.o: $(LISP_H) buffer.h bufslots.h eldap.h mule-charset.h opaque.h sysdep.h
+elhash.o: $(LISP_H) bytecode.h elhash.h
+emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h commands.h conslots.h console.h device.h dump-id.h dumper.h frame.h frameslots.h glyphs.h gui.h mule-charset.h nt.h paths.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h sysfile.h syssignal.h systime.h systty.h syswindows.h toolbar.h window.h winslots.h
+emodules.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h emodules.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h toolbar.h window.h winslots.h
+esd.o: $(LISP_H) miscplay.h
+eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h commands.h conslots.h console.h mule-charset.h opaque.h
+event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h dragdrop.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h
+event-stream.o: $(LISP_H) blocktype.h buffer.h bufslots.h commands.h conslots.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lstream.h macros.h menubar.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h
+event-unixoid.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h lstream.h mule-charset.h process.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h
+events.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h
+extents.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h keymap.h mule-charset.h opaque.h process.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+faces.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+file-coding.o: $(LISP_H) buffer.h bufslots.h chartab.h elhash.h file-coding.h insdel.h lstream.h mule-ccl.h mule-charset.h opaque.h
+fileio.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h ndir.h redisplay.h scrollbar.h specifier.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h systime.h toolbar.h window.h winslots.h
+filelock.o: $(LISP_H) buffer.h bufslots.h mule-charset.h ndir.h paths.h sysdir.h sysfile.h syspwd.h syssignal.h
+filemode.o: $(LISP_H) sysfile.h
+floatfns.o: $(LISP_H) sysfloat.h syssignal.h
+fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h systime.h toolbar.h window.h winslots.h
+font-lock.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h mule-charset.h syntax.h
+frame.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h menubar.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h
+free-hook.o: $(LISP_H) hash.h
+general.o: $(LISP_H)
+getloadavg.o: $(LISP_H) sysfile.h
+gif_io.o: config.h gifrlib.h sysfile.h
+glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h file-coding.h frame.h frameslots.h gifrlib.h glyphs.h gui.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h toolbar.h window.h winslots.h
+glyphs-widget.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h chartab.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h mule-charset.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
gmalloc.o: config.h getpagesize.h
-gpmevent.o: $(LISP_H) commands.h conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h
-gui.o: $(LISP_H) buffer.h bufslots.h bytecode.h elhash.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-gutter.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-hash.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-hftctl.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-hpplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nativesound.h symeval.h symsinit.h
-imgproc.o: $(LISP_H) imgproc.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-indent.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-inline.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h chartab.h conslots.h console.h database.h device.h eldap.h elhash.h events.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects.h opaque.h postgresql.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h systime.h toolbar.h tooltalk.h window.h winslots.h xintrinsic.h
-input-method-motif.o: $(LISP_H) EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h xintrinsic.h
-insdel.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
-intl.o: $(LISP_H) bytecode.h conslots.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h elhash.h events-mod.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-libsst.o: $(LISP_H) libsst.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-line-number.o: $(LISP_H) buffer.h bufslots.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-linuxplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h nativesound.h symeval.h symsinit.h sysfile.h syssignal.h
-lread.o: $(LISP_H) buffer.h bufslots.h bytecode.h elhash.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h symeval.h symsinit.h sysfile.h sysfloat.h
-lstream.o: $(LISP_H) buffer.h bufslots.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h sysfile.h
-macros.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h macros.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
+gpmevent.o: $(LISP_H) commands.h conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h lstream.h mule-charset.h process.h sysdep.h sysproc.h syssignal.h systime.h systty.h
+gui.o: $(LISP_H) buffer.h bufslots.h bytecode.h elhash.h gui.h mule-charset.h
+gutter.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+hash.o: $(LISP_H) hash.h
+hftctl.o: $(LISP_H)
+hpplay.o: $(LISP_H) nativesound.h
+imgproc.o: $(LISP_H) imgproc.h
+indent.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+inline.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h chartab.h conslots.h console-msw.h console.h database.h device.h eldap.h elhash.h events.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h keymap.h lstream.h mule-charset.h objects.h opaque.h postgresql.h process.h rangetab.h redisplay.h scrollbar.h specifier.h syntax.h syscommctrl.h systime.h syswindows.h toolbar.h tooltalk.h window.h winslots.h xintrinsic.h
+input-method-motif.o: $(LISP_H) EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h xintrinsic.h
+input-method-xfs.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+input-method-xlib.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+insdel.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+intl.o: $(LISP_H) bytecode.h conslots.h console.h device.h
+keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h elhash.h events-mod.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h
+libsst.o: $(LISP_H) libsst.h
+line-number.o: $(LISP_H) buffer.h bufslots.h line-number.h mule-charset.h
+linuxplay.o: $(LISP_H) miscplay.h nativesound.h sysfile.h syssignal.h
+lread.o: $(LISP_H) buffer.h bufslots.h bytecode.h elhash.h file-coding.h lstream.h mule-charset.h opaque.h sysfile.h sysfloat.h
+lstream.o: $(LISP_H) buffer.h bufslots.h insdel.h lstream.h mule-charset.h sysfile.h
+macros.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h keymap.h macros.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h
malloc.o: config.h getpagesize.h
-marker.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-md5.o: $(LISP_H) buffer.h bufslots.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h
-menubar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-minibuf.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-stream.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
-miscplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h sysfile.h syssignal.h
-nas.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysdep.h syssignal.h
-nt.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nt.h ntheap.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h
-ntheap.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h ntheap.h symeval.h symsinit.h
-ntplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nativesound.h symeval.h symsinit.h sysfile.h
-ntproc.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h nt.h ntheap.h process.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswait.h
-objects-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-tty.h objects.h specifier.h symeval.h symsinit.h syssignal.h systty.h
-objects.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+marker.o: $(LISP_H) buffer.h bufslots.h mule-charset.h
+md5.o: $(LISP_H) buffer.h bufslots.h file-coding.h lstream.h mule-charset.h
+menubar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h keymap.h menubar.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+minibuf.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-stream.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h
+miscplay.o: $(LISP_H) miscplay.h sysfile.h syssignal.h
+nas.o: $(LISP_H) sysdep.h syssignal.h
+nt.o: $(LISP_H) ndir.h nt.h ntheap.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h
+ntheap.o: $(LISP_H) ntheap.h syswindows.h
+ntplay.o: $(LISP_H) nativesound.h nt.h sysfile.h syswindows.h
+ntproc.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h mule-charset.h nt.h ntheap.h process.h syscommctrl.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h
+objects.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
offix.o: offix-cursors.h offix-types.h offix.h xintrinsic.h
-opaque.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h opaque.h symeval.h symsinit.h
-postgresql.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h postgresql.h symeval.h symsinit.h sysdep.h
-print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h conslots.h console-msw.h console-stream.h console-tty.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syssignal.h systty.h toolbar.h
-process-nt.o: $(LISP_H) conslots.h console-msw.h console.h hash.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h procimpl.h symeval.h symsinit.h sysdep.h
-process-unix.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
-process.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
-profile.o: $(LISP_H) backtrace.h bytecode.h elhash.h hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h syssignal.h systime.h
-ralloc.o: $(LISP_H) getpagesize.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-rangetab.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h rangetab.h symeval.h symsinit.h
+opaque.o: $(LISP_H) opaque.h
+postgresql.o: $(LISP_H) buffer.h bufslots.h mule-charset.h postgresql.h sysdep.h
+print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h conslots.h console-msw.h console-stream.h console-tty.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysfile.h syssignal.h systty.h syswindows.h toolbar.h window.h winslots.h
+process-nt.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h hash.h lstream.h mule-charset.h nt.h process.h procimpl.h syscommctrl.h sysdep.h syswindows.h
+process-unix.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h lstream.h mule-charset.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+process.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h insdel.h lstream.h mule-charset.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+profile.o: $(LISP_H) backtrace.h bytecode.h elhash.h hash.h syssignal.h systime.h
+ralloc.o: $(LISP_H) getpagesize.h
+rangetab.o: $(LISP_H) rangetab.h
realpath.o: config.h
-redisplay-output.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-redisplay-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
-redisplay.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-tty.h console.h debug.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systty.h toolbar.h window.h winslots.h
-regex.o: $(LISP_H) buffer.h bufslots.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h regex.h symeval.h symsinit.h syntax.h
-scrollbar.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-search.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h regex.h symeval.h symsinit.h syntax.h
-select.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h
-sgiplay.o: $(LISP_H) libst.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-sheap.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h sheap-adjust.h symeval.h symsinit.h
-signal.o: $(LISP_H) conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h toolbar.h
-sound.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h nativesound.h redisplay.h symeval.h symsinit.h sysdep.h xintrinsic.h
-specifier.o: $(LISP_H) buffer.h bufslots.h chartab.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+redisplay-output.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+redisplay.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-tty.h console.h debug.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h line-number.h menubar.h mule-charset.h objects.h process.h redisplay.h scrollbar.h specifier.h sysfile.h syssignal.h systty.h toolbar.h window.h winslots.h
+regex.o: $(LISP_H) buffer.h bufslots.h chartab.h mule-charset.h regex.h syntax.h
+scrollbar.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h gutter.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+search.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h mule-charset.h opaque.h regex.h syntax.h
+select.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h toolbar.h window.h winslots.h
+sgiplay.o: $(LISP_H) libst.h
+sheap.o: $(LISP_H) sheap-adjust.h
+signal.o: $(LISP_H) conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h
+sound.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h mule-charset.h nativesound.h redisplay.h sysdep.h sysfile.h sysproc.h systime.h xintrinsic.h
+specifier.o: $(LISP_H) buffer.h bufslots.h chartab.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h mule-charset.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
strcat.o: config.h
strcmp.o: config.h
strcpy.o: config.h
-strftime.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+strftime.o: $(LISP_H)
sunOS-fix.o: config.h
-sunplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nativesound.h symeval.h symsinit.h sysdep.h syssignal.h
-sunpro.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-symbols.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-syntax.o: $(LISP_H) buffer.h bufslots.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
-sysdep.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h ntheap.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+sunplay.o: $(LISP_H) nativesound.h sysdep.h syssignal.h
+sunpro.o: $(LISP_H)
+symbols.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h elhash.h mule-charset.h
+syntax.o: $(LISP_H) buffer.h bufslots.h chartab.h mule-charset.h syntax.h
+sysdep.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h ndir.h nt.h ntheap.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h toolbar.h window.h winslots.h
sysdll.o: config.h sysdll.h
-termcap.o: $(LISP_H) conslots.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+termcap.o: $(LISP_H) conslots.h console.h device.h
terminfo.o: config.h
-tests.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h symeval.h symsinit.h
-toolbar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-tooltalk.o: $(LISP_H) buffer.h bufslots.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h process.h symeval.h symsinit.h tooltalk.h
+tests.o: $(LISP_H) buffer.h bufslots.h lstream.h mule-charset.h opaque.h
+toolbar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+tooltalk.o: $(LISP_H) buffer.h bufslots.h elhash.h mule-charset.h process.h syssignal.h tooltalk.h
tparam.o: config.h
-undo.o: $(LISP_H) buffer.h bufslots.h extents.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-unexaix.o: $(LISP_H) getpagesize.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+undo.o: $(LISP_H) buffer.h bufslots.h extents.h mule-charset.h
+unexaix.o: $(LISP_H) getpagesize.h
unexalpha.o: config.h
unexapollo.o: config.h
unexconvex.o: config.h getpagesize.h
unexcw.o: config.h sysfile.h
-unexec.o: $(LISP_H) getpagesize.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+unexec.o: $(LISP_H) getpagesize.h
unexelf.o: config.h
-unexelfsgi.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+unexelfsgi.o: $(LISP_H)
unexenix.o: config.h
unexfreebsd.o: config.h
unexhp9k3.o: config.h sysdep.h
-unexhp9k800.o: config.h
+unexhp9k800.o: $(LISP_H)
unexmips.o: config.h getpagesize.h
-unexnt.o: config.h ntheap.h
+unexnt.o: $(LISP_H) nt.h ntheap.h syswindows.h
unexsunos4.o: config.h
-vm-limit.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h mem-limits.h symeval.h symsinit.h
-widget.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
-window.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-xgccache.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h xgccache.h
+vm-limit.o: $(LISP_H) mem-limits.h
+widget.o: $(LISP_H) buffer.h bufslots.h mule-charset.h
+win32.o: $(LISP_H) buffer.h bufslots.h mule-charset.h syswindows.h
+window.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h
+xgccache.o: $(LISP_H) hash.h xgccache.h
xmu.o: config.h
#include "frame.h"
#include "sysdep.h"
-/* #### Andy, these includes might break cygwin compilation - kkm*/
#include <commdlg.h>
-#include <winspool.h>
#if !(defined (CYGWIN) || defined(MINGW))
-# include <objbase.h> /* For CoInitialize */
+#include <objbase.h> /* For CoInitialize */
#endif
/* win32 DDE management library globals */
nil means no, t means yes. */
Lisp_Object Vmswindows_downcase_file_names;
-/* Control whether stat() attempts to determine file type and link count
+/* Control whether xemacs_stat() attempts to determine file type and link count
exactly, at the expense of slower operation. Since true hard links
are supported on NTFS volumes, this is only relevant on NT. */
Lisp_Object Vmswindows_get_true_file_attributes;
wc.cbWndExtra = MSWINDOWS_WINDOW_EXTRA_BYTES;
/* This must match whatever is passed to CreateWIndowEx, NULL is ok
for this. */
- wc.hInstance = NULL;
+ wc.hInstance = NULL;
wc.hIcon = LoadIcon (GetModuleHandle(NULL), XEMACS_CLASS);
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
/* Background brush is only used during sizing, when XEmacs cannot
wc.lpszMenuName = NULL;
wc.lpszClassName = XEMACS_CLASS;
- wc.hIconSm = (HICON) LoadImage (GetModuleHandle (NULL), XEMACS_CLASS,
- IMAGE_ICON, 16, 16, 0);
- RegisterClassEx (&wc);
+ if (xLoadImageA) /* not in NT 3.5 */
+ wc.hIconSm = (HICON) xLoadImageA (GetModuleHandle (NULL), XEMACS_CLASS,
+ IMAGE_ICON, 16, 16, 0);
+ else
+ wc.hIconSm = 0;
+
+ if (xRegisterClassExA) /* not in NT 3.5 */
+ xRegisterClassExA (&wc);
+ else
+ RegisterClassA ((WNDCLASS *) &wc.style);
#ifdef HAVE_WIDGETS
xzero (wc);
wc.lpfnWndProc = (WNDPROC) mswindows_control_wnd_proc;
wc.lpszClassName = XEMACS_CONTROL_CLASS;
wc.hInstance = NULL;
- RegisterClassEx (&wc);
+ if (xRegisterClassExA) /* not in NT 3.5 */
+ xRegisterClassExA (&wc);
+ else
+ RegisterClassA ((WNDCLASS *) &wc.style);
#endif
#if defined (HAVE_TOOLBARS) || defined (HAVE_WIDGETS)
APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES|
CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS,
0);
-
+
mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid,
XEMACS_CLASS, 0);
mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid,
#define FROB(met, fore, back) \
case DM_##met: \
return build_syscolor_cons (fore, back);
-
+
FROB (color_default, COLOR_WINDOWTEXT, COLOR_WINDOW);
FROB (color_select, COLOR_HIGHLIGHTTEXT, COLOR_HIGHLIGHT);
FROB (color_balloon, COLOR_INFOTEXT, COLOR_INFOBK);
static void
signal_open_printer_error (struct device *d)
{
- signal_simple_error ("Failed to open printer", DEVICE_CONNECTION (d));
+ invalid_operation ("Failed to open printer", DEVICE_CONNECTION (d));
}
DEVICE_MSPRINTER_FONTLIST (d) = Qnil;
}
-static int msprinter_reinit_device (struct device *d, char* devname)
+static int
+msprinter_reinit_device (struct device *d, char* devname)
{
msprinter_delete_device_internal (d);
return msprinter_init_device_internal (d, devname);
}
+Lisp_Object
+msprinter_default_printer (void)
+{
+ Extbyte name[666];
+ Bufbyte *nameint;
+
+ if (GetProfileString (XETEXT ("windows"), XETEXT ("device"), NULL, name,
+ sizeof (name) / XETCHAR_SIZE) <= 0)
+ return Qnil;
+ EXTERNAL_TO_C_STRING (name, nameint, Qmswindows_tstr);
+
+ if (name[0] == '\0')
+ return Qnil;
+ strtok (name, ",");
+
+ return build_string (name);
+}
+
\f
/************************************************************************/
/* printer methods */
if (!msprinter_init_device_internal (d, printer_name))
signal_open_printer_error (d);
-
- /* Determinie DEVMODE size and store the default DEVMODE */
- dm_size = DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d),
+
+ /* Determine DEVMODE size and store the default DEVMODE */
+ dm_size = DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER (d),
printer_name, NULL, NULL, 0);
if (dm_size <= 0)
signal_open_printer_error (d);
assert (DEVMODE_SIZE (pdm) <= dm_size);
- DEVICE_MSPRINTER_DEVMODE(d) =
+ DEVICE_MSPRINTER_DEVMODE(d) =
allocate_devmode (pdm, 0, printer_name, d);
}
therefore useless */
return make_int (GetDeviceCaps (DEVICE_MSPRINTER_HDC(d), BITSPIXEL));
- case DM_num_color_cells: /* Prnters are non-palette devices */
+ case DM_num_color_cells: /* Printers are non-palette devices */
case DM_slow_device: /* Animation would be a really bad idea */
case DM_security: /* Not provided by windows */
return Qzero;
DEVICE_MSPRINTER_HDC (d) =
CreateDC ("WINSPOOL", DEVICE_MSPRINTER_NAME(d), NULL, devmode_out);
}
-
+
return 1;
}
{
Lisp_Object device;
XSETDEVICE (device, d);
- signal_simple_error ("Cannot change settings while print job is active",
- device);
+ invalid_operation ("Cannot change settings while print job is active",
+ device);
}
}
return XDEVMODE (dev);
else
{
- struct device* d = decode_device (dev);
- Lisp_Object device;
- XSETDEVICE (device, d);
- CHECK_MSPRINTER_DEVICE (device);
- ensure_not_printing (d);
- return XDEVMODE (DEVICE_MSPRINTER_DEVMODE (d));
+ ensure_not_printing (XDEVICE (dev));
+ return XDEVMODE (DEVICE_MSPRINTER_DEVMODE (XDEVICE (dev)));
}
}
}
}
-DEFUN ("msprinter-print-setup-dialog", Fmsprinter_print_setup_dialog, 1, 1, 0, /*
-Invoke Windows standard Printer Setup dialog.
-This dialog is usually invoked when the user selects the Printer Setup
-command.
-
-DEVICE must be either an 'msprinter device, or a printer settings
-object. The function brings up the Printer Setup dialog, where the user
-can select a different printer and/or change printer options.
-Connection name can change as a result of selecting a different printer
-device. If a printer is specified, then changes are stored into the
-settings object currently selected into that printer. If a settings
-object is supplied, then changes are recorded into it, and, it it is
-selected into a printer, then changes are propagated to that printer
-too.
-
-Return value is nil if the user has canceled the dialog. Otherwise, it
-is a new plist, with the following properties:
- name Printer device name, even if unchanged by the user.
-
-The printer device is destroyed and an error is signaled if new printer
-is selected by the user, but cannot be initialized.
-
-See also `msprinter-print-dialog' and `msprinter-page-setup-dialog'.
-*/
- (device))
+Lisp_Object
+mswindows_handle_print_setup_dialog_box (struct frame *f, Lisp_Object keys)
{
- return print_dialog_worker (device, 0);
+ Lisp_Object device = Qunbound, settings = Qunbound;
+
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
+ {
+ if (EQ (key, Q_device))
+ {
+ device = wrap_device (decode_device (value));
+ CHECK_MSPRINTER_DEVICE (device);
+ }
+ else if (EQ (key, Q_printer_settings))
+ {
+ CHECK_DEVMODE (value);
+ settings = value;
+ }
+ else
+ syntax_error ("Unrecognized print-dialog keyword", key);
+ }
+ }
+
+ if ((UNBOUNDP (device) && UNBOUNDP (settings)) ||
+ (!UNBOUNDP (device) && !UNBOUNDP (settings)))
+ syntax_error ("Exactly one of :device and :printer-settings must be given",
+ keys);
+
+ return print_dialog_worker (!UNBOUNDP (device) ? device : settings, 0);
}
-DEFUN ("msprinter-print-dialog", Fmsprinter_print_dialog, 1, 1, 0, /*
-Invoke Windows standard Print dialog.
-This dialog is usually invoked when the user selects the Print command.
-After the user presses OK, the program should start actual printout.
-
-DEVICE must be either an 'msprinter device, or a printer settings
-object. The function brings up the Print dialog, where the user can
-select a different printer and/or change printer options. Connection
-name can change as a result of selecting a different printer device. If
-a printer is specified, then changes are stored into the settings object
-currently selected into that printer. If a settings object is supplied,
-then changes are recorded into it, and, it it is selected into a
-printer, then changes are propagated to that printer
-too.
-
-Return value is nil if the user has canceled the dialog. Otherwise, it
-is a new plist, with the following properties:
- name Printer device name, even if unchanged by the user.
- from-page First page to print, 1-based. If not specified by the user,
- then this value is not included in the plist.
- to-page Last page to print, inclusive, 1-based. If not specified by
- the user, then this value is not included in the plist.
- copies Number of copies to print. Always returned.
-
-The DEVICE is destroyed and an error is signaled in case of
-initialization problem with the new printer.
-
-See also `msprinter-setup-print-dialog' and
-`msprinter-page-setup-dialog'.
-*/
- (device))
+Lisp_Object
+mswindows_handle_print_dialog_box (struct frame *f, Lisp_Object keys)
{
- return print_dialog_worker (device, 1);
-}
+ Lisp_Object device = Qunbound, settings = Qunbound;
+
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
+ {
+ if (EQ (key, Q_device))
+ {
+ device = wrap_device (decode_device (value));
+ CHECK_MSPRINTER_DEVICE (device);
+ }
+ else if (EQ (key, Q_printer_settings))
+ {
+ CHECK_DEVMODE (value);
+ settings = value;
+ }
+ else
+ syntax_error ("Unrecognized print-dialog keyword", key);
+ }
+ }
+ if ((UNBOUNDP (device) && UNBOUNDP (settings)) ||
+ (!UNBOUNDP (device) && !UNBOUNDP (settings)))
+ syntax_error ("Exactly one of :device and :printer-settings must be given",
+ keys);
+
+ return print_dialog_worker (!UNBOUNDP (device) ? device : settings, 1);
+}
static int
plist_get_margin (Lisp_Object plist, Lisp_Object prop)
{
Lisp_Object val = Fplist_get (plist, prop, make_int (1440));
if (!INTP (val))
- signal_simple_error ("Margin value must be an integer", val);
+ invalid_argument ("Margin value must be an integer", val);
return MulDiv (XINT (val), 100, 144);
}
return Fcons (prop, Fcons (val, plist));
}
-DEFUN ("msprinter-page-setup-dialog", Fmsprinter_page_setup_dialog, 1, 2, 0, /*
-Invoke Windows standard Page Setup dialog.
-This dialog is usually invoked in response to Page Setup command, and
-used to chose such parameters as page orientation, print margins etc.
-Note that this dialog contains the "Printer" button, which invokes
-Printer Setup dialog (see `msprinter-print-setup-dialog') so that the
-user can update the printer options or even select a different printer
-as well.
-
-DEVICE must be either an 'msprinter device, or a printer settings
-object. The function brings up the Page Setup dialog, where the user
-can select a different printer and/or change printer options.
-Connection name can change as a result of selecting a different printer
-device. If a printer is specified, then changes are stored into the
-settings object currently selected into that printer. If a settings
-object is supplied, then changes are recorded into it, and, it it is
-selected into a printer, then changes are propagated to that printer
-too.
-
-PLIST is a plist of job properties;
-see `default-msprinter-frame-plist' for the complete list. The plist
-is used to initialize the dialog.
-
-Return value is nil if the user has canceled the dialog. Otherwise,
-it is a new plist, containing the new list of properties.
-
-The DEVICE is destroyed and an error is signaled in case of
-initialization problem with the new printer.
-
-See also `msprinter-print-setup-dialog' and `msprinter-print-dialog'.
-*/
- (device, plist))
+Lisp_Object
+mswindows_handle_page_setup_dialog_box (struct frame *f, Lisp_Object keys)
{
- Lisp_Devmode *ldm = decode_devmode (device);
- PAGESETUPDLG pd;
+ Lisp_Object device = Qunbound, settings = Qunbound;
+ Lisp_Object plist = Qnil;
- memset (&pd, 0, sizeof (pd));
- pd.lStructSize = sizeof (pd);
- pd.hwndOwner = mswindows_get_selected_frame_hwnd ();
- pd.Flags = PSD_MARGINS;
- pd.rtMargin.left = plist_get_margin (plist, Qleft_margin);
- pd.rtMargin.top = plist_get_margin (plist, Qtop_margin);
- pd.rtMargin.right = plist_get_margin (plist, Qright_margin);
- pd.rtMargin.bottom = plist_get_margin (plist, Qbottom_margin);
- pd.hDevMode = devmode_to_hglobal (ldm);
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
+ {
+ if (EQ (key, Q_device))
+ {
+ device = wrap_device (decode_device (value));
+ CHECK_MSPRINTER_DEVICE (device);
+ }
+ else if (EQ (key, Q_printer_settings))
+ {
+ CHECK_DEVMODE (value);
+ settings = value;
+ }
+ else if (EQ (key, Q_properties))
+ {
+ CHECK_LIST (value);
+ plist = value;
+ }
+ else
+ syntax_error ("Unrecognized page-setup dialog keyword", key);
+ }
+ }
- if (!PageSetupDlg (&pd))
- {
- global_free_2_maybe (pd.hDevNames, pd.hDevMode);
- return Qnil;
- }
+ if ((UNBOUNDP (device) && UNBOUNDP (settings)) ||
+ (!UNBOUNDP (device) && !UNBOUNDP (settings)))
+ syntax_error ("Exactly one of :device and :printer-settings must be given",
+ keys);
- if (pd.hDevMode)
- handle_devmode_changes (ldm, pd.hDevNames, pd.hDevMode);
+ if (UNBOUNDP (device))
+ device = settings;
- /* Finally, build the resulting plist */
{
- Lisp_Object result = Qnil;
- int mm_p = pd.Flags & PSD_INHUNDREDTHSOFMILLIMETERS;
- result = plist_set_margin (result, Qbottom_margin, pd.rtMargin.bottom, mm_p);
- result = plist_set_margin (result, Qright_margin, pd.rtMargin.right, mm_p);
- result = plist_set_margin (result, Qtop_margin, pd.rtMargin.top, mm_p);
- result = plist_set_margin (result, Qleft_margin, pd.rtMargin.left, mm_p);
- return result;
+ Lisp_Devmode *ldm = decode_devmode (device);
+ PAGESETUPDLG pd;
+
+ memset (&pd, 0, sizeof (pd));
+ pd.lStructSize = sizeof (pd);
+ pd.hwndOwner = mswindows_get_selected_frame_hwnd ();
+ pd.Flags = PSD_MARGINS;
+ pd.rtMargin.left = plist_get_margin (plist, Qleft_margin);
+ pd.rtMargin.top = plist_get_margin (plist, Qtop_margin);
+ pd.rtMargin.right = plist_get_margin (plist, Qright_margin);
+ pd.rtMargin.bottom = plist_get_margin (plist, Qbottom_margin);
+ pd.hDevMode = devmode_to_hglobal (ldm);
+
+ if (!PageSetupDlg (&pd))
+ {
+ global_free_2_maybe (pd.hDevNames, pd.hDevMode);
+ return Qnil;
+ }
+
+ if (pd.hDevMode)
+ handle_devmode_changes (ldm, pd.hDevNames, pd.hDevMode);
+
+ /* Finally, build the resulting plist */
+ {
+ Lisp_Object result = Qnil;
+ int mm_p = pd.Flags & PSD_INHUNDREDTHSOFMILLIMETERS;
+ result = plist_set_margin (result, Qbottom_margin, pd.rtMargin.bottom,
+ mm_p);
+ result = plist_set_margin (result, Qright_margin, pd.rtMargin.right,
+ mm_p);
+ result = plist_set_margin (result, Qtop_margin, pd.rtMargin.top, mm_p);
+ result = plist_set_margin (result, Qleft_margin, pd.rtMargin.left, mm_p);
+ return result;
+ }
}
}
If the supplied settings object is not specialized, it is specialized
for the printer immediately upon selection. The object can be
despecialized after it is unselected by calling the function
-`msprinter-settings-despecialize'.
+`msprinter-settings-despecialize'.
Return value is the previously selected settings object.
*/
ldm = XDEVMODE (settings);
if (!NILP (ldm->device))
- signal_simple_error ("The object is currently selected into a device",
- settings);
+ invalid_operation ("The object is currently selected into a device",
+ settings);
/* If the object being selected is de-specialized, then its
size is perhaps not enough to receive the new devmode. We can ask
DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d),
DEVICE_MSPRINTER_NAME(d), NULL, NULL, 0);
if (dm_size <= 0)
- signal_simple_error ("Unable to specialize settings, printer error",
- device);
+ invalid_operation ("Unable to specialize settings, printer error",
+ device);
assert (XDEVMODE_SIZE (ldm) <= dm_size);
ldm->devmode = xrealloc (ldm->devmode, dm_size);
}
/* If we bail out on signal here, no damage is done, except that
- the stirage for the DEVMODE structure might be reallocated to
+ the storage for the DEVMODE structure might be reallocated to
hold a larger one - not a big deal */
if (!sync_printer_with_devmode (d, ldm->devmode, ldm->devmode,
ldm->printer_name))
/* If the supplied devmode is not specialized, then the current
devmode size will always be sufficient, as the printer does
- not change. If it is specialized, we must reallocate the cuttent
+ not change. If it is specialized, we must reallocate the current
devmode storage to match with the supplied one, as it has the right
size for the new printer, if it is going to change. The correct
way is to use the largest of the two though, to keep the old
ldm_current->devmode,
ldm_new->printer_name))
error ("Printer device initialization I/O error, device deleted.");
-
+
if (ldm_new->printer_name != NULL)
{
xfree (ldm_current->printer_name);
{
Lisp_Object devmode;
XSETDEVMODE (devmode, dm);
- signal_simple_error (
- "Cannot dump XEmacs containing an msprinter-settings object",
- devmode);
+ invalid_operation
+ ("Cannot dump XEmacs containing an msprinter-settings object",
+ devmode);
}
assert (NILP (dm->device));
ldm = XDEVMODE (settings);
if (!NILP (ldm->device))
- signal_simple_error ("The object is currently selected into a device",
- settings);
+ invalid_operation ("The object is currently selected into a device",
+ settings);
dm = ldm->devmode;
return Qnil;
}
+DEFUN ("mswindows-get-default-printer", Fmswindows_get_default_printer, 0, 0, 0, /*
+Return name of the default printer, as string, on nil if there is no default.
+*/
+ ())
+{
+ return msprinter_default_printer ();
+}
+
+static void
+signal_enum_printer_error (void)
+{
+ invalid_operation ("Error enumerating printers", make_int (GetLastError ()));
+}
+
+DEFUN ("mswindows-printer-list", Fmswindows_printer_list, 0, 0, 0, /*
+Return a list of string names of installed printers.
+If there is a default printer, it is returned as the first element of
+the list. If there is no default printer, the first element of the
+list will be nil. The rest of elements are guaranteed to have string
+values. Return value is nil if there are no printers installed.
+*/
+ ())
+{
+ int have_nt, ok;
+ BYTE *data_buf, dummy_byte;
+ size_t enum_entry_size;
+ DWORD enum_flags, enum_level, bytes_needed, num_printers;
+ struct gcpro gcpro1, gcpro2;
+ Lisp_Object result = Qnil, def_printer = Qnil;
+
+ /* Determine OS flavor, to use the fastest enumeration method available */
+ have_nt = !mswindows_windows9x_p ();
+ enum_flags = PRINTER_ENUM_LOCAL | (have_nt ? PRINTER_ENUM_CONNECTIONS : 0);
+ enum_level = have_nt ? 4 : 5;
+ enum_entry_size = have_nt ? sizeof (PRINTER_INFO_4) : sizeof (PRINTER_INFO_5);
+
+ /* Allocate memory for printer enum structure */
+ ok = EnumPrinters (enum_flags, NULL, enum_level, &dummy_byte, 1,
+ &bytes_needed, &num_printers);
+ if (ok)
+ /* No printers, if just 1 byte is enough */
+ return Qnil;
+
+ if (GetLastError () != ERROR_INSUFFICIENT_BUFFER)
+ signal_enum_printer_error ();
+
+ data_buf = alloca (bytes_needed);
+ ok = EnumPrinters (enum_flags, NULL, enum_level, data_buf, bytes_needed,
+ &bytes_needed, &num_printers);
+ if (!ok)
+ signal_enum_printer_error ();
+
+ if (num_printers == 0)
+ /* Strange but... */
+ return Qnil;
+
+ GCPRO2 (result, def_printer);
+
+ while (num_printers--)
+ {
+ LPCTSTR printer_name;
+ if (have_nt)
+ {
+ PRINTER_INFO_4 *info = (PRINTER_INFO_4*) data_buf;
+ printer_name = info->pPrinterName;
+ }
+ else
+ {
+ PRINTER_INFO_5 *info = (PRINTER_INFO_5*) data_buf;
+ printer_name = info->pPrinterName;
+ }
+ data_buf += enum_entry_size;
+
+ result = Fcons (build_ext_string (printer_name, Qmswindows_tstr),
+ result);
+ }
+
+ def_printer = msprinter_default_printer ();
+ result = Fdelete (def_printer, result);
+ result = Fcons (def_printer, result);
+
+ RETURN_UNGCPRO (result);
+}
+
\f
/************************************************************************/
/* initialization */
{
INIT_LRECORD_IMPLEMENTATION (devmode);
- DEFSUBR (Fmsprinter_print_setup_dialog);
- DEFSUBR (Fmsprinter_print_dialog);
- DEFSUBR (Fmsprinter_page_setup_dialog);
DEFSUBR (Fmsprinter_get_settings);
DEFSUBR (Fmsprinter_select_settings);
DEFSUBR (Fmsprinter_apply_settings);
DEFSUBR (Fmsprinter_settings_copy);
DEFSUBR (Fmsprinter_settings_despecialize);
+ DEFSUBR (Fmswindows_get_default_printer);
+ DEFSUBR (Fmswindows_printer_list);
defsymbol (&Qinit_pre_mswindows_win, "init-pre-mswindows-win");
defsymbol (&Qinit_post_mswindows_win, "init-post-mswindows-win");
/* Synched up with: Not in FSF. */
+/* 7-8-00 !!#### This file needs definite Mule review. */
+
/* Original authors: Jamie Zawinski and the FSF */
/* Rewritten by Ben Wing and Chuck Thompson. */
* Finally, if all else fails, return `xemacs', as it is more
* appropriate (X11R5 returns `main').
*/
-static char *
-compute_x_app_name (int argc, char **argv)
+static Extbyte *
+compute_x_app_name (int argc, Extbyte **argv)
{
int i;
- char *ptr;
+ Extbyte *ptr;
for (i = 1; i < argc - 1; i++)
if (!strncmp(argv[i], "-name", max (2, strlen (argv[1]))))
Display *dpy;
Widget app_shell;
int argc;
- char **argv;
+ Extbyte **argv;
const char *app_class;
const char *app_name;
const char *disp_name;
make_argc_argv (Vx_initial_argv_list, &argc, &argv);
- TO_EXTERNAL_FORMAT (LISP_STRING, display,
- C_STRING_ALLOCA, disp_name,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (display, disp_name, Qctext);
/*
* Break apart the old XtOpenDisplay call into XOpenDisplay and
if (STRINGP (Vx_emacs_application_class) &&
XSTRING_LENGTH (Vx_emacs_application_class) > 0)
- TO_EXTERNAL_FORMAT (LISP_STRING, Vx_emacs_application_class,
- C_STRING_ALLOCA, app_class,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (Vx_emacs_application_class, app_class, Qctext);
else
{
app_class = (NILP (Vx_emacs_application_class) &&
Yuck. */
XtDisplayInitialize (Xt_app_con, dpy, compute_x_app_name (argc, argv),
app_class, emacs_options,
- XtNumber (emacs_options), &argc, argv);
+ XtNumber (emacs_options), &argc, (char **) argv);
speed_up_interrupts ();
screen = DefaultScreen (dpy);
if (STRINGP (Vx_app_defaults_directory) &&
XSTRING_LENGTH (Vx_app_defaults_directory) > 0)
{
- TO_EXTERNAL_FORMAT (LISP_STRING, Vx_app_defaults_directory,
- C_STRING_ALLOCA, data_dir,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (Vx_app_defaults_directory, data_dir, Qfile_name);
path = (char *)alloca (strlen (data_dir) + strlen (locale) + 7);
sprintf (path, "%s%s/Emacs", data_dir, locale);
if (!access (path, R_OK))
}
else if (STRINGP (Vdata_directory) && XSTRING_LENGTH (Vdata_directory) > 0)
{
- TO_EXTERNAL_FORMAT (LISP_STRING, Vdata_directory,
- C_STRING_ALLOCA, data_dir,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (Vdata_directory, data_dir, Qfile_name);
path = (char *)alloca (strlen (data_dir) + 13 + strlen (locale) + 7);
sprintf (path, "%sapp-defaults/%s/Emacs", data_dir, locale);
if (!access (path, R_OK))
#ifdef HAVE_WMCOMMAND
{
int new_argc;
- char **new_argv;
+ Extbyte **new_argv;
make_argc_argv (Vcommand_line_args, &new_argc, &new_argv);
- XSetCommand (XtDisplay (app_shell), XtWindow (app_shell), new_argv, new_argc);
+ XSetCommand (XtDisplay (app_shell), XtWindow (app_shell),
+ (char **) new_argv, new_argc);
free_argc_argv (new_argv);
}
#endif /* HAVE_WMCOMMAND */
#endif /* 0 */
+/* strcasecmp() is not sufficiently portable or standard,
+ and it's easier just to write our own. */
+static int
+ascii_strcasecmp (const char *s1, const char *s2)
+{
+ while (1)
+ {
+ char c1 = *s1++;
+ char c2 = *s2++;
+ if (c1 >= 'A' && c1 <= 'Z') c1 += 'a' - 'A';
+ if (c2 >= 'A' && c2 <= 'Z') c2 += 'a' - 'A';
+ if (c1 != c2) return c1 - c2;
+ if (c1 == '\0') return 0;
+ }
+}
+
static char_dynarr *name_char_dynarr;
static char_dynarr *class_char_dynarr;
return build_string (raw_result);
else if (EQ (type, Qboolean))
{
- if (!strcasecmp (raw_result, "off") ||
- !strcasecmp (raw_result, "false") ||
- !strcasecmp (raw_result, "no"))
+ if (!ascii_strcasecmp (raw_result, "off") ||
+ !ascii_strcasecmp (raw_result, "false") ||
+ !ascii_strcasecmp (raw_result, "no"))
return Fcons (Qnil, Qnil);
- if (!strcasecmp (raw_result, "on") ||
- !strcasecmp (raw_result, "true") ||
- !strcasecmp (raw_result, "yes"))
+ if (!ascii_strcasecmp (raw_result, "on") ||
+ !ascii_strcasecmp (raw_result, "true") ||
+ !ascii_strcasecmp (raw_result, "yes"))
return Fcons (Qt, Qnil);
return maybe_continuable_error
(Qresource, errb,
const char *keysym_ext;
CHECK_STRING (keysym);
- TO_EXTERNAL_FORMAT (LISP_STRING, keysym,
- C_STRING_ALLOCA, keysym_ext,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (keysym, keysym_ext, Qctext);
return XStringToKeysym (keysym_ext) ? Qt : Qnil;
}
EXTERNAL_LIST_LOOP (path_entry, font_path)
{
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (path_entry),
- C_STRING_ALLOCA, directories[i++],
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (XCAR (path_entry), directories[i++], Qfile_name);
}
expect_x_error (dpy);
size-icon-small Small icon dimensions.
size-device Device screen or paper size in pixels.
size-workspace Workspace size in pixels. This can be less than or
- equal to the above. For diplays, this is the area
+ equal to the above. For displays, this is the area
available to applications less window manager
decorations. For printers, this is the size of
printable area.
DECLARE_LRECORD (device, struct device);
#define XDEVICE(x) XRECORD (x, device, struct device)
#define XSETDEVICE(x, p) XSETRECORD (x, p, device)
+#define wrap_device(p) wrap_object (p)
#define DEVICEP(x) RECORDP (x, device)
#define CHECK_DEVICE(x) CHECK_RECORD (x, device)
#define CONCHECK_DEVICE(x) CONCHECK_RECORD (x, device)
/* Implements elisp-programmable dialog boxes -- MS Windows interface.
Copyright (C) 1998 Kirill M. Katsnelson <kkm@kis.ru>
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
#include "gui.h"
#include "opaque.h"
+#include <cderr.h>
+#include <commdlg.h>
+
+Lisp_Object Qdialog_box_error;
+
+static Lisp_Object Q_initial_directory;
+static Lisp_Object Q_initial_filename;
+static Lisp_Object Q_filter_list;
+static Lisp_Object Q_title;
+static Lisp_Object Q_allow_multi_select;
+static Lisp_Object Q_create_prompt_on_nonexistent;
+static Lisp_Object Q_overwrite_prompt;
+static Lisp_Object Q_file_must_exist;
+static Lisp_Object Q_no_network_button;
+static Lisp_Object Q_no_read_only_return;
+
/* List containing all dialog data structures of currently popped up
- dialogs. Each item is a cons of frame object and a vector of
- callbacks for buttons in the dialog, in order */
+ dialogs. */
static Lisp_Object Vdialog_data_list;
+/* List of popup frames wanting keyboard traversal handled */
+static Lisp_Object Vpopup_frame_list;
+
+Lisp_Object Vdefault_file_dialog_filter_alist;
+
/* DLUs per character metrics */
#define X_DLU_PER_CHAR 4
#define Y_DLU_PER_CHAR 8
#define ID_ITEM_BIAS 32
+void
+mswindows_register_popup_frame (Lisp_Object frame)
+{
+ Vpopup_frame_list = Fcons (frame, Vpopup_frame_list);
+}
+
+void
+mswindows_unregister_popup_frame (Lisp_Object frame)
+{
+ Vpopup_frame_list = delq_no_quit (frame, Vpopup_frame_list);
+}
+
+/* Dispatch message to any dialog boxes. Return non-zero if dispatched. */
+int
+mswindows_is_dialog_msg (MSG *msg)
+{
+ LIST_LOOP_2 (data, Vdialog_data_list)
+ {
+ if (IsDialogMessage (XMSWINDOWS_DIALOG_ID (data)->hwnd, msg))
+ return 1;
+ }
+
+ {
+ LIST_LOOP_2 (popup, Vpopup_frame_list)
+ {
+ HWND hwnd = FRAME_MSWINDOWS_HANDLE (XFRAME (popup));
+ if (IsDialogMessage (hwnd, msg))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static Lisp_Object
+mark_mswindows_dialog_id (Lisp_Object obj)
+{
+ struct mswindows_dialog_id *data = XMSWINDOWS_DIALOG_ID (obj);
+ mark_object (data->frame);
+ return data->callbacks;
+}
+
+DEFINE_LRECORD_IMPLEMENTATION ("mswindows-dialog-id", mswindows_dialog_id,
+ mark_mswindows_dialog_id, 0, 0, 0, 0, 0,
+ struct mswindows_dialog_id);
+
/* Dialog procedure */
static BOOL CALLBACK
dialog_proc (HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param)
case WM_COMMAND:
{
Lisp_Object fn, arg, data;
+ struct mswindows_dialog_id *did;
+
VOID_TO_LISP (data, GetWindowLong (hwnd, DWL_USER));
-
- assert (w_param >= ID_ITEM_BIAS
- && w_param < XVECTOR_LENGTH (XCDR (data)) + ID_ITEM_BIAS);
-
- get_gui_callback (XVECTOR_DATA (XCDR (data)) [w_param - ID_ITEM_BIAS],
- &fn, &arg);
- mswindows_enqueue_misc_user_event (XCAR (data), fn, arg);
+ did = XMSWINDOWS_DIALOG_ID (data);
+ if (w_param != IDCANCEL) /* user pressed escape */
+ {
+ assert (w_param >= ID_ITEM_BIAS
+ && w_param
+ < XVECTOR_LENGTH (did->callbacks) + ID_ITEM_BIAS);
+
+ get_gui_callback (XVECTOR_DATA (did->callbacks)
+ [w_param - ID_ITEM_BIAS],
+ &fn, &arg);
+ mswindows_enqueue_misc_user_event (did->frame, fn, arg);
+ }
+ else
+ mswindows_enqueue_misc_user_event (did->frame, Qrun_hooks,
+ Qmenu_no_selection_hook);
+ /* #### need to error-protect! will do so when i merge in
+ my working ws */
+ va_run_hook_with_args (Qdelete_dialog_box_hook, 1, data);
DestroyWindow (hwnd);
}
Dynarr_add_many (template, &zeroes, slippage); \
}
-static void
-mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
+static struct
+{
+ int errmess;
+ char *errname;
+} common_dialog_errors[] =
+{
+ { CDERR_DIALOGFAILURE, "CDERR_DIALOGFAILURE" },
+ { CDERR_FINDRESFAILURE, "CDERR_FINDRESFAILURE" },
+ { CDERR_INITIALIZATION, "CDERR_INITIALIZATION" },
+ { CDERR_LOADRESFAILURE, "CDERR_LOADRESFAILURE" },
+ { CDERR_LOADSTRFAILURE, "CDERR_LOADSTRFAILURE" },
+ { CDERR_LOCKRESFAILURE, "CDERR_LOCKRESFAILURE" },
+ { CDERR_MEMALLOCFAILURE, "CDERR_MEMALLOCFAILURE" },
+ { CDERR_MEMLOCKFAILURE, "CDERR_MEMLOCKFAILURE" },
+ { CDERR_NOHINSTANCE, "CDERR_NOHINSTANCE" },
+ { CDERR_NOHOOK, "CDERR_NOHOOK" },
+ { CDERR_NOTEMPLATE, "CDERR_NOTEMPLATE" },
+ { CDERR_REGISTERMSGFAIL, "CDERR_REGISTERMSGFAIL" },
+ { CDERR_STRUCTSIZE, "CDERR_STRUCTSIZE" },
+ { PDERR_CREATEICFAILURE, "PDERR_CREATEICFAILURE" },
+ { PDERR_DEFAULTDIFFERENT, "PDERR_DEFAULTDIFFERENT" },
+ { PDERR_DNDMMISMATCH, "PDERR_DNDMMISMATCH" },
+ { PDERR_GETDEVMODEFAIL, "PDERR_GETDEVMODEFAIL" },
+ { PDERR_INITFAILURE, "PDERR_INITFAILURE" },
+ { PDERR_LOADDRVFAILURE, "PDERR_LOADDRVFAILURE" },
+ { PDERR_NODEFAULTPRN, "PDERR_NODEFAULTPRN" },
+ { PDERR_NODEVICES, "PDERR_NODEVICES" },
+ { PDERR_PARSEFAILURE, "PDERR_PARSEFAILURE" },
+ { PDERR_PRINTERNOTFOUND, "PDERR_PRINTERNOTFOUND" },
+ { PDERR_RETDEFFAILURE, "PDERR_RETDEFFAILURE" },
+ { PDERR_SETUPFAILURE, "PDERR_SETUPFAILURE" },
+ { CFERR_MAXLESSTHANMIN, "CFERR_MAXLESSTHANMIN" },
+ { CFERR_NOFONTS, "CFERR_NOFONTS" },
+ { FNERR_BUFFERTOOSMALL, "FNERR_BUFFERTOOSMALL" },
+ { FNERR_INVALIDFILENAME, "FNERR_INVALIDFILENAME" },
+ { FNERR_SUBCLASSFAILURE, "FNERR_SUBCLASSFAILURE" },
+ { FRERR_BUFFERLENGTHZERO, "FRERR_BUFFERLENGTHZERO" },
+};
+
+static Lisp_Object
+handle_file_dialog_box (struct frame *f, Lisp_Object keys)
+{
+ OPENFILENAME ofn;
+ char fnbuf[8000];
+
+ xzero (ofn);
+ ofn.lStructSize = sizeof (ofn);
+ ofn.hwndOwner = FRAME_MSWINDOWS_HANDLE (f);
+ ofn.lpstrFile = fnbuf;
+ ofn.nMaxFile = sizeof (fnbuf) / XETCHAR_SIZE;
+ xetcscpy (fnbuf, XETEXT (""));
+
+ LOCAL_FILE_FORMAT_TO_TSTR (Fexpand_file_name (build_string (""), Qnil),
+ ofn.lpstrInitialDir);
+
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
+ {
+ if (EQ (key, Q_initial_filename))
+ {
+ Extbyte *fnout;
+
+ CHECK_STRING (value);
+ LOCAL_FILE_FORMAT_TO_TSTR (value, fnout);
+ xetcscpy (fnbuf, fnout);
+ }
+ else if (EQ (key, Q_title))
+ {
+ CHECK_STRING (value);
+ LISP_STRING_TO_EXTERNAL (value, ofn.lpstrTitle, Qmswindows_tstr);
+ }
+ else if (EQ (key, Q_initial_directory))
+ LOCAL_FILE_FORMAT_TO_TSTR (Fexpand_file_name (value, Qnil),
+ ofn.lpstrInitialDir);
+ else if (EQ (key, Q_file_must_exist))
+ {
+ if (!NILP (value))
+ ofn.Flags |= OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;
+ else
+ ofn.Flags &= ~(OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST);
+ }
+ else
+ syntax_error ("Unrecognized file-dialog keyword", key);
+ }
+ }
+
+ if (!GetOpenFileName (&ofn))
+ {
+ DWORD err = CommDlgExtendedError ();
+ if (!err)
+ {
+ while (1)
+ signal_quit ();
+ }
+ else
+ {
+ int i;
+
+ for (i = 0; i < countof (common_dialog_errors); i++)
+ {
+ if (common_dialog_errors[i].errmess == err)
+ signal_type_error (Qdialog_box_error,
+ "Creating file-dialog-box",
+ build_string
+ (common_dialog_errors[i].errname));
+ }
+
+ signal_type_error (Qdialog_box_error,
+ "Unknown common dialog box error???",
+ make_int (err));
+ }
+ }
+
+ return tstr_to_local_file_format (ofn.lpstrFile);
+}
+
+static Lisp_Object
+handle_question_dialog_box (struct frame *f, Lisp_Object keys)
{
Lisp_Object_dynarr *dialog_items = Dynarr_new (Lisp_Object);
unsigned_char_dynarr *template = Dynarr_new (unsigned_char);
unsigned int button_row_width = 0;
unsigned int text_width, text_height;
+ Lisp_Object question = Qnil, title = Qnil;
int unbind_count = specpdl_depth ();
record_unwind_protect (free_dynarr_opaque_ptr,
make_opaque_ptr (template));
/* A big NO NEED to GCPRO gui_items stored in the array: they are just
- pointers into DESC list, which is GC-protected by the caller */
+ pointers into KEYS list, which is GC-protected by the caller */
- /* Parse each item in the dialog into gui_item structs, and stuff a dynarr
- of these. Calculate button row width in this loop too */
{
- Lisp_Object item_cons;
-
- EXTERNAL_LIST_LOOP (item_cons, XCDR (desc))
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
{
- if (!NILP (XCAR (item_cons)))
+ if (EQ (key, Q_question))
{
- Lisp_Object gitem = gui_parse_item_keywords (XCAR (item_cons));
- Dynarr_add (dialog_items, gitem);
- button_row_width += button_width (XGUI_ITEM (gitem)->name)
- + X_BUTTON_MARGIN;
+ CHECK_STRING (value);
+ question = value;
}
+ else if (EQ (key, Q_title))
+ {
+ CHECK_STRING (value);
+ title = value;
+ }
+ else if (EQ (key, Q_buttons))
+ {
+ Lisp_Object item_cons;
+
+ /* Parse each item in the dialog into gui_item structs,
+ and stuff a dynarr of these. Calculate button row width
+ in this loop too */
+ EXTERNAL_LIST_LOOP (item_cons, value)
+ {
+ if (!NILP (XCAR (item_cons)))
+ {
+ Lisp_Object gitem =
+ gui_parse_item_keywords (XCAR (item_cons));
+ Dynarr_add (dialog_items, gitem);
+ button_row_width += button_width (XGUI_ITEM (gitem)->name)
+ + X_BUTTON_MARGIN;
+ }
+ }
+
+ button_row_width -= X_BUTTON_MARGIN;
+ }
+ else
+ syntax_error ("Unrecognized question-dialog keyword", key);
}
- if (Dynarr_length (dialog_items) == 0)
- signal_simple_error ("Dialog descriptor provides no active items", desc);
- button_row_width -= X_BUTTON_MARGIN;
}
+ if (Dynarr_length (dialog_items) == 0)
+ syntax_error ("Dialog descriptor provides no buttons", keys);
+
+ if (NILP (question))
+ syntax_error ("Dialog descriptor provides no question", keys);
+
/* Determine the final width layout */
{
- Bufbyte *p = XSTRING_DATA (XCAR (desc));
+ Bufbyte *p = XSTRING_DATA (question);
Charcount string_max = 0, this_length = 0;
while (1)
{
/* Now calculate the height for the text control */
{
- Bufbyte *p = XSTRING_DATA (XCAR (desc));
+ Bufbyte *p = XSTRING_DATA (question);
Charcount break_at = text_width / X_DLU_PER_CHAR;
Charcount char_pos = 0;
int num_lines = 1;
Emchar ch;
- while ((ch = charptr_emchar (p)) != (Emchar)'\0')
+ while ((ch = charptr_emchar (p)) != (Emchar) '\0')
{
INC_CHARPTR (p);
- char_pos += ch != (Emchar)'\n';
- if (ch == (Emchar)'\n' || char_pos == break_at)
+ char_pos += ch != (Emchar) '\n';
+ if (ch == (Emchar) '\n' || char_pos == break_at)
{
++num_lines;
char_pos = 0;
/* We want no menu and standard class */
Dynarr_add_many (template, &zeroes, 4);
- /* And the third is the dialog title. "XEmacs" as long as we do not supply
- one in descriptor. Note that the string must be in Unicode. */
- Dynarr_add_many (template, L"XEmacs", 14);
+ /* And the third is the dialog title. "XEmacs" unless one is supplied.
+ Note that the string must be in Unicode. */
+ if (NILP (title))
+ Dynarr_add_many (template, L"XEmacs", 14);
+ else
+ push_lisp_string_as_unicode (template, title);
/* We want standard dialog font */
Dynarr_add_many (template, L"\x08MS Shell Dlg", 28);
Dynarr_add_many (template, &static_class_id, sizeof (static_class_id));
/* Next thing to add is control text, as Unicode string */
- push_lisp_string_as_unicode (template, XCAR (desc));
+ push_lisp_string_as_unicode (template, question);
/* Specify 0 length creation data */
Dynarr_add_many (template, &zeroes, 2);
/* Now the Windows dialog structure is ready. We need to prepare a
data structure for the new dialog, which will contain callbacks
- and the frame for these callbacks. This structure has to be
- GC-protected. The data structure itself is a cons of frame object
- and a vector of callbacks; for the protection reasons it is put
- into a statically protected list. */
+ and the frame for these callbacks. This structure has to be
+ GC-protected and thus it is put into a statically protected
+ list. */
{
- Lisp_Object frame, vector, dialog_data;
+ Lisp_Object dialog_data;
int i;
-
- XSETFRAME (frame, f);
- vector = make_vector (Dynarr_length (dialog_items), Qunbound);
- dialog_data = Fcons (frame, vector);
+ struct mswindows_dialog_id *did =
+ alloc_lcrecord_type (struct mswindows_dialog_id,
+ &lrecord_mswindows_dialog_id);
+
+ XSETMSWINDOWS_DIALOG_ID (dialog_data, did);
+
+ did->frame = wrap_frame (f);
+ did->callbacks = make_vector (Dynarr_length (dialog_items), Qunbound);
for (i = 0; i < Dynarr_length (dialog_items); i++)
- XVECTOR_DATA (vector) [i] =
+ XVECTOR_DATA (did->callbacks) [i] =
XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback;
-
+
/* Woof! Everything is ready. Pop pop pop in now! */
- if (!CreateDialogIndirectParam (NULL,
- (LPDLGTEMPLATE) Dynarr_atp (template, 0),
- FRAME_MSWINDOWS_HANDLE (f), dialog_proc,
- (LPARAM) LISP_TO_VOID (dialog_data)))
+ did->hwnd =
+ CreateDialogIndirectParam (NULL,
+ (LPDLGTEMPLATE) Dynarr_atp (template, 0),
+ FRAME_MSWINDOWS_HANDLE (f), dialog_proc,
+ (LPARAM) LISP_TO_VOID (dialog_data));
+ if (!did->hwnd)
/* Something went wrong creating the dialog */
- signal_simple_error ("System error creating dialog", desc);
+ signal_type_error (Qdialog_box_error, "Creating dialog", keys);
Vdialog_data_list = Fcons (dialog_data, Vdialog_data_list);
+
+ /* Cease protection and free dynarrays */
+ unbind_to (unbind_count, Qnil);
+ return dialog_data;
}
+}
- /* Cease protection and free dynarrays */
- unbind_to (unbind_count, Qnil);
+static Lisp_Object
+mswindows_make_dialog_box_internal (struct frame* f, Lisp_Object type,
+ Lisp_Object keys)
+{
+ if (EQ (type, Qfile))
+ return handle_file_dialog_box (f, keys);
+ else if (EQ (type, Qquestion))
+ return handle_question_dialog_box (f, keys);
+ else if (EQ (type, Qprint))
+ return mswindows_handle_print_dialog_box (f, keys);
+ else if (EQ (type, Qpage_setup))
+ return mswindows_handle_page_setup_dialog_box (f, keys);
+ else if (EQ (type, Qprint_setup))
+ return mswindows_handle_print_setup_dialog_box (f, keys);
+ else
+ signal_type_error (Qunimplemented, "Dialog box type", type);
+ return Qnil;
}
void
console_type_create_dialog_mswindows (void)
{
- CONSOLE_HAS_METHOD (mswindows, popup_dialog_box);
+ CONSOLE_HAS_METHOD (mswindows, make_dialog_box_internal);
+}
+
+void
+syms_of_dialog_mswindows (void)
+{
+ INIT_LRECORD_IMPLEMENTATION (mswindows_dialog_id);
+
+ DEFKEYWORD (Q_initial_directory);
+ DEFKEYWORD (Q_initial_filename);
+ DEFKEYWORD (Q_filter_list);
+ DEFKEYWORD (Q_title);
+ DEFKEYWORD (Q_allow_multi_select);
+ DEFKEYWORD (Q_create_prompt_on_nonexistent);
+ DEFKEYWORD (Q_overwrite_prompt);
+ DEFKEYWORD (Q_file_must_exist);
+ DEFKEYWORD (Q_no_network_button);
+ DEFKEYWORD (Q_no_read_only_return);
+
+ /* Errors */
+ DEFERROR_STANDARD (Qdialog_box_error, Qinvalid_operation);
}
void
vars_of_dialog_mswindows (void)
{
+ Vpopup_frame_list = Qnil;
+ staticpro (&Vpopup_frame_list);
+
Vdialog_data_list = Qnil;
staticpro (&Vdialog_data_list);
+
+ DEFVAR_LISP ("default-file-dialog-filter-alist",
+ &Vdefault_file_dialog_filter_alist /*
+*/ );
+ Vdefault_file_dialog_filter_alist =
+ list5 (Fcons (build_string ("Text Files"), build_string ("*.txt")),
+ Fcons (build_string ("C Files"), build_string ("*.c;*.h")),
+ Fcons (build_string ("Elisp Files"), build_string ("*.el")),
+ Fcons (build_string ("HTML Files"), build_string ("*.html;*.html")),
+ Fcons (build_string ("All Files"), build_string ("*.*")));
}
/* Implements elisp-programmable dialog boxes -- X interface.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
/* Synched up with: Not in FSF. */
+/* This file Mule-ized by Ben Wing, 7-8-00. */
+
#include <config.h>
#include "lisp.h"
static void
maybe_run_dbox_text_callback (LWLIB_ID id)
{
- /* !!#### This function has not been Mule-ized */
widget_value *wv;
int got_some;
wv = xmalloc_widget_value ();
if (got_some)
{
Lisp_Object text_field_callback;
- char *text_field_value = wv->value;
+ Extbyte *text_field_value = wv->value;
VOID_TO_LISP (text_field_callback, wv->call_data);
text_field_callback = XCAR (XCDR (text_field_callback));
if (text_field_value)
void *tmp =
LISP_TO_VOID (cons3 (Qnil,
list2 (text_field_callback,
- build_string (text_field_value)),
+ build_ext_string (text_field_value,
+ Qlwlib_encoding)),
Qnil));
popup_selection_callback (0, id, (XtPointer) tmp);
}
}
/* This code tried to optimize, newing/freeing. This is generally
- unsafe so we will alwats strdup and always use
+ unsafe so we will always strdup and always use
free_widget_value_tree. */
free_widget_value_tree (wv);
}
popup_up_p--;
maybe_run_dbox_text_callback (id);
popup_selection_callback (widget, id, client_data);
+ /* #### need to error-protect! will do so when i merge in
+ my working ws */
+ va_run_hook_with_args (Qdelete_dialog_box_hook, 1, make_int (id));
lw_destroy_all_widgets (id);
/* The Motif dialog box sets the keyboard focus to itself. When it
lw_set_keyboard_focus (FRAME_X_SHELL_WIDGET (f), FRAME_X_TEXT_WIDGET (f));
}
-static const char * const button_names [] = {
+static const Extbyte * const button_names [] = {
"button1", "button2", "button3", "button4", "button5",
"button6", "button7", "button8", "button9", "button10" };
-/* can't have static frame locals because of some broken compilers */
-static char tmp_dbox_name [255];
-
static widget_value *
-dbox_descriptor_to_widget_value (Lisp_Object desc)
+dbox_descriptor_to_widget_value (Lisp_Object keys)
{
- /* !!#### This function has not been Mule-ized */
/* This function can GC */
- char *name;
int lbuttons = 0, rbuttons = 0;
int partition_seen = 0;
int text_field_p = 0;
int n = 0;
int count = specpdl_depth ();
Lisp_Object wv_closure, gui_item;
+ Lisp_Object question = Qnil, title = Qnil, buttons = Qnil;
- CHECK_CONS (desc);
- CHECK_STRING (XCAR (desc));
- name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc)));
- desc = XCDR (desc);
- if (!CONSP (desc))
- error ("dialog boxes must have some buttons");
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
+ {
+ if (EQ (key, Q_question))
+ {
+ CHECK_STRING (value);
+ question = value;
+ }
+ else if (EQ (key, Q_title))
+ {
+ CHECK_STRING (value);
+ title = value;
+ }
+ else if (EQ (key, Q_buttons))
+ {
+ CHECK_LIST (value);
+ buttons = value;
+ }
+ else
+ syntax_error ("Unrecognized question-dialog keyword", key);
+ }
+ }
+
+ if (NILP (question))
+ syntax_error ("Dialog descriptor provides no question", keys);
/* Inhibit GC during this conversion. The reasons for this are
the same as in menu_item_descriptor_to_widget_value(); see
wv_closure = make_opaque_ptr (kids);
record_unwind_protect (widget_value_unwind, wv_closure);
prev->name = xstrdup ("message");
- prev->value = xstrdup (name);
+ LISP_STRING_TO_EXTERNAL_MALLOC (question, prev->value, Qlwlib_encoding);
prev->enabled = 1;
- for (; !NILP (desc); desc = Fcdr (desc))
- {
- Lisp_Object button = XCAR (desc);
- widget_value *wv;
-
- if (NILP (button))
- {
- if (partition_seen)
- error ("more than one partition (nil) seen in dbox spec");
- partition_seen = 1;
- continue;
- }
- CHECK_VECTOR (button);
- wv = xmalloc_widget_value ();
-
- gui_item = gui_parse_item_keywords (button);
- if (!button_item_to_widget_value (Qdialog,
- gui_item, wv, allow_text_p, 1, 0))
- {
- free_widget_value_tree (wv);
- continue;
- }
-
- if (wv->type == TEXT_TYPE)
- {
- text_field_p = 1;
- allow_text_p = 0; /* only allow one */
- }
- else /* it's a button */
- {
- allow_text_p = 0; /* only allow text field at the front */
- if (wv->value) xfree (wv->value);
- wv->value = wv->name; /* what a mess... */
- wv->name = xstrdup (button_names [n]);
-
- if (partition_seen)
- rbuttons++;
- else
- lbuttons++;
- n++;
-
- if (lbuttons > 9 || rbuttons > 9)
- error ("too many buttons (9)"); /* #### this leaks */
- }
-
- prev->next = wv;
- prev = wv;
- }
+ {
+ EXTERNAL_LIST_LOOP_2 (button, buttons)
+ {
+ widget_value *wv;
+
+ if (NILP (button))
+ {
+ if (partition_seen)
+ syntax_error ("More than one partition (nil) seen in dbox spec",
+ keys);
+ partition_seen = 1;
+ continue;
+ }
+ CHECK_VECTOR (button);
+ wv = xmalloc_widget_value ();
+
+ gui_item = gui_parse_item_keywords (button);
+ if (!button_item_to_widget_value (Qdialog,
+ gui_item, wv, allow_text_p, 1, 0, 1))
+ {
+ free_widget_value_tree (wv);
+ continue;
+ }
+
+ if (wv->type == TEXT_TYPE)
+ {
+ text_field_p = 1;
+ allow_text_p = 0; /* only allow one */
+ }
+ else /* it's a button */
+ {
+ allow_text_p = 0; /* only allow text field at the front */
+ if (wv->value)
+ xfree (wv->value);
+ wv->value = wv->name; /* what a mess... */
+ wv->name = xstrdup (button_names [n]);
+
+ if (partition_seen)
+ rbuttons++;
+ else
+ lbuttons++;
+ n++;
+
+ if (lbuttons > 9 || rbuttons > 9)
+ syntax_error ("Too many buttons (9)",
+ keys); /* #### this leaks */
+ }
+
+ prev->next = wv;
+ prev = wv;
+ }
+ }
if (n == 0)
- error ("dialog boxes must have some buttons");
+ syntax_error ("Dialog boxes must have some buttons", keys);
+
{
- char type = (text_field_p ? 'P' : 'Q');
+ Extbyte type = (text_field_p ? 'P' : 'Q');
+ static Extbyte tmp_dbox_name [255];
+
widget_value *dbox;
sprintf (tmp_dbox_name, "%c%dBR%d", type, lbuttons + rbuttons, rbuttons);
dbox = xmalloc_widget_value ();
}
}
-static void
-x_popup_dialog_box (struct frame* f, Lisp_Object dbox_desc)
+static Lisp_Object
+x_make_dialog_box_internal (struct frame* f, Lisp_Object type,
+ Lisp_Object keys)
{
int dbox_id;
widget_value *data;
Widget parent, dbox;
- data = dbox_descriptor_to_widget_value (dbox_desc);
+ if (!EQ (type, Qquestion))
+ signal_type_error (Qunimplemented, "Dialog box type", type);
+
+ data = dbox_descriptor_to_widget_value (keys);
parent = FRAME_X_SHELL_WIDGET (f);
popup_up_p++;
lw_pop_up_all_widgets (dbox_id);
+
+ /* #### this could (theoretically) cause problems if we are up for
+ a REALLY REALLY long time -- too big to fit into lisp integer. */
+ return make_int (dbox_id);
}
void
void
console_type_create_dialog_x (void)
{
- CONSOLE_HAS_METHOD (x, popup_dialog_box);
+ CONSOLE_HAS_METHOD (x, make_dialog_box_internal);
}
void
/* Implements elisp-programmable dialog boxes -- generic.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
#include <config.h>
#include "lisp.h"
+
#include "frame.h"
#include "device.h"
-DEFUN ("popup-dialog-box", Fpopup_dialog_box, 1, 1, 0, /*
-Pop up a dialog box.
-A dialog box description is a list.
-
-The first element of a dialog box must be a string, which is the title or
-question.
-
-The rest of the elements are descriptions of the dialog box's buttons.
-Each of these is a vector, the syntax of which is essentially the same as
-that of popup menu items. They may have any of the following forms:
-
- [ "name" callback <active-p> ]
- [ "name" callback <active-p> "suffix" ]
- [ "name" callback :<keyword> <value> :<keyword> <value> ... ]
-
-The name is the string to display on the button; it is filtered through the
-resource database, so it is possible for resources to override what string
-is actually displayed.
-
-Accelerators can be indicated in the string by putting the sequence
-"%_" before the character corresponding to the key that will invoke
-the button. Uppercase and lowercase accelerators are equivalent. The
-sequence "%%" is also special, and is translated into a single %.
+Lisp_Object Vdelete_dialog_box_hook;
+Lisp_Object Qdelete_dialog_box_hook;
-If the `callback' of a button is a symbol, then it must name a command.
-It will be invoked with `call-interactively'. If it is a list, then it is
-evaluated with `eval'.
-
-One (and only one) of the buttons may be `nil'. This marker means that all
-following buttons should be flushright instead of flushleft.
-
-Though the keyword/value syntax is supported for dialog boxes just as in
-popup menus, the only keyword which is both meaningful and fully implemented
-for dialog box buttons is `:active'. */
- (dbox_desc))
+DEFUN ("make-dialog-box-internal", Fmake_dialog_box_internal, 2, 2, 0, /*
+Internal helper function for `make-dialog-box'.
+This handles all dialog-box types except `general'.
+TYPE is the same as the first argument to `make-dialog-box', and KEYS
+a list of the remaining arguments.
+*/
+ (type, keys))
{
struct frame *f = selected_frame ();
struct device *d = XDEVICE (f->device);
- if (!HAS_DEVMETH_P (d, popup_dialog_box))
- signal_simple_error ("Device does not support dialogs", f->device);
-
- if (SYMBOLP (dbox_desc))
- dbox_desc = Fsymbol_value (dbox_desc);
- CHECK_CONS (dbox_desc);
- CHECK_STRING (XCAR (dbox_desc));
- if (!CONSP (XCDR (dbox_desc)))
- signal_simple_error ("Dialog descriptor must supply at least one button",
- dbox_desc);
+ CHECK_SYMBOL (type);
- DEVMETH (d, popup_dialog_box, (f, dbox_desc));
+ if (!HAS_DEVMETH_P (d, make_dialog_box_internal))
+ signal_type_error (Qunimplemented,
+ "Device does not support dialogs", f->device);
- return Qnil;
+ return DEVMETH (d, make_dialog_box_internal, (f, type, keys));
}
void
syms_of_dialog (void)
{
- DEFSUBR (Fpopup_dialog_box);
+ DEFSUBR (Fmake_dialog_box_internal);
+
+ DEFSYMBOL (Qdelete_dialog_box_hook);
}
void
vars_of_dialog (void)
{
Fprovide (intern ("dialog"));
+
+ DEFVAR_LISP ("delete-dialog-box-hook", &Vdelete_dialog_box_hook /*
+Function or functions to call when a dialog box is about to be deleted.
+One arg, the dialog box id.
+*/ );
+ Vdelete_dialog_box_hook = Qnil;
}
/*
* Here, we use FindFirstFile()/FindNextFile() instead of opendir(),
- * stat(), & friends, because stat() is VERY expensive in terms of
- * time. Hence, we take the time to write complicated Win32-specific
- * code, instead of simple Unix-style stuff.
+ * xemacs_stat(), & friends, because xemacs_stat() is VERY expensive in
+ * terms of time. Hence, we take the time to write complicated
+ * Win32-specific code, instead of simple Unix-style stuff.
*/
findex = 0;
fh = INVALID_HANDLE_VALUE;
memcpy (statbuf_tail, dp->d_name, len);
statbuf_tail[len] = 0;
- if (stat (statbuf, &st) == 0
+ if (xemacs_stat (statbuf, &st) == 0
&& (st.st_mode & S_IFMT) == S_IFDIR)
dir_p = 1;
in case it is a directory. */
value = lstat (fullname, st_addr);
if (S_ISLNK (st_addr->st_mode))
- stat (fullname, st_addr);
+ xemacs_stat (fullname, st_addr);
#else
- value = stat (fullname, st_addr);
+ value = xemacs_stat (fullname, st_addr);
#endif
return value;
}
\f
-/* The *pwent() functions do not exist on NT */
+/* The *pwent() functions do not exist on NT. #### The NT equivalent
+ is NetUserEnum(), and rewriting to use it is not hard.*/
#ifndef WIN32_NATIVE
static Lisp_Object user_name_completion (Lisp_Object user,
{
struct stat sdir;
- if (!NILP (directory) && stat ((char *) XSTRING_DATA (directory), &sdir) == 0)
+ if (!NILP (directory) && xemacs_stat ((char *) XSTRING_DATA (directory), &sdir) == 0)
values[9] = (sdir.st_gid != s.st_gid) ? Qt : Qnil;
else /* if we can't tell, assume worst */
values[9] = Qt;
if (POINTER_TYPE_P (XTYPE (*pobj))
&& ! EQ (*pobj, Qnull_pointer))
- XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + delta);
+ XSETOBJ (*pobj, (char *) XPNTR (*pobj) + delta);
break;
}
if (POINTER_TYPE_P (XTYPE (*pobj))
&& ! EQ (*pobj, Qnull_pointer))
- XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + delta);
+ XSETOBJ (*pobj, (char *) XPNTR (*pobj) + delta);
}
break;
}
{
Lisp_Object obj = PDUMP_READ (p, Lisp_Object);
if (POINTER_TYPE_P (XTYPE (obj)))
- XSETOBJ (obj, XTYPE (obj), (char *) XPNTR (obj) + delta);
+ XSETOBJ (obj, (char *) XPNTR (obj) + delta);
*staticvec[i] = obj;
}
Lisp_Object obj = PDUMP_READ (p, Lisp_Object);
if (POINTER_TYPE_P (XTYPE (obj)))
- XSETOBJ (obj, XTYPE (obj), (char *) XPNTR (obj) + delta);
+ XSETOBJ (obj, (char *) XPNTR (obj) + delta);
*var = obj;
}
p += sizeof (Lisp_Object) * rt.count;
}
- /* Put back noninteractive1 to its real value */
- noninteractive1 = noninteractive;
-
return 1;
}
static int pdump_file_get(const char *path)
{
- pdump_hFile = CreateFile (path,
+ pdump_hFile = CreateFile (path,
GENERIC_READ + GENERIC_WRITE, /* Required for copy on write */
0, /* Not shared */
NULL, /* Not inheritable */
- OPEN_EXISTING,
+ OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL); /* No template file */
if (pdump_hFile == INVALID_HANDLE_VALUE)
return 1;
pdump_free();
}
-
+
sprintf (w, "-%08x.dmp", dump_id);
if (pdump_file_get (exe_path))
{
return 1;
pdump_free();
}
-
+
sprintf (w, ".dmp");
if (pdump_file_get (exe_path))
{
return 1;
pdump_free();
}
-
+
do
w--;
- while (w>exe_path && !IS_DIRECTORY_SEP (*w) && (*w != '-') && (*w != '.'));
+ while (w>exe_path && !IS_DIRECTORY_SEP (*w) && (*w != '-') && (*w != '.'));
}
while (w>exe_path && !IS_DIRECTORY_SEP (*w));
return 0;
{
char exe_path[PATH_MAX];
#ifdef WIN32_NATIVE
- GetModuleFileName (NULL, exe_path, PATH_MAX);
+ GetModuleFileName (NULL, exe_path, PATH_MAX);
#else /* !WIN32_NATIVE */
char *w;
const char *dir, *p;
p = dir + strlen(dir);
while (p != dir && !IS_ANY_SEP (p[-1])) p--;
-
+
if (p != dir)
{
/* invocation-name includes a directory component -- presumably it
*w++ = '/';
}
strcpy(w, name);
-
+
/* ### #$%$#^$^@%$^#%@$ ! */
#ifdef access
#undef access
#endif
-
+
if (!access (exe_path, X_OK))
break;
if (!*p)
sprintf (exe_path, "./%s", name);
break;
}
- path = p+1;
+ path = p+1;
}
}
#endif /* WIN32_NATIVE */
return make_char (BUF_FETCH_CHAR (b, n));
}
+#if !defined(WINDOWSNT) && !defined(MSDOS)
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <limits.h>
+#endif
\f
DEFUN ("temp-directory", Ftemp_directory, 0, 0, 0, /*
Return the pathname to the directory to use for temporary files.
#else /* WIN32_NATIVE */
tmpdir = getenv ("TMPDIR");
if (!tmpdir)
+ {
+ struct stat st;
+ int myuid = getuid();
+ static char path[5 /* strlen ("/tmp/") */ + 1 + _POSIX_PATH_MAX];
+
+ strcpy (path, "/tmp/");
+ strncat (path, user_login_name (NULL), _POSIX_PATH_MAX);
+ if (lstat(path, &st) < 0 && errno == ENOENT)
+ {
+ mkdir(path, 0700); /* ignore retval -- checked next anyway. */
+ }
+ if (lstat(path, &st) == 0 && st.st_uid == myuid && S_ISDIR(st.st_mode))
+ {
+ tmpdir = path;
+ }
+ else
+ {
+ strcpy(path, getenv("HOME")); strncat(path, "/tmp/", _POSIX_PATH_MAX);
+ if (stat(path, &st) < 0 && errno == ENOENT)
+ {
+ int fd;
+ char warnpath[1+_POSIX_PATH_MAX];
+ mkdir(path, 0700); /* ignore retvals */
+ strcpy(warnpath, path);
+ strncat(warnpath, ".created_by_xemacs", _POSIX_PATH_MAX);
+ if ((fd = open(warnpath, O_WRONLY|O_CREAT, 0644)) > 0)
+ {
+ write(fd, "XEmacs created this directory because /tmp/<yourname> was unavailable -- \nPlease check !\n", 89);
+ close(fd);
+ }
+ }
+ if (stat(path, &st) == 0 && S_ISDIR(st.st_mode))
+ {
+ tmpdir = path;
+ }
+ else
+ {
tmpdir = "/tmp";
+ }
+ }
+ }
#endif
return build_ext_string (tmpdir, Qfile_name);
(specified_time))
{
time_t value;
- char buf[30];
- char *tem;
+ char *the_ctime;
+ size_t len;
if (! lisp_to_time (specified_time, &value))
value = -1;
- tem = (char *) ctime (&value);
+ the_ctime = ctime (&value);
- strncpy (buf, tem, 24);
- buf[24] = 0;
+ /* ctime is documented as always returning a "\n\0"-terminated
+ 26-byte American time string, but let's be careful anyways. */
+ for (len = 0; the_ctime[len] != '\n' && the_ctime[len] != '\0'; len++)
+ ;
- return build_ext_string (buf, Qbinary);
+ return make_ext_string ((Extbyte *) the_ctime, len, Qbinary);
}
#define TM_YEAR_ORIGIN 1900
See the variable `zmacs-regions'.
The same effect can be achieved using the `_' interactive specification.
+
+`zmacs-region-stays' is reset to nil before each command is executed.
*/ );
zmacs_region_stays = 0;
int ldap_sizelimit = 0;
int err;
- Lisp_Object list, keyword, value;
-
CHECK_STRING (host);
- EXTERNAL_PROPERTY_LIST_LOOP (list, keyword, value, plist)
- {
- /* TCP Port */
- if (EQ (keyword, Qport))
- {
- CHECK_INT (value);
- ldap_port = XINT (value);
- }
- /* Authentication method */
- if (EQ (keyword, Qauth))
- {
- if (EQ (value, Qsimple))
- ldap_auth = LDAP_AUTH_SIMPLE;
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (keyword, value, plist)
+ {
+ /* TCP Port */
+ if (EQ (keyword, Qport))
+ {
+ CHECK_INT (value);
+ ldap_port = XINT (value);
+ }
+ /* Authentication method */
+ if (EQ (keyword, Qauth))
+ {
+ if (EQ (value, Qsimple))
+ ldap_auth = LDAP_AUTH_SIMPLE;
#ifdef LDAP_AUTH_KRBV41
- else if (EQ (value, Qkrbv41))
- ldap_auth = LDAP_AUTH_KRBV41;
+ else if (EQ (value, Qkrbv41))
+ ldap_auth = LDAP_AUTH_KRBV41;
#endif
#ifdef LDAP_AUTH_KRBV42
- else if (EQ (value, Qkrbv42))
- ldap_auth = LDAP_AUTH_KRBV42;
+ else if (EQ (value, Qkrbv42))
+ ldap_auth = LDAP_AUTH_KRBV42;
#endif
- else
- signal_simple_error ("Invalid authentication method", value);
- }
- /* Bind DN */
- else if (EQ (keyword, Qbinddn))
- {
- CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value,
- C_STRING_ALLOCA, ldap_binddn,
- Qnative);
- }
- /* Password */
- else if (EQ (keyword, Qpasswd))
- {
- CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value,
- C_STRING_ALLOCA, ldap_passwd,
- Qnative);
- }
- /* Deref */
- else if (EQ (keyword, Qderef))
- {
- if (EQ (value, Qnever))
- ldap_deref = LDAP_DEREF_NEVER;
- else if (EQ (value, Qsearch))
- ldap_deref = LDAP_DEREF_SEARCHING;
- else if (EQ (value, Qfind))
- ldap_deref = LDAP_DEREF_FINDING;
- else if (EQ (value, Qalways))
- ldap_deref = LDAP_DEREF_ALWAYS;
- else
- signal_simple_error ("Invalid deref value", value);
- }
- /* Timelimit */
- else if (EQ (keyword, Qtimelimit))
- {
- CHECK_INT (value);
- ldap_timelimit = XINT (value);
- }
- /* Sizelimit */
- else if (EQ (keyword, Qsizelimit))
- {
- CHECK_INT (value);
- ldap_sizelimit = XINT (value);
- }
- }
+ else
+ signal_simple_error ("Invalid authentication method", value);
+ }
+ /* Bind DN */
+ else if (EQ (keyword, Qbinddn))
+ {
+ CHECK_STRING (value);
+ LISP_STRING_TO_EXTERNAL (value, ldap_binddn, Qnative);
+ }
+ /* Password */
+ else if (EQ (keyword, Qpasswd))
+ {
+ CHECK_STRING (value);
+ LISP_STRING_TO_EXTERNAL (value, ldap_passwd, Qnative);
+ }
+ /* Deref */
+ else if (EQ (keyword, Qderef))
+ {
+ if (EQ (value, Qnever))
+ ldap_deref = LDAP_DEREF_NEVER;
+ else if (EQ (value, Qsearch))
+ ldap_deref = LDAP_DEREF_SEARCHING;
+ else if (EQ (value, Qfind))
+ ldap_deref = LDAP_DEREF_FINDING;
+ else if (EQ (value, Qalways))
+ ldap_deref = LDAP_DEREF_ALWAYS;
+ else
+ signal_simple_error ("Invalid deref value", value);
+ }
+ /* Timelimit */
+ else if (EQ (keyword, Qtimelimit))
+ {
+ CHECK_INT (value);
+ ldap_timelimit = XINT (value);
+ }
+ /* Sizelimit */
+ else if (EQ (keyword, Qsizelimit))
+ {
+ CHECK_INT (value);
+ ldap_sizelimit = XINT (value);
+ }
+ }
+ }
if (ldap_port == 0)
{
/* Connect to the server and bind */
slow_down_interrupts ();
- ld = ldap_open ((char *)XSTRING_DATA (host), ldap_port);
+ ld = ldap_open ((char *) XSTRING_DATA (host), ldap_port);
speed_up_interrupts ();
if (ld == NULL )
{
Lisp_Object current = XCAR (attrs);
CHECK_STRING (current);
- TO_EXTERNAL_FORMAT (LISP_STRING, current,
- C_STRING_ALLOCA, ldap_attributes[i],
- Qnative);
+ LISP_STRING_TO_EXTERNAL (current, ldap_attributes[i], Qnative);
++i;
}
ldap_attributes[i] = NULL;
CHECK_CONS (current);
CHECK_STRING (XCAR (current));
ldap_mods_ptrs[i] = &(ldap_mods[i]);
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (current),
- C_STRING_ALLOCA, ldap_mods[i].mod_type,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (XCAR (current), ldap_mods[i].mod_type, Qnative);
ldap_mods[i].mod_op = LDAP_MOD_ADD | LDAP_MOD_BVALUES;
values = XCDR (current);
if (CONSP (values))
signal_simple_error ("Invalid LDAP modification type", mod_op);
current = XCDR (current);
CHECK_STRING (XCAR (current));
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (current),
- C_STRING_ALLOCA, ldap_mods[i].mod_type,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (XCAR (current), ldap_mods[i].mod_type, Qnative);
values = XCDR (current);
len = XINT (Flength (values));
bervals = alloca_array (struct berval, len);
Lisp_Object Qhash_tablep;
static Lisp_Object Qhashtable, Qhash_table;
-static Lisp_Object Qweakness, Qvalue, Qkey_value;
+static Lisp_Object Qweakness, Qvalue, Qkey_or_value, Qkey_and_value;
static Lisp_Object Vall_weak_hash_tables;
static Lisp_Object Qrehash_size, Qrehash_threshold;
static Lisp_Object Q_size, Q_test, Q_weakness, Q_rehash_size, Q_rehash_threshold;
/* obsolete as of 19990901 in xemacs-21.2 */
-static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qkey_value_weak;
+static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qkey_or_value_weak;
static Lisp_Object Qnon_weak, Q_type;
typedef struct hentry
`size' (a natnum or nil)
`rehash-size' (a float)
`rehash-threshold' (a float)
- `weakness' (nil, t, key or value)
+ `weakness' (nil, key, value, key-and-value, or key-or-value)
`data' (a list)
If `print-readably' is nil, then a simpler syntax is used, for example
if (ht->weakness != HASH_TABLE_NON_WEAK)
{
sprintf (buf, " weakness %s",
- (ht->weakness == HASH_TABLE_WEAK ? "t" :
- ht->weakness == HASH_TABLE_KEY_WEAK ? "key" :
- ht->weakness == HASH_TABLE_VALUE_WEAK ? "value" :
- ht->weakness == HASH_TABLE_KEY_VALUE_WEAK ? "key-value" :
+ (ht->weakness == HASH_TABLE_WEAK ? "key-and-value" :
+ ht->weakness == HASH_TABLE_KEY_WEAK ? "key" :
+ ht->weakness == HASH_TABLE_VALUE_WEAK ? "value" :
+ ht->weakness == HASH_TABLE_KEY_VALUE_WEAK ? "key-or-value" :
"you-d-better-not-see-this"));
write_c_string (buf, printcharfun);
}
hash_table_weakness_validate (Lisp_Object keyword, Lisp_Object value,
Error_behavior errb)
{
- if (EQ (value, Qnil)) return 1;
- if (EQ (value, Qt)) return 1;
- if (EQ (value, Qkey)) return 1;
- if (EQ (value, Qkey_value)) return 1;
- if (EQ (value, Qvalue)) return 1;
+ if (EQ (value, Qnil)) return 1;
+ if (EQ (value, Qt)) return 1;
+ if (EQ (value, Qkey)) return 1;
+ if (EQ (value, Qkey_and_value)) return 1;
+ if (EQ (value, Qkey_or_value)) return 1;
+ if (EQ (value, Qvalue)) return 1;
/* Following values are obsolete as of 19990901 in xemacs-21.2 */
- if (EQ (value, Qnon_weak)) return 1;
- if (EQ (value, Qweak)) return 1;
- if (EQ (value, Qkey_weak)) return 1;
- if (EQ (value, Qkey_value_weak)) return 1;
- if (EQ (value, Qvalue_weak)) return 1;
+ if (EQ (value, Qnon_weak)) return 1;
+ if (EQ (value, Qweak)) return 1;
+ if (EQ (value, Qkey_weak)) return 1;
+ if (EQ (value, Qkey_or_value_weak)) return 1;
+ if (EQ (value, Qvalue_weak)) return 1;
maybe_signal_simple_error ("Invalid hash table weakness",
value, Qhash_table, errb);
static enum hash_table_weakness
decode_hash_table_weakness (Lisp_Object obj)
{
- if (EQ (obj, Qnil)) return HASH_TABLE_NON_WEAK;
- if (EQ (obj, Qt)) return HASH_TABLE_WEAK;
- if (EQ (obj, Qkey)) return HASH_TABLE_KEY_WEAK;
- if (EQ (obj, Qkey_value)) return HASH_TABLE_KEY_VALUE_WEAK;
- if (EQ (obj, Qvalue)) return HASH_TABLE_VALUE_WEAK;
+ if (EQ (obj, Qnil)) return HASH_TABLE_NON_WEAK;
+ if (EQ (obj, Qt)) return HASH_TABLE_WEAK;
+ if (EQ (obj, Qkey_and_value)) return HASH_TABLE_WEAK;
+ if (EQ (obj, Qkey)) return HASH_TABLE_KEY_WEAK;
+ if (EQ (obj, Qkey_or_value)) return HASH_TABLE_KEY_VALUE_WEAK;
+ if (EQ (obj, Qvalue)) return HASH_TABLE_VALUE_WEAK;
/* Following values are obsolete as of 19990901 in xemacs-21.2 */
- if (EQ (obj, Qnon_weak)) return HASH_TABLE_NON_WEAK;
- if (EQ (obj, Qweak)) return HASH_TABLE_WEAK;
- if (EQ (obj, Qkey_weak)) return HASH_TABLE_KEY_WEAK;
- if (EQ (obj, Qkey_value_weak)) return HASH_TABLE_KEY_VALUE_WEAK;
- if (EQ (obj, Qvalue_weak)) return HASH_TABLE_VALUE_WEAK;
+ if (EQ (obj, Qnon_weak)) return HASH_TABLE_NON_WEAK;
+ if (EQ (obj, Qweak)) return HASH_TABLE_WEAK;
+ if (EQ (obj, Qkey_weak)) return HASH_TABLE_KEY_WEAK;
+ if (EQ (obj, Qkey_or_value_weak)) return HASH_TABLE_KEY_VALUE_WEAK;
+ if (EQ (obj, Qvalue_weak)) return HASH_TABLE_VALUE_WEAK;
signal_simple_error ("Invalid hash table weakness", obj);
return HASH_TABLE_NON_WEAK; /* not reached */
Keyword :rehash-threshold must be a float between 0.0 and 1.0,
and specifies the load factor of the hash table which triggers enlarging.
-Non-standard keyword :weakness can be `nil' (default), `t', `key', `value'
-or `key-value'.
+Non-standard keyword :weakness can be `nil' (default), `t', `key-and-value',
+`key', `value' or `key-or-value'. `t' is an alias for `key-and-value'.
-A weak hash table is one whose pointers do not count as GC referents:
-for any key-value pair in the hash table, if the only remaining pointer
-to either the key or the value is in a weak hash table, then the pair
-will be removed from the hash table, and the key and value collected.
-A non-weak hash table (or any other pointer) would prevent the object
-from being collected.
+A key-and-value-weak hash table, also known as a fully-weak or simply
+as a weak hash table, is one whose pointers do not count as GC
+referents: for any key-value pair in the hash table, if the only
+remaining pointer to either the key or the value is in a weak hash
+table, then the pair will be removed from the hash table, and the key
+and value collected. A non-weak hash table (or any other pointer)
+would prevent the object from being collected.
A key-weak hash table is similar to a fully-weak hash table except that
a key-value pair will be removed only if the key remains unmarked
hash table if the value is pointed to by something other than a weak
hash table, even if the key is not.
-A key-value-weak hash table is similar to a fully-weak hash table except
+A key-or-value-weak hash table is similar to a fully-weak hash table except
that a key-value pair will be removed only if the value and the key remain
unmarked outside of weak hash tables. The pair will remain in the
hash table if the value or key are pointed to by something other than a weak
DEFUN ("hash-table-weakness", Fhash_table_weakness, 1, 1, 0, /*
Return the weakness of HASH-TABLE.
-This can be one of `nil', `t', `key' or `value'.
+This can be one of `nil', `key-and-value', `key-or-value', `key' or `value'.
*/
(hash_table))
{
switch (xhash_table (hash_table)->weakness)
{
- case HASH_TABLE_WEAK: return Qt;
- case HASH_TABLE_KEY_WEAK: return Qkey;
- case HASH_TABLE_KEY_VALUE_WEAK: return Qkey_value;
- case HASH_TABLE_VALUE_WEAK: return Qvalue;
- default: return Qnil;
+ case HASH_TABLE_WEAK: return Qkey_and_value;
+ case HASH_TABLE_KEY_WEAK: return Qkey;
+ case HASH_TABLE_KEY_VALUE_WEAK: return Qkey_or_value;
+ case HASH_TABLE_VALUE_WEAK: return Qvalue;
+ default: return Qnil;
}
}
{
switch (xhash_table (hash_table)->weakness)
{
- case HASH_TABLE_WEAK: return Qweak;
- case HASH_TABLE_KEY_WEAK: return Qkey_weak;
- case HASH_TABLE_KEY_VALUE_WEAK: return Qkey_value_weak;
- case HASH_TABLE_VALUE_WEAK: return Qvalue_weak;
- default: return Qnon_weak;
+ case HASH_TABLE_WEAK: return Qweak;
+ case HASH_TABLE_KEY_WEAK: return Qkey_weak;
+ case HASH_TABLE_KEY_VALUE_WEAK: return Qkey_or_value_weak;
+ case HASH_TABLE_VALUE_WEAK: return Qvalue_weak;
+ default: return Qnon_weak;
}
}
defsymbol (&Qhashtable, "hashtable");
defsymbol (&Qweakness, "weakness");
defsymbol (&Qvalue, "value");
- defsymbol (&Qkey_value, "key-value");
+ defsymbol (&Qkey_or_value, "key-or-value");
+ defsymbol (&Qkey_and_value, "key-and-value");
defsymbol (&Qrehash_size, "rehash-size");
defsymbol (&Qrehash_threshold, "rehash-threshold");
defsymbol (&Qweak, "weak"); /* obsolete */
defsymbol (&Qkey_weak, "key-weak"); /* obsolete */
- defsymbol (&Qkey_value_weak, "key-value-weak"); /* obsolete */
+ defsymbol (&Qkey_or_value_weak, "key-or-value-weak"); /* obsolete */
defsymbol (&Qvalue_weak, "value-weak"); /* obsolete */
defsymbol (&Qnon_weak, "non-weak"); /* obsolete */
/* Number of bytes of writable memory we can expect to be able to get */
unsigned int lim_data;
+/* WARNING!
+
+ Some LISP-visible command-line options are set by XEmacs _before_ the
+ data is dumped in building a --pdump XEmacs, but used _after_ it is
+ restored in normal operation. Thus the restored values overwrite the
+ values XEmacs is getting at run-time. Such variables must be saved
+ before loading the dumpfile, and restored afterward.
+
+ This is done immediately before and after pdump_load() in main_1().
+ See that function for the current list of protected variables.
+
+ Note that if the variable is never DEFVAR'd, saving/restoring is not
+ needed.
+*/
+
/* Nonzero means running XEmacs without interactive terminal. */
int noninteractive;
/* Value of Lisp variable `noninteractive'.
Normally same as C variable `noninteractive'
- but nothing terrible happens if user sets this one. */
+ but nothing terrible happens if user sets this one.
+
+ Shadowed from the pdumper by `noninteractive'. */
int noninteractive1;
int debug_paths;
/* Save argv and argc. */
-static char **initial_argv;
+static Extbyte **initial_argv;
static int initial_argc;
static void sort_args (int argc, char **argv);
*/
__except (EXCEPTION_EXECUTE_HANDLER) {}
-
+
/* pretend we didn't handle this, so that the debugger is invoked and/or
the normal GPF box appears. */
/* Code for dealing with Lisp access to the Unix command line */
static Lisp_Object
-make_arg_list_1 (int argc, char **argv, int skip_args)
+make_arg_list_1 (int argc, Extbyte **argv, int skip_args)
{
Lisp_Object result = Qnil;
REGISTER int i;
if (i == 0)
{
/* Do not trust to what crt0 has stuffed into argv[0] */
- char full_exe_path [MAX_PATH];
+ char full_exe_path[MAX_PATH];
+ Lisp_Object fullpath;
+
GetModuleFileName (NULL, full_exe_path, MAX_PATH);
- result = Fcons (build_ext_string (full_exe_path, Qfile_name),
- result);
+ fullpath = build_ext_string (full_exe_path, Qmswindows_tstr);
+ result = Fcons (fullpath, result);
#if defined(HAVE_SHLIB)
- (void)dll_init(full_exe_path);
+ {
+ Extbyte *fullpathext;
+
+ LISP_STRING_TO_EXTERNAL (fullpath, fullpathext,
+ Qdll_filename_encoding);
+ (void) dll_init (fullpathext);
+ }
#endif
}
else
#endif
- result = Fcons (build_ext_string (argv [i], Qfile_name),
+ result = Fcons (build_ext_string (argv[i],
+ Qcommand_argument_encoding),
result);
}
}
}
Lisp_Object
-make_arg_list (int argc, char **argv)
+make_arg_list (int argc, Extbyte **argv)
{
return make_arg_list_1 (argc, argv, 0);
}
/* Calling functions are also responsible for calling free_argc_argv
when they are done with the generated list. */
void
-make_argc_argv (Lisp_Object argv_list, int *argc, char ***argv)
+make_argc_argv (Lisp_Object argv_list, int *argc, Extbyte ***argv)
{
Lisp_Object next;
int n = XINT (Flength (argv_list));
REGISTER int i;
- *argv = (char**) xmalloc ((n+1) * sizeof (char*));
+ *argv = (Extbyte**) xmalloc ((n+1) * sizeof (Extbyte*));
for (i = 0, next = argv_list; i < n; i++, next = XCDR (next))
{
- const char *temp;
+ const Extbyte *temp;
CHECK_STRING (XCAR (next));
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (next),
- C_STRING_ALLOCA, temp,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (XCAR (next), temp, Qcommand_argument_encoding);
(*argv) [i] = xstrdup (temp);
}
(*argv) [n] = 0;
}
void
-free_argc_argv (char **argv)
+free_argc_argv (Extbyte **argv)
{
int elt = 0;
}
static void
-init_cmdargs (int argc, char **argv, int skip_args)
+init_cmdargs (int argc, Extbyte **argv, int skip_args)
{
initial_argv = argv;
initial_argc = argc;
initialized = 0;
purify_flag = 1;
} else {
+
+ /* Keep command options from getting stomped.
+
+ Some LISP-visible options are changed by XEmacs _after_ the data is
+ dumped in building a --pdump XEmacs, but _before_ it is restored in
+ normal operation. Thus the restored values overwrite the values
+ XEmacs is getting at run-time. Such variables must be saved here,
+ and restored after loading the dumped data.
+
+ Boy, this is ugly, but how else to do it?
+ */
+
+ /* noninteractive1 is protected by noninteractive, which is not
+ LISP-visible */
+ int inhibit_early_packages_save = inhibit_early_packages;
+ int inhibit_autoloads_save = inhibit_autoloads;
+ int debug_paths_save = debug_paths;
+#ifdef INHIBIT_SITE_LISP
+ int inhibit_site_lisp_save = inhibit_site_lisp;
+#endif
+#ifdef INHIBIT_SITE_MODULES
+ int inhibit_site_modules_save = inhibit_site_modules;
+#endif
+
initialized = pdump_load (argv[0]);
+
+ /* Now unstomp everything */
+ noninteractive1 = noninteractive;
+ inhibit_early_packages = inhibit_early_packages_save;
+ inhibit_autoloads = inhibit_autoloads_save;
+ debug_paths = debug_paths_save;
+#ifdef INHIBIT_SITE_LISP
+ inhibit_site_lisp = inhibit_site_lisp_save;
+#endif
+#ifdef INHIBIT_SITE_MODULES
+ inhibit_site_modules = inhibit_site_modules_save;
+#endif
+
if (initialized)
run_temacs_argc = -1;
else
init_symbols_once_early ();
/* Declare the basic symbols pertaining to errors,
- So that deferror() can be called. */
+ So that DEFERROR*() can be called. */
init_errors_once_early ();
/* Make sure that opaque pointers can be created. */
/* Now declare all the symbols and define all the Lisp primitives.
The *only* thing that the syms_of_*() functions are allowed to do
- is call one of the following three functions:
+ is call one of the following:
INIT_LRECORD_IMPLEMENTATION()
- defsymbol()
+ defsymbol(), DEFSYMBOL(), or DEFSYMBOL_MULTIWORD_PREDICATE()
defsubr() (i.e. DEFSUBR)
- deferror()
- defkeyword()
+ deferror(), DEFERROR(), or DEFERROR_STANDARD()
+ defkeyword() or DEFKEYWORD()
Order does not matter in these functions.
*/
#endif
#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_BALLOON_HELP
syms_of_balloon_x ();
+#endif
syms_of_device_x ();
#ifdef HAVE_DIALOGS
syms_of_dialog_x ();
#ifdef HAVE_MS_WINDOWS
syms_of_console_mswindows ();
syms_of_device_mswindows ();
+ syms_of_dialog_mswindows ();
syms_of_frame_mswindows ();
syms_of_objects_mswindows ();
syms_of_select_mswindows ();
#ifdef HAVE_SCROLLBARS
syms_of_scrollbar_mswindows ();
#endif
+#endif /* HAVE_MS_WINDOWS */
#ifdef HAVE_MSW_C_DIRED
syms_of_dired_mswindows ();
#endif
#ifdef WIN32_NATIVE
syms_of_ntproc ();
#endif
-#endif /* HAVE_MS_WINDOWS */
+#if defined (WIN32_NATIVE) || defined (CYGWIN)
+ syms_of_win32 ();
+#endif
#ifdef MULE
syms_of_mule ();
#endif
#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_BALLOON_HELP
vars_of_balloon_x ();
+#endif
vars_of_device_x ();
#ifdef HAVE_DIALOGS
vars_of_dialog_x ();
first because many of the functions below
call egetenv() to get environment variables. */
init_lread (); /* Set up the Lisp reader. */
- init_cmdargs (argc, argv, skip_args); /* Create list Vcommand_line_args */
+ init_cmdargs (argc, (Extbyte **) argv,
+ skip_args); /* Create list Vcommand_line_args */
init_buffer (); /* Set default directory of *scratch* buffer */
#ifdef WIN32_NATIVE
#ifdef SUNPRO
init_sunpro (); /* Set up Sunpro usage tracking */
#endif
+#if defined (WIN32_NATIVE) || defined (CYGWIN)
+ init_win32 ();
+#endif
#if defined (HAVE_NATIVE_SOUND) && defined (hp9000s800)
init_hpplay ();
#endif
UNGCPRO;
#ifdef HAVE_MS_WINDOWS
- /* If we displayed a message on the console and we're exiting due to
- init error, then we must allow the user to see this message. */
- if (mswindows_message_outputted && INTP (arg) && XINT (arg) != 0)
- Fmswindows_message_box (build_string ("Initialization error"),
+ /* If we displayed a message on the console, then we must allow the
+ user to see this message. This may be unnecessary, but can't hurt,
+ and we can't necessarily check arg; e.g. xemacs --help kills with
+ argument 0. */
+ if (mswindows_message_outputted)
+ Fmswindows_message_box (build_string ("Messages outputted. XEmacs is exiting."),
Qnil, Qnil);
#endif
char *intoname_ext;
char *symname_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, intoname,
- C_STRING_ALLOCA, intoname_ext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (intoname, intoname_ext, Qfile_name);
if (STRINGP (symname))
- TO_EXTERNAL_FORMAT (LISP_STRING, symname,
- C_STRING_ALLOCA, symname_ext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (symname, symname_ext, Qfile_name);
else
symname_ext = 0;
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",
#endif
Vxemacs_codename = build_string (XEMACS_CODENAME);
+ /* Lisp variables which contain command line flags.
+
+ The portable dumper stomps on these; they must be saved and restored
+ if they are processed before the call to pdump_load() in main_1().
+ */
DEFVAR_BOOL ("noninteractive", &noninteractive1 /*
Non-nil means XEmacs is running without interactive terminal.
*/ );
#if defined(__sgi) && !defined(PDUMP)
/* This is so tremendously ugly I'd puke. But then, it works.
* The target is to override the static constructor from the
- * libiflPNG.so library which is maskerading as libz, and
+ * libiflPNG.so library which is masquerading as libz, and
* cores on us when re-started from the dumped executable.
* This will have to go for 21.1 -- OG.
*/
return value of the function `list-modules'.
It is possible, although unwise, to unload modules using `unload-module'.
-The prefered mechanism for unloading or reloading modules is to quit
+The preferred mechanism for unloading or reloading modules is to quit
XEmacs, and then reload those new or changed modules that are required.
Messages informing you of the progress of the load are displayed unless
As with load-module, this function requires at least the module FILE, and
optionally the module NAME and VERSION to unload. It may not be possible
for the module to be unloaded from memory, as there may be Lisp objects
-refering to variables inside the module code. However, once you have
+referring to variables inside the module code. However, once you have
requested a module to be unloaded, it will be unloaded from memory as
soon as the last reference to symbols within the module is destroyed.
*/
return fs; /* First free slot */
/*
- * We only get here if we havent found a free slot and the module was
+ * We only get here if we haven't found a free slot and the module was
* not previously loaded.
*/
if (modules == (emodules_list *)0)
* Do the actual grunt-work of loading in a module. We first try and
* dlopen() the module. If that fails, we have an error and we bail
* out immediately. If the dlopen() succeeds, we need to check for the
- * existance of certain special symbols.
+ * existence of certain special symbols.
*
* All modules will have complete access to the variables and functions
* defined within XEmacs itself. It is up to the module to declare any
*
* We need to be very careful with how we load modules. If we encounter an
* error along the way, we need to back out completely to the point at
- * which the user started. Since we can be called resursively, we need to
+ * which the user started. Since we can be called recursively, we need to
* take care with marking modules as loaded. When we first start loading
* modules, we set the counter to zero. As we enter the function each time,
- * we incremement the counter, and before we leave we decrement it. When
+ * we increment the counter, and before we leave we decrement it. When
* we get back down to 0, we know we are at the end of the chain and we
* can mark all the modules in the list as loaded.
*
* When we signal an error, we need to be sure to unwind all modules loaded
* thus far (but only for this module chain). It is assumed that if any
* modules in a chain fail, then they all do. This is logical, considering
- * that the only time we recurse is when we have dependant modules. So in
+ * that the only time we recurse is when we have dependent modules. So in
* the error handler we take great care to close off the module chain before
* we call "error" and let the Fmodule_load unwind_protect() function handle
* the cleaning up.
strcat (symname, mname);
modload = (void (*)(void))dll_function (dlhandle, symname);
/*
- * modload is optional. If the module doesnt require other modules it can
+ * modload is optional. If the module doesn't require other modules it can
* be left out.
*/
* Attempt to make a new slot for this module. If this really is the
* first time we are loading this module, the used member will be 0.
* If that is non-zero, we know that we have a previously loaded module
- * of the same name and version, and we dont need to go any further.
+ * of the same name and version, and we don't need to go any further.
*/
mpx = find_make_module (soname, mname, mver, 0);
mp = &modules[mpx];
This string is in the form XX.YY.ppp, where XX is the major version
number, YY is the minor version number, and ppp is the patch level.
-This variable can be used to distinquish between different versions of
+This variable can be used to distinguish between different versions of
the dynamic loading technology used in Emacs, if required. It is not
a given that this value will be the same as the Emacs version number.
*/ );
Each element is a string (directory name) or nil (try default directory).
Note that elements of this list *may not* begin with "~", so you must
-call `expland-file-name' on them before adding them to this list.
+call `expand-file-name' on them before adding them to this list.
Initialized based on EMACSMODULEPATH environment variable, if any, otherwise
to default specified the file `paths.h' when XEmacs was built. If there
directory in which the XEmacs executable resides.
Due to the nature of dynamic modules, the path names should almost always
-refer to architecture-dependant directories. It is unwise to attempt to
-store dynamic modules in a hetrogenous environment. Some environments
+refer to architecture-dependent directories. It is unwise to attempt to
+store dynamic modules in a heterogenous environment. Some environments
are similar enough to each other that XEmacs will be unable to determine
the correctness of a dynamic module, which can have unpredictable results
when a dynamic module is loaded.
* second is the name of the module, and the third is the module version.
* If the module name is NULL, we will always reload the .so. If it is not
* NULL, we check to make sure we haven't loaded it before. If the version
- * is specified, we check to make sure we didnt load the module of the
+ * is specified, we check to make sure we didn't load the module of the
* specified version before. We also use these as checks when we open the
* module to make sure we have the right module.
*/
/*
* Because subrs and symbols added by a dynamic module are not part of
* the make-docfile process, we need a clean way to get the variables
- * and functions documented. Since people dont like the idea of making
+ * and functions documented. Since people don't like the idea of making
* shared modules use different versions of DEFSUBR() and DEFVAR_LISP()
* and friends, we need these two functions to insert the documentation
* into the right place. These functions will be called by the module
/* Evaluator for XEmacs Lisp interpreter.
Copyright (C) 1985-1987, 1992-1994 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
specbind (Qdebug_on_signal, Qnil);
specbind (Qstack_trace_on_signal, Qnil);
- internal_with_output_to_temp_buffer (build_string ("*Backtrace*"),
- backtrace_259,
- Qnil,
- Qnil);
+ if (!noninteractive)
+ internal_with_output_to_temp_buffer (build_string ("*Backtrace*"),
+ backtrace_259,
+ Qnil,
+ Qnil);
+ else /* in batch mode, we want this going to stderr. */
+ backtrace_259 (Qnil);
unbind_to (speccount, Qnil);
*stack_trace_displayed = 1;
}
specbind (Qdebug_on_signal, Qnil);
specbind (Qstack_trace_on_signal, Qnil);
- internal_with_output_to_temp_buffer (build_string ("*Backtrace*"),
- backtrace_259,
- Qnil,
- Qnil);
+ if (!noninteractive)
+ internal_with_output_to_temp_buffer (build_string ("*Backtrace*"),
+ backtrace_259,
+ Qnil,
+ Qnil);
+ else /* in batch mode, we want this going to stderr. */
+ backtrace_259 (Qnil);
unbind_to (speccount, Qnil);
*stack_trace_displayed = 1;
}
(args))
{
/* This function can GC */
- REGISTER Lisp_Object arg, val;
+ REGISTER Lisp_Object val;
LIST_LOOP_2 (arg, args)
{
(args))
{
/* This function can GC */
- REGISTER Lisp_Object arg, val = Qt;
+ REGISTER Lisp_Object val = Qt;
LIST_LOOP_2 (arg, args)
{
(args))
{
/* This function can GC */
- REGISTER Lisp_Object val, clause;
+ REGISTER Lisp_Object val;
LIST_LOOP_2 (clause, args)
{
{
/* This function can GC */
/* Caller must provide a true list in ARGS */
- REGISTER Lisp_Object form, val = Qnil;
+ REGISTER Lisp_Object val = Qnil;
struct gcpro gcpro1;
GCPRO1 (args);
(args))
{
/* This function can GC */
- REGISTER Lisp_Object val, form;
+ REGISTER Lisp_Object val;
struct gcpro gcpro1;
val = Feval (XCAR (args));
(args))
{
/* This function can GC */
- REGISTER Lisp_Object val, form, tail;
+ REGISTER Lisp_Object val;
struct gcpro gcpro1;
Feval (XCAR (args));
GCPRO1 (val);
- LIST_LOOP_3 (form, args, tail)
- Feval (form);
+ {
+ LIST_LOOP_2 (form, args)
+ Feval (form);
+ }
UNGCPRO;
return val;
(args))
{
/* This function can GC */
- Lisp_Object var, tail;
Lisp_Object varlist = XCAR (args);
Lisp_Object body = XCDR (args);
int speccount = specpdl_depth();
(args))
{
/* This function can GC */
- Lisp_Object var, tail;
Lisp_Object varlist = XCAR (args);
Lisp_Object body = XCDR (args);
int speccount = specpdl_depth();
gcpro1.nvars = 0;
idx = 0;
- LIST_LOOP_3 (var, varlist, tail)
- {
- Lisp_Object *value = &temps[idx++];
- if (SYMBOLP (var))
- *value = Qnil;
- else
- {
- Lisp_Object tem;
- CHECK_CONS (var);
- tem = XCDR (var);
- if (NILP (tem))
- *value = Qnil;
- else
- {
- CHECK_CONS (tem);
- *value = Feval (XCAR (tem));
- gcpro1.nvars = idx;
+ {
+ LIST_LOOP_2 (var, varlist)
+ {
+ Lisp_Object *value = &temps[idx++];
+ if (SYMBOLP (var))
+ *value = Qnil;
+ else
+ {
+ Lisp_Object tem;
+ CHECK_CONS (var);
+ tem = XCDR (var);
+ if (NILP (tem))
+ *value = Qnil;
+ else
+ {
+ CHECK_CONS (tem);
+ *value = Feval (XCAR (tem));
+ gcpro1.nvars = idx;
- if (!NILP (XCDR (tem)))
- signal_simple_error
- ("`let' bindings can have only one value-form", var);
- }
- }
- }
+ if (!NILP (XCDR (tem)))
+ signal_simple_error
+ ("`let' bindings can have only one value-form", var);
+ }
+ }
+ }
+ }
idx = 0;
- LIST_LOOP_3 (var, varlist, tail)
- {
- specbind (SYMBOLP (var) ? var : XCAR (var), temps[idx++]);
- }
+ {
+ LIST_LOOP_2 (var, varlist)
+ {
+ specbind (SYMBOLP (var) ? var : XCAR (var), temps[idx++]);
+ }
+ }
UNGCPRO;
Otherwise, the macro is expanded and the expansion is considered
in place of FORM. When a non-macro-call results, it is returned.
-The second optional arg ENVIRONMENT species an environment of macro
+The second optional arg ENVIRONMENT specifies an environment of macro
definitions to shadow the loaded ones for use in file byte-compilation.
*/
- (form, env))
+ (form, environment))
{
/* This function can GC */
/* With cleanups from Hallvard Furuseth. */
{
QUIT;
sym = def;
- tem = Fassq (sym, env);
+ tem = Fassq (sym, environment);
if (NILP (tem))
{
def = XSYMBOL (sym)->function;
}
break;
}
- /* Right now TEM is the result from SYM in ENV,
+ /* Right now TEM is the result from SYM in ENVIRONMENT,
and if TEM is nil then DEF is SYM's function definition. */
if (NILP (tem))
{
- /* SYM is not mentioned in ENV.
+ /* SYM is not mentioned in ENVIRONMENT.
Look at its function definition. */
if (UNBOUNDP (def)
|| !CONSP (def))
condition_case_3 (Lisp_Object bodyform, Lisp_Object var, Lisp_Object handlers)
{
/* This function can GC */
- Lisp_Object handler;
-
EXTERNAL_LIST_LOOP_2 (handler, handlers)
{
if (NILP (handler))
;
else
{
- Lisp_Object condition;
EXTERNAL_LIST_LOOP_2 (condition, conditions)
if (!SYMBOLP (condition))
goto invalid_condition_handler;
/****************** Error functions class 2 ******************/
/* Class 2: Printf-like functions that signal an error.
+ These functions signal an error of a specified type, whose data
+ is a single string, created using the arguments. */
+
+/* dump an error message; called like printf */
+
+DOESNT_RETURN
+type_error (Lisp_Object type, const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ signal_error (type, list1 (obj));
+}
+
+void
+maybe_type_error (Lisp_Object type, Lisp_Object class, Error_behavior errb,
+ const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ maybe_signal_error (type, list1 (obj), class, errb);
+}
+
+Lisp_Object
+continuable_type_error (Lisp_Object type, const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ return Fsignal (type, list1 (obj));
+}
+
+Lisp_Object
+maybe_continuable_type_error (Lisp_Object type, Lisp_Object class,
+ Error_behavior errb, const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return Qnil;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ return maybe_signal_continuable_error (type, list1 (obj), class, errb);
+}
+
+\f
+/****************** Error functions class 3 ******************/
+
+/* Class 3: Signal an error with a string and an associated object.
+ These functions signal an error of a specified type, whose data
+ is two objects, a string and a related Lisp object (usually the object
+ where the error is occurring). */
+
+DOESNT_RETURN
+signal_type_error (Lisp_Object type, const char *reason, Lisp_Object frob)
+{
+ if (UNBOUNDP (frob))
+ signal_error (type, list1 (build_translated_string (reason)));
+ else
+ signal_error (type, list2 (build_translated_string (reason), frob));
+}
+
+void
+maybe_signal_type_error (Lisp_Object type, const char *reason,
+ Lisp_Object frob, Lisp_Object class,
+ Error_behavior errb)
+{
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return;
+ maybe_signal_error (type, list2 (build_translated_string (reason), frob),
+ class, errb);
+}
+
+Lisp_Object
+signal_type_continuable_error (Lisp_Object type, const char *reason,
+ Lisp_Object frob)
+{
+ return Fsignal (type, list2 (build_translated_string (reason), frob));
+}
+
+Lisp_Object
+maybe_signal_type_continuable_error (Lisp_Object type, const char *reason,
+ Lisp_Object frob, Lisp_Object class,
+ Error_behavior errb)
+{
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return Qnil;
+ return maybe_signal_continuable_error
+ (type, list2 (build_translated_string (reason),
+ frob), class, errb);
+}
+
+\f
+/****************** Error functions class 4 ******************/
+
+/* Class 4: Printf-like functions that signal an error.
+ These functions signal an error of a specified type, whose data
+ is a two objects, a string (created using the arguments) and a
+ Lisp object.
+*/
+
+DOESNT_RETURN
+type_error_with_frob (Lisp_Object type, Lisp_Object frob, const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ signal_error (type, list2 (obj, frob));
+}
+
+void
+maybe_type_error_with_frob (Lisp_Object type, Lisp_Object frob,
+ Lisp_Object class, Error_behavior errb,
+ const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ maybe_signal_error (type, list2 (obj, frob), class, errb);
+}
+
+Lisp_Object
+continuable_type_error_with_frob (Lisp_Object type, Lisp_Object frob,
+ const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ return Fsignal (type, list2 (obj, frob));
+}
+
+Lisp_Object
+maybe_continuable_type_error_with_frob (Lisp_Object type, Lisp_Object frob,
+ Lisp_Object class, Error_behavior errb,
+ const char *fmt, ...)
+{
+ Lisp_Object obj;
+ va_list args;
+
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return Qnil;
+
+ va_start (args, fmt);
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ args);
+ va_end (args);
+
+ /* Fsignal GC-protects its args */
+ return maybe_signal_continuable_error (type, list2 (obj, frob),
+ class, errb);
+}
+
+\f
+/****************** Error functions class 5 ******************/
+
+/* Class 5: Signal an error with a string and two associated objects.
+ These functions signal an error of a specified type, whose data
+ is three objects, a string and two related Lisp objects. */
+
+DOESNT_RETURN
+signal_type_error_2 (Lisp_Object type, const char *reason,
+ Lisp_Object frob0, Lisp_Object frob1)
+{
+ signal_error (type, list3 (build_translated_string (reason), frob0,
+ frob1));
+}
+
+void
+maybe_signal_type_error_2 (Lisp_Object type, const char *reason,
+ Lisp_Object frob0, Lisp_Object frob1,
+ Lisp_Object class, Error_behavior errb)
+{
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return;
+ maybe_signal_error (type, list3 (build_translated_string (reason), frob0,
+ frob1), class, errb);
+}
+
+
+Lisp_Object
+signal_type_continuable_error_2 (Lisp_Object type, const char *reason,
+ Lisp_Object frob0, Lisp_Object frob1)
+{
+ return Fsignal (type, list3 (build_translated_string (reason), frob0,
+ frob1));
+}
+
+Lisp_Object
+maybe_signal_type_continuable_error_2 (Lisp_Object type, const char *reason,
+ Lisp_Object frob0, Lisp_Object frob1,
+ Lisp_Object class, Error_behavior errb)
+{
+ /* Optimization: */
+ if (ERRB_EQ (errb, ERROR_ME_NOT))
+ return Qnil;
+ return maybe_signal_continuable_error
+ (type, list3 (build_translated_string (reason), frob0,
+ frob1),
+ class, errb);
+}
+
+\f
+/****************** Simple error functions class 2 ******************/
+
+/* Simple class 2: Printf-like functions that signal an error.
These functions signal an error of type Qerror, whose data
is a single string, created using the arguments. */
}
\f
-/****************** Error functions class 3 ******************/
+/****************** Simple error functions class 3 ******************/
-/* Class 3: Signal an error with a string and an associated object.
+/* Simple class 3: Signal an error with a string and an associated object.
These functions signal an error of type Qerror, whose data
is two objects, a string and a related Lisp object (usually the object
where the error is occurring). */
}
\f
-/****************** Error functions class 4 ******************/
+/****************** Simple error functions class 4 ******************/
-/* Class 4: Printf-like functions that signal an error.
+/* Simple class 4: Printf-like functions that signal an error.
These functions signal an error of type Qerror, whose data
is a two objects, a string (created using the arguments) and a
Lisp object.
}
\f
-/****************** Error functions class 5 ******************/
+/****************** Simple error functions class 5 ******************/
-/* Class 5: Signal an error with a string and two associated objects.
+/* Simple class 5: Signal an error with a string and two associated objects.
These functions signal an error of type Qerror, whose data
is three objects, a string and two related Lisp objects. */
{
signal_error (Qcircular_property_list, list1 (list));
}
+
+DOESNT_RETURN
+syntax_error (const char *reason, Lisp_Object frob)
+{
+ signal_type_error (Qsyntax_error, reason, frob);
+}
+
+DOESNT_RETURN
+syntax_error_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+{
+ signal_type_error_2 (Qsyntax_error, reason, frob1, frob2);
+}
+
+DOESNT_RETURN
+invalid_argument (const char *reason, Lisp_Object frob)
+{
+ signal_type_error (Qinvalid_argument, reason, frob);
+}
+
+DOESNT_RETURN
+invalid_argument_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+{
+ signal_type_error_2 (Qinvalid_argument, reason, frob1, frob2);
+}
+
+DOESNT_RETURN
+invalid_operation (const char *reason, Lisp_Object frob)
+{
+ signal_type_error (Qinvalid_operation, reason, frob);
+}
+
+DOESNT_RETURN
+invalid_operation_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+{
+ signal_type_error_2 (Qinvalid_operation, reason, frob1, frob2);
+}
+
+DOESNT_RETURN
+invalid_change (const char *reason, Lisp_Object frob)
+{
+ signal_type_error (Qinvalid_change, reason, frob);
+}
+
+DOESNT_RETURN
+invalid_change_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+{
+ signal_type_error_2 (Qinvalid_change, reason, frob1, frob2);
+}
+
\f
/************************************************************************/
/* User commands */
gcpro1.nvars = 0;
{
- REGISTER Lisp_Object arg;
LIST_LOOP_2 (arg, original_args)
{
*p++ = Feval (arg);
gcpro1.nvars = 0;
{
- REGISTER Lisp_Object arg;
LIST_LOOP_2 (arg, original_args)
{
*p++ = Feval (arg);
gcpro1.nvars = 0;
{
- REGISTER Lisp_Object arg;
LIST_LOOP_2 (arg, original_args)
{
*p++ = Feval (arg);
gcpro1.nvars = 0;
{
- REGISTER Lisp_Object arg;
LIST_LOOP_2 (arg, original_args)
{
*p++ = Feval (arg);
}
else if (EQ (funcar, Qautoload))
{
+ struct gcpro gcpro1;
+
+ GCPRO1 (function);
do_autoload (function, orig_function);
+ UNGCPRO;
+ function = orig_function;
goto retry;
}
else if (EQ (funcar, Qlambda))
else
{
invalid_function:
- return signal_invalid_function_error (function);
+ return signal_invalid_function_error (orig_function);
}
{
int argcount = 0;
- Lisp_Object arg;
EXTERNAL_LIST_LOOP_2 (arg, arglist)
{
funcall_lambda (Lisp_Object fun, int nargs, Lisp_Object args[])
{
/* This function can GC */
- Lisp_Object symbol, arglist, body, tail;
+ Lisp_Object arglist, body, tail;
int speccount = specpdl_depth();
REGISTER int i = 0;
{
int optional = 0, rest = 0;
- EXTERNAL_LIST_LOOP_3 (symbol, arglist, tail)
+ EXTERNAL_LIST_LOOP_2 (symbol, arglist)
{
if (!SYMBOLP (symbol))
goto invalid_function;
specpdl = xnew_array (struct specbinding, specpdl_size);
/* XEmacs change: increase these values. */
max_specpdl_size = 3000;
- max_lisp_eval_depth = 500;
+ max_lisp_eval_depth = 1000;
#ifdef DEFEND_AGAINST_THROW_RECURSION
throw_level = 0;
#endif
int x_allow_sendevents;
#ifdef DEBUG_XEMACS
-int x_debug_events;
+int debug_x_events;
#endif
static int process_events_occurred;
#ifdef HAVE_XIM
int len;
- char buffer[64];
+ /* Some implementations of XmbLookupString don't return
+ XBufferOverflow correctly, so increase the size of the xim input
+ buffer from 64 to the more reasonable size 513, as Emacs has done.
+ From Kenichi Handa. */
+ char buffer[513];
char *bufptr = buffer;
int bufsiz = sizeof (buffer);
Status status;
#endif /* HAVE_XIM */
#ifdef DEBUG_XEMACS
- if (x_debug_events > 0)
+ if (debug_x_events > 0)
{
stderr_out (" status=");
#define print_status_when(S) if (status == S) stderr_out (#S)
if (*state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
if (*state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
if (*state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
+ {
+ int numero_de_botao = -1;
+
+ if (!key_event_p)
+ numero_de_botao = x_event->xbutton.button;
+
+ /* the button gets noted either in the button or the modifiers
+ field, but not both. */
+ if (numero_de_botao != 1 && (*state & Button1Mask))
+ modifiers |= XEMACS_MOD_BUTTON1;
+ if (numero_de_botao != 2 && (*state & Button2Mask))
+ modifiers |= XEMACS_MOD_BUTTON2;
+ if (numero_de_botao != 3 && (*state & Button3Mask))
+ modifiers |= XEMACS_MOD_BUTTON3;
+ if (numero_de_botao != 4 && (*state & Button4Mask))
+ modifiers |= XEMACS_MOD_BUTTON4;
+ if (numero_de_botao != 5 && (*state & Button5Mask))
+ modifiers |= XEMACS_MOD_BUTTON5;
+ }
/* Ignore the Caps_Lock key if:
- any other modifiers are down, so that Caps_Lock doesn't
if (ev->state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
if (ev->state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
if (ev->state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
+ if (ev->state & Button1Mask) modifiers |= XEMACS_MOD_BUTTON1;
+ if (ev->state & Button2Mask) modifiers |= XEMACS_MOD_BUTTON2;
+ if (ev->state & Button3Mask) modifiers |= XEMACS_MOD_BUTTON3;
+ if (ev->state & Button4Mask) modifiers |= XEMACS_MOD_BUTTON4;
+ if (ev->state & Button5Mask) modifiers |= XEMACS_MOD_BUTTON5;
/* Currently ignores Shift_Lock but probably shouldn't
(but it definitely should ignore Caps_Lock). */
emacs_event->event.motion.modifiers = modifiers;
if (state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
if (state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
if (state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
+ if (state & Button1Mask) modifiers |= XEMACS_MOD_BUTTON1;
+ if (state & Button2Mask) modifiers |= XEMACS_MOD_BUTTON2;
+ if (state & Button3Mask) modifiers |= XEMACS_MOD_BUTTON3;
+ if (state & Button4Mask) modifiers |= XEMACS_MOD_BUTTON4;
+ if (state & Button5Mask) modifiers |= XEMACS_MOD_BUTTON5;
if (state & Button5Mask) button = Button5;
if (state & Button4Mask) button = Button4;
do this in their selection callback, but we don't want that since
a button having focus is legitimate. An edit field having focus
is mandatory. Weirdly you get a FocusOut event when you click in
- a widget-glyph but you don't get a correspondng FocusIn when you
+ a widget-glyph but you don't get a corresponding FocusIn when you
click in the frame. Why is this? */
if (in_p
#if XtSpecificationRelease > 5
break;
case Expose:
- if (x_debug_events > 1)
+ if (debug_x_events > 1)
{
XExposeEvent *ev = &event->xexpose;
describe_event_window (ev->window, ev->display);
break;
case GraphicsExpose:
- if (x_debug_events > 1)
+ if (debug_x_events > 1)
{
XGraphicsExposeEvent *ev = &event->xgraphicsexpose;
describe_event_window (ev->drawable, ev->display);
case EnterNotify:
case LeaveNotify:
- if (x_debug_events > 1)
+ if (debug_x_events > 1)
{
XCrossingEvent *ev = &event->xcrossing;
describe_event_window (ev->window, ev->display);
break;
case ConfigureNotify:
- if (x_debug_events > 1)
+ if (debug_x_events > 1)
{
XConfigureEvent *ev = &event->xconfigure;
describe_event_window (ev->window, ev->display);
break;
case VisibilityNotify:
- if (x_debug_events > 1)
+ if (debug_x_events > 1)
{
XVisibilityEvent *ev = &event->xvisibility;
describe_event_window (ev->window, ev->display);
Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
#ifdef DEBUG_XEMACS
- if (x_debug_events > 0)
+ if (debug_x_events > 0)
{
describe_event (event);
}
return 0;
}
+static int
+emacs_Xt_current_event_timestamp (struct console *c)
+{
+ /* semi-yuck. */
+ Lisp_Object devs = CONSOLE_DEVICE_LIST (c);
+
+ if (NILP (devs))
+ return 0;
+ else
+ {
+ struct device *d = XDEVICE (XCAR (devs));
+ return DEVICE_X_LAST_SERVER_TIMESTAMP (d);
+ }
+}
+
\f
/************************************************************************/
/* replacement for standard string-to-pixel converter */
if ((d = get_device_from_display_1(dpy))) {
visual = DEVICE_X_VISUAL(d);
if (colormap != DEVICE_X_COLORMAP(d)) {
- XtAppWarningMsg(the_app_con, "wierdColormap", "cvtStringToPixel",
+ XtAppWarningMsg(the_app_con, "weirdColormap", "cvtStringToPixel",
"XtToolkitWarning",
- "The colormap passed to cvtStringToPixel doesn't match the one registerd to the device.\n",
+ "The colormap passed to cvtStringToPixel doesn't match the one registered to the device.\n",
NULL, 0);
status = XAllocNamedColor(dpy, colormap, (char*)str, &screenColor, &exactColor);
} else {
Xt_event_stream->quit_p_cb = emacs_Xt_quit_p;
Xt_event_stream->create_stream_pair_cb = emacs_Xt_create_stream_pair;
Xt_event_stream->delete_stream_pair_cb = emacs_Xt_delete_stream_pair;
+ Xt_event_stream->current_event_timestamp_cb =
+ emacs_Xt_current_event_timestamp;
the_Xt_timeout_blocktype = Blocktype_new (struct Xt_timeout_blocktype);
x_allow_sendevents = 0;
#ifdef DEBUG_XEMACS
- DEFVAR_INT ("x-debug-events", &x_debug_events /*
+ DEFVAR_INT ("debug-x-events", &debug_x_events /*
If non-zero, display debug information about X events that XEmacs sees.
Information is displayed on stderr. Currently defined values are:
1 == non-verbose output
2 == verbose output
*/ );
- x_debug_events = 0;
+ debug_x_events = 0;
#endif
}
Xt_app_con = XtCreateApplicationContext ();
XtAppSetFallbackResources (Xt_app_con, (String *) x_fallback_resources);
- /* In xselect.c */
+ /* In select-x.c */
x_selection_timeout = (XtAppGetSelectionTimeout (Xt_app_con) / 1000);
XSetErrorHandler (x_error_handler);
XSetIOErrorHandler (x_IO_error_handler);
static Lisp_Object mswindows_find_console (HWND hwnd);
static Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods,
int extendedp);
-static int mswindows_modifier_state (BYTE* keymap, int has_AltGr);
+static int mswindows_modifier_state (BYTE* keymap, DWORD fwKeys,
+ int has_AltGr);
static void mswindows_set_chord_timer (HWND hwnd);
static int mswindows_button2_near_enough (POINTS p1, POINTS p2);
static int mswindows_current_layout_has_AltGr (void);
int mswindows_mouse_button_tolerance;
#ifdef DEBUG_XEMACS
-int mswindows_debug_events;
+int debug_mswindows_events;
#endif
/* This is the event signaled by the event pump.
/* Count of wound timers */
static int mswindows_pending_timers_count;
+
+static DWORD mswindows_last_mouse_button_state;
\f
/************************************************************************/
/* Pipe instream - reads process output */
SetEvent (s->hev_thread);
/* Give it a chance to run -- this dramatically improves performance
of things like crypt. */
- (void) SwitchToThread ();
+ if (xSwitchToThread) /* not in Win9x or NT 3.51 */
+ (void) xSwitchToThread ();
return size;
}
static void
mswindows_enqueue_mouse_button_event (HWND hwnd, UINT msg, POINTS where,
- DWORD when)
+ int mods, DWORD when)
{
int downp = (msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN ||
msg == WM_RBUTTONDOWN);
((msg==WM_RBUTTONDOWN || msg==WM_RBUTTONUP) ? 3 : 2);
event->event.button.x = where.x;
event->event.button.y = where.y;
- event->event.button.modifiers = mswindows_modifier_state (NULL, 0);
+ event->event.button.modifiers = mswindows_modifier_state (NULL, mods, 0);
if (downp)
{
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
+ char class_name_buf [sizeof (XEMACS_CLASS) + 2] = "";
+
+ if (mswindows_is_dialog_msg (&msg))
+ {
+ mswindows_unmodalize_signal_maybe ();
+ continue;
+ }
+
/* We have to translate messages that are not sent to an XEmacs
frame. This is so that key presses work ok in things like
edit fields. However, we *musn't* translate message for XEmacs
/* GetClassName will truncate a longer class name. By adding one
extra character, we are forcing textual comparison to fail
if the name is longer than XEMACS_CLASS */
- char class_name_buf [sizeof (XEMACS_CLASS) + 2] = "";
+
GetClassName (msg.hwnd, class_name_buf, sizeof (class_name_buf) - 1);
if (stricmp (class_name_buf, XEMACS_CLASS) != 0)
{
else if (msg.message == WM_PAINT)
{
struct mswindows_frame* msframe;
-
+
/* hdc will be NULL unless this is a subwindow - in which case we
shouldn't have received a paint message for it here. */
assert (msg.wParam == 0);
{
mswindows_drain_windows_queue ();
}
- else
+ else
{
#ifdef HAVE_TTY
/* Look for a TTY event */
struct console *c = tty_find_console_from_fd (i);
Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
Lisp_Event* event = XEVENT (emacs_event);
-
+
assert (c);
if (read_event_from_tty_or_stream_desc (event, c, i))
{
{
Lisp_Process *p =
get_process_from_usid (FD_TO_USID(i));
-
+
mswindows_enqueue_process_event (p);
}
else
}
/*
- * Returns 1 if a key is a real modifier or special key, which
+ * Returns 1 if a key is a real modifier or special key, which
* is better handled by DefWindowProc
*/
static int
/* asyncstate[2] & 0x1 ? 1 : 0); */
}
-#endif /* DEBUG_XEMACS */
+#endif /* DEBUG_XEMACS */
/*
struct frame *frame;
struct mswindows_frame* msframe;
+ /* Not perfect but avoids crashes. There is potential for wierd
+ behavior here. */
+ if (gc_in_progress)
+ goto defproc;
+
assert (!GetWindowLong (hwnd, GWL_USERDATA));
switch (message_)
{
int should_set_keymap = 0;
#ifdef DEBUG_XEMACS
- if (mswindows_debug_events)
+ if (debug_mswindows_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 */
+ }
+#endif /* DEBUG_XEMACS */
mswindows_handle_sticky_modifiers (wParam, lParam, 0, 1);
if (wParam == VK_CONTROL)
SetKeyboardState (keymap);
}
-
+
if (key_needs_default_processing_p (wParam))
goto defproc;
else
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.
+ * should produce alternative characters when combined with another key.
* eg on a German keyboard pressing AltGr+q should produce '@'.
* AltGr generates exactly the same keystrokes as LCtrl+RAlt. But if
* TranslateMessage() is called with *any* combination of Ctrl+Alt down,
int sticky_changed;
#ifdef DEBUG_XEMACS
- if (mswindows_debug_events)
+ if (debug_mswindows_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 */
+ }
+#endif /* DEBUG_XEMACS */
GetKeyboardState (keymap_orig);
frame = XFRAME (mswindows_find_frame (hwnd));
else
memcpy (keymap_sticky, keymap_orig, 256);
- mods = mswindows_modifier_state (keymap_sticky, has_AltGr);
+ mods = mswindows_modifier_state (keymap_sticky, (DWORD) -1, has_AltGr);
/* Handle non-printables */
if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods,
MSG msg, tranmsg;
int potential_accelerator = 0;
int got_accelerator = 0;
-
+
msg.hwnd = hwnd;
msg.message = message_;
msg.wParam = wParam;
/* 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);
if one wants to exercise fingers playing chords on the mouse,
he is allowed to do that! */
mswindows_enqueue_mouse_button_event (hwnd, message_,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_MBUTTON,
+ GetMessageTime());
break;
case WM_LBUTTONUP:
msframe->button2_is_down = 0;
msframe->ignore_next_rbutton_up = 1;
mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam
+ &~ (MK_LBUTTON | MK_MBUTTON
+ | MK_RBUTTON),
+ GetMessageTime());
}
else
{
{
msframe->button2_need_rbutton = 0;
mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_LBUTTON,
+ GetMessageTime());
}
mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_LBUTTON,
+ GetMessageTime());
}
break;
msframe->button2_is_down = 0;
msframe->ignore_next_lbutton_up = 1;
mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam
+ &~ (MK_LBUTTON | MK_MBUTTON
+ | MK_RBUTTON),
+ GetMessageTime());
}
else
{
{
msframe->button2_need_lbutton = 0;
mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_RBUTTON,
+ GetMessageTime());
}
mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_RBUTTON,
+ GetMessageTime());
}
break;
KillTimer (hwnd, BUTTON_2_TIMER_ID);
msframe->button2_need_lbutton = 0;
msframe->button2_need_rbutton = 0;
- if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam)))
+ if (mswindows_button2_near_enough (msframe->last_click_point,
+ MAKEPOINTS (lParam)))
{
mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam
+ &~ (MK_LBUTTON | MK_MBUTTON
+ | MK_RBUTTON),
+ GetMessageTime());
msframe->button2_is_down = 1;
}
else
{
mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
+ msframe->last_click_point,
+ msframe->last_click_mods
+ &~ MK_RBUTTON,
+ msframe->last_click_time);
mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_LBUTTON,
+ GetMessageTime());
}
}
else
mswindows_set_chord_timer (hwnd);
msframe->button2_need_rbutton = 1;
msframe->last_click_point = MAKEPOINTS (lParam);
+ msframe->last_click_mods = wParam;
}
msframe->last_click_time = GetMessageTime();
break;
KillTimer (hwnd, BUTTON_2_TIMER_ID);
msframe->button2_need_lbutton = 0;
msframe->button2_need_rbutton = 0;
- if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam)))
+ if (mswindows_button2_near_enough (msframe->last_click_point,
+ MAKEPOINTS (lParam)))
{
mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam
+ &~ (MK_LBUTTON | MK_MBUTTON
+ | MK_RBUTTON),
+ GetMessageTime());
msframe->button2_is_down = 1;
}
else
{
mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
+ msframe->last_click_point,
+ msframe->last_click_mods
+ &~ MK_LBUTTON,
+ msframe->last_click_time);
mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ MAKEPOINTS (lParam),
+ wParam &~ MK_RBUTTON,
+ GetMessageTime());
}
}
else
mswindows_set_chord_timer (hwnd);
msframe->button2_need_lbutton = 1;
msframe->last_click_point = MAKEPOINTS (lParam);
+ msframe->last_click_mods = wParam;
}
msframe->last_click_time = GetMessageTime();
break;
{
msframe->button2_need_lbutton = 0;
mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
+ msframe->last_click_point,
+ msframe->last_click_mods
+ &~ MK_RBUTTON,
+ msframe->last_click_time);
}
else if (msframe->button2_need_rbutton)
{
msframe->button2_need_rbutton = 0;
mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
+ msframe->last_click_point,
+ msframe->last_click_mods
+ &~ MK_LBUTTON,
+ msframe->last_click_time);
}
}
else
event->event_type = pointer_motion_event;
event->event.motion.x = MAKEPOINTS(lParam).x;
event->event.motion.y = MAKEPOINTS(lParam).y;
- event->event.motion.modifiers = mswindows_modifier_state (NULL, 0);
+ event->event.motion.modifiers =
+ mswindows_modifier_state (NULL, wParam, 0);
mswindows_enqueue_dispatch_event (emacs_event);
}
{
/* I think this is safe since the text will only go away
when the toolbar does...*/
- TO_EXTERNAL_FORMAT (LISP_STRING, btext,
- C_STRING_ALLOCA, tttext->lpszText,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (btext, tttext->lpszText, Qnative);
}
#endif
}
shouldn't have received a paint message for it here. */
assert (wParam == 0);
- /* Can't queue a magic event because windows goes modal and sends paint
+ /* Can't queue a magic event because windows goes modal and sends paint
messages directly to the windows procedure when doing solid drags
and the message queue doesn't get processed. */
mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd)));
event->channel = mswindows_find_frame(hwnd);
event->timestamp = GetMessageTime();
event->event.misc.button = 1; /* #### Should try harder */
- event->event.misc.modifiers = mswindows_modifier_state (NULL, 0);
+ event->event.misc.modifiers = mswindows_modifier_state (NULL,
+ (DWORD) -1, 0);
event->event.misc.x = point.x;
event->event.misc.y = point.y;
event->event.misc.function = Qdragdrop_drop_dispatch;
if (CoCreateInstance (&CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER, &IID_IShellLink, &psl) == S_OK)
- {
+ {
IPersistFile* ppf;
if (psl->lpVtbl->QueryInterface (psl, &IID_IPersistFile,
time when a key typed at autorepeat rate of 30 cps! */
static HKL last_hkl = 0;
static int last_hkl_has_AltGr;
+ HKL current_hkl = (HKL) -1;
- HKL current_hkl = GetKeyboardLayout (0);
+ if (xGetKeyboardLayout) /* not in NT 3.5 */
+ current_hkl = xGetKeyboardLayout (0);
if (current_hkl != last_hkl)
{
TCHAR c;
/* Returns the state of the modifier keys in the format expected by the
* Lisp_Event key_data, button_data and motion_data modifiers member */
static int
-mswindows_modifier_state (BYTE* keymap, int has_AltGr)
+mswindows_modifier_state (BYTE* keymap, DWORD fwKeys, int has_AltGr)
{
int mods = 0;
+ int keys_is_real = 0;
BYTE keymap2[256];
+ if (fwKeys == (DWORD) -1)
+ fwKeys = mswindows_last_mouse_button_state;
+ else
+ {
+ keys_is_real = 1;
+ mswindows_last_mouse_button_state = fwKeys;
+ }
+
if (keymap == NULL)
{
keymap = keymap2;
has_AltGr = mswindows_current_layout_has_AltGr ();
}
+ /* #### should look at fwKeys for MK_CONTROL. I don't understand how
+ AltGr works. */
if (has_AltGr && (keymap [VK_LCONTROL] & 0x80) && (keymap [VK_RMENU] & 0x80))
{
mods |= (keymap [VK_LMENU] & 0x80) ? XEMACS_MOD_META : 0;
mods |= (keymap [VK_CONTROL] & 0x80) ? XEMACS_MOD_CONTROL : 0;
}
- mods |= (keymap [VK_SHIFT] & 0x80) ? XEMACS_MOD_SHIFT : 0;
+ mods |= (keys_is_real ? fwKeys & MK_SHIFT : (keymap [VK_SHIFT] & 0x80))
+ ? XEMACS_MOD_SHIFT : 0;
+ mods |= fwKeys & MK_LBUTTON ? XEMACS_MOD_BUTTON1 : 0;
+ mods |= fwKeys & MK_MBUTTON ? XEMACS_MOD_BUTTON2 : 0;
+ mods |= fwKeys & MK_RBUTTON ? XEMACS_MOD_BUTTON3 : 0;
return mods;
}
* Translate a mswindows virtual key to a keysym.
* Only returns non-Qnil for keys that don't generate WM_CHAR messages
* or whose ASCII codes (like space) xemacs doesn't like.
- * Virtual key values are defined in winresrc.h
*/
Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods,
int extendedp)
{
switch (mswindows_key)
{
+ case VK_CANCEL: return KEYSYM ("pause");
case VK_RETURN: return KEYSYM ("kp-enter");
case VK_PRIOR: return KEYSYM ("prior");
case VK_NEXT: return KEYSYM ("next");
case VK_DOWN: return KEYSYM ("down");
case VK_INSERT: return KEYSYM ("insert");
case VK_DELETE: return QKdelete;
+#if 0 /* FSF Emacs allows these to return configurable syms/mods */
+ case VK_LWIN return KEYSYM ("");
+ case VK_RWIN return KEYSYM ("");
+#endif
+ case VK_APPS: return KEYSYM ("menu");
}
}
else
case '\n': return QKlinefeed;
case VK_CLEAR: return KEYSYM ("clear");
case VK_RETURN: return QKreturn;
+ case VK_PAUSE: return KEYSYM ("pause");
case VK_ESCAPE: return QKescape;
case VK_SPACE: return QKspace;
case VK_PRIOR: return KEYSYM ("kp-prior");
case VK_INSERT: return KEYSYM ("kp-insert");
case VK_DELETE: return KEYSYM ("kp-delete");
case VK_HELP: return KEYSYM ("help");
-#if 0 /* FSF Emacs allows these to return configurable syms/mods */
- case VK_LWIN return KEYSYM ("");
- case VK_RWIN return KEYSYM ("");
-#endif
- case VK_APPS: return KEYSYM ("menu");
case VK_NUMPAD0: return KEYSYM ("kp-0");
case VK_NUMPAD1: return KEYSYM ("kp-1");
case VK_NUMPAD2: return KEYSYM ("kp-2");
{
emacs_event = mswindows_cancel_dispatch_event (&match_against);
assert (!NILP (emacs_event));
-
+
if (XEVENT(emacs_event)->event.key.modifiers & XEMACS_MOD_SHIFT)
critical_p = 1;
: HANDLE_TO_USID (get_ntpipe_input_stream_waitable (XLSTREAM (instream))));
}
+static int
+emacs_mswindows_current_event_timestamp (struct console *c)
+{
+ return GetTickCount ();
+}
+
#ifndef HAVE_X_WINDOWS
/* This is called from GC when a process object is about to be freed.
If we've still got pointers to it in this file, we're gonna lose hard.
mswindows_event_stream->create_stream_pair_cb = emacs_mswindows_create_stream_pair;
mswindows_event_stream->delete_stream_pair_cb = emacs_mswindows_delete_stream_pair;
#endif
+ mswindows_event_stream->current_event_timestamp_cb =
+ emacs_mswindows_current_event_timestamp;
}
void
#ifdef DEBUG_XEMACS
- DEFVAR_INT ("mswindows-debug-events", &mswindows_debug_events /*
+ DEFVAR_INT ("debug-mswindows-events", &debug_mswindows_events /*
If non-zero, display debug information about Windows events that XEmacs sees.
Information is displayed in a console window. Currently defined values are:
#### Unfortunately, not yet implemented.
*/ );
- mswindows_debug_events = 0;
+ debug_mswindows_events = 0;
#endif
DEFVAR_BOOL ("mswindows-alt-by-itself-activates-menu",
event_stream->quit_p_cb ();
}
+static int
+event_stream_current_event_timestamp (struct console *c)
+{
+ if (event_stream && event_stream->current_event_timestamp_cb)
+ return event_stream->current_event_timestamp_cb (c);
+ else
+ return 0;
+}
\f
/**********************************************************************/
XEVENT (event)->event.key.keysym = traduit;
did_translate = 1;
}
+ else if (CHARP (traduit))
+ {
+ Lisp_Event ev2;
+
+ zero_event (&ev2);
+ character_to_event (XCHAR (traduit), &ev2,
+ XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1, 1);
+ XEVENT (event)->event.key.keysym = ev2.event.key.keysym;
+ XEVENT (event)->event.key.modifiers |= ev2.event.key.modifiers;
+ did_translate = 1;
+ }
}
#ifdef DEBUG_XEMACS
-- any events in `unread-command-events' or `unread-command-event'; else
-- the next event in the currently executing keyboard macro, if any; else
--- an event queued by `enqueue-eval-event', if any; else
+-- an event queued by `enqueue-eval-event', if any, or any similar event
+ queued internally, such as a misc-user event. (For example, when an item
+ is selected from a menu or from a `question'-type dialog box, the item's
+ callback is not immediately executed, but instead a misc-user event
+ is generated and placed onto this queue; when it is dispatched, the
+ callback is executed.) Else
-- the next available event from the window system or terminal driver.
In the last case, this function will block until an event is available.
widgets. Normally these are redisplayed through a native window-system
event encoded as magic event, rather than by the redisplay code. This
function does not call redisplay or do any of the other things that
-`next-event' does.
+`next-event' does.
*/
())
{
return result;
}
-/* This handy little function is used by xselect.c and energize.c to
- wait for replies from processes that aren't really processes (that is,
- the X server and the Energize server).
- */
+/* This handy little function is used by select-x.c to wait for replies
+ from processes that aren't really processes (e.g. the X server) */
void
wait_delaying_user_input (int (*predicate) (void *arg), void *predicate_arg)
{
}
\f
+
+DEFUN ("current-event-timestamp", Fcurrent_event_timestamp, 0, 1, 0, /*
+Return the current event timestamp of the window system associated with CONSOLE.
+CONSOLE defaults to the selected console if omitted.
+*/
+ (console))
+{
+ struct console *c = decode_console (console);
+ int tiempo = event_stream_current_event_timestamp (c);
+
+ /* This junk is so that timestamps don't get to be negative, but contain
+ as many bits as this particular emacs will allow.
+ */
+ return make_int (((1L << (VALBITS - 1)) - 1) & tiempo);
+}
+
+\f
/************************************************************************/
/* initialization */
/************************************************************************/
defsymbol (&Qdisabled, "disabled");
defsymbol (&Qcommand_event_p, "command-event-p");
- deferror (&Qundefined_keystroke_sequence, "undefined-keystroke-sequence",
- "Undefined keystroke sequence", Qerror);
+ DEFERROR_STANDARD (Qundefined_keystroke_sequence, Qinvalid_argument);
DEFSUBR (Frecent_keys);
DEFSUBR (Frecent_keys_ring_size);
DEFSUBR (Fthis_command_keys);
DEFSUBR (Freset_this_command_lengths);
DEFSUBR (Fopen_dribble_file);
+ DEFSUBR (Fcurrent_event_timestamp);
defsymbol (&Qpre_command_hook, "pre-command-hook");
defsymbol (&Qpost_command_hook, "post-command-hook");
This occurs whenever it is going to block, waiting for an event.
This generally happens as a result of a call to `next-event',
`next-command-event', `sit-for', `sleep-for', `accept-process-output',
-`x-get-selection', or various Energize-specific commands.
+or `x-get-selection'.
Errors running the hook are caught and ignored.
*/ );
Vpre_idle_hook = Qnil;
keysym changed and its modifiers left alone. This is useful for
dealing with non-standard X keyboards, such as the grievous damage
that Sun has inflicted upon the world.
+-- If an entry maps a symbol to a character, then a key-press event
+ whose keysym is the former symbol (with any modifiers at all) gets
+ changed into a key-press event matching the latter character, and the
+ resulting modifiers are the union of the original and new modifiers.
-- If an entry maps a character to a character, then a key-press event
matching the former character gets converted to a key-press event
matching the latter character. This is useful on ASCII terminals
-- If an entry maps a character to a symbol, then a key-press event
matching the character gets converted to a key-press event whose
keysym is the given symbol and which has no modifiers.
+
+Here's an example: This makes typing parens and braces easier by rerouting
+their positions to eliminate the need to use the Shift key.
+
+ (keyboard-translate ?[ ?()
+ (keyboard-translate ?] ?))
+ (keyboard-translate ?{ ?[)
+ (keyboard-translate ?} ?])
+ (keyboard-translate 'f11 ?{)
+ (keyboard-translate 'f12 ?})
*/ );
DEFVAR_LISP ("retry-undefined-key-binding-unshifted",
#define XEMACS_MOD_HYPER (1<<3)
#define XEMACS_MOD_ALT (1<<4)
#define XEMACS_MOD_SHIFT (1<<5) /* not used for dual-case characters */
+#define XEMACS_MOD_BUTTON1 (1<<6)
+#define XEMACS_MOD_BUTTON2 (1<<7)
+#define XEMACS_MOD_BUTTON3 (1<<8)
+#define XEMACS_MOD_BUTTON4 (1<<9)
+#define XEMACS_MOD_BUTTON5 (1<<10)
*/
(type, plist))
{
- Lisp_Object tail, keyword, value;
Lisp_Object event = Qnil;
Lisp_Event *e;
EMACS_INT coord_x = 0, coord_y = 0;
(e.g. CHANNEL), which we don't want in empty events. */
e->event_type = empty_event;
if (!NILP (plist))
- error ("Cannot set properties of empty event");
+ syntax_error ("Cannot set properties of empty event", plist);
UNGCPRO;
return event;
}
else
{
/* Not allowed: Qprocess, Qtimeout, Qmagic, Qeval, Qmagic_eval. */
- signal_simple_error ("Invalid event type", type);
+ invalid_argument ("Invalid event type", type);
}
EVENT_CHANNEL (e) = Qnil;
plist = Fcopy_sequence (plist);
Fcanonicalize_plist (plist, Qnil);
-#define WRONG_EVENT_TYPE_FOR_PROPERTY(type, prop) \
- error_with_frob (prop, "Invalid property for %s event", \
- string_data (symbol_name (XSYMBOL (type))))
+#define WRONG_EVENT_TYPE_FOR_PROPERTY(event_type, prop) \
+ syntax_error_2 ("Invalid property for event type", prop, event_type)
- EXTERNAL_PROPERTY_LIST_LOOP (tail, keyword, value, plist)
- {
- if (EQ (keyword, Qchannel))
- {
- if (e->event_type == key_press_event)
- {
- if (!CONSOLEP (value))
- value = wrong_type_argument (Qconsolep, value);
- }
- else
- {
- if (!FRAMEP (value))
- value = wrong_type_argument (Qframep, value);
- }
- EVENT_CHANNEL (e) = value;
- }
- else if (EQ (keyword, Qkey))
- {
- switch (e->event_type)
- {
- case key_press_event:
- if (!SYMBOLP (value) && !CHARP (value))
- signal_simple_error ("Invalid event key", value);
- e->event.key.keysym = value;
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else if (EQ (keyword, Qbutton))
- {
- CHECK_NATNUM (value);
- check_int_range (XINT (value), 0, 7);
-
- switch (e->event_type)
- {
- case button_press_event:
- case button_release_event:
- e->event.button.button = XINT (value);
- break;
- case misc_user_event:
- e->event.misc.button = XINT (value);
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else if (EQ (keyword, Qmodifiers))
- {
- int modifiers = 0;
- Lisp_Object sym;
-
- EXTERNAL_LIST_LOOP_2 (sym, value)
- {
- if (EQ (sym, Qcontrol)) modifiers |= XEMACS_MOD_CONTROL;
- else if (EQ (sym, Qmeta)) modifiers |= XEMACS_MOD_META;
- else if (EQ (sym, Qsuper)) modifiers |= XEMACS_MOD_SUPER;
- else if (EQ (sym, Qhyper)) modifiers |= XEMACS_MOD_HYPER;
- else if (EQ (sym, Qalt)) modifiers |= XEMACS_MOD_ALT;
- else if (EQ (sym, Qsymbol)) modifiers |= XEMACS_MOD_ALT;
- else if (EQ (sym, Qshift)) modifiers |= XEMACS_MOD_SHIFT;
- else
- signal_simple_error ("Invalid key modifier", sym);
- }
-
- switch (e->event_type)
- {
- case key_press_event:
- e->event.key.modifiers = modifiers;
- break;
- case button_press_event:
- case button_release_event:
- e->event.button.modifiers = modifiers;
- break;
- case pointer_motion_event:
- e->event.motion.modifiers = modifiers;
- break;
- case misc_user_event:
- e->event.misc.modifiers = modifiers;
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else if (EQ (keyword, Qx))
- {
- switch (e->event_type)
- {
- case pointer_motion_event:
- case button_press_event:
- case button_release_event:
- case misc_user_event:
- /* Allow negative values, so we can specify toolbar
- positions. */
- CHECK_INT (value);
- coord_x = XINT (value);
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else if (EQ (keyword, Qy))
- {
- switch (e->event_type)
- {
- case pointer_motion_event:
- case button_press_event:
- case button_release_event:
- case misc_user_event:
- /* Allow negative values; see above. */
- CHECK_INT (value);
- coord_y = XINT (value);
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else if (EQ (keyword, Qtimestamp))
- {
- CHECK_NATNUM (value);
- e->timestamp = XINT (value);
- }
- else if (EQ (keyword, Qfunction))
- {
- switch (e->event_type)
- {
- case misc_user_event:
- e->event.eval.function = value;
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else if (EQ (keyword, Qobject))
- {
- switch (e->event_type)
- {
- case misc_user_event:
- e->event.eval.object = value;
- break;
- default:
- WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
- break;
- }
- }
- else
- signal_simple_error_2 ("Invalid property", keyword, value);
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (keyword, value, plist)
+ {
+ if (EQ (keyword, Qchannel))
+ {
+ if (e->event_type == key_press_event)
+ {
+ if (!CONSOLEP (value))
+ value = wrong_type_argument (Qconsolep, value);
+ }
+ else
+ {
+ if (!FRAMEP (value))
+ value = wrong_type_argument (Qframep, value);
+ }
+ EVENT_CHANNEL (e) = value;
+ }
+ else if (EQ (keyword, Qkey))
+ {
+ switch (e->event_type)
+ {
+ case key_press_event:
+ if (!SYMBOLP (value) && !CHARP (value))
+ syntax_error ("Invalid event key", value);
+ e->event.key.keysym = value;
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else if (EQ (keyword, Qbutton))
+ {
+ CHECK_NATNUM (value);
+ check_int_range (XINT (value), 0, 7);
+
+ switch (e->event_type)
+ {
+ case button_press_event:
+ case button_release_event:
+ e->event.button.button = XINT (value);
+ break;
+ case misc_user_event:
+ e->event.misc.button = XINT (value);
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else if (EQ (keyword, Qmodifiers))
+ {
+ int modifiers = 0;
+
+ EXTERNAL_LIST_LOOP_2 (sym, value)
+ {
+ if (EQ (sym, Qcontrol)) modifiers |= XEMACS_MOD_CONTROL;
+ else if (EQ (sym, Qmeta)) modifiers |= XEMACS_MOD_META;
+ else if (EQ (sym, Qsuper)) modifiers |= XEMACS_MOD_SUPER;
+ else if (EQ (sym, Qhyper)) modifiers |= XEMACS_MOD_HYPER;
+ else if (EQ (sym, Qalt)) modifiers |= XEMACS_MOD_ALT;
+ else if (EQ (sym, Qsymbol)) modifiers |= XEMACS_MOD_ALT;
+ else if (EQ (sym, Qshift)) modifiers |= XEMACS_MOD_SHIFT;
+ else if (EQ (sym, Qbutton1)) modifiers |= XEMACS_MOD_BUTTON1;
+ else if (EQ (sym, Qbutton2)) modifiers |= XEMACS_MOD_BUTTON2;
+ else if (EQ (sym, Qbutton3)) modifiers |= XEMACS_MOD_BUTTON3;
+ else if (EQ (sym, Qbutton4)) modifiers |= XEMACS_MOD_BUTTON4;
+ else if (EQ (sym, Qbutton5)) modifiers |= XEMACS_MOD_BUTTON5;
+ else
+ syntax_error ("Invalid key modifier", sym);
+ }
+
+ switch (e->event_type)
+ {
+ case key_press_event:
+ e->event.key.modifiers = modifiers;
+ break;
+ case button_press_event:
+ case button_release_event:
+ e->event.button.modifiers = modifiers;
+ break;
+ case pointer_motion_event:
+ e->event.motion.modifiers = modifiers;
+ break;
+ case misc_user_event:
+ e->event.misc.modifiers = modifiers;
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else if (EQ (keyword, Qx))
+ {
+ switch (e->event_type)
+ {
+ case pointer_motion_event:
+ case button_press_event:
+ case button_release_event:
+ case misc_user_event:
+ /* Allow negative values, so we can specify toolbar
+ positions. */
+ CHECK_INT (value);
+ coord_x = XINT (value);
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else if (EQ (keyword, Qy))
+ {
+ switch (e->event_type)
+ {
+ case pointer_motion_event:
+ case button_press_event:
+ case button_release_event:
+ case misc_user_event:
+ /* Allow negative values; see above. */
+ CHECK_INT (value);
+ coord_y = XINT (value);
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else if (EQ (keyword, Qtimestamp))
+ {
+ CHECK_NATNUM (value);
+ e->timestamp = XINT (value);
+ }
+ else if (EQ (keyword, Qfunction))
+ {
+ switch (e->event_type)
+ {
+ case misc_user_event:
+ e->event.eval.function = value;
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else if (EQ (keyword, Qobject))
+ {
+ switch (e->event_type)
+ {
+ case misc_user_event:
+ e->event.eval.object = value;
+ break;
+ default:
+ WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword);
+ break;
+ }
+ }
+ else
+ syntax_error_2 ("Invalid property", keyword, value);
+ }
+ }
/* Insert the channel, if missing. */
if (NILP (EVENT_CHANNEL (e)))
{
case key_press_event:
if (UNBOUNDP (e->event.key.keysym))
- error ("A key must be specified to make a keypress event");
+ syntax_error ("A key must be specified to make a keypress event",
+ plist);
break;
case button_press_event:
if (!e->event.button.button)
- error ("A button must be specified to make a button-press event");
+ syntax_error
+ ("A button must be specified to make a button-press event",
+ plist);
break;
case button_release_event:
if (!e->event.button.button)
- error ("A button must be specified to make a button-release event");
+ syntax_error
+ ("A button must be specified to make a button-release event",
+ plist);
break;
case misc_user_event:
if (NILP (e->event.misc.function))
- error ("A function must be specified to make a misc-user event");
+ syntax_error ("A function must be specified to make a misc-user event",
+ plist);
break;
default:
break;
case dead_event: strcpy (buf, "DEAD-EVENT"); return;
default:
abort ();
+ return;
}
#define modprint1(x) do { strcpy (buf, (x)); buf += sizeof (x)-1; } while (0)
#define modprint(x,y) do { if (brief) modprint1 (y); else modprint1 (x); } while (0)
DEFUN ("event-timestamp", Fevent_timestamp, 1, 1, 0, /*
Return the timestamp of the event object EVENT.
+Timestamps are measured in milliseconds since the start of the window system.
+They are NOT related to any current time measurement.
+They should be compared with `event-timestamp<'.
+See also `current-event-timestamp'.
*/
(event))
{
XEVENT (event)->timestamp);
}
+#define TIMESTAMP_HALFSPACE (1L << (VALBITS - 2))
+
+DEFUN ("event-timestamp<", Fevent_timestamp_lessp, 2, 2, 0, /*
+Return true if timestamp TIME1 is earlier than timestamp TIME2.
+This correctly handles timestamp wrap.
+See also `event-timestamp' and `current-event-timestamp'.
+*/
+ (time1, time2))
+{
+ EMACS_INT t1, t2;
+
+ CHECK_NATNUM (time1);
+ CHECK_NATNUM (time2);
+ t1 = XINT (time1);
+ t2 = XINT (time2);
+
+ if (t1 < t2)
+ return t2 - t1 < TIMESTAMP_HALFSPACE ? Qt : Qnil;
+ else
+ return t1 - t2 < TIMESTAMP_HALFSPACE ? Qnil : Qt;
+}
+
#define CHECK_EVENT_TYPE(e,t1,sym) do { \
CHECK_LIVE_EVENT (e); \
if (XEVENT(e)->event_type != (t1)) \
}
DEFUN ("event-modifier-bits", Fevent_modifier_bits, 1, 1, 0, /*
-Return a number representing the modifier keys which were down
+Return a number representing the modifier keys and buttons which were down
when the given mouse or keyboard event was produced.
-See also the function event-modifiers.
+See also the function `event-modifiers'.
*/
(event))
{
}
DEFUN ("event-modifiers", Fevent_modifiers, 1, 1, 0, /*
-Return a list of symbols, the names of the modifier keys
+Return a list of symbols, the names of the modifier keys and buttons
which were down when the given mouse or keyboard event was produced.
-See also the function event-modifier-bits.
+See also the function `event-modifier-bits'.
+
+The possible symbols in the list are
+
+`shift': The Shift key. Will not appear, in general, on key events
+ where the keysym is an ASCII character, because using Shift
+ on such a character converts it into another character rather
+ than actually just adding a Shift modifier.
+
+`control': The Control key.
+
+`meta': The Meta key. On PC's and PC-style keyboards, this is generally
+ labelled \"Alt\"; Meta is a holdover from early Lisp Machines and
+ such, propagated through the X Window System. On Sun keyboards,
+ this key is labelled with a diamond.
+
+`alt': The \"Alt\" key. Alt is in quotes because this does not refer
+ to what it obviously should refer to, namely the Alt key on PC
+ keyboards. Instead, it refers to the key labelled Alt on Sun
+ keyboards, and to no key at all on PC keyboards.
+
+`super': The Super key. Most keyboards don't have any such key, but
+ under X Windows using `xmodmap' you can assign any key (such as
+ an underused right-shift, right-control, or right-alt key) to
+ this key modifier. No support currently exists under MS Windows
+ for generating these modifiers.
+
+`hyper': The Hyper key. Works just like the Super key.
+
+`button1': The mouse buttons. This means that the specified button was held
+`button2': down at the time the event occurred. NOTE: For button-press
+`button3': events, the button that was just pressed down does NOT appear in
+`button4': the modifiers.
+`button5':
+
+Button modifiers are currently ignored when defining and looking up key and
+mouse strokes in keymaps. This could be changed, which would allow a user to
+create button-chord actions, use a button as a key modifier and do other
+clever things.
*/
(event))
{
int mod = XINT (Fevent_modifier_bits (event));
Lisp_Object result = Qnil;
+ struct gcpro gcpro1;
+
+ GCPRO1 (result);
if (mod & XEMACS_MOD_SHIFT) result = Fcons (Qshift, result);
if (mod & XEMACS_MOD_ALT) result = Fcons (Qalt, result);
if (mod & XEMACS_MOD_HYPER) result = Fcons (Qhyper, result);
if (mod & XEMACS_MOD_SUPER) result = Fcons (Qsuper, result);
if (mod & XEMACS_MOD_META) result = Fcons (Qmeta, result);
if (mod & XEMACS_MOD_CONTROL) result = Fcons (Qcontrol, result);
- return result;
+ if (mod & XEMACS_MOD_BUTTON1) result = Fcons (Qbutton1, result);
+ if (mod & XEMACS_MOD_BUTTON2) result = Fcons (Qbutton2, result);
+ if (mod & XEMACS_MOD_BUTTON3) result = Fcons (Qbutton3, result);
+ if (mod & XEMACS_MOD_BUTTON4) result = Fcons (Qbutton4, result);
+ if (mod & XEMACS_MOD_BUTTON5) result = Fcons (Qbutton5, result);
+ RETURN_UNGCPRO (Fnreverse (result));
}
static int
w = find_window_by_pixel_pos (*x, *y, f->root_window);
if (!w)
- return 1; /* #### What should really happen here. */
+ return 1; /* #### What should really happen here? */
*x -= w->pixel_left;
*y -= w->pixel_top;
DEFSUBR (Fevent_properties);
DEFSUBR (Fevent_timestamp);
+ DEFSUBR (Fevent_timestamp_lessp);
DEFSUBR (Fevent_key);
DEFSUBR (Fevent_button);
DEFSUBR (Fevent_modifier_bits);
event_stream layer to translate to this format.
NOTE: #### All timestamps should be measured as milliseconds since XEmacs
- started. Currently many or most events have a 0 as their
- timestamp value, and for other timestamps, they are raw server
- timestamps. (The X protocol doesn't provide any easy way of
- translating between server time and real process time; yuck.)
+ started. Currently they are raw server timestamps. (The X protocol
+ doesn't provide any easy way of translating between server time and
+ real process time; yuck.)
Every event type has the following structures:
If this is an integer, it will be in the printing
ASCII range: >32 and <127.
modifiers Bucky-bits on that key: control, meta, etc.
+ Also includes buttons.
For many keys, Shift is not a bit; that is implicit
in the keyboard layout.
button_release_event
button What button went down or up.
modifiers Bucky-bits on that button: shift, control, meta, etc.
+ Also includes other buttons (not the one pressed).
x, y Where it was at the button-state-change (in pixels).
pointer_motion_event
x, y Where it was after it moved (in pixels).
modifiers Bucky-bits down when the motion was detected.
- (Possibly not all window systems will provide this?)
process_event
process the XEmacs "process" object in question
int /* flags */);
USID (*delete_stream_pair_cb) (Lisp_Object /* instream */,
Lisp_Object /* outstream */);
+ int (*current_event_timestamp_cb) (struct console *);
};
/* Flags for create_stream_pair_cb() FLAGS parameter */
/* Copyright (c) 1994, 1995 Free Software Foundation, Inc.
Copyright (c) 1995 Sun Microsystems, Inc.
- Copyright (c) 1995, 1996 Ben Wing.
+ Copyright (c) 1995, 1996, 2000 Ben Wing.
This file is part of XEmacs.
else if (STRINGP (object))
{
/* #### Changes to string extents can affect redisplay if they are
- in the modeline or in the gutters.
-
+ in the modeline or in the gutters.
+
If the extent is in some generated-modeline-string: when we
change an extent in generated-modeline-string, this changes its
parent, which is in `modeline-format', so we should force the
is not very efficient. Should we add all
`generated-modeline-string' strings to a hash table? Maybe
efficiency is not the greatest concern here and there's no big
- loss in looping over the buffers.
+ loss in looping over the buffers.
If the extent is in a gutter we mark the gutter as
changed. This means (a) we can update extents in the gutters
case ME_ALL_EXTENTS_OPEN: start_open = 1, end_open = 1; break;
case ME_ALL_EXTENTS_CLOSED_OPEN: start_open = 0, end_open = 1; break;
case ME_ALL_EXTENTS_OPEN_CLOSED: start_open = 1, end_open = 0; break;
- default: abort(); break;
+ default: abort(); return 0;
}
start = buffer_or_string_bytind_to_startind (obj, from,
retval = (start <= exs && exs <= end) || (start <= exe && exe <= end);
break;
default:
- abort(); break;
+ abort(); return 0;
}
return flags & ME_NEGATE_IN_REGION ? !retval : retval;
}
if ((NILP (obj) && (flags & DE_MUST_HAVE_BUFFER))
|| (extent_detached_p (extent) && (flags & DE_MUST_BE_ATTACHED)))
{
- signal_simple_error ("extent doesn't belong to a buffer or string",
- extent_obj);
+ invalid_argument ("extent doesn't belong to a buffer or string",
+ extent_obj);
}
return extent;
return Qnil;
for (rest = parent; !NILP (rest); rest = extent_parent (XEXTENT (rest)))
if (EQ (rest, extent))
- signal_simple_error ("Circular parent chain would result", extent);
+ signal_type_error (Qinvalid_change,
+ "Circular parent chain would result",
+ extent);
if (NILP (parent))
{
remove_extent_from_children_list (XEXTENT (cur_parent), extent);
EQ (sym, Qstart_and_end_in_region) ? ME_START_AND_END_IN_REGION :
EQ (sym, Qstart_or_end_in_region) ? ME_START_OR_END_IN_REGION :
EQ (sym, Qnegate_in_region) ? ME_NEGATE_IN_REGION :
- (signal_simple_error ("Invalid `map-extents' flag", sym), 0);
+ (invalid_argument ("Invalid `map-extents' flag", sym), 0);
flags = XCDR (flags);
}
struct extent_at_arg
{
- EXTENT best_match;
+ Lisp_Object best_match; /* or list of extents */
Memind best_start;
Memind best_end;
Lisp_Object prop;
EXTENT before;
+ int all_extents;
};
enum extent_at_flag
if (EQ (at_flag, Qbefore)) return EXTENT_AT_BEFORE;
if (EQ (at_flag, Qat)) return EXTENT_AT_AT;
- signal_simple_error ("Invalid AT-FLAG in `extent-at'", at_flag);
+ invalid_argument ("Invalid AT-FLAG in `extent-at'", at_flag);
return EXTENT_AT_AFTER; /* unreached */
}
return 0;
}
+ if (!closure->all_extents)
{
- EXTENT current = closure->best_match;
+ EXTENT current;
- if (!current)
+ if (NILP (closure->best_match))
goto accept;
+ current = XEXTENT (closure->best_match);
/* redundant but quick test */
- else if (extent_start (current) > extent_start (e))
+ if (extent_start (current) > extent_start (e))
return 0;
/* we return the "last" best fit, instead of the first --
else
return 0;
accept:
- closure->best_match = e;
+ XSETEXTENT (closure->best_match, e);
closure->best_start = extent_start (e);
closure->best_end = extent_end (e);
}
+ else
+ {
+ Lisp_Object extent;
+
+ XSETEXTENT (extent, e);
+ closure->best_match = Fcons (extent, closure->best_match);
+ }
return 0;
}
static Lisp_Object
extent_at_bytind (Bytind position, Lisp_Object object, Lisp_Object property,
- EXTENT before, enum extent_at_flag at_flag)
+ EXTENT before, enum extent_at_flag at_flag, int all_extents)
{
struct extent_at_arg closure;
- Lisp_Object extent_obj;
+ struct gcpro gcpro1;
/* it might be argued that invalid positions should cause
errors, but the principle of least surprise dictates that
: position > buffer_or_string_absolute_end_byte (object)))
return Qnil;
- closure.best_match = 0;
+ closure.best_match = Qnil;
closure.prop = property;
closure.before = before;
+ closure.all_extents = all_extents;
+ GCPRO1 (closure.best_match);
map_extents_bytind (at_flag == EXTENT_AT_BEFORE ? position - 1 : position,
at_flag == EXTENT_AT_AFTER ? position + 1 : position,
extent_at_mapper, (void *) &closure, object, 0,
ME_START_OPEN | ME_ALL_EXTENTS_CLOSED);
+ if (all_extents)
+ closure.best_match = Fnreverse (closure.best_match);
+ UNGCPRO;
- if (!closure.best_match)
- return Qnil;
-
- XSETEXTENT (extent_obj, closure.best_match);
- return extent_obj;
+ return closure.best_match;
}
DEFUN ("extent-at", Fextent_at, 1, 5, 0, /*
else
before_extent = decode_extent (before, DE_MUST_BE_ATTACHED);
if (before_extent && !EQ (object, extent_object (before_extent)))
- signal_simple_error ("extent not in specified buffer or string", object);
+ invalid_argument ("extent not in specified buffer or string", object);
+ fl = decode_extent_at_flag (at_flag);
+
+ return extent_at_bytind (position, object, property, before_extent, fl, 0);
+}
+
+DEFUN ("extents-at", Fextents_at, 1, 5, 0, /*
+Find all extents at POS in OBJECT having PROPERTY set.
+Normally, an extent is "at" POS if it overlaps the region (POS, POS+1);
+ i.e. if it covers the character after POS. (However, see the definition
+ of AT-FLAG.)
+This provides similar functionality to `extent-list', but does so in a way
+ that is compatible with `extent-at'. (For example, errors due to POS out of
+ range are ignored; this makes it safer to use this function in response to
+ a mouse event, because in many cases previous events have changed the buffer
+ contents.)
+OBJECT specifies a buffer or string and defaults to the current buffer.
+PROPERTY defaults to nil, meaning that any extent will do.
+Properties are attached to extents with `set-extent-property', which see.
+Returns nil if POS is invalid or there is no matching extent at POS.
+If the fourth argument BEFORE is not nil, it must be an extent; any returned
+ extent will precede that extent. This feature allows `extents-at' to be
+ used by a loop over extents.
+AT-FLAG controls how end cases are handled, and should be one of:
+
+nil or `after' An extent is at POS if it covers the character
+ after POS. This is consistent with the way
+ that text properties work.
+`before' An extent is at POS if it covers the character
+ before POS.
+`at' An extent is at POS if it overlaps or abuts POS.
+ This includes all zero-length extents at POS.
+
+Note that in all cases, the start-openness and end-openness of the extents
+considered is ignored. If you want to pay attention to those properties,
+you should use `map-extents', which gives you more control.
+*/
+ (pos, object, property, before, at_flag))
+{
+ Bytind position;
+ EXTENT before_extent;
+ enum extent_at_flag fl;
+
+ object = decode_buffer_or_string (object);
+ position = get_buffer_or_string_pos_byte (object, pos, GB_NO_ERROR_IF_BAD);
+ if (NILP (before))
+ before_extent = 0;
+ else
+ before_extent = decode_extent (before, DE_MUST_BE_ATTACHED);
+ if (before_extent && !EQ (object, extent_object (before_extent)))
+ invalid_argument ("extent not in specified buffer or string", object);
fl = decode_extent_at_flag (at_flag);
- return extent_at_bytind (position, object, property, before_extent, fl);
+ return extent_at_bytind (position, object, property, before_extent, fl, 1);
}
/* ------------------------------- */
if (EQ (layout_obj, Qwhitespace)) return GL_WHITESPACE;
if (EQ (layout_obj, Qtext)) return GL_TEXT;
- signal_simple_error ("Unknown glyph layout type", layout_obj);
+ invalid_argument ("Unknown glyph layout type", layout_obj);
return GL_TEXT; /* unreached */
}
/* text_props_only specifies whether we only consider text-property
extents (those with the 'text-prop property set) or all extents. */
if (!text_props_only)
- extent = extent_at_bytind (position, object, prop, 0, fl);
+ extent = extent_at_bytind (position, object, prop, 0, fl, 0);
else
{
EXTENT prior = 0;
while (1)
{
extent = extent_at_bytind (position, object, Qtext_prop, prior,
- fl);
+ fl, 0);
if (NILP (extent))
return Qnil;
if (EQ (prop, Fextent_property (extent, Qtext_prop, Qnil)))
prop = Fextent_property (extent, Qtext_prop, Qnil);
if (NILP (prop))
- signal_simple_error ("Internal error: no text-prop", extent);
+ signal_type_error (Qinternal_error,
+ "Internal error: no text-prop", extent);
val = Fextent_property (extent, prop, Qnil);
#if 0
/* removed by bill perry, 2/9/97
** with a value of Qnil. This is bad bad bad.
*/
if (NILP (val))
- signal_simple_error_2 ("Internal error: no text-prop",
- extent, prop);
+ signal_type_error_2 (Qinternal_error,
+ "Internal error: no text-prop",
+ extent, prop);
#endif
Fput_text_property (from, to, prop, val, Qnil);
return Qnil; /* important! */
DEFSUBR (Fmap_extents);
DEFSUBR (Fmap_extent_children);
DEFSUBR (Fextent_at);
+ DEFSUBR (Fextents_at);
DEFSUBR (Fset_extent_initial_redisplay_function);
DEFSUBR (Fextent_face);
static const struct lrecord_description fcd_description_1[] = {
{ XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, coding_category_system), CODING_CATEGORY_LAST + 1 },
#ifdef MULE
- { XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, ucs_to_mule_table), 65536 },
+ { XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, ucs_to_mule_table), countof (fcd->ucs_to_mule_table) },
#endif
{ XD_END }
};
JIS (the Japanese encoding commonly used for e-mail), EUC (the
standard Unix encoding for Japanese and other languages), and
Compound Text (the encoding used in X11). You can specify more
- specific information about the conversion with the FLAGS argument.
+ specific information about the conversion with the PROPS argument.
'big5
Big5 (the encoding commonly used for Taiwanese).
'ccl
(name, type, doc_string, props))
{
Lisp_Coding_System *codesys;
- Lisp_Object rest, key, value;
enum coding_system_type ty;
int need_to_setup_eol_systems = 1;
CHECK_STRING (doc_string);
CODING_SYSTEM_DOC_STRING (codesys) = doc_string;
- EXTERNAL_PROPERTY_LIST_LOOP (rest, key, value, props)
- {
- if (EQ (key, Qmnemonic))
- {
- if (!NILP (value))
- CHECK_STRING (value);
- CODING_SYSTEM_MNEMONIC (codesys) = value;
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, props)
+ {
+ if (EQ (key, Qmnemonic))
+ {
+ if (!NILP (value))
+ CHECK_STRING (value);
+ CODING_SYSTEM_MNEMONIC (codesys) = value;
+ }
- else if (EQ (key, Qeol_type))
- {
- need_to_setup_eol_systems = NILP (value);
- if (EQ (value, Qt))
- value = Qnil;
- CODING_SYSTEM_EOL_TYPE (codesys) = symbol_to_eol_type (value);
- }
+ else if (EQ (key, Qeol_type))
+ {
+ need_to_setup_eol_systems = NILP (value);
+ if (EQ (value, Qt))
+ value = Qnil;
+ CODING_SYSTEM_EOL_TYPE (codesys) = symbol_to_eol_type (value);
+ }
- else if (EQ (key, Qpost_read_conversion)) CODING_SYSTEM_POST_READ_CONVERSION (codesys) = value;
- else if (EQ (key, Qpre_write_conversion)) CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys) = value;
+ else if (EQ (key, Qpost_read_conversion)) CODING_SYSTEM_POST_READ_CONVERSION (codesys) = value;
+ else if (EQ (key, Qpre_write_conversion)) CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys) = value;
#ifdef MULE
- else if (ty == CODESYS_ISO2022)
- {
+ else if (ty == CODESYS_ISO2022)
+ {
#define FROB_INITIAL_CHARSET(charset_num) \
CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, charset_num) = \
((EQ (value, Qt) || EQ (value, Qnil)) ? value : Fget_charset (value))
- if (EQ (key, Qcharset_g0)) FROB_INITIAL_CHARSET (0);
- else if (EQ (key, Qcharset_g1)) FROB_INITIAL_CHARSET (1);
- else if (EQ (key, Qcharset_g2)) FROB_INITIAL_CHARSET (2);
- else if (EQ (key, Qcharset_g3)) FROB_INITIAL_CHARSET (3);
+ if (EQ (key, Qcharset_g0)) FROB_INITIAL_CHARSET (0);
+ else if (EQ (key, Qcharset_g1)) FROB_INITIAL_CHARSET (1);
+ else if (EQ (key, Qcharset_g2)) FROB_INITIAL_CHARSET (2);
+ else if (EQ (key, Qcharset_g3)) FROB_INITIAL_CHARSET (3);
#define FROB_FORCE_CHARSET(charset_num) \
CODING_SYSTEM_ISO2022_FORCE_CHARSET_ON_OUTPUT (codesys, charset_num) = !NILP (value)
- else if (EQ (key, Qforce_g0_on_output)) FROB_FORCE_CHARSET (0);
- else if (EQ (key, Qforce_g1_on_output)) FROB_FORCE_CHARSET (1);
- else if (EQ (key, Qforce_g2_on_output)) FROB_FORCE_CHARSET (2);
- else if (EQ (key, Qforce_g3_on_output)) FROB_FORCE_CHARSET (3);
+ else if (EQ (key, Qforce_g0_on_output)) FROB_FORCE_CHARSET (0);
+ else if (EQ (key, Qforce_g1_on_output)) FROB_FORCE_CHARSET (1);
+ else if (EQ (key, Qforce_g2_on_output)) FROB_FORCE_CHARSET (2);
+ else if (EQ (key, Qforce_g3_on_output)) FROB_FORCE_CHARSET (3);
#define FROB_BOOLEAN_PROPERTY(prop) \
CODING_SYSTEM_ISO2022_##prop (codesys) = !NILP (value)
- else if (EQ (key, Qshort)) FROB_BOOLEAN_PROPERTY (SHORT);
- else if (EQ (key, Qno_ascii_eol)) FROB_BOOLEAN_PROPERTY (NO_ASCII_EOL);
- else if (EQ (key, Qno_ascii_cntl)) FROB_BOOLEAN_PROPERTY (NO_ASCII_CNTL);
- else if (EQ (key, Qseven)) FROB_BOOLEAN_PROPERTY (SEVEN);
- else if (EQ (key, Qlock_shift)) FROB_BOOLEAN_PROPERTY (LOCK_SHIFT);
- else if (EQ (key, Qno_iso6429)) FROB_BOOLEAN_PROPERTY (NO_ISO6429);
- else if (EQ (key, Qescape_quoted)) FROB_BOOLEAN_PROPERTY (ESCAPE_QUOTED);
-
- else if (EQ (key, Qinput_charset_conversion))
- {
- codesys->iso2022.input_conv =
- Dynarr_new (charset_conversion_spec);
- parse_charset_conversion_specs (codesys->iso2022.input_conv,
- value);
- }
- else if (EQ (key, Qoutput_charset_conversion))
- {
- codesys->iso2022.output_conv =
- Dynarr_new (charset_conversion_spec);
- parse_charset_conversion_specs (codesys->iso2022.output_conv,
- value);
- }
- else
- signal_simple_error ("Unrecognized property", key);
- }
- else if (EQ (type, Qccl))
- {
- if (EQ (key, Qdecode))
- {
- CHECK_VECTOR (value);
- CODING_SYSTEM_CCL_DECODE (codesys) = value;
- }
- else if (EQ (key, Qencode))
- {
- CHECK_VECTOR (value);
- CODING_SYSTEM_CCL_ENCODE (codesys) = value;
- }
- else
- signal_simple_error ("Unrecognized property", key);
- }
+ else if (EQ (key, Qshort)) FROB_BOOLEAN_PROPERTY (SHORT);
+ else if (EQ (key, Qno_ascii_eol)) FROB_BOOLEAN_PROPERTY (NO_ASCII_EOL);
+ else if (EQ (key, Qno_ascii_cntl)) FROB_BOOLEAN_PROPERTY (NO_ASCII_CNTL);
+ else if (EQ (key, Qseven)) FROB_BOOLEAN_PROPERTY (SEVEN);
+ else if (EQ (key, Qlock_shift)) FROB_BOOLEAN_PROPERTY (LOCK_SHIFT);
+ else if (EQ (key, Qno_iso6429)) FROB_BOOLEAN_PROPERTY (NO_ISO6429);
+ else if (EQ (key, Qescape_quoted)) FROB_BOOLEAN_PROPERTY (ESCAPE_QUOTED);
+
+ else if (EQ (key, Qinput_charset_conversion))
+ {
+ codesys->iso2022.input_conv =
+ Dynarr_new (charset_conversion_spec);
+ parse_charset_conversion_specs (codesys->iso2022.input_conv,
+ value);
+ }
+ else if (EQ (key, Qoutput_charset_conversion))
+ {
+ codesys->iso2022.output_conv =
+ Dynarr_new (charset_conversion_spec);
+ parse_charset_conversion_specs (codesys->iso2022.output_conv,
+ value);
+ }
+ else
+ signal_simple_error ("Unrecognized property", key);
+ }
+ else if (EQ (type, Qccl))
+ {
+ if (EQ (key, Qdecode))
+ {
+ CHECK_VECTOR (value);
+ CODING_SYSTEM_CCL_DECODE (codesys) = value;
+ }
+ else if (EQ (key, Qencode))
+ {
+ CHECK_VECTOR (value);
+ CODING_SYSTEM_CCL_ENCODE (codesys) = value;
+ }
+ else
+ signal_simple_error ("Unrecognized property", key);
+ }
#endif /* MULE */
- else
- signal_simple_error ("Unrecognized property", key);
- }
+ else
+ signal_simple_error ("Unrecognized property", key);
+ }
+ }
if (need_to_setup_eol_systems)
setup_eol_coding_systems (codesys);
case EOL_LF: new_coding_system = CODING_SYSTEM_EOL_LF (cs); break;
case EOL_CR: new_coding_system = CODING_SYSTEM_EOL_CR (cs); break;
case EOL_CRLF: new_coding_system = CODING_SYSTEM_EOL_CRLF (cs); break;
- default: abort ();
+ default: abort (); return Qnil;
}
return NILP (new_coding_system) ? coding_system : new_coding_system;
*/
(code, character))
{
- unsigned int c;
+ size_t c;
CHECK_CHAR (character);
- CHECK_INT (code);
+ CHECK_NATNUM (code);
c = XINT (code);
- if (c < sizeof (fcd->ucs_to_mule_table))
+ if (c < countof (fcd->ucs_to_mule_table))
{
fcd->ucs_to_mule_table[c] = character;
return Qt;
static Lisp_Object
ucs_to_char (unsigned long code)
{
- if (code < sizeof (fcd->ucs_to_mule_table))
+ if (code < countof (fcd->ucs_to_mule_table))
{
return fcd->ucs_to_mule_table[code];
}
{
/* Can this ever be reached? -slb */
abort();
+ return 0;
}
cs = CHARSET_BY_ATTRIBUTES (type, c,
{
INIT_LRECORD_IMPLEMENTATION (coding_system);
- deferror (&Qcoding_system_error, "coding-system-error",
- "Coding-system error", Qio_error);
+ DEFERROR_STANDARD (Qcoding_system_error, Qio_error);
DEFSUBR (Fcoding_system_p);
DEFSUBR (Ffind_coding_system);
#ifdef MULE
{
- unsigned int i;
+ size_t i;
- for (i = 0; i < 65536; i++)
+ for (i = 0; i < countof (fcd->ucs_to_mule_table); i++)
fcd->ucs_to_mule_table[i] = Qnil;
}
staticpro (&mule_to_ucs_table);
*/
(file))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked 2000-07-28 ben */
Bufbyte *beg;
Bufbyte *p;
Lisp_Object handler;
*/
(file))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked 2000-07-28 ben */
Bufbyte *beg, *p, *end;
Lisp_Object handler;
*/
(filename))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked 2000-07-28 ben */
Lisp_Object handler;
/* If the file name has special constructs in it,
static char *
file_name_as_directory (char *out, char *in)
{
+ /* This function cannot GC */
int size = strlen (in);
if (size == 0)
*/
(file))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked 2000-07-28 ben */
char *buf;
Lisp_Object handler;
static int
directory_file_name (const char *src, char *dst)
{
+ /* This function cannot GC */
long slen = strlen (src);
/* Process as Unix format: just remove any final slash.
But leave "/" unchanged; do not change it to "". */
*/
(directory))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked 2000-07-28 ben */
char *buf;
Lisp_Object handler;
QUIT;
- if (stat ((const char *) data, &ignored) < 0)
+ if (xemacs_stat ((const char *) data, &ignored) < 0)
{
/* We want to return only if errno is ENOENT. */
if (errno == ENOENT)
*/
(name, default_directory))
{
- /* This function can GC */
+ /* This function can GC. GC-checked 2000-07-11 ben */
Bufbyte *nm;
Bufbyte *newdir, *p, *o;
#ifdef CYGWIN
char *user;
#endif
+ struct gcpro gcpro1, gcpro2;
+
+ /* both of these get set below */
+ GCPRO2 (name, default_directory);
CHECK_STRING (name);
call the corresponding file handler. */
handler = Ffind_file_name_handler (name, Qexpand_file_name);
if (!NILP (handler))
- return call3_check_string (handler, Qexpand_file_name, name,
- default_directory);
+ {
+ UNGCPRO;
+ return call3_check_string (handler, Qexpand_file_name, name,
+ default_directory);
+ }
/* Use the buffer's default-directory if DEFAULT_DIRECTORY is omitted. */
if (NILP (default_directory))
{
handler = Ffind_file_name_handler (default_directory, Qexpand_file_name);
if (!NILP (handler))
- return call3 (handler, Qexpand_file_name, name, default_directory);
+ {
+ UNGCPRO;
+ return call3 (handler, Qexpand_file_name, name, default_directory);
+ }
}
o = XSTRING_DATA (default_directory);
&& ! (IS_DIRECTORY_SEP (o[0]))
#endif /* not WIN32_NATIVE */
)
- {
- struct gcpro gcpro1;
- GCPRO1 (name);
- default_directory = Fexpand_file_name (default_directory, Qnil);
- UNGCPRO;
- }
+ default_directory = Fexpand_file_name (default_directory, Qnil);
#ifdef FILE_SYSTEM_CASE
name = FILE_SYSTEM_CASE (name);
XSTRING_DATA (name)[0] = DRIVE_LETTER (drive);
XSTRING_DATA (name)[1] = ':';
}
- return name;
+ RETURN_UNGCPRO (name);
#else /* not WIN32_NATIVE */
if (nm == XSTRING_DATA (name))
- return name;
- return build_string ((char *) nm);
+ RETURN_UNGCPRO (name);
+ RETURN_UNGCPRO (build_string ((char *) nm));
#endif /* not WIN32_NATIVE */
}
}
CORRECT_DIR_SEPS (target);
#endif /* WIN32_NATIVE */
- return make_string (target, o - target);
+ RETURN_UNGCPRO (make_string (target, o - target));
}
DEFUN ("file-truename", Ffile_truename, 1, 2, 0, /*
*/
(filename, default_))
{
- /* This function can GC. */
+ /* This function can GC. GC checked 2000-07-28 ben. */
Lisp_Object expanded_name;
struct gcpro gcpro1;
expanded_name = Fexpand_file_name (filename, default_);
- GCPRO1 (expanded_name);
-
if (!STRINGP (expanded_name))
return Qnil;
+ GCPRO1 (expanded_name);
+
{
Lisp_Object handler =
Ffind_file_name_handler (expanded_name, Qfile_truename);
*/
(string))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. GC checked 2000-07-28 ben. */
Bufbyte *nm;
Bufbyte *s, *p, *o, *x, *endp;
return make_string (xnm, x - xnm);
badsubst:
- error ("Bad format environment-variable substitution");
+ syntax_error ("Bad format environment-variable substitution", string);
missingclose:
- error ("Missing \"}\" in environment-variable substitution");
+ syntax_error ("Missing \"}\" in environment-variable substitution",
+ string);
badvar:
- error ("Substituting nonexistent environment variable \"%s\"",
- target);
+ syntax_error_2 ("Substituting nonexistent environment variable",
+ string, build_string (target));
/* NOTREACHED */
return Qnil; /* suppress compiler warning */
Lisp_Object
expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir)
{
- /* This function can call lisp */
+ /* This function can call Lisp. GC checked 2000-07-28 ben */
Lisp_Object abspath;
struct gcpro gcpro1;
barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring,
int interactive, struct stat *statptr)
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can call Lisp. GC checked 2000-07-28 ben */
struct stat statbuf;
/* stat is a good way to tell whether the file exists,
regardless of what access permissions it has. */
- if (stat ((char *) XSTRING_DATA (absname), &statbuf) >= 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (absname), &statbuf) >= 0)
{
Lisp_Object tem;
*/
(filename, newname, ok_if_already_exists, keep_time))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can call Lisp. GC checked 2000-07-28 ben */
int ifd, ofd, n;
char buf[16 * 1024];
struct stat st, out_st;
args[1] = Qnil; args[2] = Qnil;
NGCPRO1 (*args);
ngcpro1.nvars = 3;
- if (XSTRING_BYTE (newname, XSTRING_LENGTH (newname) - 1) != '/')
- args[i++] = build_string ("/");
+ if (!IS_DIRECTORY_SEP (XSTRING_BYTE (newname,
+ XSTRING_LENGTH (newname) - 1)))
+
+ args[i++] = Fchar_to_string (Vdirectory_sep_char);
args[i++] = Ffile_name_nondirectory (filename);
newname = Fconcat (i, args);
NUNGCPRO;
|| INTP (ok_if_already_exists))
barf_or_query_if_file_exists (newname, "copy to it",
INTP (ok_if_already_exists), &out_st);
- else if (stat ((const char *) XSTRING_DATA (newname), &out_st) < 0)
+ else if (xemacs_stat ((const char *) XSTRING_DATA (newname), &out_st) < 0)
out_st.st_mode = 0;
ifd = interruptible_open ((char *) XSTRING_DATA (filename), O_RDONLY | OPEN_BINARY, 0);
report_file_error ("I/O error", list1 (newname));
if (input_file_statable_p)
- {
- if (!NILP (keep_time))
{
- EMACS_TIME atime, mtime;
- EMACS_SET_SECS_USECS (atime, st.st_atime, 0);
- EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
- if (set_file_times ((char *) XSTRING_DATA (newname), atime,
- mtime))
- report_file_error ("I/O error", list1 (newname));
+ if (!NILP (keep_time))
+ {
+ EMACS_TIME atime, mtime;
+ EMACS_SET_SECS_USECS (atime, st.st_atime, 0);
+ EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
+ if (set_file_times ((char *) XSTRING_DATA (newname), atime,
+ mtime))
+ report_file_error ("I/O error", list1 (newname));
+ }
+ chmod ((const char *) XSTRING_DATA (newname),
+ st.st_mode & 07777);
}
- chmod ((const char *) XSTRING_DATA (newname),
- st.st_mode & 07777);
- }
/* We'll close it by hand */
XCAR (ofd_locative) = Qnil;
/* netunam, being a strange-o system call only used once, is not
encapsulated. */
- TO_EXTERNAL_FORMAT (LISP_STRING, path, C_STRING_ALLOCA, path_ext, Qfile_name);
- TO_EXTERNAL_FORMAT (LISP_STRING, login, C_STRING_ALLOCA, login_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (path, path_ext, Qfile_name);
+ LISP_STRING_TO_EXTERNAL (login, login_ext, Qnative);
netresult = netunam (path_ext, login_ext);
{
#ifdef WIN32_NATIVE
struct stat st;
- if (stat (filename, &st) < 0)
+ if (xemacs_stat (filename, &st) < 0)
return 0;
return ((st.st_mode & S_IEXEC) != 0);
#else /* not WIN32_NATIVE */
#ifdef HAVE_EACCESS
- return eaccess (filename, 1) >= 0;
+ return eaccess (filename, X_OK) >= 0;
#else
/* Access isn't quite right because it uses the real uid
and we really want to test with the effective uid.
But Unix doesn't give us a right way to do it. */
- return access (filename, 1) >= 0;
+ return access (filename, X_OK) >= 0;
#endif /* HAVE_EACCESS */
#endif /* not WIN32_NATIVE */
}
check_writable (const char *filename)
{
#ifdef HAVE_EACCESS
- return (eaccess (filename, 2) >= 0);
+ return (eaccess (filename, W_OK) >= 0);
#else
/* Access isn't quite right because it uses the real uid
and we really want to test with the effective uid.
But Unix doesn't give us a right way to do it.
Opening with O_WRONLY could work for an ordinary file,
but would lose for directories. */
- return (access (filename, 2) >= 0);
+ return (access (filename, W_OK) >= 0);
#endif
}
*/
(filename))
{
- /* This function can call lisp */
+ /* This function can call lisp; GC checked 2000-07-11 ben */
Lisp_Object abspath;
Lisp_Object handler;
struct stat statbuf;
if (!NILP (handler))
return call2 (handler, Qfile_exists_p, abspath);
- return stat ((char *) XSTRING_DATA (abspath), &statbuf) >= 0 ? Qt : Qnil;
+ return xemacs_stat ((char *) XSTRING_DATA (abspath), &statbuf) >= 0 ? Qt : Qnil;
}
DEFUN ("file-executable-p", Ffile_executable_p, 1, 1, 0, /*
(filename))
{
- /* This function can GC. GC checked 1997.04.10. */
+ /* This function can GC. GC checked 07-11-2000 ben. */
Lisp_Object abspath;
Lisp_Object handler;
struct gcpro gcpro1;
if (!NILP (handler))
return call2 (handler, Qfile_writable_p, abspath);
- if (stat ((char *) XSTRING_DATA (abspath), &statbuf) >= 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (abspath), &statbuf) >= 0)
return (check_writable ((char *) XSTRING_DATA (abspath))
? Qt : Qnil);
if (!NILP (handler))
return call2 (handler, Qfile_directory_p, abspath);
- if (stat ((char *) XSTRING_DATA (abspath), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (abspath), &st) < 0)
return Qnil;
return (st.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
}
if (!NILP (handler))
return call2 (handler, Qfile_regular_p, abspath);
- if (stat ((char *) XSTRING_DATA (abspath), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (abspath), &st) < 0)
return Qnil;
return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
}
if (!NILP (handler))
return call2 (handler, Qfile_modes, abspath);
- if (stat ((char *) XSTRING_DATA (abspath), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (abspath), &st) < 0)
return Qnil;
/* Syncing with FSF 19.34.6 note: not in FSF, #if 0'ed out here. */
#if 0
return call3 (handler, Qfile_newer_than_file_p, abspath1,
abspath2);
- if (stat ((char *) XSTRING_DATA (abspath1), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (abspath1), &st) < 0)
return Qnil;
mtime1 = st.st_mtime;
- if (stat ((char *) XSTRING_DATA (abspath2), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (abspath2), &st) < 0)
return Qt;
return (mtime1 > st.st_mtime) ? Qt : Qnil;
fd = -1;
- if (stat ((char *) XSTRING_DATA (filename), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (filename), &st) < 0)
{
if (fd >= 0) close (fd);
badopen:
*/
(start, end, filename, append, visit, lockname, codesys))
{
- /* This function can call lisp */
+ /* This function can call lisp. GC checked 2000-07-28 ben */
int desc;
int failure;
int save_errno = 0;
struct stat st;
- Lisp_Object fn;
+ Lisp_Object fn = Qnil;
int speccount = specpdl_depth ();
int visiting_other = STRINGP (visit);
int visiting = (EQ (visit, Qt) || visiting_other);
Lisp_Object annotations = Qnil;
struct buffer *given_buffer;
Bufpos start1, end1;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
+ struct gcpro ngcpro1, ngcpro2;
+ Lisp_Object curbuf;
- /* #### dmoore - if Fexpand_file_name or handlers kill the buffer,
+ XSETBUFFER (curbuf, current_buffer);
+
+ /* start, end, visit, and append are never modified in this fun
+ so we don't protect them. */
+ GCPRO5 (visit_file, filename, codesys, lockname, annotations);
+ NGCPRO2 (curbuf, fn);
+
+ /* [[ dmoore - if Fexpand_file_name or handlers kill the buffer,
we should signal an error rather than blissfully continuing
along. ARGH, this function is going to lose lose lose. We need
to protect the current_buffer from being destroyed, but the
- multiple return points make this a pain in the butt. */
+ multiple return points make this a pain in the butt. ]] we do
+ protect curbuf now. --ben */
#ifdef FILE_CODING
codesys = Fget_coding_system (codesys);
#endif /* FILE_CODING */
if (current_buffer->base_buffer && ! NILP (visit))
- error ("Cannot do file visiting in an indirect buffer");
+ invalid_operation ("Cannot do file visiting in an indirect buffer",
+ curbuf);
if (!NILP (start) && !STRINGP (start))
get_buffer_range_char (current_buffer, start, end, &start1, &end1, 0);
{
Lisp_Object handler;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
-
- GCPRO5 (start, filename, visit, visit_file, lockname);
if (visiting_other)
visit_file = Fexpand_file_name (visit, Qnil);
visit_file = filename;
filename = Fexpand_file_name (filename, Qnil);
- UNGCPRO;
-
if (NILP (lockname))
lockname = visit_file;
+ /* We used to UNGCPRO here. BAD! visit_file is used below after
+ more Lisp calling. */
/* If the file name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (filename, Qwrite_region);
current_buffer->filename = visit_file;
MARK_MODELINE_CHANGED;
}
+ NUNGCPRO;
+ UNGCPRO;
return val;
}
}
#ifdef CLASH_DETECTION
if (!auto_saving)
- {
- Lisp_Object curbuf;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
-
- XSETBUFFER (curbuf, current_buffer);
- GCPRO5 (start, filename, visit_file, lockname, curbuf);
- lock_file (lockname);
- UNGCPRO;
- }
+ lock_file (lockname);
#endif /* CLASH_DETECTION */
/* Special kludge to simplify auto-saving. */
{
Lisp_Object desc_locative = Fcons (make_int (desc), Qnil);
Lisp_Object instream = Qnil, outstream = Qnil;
- struct gcpro gcpro1, gcpro2;
+ struct gcpro nngcpro1, nngcpro2;
/* need to gcpro; QUIT could happen out of call to write() */
- GCPRO2 (instream, outstream);
+ NNGCPRO2 (instream, outstream);
record_unwind_protect (close_file_unwind, desc_locative);
save_errno = errno;
}
Lstream_close (XLSTREAM (instream));
- UNGCPRO;
#ifdef HAVE_FSYNC
/* Note fsync appears to change the modtime on BSD4.2 (both vax and sun).
systems where close() can change the modtime. This is known to
happen on various NFS file systems, on Windows, and on Linux.
Rather than handling this on a per-system basis, we
- unconditionally do the stat() after the close(). */
+ unconditionally do the xemacs_stat() after the close(). */
/* NFS can report a write failure now. */
if (close (desc) < 0)
as necessary). */
XCAR (desc_locative) = Qnil;
unbind_to (speccount, Qnil);
+
+ NNUNGCPRO;
}
- stat ((char *) XSTRING_DATA (fn), &st);
+ xemacs_stat ((char *) XSTRING_DATA (fn), &st);
#ifdef CLASH_DETECTION
if (!auto_saving)
current_buffer->modtime = st.st_mtime;
if (failure)
- error ("IO error writing %s: %s",
- XSTRING_DATA (fn),
- strerror (save_errno));
+ {
+ errno = save_errno;
+ report_file_error ("Writing file", list1 (fn));
+ }
if (visiting)
{
}
else if (quietly)
{
+ NUNGCPRO;
+ UNGCPRO;
return Qnil;
}
message ("Wrote %s", XSTRING_DATA (visit_file));
else
{
- struct gcpro gcpro1;
Lisp_Object fsp;
- GCPRO1 (fn);
+ struct gcpro nngcpro1;
+ NNGCPRO1 (fsp);
fsp = Ffile_symlink_p (fn);
if (NILP (fsp))
message ("Wrote %s", XSTRING_DATA (fn));
else
message ("Wrote %s (symlink to %s)",
XSTRING_DATA (fn), XSTRING_DATA (fsp));
- UNGCPRO;
+ NNUNGCPRO;
}
}
+ NUNGCPRO;
+ UNGCPRO;
return Qnil;
}
*/
(buf))
{
- /* This function can call lisp */
+ /* This function can call lisp; GC checked 2000-07-11 ben */
struct buffer *b;
struct stat st;
Lisp_Object handler;
if (!NILP (handler))
return call2 (handler, Qverify_visited_file_modtime, buf);
- if (stat ((char *) XSTRING_DATA (b->filename), &st) < 0)
+ if (xemacs_stat ((char *) XSTRING_DATA (b->filename), &st) < 0)
{
/* If the file doesn't exist now and didn't exist before,
we say that it isn't modified, provided the error is a tame one. */
if (!NILP (handler))
/* The handler can find the file name the same way we did. */
return call2 (handler, Qset_visited_file_modtime, Qnil);
- else if (stat ((char *) XSTRING_DATA (filename), &st) >= 0)
+ else if (xemacs_stat ((char *) XSTRING_DATA (filename), &st) >= 0)
current_buffer->modtime = st.st_mtime;
}
/* Get visited file's mode to become the auto save file's mode. */
if (STRINGP (fn) &&
- stat ((char *) XSTRING_DATA (fn), &st) >= 0)
+ xemacs_stat ((char *) XSTRING_DATA (fn), &st) >= 0)
/* But make sure we can overwrite it later! */
auto_save_mode_bits = st.st_mode | 0600;
else
defsymbol (&Qformat_annotate_function, "format-annotate-function");
defsymbol (&Qcompute_buffer_file_truename, "compute-buffer-file-truename");
- deferror (&Qfile_error, "file-error", "File error", Qio_error);
- deferror (&Qfile_already_exists, "file-already-exists",
- "File already exists", Qfile_error);
+ DEFERROR_STANDARD (Qfile_error, Qio_error);
+ DEFERROR_STANDARD (Qfile_already_exists, Qfile_error);
DEFSUBR (Ffind_file_name_handler);
static int
lock_file_1 (char *lfname, int force)
{
+ /* Does not GC. */
int err;
char *lock_info_str;
char *host_name;
static int
current_lock_owner (lock_info_type *owner, char *lfname)
{
+ /* Does not GC. */
int len, ret;
int local_owner = 0;
char *at, *dot;
static int
lock_if_free (lock_info_type *clasher, char *lfname)
{
+ /* Does not GC. */
if (lock_file_1 (lfname, 0) == 0)
{
int locker;
void
lock_file (Lisp_Object fn)
{
- /* This function can GC. */
+ /* This function can GC. GC checked 7-11-00 ben */
/* dmoore - and can destroy current_buffer and all sorts of other
mean nasty things with pointy teeth. If you call this make sure
you protect things right. */
if (!NILP (subject_buf)
&& NILP (Fverify_visited_file_modtime (subject_buf))
&& !NILP (Ffile_exists_p (fn)))
- call1_in_buffer (XBUFFER(subject_buf),
+ call1_in_buffer (XBUFFER (subject_buf),
Qask_user_about_supersession_threat, fn);
}
void
unlock_file (Lisp_Object fn)
{
+ /* This can GC */
register char *lfname;
struct gcpro gcpro1;
string_result_ptr = string_result;
break;
default:
+ val = Qnil;
abort ();
}
}
*/
(elt, list))
{
- Lisp_Object list_elt, tail;
EXTERNAL_LIST_LOOP_3 (list_elt, list, tail)
{
if (internal_equal (elt, list_elt, 0))
*/
(elt, list))
{
- Lisp_Object list_elt, tail;
EXTERNAL_LIST_LOOP_3 (list_elt, list, tail)
{
if (internal_old_equal (elt, list_elt, 0))
*/
(elt, list))
{
- Lisp_Object list_elt, tail;
EXTERNAL_LIST_LOOP_3 (list_elt, list, tail)
{
if (EQ_WITH_EBOLA_NOTICE (elt, list_elt))
*/
(elt, list))
{
- Lisp_Object list_elt, tail;
EXTERNAL_LIST_LOOP_3 (list_elt, list, tail)
{
if (HACKEQ_UNSAFE (elt, list_elt))
Lisp_Object
memq_no_quit (Lisp_Object elt, Lisp_Object list)
{
- Lisp_Object list_elt, tail;
LIST_LOOP_3 (list_elt, list, tail)
{
if (EQ_WITH_EBOLA_NOTICE (elt, list_elt))
(key, list))
{
/* This function can GC. */
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (internal_equal (key, elt_car, 0))
(key, list))
{
/* This function can GC. */
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (internal_old_equal (key, elt_car, 0))
*/
(key, list))
{
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (EQ_WITH_EBOLA_NOTICE (key, elt_car))
*/
(key, list))
{
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (HACKEQ_UNSAFE (key, elt_car))
assq_no_quit (Lisp_Object key, Lisp_Object list)
{
/* This cannot GC. */
- Lisp_Object elt;
LIST_LOOP_2 (elt, list)
{
Lisp_Object elt_car = XCAR (elt);
*/
(key, list))
{
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (internal_equal (key, elt_cdr, 0))
*/
(key, list))
{
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (internal_old_equal (key, elt_cdr, 0))
*/
(key, list))
{
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (EQ_WITH_EBOLA_NOTICE (key, elt_cdr))
*/
(key, list))
{
- Lisp_Object elt, elt_car, elt_cdr;
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, list)
{
if (HACKEQ_UNSAFE (key, elt_cdr))
Lisp_Object
rassq_no_quit (Lisp_Object key, Lisp_Object list)
{
- Lisp_Object elt;
LIST_LOOP_2 (elt, list)
{
Lisp_Object elt_cdr = XCDR (elt);
*/
(elt, list))
{
- Lisp_Object list_elt;
EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
(internal_equal (elt, list_elt, 0)));
return list;
*/
(elt, list))
{
- Lisp_Object list_elt;
EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
(internal_old_equal (elt, list_elt, 0)));
return list;
*/
(elt, list))
{
- Lisp_Object list_elt;
EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
(EQ_WITH_EBOLA_NOTICE (elt, list_elt)));
return list;
*/
(elt, list))
{
- Lisp_Object list_elt;
EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
(HACKEQ_UNSAFE (elt, list_elt)));
return list;
Lisp_Object
delq_no_quit (Lisp_Object elt, Lisp_Object list)
{
- Lisp_Object list_elt;
LIST_LOOP_DELETE_IF (list_elt, list,
(EQ_WITH_EBOLA_NOTICE (elt, list_elt)));
return list;
*/
(key, list))
{
- Lisp_Object elt;
EXTERNAL_LIST_LOOP_DELETE_IF (elt, list,
(CONSP (elt) &&
internal_equal (key, XCAR (elt), 0)));
*/
(key, list))
{
- Lisp_Object elt;
EXTERNAL_LIST_LOOP_DELETE_IF (elt, list,
(CONSP (elt) &&
EQ_WITH_EBOLA_NOTICE (key, XCAR (elt))));
Lisp_Object
remassq_no_quit (Lisp_Object key, Lisp_Object list)
{
- Lisp_Object elt;
LIST_LOOP_DELETE_IF (elt, list,
(CONSP (elt) &&
EQ_WITH_EBOLA_NOTICE (key, XCAR (elt))));
*/
(value, list))
{
- Lisp_Object elt;
EXTERNAL_LIST_LOOP_DELETE_IF (elt, list,
(CONSP (elt) &&
internal_equal (value, XCDR (elt), 0)));
*/
(value, list))
{
- Lisp_Object elt;
EXTERNAL_LIST_LOOP_DELETE_IF (elt, list,
(CONSP (elt) &&
EQ_WITH_EBOLA_NOTICE (value, XCDR (elt))));
Lisp_Object
remrassq_no_quit (Lisp_Object value, Lisp_Object list)
{
- Lisp_Object elt;
LIST_LOOP_DELETE_IF (elt, list,
(CONSP (elt) &&
EQ_WITH_EBOLA_NOTICE (value, XCDR (elt))));
(list))
{
Lisp_Object reversed_list = Qnil;
- Lisp_Object elt;
EXTERNAL_LIST_LOOP_2 (elt, list)
{
reversed_list = Fcons (elt, reversed_list);
bad_bad_turtle (Lisp_Object *plist, Lisp_Object *badplace, Error_behavior errb)
{
if (ERRB_EQ (errb, ERROR_ME))
- /* #### Eek, this will probably result in another error
- when PLIST is printed out */
return Fsignal (Qcircular_property_list, list1 (*plist));
else
{
if (vals == 0) we don't have any free space available and
don't want to eat up any more stack with alloca().
- So we use EXTERNAL_LIST_LOOP_3 and GCPRO the tail. */
+ So we use EXTERNAL_LIST_LOOP_3_NO_DECLARE and GCPRO the tail. */
if (vals)
{
Lisp_Object *val = vals;
- Lisp_Object elt;
LIST_LOOP_2 (elt, sequence)
*val++ = elt;
else
{
Lisp_Object elt, tail;
+ EMACS_INT len_unused;
struct gcpro ngcpro1;
NGCPRO1 (tail);
{
- EXTERNAL_LIST_LOOP_3 (elt, sequence, tail)
+ EXTERNAL_LIST_LOOP_4_NO_DECLARE (elt, sequence, tail, len_unused)
{
args[1] = elt;
Ffuncall (2, args);
\f
/* #### this function doesn't belong in this file! */
+#ifdef HAVE_GETLOADAVG
+#ifdef HAVE_SYS_LOADAVG_H
+#include <sys/loadavg.h>
+#endif
+#else
+int getloadavg (double loadavg[], int nelem); /* Defined in getloadavg.c */
+#endif
+
DEFUN ("load-average", Fload_average, 0, 1, 0, /*
Return list of 1 minute, 5 minute and 15 minute load averages.
Each of the three load averages is multiplied by 100,
/* OK, fine. */
return;
#if 0
- /* This appears to cause huge slowdowns in files like
- emacsfns.h, which have no top-level forms.
+ /* This appears to cause huge slowdowns in files which have no
+ top-level forms.
In any case, it's not really necessary that we know for
sure the top-level form we're in; if we're in a form
/* Pick up relevant properties */
initially_unmapped = Fplist_get (props, Qinitially_unmapped, Qnil);
name = Fplist_get (props, Qname, Qnil);
-
+
popup = Fplist_get (props, Qpopup, Qnil);
if (EQ (popup, Qt))
popup = Fselected_frame (Qnil);
FRAME_MSWINDOWS_TARGET_RECT (f)->left = NILP (left) ? -1 : abs (XINT (left));
FRAME_MSWINDOWS_TARGET_RECT (f)->top = NILP (top) ? -1 : abs (XINT (top));
- FRAME_MSWINDOWS_TARGET_RECT (f)->width = NILP (width) ? -1 :
+ FRAME_MSWINDOWS_TARGET_RECT (f)->width = NILP (width) ? -1 :
abs (XINT (width));
- FRAME_MSWINDOWS_TARGET_RECT (f)->height = NILP (height) ? -1 :
+ FRAME_MSWINDOWS_TARGET_RECT (f)->height = NILP (height) ? -1 :
abs (XINT (height));
-
+
/* Misc frame stuff */
FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil;
#ifdef HAVE_TOOLBARS
- FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) =
+ FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) =
make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
#endif
/* hashtable of instantiated glyphs on the frame. */
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f) =
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f) =
make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQUAL);
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f) =
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f) =
make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQUAL);
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f) =
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f) =
make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQUAL);
/* Will initialize these in WM_SIZE handler. We cannot do it now,
because we do not know what is CW_USEDEFAULT height and width */
rect_default.top = rect.top + POPUP_OFFSET;
char_to_real_pixel_size (f, POPUP_WIDTH, POPUP_HEIGHT,
&rect_default.width, &rect_default.height);
+ FRAME_MSWINDOWS_POPUP (f) = 1;
}
AdjustWindowRectEx(&rect, style, ADJR_MENUFLAG, exstyle);
hwnd = CreateWindowEx (exstyle,
XEMACS_CLASS,
STRINGP(f->name) ? XSTRING_DATA(f->name) :
- (STRINGP(name) ?
- (const Extbyte*)XSTRING_DATA(name) :
+ (STRINGP(name) ?
+ (const Extbyte*)XSTRING_DATA(name) :
(const Extbyte*)XEMACS_CLASS),
style,
rect_default.left, rect_default.top,
Vmswindows_frame_being_created = Qnil;
if (hwnd == NULL)
- error ("System call to create frame failed");
-
+ invalid_operation ("System call to create frame failed",
+ STRINGP (f->name) ? f->name :
+ STRINGP (name) ? name :
+ Qunbound);
+
FRAME_MSWINDOWS_HANDLE(f) = hwnd;
SetWindowLong (hwnd, XWL_FRAMEOBJ, (LONG)LISP_TO_VOID(frame_obj));
FRAME_MSWINDOWS_DC(f) = GetDC (hwnd);
SetTextAlign (FRAME_MSWINDOWS_DC(f), TA_BASELINE | TA_LEFT | TA_NOUPDATECP);
+
+ if (FRAME_MSWINDOWS_POPUP (f))
+ mswindows_register_popup_frame (frame_obj);
}
static void
since we don't have X resources. This may change if we look
at the registry. Even so these values can get overridden
later.*/
- XEMACS_RECT_WH dest = { -1, -1, DEFAULT_FRAME_WIDTH,
+ XEMACS_RECT_WH dest = { -1, -1, DEFAULT_FRAME_WIDTH,
DEFAULT_FRAME_HEIGHT };
mswindows_size_frame_internal (f, &dest);
}
{
/* Don't do this earlier or we get a WM_PAINT before the frame is ready.
* The SW_x parameter in the first call that an app makes to ShowWindow is
- * ignored, and the parameter specified in the caller's STARTUPINFO is
+ * ignored, and the parameter specified in the caller's STARTUPINFO is
* substituted instead. That parameter is SW_HIDE if we were started by
* runemacs, so call this twice. #### runemacs is evil */
ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL);
int first_on_console)
{
/* Windows, unlike X, is very synchronous. After the initial
- frame is created, it will never be displayed, except for
+ frame is created, it will never be displayed, except for
hollow border, unless we start pumping messages. Load progress
messages show in the bottom of the hollow frame, which is ugly.
We redisplay the initial frame here, so modeline and root window
{
if (f->frame_data)
{
+ Lisp_Object frame;
+ XSETFRAME (frame, f);
+ mswindows_unregister_popup_frame (frame);
ReleaseDC(FRAME_MSWINDOWS_HANDLE(f), FRAME_MSWINDOWS_DC(f));
DestroyWindow(FRAME_MSWINDOWS_HANDLE(f));
xfree (f->frame_data);
if (IsIconic (FRAME_MSWINDOWS_HANDLE(f)) || IsZoomed (FRAME_MSWINDOWS_HANDLE(f)))
ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_RESTORE);
- SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
+ SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
0, 0, rect.right-rect.left, rect.bottom-rect.top,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING | SWP_NOMOVE);
}
static void
mswindows_set_frame_position (struct frame *f, int xoff, int yoff)
{
- SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
+ SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
xoff, yoff, 0, 0,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING | SWP_NOSIZE);
}
static void
-mswindows_make_frame_visible (struct frame *f)
+mswindows_make_frame_visible (struct frame *f)
{
if (!FRAME_VISIBLE_P(f))
ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_RESTORE);
}
static void
-mswindows_make_frame_invisible (struct frame *f)
+mswindows_make_frame_invisible (struct frame *f)
{
if (!FRAME_VISIBLE_P(f))
return;
UnionRect(&rc_temp, &rc_me, &rc_other);
if (!EqualRect (&rc_temp, &rc_other))
return 0;
-
+
/* Then see if any window above us obscures us */
while ((hwnd = GetWindow (hwnd, GW_HWNDPREV)) != NULL)
if (IsWindowVisible (hwnd))
{
if (!XIMAGE_INSTANCE_MSWINDOWS_ICON (f->icon))
{
- mswindows_initialize_image_instance_icon (XIMAGE_INSTANCE (f->icon),
+ mswindows_initialize_image_instance_icon (XIMAGE_INSTANCE (f->icon),
FALSE);
}
-
- SetClassLong (FRAME_MSWINDOWS_HANDLE (f), GCL_HICON,
+
+ SetClassLong (FRAME_MSWINDOWS_HANDLE (f), GCL_HICON,
(LONG) XIMAGE_INSTANCE_MSWINDOWS_ICON (f->icon));
}
}
}
static void
-mswindows_set_title_from_bufbyte (struct frame *f, Bufbyte *title)
+mswindows_enable_frame (struct frame *f)
+{
+ EnableWindow (FRAME_MSWINDOWS_HANDLE (f), TRUE);
+}
+
+static void
+mswindows_disable_frame (struct frame *f)
+{
+ EnableWindow (FRAME_MSWINDOWS_HANDLE (f), FALSE);
+}
+
+static void
+mswindows_set_title_from_bufbyte (struct frame *f, Bufbyte *title)
{
unsigned int new_checksum = hash_string (title, strlen (title));
if (new_checksum != FRAME_MSWINDOWS_TITLE_CHECKSUM(f))
if (STRINGP (val))
{
Lisp_Object frm, font_spec;
-
+
XSETFRAME (frm, f);
font_spec = Fget (Fget_face (Qdefault), Qfont, Qnil);
/* Now we've extracted the properties, apply them.
Do not apply geometric properties during frame creation. This
- is excessive anyways, and this loses becuase WM_SIZE has not
+ is excessive anyways, and this loses because WM_SIZE has not
been sent yet, so frame width and height fields are not initialized.
-
+
unfortunately WM_SIZE loses as well since the resize is only
applied once and the first time WM_SIZE is applied not everything
is initialised in the frame (toolbars for instance). enabling
int size_p = (dest->width >=0 || dest->height >=0);
int move_p = (dest->top >=0 || dest->left >=0);
char_to_real_pixel_size (f, dest->width, dest->height, &pixel_width, &pixel_height);
-
+
if (dest->width < 0)
pixel_width = FRAME_PIXWIDTH (f);
if (dest->height < 0)
dest->left = rect.left;
if (dest->top < 0)
dest->top = rect.top;
-
+
rect.left = rect.top = 0;
rect.right = pixel_width;
rect.bottom = pixel_height;
move_p=1;
}
- if (IsIconic (FRAME_MSWINDOWS_HANDLE(f))
+ if (IsIconic (FRAME_MSWINDOWS_HANDLE(f))
|| IsZoomed (FRAME_MSWINDOWS_HANDLE(f)))
ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_RESTORE);
- SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
+ SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
dest->left, dest->top, pixel_width, pixel_height,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING
| (size_p ? 0 : SWP_NOSIZE)
/*---------------------------------------------------------------------*/
/*
- * With some drvier/os combination (I discovered this with HP drviers
+ * With some driver/os combination (I discovered this with HP drivers
* under W2K), DC geometry is reset upon StartDoc and EndPage
* calls. This is called every time one of these calls is made.
*/
{
Lisp_Object frame;
XSETFRAME (frame, f);
- signal_simple_error ("Cannot resize frame (margins)"
- " after print job has started.", frame);
+ invalid_change ("Cannot resize frame (margins) after print job has started.",
+ frame);
}
static void
/* Make sure this is the only frame on device. Windows printer can
handle only one job at a time. */
if (!NILP (DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f)))))
- error ("Only one frame (print job) at a time is allowed on "
- "this printer device.");
+ invalid_operation ("Only one frame (print job) at a time is allowed on "
+ "this printer device", FRAME_DEVICE (f));
f->frame_data = xnew_and_zero (struct msprinter_frame);
frame_left = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSX),
FRAME_MSPRINTER_LEFT_MARGIN(f), 1440)
- GetDeviceCaps (hdc, PHYSICALOFFSETX));
-
+
if (FRAME_MSPRINTER_CHARWIDTH(f) > 0)
{
char_to_real_pixel_size (f, FRAME_MSPRINTER_CHARWIDTH(f), 0,
&frame_width, NULL);
- FRAME_MSPRINTER_RIGHT_MARGIN(f) =
+ FRAME_MSPRINTER_RIGHT_MARGIN(f) =
MulDiv (GetDeviceCaps (hdc, PHYSICALWIDTH)
- (frame_left + frame_width), 1440,
GetDeviceCaps (hdc, LOGPIXELSX));
- }
+ }
else
frame_width = (GetDeviceCaps (hdc, PHYSICALWIDTH)
- frame_left
char_to_real_pixel_size (f, 0, FRAME_MSPRINTER_CHARHEIGHT(f),
NULL, &frame_height);
- FRAME_MSPRINTER_BOTTOM_MARGIN(f) =
+ FRAME_MSPRINTER_BOTTOM_MARGIN(f) =
MulDiv (GetDeviceCaps (hdc, PHYSICALHEIGHT)
- (frame_top + frame_height), 1440,
GetDeviceCaps (hdc, LOGPIXELSY));
- }
+ }
else
frame_height = (GetDeviceCaps (hdc, PHYSICALHEIGHT)
- frame_top
/* Geometry sanity checks */
if (!frame_pixsize_valid_p (f, frame_width, frame_height))
- error ("Area inside print margins has shrunk to naught.");
+ invalid_operation ("Area inside print margins has shrunk to naught",
+ STRINGP (f->name) ? f->name : Qunbound);
if (frame_left < 0
|| frame_top < 0
|| frame_left + frame_width > GetDeviceCaps (hdc, HORZRES)
|| frame_top + frame_height > GetDeviceCaps (hdc, VERTRES))
- error ("Print area is ouside of the printer's hardware printable area.");
+ invalid_operation ("Print area is ouside of the printer's "
+ "hardware printable area",
+ STRINGP (f->name) ? f->name : Qunbound);
/* Apply XEmacs frame geometry and layout windows */
{
di.fwType = 0;
if (StartDoc (hdc, &di) <= 0)
- error ("Cannot start print job");
+ invalid_operation ("Cannot start print job",
+ STRINGP (f->name) ? f->name : Qunbound);
apply_dc_geometry (f);
{
/* Display frames */
CONSOLE_HAS_METHOD (mswindows, init_frame_1);
- CONSOLE_HAS_METHOD (mswindows, init_frame_2);
+ CONSOLE_HAS_METHOD (mswindows, init_frame_2);
CONSOLE_HAS_METHOD (mswindows, init_frame_3);
CONSOLE_HAS_METHOD (mswindows, after_init_frame);
CONSOLE_HAS_METHOD (mswindows, mark_frame);
CONSOLE_HAS_METHOD (mswindows, set_mouse_position);
CONSOLE_HAS_METHOD (mswindows, raise_frame);
CONSOLE_HAS_METHOD (mswindows, lower_frame);
+ CONSOLE_HAS_METHOD (mswindows, enable_frame);
+ CONSOLE_HAS_METHOD (mswindows, disable_frame);
CONSOLE_HAS_METHOD (mswindows, make_frame_visible);
CONSOLE_HAS_METHOD (mswindows, make_frame_invisible);
CONSOLE_HAS_METHOD (mswindows, iconify_frame);
CONSOLE_HAS_METHOD (mswindows, frame_visible_p);
CONSOLE_HAS_METHOD (mswindows, frame_totally_visible_p);
CONSOLE_HAS_METHOD (mswindows, frame_iconified_p);
- CONSOLE_HAS_METHOD (mswindows, set_frame_pointer);
- CONSOLE_HAS_METHOD (mswindows, set_frame_icon);
+ CONSOLE_HAS_METHOD (mswindows, set_frame_pointer);
+ CONSOLE_HAS_METHOD (mswindows, set_frame_icon);
CONSOLE_HAS_METHOD (mswindows, get_frame_parent);
CONSOLE_HAS_METHOD (mswindows, update_frame_external_traits);
CONSOLE_HAS_METHOD (mswindows, frame_size_fixed_p);
DEFVAR_LISP ("mswindows-use-system-frame-size-defaults", &Vmswindows_use_system_frame_size_defaults /*
Controls whether to use system or XEmacs defaults for frame size.
-If nil then reasonable defaults are used for intial frame sizes. If t
+If nil then reasonable defaults are used for initial frame sizes. If t
then the system will choose default sizes for the frame.
*/ );
Vmswindows_use_system_frame_size_defaults = Qnil;
-
+
DEFVAR_LISP ("default-mswindows-frame-plist", &Vdefault_mswindows_frame_plist /*
Plist of default frame-creation properties for mswindows frames.
These override what is specified in `default-frame-plist', but are
top-margin typographical unit of measurement,
right-margin equal to 1/1440 of an inch, or 1/20 of a
bottom-margin point, and roughly equal to 7/400 of a
- millimeter. If not specifified, each margin
+ millimeter. If not specified, each margin
defaults to one inch (25.4 mm).
MARGINS NOTE. right-margin and bottom-margin are overridden by
static void
tty_raise_frame_no_select (struct frame *f)
{
- Lisp_Object frame;
LIST_LOOP_2 (frame, DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f))))
{
struct frame *o = XFRAME (frame);
/* Substantially rewritten for XEmacs. */
+/* 7-8-00 !!#### This file needs definite Mule review. */
+
#include <config.h>
#include "lisp.h"
/* We used to map over all frames here and then map over all widgets
belonging to that frame. However it turns out that this was very fragile
- as it requires our display stuctures to be in sync _and_ that the
+ as it requires our display structures to be in sync _and_ that the
loop is told about every new widget somebody adds. Therefore we
now let Xt find it for us (which does a bottom-up search which
could even be faster) */
{
const char * tmp;
encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
- TO_EXTERNAL_FORMAT (C_STRING, value,
- C_STRING_ALLOCA, tmp,
- Qctext);
+ C_STRING_TO_EXTERNAL (value, tmp, Qctext);
new_XtValue = (String) tmp;
break;
}
if (XSTRING_LENGTH (prop) == 0)
continue;
- TO_EXTERNAL_FORMAT (LISP_STRING, prop,
- C_STRING_ALLOCA, extprop,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (prop, extprop, Qctext);
if (STRINGP (val))
{
const Extbyte *extval;
#endif
if (STRINGP (f->name))
- TO_EXTERNAL_FORMAT (LISP_STRING, f->name,
- C_STRING_ALLOCA, name,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (f->name, name, Qctext);
else
name = "emacs";
}
}
+static void
+x_enable_frame (struct frame *f)
+{
+ XtSetSensitive (FRAME_X_SHELL_WIDGET (f), True);
+}
+
+static void
+x_disable_frame (struct frame *f)
+{
+ XtSetSensitive (FRAME_X_SHELL_WIDGET (f), False);
+}
+
/* Change from withdrawn state to mapped state. */
static void
x_make_frame_visible (struct frame *f)
CONSOLE_HAS_METHOD (x, set_mouse_position);
CONSOLE_HAS_METHOD (x, raise_frame);
CONSOLE_HAS_METHOD (x, lower_frame);
+ CONSOLE_HAS_METHOD (x, enable_frame);
+ CONSOLE_HAS_METHOD (x, disable_frame);
CONSOLE_HAS_METHOD (x, make_frame_visible);
CONSOLE_HAS_METHOD (x, make_frame_invisible);
CONSOLE_HAS_METHOD (x, iconify_frame);
Lisp_Object Qnomini, Qvisible_nomini, Qiconic_nomini, Qinvisible_nomini;
Lisp_Object Qvisible_iconic_nomini, Qinvisible_iconic_nomini;
-Lisp_Object Qset_specifier, Qset_glyph_image, Qset_face_property;
+Lisp_Object Qset_specifier, Qset_face_property;
Lisp_Object Qface_property_instance;
Lisp_Object Qframe_property_alias;
XWINDOW (root_window)->pixel_width = 10;
XWINDOW (root_window)->pixel_height = 9;
- /* The size of the minibuffer window is now set in x_create_frame
- in xfns.c. */
-
f->root_window = root_window;
f->selected_window = root_window;
f->last_nonminibuf_window = root_window;
}
int
-device_matches_console_spec (Lisp_Object frame, Lisp_Object device,
- Lisp_Object console)
+device_matches_console_spec (Lisp_Object device, Lisp_Object console)
{
if (EQ (console, Qwindow_system))
return DEVICE_WIN_P (XDEVICE (device));
- if (NILP (console))
- console = (DEVICE_CONSOLE (XDEVICE (FRAME_DEVICE (XFRAME (frame)))));
if (DEVICEP (console))
return EQ (device, console);
if (CONSOLEP (console))
FRAMETYPE and CONSOLE control which frames and devices
are considered; see `next-frame'. */
-static Lisp_Object
-next_frame_internal (Lisp_Object frame, Lisp_Object frametype,
- Lisp_Object console, int called_from_delete_device)
+Lisp_Object
+next_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console)
{
+ Lisp_Object first = Qnil;
+ Lisp_Object devcons, concons;
int passed = 0;
- int started_over = 0;
- /* If this frame is dead, it won't be in frame_list, and we'll loop
- forever. Forestall that. */
CHECK_LIVE_FRAME (frame);
- while (1)
+ DEVICE_LOOP_NO_BREAK (devcons, concons)
{
- Lisp_Object devcons, concons;
+ Lisp_Object device = XCAR (devcons);
+ Lisp_Object frmcons;
- DEVICE_LOOP_NO_BREAK (devcons, concons)
+ if (!device_matches_console_spec (device, console))
{
- Lisp_Object device = XCAR (devcons);
- Lisp_Object frmcons;
+ if (EQ (device, FRAME_DEVICE (XFRAME (frame))))
+ passed = 1;
+ continue;
+ }
- if (!device_matches_console_spec (frame, device, console))
- continue;
+ DEVICE_FRAME_LOOP (frmcons, XDEVICE (device))
+ {
+ Lisp_Object f = XCAR (frmcons);
- DEVICE_FRAME_LOOP (frmcons, XDEVICE (device))
+ if (passed)
{
- Lisp_Object f = XCAR (frmcons);
- if (passed)
+ if (frame_matches_frametype (f, frametype))
+ return f;
+ }
+ else
+ {
+ if (EQ (frame, f))
{
- /* #### Doing this here is bad and is now
- unnecessary. The real bug was that f->iconified
- was never, ever updated unless a user explicitly
- called frame-iconified-p. That has now been
- fixed. With this change removed all of the other
- changes made to support this routine having the
- called_from_delete_device arg could be removed.
- But it is too close to release to do that now. */
-#if 0
- /* Make sure the visibility and iconified flags are
- up-to-date unless we're being deleted. */
- if (!called_from_delete_device)
- {
- Fframe_iconified_p (f);
- Fframe_visible_p (f);
- }
-#endif
-
- /* Decide whether this frame is eligible to be returned. */
-
- /* If we've looped all the way around without finding any
- eligible frames, return the original frame. */
- if (EQ (f, frame))
- return f;
-
- if (frame_matches_frametype (f, frametype))
- return f;
+ passed = 1;
+ }
+ else
+ {
+ if (NILP (first) && frame_matches_frametype (f, frametype))
+ first = f;
}
-
- if (EQ (frame, f))
- passed++;
}
}
- /* We hit the end of the list, and need to start over again. */
- if (started_over)
- return Qnil;
- started_over++;
}
-}
-Lisp_Object
-next_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console)
-{
- return next_frame_internal (frame, frametype, console, 0);
+ if (NILP (first))
+ /* We went through the whole frame list without finding a single
+ acceptable frame. Return the original frame. */
+ return frame;
+ else
+ /* There were no acceptable frames in the list after FRAME; otherwise,
+ we would have returned directly from the loop. Since FIRST is the last
+ acceptable frame in the list, return it. */
+ return first;
}
/* Return the previous frame in the frame list before FRAME.
are considered; see `next-frame'. */
Lisp_Object
-prev_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console)
+previous_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console)
{
Lisp_Object devcons, concons;
- Lisp_Object prev;
+ Lisp_Object last = Qnil;
- /* If this frame is dead, it won't be in frame_list, and we'll loop
- forever. Forestall that. */
CHECK_LIVE_FRAME (frame);
- prev = Qnil;
DEVICE_LOOP_NO_BREAK (devcons, concons)
{
Lisp_Object device = XCAR (devcons);
Lisp_Object frmcons;
- if (!device_matches_console_spec (frame, device, console))
- continue;
+ if (!device_matches_console_spec (device, console))
+ {
+ if (EQ (device, FRAME_DEVICE (XFRAME (frame)))
+ && !NILP (last))
+ return last;
+ continue;
+ }
DEVICE_FRAME_LOOP (frmcons, XDEVICE (device))
{
Lisp_Object f = XCAR (frmcons);
- if (EQ (frame, f) && !NILP (prev))
- return prev;
-
- /* Decide whether this frame is eligible to be returned,
- according to frametype. */
-
- if (frame_matches_frametype (f, frametype))
- prev = f;
-
+ if (EQ (frame, f))
+ {
+ if (!NILP (last))
+ return last;
+ }
+ else
+ {
+ if (frame_matches_frametype (f, frametype))
+ last = f;
+ }
}
}
- /* We've scanned the entire list. */
- if (NILP (prev))
+ if (NILP (last))
/* We went through the whole frame list without finding a single
acceptable frame. Return the original frame. */
return frame;
else
/* There were no acceptable frames in the list before FRAME; otherwise,
- we would have returned directly from the loop. Since PREV is the last
+ we would have returned directly from the loop. Since LAST is the last
acceptable frame in the list, return it. */
- return prev;
+ return last;
}
DEFUN ("next-frame", Fnext_frame, 0, 3, 0, /*
{
XSETFRAME (frame, decode_frame (frame));
- return prev_frame (frame, frametype, console);
+ return previous_frame (frame, frametype, console);
}
/* Return any frame for which PREDICATE is non-zero, or return Qnil
(Exception: if F is a stream frame, it's OK to delete if
any other frames exist.) */
-static int
-other_visible_frames_internal (struct frame *f, int called_from_delete_device)
+int
+other_visible_frames (struct frame *f)
{
Lisp_Object frame;
XSETFRAME (frame, f);
if (FRAME_STREAM_P (f))
- return !EQ (frame, next_frame_internal (frame, Qt, Qt,
- called_from_delete_device));
- return !EQ (frame, next_frame_internal (frame, Qvisible_iconic_nomini, Qt,
- called_from_delete_device));
-}
-
-int
-other_visible_frames (struct frame *f)
-{
- return other_visible_frames_internal (f, 0);
+ return !EQ (frame, next_frame (frame, Qt, Qt));
+ return !EQ (frame, next_frame (frame, Qvisible_iconic_nomini, Qt));
}
/* Delete frame F.
losing any way of communicating with the still running XEmacs process.
So we put it back. */
if (!force && !allow_deletion_of_last_visible_frame &&
- !other_visible_frames_internal (f, called_from_delete_device))
+ !other_visible_frames (f))
error ("Attempt to delete the sole visible or iconified frame");
/* Does this frame have a minibuffer, and is it the surrogate
next = DEVMETH_OR_GIVEN (d, get_frame_parent, (f), Qnil);
if (NILP (next) || EQ (next, frame) || ! FRAME_LIVE_P (XFRAME (next)))
- next = next_frame_internal (frame, Qvisible, device,
- called_from_delete_device);
+ next = next_frame (frame, Qvisible, device);
if (NILP (next) || EQ (next, frame))
- next = next_frame_internal (frame, Qvisible, console,
- called_from_delete_device);
+ next = next_frame (frame, Qvisible, console);
if (NILP (next) || EQ (next, frame))
- next = next_frame_internal (frame, Qvisible, Qt,
- called_from_delete_device);
+ next = next_frame (frame, Qvisible, Qt);
if (NILP (next) || EQ (next, frame))
- next = next_frame_internal (frame, Qt, device,
- called_from_delete_device);
+ next = next_frame (frame, Qt, device);
if (NILP (next) || EQ (next, frame))
- next = next_frame_internal (frame, Qt, console,
- called_from_delete_device);
+ next = next_frame (frame, Qt, console);
if (NILP (next) || EQ (next, frame))
- next = next_frame_internal (frame, Qt, Qt, called_from_delete_device);
+ next = next_frame (frame, Qt, Qt);
/* if we haven't found another frame at this point
then there aren't any. */
*/
if (!EQ (device, FRAME_DEVICE(XFRAME(next))))
{
- Lisp_Object next_f =
- next_frame_internal (frame, Qt, device,
- called_from_delete_device);
+ Lisp_Object next_f = next_frame (frame, Qt, device);
if (NILP (next_f) || EQ (next_f, frame))
set_device_selected_frame (d, Qnil);
else
/* 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
+ instances. Thus we loop over all instance caches calling the
finalize method for each instance. */
- free_frame_subwindow_instance_cache (f);
+ free_frame_subwindow_instances (f);
/* This must be done before the window and window_mirror structures
are freed. The scrollbar information is attached to them. */
DEFUN ("mouse-pixel-position", Fmouse_pixel_position, 0, 1, 0, /*
Return a list (WINDOW X . Y) giving the current mouse window and position.
-The position is given in pixel units, where (0, 0) is the upper-left corner.
+The position is given in pixel units, where (0, 0) is the upper-left corner
+of the window.
When the cursor is not over a window, the return value is a list (nil nil).
DEVICE specifies the device on which to read the mouse position, and
defaults to the selected device. If the device is a mouseless terminal
-or Emacs hasn't been programmed to read its mouse position, it returns
+or XEmacs hasn't been programmed to read its mouse position, it returns
the device's selected window for WINDOW and nil for X and Y.
*/
(device))
return Qnil;
}
+\f
+DEFUN ("disable-frame", Fdisable_frame, 1, 1, 0, /*
+Disable frame FRAME, so that it cannot have the focus or receive user input.
+This is normally used during modal dialog boxes.
+WARNING: Be very careful not to wedge XEmacs!
+Use an `unwind-protect' that re-enables the frame to avoid this.
+*/
+ (frame))
+{
+ struct frame *f = decode_frame (frame);
+
+ f->disabled = 1;
+ MAYBE_FRAMEMETH (f, disable_frame, (f));
+ return Qnil;
+}
+
+DEFUN ("enable-frame", Fenable_frame, 1, 1, 0, /*
+Enable frame FRAME, so that it can have the focus and receive user input.
+Frames are normally enabled, unless explicitly disabled using `disable-frame'.
+*/
+ (frame))
+{
+ struct frame *f = decode_frame (frame);
+ f->disabled = 0;
+ MAYBE_FRAMEMETH (f, enable_frame, (f));
+ return Qnil;
+}
+
/* Ben thinks there is no need for `redirect-frame-focus' or `frame-focus',
crockish FSFmacs functions. See summary on focus in event-stream.c. */
\f
{
/* Adjust for gutters here so that we always get set
properly. */
- new_pixheight -=
+ new_pixheight -=
(FRAME_TOP_GUTTER_BOUNDS (f)
+ FRAME_BOTTOM_GUTTER_BOUNDS (f));
- XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top
+ XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top
= FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f);
if (FRAME_HAS_MINIBUF_P (f)
XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top =
FRAME_TOP_BORDER_END (f) +
- FRAME_TOP_GUTTER_BOUNDS (f) +
+ FRAME_TOP_GUTTER_BOUNDS (f) +
FRAME_BOTTOM_GUTTER_BOUNDS (f) +
new_pixheight - minibuf_height;
{
/* Adjust for gutters here so that we always get set
properly. */
- new_pixwidth -=
+ new_pixwidth -=
(FRAME_LEFT_GUTTER_BOUNDS (f)
+ FRAME_RIGHT_GUTTER_BOUNDS (f));
-
- XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left =
+
+ XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left =
FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f);
set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0);
defsymbol (&Qborder_width, "border-width");
/* Qwidth, Qheight, Qleft, Qtop in general.c */
defsymbol (&Qset_specifier, "set-specifier");
- defsymbol (&Qset_glyph_image, "set-glyph-image");
defsymbol (&Qset_face_property, "set-face-property");
defsymbol (&Qface_property_instance, "face-property-instance");
defsymbol (&Qframe_property_alias, "frame-property-alias");
DEFSUBR (Fvisible_frame_list);
DEFSUBR (Fraise_frame);
DEFSUBR (Flower_frame);
+ DEFSUBR (Fdisable_frame);
+ DEFSUBR (Fenable_frame);
DEFSUBR (Fframe_property);
DEFSUBR (Fframe_properties);
DEFSUBR (Fset_frame_properties);
/* one-bit flags: */
+ /* Is focusing onto this frame disabled? (Modal dialog boxes) */
+ unsigned int disabled :1;
+
/* Are we finished initializing? */
unsigned int init_finished :1;
DECLARE_LRECORD (frame, struct frame);
#define XFRAME(x) XRECORD (x, frame, struct frame)
#define XSETFRAME(x, p) XSETRECORD (x, p, frame)
+#define wrap_frame(p) wrap_object (p)
#define FRAMEP(x) RECORDP (x, frame)
#define CHECK_FRAME(x) CHECK_RECORD (x, frame)
#define CONCHECK_FRAME(x) CONCHECK_RECORD (x, frame)
void update_frame_title (struct frame *f);
Lisp_Object next_frame (Lisp_Object f, Lisp_Object frametype,
Lisp_Object console);
-Lisp_Object prev_frame (Lisp_Object f, Lisp_Object frametype,
- Lisp_Object console);
+Lisp_Object previous_frame (Lisp_Object f, Lisp_Object frametype,
+ Lisp_Object console);
void pixel_to_char_size (struct frame *f, int pixel_width, int pixel_height,
int *char_width, int *char_height);
void char_to_pixel_size (struct frame *f, int char_width, int char_height,
void io_error_delete_frame (Lisp_Object frame);
Lisp_Object find_some_frame (int (*predicate) (Lisp_Object, void *),
void *closure);
-int device_matches_console_spec (Lisp_Object frame, Lisp_Object device,
- Lisp_Object console);
+int device_matches_console_spec (Lisp_Object device, Lisp_Object console);
Lisp_Object frame_first_window (struct frame *f);
int show_gc_cursor (struct frame *f, Lisp_Object cursor);
void set_frame_selected_window (struct frame *f, Lisp_Object window);
/* Commonly-used symbols
Copyright (C) 1995 Sun Microsystems.
- Copyright (C) 1995, 1996 Ben Wing.
+ Copyright (C) 1995, 1996, 2000 Ben Wing.
This file is part of XEmacs.
/* Synched up with: Not in FSF. */
-/* The purpose of this file is as a central place to stick symbols
- that don't have any obvious connection to any particular module
- and might be used in many different contexts.
-
- #### More should be put here.
- */
+/* See general-slots.h.
+*/
#include <config.h>
#include "lisp.h"
-Lisp_Object Qabort;
-Lisp_Object Qactually_requested;
-Lisp_Object Qafter;
-Lisp_Object Qall;
-Lisp_Object Qand;
-Lisp_Object Qappend;
-Lisp_Object Qassoc;
-Lisp_Object Qat;
-Lisp_Object Qautodetect;
-Lisp_Object Qbad_variable;
-Lisp_Object Qbefore;
-Lisp_Object Qbinary;
-Lisp_Object Qbitmap;
-Lisp_Object Qboolean;
-Lisp_Object Qbottom;
-Lisp_Object Qbottom_margin;
-Lisp_Object Qbuffer;
-Lisp_Object Qbutton;
-Lisp_Object Qcancel;
-Lisp_Object Qcategory;
-Lisp_Object Qcenter;
-Lisp_Object Qchannel;
-Lisp_Object Qchar;
-Lisp_Object Qcharacter;
-Lisp_Object Qchars;
-Lisp_Object Qcolor;
-Lisp_Object Qcolumns;
-Lisp_Object Qcommand;
-Lisp_Object Qconsole;
-Lisp_Object Qcopies;
-Lisp_Object Qcritical;
-Lisp_Object Qctext;
-Lisp_Object Qcursor;
-Lisp_Object Qdata;
-Lisp_Object Qdead;
-Lisp_Object Qdefault;
-Lisp_Object Qdelete;
-Lisp_Object Qdelq;
-Lisp_Object Qdevice;
-Lisp_Object Qdialog;
-Lisp_Object Qdimension;
-Lisp_Object Qdisplay;
-Lisp_Object Qdoc_string;
-Lisp_Object Qduplex;
-Lisp_Object Qdynarr_overhead;
-Lisp_Object Qempty;
-Lisp_Object Qeq;
-Lisp_Object Qeql;
-Lisp_Object Qequal;
-Lisp_Object Qeval;
-Lisp_Object Qextents;
-Lisp_Object Qface;
-Lisp_Object Qfile_name;
-Lisp_Object Qfont;
-Lisp_Object Qframe;
-Lisp_Object Qfrom_page;
-Lisp_Object Qfull_assoc;
-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 Qinteger;
-Lisp_Object Qinternal;
-Lisp_Object Qkey;
-Lisp_Object Qkey_assoc;
-Lisp_Object Qkeyboard;
-Lisp_Object Qkeymap;
-Lisp_Object Qlandscape;
-Lisp_Object Qlast_command;
-Lisp_Object Qleft;
-Lisp_Object Qleft_margin;
-Lisp_Object Qlet;
-Lisp_Object Qlist;
-Lisp_Object Qmagic;
-Lisp_Object Qmalloc_overhead;
-Lisp_Object Qmarkers;
-Lisp_Object Qmax;
-Lisp_Object Qmemory;
-Lisp_Object Qmenubar;
-Lisp_Object Qmessage;
-Lisp_Object Qminus;
-Lisp_Object Qmodifiers;
-Lisp_Object Qmotion;
-Lisp_Object Qmsprinter;
-Lisp_Object Qmswindows;
-Lisp_Object Qname;
-Lisp_Object Qno;
-Lisp_Object Qnone;
-Lisp_Object Qnot;
-Lisp_Object Qnothing;
-Lisp_Object Qnotice;
-Lisp_Object Qobject;
-Lisp_Object Qok;
-Lisp_Object Qold_assoc;
-Lisp_Object Qold_delete;
-Lisp_Object Qold_delq;
-Lisp_Object Qold_rassoc;
-Lisp_Object Qold_rassq;
-Lisp_Object Qonly;
-Lisp_Object Qor;
-Lisp_Object Qorientation;
-Lisp_Object Qother;
-Lisp_Object Qpointer;
-Lisp_Object Qpopup;
-Lisp_Object Qportrait;
-Lisp_Object Qprint;
-Lisp_Object Qprinter;
-Lisp_Object Qprocess;
-Lisp_Object Qprovide;
-Lisp_Object Qrassoc;
-Lisp_Object Qrassq;
-Lisp_Object Qrequire;
-Lisp_Object Qresource;
-Lisp_Object Qretry;
-Lisp_Object Qreturn;
-Lisp_Object Qreverse;
-Lisp_Object Qright;
-Lisp_Object Qright_margin;
-Lisp_Object Qsearch;
-Lisp_Object Qselected;
-Lisp_Object Qsignal;
-Lisp_Object Qsimple;
-Lisp_Object Qsize;
-Lisp_Object Qspace;
-Lisp_Object Qspecifier;
-Lisp_Object Qstream;
-Lisp_Object Qstring;
-Lisp_Object Qsymbol;
-Lisp_Object Qsyntax;
-Lisp_Object Qterminal;
-Lisp_Object Qtest;
-Lisp_Object Qtext;
-Lisp_Object Qthis_command;
-Lisp_Object Qtimeout;
-Lisp_Object Qtimestamp;
-Lisp_Object Qtoolbar;
-Lisp_Object Qtop;
-Lisp_Object Qtop_margin;
-Lisp_Object Qto_page;
-Lisp_Object Qtty;
-Lisp_Object Qtype;
-Lisp_Object Qundecided;
-Lisp_Object Qundefined;
-Lisp_Object Qunimplemented;
-Lisp_Object Qvalue_assoc;
-Lisp_Object Qvertical;
-Lisp_Object Qwarning;
-Lisp_Object Qwidget;
-Lisp_Object Qwidth;
-Lisp_Object Qwindow;
-Lisp_Object Qwindow_system;
-Lisp_Object Qx;
-Lisp_Object Qy;
-Lisp_Object Qyes;
+#define SYMBOL(fou) Lisp_Object fou
+#define SYMBOL_KEYWORD(la_cle_est_fou) Lisp_Object la_cle_est_fou
+#define SYMBOL_GENERAL(tout_le_monde, est_fou) Lisp_Object tout_le_monde
+
+#include "general-slots.h"
+
+#undef SYMBOL
+#undef SYMBOL_KEYWORD
+#undef SYMBOL_GENERAL
void
syms_of_general (void)
{
- defsymbol (&Qabort, "abort");
- defsymbol (&Qactually_requested, "actually-requested");
- defsymbol (&Qafter, "after");
- defsymbol (&Qall, "all");
- defsymbol (&Qand, "and");
- defsymbol (&Qappend, "append");
- defsymbol (&Qassoc, "assoc");
- defsymbol (&Qat, "at");
- defsymbol (&Qautodetect, "autodetect");
- defsymbol (&Qbad_variable, "bad-variable");
- defsymbol (&Qbefore, "before");
- defsymbol (&Qbinary, "binary");
- defsymbol (&Qbitmap, "bitmap");
- defsymbol (&Qboolean, "boolean");
- defsymbol (&Qbottom, "bottom");
- defsymbol (&Qbottom_margin, "bottom-margin");
- defsymbol (&Qbuffer, "buffer");
- defsymbol (&Qbutton, "button");
- defsymbol (&Qcancel, "cancel");
- defsymbol (&Qcategory, "category");
- defsymbol (&Qcenter, "center");
- defsymbol (&Qchannel, "channel");
- defsymbol (&Qchar, "char");
- defsymbol (&Qcharacter, "character");
- defsymbol (&Qchars, "chars");
- defsymbol (&Qcolor, "color");
- defsymbol (&Qcolumns, "columns");
- defsymbol (&Qcommand, "command");
- defsymbol (&Qconsole, "console");
- defsymbol (&Qcopies, "copies");
- defsymbol (&Qcritical, "critical");
- defsymbol (&Qctext, "ctext");
- defsymbol (&Qcursor, "cursor");
- defsymbol (&Qdata, "data");
- defsymbol (&Qdead, "dead");
- defsymbol (&Qdefault, "default");
- defsymbol (&Qdelete, "delete");
- defsymbol (&Qdelq, "delq");
- defsymbol (&Qdevice, "device");
- defsymbol (&Qdialog, "dialog");
- defsymbol (&Qdimension, "dimension");
- defsymbol (&Qdisplay, "display");
- defsymbol (&Qdoc_string, "doc-string");
- defsymbol (&Qduplex, "duplex");
- defsymbol (&Qdynarr_overhead, "dynarr-overhead");
- defsymbol (&Qempty, "empty");
- defsymbol (&Qeq, "eq");
- defsymbol (&Qeql, "eql");
- defsymbol (&Qequal, "equal");
- defsymbol (&Qeval, "eval");
- defsymbol (&Qextents, "extents");
- defsymbol (&Qface, "face");
- defsymbol (&Qfile_name, "file-name");
- defsymbol (&Qfont, "font");
- defsymbol (&Qframe, "frame");
- defsymbol (&Qfrom_page, "from-page");
- defsymbol (&Qfunction, "function");
- defsymbol (&Qfull_assoc, "full-assoc");
- 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 (&Qinteger, "integer");
- defsymbol (&Qinternal, "internal");
- defsymbol (&Qkey, "key");
- defsymbol (&Qkey_assoc, "key-assoc");
- defsymbol (&Qkeyboard, "keyboard");
- defsymbol (&Qkeymap, "keymap");
- defsymbol (&Qlandscape, "landscape");
- defsymbol (&Qlast_command, "last-command");
- defsymbol (&Qleft, "left");
- defsymbol (&Qleft_margin, "left-margin");
- defsymbol (&Qlet, "let");
- defsymbol (&Qlist, "list");
- defsymbol (&Qmagic, "magic");
- defsymbol (&Qmalloc_overhead, "malloc-overhead");
- defsymbol (&Qmarkers, "markers");
- defsymbol (&Qmax, "max");
- defsymbol (&Qmemory, "memory");
- defsymbol (&Qmenubar, "menubar");
- defsymbol (&Qmessage, "message");
- defsymbol (&Qminus, "-");
- defsymbol (&Qmodifiers, "modifiers");
- defsymbol (&Qmotion, "motion");
- 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 (&Qold_rassoc, "old-rassoc");
- defsymbol (&Qold_rassq, "old-rassq");
- defsymbol (&Qonly, "only");
- defsymbol (&Qor, "or");
- defsymbol (&Qorientation, "orientation");
- defsymbol (&Qother, "other");
- defsymbol (&Qpointer, "pointer");
- defsymbol (&Qpopup, "popup");
- defsymbol (&Qportrait, "portrait");
- defsymbol (&Qprint, "print");
- defsymbol (&Qprinter, "printer");
- defsymbol (&Qprocess, "process");
- defsymbol (&Qprovide, "provide");
- defsymbol (&Qrassoc, "rassoc");
- defsymbol (&Qrassq, "rassq");
- defsymbol (&Qrequire, "require");
- defsymbol (&Qresource, "resource");
- defsymbol (&Qretry, "retry");
- defsymbol (&Qreturn, "return");
- defsymbol (&Qreverse, "reverse");
- defsymbol (&Qright, "right");
- defsymbol (&Qright_margin, "right-margin");
- defsymbol (&Qsearch, "search");
- defsymbol (&Qselected, "selected");
- defsymbol (&Qsignal, "signal");
- defsymbol (&Qsimple, "simple");
- defsymbol (&Qsize, "size");
- defsymbol (&Qspace, "space");
- defsymbol (&Qspecifier, "specifier");
- defsymbol (&Qstream, "stream");
- defsymbol (&Qstring, "string");
- defsymbol (&Qsymbol, "symbol");
- defsymbol (&Qsyntax, "syntax");
- defsymbol (&Qterminal, "terminal");
- defsymbol (&Qtest, "test");
- defsymbol (&Qtext, "text");
- defsymbol (&Qthis_command, "this-command");
- defsymbol (&Qtimeout, "timeout");
- defsymbol (&Qtimestamp, "timestamp");
- defsymbol (&Qtoolbar, "toolbar");
- defsymbol (&Qtop, "top");
- defsymbol (&Qtop_margin, "top-margin");
- defsymbol (&Qto_page, "to-page");
- defsymbol (&Qtty, "tty");
- defsymbol (&Qtype, "type");
- defsymbol (&Qundecided, "undecided");
- defsymbol (&Qundefined, "undefined");
- defsymbol (&Qunimplemented, "unimplemented");
- defsymbol (&Qvalue_assoc, "value-assoc");
- defsymbol (&Qvertical, "vertical");
- defsymbol (&Qwarning, "warning");
- defsymbol (&Qwidget, "widget");
- defsymbol (&Qwidth, "width");
- defsymbol (&Qwindow, "window");
- defsymbol (&Qwindow_system, "window-system");
- defsymbol (&Qx, "x");
- defsymbol (&Qy, "y");
- defsymbol (&Qyes, "yes");
+#define SYMBOL(loco) DEFSYMBOL (loco)
+#define SYMBOL_KEYWORD(meshugeneh) DEFKEYWORD (meshugeneh)
+#define SYMBOL_GENERAL(vachement, fou) defsymbol (&vachement, fou)
+
+#include "general-slots.h"
+
+#undef SYMBOL
+#undef SYMBOL_KEYWORD
+#undef SYMBOL_GENERAL
}
sony_news NEWS-OS (works at least for 4.1C)
UMAX
UMAX4_3
- WIN32_NATIVE No-op for Windows95/NT.
+ WIN32_NATIVE No-op for Windows9x/NT.
+ CYGWIN No-op for Cygwin.
__linux__ Linux: assumes /proc filesystem mounted.
Support from Michael K. Johnson.
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
#include "lisp.h"
#include "sysfile.h" /* for encapsulated open, close, read, write */
-#ifndef WIN32_NATIVE
-#ifndef CYGWIN
-
-#include <sys/types.h>
-
-/* Both the Emacs and non-Emacs sections want this. Some
- configuration files' definitions for the LOAD_AVE_CVT macro (like
- sparc.h's) use macros like FSCALE, defined here. */
-#ifdef unix
-#include <sys/param.h>
-#endif
-
-
-/* Exclude all the code except the test program at the end
- if the system has its own `getloadavg' function.
-
- The declaration of `errno' is needed by the test program
- as well as the function itself, so it comes first. */
-
-#include <errno.h>
-
#ifndef HAVE_GETLOADAVG
/* The existing Emacs configuration files define a macro called
#include <sys/pstat.h>
#endif /* HAVE_SYS_PSTAT_H (on HPUX) */
-#if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION)
-#include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif
\f
/* Avoid static vars inside a function since in HPUX they dump as pure. */
Return the number written (never more than 3, but may be less than NELEM),
or -1 if an error occurred. */
+int getloadavg (double loadavg[], int nelem);
+
int
getloadavg (double loadavg[], int nelem)
{
: (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
#endif /* OSF_MIPS */
-#if !defined (LDAV_DONE) && defined (WIN32_NATIVE)
+#if !defined (LDAV_DONE) && (defined (WIN32_NATIVE) || defined (CYGWIN))
#define LDAV_DONE
/* A faithful emulation is going to have to be saved for a rainy day. */
{
loadavg[elem] = 0.0;
}
-#endif /* WIN32_NATIVE */
+#endif /* WIN32_NATIVE or CYGWIN */
#if !defined (LDAV_DONE) && defined (OSF_ALPHA)
#define LDAV_DONE
exit (0);
}
#endif /* TEST */
-
-#else
-
-/* Emulate getloadavg. */
-int
-getloadavg (double loadavg[], int nelem)
-{
- int i;
-
- /* A faithful emulation is going to have to be saved for a rainy day. */
- for (i = 0; i < nelem; i++)
- {
- loadavg[i] = 0.0;
- }
- return i;
-}
-
-#endif /*__GNUWIN32__*/
-#endif /* WIN32_NATIVE */
}
static Lisp_Object
-jpeg_normalize (Lisp_Object inst, Lisp_Object console_type)
+jpeg_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
return simple_image_type_normalize (inst, console_type, Qjpeg);
}
}
static Lisp_Object
-gif_normalize (Lisp_Object inst, Lisp_Object console_type)
+gif_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
return simple_image_type_normalize (inst, console_type, Qgif);
}
}
static Lisp_Object
-png_normalize (Lisp_Object inst, Lisp_Object console_type)
+png_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
return simple_image_type_normalize (inst, console_type, Qpng);
}
}
static Lisp_Object
-tiff_normalize (Lisp_Object inst, Lisp_Object console_type)
+tiff_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
return simple_image_type_normalize (inst, console_type, Qtiff);
}
mem_struct.len = len;
mem_struct.index = 0;
- unwind.tiff = TIFFClientOpen ("memfile", "r", &mem_struct,
+ unwind.tiff = TIFFClientOpen ("memfile", "r", (thandle_t) &mem_struct,
(TIFFReadWriteProc)tiff_memory_read,
(TIFFReadWriteProc)tiff_memory_write,
tiff_memory_seek, tiff_memory_close, tiff_memory_size,
static void init_image_instance_geometry (Lisp_Image_Instance *ii)
{
struct device *d = DOMAIN_XDEVICE (ii->domain);
-
+
if (/* #### Scaleable && */ DEVICE_MSPRINTER_P (d))
{
HDC printer_dc = DEVICE_MSPRINTER_HCDC (d);
IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii);
IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) =
IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii);
- }
+ }
}
#define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3)))
}
#if 0 /* Currently unused */
-/* #### Warining: This function is not correct anymore with
+/* #### Warning: This function is not correct anymore with
resizable printer bitmaps. If you uncomment it, clean it. --kkm */
int
mswindows_resize_dibitmap_instance (Lisp_Image_Instance* ii,
}
static Lisp_Object
-bmp_normalize (Lisp_Object inst, Lisp_Object console_type)
+bmp_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
return simple_image_type_normalize (inst, console_type, Qbmp);
}
}
static Lisp_Object
-mswindows_resource_normalize (Lisp_Object inst, Lisp_Object console_type)
+mswindows_resource_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
/* This function can call lisp */
Lisp_Object file = Qnil;
signal_simple_error ("Invalid resource identifier", resource_id);
/* load the image */
- if (!(himage = LoadImage (hinst, resid, type, 0, 0,
- LR_CREATEDIBSECTION | LR_DEFAULTSIZE |
- LR_SHARED |
- (!NILP (file) ? LR_LOADFROMFILE : 0))))
+ if (xLoadImageA) /* not in NT 3.5 */
+ {
+ if (!(himage = xLoadImageA (hinst, resid, type, 0, 0,
+ LR_CREATEDIBSECTION | LR_DEFAULTSIZE |
+ LR_SHARED |
+ (!NILP (file) ? LR_LOADFROMFILE : 0))))
+ signal_simple_error ("Cannot load image", instantiator);
+ }
+ else
{
- signal_simple_error ("Cannot load image", instantiator);
+ /* Is this correct? I don't really care. */
+ switch (type)
+ {
+ case IMAGE_BITMAP:
+ himage = LoadBitmap (hinst, resid);
+ break;
+ case IMAGE_CURSOR:
+ himage = LoadCursor (hinst, resid);
+ break;
+ case IMAGE_ICON:
+ himage = LoadIcon (hinst, resid);
+ break;
+ }
+
+ if (!himage)
+ signal_simple_error ("Cannot load image", instantiator);
}
if (hinst)
static HDWP
begin_defer_window_pos (struct frame *f)
{
+#ifdef DEFER_WINDOW_POS
if (FRAME_MSWINDOWS_DATA (f)->hdwp == 0)
FRAME_MSWINDOWS_DATA (f)->hdwp = BeginDeferWindowPos (10);
+#endif
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))
{
+#ifdef DEFER_WINDOW_POS
struct frame *f = XFRAME (IMAGE_INSTANCE_FRAME (p));
HDWP hdwp = begin_defer_window_pos (f);
HDWP new_hdwp;
else
hdwp = new_hdwp;
FRAME_MSWINDOWS_DATA (f)->hdwp = hdwp;
+#else
+ SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p),
+ NULL,
+ 0, 0, 0, 0,
+ SWP_HIDEWINDOW | SWP_NOACTIVATE |
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER );
+#endif
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)
{
+#ifdef DEFER_WINDOW_POS
struct frame *f = XFRAME (IMAGE_INSTANCE_FRAME (p));
HDWP hdwp = begin_defer_window_pos (f);
HDWP new_hdwp;
+#endif
/* 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. */
- 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;
+ if (!IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (p))
+ {
+#ifdef DEFER_WINDOW_POS
+ 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;
+#else
+ SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p),
+ NULL,
+ 0, 0, 0, 0,
+ SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE
+ | SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOACTIVATE);
+#endif
+ }
}
/* resize the subwindow instance */
/* Simply resize the window here. */
static void
-mswindows_update_subwindow (Lisp_Image_Instance *p)
+mswindows_redisplay_subwindow (Lisp_Image_Instance *p)
{
mswindows_resize_subwindow (p,
IMAGE_INSTANCE_WIDTH (p),
/* when you click on a widget you may activate another widget this
needs to be checked and all appropriate widgets updated */
static void
-mswindows_update_widget (Lisp_Image_Instance *p)
+mswindows_redisplay_widget (Lisp_Image_Instance *p)
{
/* Possibly update the face font and colors. */
if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (p))
/* Possibly update the dimensions. */
if (IMAGE_INSTANCE_SIZE_CHANGED (p))
{
- mswindows_resize_subwindow (p,
+ mswindows_resize_subwindow (p,
IMAGE_INSTANCE_WIDTH (p),
IMAGE_INSTANCE_HEIGHT (p));
}
}
}
-/* register widgets into our hastable so that we can cope with the
+/* register widgets into our hashtable so that we can cope with the
callbacks. The hashtable is weak so deregistration is handled
automatically */
static int
SendMessage (wnd, WM_SETFONT,
(WPARAM) mswindows_widget_hfont (ii, domain),
MAKELPARAM (TRUE, 0));
+#if 0
+ /* #### doesn't work. need to investigate more closely. */
+ if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (ii))
+ SetFocus (wnd);
+#endif
}
/* Instantiate a native layout widget. */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, domain, "STATIC",
+ 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,
+ (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) | DS_CONTROL,
0);
}
/* Update the state of a button. */
static void
-mswindows_button_update (Lisp_Object image_instance)
+mswindows_button_redisplay (Lisp_Object image_instance)
{
/* This function can GC if IN_REDISPLAY is false. */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
{
HWND wnd;
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Object val;
mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, PROGRESS_CLASS,
WS_BORDER | PBS_SMOOTH, WS_EX_CLIENTEDGE);
(XIMAGE_INSTANCE_WIDGET_FACE (ii),
XIMAGE_INSTANCE_FRAME (ii))))));
#endif
+ val = XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEMS (ii))->value;
+ CHECK_INT (val);
+ SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
+ PBM_SETPOS, (WPARAM)XINT (val), 0);
}
/* instantiate a tree view widget */
}
}
+/* Set the properties of a tree view. */
+static void
+mswindows_tree_view_redisplay (Lisp_Object image_instance)
+{
+ /* This function can GC if IN_REDISPLAY is false. */
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
+ {
+ HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+ Lisp_Object rest;
+ HTREEITEM parent;
+ /* Delete previous items. */
+ SendMessage (wnd, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT);
+ /* define a root */
+ parent = add_tree_item (image_instance, wnd, NULL,
+ XCAR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)),
+ TRUE, IMAGE_INSTANCE_DOMAIN (ii));
+
+ /* recursively add items to the tree view */
+ /* add items to the tab */
+ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ {
+ if (LISTP (XCAR (rest)))
+ add_tree_item_list (image_instance, wnd, parent, XCAR (rest),
+ IMAGE_INSTANCE_DOMAIN (ii));
+ else
+ add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE,
+ IMAGE_INSTANCE_DOMAIN (ii));
+ }
+ }
+}
+
/* instantiate a tab control */
-static TC_ITEM* add_tab_item (Lisp_Object image_instance,
- HWND wnd, Lisp_Object item,
- Lisp_Object domain, int i)
+static int
+add_tab_item (Lisp_Object image_instance,
+ HWND wnd, Lisp_Object item,
+ Lisp_Object domain, int i)
{
- TC_ITEM tvitem, *ret;
+ TC_ITEM tvitem;
+ int ret = 0;
tvitem.mask = TCIF_TEXT;
tvitem.cchTextMax = strlen (tvitem.pszText);
- if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM,
- i, (LPARAM)&tvitem)) < 0)
+ if ((ret = SendMessage (wnd, TCM_INSERTITEM,
+ i, (LPARAM)&tvitem)) < 0)
signal_simple_error ("error adding tab entry", item);
return ret;
/* add items to the tab */
LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
- add_tab_item (image_instance, wnd, XCAR (rest), domain, i);
+ int idx = add_tab_item (image_instance, wnd, XCAR (rest), domain, i);
+ assert (idx == i);
if (gui_item_selected_p (XCAR (rest)))
selected = i;
i++;
SendMessage (wnd, TCM_SETCURSEL, selected, 0);
}
-/* set the properties of a tab control */
+/* Set the properties of a tab control. */
static void
-mswindows_tab_control_update (Lisp_Object image_instance)
+mswindows_tab_control_redisplay (Lisp_Object image_instance)
{
/* This function can GC if IN_REDISPLAY is false. */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-
- if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("tab control %p redisplayed\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
+#endif
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)
+ ||
+ IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii))
{
HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
int i = 0, selected = 0;
Lisp_Object rest;
- /* delete the pre-existing items */
- SendMessage (wnd, TCM_DELETEALLITEMS, 0, 0);
+ assert (!NILP (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
- /* add items to the tab */
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ /* If only the order has changed then simply select the first
+ one. This stops horrendous rebuilding of the tabs each time
+ you click on one. */
+ if (tab_control_order_only_changed (image_instance))
{
- add_tab_item (image_instance, wnd, XCAR (rest),
- IMAGE_INSTANCE_FRAME (ii), i);
- if (gui_item_selected_p (XCAR (rest)))
- selected = i;
- i++;
+ Lisp_Object selected =
+ gui_item_list_find_selected
+ (NILP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)) ?
+ XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)) :
+ XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
+
+ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ {
+ if (gui_item_equal_sans_selected (XCAR (rest), selected, 0))
+ {
+ Lisp_Object old_selected = gui_item_list_find_selected
+ (XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
+
+ /* Pick up the new selected item. */
+ XGUI_ITEM (old_selected)->selected =
+ XGUI_ITEM (XCAR (rest))->selected;
+ XGUI_ITEM (XCAR (rest))->selected =
+ XGUI_ITEM (selected)->selected;
+ /* We're not actually changing the items. */
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 0;
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil;
+
+ SendMessage (wnd, TCM_SETCURSEL, i, 0);
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("tab control %p selected item %d\n",
+ IMAGE_INSTANCE_SUBWINDOW_ID (ii), i);
+#endif
+ break;
+ }
+ i++;
+ }
+ }
+ else
+ {
+ /* delete the pre-existing items */
+ SendMessage (wnd, TCM_DELETEALLITEMS, 0, 0);
+
+ /* add items to the tab */
+ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ {
+ add_tab_item (image_instance, wnd, XCAR (rest),
+ IMAGE_INSTANCE_FRAME (ii), i);
+ if (gui_item_selected_p (XCAR (rest)))
+ selected = i;
+ i++;
+ }
+ SendMessage (wnd, TCM_SETCURSEL, selected, 0);
}
- SendMessage (wnd, TCM_SETCURSEL, selected, 0);
}
}
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
HWND wnd;
Lisp_Object rest;
- Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties),
- Q_items, Qnil);
+ Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
int len, height;
/* Maybe ought to generalise this more but it may be very windows
/* We now have everything right apart from the height. */
default_face_font_info (domain, 0, 0, &height, 0, 0);
- GET_LIST_LENGTH (data, len);
+ GET_LIST_LENGTH (items, len);
height = (height + WIDGET_BORDER_HEIGHT * 2 ) * len;
IMAGE_INSTANCE_HEIGHT (ii) = height;
image_instance_layout (image_instance,
IMAGE_UNSPECIFIED_GEOMETRY,
IMAGE_UNSPECIFIED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY,
domain);
wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* add items to the combo box */
SendMessage (wnd, CB_RESETCONTENT, 0, 0);
- LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
+ LIST_LOOP (rest, items)
{
Extbyte* lparam;
TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (rest),
return Qunbound;
}
-/* set the properties of a progres guage */
+/* set the properties of a progress gauge */
static void
-mswindows_progress_gauge_update (Lisp_Object image_instance)
+mswindows_progress_gauge_redisplay (Lisp_Object image_instance)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-
+
if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
{
Lisp_Object val;
assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
#endif
val = XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value;
-#ifdef DEBUG_WIDGET_OUTPUT
- printf ("progress gauge displayed value on %p updated to %ld\n",
- WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
- XINT(val));
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("progress gauge displayed value on %p updated to %ld\n",
+ WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
+ XINT(val));
#endif
CHECK_INT (val);
SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
CONSOLE_HAS_METHOD (mswindows, finalize_image_instance);
CONSOLE_HAS_METHOD (mswindows, unmap_subwindow);
CONSOLE_HAS_METHOD (mswindows, map_subwindow);
- CONSOLE_HAS_METHOD (mswindows, update_subwindow);
+ CONSOLE_HAS_METHOD (mswindows, redisplay_subwindow);
CONSOLE_HAS_METHOD (mswindows, resize_subwindow);
- CONSOLE_HAS_METHOD (mswindows, update_widget);
+ CONSOLE_HAS_METHOD (mswindows, redisplay_widget);
CONSOLE_HAS_METHOD (mswindows, image_instance_equal);
CONSOLE_HAS_METHOD (mswindows, image_instance_hash);
CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage);
INITIALIZE_DEVICE_IIFORMAT (mswindows, button);
IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate);
- IIFORMAT_HAS_DEVMETHOD (mswindows, button, update);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, button, redisplay);
/* edit-field widget */
INITIALIZE_DEVICE_IIFORMAT (mswindows, edit_field);
IIFORMAT_HAS_DEVMETHOD (mswindows, edit_field, instantiate);
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, redisplay);
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);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, tree_view, redisplay);
/* tab control widget */
INITIALIZE_DEVICE_IIFORMAT (mswindows, tab_control);
IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, instantiate);
- IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, update);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, redisplay);
#endif
/* windows bitmap format */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp");
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 Qmake_glyph;
#ifdef DEBUG_WIDGETS
int debug_widget_instances;
}
static void
-check_valid_glyph_or_instantiator (Lisp_Object data)
+check_valid_instantiator (Lisp_Object data)
{
Lisp_Object glyph = data;
if (SYMBOLP (data))
glyph = XSYMBOL (data)->value;
- if (IMAGE_INSTANCEP (glyph))
- CHECK_IMAGE_INSTANCE (glyph);
- else if (!CONSP (glyph) && !VECTORP (glyph))
- CHECK_BUFFER_GLYPH (glyph);
+ if (!CONSP (glyph) && !VECTORP (glyph))
+ invalid_argument ("instantiator item must be a vector", data);
}
static void
if (!EQ (data, Qhorizontal)
&&
!EQ (data, Qvertical))
- signal_simple_error ("unknown orientation for layout", data);
+ invalid_argument ("unknown orientation for layout", data);
}
static void
!EQ (data, Qleft)
&&
!EQ (data, Qright))
- signal_simple_error ("unknown orientation for tab control", data);
+ invalid_argument ("unknown orientation for tab control", data);
}
static void
check_valid_justification (Lisp_Object data)
{
if (!EQ (data, Qleft) && !EQ (data, Qright) && !EQ (data, Qcenter))
- signal_simple_error ("unknown justification for layout", data);
+ invalid_argument ("unknown justification for layout", data);
}
static void
if (!EQ (data, Qt) && !EQ (data, Qetched_in) && !EQ (data, Qetched_out)
&& !EQ (data, Qbevel_in) && !EQ (data, Qbevel_out)
&& !GLYPHP (data) && !VECTORP (data))
- signal_simple_error ("unknown border style for layout", data);
+ invalid_argument ("unknown border style for layout", data);
}
static void
&& !COMPILED_FUNCTIONP (data)
&& !CONSP (data))
{
- signal_simple_error (":callback must be a function or expression", data);
+ invalid_argument (":callback must be a function or expression", data);
}
}
check_valid_int_or_function (Lisp_Object data)
{
if (!INTP (data) && !CONSP (data))
- signal_simple_error ("must be an integer or expresssion", data);
+ invalid_argument ("must be an integer or expresssion", data);
}
static void
check_valid_string_or_vector (Lisp_Object data)
{
if (!STRINGP (data) && !VECTORP (data))
- signal_simple_error (":descriptor must be a string or a vector", data);
+ invalid_argument (":descriptor must be a string or a vector", data);
}
void
-check_valid_item_list_1 (Lisp_Object items)
+check_valid_item_list (Lisp_Object items)
{
Lisp_Object rest;
else if (VECTORP (XCAR (rest)))
gui_parse_item_keywords (XCAR (rest));
else if (LISTP (XCAR (rest)))
- check_valid_item_list_1 (XCAR (rest));
+ check_valid_item_list (XCAR (rest));
else
- signal_simple_error ("Items must be vectors, lists or strings", items);
+ invalid_argument ("Items must be vectors, lists or strings", items);
}
}
static void
-check_valid_item_list (Lisp_Object data)
-{
- Lisp_Object items;
-
- Fcheck_valid_plist (data);
- items = Fplist_get (data, Q_items, Qnil);
-
- check_valid_item_list_1 (items);
-}
-
-static void
-check_valid_glyph_or_instantiator_list (Lisp_Object data)
+check_valid_instantiator_list (Lisp_Object data)
{
Lisp_Object rest;
CHECK_LIST (data);
EXTERNAL_LIST_LOOP (rest, data)
{
- check_valid_glyph_or_instantiator (XCAR (rest));
+ check_valid_instantiator (XCAR (rest));
}
}
/* This function calls lisp. */
Lisp_Object glyph = sym;
struct gcpro gcpro1;
-
+
GCPRO1 (glyph);
/* if we have a symbol get at the actual data */
if (SYMBOLP (glyph))
glyph = XSYMBOL (glyph)->value;
-
+
if (CONSP (glyph))
glyph = Feval (glyph);
/* Be really helpful to the user. */
if (VECTORP (glyph))
{
- glyph = call1 (intern ("make-glyph"), glyph);
+ glyph = call1 (Qmake_glyph, glyph);
}
/* substitute the new glyph */
RETURN_UNGCPRO (glyph);
}
-static void
+static void
substitute_keyword_value (Lisp_Object inst, Lisp_Object key, Lisp_Object val)
{
int i;
type (Qedit_field for example). It is debatable whether we should
wire things in this generalised way rather than treating widgets
specially in image_instance_property. */
-static Lisp_Object
+static Lisp_Object
widget_property (Lisp_Object image_instance, Lisp_Object prop)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
struct image_instantiator_methods* meths;
-
+#if 0 /* The usefulness of this is dubious. */
/* first see if its a general property ... */
if (!NILP (Fplist_member (IMAGE_INSTANCE_WIDGET_PROPS (ii), prop)))
return Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), prop, Qnil);
-
+#endif
/* .. then try device specific methods ... */
meths = decode_device_ii_format (image_instance_device (image_instance),
- IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
if (meths && HAS_IIFORMAT_METH_P (meths, property))
return IIFORMAT_METH (meths, property, (image_instance, prop));
/* ... then format specific methods ... */
- meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
if (meths && HAS_IIFORMAT_METH_P (meths, property))
return IIFORMAT_METH (meths, property, (image_instance, prop));
return Qunbound;
}
-static Lisp_Object
-widget_set_property (Lisp_Object image_instance, Lisp_Object prop, Lisp_Object val)
+/* Update the displayed properties of a widget.
+
+ #### This has been adapted from the original set_property functions
+ and thus reuses the state management of that. A better solution is
+ to simply re-parse the instantiator when items need updating. This
+ make comparing differences much simpler and obviates the need for a
+ lot of the state variables.
+
+ #### property is still a valid function since we have to be able to
+ extract information from the actual widget.
+
+ #### update_widget should probably be re-written to use the
+ instantiator. We probably want to keep a record of the differences
+ also to make this easy. We would also need a pending_instantiator
+ so that changes could be delayed. */
+static void
+widget_update (Lisp_Object image_instance, Lisp_Object instantiator)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
struct image_instantiator_methods* meths;
- Lisp_Object ret;
- /* PIck up any generic properties that we might need to keep hold
+ Lisp_Object text = find_keyword_in_vector (instantiator, Q_text);
+ /* Pick up any generic properties that we might need to keep hold
of. */
- if (EQ (prop, Q_text))
+ if (!NILP (text))
{
- IMAGE_INSTANCE_WIDGET_TEXT (ii) = val;
+ IMAGE_INSTANCE_WIDGET_TEXT (ii) = text;
IMAGE_INSTANCE_TEXT_CHANGED (ii) = 1;
}
/* Now try device specific methods first ... */
- meths = decode_device_ii_format (image_instance_device (image_instance),
- IMAGE_INSTANCE_WIDGET_TYPE (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)
- &&
- !UNBOUNDP (ret =
- IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
- {
- return ret;
- }
+ MAYBE_IIFORMAT_METH (meths, update, (image_instance, instantiator));
/* ... then format specific methods ... */
- meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
- if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
- &&
- !UNBOUNDP (ret =
- IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
- {
- return ret;
- }
- /* we didn't do any device specific properties, so shove the property in our plist */
+ MAYBE_IIFORMAT_METH (meths, update, (image_instance, instantiator));
+#if 0 /* The usefulness of this is dubious. */
+ /* we didn't do any device specific properties, so shove the property in our plist. */
IMAGE_INSTANCE_WIDGET_PROPS (ii)
= Fplist_put (IMAGE_INSTANCE_WIDGET_PROPS (ii), prop, val);
- return val;
+#endif
}
/* 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. */
+ properties must be called by redisplay instead of by *_update. Thus
+ *_update 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. This is not the same as widget_update! */
void
-update_widget (Lisp_Object widget)
+redisplay_widget (Lisp_Object widget)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (widget);
struct image_instantiator_methods* meths;
|| 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 (DOMAIN_XDEVICE (ii->domain), update_widget, (ii));
-
- /* Device-format specific methods */
+ /* Device-format specific methods - e.g. x_tab_control_redisplay () */
meths = decode_device_ii_format (image_instance_device (widget),
IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
- MAYBE_IIFORMAT_METH (meths, update, (widget));
+ MAYBE_IIFORMAT_METH (meths, redisplay, (widget));
+
+ /* Device generic methods - e.g. x_redisplay_widget (). 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. Do this last so
+ that format-specific methods have an opportunity to prevent
+ wholesale changes - e.g. rebuilding tabs. */
+ MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), redisplay_widget, (ii));
/* Pick up the items we recorded earlier. */
if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
/* Query for a widgets desired geometry. If no type specific method is
provided then use the widget text to calculate sizes. */
-static void
-widget_query_geometry (Lisp_Object image_instance,
+static void
+widget_query_geometry (Lisp_Object image_instance,
int* width, int* height,
enum image_instance_geometry disp, Lisp_Object domain)
{
/* First just set up what we already have. */
if (width) *width = IMAGE_INSTANCE_WIDTH (ii);
if (height) *height = IMAGE_INSTANCE_HEIGHT (ii);
-
+
if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)
||
IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
{
/* .. then try device specific methods ... */
meths = decode_device_ii_format (image_instance_device (image_instance),
- IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
- IIFORMAT_METH (meths, query_geometry, (image_instance,
+ IIFORMAT_METH (meths, query_geometry, (image_instance,
width, height, disp,
domain));
else
{
/* ... then format specific methods ... */
- meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
- IIFORMAT_METH (meths, query_geometry, (image_instance,
+ IIFORMAT_METH (meths, query_geometry, (image_instance,
width, height, disp,
domain));
- else
+ else
{
int w, h;
-
+
/* Then if we are allowed to resize the widget, make the
size the same as the text dimensions. */
query_string_geometry (IMAGE_INSTANCE_WIDGET_TEXT (ii),
}
}
-static int
-widget_layout (Lisp_Object image_instance,
- int width, int height, Lisp_Object domain)
+static int
+widget_layout (Lisp_Object image_instance,
+ int width, int height, int xoffset, int yoffset,
+ Lisp_Object domain)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
struct image_instantiator_methods* meths;
/* .. then try device specific methods ... */
meths = decode_device_ii_format (image_instance_device (image_instance),
- IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
if (meths && HAS_IIFORMAT_METH_P (meths, layout))
- return IIFORMAT_METH (meths, layout, (image_instance,
- width, height, domain));
+ return IIFORMAT_METH (meths, layout, (image_instance,
+ width, height, xoffset, yoffset,
+ domain));
else
{
/* ... then format specific methods ... */
- meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ meths = decode_device_ii_format (Qnil, IMAGE_INSTANCE_WIDGET_TYPE (ii),
ERROR_ME_NOT);
if (meths && HAS_IIFORMAT_METH_P (meths, layout))
- return IIFORMAT_METH (meths, layout, (image_instance,
- width, height, domain));
+ return IIFORMAT_METH (meths, layout, (image_instance,
+ width, height, xoffset, yoffset,
+ domain));
}
return 1;
}
Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
if (NILP (desc))
- signal_simple_error ("Must supply :descriptor", instantiator);
+ syntax_error ("Must supply :descriptor", instantiator);
if (VECTORP (desc))
gui_parse_item_keywords (desc);
if (!NILP (find_keyword_in_vector (instantiator, Q_width))
&& !NILP (find_keyword_in_vector (instantiator, Q_pixel_width)))
- signal_simple_error ("Must supply only one of :width and :pixel-width", instantiator);
+ syntax_error ("Must supply only one of :width and :pixel-width", instantiator);
if (!NILP (find_keyword_in_vector (instantiator, Q_height))
&& !NILP (find_keyword_in_vector (instantiator, Q_pixel_height)))
- signal_simple_error ("Must supply only one of :height and :pixel-height", instantiator);
+ syntax_error ("Must supply only one of :height and :pixel-height", instantiator);
}
static void
combo_box_validate (Lisp_Object instantiator)
{
widget_validate (instantiator);
- if (NILP (find_keyword_in_vector (instantiator, Q_properties)))
- signal_simple_error ("Must supply item list", instantiator);
+ if (NILP (find_keyword_in_vector (instantiator, Q_items)))
+ syntax_error ("Must supply item list", instantiator);
}
/* we need to convert things like glyphs to images, eval expressions
etc.*/
static Lisp_Object
-widget_normalize (Lisp_Object inst, Lisp_Object console_type)
+widget_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
/* This function can call lisp */
Lisp_Object glyph = find_keyword_in_vector (inst, Q_image);
/* we need to eval glyph if its an expression, we do this for the
- same reasons we normalize file to data. */
+ same reasons we normalize file to data.
+
+ #### should just normalize the data. */
if (!NILP (glyph))
{
substitute_keyword_value (inst, Q_image, glyph_instantiator_to_glyph (glyph));
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
+ /* #### practically all of this should be moved to widget_update()
+ so that users can dynamically change all possible widget
+ properties. */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object face = find_keyword_in_vector (instantiator, Q_face);
Lisp_Object height = find_keyword_in_vector (instantiator, Q_height);
Lisp_Object pixheight = find_keyword_in_vector (instantiator, Q_pixel_height);
Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
- 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);
+ Lisp_Object ifocus = find_keyword_in_vector (instantiator, Q_initial_focus);
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))
incompatible_image_types (instantiator, dest_mask, IMAGE_WIDGET_MASK);
initialize_widget_image_instance (ii, XVECTOR_DATA (instantiator)[0]);
IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
- IMAGE_INSTANCE_WIDGET_PROPS (ii) = props;
/* retrieve the fg and bg colors */
if (!NILP (face))
SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Fget_face (face));
-
+
/* 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 */
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) =
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
gui_parse_item_keywords_no_errors (instantiator);
IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc;
}
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)
+ if (!NILP (items) && !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout)
&& !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qnative_layout))
{
- if (NILP (items))
- {
- items = Fplist_get (props, Q_items, Qnil);
- }
- if (!NILP (items))
- {
- IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
- Fcons (IMAGE_INSTANCE_WIDGET_ITEMS (ii),
- parse_gui_item_tree_children (items));
- }
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
+ Fcons (IMAGE_INSTANCE_WIDGET_ITEMS (ii),
+ parse_gui_item_tree_children (items));
}
/* Normalize size information. We now only assign sizes if the user
if (!NILP (glyph))
{
if (!pw)
- pw = glyph_width (glyph, domain) + 2 * WIDGET_BORDER_WIDTH;
+ pw = glyph_width (glyph, image_instance) + 2 * WIDGET_BORDER_WIDTH;
if (!ph)
- ph = glyph_height (glyph, domain) + 2 * WIDGET_BORDER_HEIGHT;
+ ph = glyph_height (glyph, image_instance) + 2 * WIDGET_BORDER_HEIGHT;
IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0;
IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0;
}
if (!NILP (mwidth))
IMAGE_INSTANCE_MARGIN_WIDTH (ii) = XINT (mwidth);
+ IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (ii) = !NILP (ifocus);
+
/* 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
/* Get the geometry of a button control. We need to adjust the size
depending on the type of button. */
static void
-button_query_geometry (Lisp_Object image_instance,
+button_query_geometry (Lisp_Object image_instance,
int* width, int* height,
enum image_instance_geometry disp, Lisp_Object domain)
{
/* tree-view geometry - get the height right */
static void
-tree_view_query_geometry (Lisp_Object image_instance,
+tree_view_query_geometry (Lisp_Object image_instance,
int* width, int* height,
enum image_instance_geometry disp, Lisp_Object domain)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii);
-
+
if (*width)
{
/* #### what should this be. reconsider when X has tree views. */
/* Get the geometry of a tab control. This is based on the number of
items and text therin in the tab control. */
static void
-tab_control_query_geometry (Lisp_Object image_instance,
+tab_control_query_geometry (Lisp_Object image_instance,
int* width, int* height,
enum image_instance_geometry disp, Lisp_Object domain)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object items = XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
Lisp_Object rest;
- unsigned int tw = 0, th = 0;
+ int tw = 0, th = 0;
LIST_LOOP (rest, items)
{
}
}
-/* Get the geometry of a tab control. This is based on the number of
- items and text therin in the tab control. */
-static Lisp_Object
-tab_control_set_property (Lisp_Object image_instance,
- Lisp_Object prop,
- Lisp_Object val)
+/* Update the contents of a tab control. */
+static void
+tab_control_update (Lisp_Object image_instance,
+ Lisp_Object instantiator)
{
- /* Record new items for update. *_tab_control_update will do the
+ Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
+ /* Record new items for update. *_tab_control_redisplay will do the
rest. */
- if (EQ (prop, Q_items))
+ if (!NILP (items))
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
-
- check_valid_item_list_1 (val);
-
+ check_valid_item_list (items);
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("tab control %p updated\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
+#endif
/* Don't set the actual items since we might decide not to use
the new ones (because nothing has really changed). If we did
set them and didn't use them then we would get into whole
heaps of trouble when the old items get GC'd. */
IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
- Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)),
- parse_gui_item_tree_children (val));
+ Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)),
+ parse_gui_item_tree_children (items));
IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
+ }
+}
+
+/* Determine whether only the order has changed for a tab. */
+int tab_control_order_only_changed (Lisp_Object image_instance)
+{
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ int found = 0, len, pending_len;
+ Lisp_Object rest;
+
+ /* Degenerate case. */
+ if (NILP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ return 1;
- return Qt;
+ /* See whether we just need a change in order. */
+ GET_LIST_LENGTH (IMAGE_INSTANCE_WIDGET_ITEMS (ii), len);
+ GET_LIST_LENGTH (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii),
+ pending_len);
+ if (len == pending_len)
+ {
+ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ {
+ Lisp_Object pending_rest;
+ found = 0;
+ LIST_LOOP (pending_rest,
+ XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ {
+ if (gui_item_equal_sans_selected (XCAR (rest),
+ XCAR (pending_rest), 0))
+ {
+ found = 1;
+ break;
+ }
+ }
+ if (!found)
+ break;
+ }
}
- return Qunbound;
+ return found;
}
-/* set the properties of a progres guage */
-static Lisp_Object
-progress_gauge_set_property (Lisp_Object image_instance,
- Lisp_Object prop,
- Lisp_Object val)
+/* Set the properties of a progress gauge */
+static void
+progress_gauge_update (Lisp_Object image_instance,
+ Lisp_Object instantiator)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Object value = find_keyword_in_vector (instantiator, Q_value);
- if (EQ (prop, Q_value))
+ if (!NILP (value))
{
- CHECK_INT (val);
+ CHECK_INT (value);
#ifdef DEBUG_WIDGET_OUTPUT
- printf ("progress gauge value set to %ld\n", XINT (val));
+ stderr_out ("progress gauge value set to %ld\n", XINT (value));
#endif
IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
copy_gui_item_tree (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
#endif
if (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
- XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value = val;
+ XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value = value;
IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
-
- return Qt;
}
- return Qunbound;
}
\f
/*****************************************************************************
* widget layout *
*****************************************************************************/
-/* we need to convert things like glyphs to images, eval expressions
- etc.*/
+/* We need to cascade normalization.*/
static Lisp_Object
-layout_normalize (Lisp_Object inst, Lisp_Object console_type)
+layout_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
/* This function can call lisp */
- Lisp_Object items = find_keyword_in_vector (inst, Q_items);
- Lisp_Object border = find_keyword_in_vector (inst, Q_border);
- /* we need to eval glyph if its an expression, we do this for the
- same reasons we normalize file to data. */
+ struct gcpro gcpro1, gcpro2;
+ Lisp_Object alist = Qnil, new_items = Qnil, border;
+ /* This function can call lisp */
+ Lisp_Object items;
+
+ GCPRO2 (alist, new_items);
+ alist = tagged_vector_to_alist (inst);
+ items = assq_no_quit (Q_items, alist);
+
+ /* We need to normalize sub-objects. */
if (!NILP (items))
{
Lisp_Object rest;
- LIST_LOOP (rest, items)
+ LIST_LOOP (rest, XCDR (items))
{
- /* substitute the new glyph */
- Fsetcar (rest, glyph_instantiator_to_glyph (XCAR (rest)));
+ /* Substitute the new instantiator */
+ new_items = Fcons (normalize_image_instantiator (XCAR (rest),
+ console_type, dest_mask),
+ new_items);
}
+ new_items = Fnreverse (new_items);
+ Fsetcdr (items, new_items);
}
- /* normalize the border spec. */
- if (VECTORP (border) || CONSP (border))
+ /* Normalize the border spec. */
+ border = assq_no_quit (Q_border, alist);
+ if (!NILP (border) && VECTORP (XCDR (border)))
{
- substitute_keyword_value (inst, Q_border, glyph_instantiator_to_glyph (border));
+ Fsetcdr (border, normalize_image_instantiator (XCDR (border),
+ console_type, dest_mask));
}
- return inst;
+
+ {
+ Lisp_Object result = alist_to_tagged_vector (XVECTOR_DATA (inst)[0],
+ alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+}
+
+/* Update the instances in the layout. */
+static void
+layout_update (Lisp_Object image_instance, Lisp_Object instantiator)
+{
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
+ Lisp_Object border_inst = find_keyword_in_vector (instantiator, Q_border);
+ Lisp_Object border = Qnil;
+ Lisp_Object children = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii);
+ int structure_changed = 0;
+ struct gcpro gcpro1;
+
+ /* We want to avoid consing if we can. This is quite awkward because
+ we have to deal with the border as well as the items. */
+
+ GCPRO1 (border);
+
+ if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
+ {
+ border = XCAR (children);
+ children = XCDR (children);
+ }
+
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("layout updated\n");
+#endif
+ /* Update the border. */
+ if (!NILP (border_inst))
+ {
+ if (VECTORP (border_inst))
+ {
+ /* 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. */
+ if (!NILP (border))
+ call3 (Qset_glyph_image, border, border_inst,
+ IMAGE_INSTANCE_DOMAIN (ii));
+ else
+ {
+ border = Fcons (call1 (Qmake_glyph, border_inst), Qnil);
+ structure_changed = 1;
+ }
+ IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (0);
+ }
+ else
+ {
+ if (!NILP (border))
+ {
+ border = Qnil;
+ structure_changed = 1;
+ }
+ if (EQ (border_inst, Qt))
+ IMAGE_INSTANCE_LAYOUT_BORDER (ii) = Qetched_in;
+ else
+ IMAGE_INSTANCE_LAYOUT_BORDER (ii) = border_inst;
+ }
+ }
+
+ /* Pick up the sub-widgets. */
+ if (!NILP (items))
+ {
+ int len1, len2;
+ GET_LIST_LENGTH (items, len1);
+ GET_LIST_LENGTH (children, len2);
+ /* The structure hasn't changed so just update the images. */
+ if (!structure_changed && len1 == len2)
+ {
+ /* Pick up the sub-widgets. */
+ for (; !NILP (children); children = XCDR (children), items = XCDR (items))
+ {
+ call3 (Qset_glyph_image, XCAR (children), XCAR (items),
+ IMAGE_INSTANCE_DOMAIN (ii));
+ }
+ }
+ /* The structure has changed so start over. */
+ else
+ {
+ /* Instantiate any new glyphs. */
+ for (; !NILP (items); items = XCDR (items))
+ {
+ border = Fcons (call1 (Qmake_glyph, XCAR (items)), border);
+ }
+ IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = Fnreverse (border);
+ }
+ }
+ UNGCPRO;
}
static void
{
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);
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("layout instantiated\n");
+#endif
/* Do widget type instantiation first. */
widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg,
dest_mask, domain);
{
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
+
+ /* Get child glyphs and finish instantiation. We can't do image
+ instance children yet as we might not have a containing
window. */
+ layout_update (image_instance, instantiator);
}
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
course these attributes can change dynamically and so the size
should changed dynamically also. Only in a few limited cases should
the size be fixed and remain fixed. Of course this actually means
- that we don't really want to specifiy the size *at all* for most
+ that we don't really want to specify the size *at all* for most
widgets - we want it to be discovered dynamically. Thus we can
envisage the following scenarios:
-
+
1. A button is sized to accommodate its text, the text changes and the
- button should change size also.
+ button should change size also.
2. A button is given an explicit size. Its size should never change.
3. Layout is put inside an area. The size of the area changes, the
- layout should change with it.
+ layout should change with it.
4. A button grows to accommodate additional text. The whitespace
around it should be modified to cope with the new layout
- requirements.
+ requirements.
5. A button grows. The area surrounding it should grow also if
- possible.
+ possible.
What metrics are important?
1. Actual width and height.
-
+
2. Whether the width and height are what the widget actually wants, or
- whether it can grow or shrink.
+ whether it can grow or shrink.
Text glyphs are particularly troublesome since their metrics depend
on the context in which they are being viewed. For instance they
/* First just set up what we already have. */
if (width) *width = IMAGE_INSTANCE_WIDTH (ii);
if (height) *height = IMAGE_INSTANCE_HEIGHT (ii);
-
+
/* If we are not allowed to dynamically size then return. */
if (!IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)
&&
/* Pick up the border text if we have one. */
if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
{
- image_instance_query_geometry (XCAR (items), &gwidth, &gheight, disp, domain);
+ glyph_query_geometry (XCAR (items), &gwidth, &gheight, disp,
+ image_instance);
ph_adjust = gheight / 2;
items = XCDR (items);
}
-
+
/* Flip through the items to work out how much stuff we have to display */
LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
- image_instance_query_geometry (glyph, &gwidth, &gheight, disp, domain);
+ glyph_query_geometry (glyph, &gwidth, &gheight, disp, image_instance);
nitems ++;
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_HORIZONTAL)
{
maxph = max (maxph, gheight);
have been fixed by the user. */
if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)))
{
- Lisp_Object dynamic_width =
+ Lisp_Object dynamic_width =
Feval (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii));
if (INTP (dynamic_width))
*width = XINT (dynamic_width);
== LAYOUT_HORIZONTAL)
*width = maxpw + ((nitems + 1) * WIDGET_BORDER_WIDTH +
IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2;
- else
- *width = maxpw + 2 * (WIDGET_BORDER_WIDTH * 2 +
+ else
+ *width = maxpw + 2 * (WIDGET_BORDER_WIDTH * 2 +
IMAGE_INSTANCE_MARGIN_WIDTH (ii));
/* Work out vertical spacings. */
if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)))
{
- Lisp_Object dynamic_height =
+ Lisp_Object dynamic_height =
Feval (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii));
if (INTP (dynamic_height))
*height = XINT (dynamic_height);
}
int
-layout_layout (Lisp_Object image_instance,
- int width, int height, Lisp_Object domain)
+layout_layout (Lisp_Object image_instance,
+ int width, int height, int xoffset, int yoffset,
+ Lisp_Object domain)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object rest;
{
Lisp_Object border = XCAR (items);
items = XCDR (items);
- image_instance_query_geometry (border, &gwidth, &gheight,
- IMAGE_DESIRED_GEOMETRY, domain);
- /* #### Really, what should this be? */
- XIMAGE_INSTANCE_XOFFSET (border) = 10;
- XIMAGE_INSTANCE_YOFFSET (border) = 0;
+ glyph_query_geometry (border, &gwidth, &gheight,
+ IMAGE_DESIRED_GEOMETRY, image_instance);
ph_adjust = gheight / 2;
IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust);
- image_instance_layout (border, gwidth, gheight, domain);
+ /* #### Really, what should this be? */
+ glyph_do_layout (border, gwidth, gheight, 10, 0,
+ image_instance);
}
/* Flip through the items to work out how much stuff we have to display. */
LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
-
- image_instance_query_geometry (glyph, &gwidth, &gheight,
- IMAGE_DESIRED_GEOMETRY, domain);
+
+ glyph_query_geometry (glyph, &gwidth, &gheight,
+ IMAGE_DESIRED_GEOMETRY, image_instance);
nitems ++;
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_HORIZONTAL)
{
maxph = max (maxph, gheight);
just provide default spacing and will let the output routines
clip.. */
horiz_spacing = WIDGET_BORDER_WIDTH * 2;
- else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_HORIZONTAL)
/* We have a larger area to display in so distribute the space
evenly. */
- horiz_spacing = (width - (maxpw +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2))
+ horiz_spacing = (width - (maxpw +
+ IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2))
/ (nitems + 1);
else
horiz_spacing = (width - maxpw) / 2
if (height < maxph)
vert_spacing = WIDGET_BORDER_HEIGHT * 2;
- else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_VERTICAL)
- vert_spacing = (height - (maxph + ph_adjust +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2))
+ 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 + IMAGE_INSTANCE_MARGIN_WIDTH (ii);
{
Lisp_Object glyph = XCAR (rest);
- image_instance_query_geometry (glyph, &gwidth, &gheight,
- IMAGE_DESIRED_GEOMETRY, domain);
+ glyph_query_geometry (glyph, &gwidth, &gheight,
+ IMAGE_DESIRED_GEOMETRY, image_instance);
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_HORIZONTAL)
{
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
== LAYOUT_JUSTIFY_RIGHT)
y = height - (gheight + vert_spacing);
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
== LAYOUT_JUSTIFY_CENTER)
y = (height - gheight) / 2;
}
- else
+ else
{
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
== LAYOUT_JUSTIFY_RIGHT)
x = width - (gwidth + horiz_spacing);
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
== LAYOUT_JUSTIFY_CENTER)
x = (width - gwidth) / 2;
}
-
- XIMAGE_INSTANCE_XOFFSET (glyph) = x;
- XIMAGE_INSTANCE_YOFFSET (glyph) = y;
-
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+
+ /* Now layout subwidgets if they require it. */
+ glyph_do_layout (glyph, gwidth, gheight, x, y, image_instance);
+
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_HORIZONTAL)
{
x += (gwidth + horiz_spacing);
{
y += (gheight + vert_spacing);
}
-
- /* Now layout subwidgets if they require it. */
- image_instance_layout (glyph, gwidth, gheight, domain);
+
}
return 1;
}
+/* Get the glyphs that comprise a layout. These are created internally
+ and so are otherwise inaccessible to lisp. We need some way of getting
+ properties from the widgets that comprise a layout and this is the
+ simplest way of doing it.
+
+ #### Eventually we should allow some more intelligent access to
+ sub-widgets. */
+static Lisp_Object
+layout_property (Lisp_Object image_instance, Lisp_Object prop)
+{
+ /* This function can GC. */
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ if (EQ (prop, Q_items))
+ {
+ if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)) &&
+ CONSP (IMAGE_INSTANCE_LAYOUT_CHILDREN (ii)))
+ return Fcopy_sequence (XCDR
+ (IMAGE_INSTANCE_LAYOUT_CHILDREN (ii)));
+ else
+ return Fcopy_sequence (IMAGE_INSTANCE_LAYOUT_CHILDREN (ii));
+ }
+ return Qunbound;
+}
+
/* Layout subwindows if they are real subwindows. */
static int
native_layout_layout (Lisp_Object image_instance,
- int width, int height,
+ int width, int height, int xoffset, int yoffset,
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
+ /* 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);
+ layout_layout (image_instance, width, height, xoffset, yoffset, domain);
LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (ii))
{
dga.width = IMAGE_INSTANCE_WIDTH (ii);
dga.height = IMAGE_INSTANCE_HEIGHT (ii);
- map_subwindow (XCAR (rest),
+ map_subwindow (XCAR (rest),
IMAGE_INSTANCE_XOFFSET (ii),
IMAGE_INSTANCE_YOFFSET (ii), &dga);
}
void
syms_of_glyphs_widget (void)
{
- defkeyword (&Q_descriptor, ":descriptor");
- defkeyword (&Q_height, ":height");
- defkeyword (&Q_width, ":width");
- defkeyword (&Q_properties, ":properties");
- defkeyword (&Q_items, ":items");
- defkeyword (&Q_image, ":image");
- defkeyword (&Q_text, ":text");
- 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 (Qetched_in);
+ DEFSYMBOL (Qetched_out);
+ DEFSYMBOL (Qbevel_in);
+ DEFSYMBOL (Qbevel_out);
+ DEFSYMBOL (Qmake_glyph);
}
-#define VALID_GUI_KEYWORDS(type) do { \
- IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_active, check_valid_anything); \
- IIFORMAT_VALID_KEYWORD (type, Q_suffix, check_valid_anything); \
- IIFORMAT_VALID_KEYWORD (type, Q_keys, check_valid_string); \
- IIFORMAT_VALID_KEYWORD (type, Q_style, check_valid_symbol); \
- IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_selected, check_valid_anything); \
- IIFORMAT_VALID_KEYWORD (type, Q_filter, check_valid_anything); \
- IIFORMAT_VALID_KEYWORD (type, Q_config, check_valid_symbol); \
- IIFORMAT_VALID_KEYWORD (type, Q_included, check_valid_anything); \
- IIFORMAT_VALID_KEYWORD (type, Q_key_sequence, check_valid_string); \
- IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string); \
- IIFORMAT_VALID_KEYWORD (type, Q_label, check_valid_anything); \
- IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback, check_valid_callback); \
- IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback_ex, check_valid_callback); \
- IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_descriptor, check_valid_string_or_vector); \
+#define VALID_GUI_KEYWORDS(type) do { \
+ IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_active, check_valid_anything); \
+ IIFORMAT_VALID_KEYWORD (type, Q_suffix, check_valid_anything); \
+ IIFORMAT_VALID_KEYWORD (type, Q_keys, check_valid_string); \
+ IIFORMAT_VALID_KEYWORD (type, Q_style, check_valid_symbol); \
+ IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_selected, check_valid_anything); \
+ IIFORMAT_VALID_KEYWORD (type, Q_filter, check_valid_anything); \
+ IIFORMAT_VALID_KEYWORD (type, Q_config, check_valid_symbol); \
+ IIFORMAT_VALID_KEYWORD (type, Q_included, check_valid_anything); \
+ IIFORMAT_VALID_KEYWORD (type, Q_initial_focus, check_valid_anything); \
+ IIFORMAT_VALID_KEYWORD (type, Q_key_sequence, check_valid_string); \
+ IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string); \
+ IIFORMAT_VALID_KEYWORD (type, Q_label, check_valid_anything); \
+ IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback, check_valid_callback); \
+ IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback_ex, check_valid_callback); \
+ IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_descriptor, \
+ check_valid_string_or_vector); \
} while (0)
-#define VALID_WIDGET_KEYWORDS(type) do { \
- IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int); \
- IIFORMAT_VALID_KEYWORD (type, Q_height, check_valid_int); \
- IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int_or_function);\
- IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int_or_function);\
- IIFORMAT_VALID_KEYWORD (type, Q_face, check_valid_face); \
+#define VALID_WIDGET_KEYWORDS(type) do { \
+ IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int); \
+ IIFORMAT_VALID_KEYWORD (type, Q_height, check_valid_int); \
+ IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int_or_function); \
+ IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int_or_function); \
+ IIFORMAT_VALID_KEYWORD (type, Q_face, check_valid_face); \
} while (0)
{ /* we only do this for properties */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM (widget, "widget");
IIFORMAT_HAS_METHOD (widget, property);
- IIFORMAT_HAS_METHOD (widget, set_property);
+ IIFORMAT_HAS_METHOD (widget, update);
IIFORMAT_HAS_METHOD (widget, query_geometry);
IIFORMAT_HAS_METHOD (widget, layout);
}
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);
+ Q_image, check_valid_instantiator);
VALID_WIDGET_KEYWORDS (button);
VALID_GUI_KEYWORDS (button);
}
IIFORMAT_VALID_KEYWORD (combo_box, Q_width, check_valid_int);
IIFORMAT_VALID_KEYWORD (combo_box, Q_height, check_valid_int);
- IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int_or_function);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width,
+ check_valid_int_or_function);
IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face);
- IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_items, check_valid_item_list);
}
static void image_instantiator_scrollbar (void)
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_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int_or_function);
+ IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width,
+ check_valid_int_or_function);
+ IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height,
+ check_valid_int_or_function);
IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face);
}
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);
+ IIFORMAT_HAS_METHOD (progress_gauge, update);
VALID_WIDGET_KEYWORDS (progress_gauge);
VALID_GUI_KEYWORDS (progress_gauge);
+
+ IIFORMAT_VALID_KEYWORD (progress_gauge, Q_value, check_valid_int);
}
static void image_instantiator_tree_view (void)
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_SHARED_METHOD (tree_view, update, tab_control);
IIFORMAT_HAS_METHOD (tree_view, query_geometry);
VALID_WIDGET_KEYWORDS (tree_view);
VALID_GUI_KEYWORDS (tree_view);
- IIFORMAT_VALID_KEYWORD (tree_view, Q_properties, check_valid_item_list);
+ IIFORMAT_VALID_KEYWORD (tree_view, Q_items, check_valid_item_list);
}
static void image_instantiator_tab_control (void)
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);
+ IIFORMAT_HAS_METHOD (tab_control, update);
VALID_WIDGET_KEYWORDS (tab_control);
VALID_GUI_KEYWORDS (tab_control);
- IIFORMAT_VALID_KEYWORD (tab_control, Q_orientation, check_valid_tab_orientation);
- IIFORMAT_VALID_KEYWORD (tab_control, Q_properties, check_valid_item_list);
+ IIFORMAT_VALID_KEYWORD (tab_control, Q_orientation,
+ check_valid_tab_orientation);
+ IIFORMAT_VALID_KEYWORD (tab_control, Q_items, check_valid_item_list);
}
static void image_instantiator_labels (void)
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)
+#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_instantiator_list)
static void image_instantiator_layout (void)
{
IIFORMAT_HAS_METHOD (layout, normalize);
IIFORMAT_HAS_METHOD (layout, query_geometry);
IIFORMAT_HAS_METHOD (layout, layout);
+ IIFORMAT_HAS_METHOD (layout, update);
+ IIFORMAT_HAS_METHOD (layout, property);
VALID_GUI_KEYWORDS (layout);
VALID_LAYOUT_KEYWORDS (layout);
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);
+ IIFORMAT_HAS_SHARED_METHOD (native_layout, property, layout);
VALID_GUI_KEYWORDS (native_layout);
VALID_LAYOUT_KEYWORDS (native_layout);
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
/* Synched up with: Not in FSF. */
+/* 7-8-00 This file is more or less Mule-ized in my Mule workspace. */
+
/* Original author: Jamie Zawinski for 19.8
font-truename stuff added by Jamie Zawinski for 19.10
subwindow support added by Chuck Thompson
if (DEVICE_LIVE_P (XDEVICE (IMAGE_INSTANCE_DEVICE (p))))
{
- Display *dpy = DEVICE_X_DISPLAY
+ Display *dpy = DEVICE_X_DISPLAY
(XDEVICE (IMAGE_INSTANCE_DEVICE (p)));
if (0)
;
{
const char *ext_data;
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
- C_STRING_ALLOCA, ext_data,
- Qbinary);
+ LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (mask_data))), ext_data, Qbinary);
mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
XINT (XCAR (mask_data)),
XINT (XCAR (XCDR (mask_data))),
assert (!NILP (data));
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (data))),
- C_STRING_ALLOCA, ext_data,
- Qbinary);
+ LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (data))), ext_data, Qbinary);
xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, XINT (XCAR (data)),
assert (!NILP (data));
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, dstring,
- Qbinary);
+ LISP_STRING_TO_EXTERNAL (data, dstring, Qbinary);
if ((p = strchr (dstring, ':')))
{
static Lisp_Object
autodetect_normalize (Lisp_Object instantiator,
- Lisp_Object console_type)
+ Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
Lisp_Object file = find_keyword_in_vector (instantiator, Q_data);
Lisp_Object filename = Qnil;
if (dest_mask & IMAGE_POINTER_MASK)
{
const char *name_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, name_ext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (data, name_ext, Qfile_name);
if (XmuCursorNameToIndex (name_ext) != -1)
{
result = alist_to_tagged_vector (Qcursor_font, alist);
if (!(dest_mask & IMAGE_POINTER_MASK))
incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK);
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, name_ext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (data, name_ext, Qfile_name);
if ((i = XmuCursorNameToIndex (name_ext)) == -1)
signal_simple_error ("Unrecognized cursor-font name", data);
x, y, dga->width, dga->height);
XMoveWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p),
subwindow, -dga->xoffset, -dga->yoffset);
- XMapWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p),
- IMAGE_INSTANCE_X_CLIPWINDOW (p));
+ if (!IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (p))
+ XMapWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p),
+ IMAGE_INSTANCE_X_CLIPWINDOW (p));
}
else /* must be a widget */
{
dga->width, dga->height, 0);
XtMoveWidget (IMAGE_INSTANCE_X_WIDGET_ID (p),
-dga->xoffset, -dga->yoffset);
- XtMapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
+ if (!IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (p))
+ XtMapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
}
}
/* when you click on a widget you may activate another widget this
needs to be checked and all appropriate widgets updated */
static void
-x_update_subwindow (Lisp_Image_Instance *p)
+x_redisplay_subwindow (Lisp_Image_Instance *p)
{
/* Update the subwindow size if necessary. */
if (IMAGE_INSTANCE_SIZE_CHANGED (p))
/* Update all attributes that have changed. Lwlib actually does most
of this for us. */
static void
-x_update_widget (Lisp_Image_Instance *p)
+x_redisplay_widget (Lisp_Image_Instance *p)
{
/* This function can GC if IN_REDISPLAY is false. */
#ifdef HAVE_WIDGETS
XSETIMAGE_INSTANCE (image_instance, p);
wv = gui_items_to_widget_values
- (image_instance, IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p));
+ (image_instance, IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p),
+ /* #### this is not right; we need to keep track of which widgets
+ want accelerators and which don't */ 0);
wv->change = STRUCTURAL_CHANGE;
- /* now modify the widget */
- lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p),
- wv, True);
- free_widget_value_tree (wv);
}
-
- /* Now do non structural updates. */
- wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (p));
-
- if (!wv)
- return;
+ else
+ {
+ /* Assume the lotus position, breath deeply and chant to
+ yourself lwlibsux, lwlibsux ... lw_get_all_values returns a
+ reference to the real values rather than a copy thus any
+ changes we make to the values we get back will look like they
+ have already been applied. If we rebuild the widget tree then
+ we may lose propertie. */
+ wv = copy_widget_value_tree (lw_get_all_values
+ (IMAGE_INSTANCE_X_WIDGET_LWID (p)),
+ NO_CHANGE);
+ }
/* Possibly update the colors and font */
if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p)
{
char* str;
Lisp_Object val = IMAGE_INSTANCE_WIDGET_TEXT (p);
- TO_EXTERNAL_FORMAT (LISP_STRING, val,
- C_STRING_ALLOCA, str,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (val, str, Qnative);
wv->value = str;
}
/* now modify the widget */
lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p),
- wv, False);
+ wv, True);
+ free_widget_value_tree (wv);
#endif
}
(IMAGE_INSTANCE_WIDGET_TEXT (ii),
IMAGE_INSTANCE_WIDGET_FACE (ii),
domain))));
+ wv->change = VISIBLE_CHANGE;
+ /* #### Megahack - but its just getting too complicated to do this
+ in the right place. */
+ if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qtab_control))
+ update_tab_widget_face (wv, ii, domain);
}
static void
domain);
XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel));
lw_add_widget_value_arg (val, XtNtabForeground, fcolor.pixel);
+ wv->change = VISIBLE_CHANGE;
+ val->change = VISIBLE_CHANGE;
for (cur = val->next; cur; cur = cur->next)
{
+ cur->change = VISIBLE_CHANGE;
if (cur->value)
{
lw_copy_widget_value_args (val, cur);
IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
- TO_EXTERNAL_FORMAT (LISP_STRING, IMAGE_INSTANCE_WIDGET_TEXT (ii),
- C_STRING_ALLOCA, nm,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (IMAGE_INSTANCE_WIDGET_TEXT (ii), nm, Qnative);
ii->data = xnew_and_zero (struct x_subwindow_data);
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
- widget_value* wv = gui_items_to_widget_values (image_instance, gui);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui, 1);
if (!NILP (glyph))
{
i.e. although the arg contents may be the same the args look
different and so are re-applied to the widget. */
static void
-x_button_update (Lisp_Object image_instance)
+x_button_redisplay (Lisp_Object image_instance)
{
/* This function can GC if IN_REDISPLAY is false. */
Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
widget_value* wv =
gui_items_to_widget_values (image_instance,
- IMAGE_INSTANCE_WIDGET_ITEMS (p));
+ IMAGE_INSTANCE_WIDGET_ITEMS (p), 1);
/* now modify the widget */
lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p),
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
- widget_value* wv = gui_items_to_widget_values (image_instance, gui);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui, 0);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "progress", wv);
}
-/* set the properties of a progres guage */
+/* set the properties of a progress gauge */
static void
-x_progress_gauge_update (Lisp_Object image_instance)
+x_progress_gauge_redisplay (Lisp_Object image_instance)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
- widget_value* wv = gui_items_to_widget_values (image_instance, gui);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui, 0);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "text-field", wv);
pointer_bg, dest_mask, domain);
wv = gui_items_to_widget_values (image_instance,
- IMAGE_INSTANCE_WIDGET_ITEMS (ii));
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii), 0);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "combo-box", wv);
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
widget_value * wv =
gui_items_to_widget_values (image_instance,
- IMAGE_INSTANCE_WIDGET_ITEMS (ii));
-
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii), 0);
update_tab_widget_face (wv, ii,
IMAGE_INSTANCE_FRAME (ii));
-
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "tab-control", wv);
}
-/* set the properties of a tab control */
+/* Set the properties of a tab control */
static void
-x_tab_control_update (Lisp_Object image_instance)
+x_tab_control_redisplay (Lisp_Object image_instance)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)
+ ||
+ IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii))
+ {
+ /* If only the order has changed then simply select the first
+ one of the pending set. This stops horrendous rebuilding -
+ and hence flicker - of the tabs each time you click on
+ one. */
+ if (tab_control_order_only_changed (image_instance))
+ {
+ Lisp_Object rest, selected =
+ gui_item_list_find_selected
+ (NILP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)) ?
+ XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)) :
+ XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
+
+ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ {
+ if (gui_item_equal_sans_selected (XCAR (rest), selected, 0))
+ {
+ /* There may be an encapsulated way of doing this,
+ but I couldn't find it. */
+ Lisp_Object old_selected =gui_item_list_find_selected
+ (XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
+ Arg al [1];
+ char* name;
+ unsigned int num_children, i;
+ Widget* children;
+
+ LISP_STRING_TO_EXTERNAL (XGUI_ITEM (XCAR (rest))->name,
+ name, Qnative);
+ /* The name may contain a `.' which confuses
+ XtNameToWidget, so we do it ourselves. */
+ children = XtCompositeChildren (IMAGE_INSTANCE_X_WIDGET_ID (ii),
+ &num_children);
+ for (i = 0; i < num_children; i++)
+ {
+ if (!strcmp (XtName (children [i]), name))
+ {
+ XtSetArg (al [0], XtNtopWidget, children [i]);
+ XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1);
+ break;
+ }
+ }
+ /* Pick up the new selected item. */
+ XGUI_ITEM (old_selected)->selected =
+ XGUI_ITEM (XCAR (rest))->selected;
+ XGUI_ITEM (XCAR (rest))->selected =
+ XGUI_ITEM (selected)->selected;
+ /* We're not actually changing the items anymore. */
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 0;
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil;
+ break;
+ }
+ }
+ }
+ }
/* Possibly update the face. */
if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (ii)
||
||
IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
{
- widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
+ /* See previous comments on the brokeness of lwlib.
- /* #### I don't know why this can occur. */
- if (!wv)
- return;
+ #### There's actually not much point in doing this here
+ since, colors will have been set appropriately by
+ x_redisplay_widget. */
+ widget_value* wv =copy_widget_value_tree
+ (lw_get_all_values
+ (IMAGE_INSTANCE_X_WIDGET_LWID (ii)),
+ NO_CHANGE);
update_tab_widget_face (wv, ii,
IMAGE_INSTANCE_FRAME (ii));
lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, True);
+ free_widget_value_tree (wv);
}
}
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
- widget_value* wv = gui_items_to_widget_values (image_instance, gui);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui, 0);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "button", wv);
CONSOLE_HAS_METHOD (x, locate_pixmap_file);
CONSOLE_HAS_METHOD (x, unmap_subwindow);
CONSOLE_HAS_METHOD (x, map_subwindow);
- CONSOLE_HAS_METHOD (x, update_widget);
- CONSOLE_HAS_METHOD (x, update_subwindow);
+ CONSOLE_HAS_METHOD (x, redisplay_widget);
+ CONSOLE_HAS_METHOD (x, redisplay_subwindow);
}
void
INITIALIZE_DEVICE_IIFORMAT (x, button);
IIFORMAT_HAS_DEVMETHOD (x, button, property);
IIFORMAT_HAS_DEVMETHOD (x, button, instantiate);
- IIFORMAT_HAS_DEVMETHOD (x, button, update);
+ IIFORMAT_HAS_DEVMETHOD (x, button, redisplay);
/* general widget methods. */
INITIALIZE_DEVICE_IIFORMAT (x, widget);
IIFORMAT_HAS_DEVMETHOD (x, widget, property);
/* progress gauge */
INITIALIZE_DEVICE_IIFORMAT (x, progress_gauge);
- IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, update);
+ IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, redisplay);
IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, instantiate);
/* text field */
INITIALIZE_DEVICE_IIFORMAT (x, edit_field);
/* combo box */
INITIALIZE_DEVICE_IIFORMAT (x, combo_box);
IIFORMAT_HAS_DEVMETHOD (x, combo_box, instantiate);
- IIFORMAT_HAS_SHARED_DEVMETHOD (x, combo_box, update, tab_control);
+ IIFORMAT_HAS_SHARED_DEVMETHOD (x, combo_box, redisplay, tab_control);
#endif
/* tab control widget */
INITIALIZE_DEVICE_IIFORMAT (x, tab_control);
IIFORMAT_HAS_DEVMETHOD (x, tab_control, instantiate);
- IIFORMAT_HAS_DEVMETHOD (x, tab_control, update);
+ IIFORMAT_HAS_DEVMETHOD (x, tab_control, redisplay);
/* label */
INITIALIZE_DEVICE_IIFORMAT (x, label);
IIFORMAT_HAS_DEVMETHOD (x, label, instantiate);
#include "xintrinsic.h"
#include "../lwlib/lwlib.h"
+#include "../lwlib/lwlib-utils.h"
/****************************************************************************
* Image-Instance Object *
image_instantiator_format_entry_dynarr *
the_image_instantiator_format_entry_dynarr;
-static Lisp_Object allocate_image_instance (Lisp_Object governing_domain,
- Lisp_Object glyph);
+static Lisp_Object allocate_image_instance (Lisp_Object governing_domain,
+ Lisp_Object parent,
+ Lisp_Object instantiator);
static void image_validate (Lisp_Object instantiator);
static void glyph_property_was_changed (Lisp_Object glyph,
Lisp_Object property,
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);
+static void update_image_instance (Lisp_Object image_instance,
+ Lisp_Object instantiator);
/* 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
return find_keyword_in_vector_or_given (vector, keyword, Qnil);
}
+static Lisp_Object
+find_instantiator_differences (Lisp_Object new, Lisp_Object old)
+{
+ Lisp_Object alist = Qnil;
+ Lisp_Object *elt = XVECTOR_DATA (new);
+ Lisp_Object *old_elt = XVECTOR_DATA (old);
+ int len = XVECTOR_LENGTH (new);
+ struct gcpro gcpro1;
+
+ /* If the vector length has changed then consider everything
+ changed. We could try and figure out what properties have
+ disappeared or been added, but this code is only used as an
+ optimization anyway so lets not bother. */
+ if (len != XVECTOR_LENGTH (old))
+ return new;
+
+ GCPRO1 (alist);
+
+ for (len -= 2; len >= 1; len -= 2)
+ {
+ /* Keyword comparisons can be done with eq, the value must be
+ done with equal.
+ #### Note that this does not optimize re-ordering. */
+ if (!EQ (elt[len], old_elt[len])
+ || !internal_equal (elt[len+1], old_elt[len+1], 0))
+ alist = Fcons (Fcons (elt[len], elt[len+1]), alist);
+ }
+
+ {
+ Lisp_Object result = alist_to_tagged_vector (elt[0], alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+}
+
+DEFUN ("set-instantiator-property", Fset_instantiator_property,
+ 3, 3, 0, /*
+Destructively set the property KEYWORD of INSTANTIATOR to VAL.
+If the property is not set then it is added to a copy of the
+instantiator and the new instantiator returned.
+Use `set-glyph-image' on glyphs to register instantiator changes. */
+ (instantiator, keyword, val))
+{
+ Lisp_Object *elt;
+ int len;
+
+ CHECK_VECTOR (instantiator);
+ if (!KEYWORDP (keyword))
+ signal_simple_error ("instantiator property must be a keyword", keyword);
+
+ elt = XVECTOR_DATA (instantiator);
+ len = XVECTOR_LENGTH (instantiator);
+
+ for (len -= 2; len >= 1; len -= 2)
+ {
+ if (EQ (elt[len], keyword))
+ {
+ elt[len+1] = val;
+ break;
+ }
+ }
+
+ /* Didn't find it so add it. */
+ if (len < 1)
+ {
+ Lisp_Object alist = Qnil, result;
+ struct gcpro gcpro1;
+
+ GCPRO1 (alist);
+ alist = tagged_vector_to_alist (instantiator);
+ alist = Fcons (Fcons (keyword, val), alist);
+ result = alist_to_tagged_vector (elt[0], alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+
+ return instantiator;
+}
+
void
check_valid_string (Lisp_Object data)
{
check_window_subwindow_cache (struct window* w)
{
Lisp_Object window;
-
+
XSETWINDOW (window, w);
assert (!NILP (w->subwindow_instance_cache));
/* Weird nothing images exist at startup when the console is
deleted. */
if (!NOTHING_IMAGE_INSTANCEP (instance))
- assert (DOMAIN_LIVE_P (instance));
+ {
+ assert (DOMAIN_LIVE_P (instance));
+ assert (VECTORP (XIMAGE_INSTANCE_INSTANTIATOR (instance)));
+ }
if (WINDOWP (XIMAGE_INSTANCE_DOMAIN (instance)))
- check_window_subwindow_cache
+ check_window_subwindow_cache
(XWINDOW (XIMAGE_INSTANCE_DOMAIN (instance)));
}
#endif
{
int governing_domain;
- struct image_instantiator_methods *meths =
+ struct image_instantiator_methods *meths =
decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
ERROR_ME);
governing_domain = IIFORMAT_METH_OR_GIVEN (meths, governing_domain, (),
return domain;
}
-static Lisp_Object
+Lisp_Object
normalize_image_instantiator (Lisp_Object instantiator,
Lisp_Object contype,
Lisp_Object dest_mask)
if (STRINGP (instantiator))
instantiator = process_image_string_instantiator (instantiator, contype,
XINT (dest_mask));
-
- assert (VECTORP (instantiator));
+ /* Subsequent validation will pick this up. */
+ if (!VECTORP (instantiator))
+ return instantiator;
/* We have to always store the actual pixmap data and not the
filename even though this is a potential memory pig. We have to
do this because it is quite possible that we will need to
meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
ERROR_ME);
RETURN_UNGCPRO (IIFORMAT_METH_OR_GIVEN (meths, normalize,
- (instantiator, contype),
+ (instantiator, contype, dest_mask),
instantiator));
}
}
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object glyph)
{
- Lisp_Object ii = allocate_image_instance (governing_domain, glyph);
+ Lisp_Object ii = allocate_image_instance (governing_domain,
+ IMAGE_INSTANCEP (domain) ?
+ domain : glyph, instantiator);
Lisp_Image_Instance* p = XIMAGE_INSTANCE (ii);
struct image_instantiator_methods *meths, *device_meths;
struct gcpro gcpro1;
GCPRO1 (ii);
- if (!valid_image_instantiator_format_p (XVECTOR_DATA (instantiator)[0],
+ 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.",
pointer_bg, dest_mask, domain));
/* Now do device specific instantiation. */
- device_meths = decode_device_ii_format (DOMAIN_DEVICE (governing_domain),
+ device_meths = decode_device_ii_format (DOMAIN_DEVICE (governing_domain),
XVECTOR_DATA (instantiator)[0],
ERROR_ME_NOT);
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);
+ XIMAGE_INSTANCE_HEIGHT (ii),
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY, domain);
MAYBE_IIFORMAT_METH (device_meths, instantiate, (ii, instantiator, pointer_fg,
pointer_bg, dest_mask, domain));
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, XIMAGE_INSTANCE_WIDTH (ii),
- XIMAGE_INSTANCE_HEIGHT (ii), domain);
-
+ image_instance_layout (ii, XIMAGE_INSTANCE_WIDTH (ii),
+ XIMAGE_INSTANCE_HEIGHT (ii),
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY, 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;
- assert ( XIMAGE_INSTANCE_HEIGHT (ii) >= 0
+ assert ( XIMAGE_INSTANCE_HEIGHT (ii) >= 0
&& XIMAGE_INSTANCE_WIDTH (ii) >= 0 );
ERROR_CHECK_IMAGE_INSTANCE (ii);
#endif
mark_object (i->name);
+ mark_object (i->instantiator);
/* 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. */
mark_object (i->domain);
/* We don't mark the glyph reference since that would create a
- circularity preventing GC. */
+ circularity preventing GC. Ditto the instantiator. */
switch (IMAGE_INSTANCE_TYPE (i))
{
case IMAGE_TEXT:
case IMAGE_WIDGET:
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_SUBWINDOW_FACE (i));
mark_object (IMAGE_INSTANCE_WIDGET_ITEMS (i));
mark_object (IMAGE_INSTANCE_LAYOUT_CHILDREN (i));
mark_object (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (i));
break;
}
- /* The image may have been previously finalized (yes that's wierd,
+ /* The image may have been previously finalized (yes that's weird,
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)),
+ MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (i)),
mark_image_instance, (i));
return i->device;
/* 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);
if (!internal_equal (IMAGE_INSTANCE_NAME (i1), IMAGE_INSTANCE_NAME (i2),
depth + 1))
return 0;
+ if (!internal_equal (IMAGE_INSTANCE_INSTANTIATOR (i1),
+ IMAGE_INSTANCE_INSTANTIATOR (i2),
+ depth + 1))
+ return 0;
switch (IMAGE_INSTANCE_TYPE (i1))
{
abort ();
}
- return DEVMETH_OR_GIVEN (DOMAIN_XDEVICE (i1->domain),
+ return DEVMETH_OR_GIVEN (DOMAIN_XDEVICE (i1->domain),
image_instance_equal, (i1, i2, depth), 1);
}
image_instance_hash (Lisp_Object obj, int depth)
{
Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj);
- unsigned long hash = HASH4 (LISP_HASH (IMAGE_INSTANCE_DOMAIN (i)),
+ unsigned long hash = HASH5 (LISP_HASH (IMAGE_INSTANCE_DOMAIN (i)),
IMAGE_INSTANCE_WIDTH (i),
IMAGE_INSTANCE_MARGIN_WIDTH (i),
- IMAGE_INSTANCE_HEIGHT (i));
+ IMAGE_INSTANCE_HEIGHT (i),
+ internal_hash (IMAGE_INSTANCE_INSTANTIATOR (i),
+ depth + 1));
ERROR_CHECK_IMAGE_INSTANCE (obj);
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_LAYOUT_CHILDREN (i),
+ internal_hash (IMAGE_INSTANCE_LAYOUT_CHILDREN (i),
depth + 1));
case IMAGE_SUBWINDOW:
- hash = HASH2 (hash, (int) IMAGE_INSTANCE_SUBWINDOW_ID (i));
+ hash = HASH2 (hash, (EMACS_INT) IMAGE_INSTANCE_SUBWINDOW_ID (i));
break;
default:
abort ();
}
- return HASH2 (hash, DEVMETH_OR_GIVEN
+ return HASH2 (hash, DEVMETH_OR_GIVEN
(XDEVICE (image_instance_device (obj)),
image_instance_hash, (i, depth),
0));
Lisp_Image_Instance);
static Lisp_Object
-allocate_image_instance (Lisp_Object governing_domain, Lisp_Object glyph)
+allocate_image_instance (Lisp_Object governing_domain, Lisp_Object parent,
+ Lisp_Object instantiator)
{
Lisp_Image_Instance *lp =
alloc_lcrecord_type (Lisp_Image_Instance, &lrecord_image_instance);
lp->width = IMAGE_UNSPECIFIED_GEOMETRY;
lp->margin_width = 0;
lp->height = IMAGE_UNSPECIFIED_GEOMETRY;
- lp->parent = glyph;
+ lp->parent = parent;
+ lp->instantiator = instantiator;
/* So that layouts get done. */
lp->layout_changed = 1;
lp->initialized = 0;
return Qnil;
}
-DEFUN ("set-image-instance-property", Fset_image_instance_property, 3, 3, 0, /*
-Set the given property of the given image instance.
-Does nothing if the property or the property method do not exist for
-the image instance in the domain.
-
-WARNING: If you are thinking about using this function, think again.
-You probably want to be using `set-glyph-image' to change the glyph's
-specifier. Be especially wary if you are thinking of calling this
-function after having called `glyph-image-instance'. Unless you are
-absolutely sure what you're doing, pretty much the only legitimate
-uses for this function are setting user-specified info in a widget,
-such as text in a text field. */
- (image_instance, prop, val))
-{
- Lisp_Image_Instance* ii;
- Lisp_Object type, ret;
- 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 (image_instance),
- type, ERROR_ME_NOT);
- if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
- &&
- !UNBOUNDP (ret =
- IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
- {
- val = ret;
- }
- else
- {
- /* ... then format specific methods ... */
- meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
- if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
- &&
- !UNBOUNDP (ret =
- IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
- {
- val = ret;
- }
- else
- {
- val = Qnil;
- }
- }
-
- /* Make sure the image instance gets redisplayed. */
- set_image_instance_dirty_p (image_instance, 1);
- /* Force the glyph to be laid out again. */
- IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 1;
-
- MARK_SUBWINDOWS_STATE_CHANGED;
- MARK_GLYPHS_CHANGED;
-
- return val;
-}
-
DEFUN ("image-instance-file-name", Fimage_instance_file_name, 1, 1, 0, /*
Return the file name from which IMAGE-INSTANCE was read, if known.
*/
/* #### There should be a copy_image_instance(), which calls a
device-specific method to copy the window-system subobject. */
- new = allocate_image_instance (XIMAGE_INSTANCE_DOMAIN (image_instance),
- Qnil);
+ new = allocate_image_instance (XIMAGE_INSTANCE_DOMAIN (image_instance),
+ Qnil, 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
function relatively simple to take account of that. An alternative
approach is to consider separately the two cases, one where you
don't mind what size you have (normal widgets) and one where you
- want to specifiy something (layout widgets). */
+ want to specify something (layout widgets). */
void
image_instance_layout (Lisp_Object image_instance,
- int width, int height, Lisp_Object domain)
+ int width, int height,
+ int xoffset, int yoffset,
+ Lisp_Object domain)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object type;
if (NOTHING_IMAGE_INSTANCEP (image_instance))
return;
+ /* We don't want carefully calculated offsets to be mucked up by
+ random layouts. */
+ if (xoffset != IMAGE_UNCHANGED_GEOMETRY)
+ XIMAGE_INSTANCE_XOFFSET (image_instance) = xoffset;
+ if (yoffset != IMAGE_UNCHANGED_GEOMETRY)
+ XIMAGE_INSTANCE_YOFFSET (image_instance) = yoffset;
+
+ assert (XIMAGE_INSTANCE_YOFFSET (image_instance) >= 0
+ && XIMAGE_INSTANCE_XOFFSET (image_instance) >= 0);
+
type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
IMAGE_INSTANCE_WIDTH (ii) = width;
IMAGE_INSTANCE_HEIGHT (ii) = height;
- if (IIFORMAT_METH_OR_GIVEN (meths, layout,
- (image_instance, width, height, domain), 1))
+ if (IIFORMAT_METH_OR_GIVEN (meths, layout,
+ (image_instance, width, height, xoffset, yoffset,
+ domain), 1))
/* Do not clear the dirty flag here - redisplay will do this for
us at the end. */
IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 0;
}
+/* Update an image instance from its changed instantiator. */
+static void
+update_image_instance (Lisp_Object image_instance,
+ Lisp_Object instantiator)
+{
+ struct image_instantiator_methods* meths;
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+
+ ERROR_CHECK_IMAGE_INSTANCE (image_instance);
+
+ if (NOTHING_IMAGE_INSTANCEP (image_instance))
+ return;
+
+ assert (!internal_equal (IMAGE_INSTANCE_INSTANTIATOR (ii), instantiator, 0)
+ || (internal_equal (IMAGE_INSTANCE_INSTANTIATOR (ii), instantiator, 0)
+ && internal_equal (IMAGE_INSTANCE_INSTANTIATOR (ii), instantiator, -10)));
+
+ /* If the instantiator is identical then do nothing. We must use
+ equal here because the specifier code copies the instantiator. */
+ if (!internal_equal (IMAGE_INSTANCE_INSTANTIATOR (ii), instantiator, 0))
+ {
+ /* Extract the changed properties so that device / format
+ methods only have to cope with these. We assume that
+ normalization has already been done. */
+ Lisp_Object diffs = find_instantiator_differences
+ (instantiator,
+ IMAGE_INSTANCE_INSTANTIATOR (ii));
+ Lisp_Object type = encode_image_instance_type
+ (IMAGE_INSTANCE_TYPE (ii));
+ struct gcpro gcpro1;
+ GCPRO1 (diffs);
+
+ /* try device specific methods first ... */
+ meths = decode_device_ii_format (image_instance_device (image_instance),
+ type, ERROR_ME_NOT);
+ MAYBE_IIFORMAT_METH (meths, update, (image_instance, diffs));
+ /* ... then format specific methods ... */
+ meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
+ MAYBE_IIFORMAT_METH (meths, update, (image_instance, diffs));
+
+ /* Instance and therefore glyph has changed so mark as dirty.
+ If we don't do this output optimizations will assume the
+ glyph is unchanged. */
+ set_image_instance_dirty_p (image_instance, 1);
+ /* Structure has changed. */
+ IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 1;
+
+ UNGCPRO;
+ }
+ /* We should now have a consistent instantiator so keep a record of
+ it. It is important that we don't actually update the window
+ system widgets here - we must do that when redisplay tells us
+ to.
+
+ #### should we delay doing this until the display is up-to-date
+ also? */
+ IMAGE_INSTANCE_INSTANTIATOR (ii) = instantiator;
+}
+
/*
* Mark image instance in W as dirty if (a) W's faces have changed and
* (b) GLYPH_OR_II instance in W is a string.
}
static Lisp_Object
-inherit_normalize (Lisp_Object inst, Lisp_Object console_type)
+inherit_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
Lisp_Object face;
}
/* set the properties of a string */
-static Lisp_Object
-text_set_property (Lisp_Object image_instance, Lisp_Object prop,
- Lisp_Object val)
+static void
+text_update (Lisp_Object image_instance, Lisp_Object instantiator)
{
- Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Object val = find_keyword_in_vector (instantiator, Q_data);
- if (EQ (prop, Q_data))
+ if (!NILP (val))
{
CHECK_STRING (val);
- IMAGE_INSTANCE_TEXT_STRING (ii) = val;
-
- return Qt;
+ XIMAGE_INSTANCE_TEXT_STRING (image_instance) = val;
}
- return Qunbound;
}
\f
int result;
const char *filename_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, name,
- C_STRING_ALLOCA, filename_ext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (name, filename_ext, Qfile_name);
result = read_bitmap_data_from_file (filename_ext, &w, &h,
&data, xhot, yhot);
/* Normalize method for XBM's. */
static Lisp_Object
-xbm_normalize (Lisp_Object inst, Lisp_Object console_type)
+xbm_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
Lisp_Object file = Qnil, mask_file = Qnil;
struct gcpro gcpro1, gcpro2, gcpro3;
}
static Lisp_Object
-xface_normalize (Lisp_Object inst, Lisp_Object console_type)
+xface_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
/* This function can call lisp */
Lisp_Object file = Qnil, mask_file = Qnil;
int result;
char *fname = 0;
- TO_EXTERNAL_FORMAT (LISP_STRING, name,
- C_STRING_ALLOCA, fname,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (name, fname, Qfile_name);
result = XpmReadFileToData (fname, &data);
if (result == XpmSuccess)
}
static Lisp_Object
-xpm_normalize (Lisp_Object inst, Lisp_Object console_type)
+xpm_normalize (Lisp_Object inst, Lisp_Object console_type,
+ Lisp_Object dest_mask)
{
Lisp_Object file = Qnil;
Lisp_Object color_symbols;
Lisp_Object governing_domain =
get_image_instantiator_governing_domain (instantiator, domain);
struct gcpro gcpro1;
-
+
GCPRO1 (instance);
/* We have to put subwindow, widget and text image instances in
{
pointer_fg = FACE_FOREGROUND (Vpointer_face, domain);
pointer_bg = FACE_BACKGROUND (Vpointer_face, domain);
- ls3 = list3 (instantiator, pointer_fg, pointer_bg);
+ ls3 = list3 (glyph, pointer_fg, pointer_bg);
}
/* First look in the device cache. */
if (DEVICEP (governing_domain))
{
- subtable = Fgethash (make_int (dest_mask),
+ subtable = Fgethash (make_int (dest_mask),
XDEVICE (governing_domain)->
image_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.
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
+ subtable = make_lisp_hash_table
(20, pointerp ? HASH_TABLE_KEY_CAR_WEAK
: HASH_TABLE_KEY_WEAK,
pointerp ? HASH_TABLE_EQUAL
}
else
{
- instance = Fgethash (pointerp ? ls3 : instantiator,
+ instance = Fgethash (pointerp ? ls3 : glyph,
subtable, Qunbound);
}
}
/* Subwindows have a per-window cache and have to be treated
differently. */
instance =
- Fgethash (instantiator,
+ Fgethash (pointerp ? ls3 : glyph,
XWINDOW (governing_domain)->subwindow_instance_cache,
Qunbound);
}
{
Lisp_Object locative =
noseeum_cons (Qnil,
- noseeum_cons (pointerp ? ls3 : instantiator,
- DEVICEP (governing_domain) ? subtable
+ noseeum_cons (pointerp ? ls3 : glyph,
+ DEVICEP (governing_domain) ? subtable
: XWINDOW (governing_domain)
->subwindow_instance_cache));
int speccount = specpdl_depth ();
resulting instance, which gets recorded instead. */
record_unwind_protect (image_instantiate_cache_result,
locative);
- instance =
+ instance =
instantiate_image_instantiator (governing_domain,
domain, instantiator,
pointer_fg, pointer_bg,
#ifdef ERROR_CHECK_GLYPHS
if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance))
& (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK))
- assert (EQ (Fgethash ((pointerp ? ls3 : instantiator),
+ assert (EQ (Fgethash ((pointerp ? ls3 : glyph),
XWINDOW (governing_domain)
->subwindow_instance_cache,
Qunbound), instance));
#endif
}
- else
- free_list (ls3);
-
- if (NILP (instance))
+ else if (NILP (instance))
signal_simple_error ("Can't instantiate image (probably cached)",
instantiator);
+ /* We found an instance. However, because we are using the glyph
+ as the hash key instead of the instantiator, the current
+ instantiator may not be the same as the original. Thus we
+ must update the instance based on the new
+ instantiator. Preserving instance identity like this is
+ important to stop excessive window system widget creation and
+ deletion - and hence flashing. */
+ else
+ {
+ /* #### This function should be able to cope with *all*
+ changes to the instantiator, but currently only copes
+ with the most used properties. This means that it is
+ possible to make changes that don't get reflected in the
+ display. */
+ update_image_instance (instance, instantiator);
+ free_list (ls3);
+ }
+
#ifdef ERROR_CHECK_GLYPHS
if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance))
& (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK))
}
DEFUN ("make-glyph-internal", Fmake_glyph_internal, 0, 1, 0, /*
-Create and return a new uninitialized glyph or type TYPE.
+Create and return a new uninitialized glyph of type TYPE.
TYPE specifies the type of the glyph; this should be one of `buffer',
`pointer', or `icon', and defaults to `buffer'. The type of the glyph
if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
- IMAGE_UNSPECIFIED_GEOMETRY, domain);
+ IMAGE_UNSPECIFIED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY, domain);
return XIMAGE_INSTANCE_WIDTH (instance);
}
if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
- IMAGE_UNSPECIFIED_GEOMETRY, domain);
+ IMAGE_UNSPECIFIED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY, domain);
if (XIMAGE_INSTANCE_TYPE (instance) == IMAGE_TEXT)
return XIMAGE_INSTANCE_TEXT_ASCENT (instance);
if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
- IMAGE_UNSPECIFIED_GEOMETRY, domain);
+ IMAGE_UNSPECIFIED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY, domain);
if (XIMAGE_INSTANCE_TYPE (instance) == IMAGE_TEXT)
return XIMAGE_INSTANCE_TEXT_DESCENT (instance);
if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
- IMAGE_UNSPECIFIED_GEOMETRY, domain);
+ IMAGE_UNSPECIFIED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY,
+ IMAGE_UNCHANGED_GEOMETRY, domain);
return XIMAGE_INSTANCE_HEIGHT (instance);
}
(XGLYPH (glyph)->after_change) (glyph, property, locale);
}
-#if 0 /* Not used for now */
-static void
-glyph_query_geometry (Lisp_Object glyph_or_image, Lisp_Object window,
- unsigned int* width, unsigned int* height,
+void
+glyph_query_geometry (Lisp_Object glyph_or_image, int* width, int* height,
enum image_instance_geometry disp, Lisp_Object domain)
{
Lisp_Object instance = glyph_or_image;
if (GLYPHP (glyph_or_image))
- instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1);
+ instance = glyph_image_instance (glyph_or_image, domain, ERROR_ME_NOT, 1);
image_instance_query_geometry (instance, width, height, disp, domain);
}
-static void
-glyph_layout (Lisp_Object glyph_or_image, Lisp_Object window,
- unsigned int width, unsigned int height, Lisp_Object domain)
+void
+glyph_do_layout (Lisp_Object glyph_or_image, int width, int height,
+ int xoffset, int yoffset, Lisp_Object domain)
{
Lisp_Object instance = glyph_or_image;
if (GLYPHP (glyph_or_image))
- instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1);
+ instance = glyph_image_instance (glyph_or_image, domain, ERROR_ME_NOT, 1);
- image_instance_layout (instance, width, height, domain);
+ image_instance_layout (instance, width, height, xoffset, yoffset, domain);
}
-#endif
\f
/*****************************************************************************
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)
+int
+unmap_subwindow_instance_cache_mapper (Lisp_Object key, Lisp_Object value,
+ void* finalize)
{
- Lisp_Object rest;
-
- LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
+ /* value can be nil; we cache failures as well as successes */
+ if (!NILP (value))
{
- 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);
+ struct frame* f = XFRAME (XIMAGE_INSTANCE_FRAME (value));
+ unmap_subwindow (value);
+ if (finalize)
+ {
+ /* 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)));
+ finalize_image_instance (XIMAGE_INSTANCE (value), 0);
+ }
}
+ return 0;
+}
+
+static void
+finalize_all_subwindow_instances (struct window *w)
+{
+ if (!NILP (w->next)) finalize_all_subwindow_instances (XWINDOW (w->next));
+ if (!NILP (w->vchild)) finalize_all_subwindow_instances (XWINDOW (w->vchild));
+ if (!NILP (w->hchild)) finalize_all_subwindow_instances (XWINDOW (w->hchild));
+
+ elisp_maphash (unmap_subwindow_instance_cache_mapper,
+ w->subwindow_instance_cache, (void*)1);
+}
+
+void
+free_frame_subwindow_instances (struct frame* f)
+{
+ /* Make sure all instances are finalized. We have to do this via the
+ instance cache since some instances may be extant but not
+ displayed (and hence not in the frame cache). */
+ finalize_all_subwindow_instances (XWINDOW (f->root_window));
}
-/* Unmap and remove all instances from the frame cache. */
+/* Unmap all instances in the frame cache. */
void
reset_frame_subwindow_instance_cache (struct frame* f)
{
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)));
}
}
for (ei = f->subwindow_exposures, prev = 0; ei; ei = ei->next)
{
/* Checking for exact matches just isn't good enough as we
- mighte get exposures for partially obscure subwindows, thus
- we have to check for overlaps. Being conservative we will
- check for exposures wholly contained by the subwindow, this
+ might get exposures for partially obscured subwindows, thus
+ we have to check for overlaps. Being conservative, we will
+ check for exposures wholly contained by the subwindow - this
might give us what we want.*/
if (ei->x <= x && ei->y <= y
&& ei->x + ei->width >= x + width
if (IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii)
&&
- IMAGE_INSTANCE_DISPLAY_X (ii) <= x
- &&
- IMAGE_INSTANCE_DISPLAY_Y (ii) <= y
+ IMAGE_INSTANCE_DISPLAY_X (ii) <= x
+ &&
+ IMAGE_INSTANCE_DISPLAY_Y (ii) <= y
&&
IMAGE_INSTANCE_DISPLAY_X (ii)
+ IMAGE_INSTANCE_DISPLAY_WIDTH (ii) >= x + width
should generally only get called if the subwindow is actually
dirty. */
void
-update_subwindow (Lisp_Object subwindow)
+redisplay_subwindow (Lisp_Object subwindow)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
int count = specpdl_depth ();
if (WIDGET_IMAGE_INSTANCEP (subwindow))
{
if (image_instance_changed (subwindow))
- update_widget (subwindow);
+ redisplay_widget (subwindow);
/* Reset the changed flags. */
IMAGE_INSTANCE_WIDGET_FACE_CHANGED (ii) = 0;
IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 0;
+ IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii) = 0;
IMAGE_INSTANCE_TEXT_CHANGED (ii) = 0;
}
else if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW
!NILP (IMAGE_INSTANCE_FRAME (ii)))
{
MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain),
- update_subwindow, (ii));
+ redisplay_subwindow, (ii));
}
IMAGE_INSTANCE_SIZE_CHANGED (ii) = 0;
way round - it simply means that we will get more displays than
we might need. We can get better hashing by making the depth
negative - currently it will recurse down 7 levels.*/
- IMAGE_INSTANCE_DISPLAY_HASH (ii) = internal_hash (subwindow,
+ IMAGE_INSTANCE_DISPLAY_HASH (ii) = internal_hash (subwindow,
IMAGE_INSTANCE_HASH_DEPTH);
unbind_to (count, Qnil);
}
+/* Determine whether an image_instance has changed structurally and
+ hence needs redisplaying in some way.
+
+ #### This should just look at the instantiator differences when we
+ get rid of the stored items altogether. In fact we should probably
+ store the new instantiator as well as the old - as we do with
+ gui_items currently - and then pick-up the new on the next
+ redisplay. This would obviate the need for any of this trickery
+ with hashcodes. */
int
image_instance_changed (Lisp_Object subwindow)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
- if (internal_hash (subwindow, IMAGE_INSTANCE_HASH_DEPTH) !=
+ if (internal_hash (subwindow, IMAGE_INSTANCE_HASH_DEPTH) !=
IMAGE_INSTANCE_DISPLAY_HASH (ii))
return 1;
/* #### I think there is probably a bug here. This gets called for
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))))
+ || !NILP (IMAGE_INSTANCE_LAYOUT_CHILDREN (ii))
+ || IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii)))
return 1;
else
return 0;
struct frame* f;
Lisp_Object rest;
- /* Its possible for the preceeding callback to have deleted the
+ /* Its possible for the preceding 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. */
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))
return;
#ifdef DEBUG_WIDGETS
- stderr_out ("unmapping subwindow %d\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
+ stderr_out ("unmapping subwindow %p\n", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
#endif
f = XFRAME (IMAGE_INSTANCE_FRAME (ii));
IMAGE_INSTANCE_DISPLAY_HEIGHT (ii));
IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0;
- MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)),
+ MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)),
unmap_subwindow, (ii));
}
return;
#ifdef DEBUG_WIDGETS
- stderr_out ("mapping subwindow %d, %dx%d@%d+%d\n",
+ stderr_out ("mapping subwindow %p, %dx%d@%d+%d\n",
IMAGE_INSTANCE_SUBWINDOW_ID (ii),
dga->width, dga->height, x, y);
#endif
f = XFRAME (IMAGE_INSTANCE_FRAME (ii));
- IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 1;
IMAGE_INSTANCE_DISPLAY_X (ii) = x;
IMAGE_INSTANCE_DISPLAY_Y (ii) = y;
IMAGE_INSTANCE_DISPLAY_WIDTH (ii) = dga->width;
MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain),
map_subwindow, (ii, x, y, dga));
+ IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 1;
}
static int
}
}
-/* This is just a backup in case no-one has assigned a suitable geometry.
+/* 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, int* width,
(subwindow))
{
CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow);
- return make_int ((int) XIMAGE_INSTANCE_SUBWINDOW_ID (subwindow));
+ return make_int ((EMACS_INT) XIMAGE_INSTANCE_SUBWINDOW_ID (subwindow));
}
DEFUN ("resize-subwindow", Fresize_subwindow, 1, 3, 0, /*
else
newh = XINT (height);
- /* The actual resizing gets done asychronously by
+ /* The actual resizing gets done asynchronously by
update_subwindow. */
IMAGE_INSTANCE_HEIGHT (ii) = newh;
IMAGE_INSTANCE_WIDTH (ii) = neww;
DEFSUBR (Fset_console_type_image_conversion_list);
DEFSUBR (Fconsole_type_image_conversion_list);
- defkeyword (&Q_file, ":file");
- defkeyword (&Q_data, ":data");
- defkeyword (&Q_face, ":face");
- defkeyword (&Q_pixel_height, ":pixel-height");
- defkeyword (&Q_pixel_width, ":pixel-width");
+ DEFKEYWORD (Q_file);
+ DEFKEYWORD (Q_data);
+ DEFKEYWORD (Q_face);
+ DEFKEYWORD (Q_pixel_height);
+ DEFKEYWORD (Q_pixel_width);
#ifdef HAVE_XPM
- defkeyword (&Q_color_symbols, ":color-symbols");
+ DEFKEYWORD (Q_color_symbols);
#endif
#ifdef HAVE_WINDOW_SYSTEM
- defkeyword (&Q_mask_file, ":mask-file");
- defkeyword (&Q_mask_data, ":mask-data");
- defkeyword (&Q_hotspot_x, ":hotspot-x");
- defkeyword (&Q_hotspot_y, ":hotspot-y");
- defkeyword (&Q_foreground, ":foreground");
- defkeyword (&Q_background, ":background");
+ DEFKEYWORD (Q_mask_file);
+ DEFKEYWORD (Q_mask_data);
+ DEFKEYWORD (Q_hotspot_x);
+ DEFKEYWORD (Q_hotspot_y);
+ DEFKEYWORD (Q_foreground);
+ DEFKEYWORD (Q_background);
#endif
/* image specifiers */
defsymbol (&Qimage_instancep, "image-instance-p");
- defsymbol (&Qnothing_image_instance_p, "nothing-image-instance-p");
- defsymbol (&Qtext_image_instance_p, "text-image-instance-p");
- defsymbol (&Qmono_pixmap_image_instance_p, "mono-pixmap-image-instance-p");
- defsymbol (&Qcolor_pixmap_image_instance_p, "color-pixmap-image-instance-p");
- 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 (Qnothing_image_instance_p);
+ DEFSYMBOL (Qtext_image_instance_p);
+ DEFSYMBOL (Qmono_pixmap_image_instance_p);
+ DEFSYMBOL (Qcolor_pixmap_image_instance_p);
+ DEFSYMBOL (Qpointer_image_instance_p);
+ DEFSYMBOL (Qwidget_image_instance_p);
+ DEFSYMBOL (Qsubwindow_image_instance_p);
DEFSUBR (Fmake_image_instance);
DEFSUBR (Fimage_instance_p);
DEFSUBR (Fimage_instance_foreground);
DEFSUBR (Fimage_instance_background);
DEFSUBR (Fimage_instance_property);
- DEFSUBR (Fset_image_instance_property);
DEFSUBR (Fcolorize_image_instance);
/* subwindows */
DEFSUBR (Fsubwindowp);
/* Qnothing defined as part of the "nothing" image-instantiator
type. */
/* Qtext defined in general.c */
- defsymbol (&Qmono_pixmap, "mono-pixmap");
- defsymbol (&Qcolor_pixmap, "color-pixmap");
+ DEFSYMBOL (Qmono_pixmap);
+ DEFSYMBOL (Qcolor_pixmap);
/* Qpointer defined in general.c */
/* glyphs */
- defsymbol (&Qglyphp, "glyphp");
- defsymbol (&Qcontrib_p, "contrib-p");
- defsymbol (&Qbaseline, "baseline");
+ DEFSYMBOL (Qglyphp);
+ DEFSYMBOL (Qcontrib_p);
+ DEFSYMBOL (Qbaseline);
- defsymbol (&Qbuffer_glyph_p, "buffer-glyph-p");
- defsymbol (&Qpointer_glyph_p, "pointer-glyph-p");
- defsymbol (&Qicon_glyph_p, "icon-glyph-p");
+ DEFSYMBOL (Qbuffer_glyph_p);
+ DEFSYMBOL (Qpointer_glyph_p);
+ DEFSYMBOL (Qicon_glyph_p);
- defsymbol (&Qconst_glyph_variable, "const-glyph-variable");
+ DEFSYMBOL (Qconst_glyph_variable);
DEFSUBR (Fglyph_type);
DEFSUBR (Fvalid_glyph_type_p);
DEFSUBR (Fglyph_ascent);
DEFSUBR (Fglyph_descent);
DEFSUBR (Fglyph_height);
+ DEFSUBR (Fset_instantiator_property);
/* Qbuffer defined in general.c. */
/* Qpointer defined above */
/* Unfortunately, timeout handlers must be lisp functions. This is
for animated glyphs. */
- defsymbol (&Qglyph_animated_timeout_handler,
- "glyph-animated-timeout-handler");
+ DEFSYMBOL (Qglyph_animated_timeout_handler);
DEFSUBR (Fglyph_animated_timeout_handler);
/* Errors */
- deferror (&Qimage_conversion_error,
- "image-conversion-error",
- "image-conversion error", Qio_error);
-
+ DEFERROR_STANDARD (Qimage_conversion_error, Qio_error);
}
static const struct lrecord_description image_specifier_description[] = {
};
const struct struct_description iim_description = {
- sizeof(struct image_instantiator_methods),
+ sizeof (struct image_instantiator_methods),
iim_description_1
};
/* #### 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, update);
IIFORMAT_HAS_METHOD (text, query_geometry);
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (formatted_string, "formatted-string");
};
#define IMAGE_UNSPECIFIED_GEOMETRY -1
+#define IMAGE_UNCHANGED_GEOMETRY -2
#define WIDGET_BORDER_HEIGHT 4
#define WIDGET_BORDER_WIDTH 4
that should be used in a glyph, for devices of type CONSOLE_TYPE.
Signal an error if conversion fails. */
Lisp_Object (*normalize_method) (Lisp_Object instantiator,
- Lisp_Object console_type);
+ Lisp_Object console_type,
+ Lisp_Object dest_mask);
/* Governing domain method: Return an int indicating what type of
domain an instance in this format is governed by. */
Lisp_Object property,
Lisp_Object val);
/* Asynchronously update properties. */
- void (*update_method) (Lisp_Object image_instance);
+ void (*update_method) (Lisp_Object image_instance,
+ Lisp_Object instantiator);
+ void (*redisplay_method) (Lisp_Object image_instance);
/* Find out the desired geometry, as given by disp, of this image
instance. Actual geometry is stored in the appropriate slots in the
/* Layout the instance and its children bounded by the provided
dimensions. Returns success or failure. */
int (*layout_method) (Lisp_Object image_instance,
- int width, int height, Lisp_Object domain);
+ int width, int height, int xoffset, int yoffset,
+ Lisp_Object domain);
};
/***** Calling an image-instantiator method *****/
#define IIFORMAT_VALID_MULTI_KEYWORD(format, keyw, validate_fun) \
IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 1)
-/* Same as IIFORMAT_VALID_KEYWORD execpt that the argument is not
+/* Same as IIFORMAT_VALID_KEYWORD except that the argument is not
copied by the specifier functions. This is necessary for things
like callbacks etc. */
#define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun) \
void check_valid_int (Lisp_Object data);
void check_valid_face (Lisp_Object data);
void check_valid_vector (Lisp_Object data);
-void check_valid_item_list_1 (Lisp_Object items);
+void check_valid_item_list (Lisp_Object items);
void initialize_subwindow_image_instance (Lisp_Image_Instance*);
void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
enum image_instance_geometry disp,
Lisp_Object domain);
void image_instance_layout (Lisp_Object image_instance,
- int width, int height,
+ int width, int height, int xoffset, int yoffset,
Lisp_Object domain);
int layout_layout (Lisp_Object image_instance,
- int width, int height,
+ int width, int height, int xoffset, int yoffset,
Lisp_Object domain);
int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w);
/* The glyph from which we were instantiated. This is a weak
reference. */
Lisp_Object parent;
+ /* The instantiator from which we were instantiated. */
+ Lisp_Object instantiator;
enum image_instance_type type;
unsigned int x_offset, y_offset; /* for layout purposes */
int width, height, margin_width;
unsigned int dirty : 1;
unsigned int size_changed : 1;
unsigned int text_changed : 1;
- unsigned int layout_changed : 1;
+ unsigned int layout_changed : 1;
unsigned int optimize_output : 1; /* For outputting layouts. */
unsigned int initialized : 1; /* When we're fully done. */
+ unsigned int wants_initial_focus : 1;
union
{
struct
{
void* subwindow; /* specific devices can use this as necessary */
- struct
+ struct
{ /* We need these so we can do without
subwindow_cachel */
- unsigned int x, y;
+ unsigned int x, y;
unsigned int width, height;
} display_data;
unsigned int being_displayed : 1; /* used to detect when needs
unsigned int justification : 2; /* Left, right or center. */
/* 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
+ spec. Using glyph-face is more inconvenient, although more
general. */
Lisp_Object face;
Lisp_Object type;
/* Change flags to augment dirty. */
unsigned int face_changed : 1;
unsigned int items_changed : 1;
+ unsigned int action_occurred : 1;
} subwindow;
} u;
#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_INSTANTIATOR(i) ((i)->instantiator)
#define IMAGE_INSTANCE_GLYPH(i) (image_instance_parent_glyph(i))
#define IMAGE_INSTANCE_TYPE(i) ((i)->type)
#define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset)
#define IMAGE_INSTANCE_FACE(i) \
(GLYPHP (IMAGE_INSTANCE_GLYPH (i)) ? \
XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) : Qnil)
+#define IMAGE_INSTANCE_WANTS_INITIAL_FOCUS(i) ((i)->wants_initial_focus)
/* Changed flags */
#define IMAGE_INSTANCE_TEXT_CHANGED(i) ((i)->text_changed)
((i)->u.subwindow.face_changed)
#define IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED(i) \
((i)->u.subwindow.items_changed)
+#define IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED(i) \
+ ((i)->u.subwindow.action_occurred)
#define IMAGE_INSTANCE_LAYOUT_CHANGED(i) ((i)->layout_changed)
#define IMAGE_INSTANCE_OPTIMIZE_OUTPUT(i) ((i)->optimize_output)
((i)->u.subwindow.orientation)
#define IMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
((i)->u.subwindow.justification)
+#define IMAGE_INSTANCE_SUBWINDOW_FACE(i) \
+((i)->u.subwindow.face)
/* Widget properties */
#define IMAGE_INSTANCE_WIDGET_WIDTH(i) \
IMAGE_INSTANCE_GLYPH (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_PARENT(i) \
IMAGE_INSTANCE_PARENT (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_INSTANTIATOR(i) \
+ IMAGE_INSTANCE_INSTANTIATOR (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_TYPE(i) \
IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_DISPLAY_HASH(i) \
IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_ACTION_OCCURRED(i) \
+ IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_LAYOUT_CHILDREN(i) \
IMAGE_INSTANCE_LAYOUT_CHILDREN (XIMAGE_INSTANCE (i))
IMAGE_INSTANCE_SUBWINDOW_ORIENT (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_SUBWINDOW_FACE(i) \
+ IMAGE_INSTANCE_SUBWINDOW_FACE (XIMAGE_INSTANCE (i))
#define MARK_IMAGE_INSTANCE_CHANGED(i) \
(IMAGE_INSTANCE_DIRTYP (i) = 1);
void string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain);
+int tab_control_order_only_changed (Lisp_Object image_instance);
Lisp_Object allocate_glyph (enum glyph_type type,
void (*after_change) (Lisp_Object glyph,
Lisp_Object property,
Lisp_Object locale));
+Lisp_Object normalize_image_instantiator (Lisp_Object instantiator,
+ Lisp_Object contype,
+ Lisp_Object dest_mask);
+void glyph_query_geometry (Lisp_Object glyph_or_image, int* width, int* height,
+ enum image_instance_geometry disp,
+ Lisp_Object domain);
+void glyph_do_layout (Lisp_Object glyph_or_image, int width, int height,
+ int xoffset, int yoffset,
+ Lisp_Object domain);
void query_string_geometry ( Lisp_Object string, Lisp_Object face,
- int* width, int* height, int* descent,
+ int* width, int* height, int* descent,
Lisp_Object domain);
Lisp_Object query_string_font (Lisp_Object string,
Lisp_Object face, Lisp_Object domain);
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 redisplay_widget (Lisp_Object widget);
void update_widget_instances (Lisp_Object frame);
-void update_subwindow (Lisp_Object subwindow);
+void redisplay_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 free_frame_subwindow_instances (struct frame* f);
void reset_frame_subwindow_instance_cache (struct frame* f);
+int unmap_subwindow_instance_cache_mapper (Lisp_Object key,
+ Lisp_Object value, void* finalize);
struct expose_ignore
{
conn.maxMod = ((1<<KG_SHIFT)|(1<<KG_ALT)|(1<<KG_CTRL));
/* Reset some silly static variables so that multiple Gpm_Open()
- ** calls have even a sligh chance of working
+ ** calls have even a slight chance of working
*/
gpm_tried = 0;
gpm_flag = 0;
image_instance = Fgethash (make_int (id),
FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f), Qnil);
+ /* It is possible for a widget action to cause it to get out of sync
+ with its instantiator. Thus it is necessary to signal this
+ possibility. */
+ if (IMAGE_INSTANCEP (image_instance))
+ XIMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (image_instance) = 1;
callback = Fgethash (make_int (id),
FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f), Qnil);
callback_ex = Fgethash (make_int (id),
return Qt;
}
-DEFUN ("mswindows-shell-execute", Fmswindows_shell_execute, 2, 4, 0, /*
-Get Windows to perform OPERATION on DOCUMENT.
-This is a wrapper around the ShellExecute system function, which
-invokes the application registered to handle OPERATION for DOCUMENT.
-OPERATION is typically \"open\", \"print\" or \"explore\" (but can be
-nil for the default action), and DOCUMENT is typically the name of a
-document file or URL, but can also be a program executable to run or
-a directory to open in the Windows Explorer.
-
-If DOCUMENT is a program executable, PARAMETERS can be a string
-containing command line parameters, but otherwise should be nil.
-
-SHOW-FLAG can be used to control whether the invoked application is hidden
-or minimized. If SHOW-FLAG is nil, the application is displayed normally,
-otherwise it is an integer representing a ShowWindow flag:
-
- 0 - start hidden
- 1 - start normally
- 3 - start maximized
- 6 - start minimized
-*/
- (operation, document, parameters, show_flag))
-{
- /* Encode filename and current directory. */
- Lisp_Object current_dir = Ffile_name_directory (document);
- char* path = NULL;
- char* doc = NULL;
- Extbyte* f=0;
- int ret;
- struct gcpro gcpro1, gcpro2;
-
- CHECK_STRING (document);
-
- if (NILP (current_dir))
- current_dir = current_buffer->directory;
-
- GCPRO2 (current_dir, document);
-
- /* Use mule and cygwin-safe APIs top get at file data. */
- if (STRINGP (current_dir))
- {
- TO_EXTERNAL_FORMAT (LISP_STRING, current_dir,
- C_STRING_ALLOCA, f,
- Qfile_name);
-#ifdef CYGWIN
- CYGWIN_WIN32_PATH (f, path);
-#else
- path = f;
-#endif
- }
-
- if (STRINGP (document))
- {
- TO_EXTERNAL_FORMAT (LISP_STRING, document,
- C_STRING_ALLOCA, f,
- Qfile_name);
-#ifdef CYGWIN
- CYGWIN_WIN32_PATH (f, doc);
-#else
- doc = f;
-#endif
- }
-
- UNGCPRO;
-
- ret = (int) ShellExecute (NULL,
- (STRINGP (operation) ?
- XSTRING_DATA (operation) : NULL),
- doc,
- (STRINGP (parameters) ?
- XSTRING_DATA (parameters) : NULL),
- path,
- (INTP (show_flag) ?
- XINT (show_flag) : SW_SHOWDEFAULT));
-
- if (ret > 32)
- return Qt;
-
- if (ret == ERROR_FILE_NOT_FOUND)
- signal_simple_error ("file not found", document);
- else if (ret == ERROR_PATH_NOT_FOUND)
- signal_simple_error ("path not found", current_dir);
- else if (ret == ERROR_BAD_FORMAT)
- signal_simple_error ("bad executable format", document);
- else
- error ("internal error");
-
- return Qnil;
-}
-
void
syms_of_gui_mswindows (void)
{
- DEFSUBR (Fmswindows_shell_execute);
}
/* General GUI code -- X-specific. (menubars, scrollbars, toolbars, dialogs)
Copyright (C) 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996 Ben Wing.
+ Copyright (C) 1995, 1996, 2000 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1998 Free Software Foundation, Inc.
/* Synched up with: Not in FSF. */
+/* This file Mule-ized by Ben Wing, 7-8-00. */
+
#include <config.h>
#include "lisp.h"
#include "redisplay.h"
#include "opaque.h"
-Lisp_Object Qmenu_no_selection_hook;
-
/* we need a unique id for each popup menu, dialog box, and scrollbar */
static unsigned int lwlib_id_tick;
static void
print_widget_value (widget_value *wv, int depth)
{
- /* !!#### This function has not been Mule-ized */
- char d [200];
+ /* strings in wv are in external format; use printf not stdout_out
+ because the latter takes internal-format strings */
+ Extbyte d [200];
int i;
for (i = 0; i < depth; i++) d[i] = ' ';
d[depth]=0;
callback = XCAR (XCDR (data));
callback_ex = XCDR (XCDR (data));
update_subwindows_p = 1;
+ /* It is possible for a widget action to cause it to get out of
+ sync with its instantiator. Thus it is necessary to signal
+ this possibility. */
+ if (IMAGE_INSTANCEP (image_instance))
+ XIMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (image_instance) = 1;
if (!NILP (callback_ex) && !UNBOUNDP (callback_ex))
{
event = Fmake_event (Qnil, Qnil);
-
+
XEVENT (event)->event_type = misc_user_event;
XEVENT (event)->channel = frame;
XEVENT (event)->event.eval.function = Qeval;
#endif
if (!NILP (event))
enqueue_Xt_dispatch_event (event);
- /* The result of this evaluation could cause other instances to change so
+ /* The result of this evaluation could cause other instances to change so
enqueue an update callback to check this. */
if (update_subwindows_p && !NILP (event))
enqueue_magic_eval_event (update_widget_instances, frame);
((void) (slot = (!NILP (form))))
#endif
-char *
-menu_separator_style (const char *s)
+Extbyte *
+menu_separator_style_and_to_external (const Bufbyte *s)
{
- const char *p;
- char first;
+ const Bufbyte *p;
+ Bufbyte first;
if (!s || s[0] == '\0')
return NULL;
? NULL /* single etched is the default */
: xstrdup ("shadowDoubleEtchedIn"));
else if (*p == ':')
- return xstrdup (p+1);
+ {
+ Extbyte *retval;
+
+ C_STRING_TO_EXTERNAL_MALLOC (p + 1, retval, Qlwlib_encoding);
+ return retval;
+ }
return NULL;
}
-char *
-strdup_and_add_accel (char *name)
+Extbyte *
+add_accel_and_to_external (Lisp_Object string)
{
int i;
int found_accel = 0;
+ Extbyte *retval;
+ Bufbyte *name = XSTRING_DATA (string);
- for (i=0; name[i]; ++i)
+ for (i = 0; name[i]; ++i)
if (name[i] == '%' && name[i+1] == '_')
{
found_accel = 1;
}
if (found_accel)
- return xstrdup (name);
+ LISP_STRING_TO_EXTERNAL_MALLOC (string, retval, Qlwlib_encoding);
else
{
- char *chars = (char *) alloca (strlen (name) + 3);
+ size_t namelen = XSTRING_LENGTH (string);
+ Bufbyte *chars = (Bufbyte *) alloca (namelen + 3);
chars[0] = '%';
chars[1] = '_';
- memcpy (chars+2, name, strlen (name) + 1);
- return xstrdup (chars);
+ memcpy (chars + 2, name, namelen + 1);
+ C_STRING_TO_EXTERNAL_MALLOC (chars, retval, Qlwlib_encoding);
}
+
+ return retval;
}
/* This does the dirty work. gc_currently_forbidden is 1 when this is called.
int
button_item_to_widget_value (Lisp_Object gui_object_instance,
Lisp_Object gui_item, widget_value *wv,
- int allow_text_field_p, int no_keys_p,
- int menu_entry_p)
+ int allow_text_field_p, int no_keys_p,
+ int menu_entry_p, int accel_p)
{
- /* !!#### This function has not been Mule-ized */
/* This function cannot GC because gc_currently_forbidden is set when
it's called */
Lisp_Gui_Item* pgui = 0;
if (STRINGP (gui_item))
{
wv->type = TEXT_TYPE;
- wv->name = (char *) XSTRING_DATA (gui_item);
- wv->name = strdup_and_add_accel (wv->name);
+ if (accel_p)
+ wv->name = add_accel_and_to_external (gui_item);
+ else
+ LISP_STRING_TO_EXTERNAL_MALLOC (gui_item, wv->name, Qlwlib_encoding);
return 1;
}
else if (!GUI_ITEMP (gui_item))
- signal_simple_error("need a string or a gui_item here", gui_item);
+ syntax_error ("need a string or a gui_item here", gui_item);
pgui = XGUI_ITEM (gui_item);
if (!NILP (pgui->filter))
- signal_simple_error(":filter keyword not permitted on leaf nodes", gui_item);
+ syntax_error (":filter keyword not permitted on leaf nodes", gui_item);
#ifdef HAVE_MENUBARS
if (menu_entry_p && !gui_item_included_p (gui_item, Vmenubar_configuration))
pgui->name = Feval (pgui->name);
CHECK_STRING (pgui->name);
- wv->name = (char *) XSTRING_DATA (pgui->name);
- wv->name = xstrdup (wv->name);
- wv->accel = LISP_TO_VOID (gui_item_accelerator (gui_item));
+ if (accel_p)
+ {
+ wv->name = add_accel_and_to_external (pgui->name);
+ wv->accel = LISP_TO_VOID (gui_item_accelerator (gui_item));
+ }
+ else
+ {
+ LISP_STRING_TO_EXTERNAL_MALLOC (pgui->name, wv->name, Qlwlib_encoding);
+ wv->accel = LISP_TO_VOID (Qnil);
+ }
if (!NILP (pgui->suffix))
{
- const char *const_bogosity;
Lisp_Object suffix2;
/* Shortcut to avoid evaluating suffix each time */
CHECK_STRING (suffix2);
}
- TO_EXTERNAL_FORMAT (LISP_STRING, suffix2,
- C_STRING_ALLOCA, const_bogosity,
- Qfile_name);
- wv->value = (char *) const_bogosity;
- wv->value = xstrdup (wv->value);
+ LISP_STRING_TO_EXTERNAL_MALLOC (suffix2, wv->value, Qlwlib_encoding);
}
wv_set_evalable_slot (wv->enabled, pgui->active);
CHECK_STRING (pgui->keys);
pgui->keys = Fsubstitute_command_keys (pgui->keys);
if (XSTRING_LENGTH (pgui->keys) > 0)
- wv->key = xstrdup ((char *) XSTRING_DATA (pgui->keys));
+ LISP_STRING_TO_EXTERNAL_MALLOC (pgui->keys, wv->key, Qlwlib_encoding);
else
wv->key = 0;
}
/* #### Warning, dependency here on current_buffer and point */
where_is_to_char (pgui->callback, buf);
if (buf [0])
- wv->key = xstrdup (buf);
+ C_STRING_TO_EXTERNAL_MALLOC (buf, wv->key, Qlwlib_encoding);
else
wv->key = 0;
}
CHECK_SYMBOL (pgui->style);
if (NILP (pgui->style))
{
+ Bufbyte *intname;
/* If the callback is nil, treat this item like unselectable text.
This way, dashes will show up as a separator. */
if (!wv->enabled)
wv->type = BUTTON_TYPE;
- if (separator_string_p (wv->name))
+ EXTERNAL_TO_C_STRING (wv->name, intname, Qlwlib_encoding);
+ if (separator_string_p (intname))
{
wv->type = SEPARATOR_TYPE;
- wv->value = menu_separator_style (wv->name);
+ wv->value = menu_separator_style_and_to_external (intname);
}
else
{
#endif
}
else
- signal_simple_error_2 ("Unknown style", pgui->style, gui_item);
+ syntax_error_2 ("Unknown style", pgui->style, gui_item);
if (!allow_text_field_p && (wv->type == TEXT_TYPE))
- signal_simple_error ("Text field not allowed in this context", gui_item);
+ syntax_error ("Text field not allowed in this context", gui_item);
if (!NILP (pgui->selected) && EQ (pgui->style, Qtext))
- signal_simple_error (
- ":selected only makes sense with :style toggle, radio or button",
- gui_item);
+ syntax_error
+ (":selected only makes sense with :style toggle, radio or button",
+ gui_item);
return 1;
}
/* parse tree's of gui items into widget_value hierarchies */
-static void gui_item_children_to_widget_values (Lisp_Object gui_object_instance,
+static void gui_item_children_to_widget_values (Lisp_Object
+ gui_object_instance,
Lisp_Object items,
- widget_value* parent);
+ widget_value* parent,
+ int accel_p);
static widget_value *
gui_items_to_widget_values_1 (Lisp_Object gui_object_instance,
Lisp_Object items, widget_value* parent,
- widget_value* prev)
+ widget_value* prev, int accel_p)
{
widget_value* wv = 0;
/* now walk the tree creating widget_values as appropriate */
if (!CONSP (items))
{
- wv = xmalloc_widget_value();
+ wv = xmalloc_widget_value ();
if (parent)
parent->contents = wv;
else
prev->next = wv;
if (!button_item_to_widget_value (gui_object_instance,
- items, wv, 0, 1, 0))
+ items, wv, 0, 1, 0, accel_p))
{
free_widget_value_tree (wv);
if (parent)
prev->next = 0;
}
else
- {
- wv->value = xstrdup (wv->name); /* what a mess... */
- }
+ wv->value = xstrdup (wv->name); /* what a mess... */
}
else
{
/* first one is the parent */
if (CONSP (XCAR (items)))
- signal_simple_error ("parent item must not be a list", XCAR (items));
+ syntax_error ("parent item must not be a list", XCAR (items));
if (parent)
wv = gui_items_to_widget_values_1 (gui_object_instance,
- XCAR (items), parent, 0);
+ XCAR (items), parent, 0, accel_p);
else
wv = gui_items_to_widget_values_1 (gui_object_instance,
- XCAR (items), 0, prev);
+ XCAR (items), 0, prev, accel_p);
/* the rest are the children */
gui_item_children_to_widget_values (gui_object_instance,
- XCDR (items), wv);
+ XCDR (items), wv, accel_p);
}
return wv;
}
static void
gui_item_children_to_widget_values (Lisp_Object gui_object_instance,
- Lisp_Object items, widget_value* parent)
+ Lisp_Object items, widget_value* parent,
+ int accel_p)
{
widget_value* wv = 0, *prev = 0;
Lisp_Object rest;
/* first one is master */
prev = gui_items_to_widget_values_1 (gui_object_instance, XCAR (items),
- parent, 0);
+ parent, 0, accel_p);
/* the rest are the children */
LIST_LOOP (rest, XCDR (items))
{
Lisp_Object tab = XCAR (rest);
- wv = gui_items_to_widget_values_1 (gui_object_instance, tab, 0, prev);
+ wv = gui_items_to_widget_values_1 (gui_object_instance, tab, 0, prev,
+ accel_p);
prev = wv;
}
}
widget_value *
-gui_items_to_widget_values (Lisp_Object gui_object_instance, Lisp_Object items)
+gui_items_to_widget_values (Lisp_Object gui_object_instance, Lisp_Object items,
+ int accel_p)
{
- /* !!#### This function has not been Mule-ized */
/* This function can GC */
widget_value *control = 0, *tmp = 0;
int count = specpdl_depth ();
Lisp_Object wv_closure;
if (NILP (items))
- signal_simple_error ("must have some items", items);
+ syntax_error ("must have some items", items);
/* Inhibit GC during this conversion. The reasons for this are
the same as in menu_item_descriptor_to_widget_value(); see
/* Also make sure that we free the partially-created widget_value
tree on Lisp error. */
- control = xmalloc_widget_value();
+ control = xmalloc_widget_value ();
wv_closure = make_opaque_ptr (control);
record_unwind_protect (widget_value_unwind, wv_closure);
- gui_items_to_widget_values_1 (gui_object_instance, items, control, 0);
+ gui_items_to_widget_values_1 (gui_object_instance, items, control, 0,
+ accel_p);
/* mess about getting the data we really want */
tmp = control;
syms_of_gui_x (void)
{
INIT_LRECORD_IMPLEMENTATION (popup_data);
-
- defsymbol (&Qmenu_no_selection_hook, "menu-no-selection-hook");
}
void
Vpopup_callbacks = Qnil;
staticpro (&Vpopup_callbacks);
-
-#if 0
- /* This DEFVAR_LISP is just for the benefit of make-docfile. */
- /* #### misnamed */
- DEFVAR_LISP ("menu-no-selection-hook", &Vmenu_no_selection_hook /*
-Function or functions to call when a menu or dialog box is dismissed
-without a selection having been made.
-*/ );
-#endif
- Fset (Qmenu_no_selection_hook, Qnil);
}
/* General GUI code -- X-specific header file.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 1996 Ben Wing.
+ Copyright (C) 1996, 2000 Ben Wing.
This file is part of XEmacs.
/* Synched up with: Not in FSF. */
+/* This file Mule-ized by Ben Wing, 7-8-00. */
+
#ifndef INCLUDED_gui_x_h_
#define INCLUDED_gui_x_h_
void free_popup_widget_value_tree (widget_value *wv);
void popup_selection_callback (Widget widget, LWLIB_ID ignored_id,
XtPointer client_data);
-char *strdup_and_add_accel (char *name);
+Extbyte *add_accel_and_to_external (Lisp_Object string);
int button_item_to_widget_value (Lisp_Object gui_object_instance,
Lisp_Object gui_item, widget_value *wv,
- int allow_text_field_p, int no_keys_p,
- int menu_entry_p);
+ int allow_text_field_p, int no_keys_p,
+ int menu_entry_p, int accel_p);
widget_value * gui_items_to_widget_values (Lisp_Object gui_object_instance,
- Lisp_Object items);
-Lisp_Object menu_name_to_accelerator (char *name);
-char *menu_separator_style (const char *s);
+ Lisp_Object items, int accel_p);
+Extbyte *menu_separator_style_and_to_external (const Bufbyte *s);
Lisp_Object widget_value_unwind (Lisp_Object closure);
#endif /* INCLUDED_gui_x_h_ */
/* Synched up with: Not in FSF. */
+/* This file not quite Mule-ized yet but will be when merged with my
+ Mule workspace. --ben */
+
#include <config.h>
#include "lisp.h"
#include "gui.h"
#include "buffer.h"
#include "bytecode.h"
-Lisp_Object Q_active, Q_suffix, Q_keys, Q_style, Q_selected;
-Lisp_Object Q_filter, Q_config, Q_included, Q_key_sequence;
-Lisp_Object Q_accelerator, Q_label, Q_callback, Q_callback_ex, Q_value;
-Lisp_Object Qtoggle, Qradio;
+Lisp_Object Qmenu_no_selection_hook;
+Lisp_Object Vmenu_no_selection_hook;
static Lisp_Object parse_gui_item_tree_list (Lisp_Object list);
#endif /* HAVE_POPUPS */
int
-separator_string_p (const char *s)
+separator_string_p (const Bufbyte *s)
{
- const char *p;
- char first;
+ const Bufbyte *p;
+ Bufbyte first;
if (!s || s[0] == '\0')
return 0;
Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
if (!KEYWORDP (key))
- signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
+ syntax_error_2 ("Non-keyword in gui item", key, pgui_item->name);
if (EQ (key, Q_suffix)) pgui_item->suffix = val;
else if (EQ (key, Q_active)) pgui_item->active = val;
if (SYMBOLP (val) || CHARP (val))
pgui_item->accelerator = val;
else if (ERRB_EQ (errb, ERROR_ME))
- signal_simple_error ("Bad keyboard accelerator", val);
+ syntax_error ("Bad keyboard accelerator", val);
}
else if (ERRB_EQ (errb, ERROR_ME))
- signal_simple_error_2 ("Unknown keyword in gui item", key,
+ syntax_error_2 ("Unknown keyword in gui item", key,
pgui_item->name);
}
contents = XVECTOR_DATA (item);
if (length < 1)
- signal_simple_error ("GUI item descriptors must be at least 1 elts long", item);
+ syntax_error ("GUI item descriptors must be at least 1 elts long", item);
/* length 1: [ "name" ]
length 2: [ "name" callback ]
{
int i;
if ((length - start) & 1)
- signal_simple_error (
+ syntax_error (
"GUI item descriptor has an odd number of keywords and values",
item);
|| !NILP (Feval (XGUI_ITEM (gui_item)->selected)));
}
+Lisp_Object
+gui_item_list_find_selected (Lisp_Object gui_item_list)
+{
+ /* This function can GC. */
+ Lisp_Object rest;
+ LIST_LOOP (rest, gui_item_list)
+ {
+ if (gui_item_selected_p (XCAR (rest)))
+ return XCAR (rest);
+ }
+ return XCAR (gui_item_list);
+}
+
/*
* Decide whether a GUI item is included by evaluating its :included
* form if given, and testing its :config form against supplied CONFLIST
static DOESNT_RETURN
signal_too_long_error (Lisp_Object name)
{
- signal_simple_error ("GUI item produces too long displayable string", name);
+ syntax_error ("GUI item produces too long displayable string", name);
}
#ifdef HAVE_WINDOW_SYSTEM
return id;
}
-static int
-gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+int
+gui_item_equal_sans_selected (Lisp_Object obj1, Lisp_Object obj2, int depth)
{
Lisp_Gui_Item *p1 = XGUI_ITEM (obj1);
Lisp_Gui_Item *p2 = XGUI_ITEM (obj2);
&&
EQ (p1->style, p2->style)
&&
- EQ (p1->selected, p2->selected)
- &&
EQ (p1->accelerator, p2->accelerator)
&&
EQ (p1->keys, p2->keys)
return 1;
}
+static int
+gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+ Lisp_Gui_Item *p1 = XGUI_ITEM (obj1);
+ Lisp_Gui_Item *p2 = XGUI_ITEM (obj2);
+
+ if (!(gui_item_equal_sans_selected (obj1, obj2, depth)
+ &&
+ EQ (p1->selected, p2->selected)))
+ return 0;
+ return 1;
+}
+
static void
print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
}
else if (GUI_ITEMP (arg))
return copy_gui_item (arg);
- else
+ else
return arg;
}
CHECK_STRING (entry);
}
else
- signal_simple_error ("item must be a vector or a string", entry);
+ syntax_error ("item must be a vector or a string", entry);
RETURN_UNGCPRO (ret);
}
{
INIT_LRECORD_IMPLEMENTATION (gui_item);
- defkeyword (&Q_active, ":active");
- defkeyword (&Q_suffix, ":suffix");
- defkeyword (&Q_keys, ":keys");
- defkeyword (&Q_key_sequence,":key-sequence");
- defkeyword (&Q_style, ":style");
- defkeyword (&Q_selected, ":selected");
- defkeyword (&Q_filter, ":filter");
- defkeyword (&Q_config, ":config");
- defkeyword (&Q_included, ":included");
- defkeyword (&Q_accelerator, ":accelerator");
- defkeyword (&Q_label, ":label");
- defkeyword (&Q_callback, ":callback");
- defkeyword (&Q_callback_ex, ":callback-ex");
- defkeyword (&Q_value, ":value");
-
- defsymbol (&Qtoggle, "toggle");
- defsymbol (&Qradio, "radio");
+ DEFSYMBOL (Qmenu_no_selection_hook);
#ifdef HAVE_POPUPS
DEFSUBR (Fpopup_up_p);
void
vars_of_gui (void)
{
+ DEFVAR_LISP ("menu-no-selection-hook", &Vmenu_no_selection_hook /*
+Function or functions to call when a menu or dialog box is dismissed
+without a selection having been made.
+*/ );
+ Vmenu_no_selection_hook = Qnil;
}
#ifndef INCLUDED_gui_h_
#define INCLUDED_gui_h_
-int separator_string_p (const char *s);
+int separator_string_p (const Bufbyte *s);
void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
+int gui_item_equal_sans_selected (Lisp_Object obj1, Lisp_Object obj2, int depth);
extern int popup_up_p;
#define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
#define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
-extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
-extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
-extern Lisp_Object Q_key_sequence, Q_label, Q_callback, Q_callback_ex, Q_value;
-
void gui_item_add_keyval_pair (Lisp_Object,
Lisp_Object key, Lisp_Object val,
Error_behavior errb);
void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item);
int gui_item_active_p (Lisp_Object);
int gui_item_selected_p (Lisp_Object);
+Lisp_Object gui_item_list_find_selected (Lisp_Object gui_item_list);
int gui_item_included_p (Lisp_Object, Lisp_Object into);
Lisp_Object gui_item_accelerator (Lisp_Object gui_item);
Lisp_Object gui_name_accelerator (Lisp_Object name);
Lisp_Object parse_gui_item_tree_children (Lisp_Object list);
Lisp_Object copy_gui_item_tree (Lisp_Object arg);
+extern Lisp_Object Qmenu_no_selection_hook, Qdelete_dialog_box_hook;
+
/* this is mswindows biased but reasonably safe I think */
#define GUI_ITEM_ID_SLOTS 8
#define GUI_ITEM_ID_MIN(s) (s * 0x2000)
case TOP_GUTTER:
*x = FRAME_LEFT_BORDER_END (f);
*y = FRAME_TOP_BORDER_END (f);
- *width = FRAME_RIGHT_BORDER_START (f)
+ *width = FRAME_RIGHT_BORDER_START (f)
- FRAME_LEFT_BORDER_END (f);
*height = FRAME_TOP_GUTTER_BOUNDS (f);
break;
case BOTTOM_GUTTER:
*x = FRAME_LEFT_BORDER_END (f);
*y = WINDOW_BOTTOM (bot);
- *width = FRAME_RIGHT_BORDER_START (f)
+ *width = FRAME_RIGHT_BORDER_START (f)
- FRAME_LEFT_BORDER_END (f);
*height = FRAME_BOTTOM_GUTTER_BOUNDS (f);
break;
*height = WINDOW_BOTTOM (bot)
- (FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f));
break;
-
+
case RIGHT_GUTTER:
*x = FRAME_RIGHT_BORDER_START (f)
- FRAME_RIGHT_GUTTER_BOUNDS (f);
/* Convert the gutter specifier into something we can actually
display. */
-static Lisp_Object construct_window_gutter_spec (struct window* w,
+static Lisp_Object construct_window_gutter_spec (struct window* w,
enum gutter_pos pos)
{
Lisp_Object rest, *args;
int nargs = 0;
Lisp_Object gutter = RAW_WINDOW_GUTTER (w, pos);
-
+
if (STRINGP (gutter) || NILP (gutter))
return gutter;
GET_LIST_LENGTH (gutter, nargs);
args = alloca_array (Lisp_Object, nargs >> 1);
nargs = 0;
-
+
for (rest = gutter; !NILP (rest); rest = XCDR (XCDR (rest)))
{
/* We only put things in the real gutter that are declared to be
args [nargs++] = XCAR (XCDR (rest));
}
}
-
+
return Fconcat (nargs, args);
}
/* generate some display lines */
generate_displayable_area (w, WINDOW_GUTTER (w, pos),
x + border_width, y + border_width,
- width - 2 * border_width,
+ width - 2 * border_width,
height - 2 * border_width, ddla, 0, findex);
/* We only output the gutter if we think something of significance
(f->extents_changed && w->gutter_extent_modiff[pos]))
{
#ifdef DEBUG_GUTTERS
- printf ("gutter redisplay triggered by %s\n", force ? "force" :
+ printf ("gutter redisplay triggered by %s\n", force ? "force" :
f->faces_changed ? "f->faces_changed" :
f->frame_changed ? "f->frame_changed" :
f->gutter_changed ? "f->gutter_changed" :
{
output_display_line (w, cdla, ddla, line, -1, -1);
}
-
+
/* If the number of display lines has shrunk, adjust. */
if (cdla_len > Dynarr_length (ddla))
{
Dynarr_length (cdla) = Dynarr_length (ddla);
}
-
+
/* grab coordinates of last line and blank after it. */
if (Dynarr_length (ddla) > 0)
{
/* bevel the gutter area if so desired */
if (border_width != 0)
{
- MAYBE_DEVMETH (d, bevel_area,
+ MAYBE_DEVMETH (d, bevel_area,
(w, findex, x, y, width, height, border_width,
EDGE_ALL, EDGE_BEVEL_OUT));
}
w->gutter_extent_modiff [pos] = 0;
}
-/* Sizing gutters is a pain so we try and help the user by detemining
+/* Sizing gutters is a pain so we try and help the user by determining
what height will accommodate all lines. This is useless on left and
right gutters as we always have a maximal number of lines. */
static Lisp_Object
/* This is called by extent_changed_for_redisplay, so that redisplay
knows exactly what extents have changed. */
-void
+void
gutter_extent_signal_changed_region_maybe (Lisp_Object obj,
Bufpos start, Bufpos end)
{
enum gutter_pos pos;
Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f);
struct window* w = XWINDOW (window);
-
+
GUTTER_POS_LOOP (pos)
{
if (EQ (WINDOW_GUTTER (w, pos), obj))
f->extents_changed)
{
enum gutter_pos pos;
-
+
/* We don't actually care about these when outputting the gutter
so locally disable them. */
int local_clip_changed = f->clip_changed;
list1 (Fcons (Qnil, Qzero)));
set_specifier_fallback (Vgutter_border_width[new],
Vdefault_gutter_border_width);
- /* We don't realy want the left and right gutters to default to
+ /* We don't really want the left and right gutters to default to
visible. */
set_specifier_fallback (Vgutter_visible_p[cur],
cur == TOP_GUTTER || cur == BOTTOM_GUTTER ?
}
run_hook (Qdefault_gutter_position_changed_hook);
-
+
return position;
}
{
if (NILP (instantiator))
return;
-
+
/* Must be a string or a plist. */
if (!STRINGP (instantiator) && NILP (Fvalid_plist_p (instantiator)))
signal_simple_error ("Gutter spec must be string, plist or nil", instantiator);
if (!STRINGP (instantiator))
{
Lisp_Object rest;
-
+
for (rest = instantiator; !NILP (rest); rest = XCDR (XCDR (rest)))
{
if (!SYMBOLP (XCAR (rest))
{
w->real_gutter[pos] = construct_window_gutter_spec (w, pos);
w->real_gutter_size[pos] = w->gutter_size[pos];
-
+
if (EQ (w->real_gutter_size[pos], Qautodetect)
&& !NILP (w->gutter_visible_p[pos]))
{
w->real_gutter_size [pos] = calculate_gutter_size (w, pos);
}
}
-
+
MARK_GUTTER_CHANGED;
MARK_MODELINE_CHANGED;
MARK_WINDOWS_CHANGED (w);
return;
if (!NILP (instantiator) && !EQ (instantiator, Qt) && !CONSP (instantiator))
- signal_simple_error ("Gutter visibility must be a boolean or list of symbols",
+ signal_simple_error ("Gutter visibility must be a boolean or list of symbols",
instantiator);
if (CONSP (instantiator))
EXTERNAL_LIST_LOOP (rest, instantiator)
{
if (!SYMBOLP (XCAR (rest)))
- signal_simple_error ("Gutter visibility must be a boolean or list of symbols",
+ signal_simple_error ("Gutter visibility must be a boolean or list of symbols",
instantiator);
}
}
/* 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
- in a kosha environment.
+ in a kosha environment.
This is not only so that things look right but so that
glyph redisplay optimization kicks in, by default display
MAYBE_DEVMETH (d, frame_output_end, (f));
}
-
+
d->gutter_changed = 0;
}
#endif
#ifdef HAVE_MS_WINDOWS
fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
- fb = Fcons (Fcons (list1 (Qmswindows),
+ fb = Fcons (Fcons (list1 (Qmswindows),
make_int (DEFAULT_GUTTER_WIDTH)), fb);
#endif
if (!NILP (fb))
#include "gui-x.h"
#endif
+#ifdef HAVE_MS_WINDOWS
+#include "console-msw.h"
+#endif
+
#ifdef FILE_CODING
#include "file-coding.h"
#endif
static XIMStyle best_style (XIMStyles *user, XIMStyles *xim);
+/* #### it appears this prototype is missing from the X11R6.4 includes,
+ at least the XFree86 version ... */
+char * XSetIMValues(XIM, ...);
+
void
Initialize_Locale (void)
{
#ifdef THIS_IS_X11R6
DEVICE_X_XIM (d) = NULL;
XRegisterIMInstantiateCallback (DEVICE_X_DISPLAY (d), NULL, NULL, NULL,
- IMInstantiateCallback, (XPointer) d);
+ IMInstantiateCallback,
+ /* The sixth parameter is of type
+ XPointer in XFree86 but (XPointer *)
+ on most other X11's. */
+ (void *) d);
return;
#else
Display *dpy = DEVICE_X_DISPLAY (d);
Bufpos
get_buffer_pos_char (struct buffer *b, Lisp_Object pos, unsigned int flags)
{
+ /* Does not GC */
Bufpos ind;
Bufpos min_allowed, max_allowed;
get_buffer_range_char (struct buffer *b, Lisp_Object from, Lisp_Object to,
Bufpos *from_out, Bufpos *to_out, unsigned int flags)
{
+ /* Does not GC */
Bufpos min_allowed, max_allowed;
min_allowed = (flags & GB_ALLOW_PAST_ACCESSIBLE) ?
{
Lisp_Keymap *k;
- if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER
- | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) != 0)
+ modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3
+ | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5);
+ if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER
+ | XEMACS_MOD_HYPER | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT))
+ != 0)
abort ();
k = XKEYMAP (keymap);
int modifiers = key->modifiers;
Lisp_Keymap *k = XKEYMAP (keymap);
+ modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3
+ | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5);
assert ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META
| XEMACS_MOD_SUPER | XEMACS_MOD_HYPER
| XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) == 0);
XVECTOR_DATA (new_keys) [i] = XVECTOR_DATA (keys) [i];
}
else
- abort ();
+ {
+ new_keys = Qnil;
+ abort ();
+ }
if (EQ (keys, new_keys))
error_with_frob (mpc_binding,
if (!NILP (elt_prefix))
buffer_insert_lisp_string (buf, elt_prefix);
- if (modifiers & XEMACS_MOD_META) buffer_insert_c_string (buf, "M-");
- if (modifiers & XEMACS_MOD_CONTROL) buffer_insert_c_string (buf, "C-");
- if (modifiers & XEMACS_MOD_SUPER) buffer_insert_c_string (buf, "S-");
- if (modifiers & XEMACS_MOD_HYPER) buffer_insert_c_string (buf, "H-");
- if (modifiers & XEMACS_MOD_ALT) buffer_insert_c_string (buf, "Alt-");
- if (modifiers & XEMACS_MOD_SHIFT) buffer_insert_c_string (buf, "Sh-");
+ if (modifiers & XEMACS_MOD_META)
+ buffer_insert_c_string (buf, "M-");
+ if (modifiers & XEMACS_MOD_CONTROL)
+ buffer_insert_c_string (buf, "C-");
+ if (modifiers & XEMACS_MOD_SUPER)
+ buffer_insert_c_string (buf, "S-");
+ if (modifiers & XEMACS_MOD_HYPER)
+ buffer_insert_c_string (buf, "H-");
+ if (modifiers & XEMACS_MOD_ALT)
+ buffer_insert_c_string (buf, "Alt-");
+ if (modifiers & XEMACS_MOD_SHIFT)
+ buffer_insert_c_string (buf, "Sh-");
if (SYMBOLP (keysym))
{
Lisp_Object code = Fget (keysym, Vcharacter_set_property, Qnil);
EXFUN (Fwhere_is_internal, 5);
extern Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qshift, Qsuper;
+extern Lisp_Object Qbutton1, Qbutton2, Qbutton3, Qbutton4, Qbutton5;
extern Lisp_Object Vmeta_prefix_char;
Lisp_Object get_keymap (Lisp_Object object, int errorp, int autoload);
}
/* Flag LINE_NUMBER_BEGV (b) as dirty. Do it only if the line number
- cache is already initialized. */
+ cache is already initialized. */
void
narrow_line_number_cache (struct buffer *b)
{
typedef EMACS_INT Lisp_Object;
#define Lisp_Type_Int_Bit (Lisp_Type_Int_Even & Lisp_Type_Int_Odd)
-#define make_obj(vartype, x) ((Lisp_Object) (x))
+#define wrap_object(ptr) ((Lisp_Object) (ptr))
#define make_int(x) ((Lisp_Object) (((x) << INT_GCBITS) | Lisp_Type_Int_Bit))
#define make_char(x) ((Lisp_Object) (((x) << GCBITS) | Lisp_Type_Char))
#define VALMASK (((1UL << VALBITS) - 1UL) << GCTYPEBITS)
#define Qzero make_int (0)
#define Qnull_pointer ((Lisp_Object) 0)
#define EQ(x,y) ((x) == (y))
-#define XSETINT(var, value) ((void) ((var) = make_int (value)))
+#define XSETINT(var, value) ((void) ((var) = make_int (value)))
#define XSETCHAR(var, value) ((void) ((var) = make_char (value)))
-#define XSETOBJ(var, vartype, value) ((void) ((var) = make_obj (vartype, value)))
+#define XSETOBJ(var, value) ((void) ((var) = wrap_object (value)))
/* Convert between a (void *) and a Lisp_Object, as when the
Lisp_Object is passed to a toolkit callback function */
xset_var->gu.type = Lisp_Type_Char; \
xset_var->gu.val = xset_value; \
} while (0)
-# define XSETOBJ(var, vartype, value) do { \
+# define XSETOBJ(var, value) do { \
EMACS_UINT xset_value = (EMACS_UINT) (value); \
(var).ui = xset_value; \
} while (0)
make_int (EMACS_INT val)
{
Lisp_Object obj;
- XSETINT(obj, val);
+ XSETINT (obj, val);
return obj;
}
make_char (Emchar val)
{
Lisp_Object obj;
- XSETCHAR(obj, val);
+ XSETCHAR (obj, val);
+ return obj;
+}
+
+INLINE_HEADER Lisp_Object wrap_object (void *ptr);
+INLINE_HEADER Lisp_Object
+wrap_object (void *ptr)
+{
+ Lisp_Object obj;
+ XSETOBJ (obj, ptr);
return obj;
}
/* Fundamental definitions for XEmacs Lisp interpreter.
Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc.
Copyright (C) 1993-1996 Richard Mlynarik.
- Copyright (C) 1995, 1996 Ben Wing.
+ Copyright (C) 1995, 1996, 2000 Ben Wing.
This file is part of XEmacs.
/* general definitions */
/************************************************************************/
+/* ------------------------ include files ------------------- */
+
/* We include the following generally useful header files so that you
don't have to worry about prototypes when using the standard C
library functions and macros. These files shouldn't be excessively
#include <sys/types.h>
#include <limits.h>
-/* ---- Dynamic arrays ---- */
+/* ------------------------ dynamic arrays ------------------- */
#define Dynarr_declare(type) \
type *base; \
size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats);
#endif
-#include "symsinit.h" /* compiler warning suppression */
-
/* Also define min() and max(). (Some compilers put them in strange
places that won't be referenced by the above include files, such
as 'macros.h' under Solaris.) */
maybe for simple structures like Dynarrs); that keeps them private
to the routines that actually use them. */
+/* ------------------------------- */
+/* basic char/int typedefs */
+/* ------------------------------- */
+
+/* The definitions we put here use typedefs to convey additional meaning to
+ types that by themselves are pretty general. Stuff pointed to by a
+ char * or unsigned char * will nearly always be one of four types:
+ a) pointer to internally-formatted text; b) pointer to text in some
+ external format, which can be defined as all formats other than the
+ internal one; c) pure ASCII text; d) binary data that is not meant to
+ be interpreted as text. [A fifth possible type "e) a general pointer
+ to memory" should be replaced with void *.] By using these more specific
+ types in lieu of the general ones, you clear up greatly the confusions
+ that inevitably will occur when it's not clearly known the semantics of
+ a char * argument being studied. */
+
+typedef unsigned char UChar;
+
/* The data representing the text in a buffer is logically a set
of Bufbytes, declared as follows. */
-typedef unsigned char Bufbyte;
+typedef UChar Bufbyte;
+
+/* Explicitly signed or unsigned versions: */
+typedef UChar UBufbyte;
+typedef char SBufbyte;
+
+/* The data representing a string in "external" format (binary or any
+ external encoding) is logically a set of Extbytes, declared as follows. */
+
+typedef UChar Extbyte; /* #### I REALLY think this should be a char. This
+ is more logical and will fix enough char-UChar
+ inconsistencies that maybe we'll be able to stop
+ turning off those warnings. --ben */
+
+/* Explicitly signed or unsigned versions: */
+typedef UChar UExtbyte;
+typedef char SExtbyte;
+
+/* A byte in a string in binary format: */
+
+typedef char Char_Binary;
+typedef UChar UChar_Binary;
-/* The data representing a string in "external" format (simple
- binary format) is logically a set of Extbytes, declared as follows. */
+/* A byte in a string in entirely US-ASCII format: (Nothing outside
+ the range 00 - 7F) */
+
+typedef char Char_ASCII;
+typedef UChar UChar_ASCII;
-typedef unsigned char Extbyte;
/* To the user, a buffer is made up of characters, declared as follows.
In the non-Mule world, characters and Bufbytes are equivalent.
/* Length in bytes of a string in external format */
typedef EMACS_INT Extcount;
+/* ------------------------------- */
+/* structure/other typedefs */
+/* ------------------------------- */
+
typedef struct lstream Lstream;
typedef unsigned int face_index;
\f
/************************************************************************/
-/* Definitions of basic Lisp objects */
+/** Definitions of basic Lisp objects **/
/************************************************************************/
#include "lrecord.h"
-/*********** unbound ***********/
+/*------------------------------ unbound -------------------------------*/
/* Qunbound is a special Lisp_Object (actually of type
symbol-value-forward), that can never be visible to
#define UNBOUNDP(val) EQ (val, Qunbound)
-/*********** cons ***********/
+/*------------------------------- cons ---------------------------------*/
/* In a cons, the markbit of the car is the gc mark bit */
x = wrong_type_argument (Qlistp, x); \
} while (0)
-/* For a list that's known to be in valid list format --
- will abort() if the list is not in valid format */
-#define LIST_LOOP(tail, list) \
- for (tail = list; \
- !NILP (tail); \
- tail = XCDR (tail))
+/*---------------------- list traversal macros -------------------------*/
-#define LIST_LOOP_2(elt, list) \
- Lisp_Object tail##elt; \
- LIST_LOOP_3(elt, list, tail##elt)
+/* Note: These macros are for traversing through a list in some format,
+ and executing code that you specify on each member of the list.
-#define LIST_LOOP_3(elt, list, tail) \
- for (tail = list; \
- NILP (tail) ? \
- 0 : (elt = XCAR (tail), 1); \
- tail = XCDR (tail))
+ There are two kinds of macros, those requiring surrounding braces, and
+ those not requiring this. Which type of macro will be indicated.
+ The general format for using a brace-requiring macro is
-#define GET_LIST_LENGTH(list, len) do { \
- Lisp_Object GLL_tail; \
- for (GLL_tail = list, len = 0; \
- !NILP (GLL_tail); \
- GLL_tail = XCDR (GLL_tail), ++len) \
- DO_NOTHING; \
-} while (0)
+ {
+ LIST_LOOP_3 (elt, list, tail)
+ execute_code_here;
+ }
-#define GET_EXTERNAL_LIST_LENGTH(list, len) \
-do { \
- Lisp_Object GELL_elt, GELL_tail; \
- EXTERNAL_LIST_LOOP_4 (GELL_elt, list, GELL_tail, len) \
- ; \
-} while (0)
+ or
-/* For a list that's known to be in valid list format, where we may
- be deleting the current element out of the list --
- will abort() if the list is not in valid format */
-#define LIST_LOOP_DELETING(consvar, nextconsvar, list) \
- for (consvar = list; \
- !NILP (consvar) ? (nextconsvar = XCDR (consvar), 1) :0; \
- consvar = nextconsvar)
+ {
+ LIST_LOOP_3 (elt, list, tail)
+ {
+ execute_code_here;
+ }
+ }
-/* Delete all elements of external list LIST
- satisfying CONDITION, an expression referring to variable ELT */
-#define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \
- Lisp_Object prev_tail_##list = Qnil; \
- Lisp_Object tail_##list; \
- EMACS_INT len_##list; \
- EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \
- { \
- if (condition) \
- { \
- if (NILP (prev_tail_##list)) \
- list = XCDR (tail_##list); \
- else \
- XCDR (prev_tail_##list) = XCDR (tail_##list); \
- /* Keep tortoise from ever passing hare. */ \
- len_##list = 0; \
- } \
- else \
- prev_tail_##list = tail_##list; \
- } \
-} while (0)
+ You can put variable declarations between the brace and beginning of
+ macro, but NOTHING ELSE.
-/* Delete all elements of true non-circular list LIST
- satisfying CONDITION, an expression referring to variable ELT */
-#define LIST_LOOP_DELETE_IF(elt, list, condition) do { \
- Lisp_Object prev_tail_##list = Qnil; \
- Lisp_Object tail_##list; \
- LIST_LOOP_3 (elt, list, tail_##list) \
- { \
- if (condition) \
- { \
- if (NILP (prev_tail_##list)) \
- list = XCDR (tail_##list); \
- else \
- XCDR (prev_tail_##list) = XCDR (tail_##list); \
- } \
- else \
- prev_tail_##list = tail_##list; \
- } \
-} while (0)
+ The brace-requiring macros typically declare themselves any arguments
+ that are initialized and iterated by the macros. If for some reason
+ you need to declare these arguments yourself (e.g. to do something on
+ them before the iteration starts, use the _NO_DECLARE versions of the
+ macros.)
+*/
+
+/* There are two basic kinds of macros: those that handle "internal" lists
+ that are known to be correctly structured (i.e. first element is a cons
+ or nil, and the car of each cons is also a cons or nil, and there are
+ no circularities), and those that handle "external" lists, where the
+ list may have any sort of invalid formation. This is reflected in
+ the names: those with "EXTERNAL_" work with external lists, and those
+ without this prefix work with internal lists. The internal-list
+ macros will hit an assertion failure if the structure is ill-formed;
+ the external-list macros will signal an error in this case, either a
+ malformed-list error or a circular-list error.
+
+ Note also that the simplest external list iterator, EXTERNAL_LIST_LOOP,
+ does *NOT* check for circularities. Therefore, make sure you call
+ QUIT each iteration or so. However, it's probably easier just to use
+ EXTERNAL_LIST_LOOP_2, which is easier to use in any case.
+*/
+
+/* LIST_LOOP and EXTERNAL_LIST_LOOP are the simplest macros. They don't
+ require brace surrounding, and iterate through a list, which may or may
+ not known to be syntactically correct. EXTERNAL_LIST_LOOP is for those
+ not known to be correct, and it detects and signals a malformed list
+ error when encountering a problem. Circularities, however, are not
+ handled, and cause looping forever, so make sure to include a QUIT.
+ These functions also accept two args, TAIL (set progressively to each
+ cons starting with the first), and LIST, the list to iterate over.
+ TAIL needs to be defined by the program.
+
+ In each iteration, you can retrieve the current list item using XCAR
+ (tail), or destructively modify the list using XSETCAR (tail,
+ ...). */
+
+#define LIST_LOOP(tail, list) \
+ for (tail = list; \
+ !NILP (tail); \
+ tail = XCDR (tail))
-/* For a list that may not be in valid list format --
- will signal an error if the list is not in valid format */
#define EXTERNAL_LIST_LOOP(tail, list) \
for (tail = list; !NILP (tail); tail = XCDR (tail)) \
if (!CONSP (tail)) \
signal_malformed_list_error (list); \
else
+/* The following macros are the "core" macros for list traversal.
+
+ *** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. ***
+
+ LIST_LOOP_2 and EXTERNAL_LIST_LOOP_2 are the standard, most-often used
+ macros. They take two arguments, an element variable ELT and the list
+ LIST. ELT is automatically declared, and set to each element in turn
+ from LIST.
+
+ LIST_LOOP_3 and EXTERNAL_LIST_LOOP_3 are the same, but they have a third
+ argument TAIL, another automatically-declared variable. At each iteration,
+ this one points to the cons cell for which ELT is the car.
+
+ EXTERNAL_LIST_LOOP_4 is like EXTERNAL_LIST_LOOP_3 but takes an additional
+ LEN argument, again automatically declared, which counts the number of
+ iterations gone by. It is 0 during the first iteration.
+
+ EXTERNAL_LIST_LOOP_4_NO_DECLARE is like EXTERNAL_LIST_LOOP_4 but none
+ of the variables are automatically declared, and so you need to declare
+ them yourself. (ELT and TAIL are Lisp_Objects, and LEN is an EMACS_INT.)
+*/
+
+#define LIST_LOOP_2(elt, list) \
+ LIST_LOOP_3(elt, list, unused_tail_##elt)
+
+#define LIST_LOOP_3(elt, list, tail) \
+ Lisp_Object elt, tail; \
+ for (tail = list; \
+ NILP (tail) ? \
+ 0 : (elt = XCAR (tail), 1); \
+ tail = XCDR (tail))
/* The following macros are for traversing lisp lists.
Signal an error if LIST is not properly acyclic and nil-terminated.
#define EXTERNAL_LIST_LOOP_1(list) \
Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \
EMACS_INT ELL1_len; \
-EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \
+PRIVATE_EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \
ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH)
#define EXTERNAL_LIST_LOOP_2(elt, list) \
-Lisp_Object hare_##elt, tortoise_##elt; \
+Lisp_Object elt, hare_##elt, tortoise_##elt; \
EMACS_INT len_##elt; \
-EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \
+PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \
tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
#define EXTERNAL_LIST_LOOP_3(elt, list, tail) \
-Lisp_Object tortoise_##elt; \
+Lisp_Object elt, tail, tortoise_##elt; \
EMACS_INT len_##elt; \
-EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \
+PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \
tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
-#define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \
+#define EXTERNAL_LIST_LOOP_4_NO_DECLARE(elt, list, tail, len) \
Lisp_Object tortoise_##elt; \
-EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \
+PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \
+ tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
+
+#define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \
+Lisp_Object elt, tail, tortoise_##elt; \
+EMACS_INT len; \
+PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \
tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
-#define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \
+#define PRIVATE_EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \
tortoise, suspicion_length) \
for (tortoise = hare = list, len = 0; \
\
((void) signal_circular_list_error (list)) : \
((void) 0)))))
+/* GET_LIST_LENGTH and GET_EXTERNAL_LIST_LENGTH:
+
+ These two macros return the length of LIST (either an internal or external
+ list, according to which macro is used), stored into LEN (which must
+ be declared by the caller). Circularities are trapped in external lists
+ (and cause errors). Neither macro need be declared inside brackets. */
+
+#define GET_LIST_LENGTH(list, len) do { \
+ Lisp_Object GLL_tail; \
+ for (GLL_tail = list, len = 0; \
+ !NILP (GLL_tail); \
+ GLL_tail = XCDR (GLL_tail), ++len) \
+ DO_NOTHING; \
+} while (0)
+
+#define GET_EXTERNAL_LIST_LENGTH(list, len) \
+do { \
+ Lisp_Object GELL_elt, GELL_tail; \
+ EXTERNAL_LIST_LOOP_4_NO_DECLARE (GELL_elt, list, GELL_tail, len) \
+ ; \
+} while (0)
+
+/* For a list that's known to be in valid list format, where we may
+ be deleting the current element out of the list --
+ will abort() if the list is not in valid format */
+#define LIST_LOOP_DELETING(consvar, nextconsvar, list) \
+ for (consvar = list; \
+ !NILP (consvar) ? (nextconsvar = XCDR (consvar), 1) :0; \
+ consvar = nextconsvar)
+
+/* LIST_LOOP_DELETE_IF and EXTERNAL_LIST_LOOP_DELETE_IF:
+ These two macros delete all elements of LIST (either an internal or
+ external list, according to which macro is used) satisfying
+ CONDITION, a C expression referring to variable ELT. ELT is
+ automatically declared. Circularities are trapped in external
+ lists (and cause errors). Neither macro need be declared inside
+ brackets. */
+
+#define LIST_LOOP_DELETE_IF(elt, list, condition) do { \
+ /* Do not use ##list when creating new variables because \
+ that may not be just a variable name. */ \
+ Lisp_Object prev_tail_##elt = Qnil; \
+ LIST_LOOP_3 (elt, list, tail_##elt) \
+ { \
+ if (condition) \
+ { \
+ if (NILP (prev_tail_##elt)) \
+ list = XCDR (tail_##elt); \
+ else \
+ XCDR (prev_tail_##elt) = XCDR (tail_##elt); \
+ } \
+ else \
+ prev_tail_##elt = tail_##elt; \
+ } \
+} while (0)
+
+#define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \
+ Lisp_Object prev_tail_##elt = Qnil; \
+ EXTERNAL_LIST_LOOP_4 (elt, list, tail_##elt, len_##elt) \
+ { \
+ if (condition) \
+ { \
+ if (NILP (prev_tail_##elt)) \
+ list = XCDR (tail_##elt); \
+ else \
+ XCDR (prev_tail_##elt) = XCDR (tail_##elt); \
+ /* Keep tortoise from ever passing hare. */ \
+ len_##elt = 0; \
+ } \
+ else \
+ prev_tail_##elt = tail_##elt; \
+ } \
+} while (0)
+
+
+/* Macros for looping over external alists.
+
+ *** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. ***
+
+ EXTERNAL_ALIST_LOOP_4 is similar to EXTERNAL_LIST_LOOP_2, but it
+ assumes the elements are aconses (the elements in an alist) and
+ sets two additional argument variables ELT_CAR and ELT_CDR to the
+ car and cdr of the acons. All of the variables ELT, ELT_CAR and
+ ELT_CDR are automatically declared.
+
+ EXTERNAL_ALIST_LOOP_5 adds a TAIL argument to EXTERNAL_ALIST_LOOP_4,
+ just like EXTERNAL_LIST_LOOP_3 does, and again TAIL is automatically
+ declared.
+
+ EXTERNAL_ALIST_LOOP_6 adds a LEN argument to EXTERNAL_ALIST_LOOP_5,
+ just like EXTERNAL_LIST_LOOP_4 does, and again LEN is automatically
+ declared.
+
+ EXTERNAL_ALIST_LOOP_6_NO_DECLARE does not declare any of its arguments,
+ just like EXTERNAL_LIST_LOOP_4_NO_DECLARE, and so these must be declared
+ manually.
+ */
/* Optimized and safe macros for looping over external alists. */
#define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \
+Lisp_Object elt, elt_car, elt_cdr; \
Lisp_Object hare_##elt, tortoise_##elt; \
EMACS_INT len_##elt; \
-EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
+PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
len_##elt, hare_##elt, tortoise_##elt, \
CIRCULAR_LIST_SUSPICION_LENGTH)
#define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \
+Lisp_Object elt, elt_car, elt_cdr, tail; \
Lisp_Object tortoise_##elt; \
EMACS_INT len_##elt; \
-EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
+PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
len_##elt, tail, tortoise_##elt, \
CIRCULAR_LIST_SUSPICION_LENGTH) \
#define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \
+Lisp_Object elt, elt_car, elt_cdr, tail; \
+EMACS_INT len; \
Lisp_Object tortoise_##elt; \
-EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
+PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
len, tail, tortoise_##elt, \
CIRCULAR_LIST_SUSPICION_LENGTH)
+#define EXTERNAL_ALIST_LOOP_6_NO_DECLARE(elt, elt_car, elt_cdr, list, \
+ tail, len) \
+Lisp_Object tortoise_##elt; \
+PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
+ len, tail, tortoise_##elt, \
+ CIRCULAR_LIST_SUSPICION_LENGTH)
-#define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \
- tortoise, suspicion_length) \
-EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, suspicion_length) \
+
+#define PRIVATE_EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, \
+ hare, tortoise, suspicion_length) \
+PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, \
+ suspicion_length) \
if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \
continue; \
else
+/* Macros for looping over external property lists.
+
+ *** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. ***
+
+ EXTERNAL_PROPERTY_LIST_LOOP_3 maps over an external list assumed to
+ be a property list, consisting of alternating pairs of keys
+ (typically symbols or keywords) and values. Each iteration
+ processes one such pair out of LIST, assigning the two elements to
+ KEY and VALUE respectively. Malformed lists and circularities are
+ trapped as usual, and in addition, property lists with an odd number
+ of elements also signal an error.
+
+ EXTERNAL_PROPERTY_LIST_LOOP_4 adds a TAIL argument to
+ EXTERNAL_PROPERTY_LIST_LOOP_3, just like EXTERNAL_LIST_LOOP_3 does,
+ and again TAIL is automatically declared.
+
+ EXTERNAL_PROPERTY_LIST_LOOP_5 adds a LEN argument to
+ EXTERNAL_PROPERTY_LIST_LOOP_4, just like EXTERNAL_LIST_LOOP_4 does,
+ and again LEN is automatically declared. Note that in this case,
+ LEN counts the iterations, NOT the total number of list elements
+ processed, which is 2 * LEN.
+
+ EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE does not declare any of its
+ arguments, just like EXTERNAL_LIST_LOOP_4_NO_DECLARE, and so these
+ must be declared manually. */
/* Optimized and safe macros for looping over external property lists. */
#define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \
EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \
tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
+#define EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE(key, value, list, \
+ tail, len) \
+Lisp_Object tortoise_##key; \
+EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \
+ tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
+
#define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \
tortoise, suspicion_length) \
((CONSP (hare) && \
(key = XCAR (hare), \
hare = XCDR (hare), \
- CONSP (hare))) ? \
+ (CONSP (hare) ? 1 : \
+ (signal_malformed_property_list_error (list), 0)))) ? \
(value = XCAR (hare), 1) : \
(NILP (hare) ? 0 : \
(signal_malformed_property_list_error (list), 0))); \
signal_malformed_list_error (CTL_list); \
} while (0)
-/*********** string ***********/
+/*------------------------------ string --------------------------------*/
struct Lisp_String
{
offsetof (flexible_array_structtype, flexible_array_field[0])) * \
(flexible_array_length))
-/*********** vector ***********/
+/*------------------------------ vector --------------------------------*/
struct Lisp_Vector
{
#define vector_data(v) ((v)->contents)
#define XVECTOR_DATA(s) vector_data (XVECTOR (s))
-/*********** bit vector ***********/
+/*---------------------------- bit vectors -----------------------------*/
#if (LONGBITS < 16)
#error What the hell?!
#define BIT_VECTOR_LONG_STORAGE(len) \
(((len) + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2)
-
-/*********** symbol ***********/
+/*------------------------------ symbol --------------------------------*/
typedef struct Lisp_Symbol Lisp_Symbol;
struct Lisp_Symbol
#define symbol_function(s) ((s)->function)
#define symbol_plist(s) ((s)->plist)
-/*********** subr ***********/
+/*------------------------------- subr ---------------------------------*/
typedef Lisp_Object (*lisp_fn_t) (void);
((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn)
#define subr_name(subr) ((subr)->name)
-/*********** marker ***********/
+/*------------------------------ marker --------------------------------*/
+
typedef struct Lisp_Marker Lisp_Marker;
struct Lisp_Marker
#define marker_next(m) ((m)->next)
#define marker_prev(m) ((m)->prev)
-/*********** char ***********/
+/*------------------------------- char ---------------------------------*/
#define CHARP(x) (XTYPE (x) == Lisp_Type_Char)
#define CONCHECK_CHAR(x) CONCHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp)
-/*********** float ***********/
+/*------------------------------ float ---------------------------------*/
#ifdef LISP_FLOAT_TYPE
#endif /* not LISP_FLOAT_TYPE */
-/*********** int ***********/
+/*-------------------------------- int ---------------------------------*/
#define ZEROP(x) EQ (x, Qzero)
} while (0)
-/*********** readonly objects ***********/
+/*--------------------------- readonly objects -------------------------*/
#define CHECK_C_WRITEABLE(obj) \
do { if (c_readonly (obj)) c_write_error (obj); } while (0)
#define C_READONLY(obj) (C_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj)))
#define LISP_READONLY(obj) (LISP_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj)))
-/*********** structures ***********/
+/*----------------------------- structrures ----------------------------*/
typedef struct structure_keyword_entry structure_keyword_entry;
struct structure_keyword_entry
Lisp_Object value,
Error_behavior errb));
-/*********** weak lists ***********/
+/*---------------------------- weak lists ------------------------------*/
enum weak_list_type
{
int finish_marking_weak_lists (void);
void prune_weak_lists (void);
-/*********** lcrecord lists ***********/
+/*-------------------------- lcrecord-list -----------------------------*/
struct lcrecord_list
{
/* Another try to fix SunPro C compiler warnings */
/* "end-of-loop code not reached" */
/* "statement not reached */
-#ifdef __SUNPRO_C
+#if defined __SUNPRO_C || defined __USLC__
#define RETURN_SANS_WARNINGS if (1) return
#define RETURN_NOT_REACHED(value)
#else
typedef unsigned long uintptr_t;
#endif
+\f
+/************************************************************************/
+/* prototypes */
+/************************************************************************/
+
+/* NOTE: Prototypes should go HERE, not in various header files, unless
+ they specifically reference a type that's not defined in lisp.h.
+ (And even then, you might consider adding the type to lisp.h.)
+
+ The idea is that header files typically contain the innards of objects,
+ and we want to minimize the number of "dependencies" of one file on
+ the specifics of such objects. Putting prototypes here minimizes the
+ number of header files that need to be included -- good for a number
+ of reasons. --ben */
+
+/*--------------- prototypes for various public c functions ------------*/
+
+/* Prototypes for all init/syms_of/vars_of initialization functions. */
+#include "symsinit.h"
+
/* Defined in alloc.c */
void release_breathing_space (void);
Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object);
int stderr_out (const char *, ...) PRINTF_ARGS (1, 2);
int stdout_out (const char *, ...) PRINTF_ARGS (1, 2);
SIGTYPE fatal_error_signal (int);
-Lisp_Object make_arg_list (int, char **);
-void make_argc_argv (Lisp_Object, int *, char ***);
-void free_argc_argv (char **);
+Lisp_Object make_arg_list (int, Extbyte **);
+void make_argc_argv (Lisp_Object, int *, Extbyte ***);
+void free_argc_argv (Extbyte **);
Lisp_Object decode_env_path (const char *, const char *);
Lisp_Object decode_path (const char *);
/* Nonzero means don't do interactive redisplay and don't change tty modes */
/* Defined in eval.c */
DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object));
-void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior);
+void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object,
+ Error_behavior);
Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object,
Lisp_Object, Error_behavior);
+DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (type_error (Lisp_Object,
+ const char *,
+ ...), 2, 3);
+void maybe_type_error (Lisp_Object, Lisp_Object, Error_behavior, const char *,
+ ...) PRINTF_ARGS (4, 5);
+Lisp_Object continuable_type_error (Lisp_Object, const char *, ...)
+ PRINTF_ARGS (2, 3);
+Lisp_Object maybe_continuable_type_error (Lisp_Object, Lisp_Object,
+ Error_behavior,
+ const char *, ...)
+ PRINTF_ARGS (4, 5);
+DECLARE_DOESNT_RETURN (signal_type_error (Lisp_Object, const char *,
+ Lisp_Object));
+void maybe_signal_type_error (Lisp_Object, const char *, Lisp_Object,
+ Lisp_Object, Error_behavior);
+Lisp_Object signal_type_continuable_error (Lisp_Object, const char *,
+ Lisp_Object);
+Lisp_Object maybe_signal_type_continuable_error (Lisp_Object, const char *,
+ Lisp_Object,
+ Lisp_Object, Error_behavior);
+DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (type_error_with_frob
+ (Lisp_Object, Lisp_Object,
+ const char *,
+ ...), 3, 4);
+void maybe_type_error_with_frob (Lisp_Object, Lisp_Object, Lisp_Object,
+ Error_behavior,
+ const char *, ...) PRINTF_ARGS (5, 6);
+Lisp_Object continuable_type_error_with_frob (Lisp_Object, Lisp_Object,
+ const char *,
+ ...) PRINTF_ARGS (3, 4);
+Lisp_Object maybe_continuable_type_error_with_frob
+(Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior, const char *, ...)
+ PRINTF_ARGS (5, 6);
+DECLARE_DOESNT_RETURN (signal_type_error_2 (Lisp_Object, const char *,
+ Lisp_Object, Lisp_Object));
+void maybe_signal_type_error_2 (Lisp_Object, const char *, Lisp_Object,
+ Lisp_Object, Lisp_Object, Error_behavior);
+Lisp_Object signal_type_continuable_error_2 (Lisp_Object, const char *,
+ Lisp_Object, Lisp_Object);
+Lisp_Object maybe_signal_type_continuable_error_2 (Lisp_Object, const char *,
+ Lisp_Object, Lisp_Object,
+ Lisp_Object,
+ Error_behavior);
DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (const char *,
...), 1, 2);
void maybe_error (Lisp_Object, Error_behavior, const char *,
DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object));
DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (syntax_error (const char *reason, Lisp_Object frob));
+DECLARE_DOESNT_RETURN (syntax_error_2 (const char *reason, Lisp_Object frob1,
+ Lisp_Object frob2));
+DECLARE_DOESNT_RETURN (invalid_argument (const char *reason,
+ Lisp_Object frob));
+DECLARE_DOESNT_RETURN (invalid_argument_2 (const char *reason,
+ Lisp_Object frob1,
+ Lisp_Object frob2));
+DECLARE_DOESNT_RETURN (invalid_operation (const char *reason,
+ Lisp_Object frob));
+DECLARE_DOESNT_RETURN (invalid_operation_2 (const char *reason,
+ Lisp_Object frob1,
+ Lisp_Object frob2));
+DECLARE_DOESNT_RETURN (invalid_change (const char *reason,
+ Lisp_Object frob));
+DECLARE_DOESNT_RETURN (invalid_change_2 (const char *reason,
+ Lisp_Object frob1,
+ Lisp_Object frob2));
+
Lisp_Object signal_void_function_error (Lisp_Object);
Lisp_Object signal_invalid_function_error (Lisp_Object);
Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int);
Lisp_Object bytecode_nconc2 (Lisp_Object *);
void check_losing_bytecode (const char *, Lisp_Object);
-/* Defined in getloadavg.c */
-int getloadavg (double[], int);
-
/* Defined in glyphs.c */
Error_behavior decode_error_behavior_flag (Lisp_Object);
Lisp_Object encode_error_behavior_flag (Error_behavior);
Lisp_Object save_window_excursion_unwind (Lisp_Object);
Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object);
-/* The following were machine generated 19980312 */
+/*--------------- prototypes for Lisp primitives in C ------------*/
+/* The following were machine generated 19980312 */
EXFUN (Faccept_process_output, 3);
EXFUN (Fadd1, 1);
EXFUN (Fdefault_boundp, 1);
EXFUN (Fdefault_value, 1);
EXFUN (Fdefine_key, 3);
+EXFUN (Fdelete, 2);
EXFUN (Fdelete_region, 3);
EXFUN (Fdelete_process, 1);
EXFUN (Fdelq, 2);
EXFUN (Fkey_description, 1);
EXFUN (Fkill_emacs, 1);
EXFUN (Fkill_local_variable, 1);
+EXFUN (Flast, 2);
EXFUN (Flax_plist_get, 3);
EXFUN (Flax_plist_remprop, 2);
EXFUN (Flength, 1);
EXFUN (Fvertical_motion, 3);
EXFUN (Fwiden, 1);
+/*--------------- prototypes for constant symbols ------------*/
-extern Lisp_Object Q_style, Qabort, Qactually_requested;
+extern Lisp_Object Q_style;
extern Lisp_Object Qactivate_menubar_hook;
-extern Lisp_Object Qafter, Qall, Qand, Qappend;
-extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
-extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
-extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary;
-extern Lisp_Object Qbitmap, Qbitp, Qblinking;
-extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer;
-extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
-extern Lisp_Object Qbyte_code, Qcall_interactively, Qcancel, Qcategory;
+extern Lisp_Object Qarith_error;
+extern Lisp_Object Qarrayp, Qautoload;
+extern Lisp_Object Qbackground, Qbackground_pixmap;
+extern Lisp_Object Qbeginning_of_buffer, Qbig5;
+extern Lisp_Object Qbitp, Qblinking;
+extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only;
+extern Lisp_Object Qbyte_code, Qcall_interactively;
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 Qcenter, Qcircular_list, Qcircular_property_list;
+extern Lisp_Object Qchar_or_string_p, Qcharacterp;
+extern Lisp_Object Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3;
+extern Lisp_Object Qcircular_list, Qcircular_property_list;
extern Lisp_Object Qcoding_system_error;
-extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p;
-extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
-extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcopies, Qcr;
-extern Lisp_Object Qcritical, Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor;
-extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
-extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
-extern Lisp_Object Qdialog;
-extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
-extern Lisp_Object Qdoc_string, Qdomain_error, Qduplex, Qdynarr_overhead;
-extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
-extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal;
+extern Lisp_Object Qcolor_pixmap_image_instance_p;
+extern Lisp_Object Qcommandp, Qcompletion_ignore_case;
+extern Lisp_Object Qconsole_live_p, Qconst_specifier, Qcr;
+extern Lisp_Object Qcrlf, Qcurrent_menubar, Qctext;
+extern Lisp_Object Qcyclic_variable_indirection, Qdecode;
+extern Lisp_Object Qdefun, Qdevice_live_p;
+extern Lisp_Object Qdim, Qdisabled, Qdisplay_table;
+extern Lisp_Object Qdomain_error;
+extern Lisp_Object Qediting_error;
+extern Lisp_Object Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
+extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type;
extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted;
-extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents;
-extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep;
-extern Lisp_Object Qfile_name, Qfile_error;
-extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
+extern Lisp_Object Qevent_live_p, Qexit, Qextent_live_p;
+extern Lisp_Object Qexternal_debugging_output, Qfeaturep;
+extern Lisp_Object Qfile_error;
+extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output;
extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
-extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfrom_page, Qfull_assoc;
-extern Lisp_Object Qfuncall, Qfunction;
-extern Lisp_Object Qgap_overhead, Qgeneric, Qgeometry, Qglobal, Qheight;
-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 Qformat, Qframe_live_p;
+extern Lisp_Object Qicon_glyph_p, Qidentity;
extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
-extern Lisp_Object Qinput_charset_conversion, Qinteger;
+extern Lisp_Object Qinput_charset_conversion;
extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
-extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
-extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
-extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeyboard, Qkeymap;
-extern Lisp_Object Qlambda, Qlast_command, Qlayout, Qlandscape;
-extern Lisp_Object Qleft, Qleft_margin, Qlet, Qlf;
-extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
+extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive;
+extern Lisp_Object Qinternal_error, Qinvalid_argument;
+extern Lisp_Object Qinvalid_change, Qinvalid_function, Qinvalid_operation;
+extern Lisp_Object Qinvalid_read_syntax, Qinvalid_state;
+extern Lisp_Object Qio_error;
+extern Lisp_Object Qiso2022;
+extern Lisp_Object Qlambda, Qlayout;
+extern Lisp_Object Qlf;
+extern Lisp_Object Qlist_formation_error;
+extern Lisp_Object Qlistp, Qload, Qlock_shift, Qmacro;
extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list;
-extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers;
-extern Lisp_Object Qmenubar;
-extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
-extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
-extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows;
-extern Lisp_Object Qname, Qnas, Qnatnump, 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 Qmark;
+extern Lisp_Object Qmnemonic;
+extern Lisp_Object Qmono_pixmap_image_instance_p;
+extern Lisp_Object Qmouse_leave_buffer_hook;
+extern Lisp_Object Qnas, Qnatnump, Qnative_layout;
+extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
+extern Lisp_Object Qno_conversion, Qno_iso6429;
+extern Lisp_Object Qnothing_image_instance_p;
extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp;
-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 Qpointer_image_instance_p, Qportrait, Qpost_read_conversion;
-extern Lisp_Object Qpre_write_conversion, Qprint, Qprinter, Qprint_length;
-extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
-extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
+extern Lisp_Object Qoutput_charset_conversion;
+extern Lisp_Object Qoverflow_error, Qpoint, Qpointer_glyph_p;
+extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion;
+extern Lisp_Object Qpre_write_conversion, Qprint_length;
+extern Lisp_Object Qprint_string_length, Qprogn, Qquit;
+extern Lisp_Object Qquote, Qrange_error, Qread_char;
extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
-extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
-extern Lisp_Object Qretry, Qreturn, Qreverse, Qright, Qright_margin;
+extern Lisp_Object Qregion_beginning, Qregion_end;
extern Lisp_Object Qrun_hooks, Qsans_modifiers;
-extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected;
+extern Lisp_Object Qsave_buffers_kill_emacs;
extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo;
extern Lisp_Object Qsequencep, Qset, Qsetting_constant;
extern Lisp_Object Qseven, Qshift_jis, Qshort;
-extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
-extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
-extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
+extern Lisp_Object Qsingularity_error;
+extern Lisp_Object Qstandard_input, Qstandard_output;
+extern Lisp_Object Qstart_open;
+extern Lisp_Object Qstring_lessp, Qsubwindow;
extern Lisp_Object Qsubwindow_image_instance_p;
-extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest;
-extern Lisp_Object Qtext, Qtext_image_instance_p, Qthis_command, Qtimeout;
-extern Lisp_Object Qtimestamp, Qtoolbar, Qtop, Qtop_margin, Qtop_level;
-extern Lisp_Object Qto_page, Qtrue_list_p, Qtty, Qtype;
-extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
-extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories;
-extern Lisp_Object Qvalue_assoc, Qvalues;
-extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical;
-extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning;
-extern Lisp_Object Qwidth, Qwidget, Qwindow;
-extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
-extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes, Qyes_or_no_p;
+extern Lisp_Object Qsyntax_error, Qt;
+extern Lisp_Object Qtext_image_instance_p;
+extern Lisp_Object Qtop_level;
+extern Lisp_Object Qtrue_list_p;
+extern Lisp_Object Qunbound, Qunderflow_error;
+extern Lisp_Object Qunderline, Quser_files_and_directories;
+extern Lisp_Object Qvalues;
+extern Lisp_Object Qvariable_documentation, Qvariable_domain;
+extern Lisp_Object Qvoid_function, Qvoid_variable;
+extern Lisp_Object Qwindow_live_p, Qwrong_number_of_arguments;
+extern Lisp_Object Qwrong_type_argument, Qyes_or_no_p;
+
+#define SYMBOL(fou) extern Lisp_Object fou
+#define SYMBOL_KEYWORD(la_cle_est_fou) extern Lisp_Object la_cle_est_fou
+#define SYMBOL_GENERAL(tout_le_monde, est_fou) \
+ extern Lisp_Object tout_le_monde
+
+#include "general-slots.h"
+
+#undef SYMBOL
+#undef SYMBOL_KEYWORD
+#undef SYMBOL_GENERAL
+
+/*--------------- prototypes for variables of type Lisp_Object ------------*/
+
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;
\f
static DOESNT_RETURN
-syntax_error (const char *string)
+read_syntax_error (const char *string)
{
signal_error (Qinvalid_read_syntax,
list1 (build_translated_string (string)));
}
static Lisp_Object
-continuable_syntax_error (const char *string)
+continuable_read_syntax_error (const char *string)
{
return Fsignal (Qinvalid_read_syntax,
list1 (build_translated_string (string)));
int result;
/* temporarily hack the 'c' off the end of the filename */
foundstr[foundlen - 1] = '\0';
- result = stat (foundstr, &s2);
+ result = xemacs_stat (foundstr, &s2);
if (result >= 0 &&
(unsigned) s1.st_mtime < (unsigned) s2.st_mtime)
{
struct stat st;
/* Ignore file if it's a directory. */
- if (stat (fn, &st) >= 0
+ if (xemacs_stat (fn, &st) >= 0
&& (st.st_mode & S_IFMT) != S_IFDIR)
{
/* Check that we can access or open it. */
int found = 0;
/* If this path element is relative, we have to look by hand. */
- if (NILP (Ffile_name_absolute_p (pathel)))
+ if (NILP (pathel) || NILP (Ffile_name_absolute_p (pathel)))
{
val = locate_file_in_directory (pathel, str, suffixes, storeptr,
mode);
GCPRO2 (orig_list, already_seen);
if (c != '(')
- RETURN_UNGCPRO (continuable_syntax_error ("#s not followed by paren"));
+ RETURN_UNGCPRO (continuable_read_syntax_error ("#s not followed by paren"));
list = read_list (readcharfun, ')', 0, 0);
orig_list = list;
{
int len = XINT (Flength (list));
if (len == 0)
- RETURN_UNGCPRO (continuable_syntax_error
+ RETURN_UNGCPRO (continuable_read_syntax_error
("structure type not specified"));
if (!(len & 1))
RETURN_UNGCPRO
- (continuable_syntax_error
+ (continuable_read_syntax_error
("structures must have alternating keyword/value pairs"));
}
unreadchar (readcharfun, ch);
#ifdef FEATUREP_SYNTAX
if (ch == ']')
- syntax_error ("\"]\" in a list");
+ read_syntax_error ("\"]\" in a list");
else if (ch == ')')
- syntax_error ("\")\" in a vector");
+ read_syntax_error ("\")\" in a vector");
#endif
state = ((conser) (readcharfun, state, len));
}
goto done;
}
else if (ch == ']')
- syntax_error ("']' in a list");
+ read_syntax_error ("']' in a list");
else if (ch == ')')
- syntax_error ("')' in a vector");
+ read_syntax_error ("')' in a vector");
else
#endif
if (ch != '.')
signal_simple_error ("BUG! Internal reader error", elt);
else if (!s->allow_dotted_lists)
- syntax_error ("\".\" in a vector");
+ read_syntax_error ("\".\" in a vector");
else
{
if (!NILP (s->tail))
goto done;
}
}
- syntax_error (". in wrong context");
+ read_syntax_error (". in wrong context");
}
}
len = XINT (Flength (stuff));
if (len < COMPILED_STACK_DEPTH + 1 || len > COMPILED_DOMAIN + 1)
return
- continuable_syntax_error ("#[...] used with wrong number of elements");
+ continuable_read_syntax_error ("#[...] used with wrong number of elements");
for (iii = 0; CONSP (stuff); iii++)
{
lrecord_type_symbol_value_lisp_magic,
lrecord_type_symbol_value_buffer_local,
lrecord_type_max_symbol_value_magic = lrecord_type_symbol_value_buffer_local,
-
+
lrecord_type_symbol,
lrecord_type_subr,
lrecord_type_cons,
lrecord_type_pgconn,
lrecord_type_pgresult,
lrecord_type_devmode,
- lrecord_type_count /* must be last */
+ lrecord_type_mswindows_dialog_id,
+ lrecord_type_last_built_in_type /* must be last */
};
+extern unsigned int lrecord_type_count;
+
struct lrecord_implementation
{
const char *name;
unsigned int basic_p :1;
};
-extern const struct lrecord_implementation *lrecord_implementations_table[];
+/* All the built-in lisp object types are enumerated in `enum record_type'.
+ Additional ones may be defined by a module (none yet). We leave some
+ room in `lrecord_implementations_table' for such new lisp object types. */
+#define MODULE_DEFINABLE_TYPE_COUNT 32
+
+extern const struct lrecord_implementation *lrecord_implementations_table[(unsigned int)lrecord_type_last_built_in_type + MODULE_DEFINABLE_TYPE_COUNT];
#define XRECORD_LHEADER_IMPLEMENTATION(obj) \
LHEADER_IMPLEMENTATION (XRECORD_LHEADER (obj))
A lrecord external description is an array of values. The first
value of each line is a type, the second the offset in the lrecord
structure. Following values are parameters, their presence, type
- and number is type-dependant.
+ and number is type-dependent.
The description ends with a "XD_END" or "XD_SPECIFIER_END" record.
getprop, putprop, remprop, plist, size, sizer, \
lrecord_type_##c_name, basic_p }
+#define DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \
+DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
+
+#define DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
+MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
+
+#define DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
+DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype)
+
+#define DEFINE_EXTERNAL_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizer,structtype) \
+MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype)
+
+#define MAKE_EXTERNAL_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
+DECLARE_ERROR_CHECK_TYPECHECK(c_name, structtype) \
+unsigned int lrecord_type_##c_name = lrecord_type_count++; \
+const struct lrecord_implementation lrecord_##c_name = \
+ { name, marker, printer, nuker, equal, hash, desc, \
+ getprop, putprop, remprop, plist, size, sizer, \
+ (enum lrecord_type)lrecord_type_##c_name, basic_p }
+
+
extern Lisp_Object (*lrecord_markers[]) (Lisp_Object);
#define INIT_LRECORD_IMPLEMENTATION(type) do { \
#define XRECORD_LHEADER(a) ((struct lrecord_header *) XPNTR (a))
#define RECORD_TYPEP(x, ty) \
- (LRECORDP (x) && XRECORD_LHEADER (x)->type == (ty))
+ (LRECORDP (x) && (((unsigned int)(XRECORD_LHEADER (x)->type)) == ((unsigned int)(ty))))
+
+/* Steps to create a new object:
+
+ 1. Declare the struct for your object in a header file somewhere.
+ Remember that it must begin with
+
+ struct lcrecord_header header;
+
+ 2. Put a DECLARE_LRECORD() for the object below the struct definition,
+ along with the standard XFOO/XSETFOO junk.
+
+ 3. Add this header file to inline.c.
+
+ 4. Create the methods for your object. Note that technically you don't
+ need any, but you will almost always want at least a mark method.
+
+ 5. Define your object with DEFINE_LRECORD_IMPLEMENTATION() or some
+ variant.
+
+ 6. Include the header file in the .c file where you defined the object.
+
+ 7. Put a call to INIT_LRECORD_IMPLEMENTATION() for the object in the
+ .c file's syms_of_foo() function.
+
+ 8. Add a type enum for the object to enum lrecord_type, earlier in this
+ file.
+
+An example:
+
+------------------------------ in toolbar.h -----------------------------
+
+struct toolbar_button
+{
+ struct lcrecord_header header;
+
+ Lisp_Object next;
+ Lisp_Object frame;
+
+ Lisp_Object up_glyph;
+ Lisp_Object down_glyph;
+ Lisp_Object disabled_glyph;
+
+ Lisp_Object cap_up_glyph;
+ Lisp_Object cap_down_glyph;
+ Lisp_Object cap_disabled_glyph;
-/* NOTE: the DECLARE_LRECORD() must come before the associated
- DEFINE_LRECORD_*() or you will get compile errors.
+ Lisp_Object callback;
+ Lisp_Object enabled_p;
+ Lisp_Object help_string;
+
+ char enabled;
+ char down;
+ char pushright;
+ char blank;
+
+ int x, y;
+ int width, height;
+ int dirty;
+ int vertical;
+ int border_width;
+};
+
+DECLARE_LRECORD (toolbar_button, struct toolbar_button);
+#define XTOOLBAR_BUTTON(x) XRECORD (x, toolbar_button, struct toolbar_button)
+#define XSETTOOLBAR_BUTTON(x, p) XSETRECORD (x, p, toolbar_button)
+#define TOOLBAR_BUTTONP(x) RECORDP (x, toolbar_button)
+#define CHECK_TOOLBAR_BUTTON(x) CHECK_RECORD (x, toolbar_button)
+#define CONCHECK_TOOLBAR_BUTTON(x) CONCHECK_RECORD (x, toolbar_button)
+
+------------------------------ in toolbar.c -----------------------------
+
+#include "toolbar.h"
+
+...
+
+static Lisp_Object
+mark_toolbar_button (Lisp_Object obj)
+{
+ struct toolbar_button *data = XTOOLBAR_BUTTON (obj);
+ mark_object (data->next);
+ mark_object (data->frame);
+ mark_object (data->up_glyph);
+ mark_object (data->down_glyph);
+ mark_object (data->disabled_glyph);
+ mark_object (data->cap_up_glyph);
+ mark_object (data->cap_down_glyph);
+ mark_object (data->cap_disabled_glyph);
+ mark_object (data->callback);
+ mark_object (data->enabled_p);
+ return data->help_string;
+}
+
+DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button,
+ mark_toolbar_button, 0, 0, 0, 0, 0,
+ struct toolbar_button);
+
+...
+
+void
+syms_of_toolbar (void)
+{
+ INIT_LRECORD_IMPLEMENTATION (toolbar_button);
+
+ ...;
+}
+
+------------------------------ in inline.c -----------------------------
+
+#ifdef HAVE_TOOLBARS
+#include "toolbar.h"
+#endif
+
+------------------------------ in lrecord.h -----------------------------
+
+enum lrecord_type
+{
+ ...
+ lrecord_type_toolbar_button,
+ ...
+};
+
+*/
+
+/*
+
+Note: Object types defined in external dynamically-loaded modules (not
+part of the XEmacs main source code) should use DECLARE_EXTERNAL_LRECORD
+and DEFINE_EXTERNAL_LRECORD_IMPLEMENTATION rather than DECLARE_LRECORD
+and DEFINE_LRECORD_IMPLEMENTATION.
+
+*/
- Furthermore, you always need to put the DECLARE_LRECORD() in a header
- file, and make sure the header file is included in inline.c, even
- if the type is private to a particular file. Otherwise, you will
- get undefined references for the error_check_foo() inline function
- under GCC. */
#ifdef ERROR_CHECK_TYPECHECK
} \
extern Lisp_Object Q##c_name##p
+# define DECLARE_EXTERNAL_LRECORD(c_name, structtype) \
+extern unsigned int lrecord_type_##c_name; \
+DECLARE_LRECORD(c_name, structtype)
+
# define DECLARE_NONRECORD(c_name, type_enum, structtype) \
INLINE_HEADER structtype * \
error_check_##c_name (Lisp_Object obj); \
# define XSETRECORD(var, p, c_name) do \
{ \
- XSETOBJ (var, Lisp_Type_Record, p); \
+ XSETOBJ (var, p); \
assert (RECORD_TYPEP (var, lrecord_type_##c_name)); \
} while (0)
# define DECLARE_LRECORD(c_name, structtype) \
extern Lisp_Object Q##c_name##p; \
extern const struct lrecord_implementation lrecord_##c_name
+# define DECLARE_EXTERNAL_LRECORD(c_name, structtype) \
+extern Lisp_Object Q##c_name##p; \
+extern unsigned int lrecord_type_##c_name; \
+extern const struct lrecord_implementation lrecord_##c_name
# define DECLARE_NONRECORD(c_name, type_enum, structtype) \
extern Lisp_Object Q##c_name##p
# define XRECORD(x, c_name, structtype) ((structtype *) XPNTR (x))
# define XNONRECORD(x, c_name, type_enum, structtype) \
((structtype *) XPNTR (x))
-# define XSETRECORD(var, p, c_name) XSETOBJ (var, Lisp_Type_Record, p)
+# define XSETRECORD(var, p, c_name) XSETOBJ (var, p)
#endif /* not ERROR_CHECK_TYPECHECK */
the caller calls Lstream_read() with a very small size.
This function can be NULL if the stream is output-only. */
- /* The omniscient mly, blinded by the irresistable thrall of Common
+ /* The omniscient mly, blinded by the irresistible thrall of Common
Lisp, thinks that it is bogus that the types and implementations
of input and output streams are the same. */
ssize_t (*reader) (Lstream *stream, unsigned char *data, size_t size);
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* This prevents Emacs dumping an unsqueezed binary with the
SQUEEZE bit set in the magic number. */
#define UNEXEC "unexfx2800.o"
#define LIBS_MACHINE "-lalliant"
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES*/
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
since there is no /dev/kmem */
-/* Undefine VIRT_ADDR_VARIES because the virtual addresses of
- pure and impure space as loaded do not vary. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define HAVE_ALLOCA because we use the system's version of alloca. */
#define HAVE_ALLOCA
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
-
/* this brings in alloca() if we're using cc */
#ifdef USG
#define NO_REMAP
#endif /* USG */
#ifdef WIN32_NATIVE
-#define VIRT_ADDR_VARIES
#define DATA_END get_data_end ()
#define DATA_START get_data_start ()
#define HAVE_ALLOCA
and temacs will do (load "loadup") automatically unless told otherwise. */
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */ /* Karl Kleinpaste says this isn't needed. */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
and temacs will do (load "loadup") automatically unless told otherwise. */
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */ /* Karl Kleinpaste says this isn't needed. */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/*#define VIRT_ADDR_VARIES*/
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/*#define CANNOT_DUMP*/
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that data space precedes text space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that data space precedes text space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define NO_REMAP if memory segmentation makes it not work well
to change the boundary between the text section and data section
when Emacs is dumped. If you define this, the preloaded Lisp
/*#define CANNOT_DUMP /**/
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES /**/
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#define VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#define VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* XEmacs: Richard Cognot <cognot@ensg.u-nancy.fr> says we need this for
HPUX; but eeide@asylum.cs.utah.edu (Eric Eide) says it loses on BSD. */
#ifndef BSD
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define addresses, macros, change some setup for dump */
#define NO_REMAP
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
#ifdef XENIX
/* Define NO_REMAP if memory segmentation makes it not work well
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
#ifdef linux
#define NO_REMAP
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* ns16000's have an unexec, so should the mg-1 */
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-/* hmmmm... not sure. copied sequent.h */
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
#else /* mklinux */
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments. */
-
-#define NO_ARG_ARRAY
-
/* Define addresses, macros, change some setup for dump */
#define NO_REMAP
-/* Use type int rather than a union, to represent Lisp_Object */
-
-/* #define NO_UNION_TYPE */
-
#ifdef CANNOT_DUMP
#endif /* CANNOT_DUMP */
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* The STRIDE system is more powerful than standard USG5. */
#define HAVE_PTYS
and temacs will do (load "loadup") automatically unless told otherwise. */
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */ /* Karl Kleinpaste says this isn't needed. */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
and temacs will do (load "loadup") automatically unless told otherwise. */
/*#define CANNOT_DUMP*/
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-/* #define VIRT_ADDR_VARIES */
-
/* Define NO_REMAP if memory segmentation makes it not work well
to change the boundary between the text section and data section
when Emacs is dumped. If you define this, the preloaded Lisp
#define CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#define VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that data space precedes text space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
#undef CANNOT_DUMP
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-#undef VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
operating system this machine is likely to run.
USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments. */
-
-#define NO_ARG_ARRAY
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
orion, tahoe, APOLLO and many others */
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines. */
-
-#define NO_UNION_TYPE
-
-/* Data type of load average, as read out of kmem. */
-
-#define LOAD_AVE_TYPE long
-
-/* Convert that into an integer that is 100 for a load average of 1.0 */
-
-#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
-
/* Define CANNOT_DUMP on machines where unexec does not work.
Then the function dump-emacs will not be defined
and temacs will do (load "loadup") automatically unless told otherwise. */
#define CANNOT_UNEXEC 1
*/
+/* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
+ since there is no load average available. */
+
/* Start and end of text and data. */
#define DATA_END get_data_end ()
#define DATA_START get_data_start ()
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* Text does precede data space, but this is never a safe assumption. */
-#define VIRT_ADDR_VARIES
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
/* #define CANNOT_DUMP */
-/* Define VIRT_ADDR_VARIES if the virtual addresses of
- pure and impure space as loaded can vary, and even their
- relative order cannot be relied on.
-
- Otherwise Emacs assumes that text space precedes data space,
- numerically. */
-
-/* #define VIRT_ADDR_VARIES */
-
/* Define C_ALLOCA if this machine does not support a true alloca
and the one written in C should be used instead.
Define HAVE_ALLOCA to say that the system provides a properly
$generated_header{$_} = 1;
}
+# Although this is not technically true, it ought to be true,
+# and makes the generated Makefile smaller.
+$uses{'lisp.h'}{'config.h'} = 1;
+
for my $file (keys %exists) {
open (FILE, $file) or die "$file: $!";
undef $/; $_ = <FILE>;
# Print file header
print
-"## This file automatically generated by $myName. Do not modify.
+"## This file is automatically generated by \`$myName'. Do not modify.
-#ifdef USE_UNION_TYPE
+#if defined(USE_UNION_TYPE)
LISP_UNION_H=lisp-union.h
#else
LISP_UNION_H=lisp-disunion.h
#endif
";
-my @LISP_H = ('lisp.h', 'config.h');
-#@LISP_H = grep (! /lisp-(dis)?union\.h/, @LISP_H);
-print "LISP_H = @{[grep (!/lisp-(dis)?union\.h/, @LISP_H)]} \$(LISP_UNION_H)\n";
+my @LISP_H = ('lisp.h', keys %{$uses{'lisp.h'}});
+print "LISP_H=@{[grep (!/lisp-(dis)?union\.h/, @LISP_H)]} \$(LISP_UNION_H)\n";
sub PrintDeps {
my $file = shift;
sub PrintPatternDeps {
my ($pattern, $CPP_SYMBOL) = @_;
- print "#ifdef $CPP_SYMBOL\n";
+ print "#if defined($CPP_SYMBOL)\n";
for my $file (sort grep (/$pattern/ && /\.c$/, keys %uses)) {
PrintDeps($file);
delete $uses{$file};
print "#endif\n";
}
-PrintPatternDeps ('-msw', "HAVE_MS_WINDOWS");
-PrintPatternDeps ('-x', "HAVE_X_WINDOWS");
-PrintPatternDeps ('database', "HAVE_DATABASE");
-PrintPatternDeps ('^mule', "MULE");
+PrintPatternDeps ('-msw\\.', "HAVE_MS_WINDOWS");
+PrintPatternDeps ('-x\\.', "HAVE_X_WINDOWS");
+PrintPatternDeps ('-tty\\.', "HAVE_TTY");
+PrintPatternDeps ('^database', "HAVE_DATABASE");
+PrintPatternDeps ('^mule', "MULE");
PrintPatternDeps ('^(?:External|extw-)', "EXTERNAL_WIDGET");
for my $file (sort grep (/\.c$/, keys %uses)) { PrintDeps($file); }
+# Surprisingly robust regexp to remove comments from arbitrary C code
sub RemoveComments {
$_[0] =~
s{ (
#define MENU_ITEM_ID_BITS(x) (((x) & 0x7FFF) | 0x8000)
static HMENU top_level_menu;
-/* Translate (in place) %_ to &, %% to %.
- Return new length, and (through accel) the accelerator character.
- (If there is no accelerator, it will be added on the first character.)
- len = number of bytes (not including zero terminator).
- maxlen = size of buffer.
- We assume and maintain zero-termination. To be absolutely sure
- of not hitting an error, maxlen should be >= 2*len + 3. */
-
+/*
+ * Translate (in place) X accelerator syntax to win32 accelerator syntax.
+ * Return new length.
+ * len = number of bytes (not including zero terminator).
+ * maxlen = size of buffer.
+ * accel = (Emchar*) to receive the accelerator character
+ * or NULL to suppress accelerators in the menu or dialog item.
+ *
+ * %% is replaced with %
+ * if accel is NULL:
+ * %_ is removed.
+ * if accel is non-NULL:
+ * %_ is replaced with &.
+ * The accelerator character is passed back in *accel.
+ * (If there is no accelerator, it will be added on the first character.)
+ *
+ * We assume and maintain zero-termination. To be absolutely sure
+ * of not hitting an error, maxlen should be >= 2*len + 3.
+ */
Bytecount
mswindows_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len,
- Bytecount maxlen, Emchar *accel,
- Lisp_Object error_name)
+ Bytecount maxlen, Emchar *accel,
+ Lisp_Object error_name)
{
Bufbyte *ptr;
- *accel = '\0';
+ if (accel)
+ *accel = '\0';
/* Escape '&' as '&&' */
-
ptr = item;
while ((ptr = (Bufbyte *) memchr (ptr, '&', len - (ptr - item))) != NULL)
{
if (len + 2 > maxlen)
- signal_simple_error ("Menu item produces too long displayable string",
- error_name);
+ syntax_error ("Menu item produces too long displayable string",
+ error_name);
memmove (ptr + 1, ptr, (len - (ptr - item)) + 1);
len++;
ptr += 2;
{
if (*(ptr + 1) == '_')
{
- *ptr = '&';
- if (!*accel)
- /* #### urk ! We need a reference translation table for
- case changes that aren't buffer-specific. */
- *accel = DOWNCASE (current_buffer, charptr_emchar (ptr + 2));
- memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1);
- len--;
+ if (accel)
+ {
+ *ptr = '&';
+ if (!*accel)
+ /* #### urk ! We need a reference translation table for
+ case changes that aren't buffer-specific. */
+ *accel = DOWNCASE (current_buffer, charptr_emchar (ptr + 2));
+ memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1);
+ len--;
+ }
+ else /* Skip accelerator */
+ {
+ memmove (ptr, ptr + 2, len - (ptr - item + 2) + 1);
+ len-=2;
+ }
}
else if (*(ptr + 1) == '%')
{
memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1);
len--;
+ ptr++;
}
- ptr++;
+ else /* % on its own - shouldn't happen */
+ ptr++;
}
- if (!*accel)
+ if (accel && !*accel)
{
+ /* Force a default accelerator */
if (len + 2 > maxlen)
- signal_simple_error ("Menu item produces too long displayable string",
- error_name);
+ syntax_error ("Menu item produces too long displayable string",
+ error_name);
ptr = item;
memmove (ptr + 1, ptr, len + 1);
/* #### urk ! We need a reference translation table for
/* We construct the name in a static buffer. That's fine, because
menu items longer than 128 chars are probably programming errors,
and better be caught than displayed! */
-
+
static char buf[MAX_MENUITEM_LENGTH+2];
/* Left flush part of the string */
return HASH2 (internal_hash (XVECTOR_DATA(item)[0], 0),
internal_hash (XVECTOR_DATA(item)[1], 0));
}
-
+
/* An error - will be caught later */
return 0;
}
int flush_right, int bar_p)
{
MENUITEMINFO item_info;
+ UINT oldflags = MF_BYPOSITION;
+ UINT olduidnewitem = 0;
+ LPCTSTR oldlpnewitem = 0;
item_info.cbSize = sizeof (item_info);
item_info.fMask = MIIM_TYPE | MIIM_STATE | MIIM_ID;
{
/* Separator or unselectable text */
if (separator_string_p (XSTRING_DATA (item)))
- item_info.fType = MFT_SEPARATOR;
+ {
+ item_info.fType = MFT_SEPARATOR;
+ oldflags |= MF_SEPARATOR;
+ }
else
{
item_info.fType = MFT_STRING;
item_info.fState = MFS_DISABLED;
item_info.dwTypeData = XSTRING_DATA (item);
+ oldflags |= MF_STRING | MF_DISABLED;
+ oldlpnewitem = item_info.dwTypeData;
}
}
else if (CONSP (item))
menu_parse_submenu_keywords (item, gui_item);
if (!STRINGP (pgui_item->name))
- signal_simple_error ("Menu name (first element) must be a string",
+ syntax_error ("Menu name (first element) must be a string",
item);
if (!gui_item_included_p (gui_item, Vmenubar_configuration))
- {
- UNGCPRO;
- goto done;
- }
+ {
+ UNGCPRO;
+ goto done;
+ }
if (!gui_item_active_p (gui_item))
- item_info.fState = MFS_GRAYED;
+ {
+ item_info.fState = MFS_GRAYED;
+ oldflags |= MF_GRAYED;
+ }
/* Temptation is to put 'else' right here. Although, the
displayed item won't have an arrow indicating that it is a
popup. So we go ahead a little bit more and create a popup */
item_info.fMask |= MIIM_SUBMENU;
item_info.dwTypeData = displayable_menu_item (gui_item, bar_p, &accel);
item_info.hSubMenu = submenu;
+ olduidnewitem = (UINT) submenu;
+ oldlpnewitem = item_info.dwTypeData;
+ oldflags |= MF_POPUP;
if (accel && bar_p)
*accel_list = Fcons (make_char (accel), *accel_list);
Fputhash (hmenu_to_lisp_object (submenu), path, hash_tab);
}
UNGCPRO;
- }
+ }
else if (VECTORP (item))
{
/* An ordinary item */
GCPRO2 (gui_item, *accel_list);
if (!gui_item_included_p (gui_item, Vmenubar_configuration))
- {
- UNGCPRO;
- goto done;
- }
+ {
+ UNGCPRO;
+ goto done;
+ }
if (!STRINGP (pgui_item->name))
pgui_item->name = Feval (pgui_item->name);
if (!gui_item_active_p (gui_item))
- item_info.fState = MFS_GRAYED;
+ {
+ item_info.fState = MFS_GRAYED;
+ oldflags = MF_GRAYED;
+ }
style = (NILP (pgui_item->selected) || NILP (Feval (pgui_item->selected))
? Qnil : pgui_item->style);
{
item_info.fType |= MFT_RADIOCHECK;
item_info.fState |= MFS_CHECKED;
+ oldflags |= MF_CHECKED; /* Can't support radio-button checkmarks
+ under 3.51 */
}
else if (EQ (style, Qtoggle))
{
item_info.fState |= MFS_CHECKED;
+ oldflags |= MF_CHECKED;
}
id = allocate_menu_item_id (path, pgui_item->name,
item_info.wID = (UINT) XINT (id);
item_info.fType |= MFT_STRING;
item_info.dwTypeData = displayable_menu_item (gui_item, bar_p, &accel);
+ olduidnewitem = item_info.wID;
+ oldflags |= MF_STRING;
+ oldlpnewitem = item_info.dwTypeData;
if (accel && bar_p)
*accel_list = Fcons (make_char (accel), *accel_list);
UNGCPRO;
}
else
- {
- signal_simple_error ("Malformed menu item descriptor", item);
- }
+ syntax_error ("Malformed menu item descriptor", item);
if (flush_right)
- item_info.fType |= MFT_RIGHTJUSTIFY;
+ item_info.fType |= MFT_RIGHTJUSTIFY; /* can't support in 3.51 */
- InsertMenuItem (menu, UINT_MAX, TRUE, &item_info);
+ if (xInsertMenuItemA)
+ xInsertMenuItemA (menu, UINT_MAX, TRUE, &item_info);
+ else
+ InsertMenu (menu, UINT_MAX, oldflags, olduidnewitem, oldlpnewitem);
done:;
-}
+}
/*
* This function is called from populate_menu and checksum_menu.
/* Check that menu name is specified when expected */
if (NILP (pgui_item->name) && deep_p)
- signal_simple_error ("Menu must have a name", desc);
+ syntax_error ("Menu must have a name", desc);
/* Apply filter if specified */
if (!NILP (pgui_item->filter))
checksum = HASH2 (checksum,
checksum_menu_item (XCAR (item_desc)));
}
-
+
if (populate_p)
{
/* Remove the "(empty)" item, if there are other ones */
{
CHECK_STRING (pgui_item->name);
InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED,
- 0, XSTRING_DATA(pgui_item->name));
+ 0, displayable_menu_item (gui_item, bar_p, NULL));
InsertMenu (menu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
- SetMenuDefaultItem (menu, 0, MF_BYPOSITION);
+ if (xSetMenuDefaultItem) /* not in NT 3.5x */
+ xSetMenuDefaultItem (menu, 0, MF_BYPOSITION);
}
}
Fputhash (hmenu_to_lisp_object (menubar), Qnil,
FRAME_MSWINDOWS_MENU_HASH_TABLE (f));
- populate_menu (menubar, Qnil, desc,
+ populate_menu (menubar, Qnil, desc,
FRAME_MSWINDOWS_MENU_HASH_TABLE (f), 1);
UNGCPRO;
}
{
Lisp_Object hash = FRAME_MSWINDOWS_MENU_HASH_TABLE (f);
- assert (HASH_TABLEP (hash));
+ if (NILP (hash))
+ return 0;
/* !!#### not Mule-ized */
return !NILP (memq_no_quit (make_char (tolower (ch)),
Fgethash (Qt, hash, Qnil)));
}
-
+
\f
/*------------------------------------------------------------------------*/
/* Message handlers */
XSETFRAME (frame, f);
/* this used to call mswindows_enqueue_misc_user_event but that
breaks customize because the misc_event gets eval'ed in some
- cicumstances. Don't change it back unless you can fix the
+ circumstances. Don't change it back unless you can fix the
customize problem also.*/
enqueue_misc_user_event (frame, fn, arg);
mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
menu = create_empty_popup_menu ();
Fputhash (hmenu_to_lisp_object (menu), Qnil, current_hash_table);
top_level_menu = menu;
-
+
/* see comments in menubar-x.c */
if (zmacs_regions)
zmacs_region_stays = 1;
-
+
ok = TrackPopupMenu (menu,
TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON,
pt.x, pt.y, 0,
/* Implements an elisp-programmable menubar -- X interface.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
/* Synched up with: Not in FSF. */
+/* This file Mule-ized by Ben Wing, 7-8-00. */
+
/* Authorship:
Created 16-dec-91 by Jamie Zawinski.
/* This function cannot GC.
It is only called from menu_item_descriptor_to_widget_value, which
prohibits GC. */
- /* !!#### This function has not been Mule-ized */
int menubar_root_p = (menu_type == MENUBAR_TYPE && depth == 0);
int count = specpdl_depth ();
int partition_seen = 0;
if (STRINGP (desc))
{
- char *string_chars = (char *) XSTRING_DATA (desc);
+ Bufbyte *string_chars = XSTRING_DATA (desc);
wv->type = (separator_string_p (string_chars) ? SEPARATOR_TYPE :
TEXT_TYPE);
-#if 1
- /* #### - should internationalize with X resources instead.
- Not so! --ben */
- string_chars = GETTEXT (string_chars);
-#endif
if (wv->type == SEPARATOR_TYPE)
{
- wv->value = menu_separator_style (string_chars);
+ wv->value = menu_separator_style_and_to_external (string_chars);
}
else
{
- wv->name = xstrdup (string_chars);
+ LISP_STRING_TO_EXTERNAL_MALLOC (desc, wv->name, Qlwlib_encoding);
wv->enabled = 1;
/* dverna Dec. 98: command_builder_operate_menu_accelerator will
manipulate the accel as a Lisp_Object if the widget has a name.
if (!button_item_to_widget_value (Qmenubar,
gui_item, wv, 1,
(menu_type == MENUBAR_TYPE
- && depth <= 1), 1))
+ && depth <= 1), 1, 1))
{
/* :included form was nil */
wv = NULL;
int active_spec = 0;
wv->type = CASCADE_TYPE;
wv->enabled = 1;
- wv->name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc)));
- wv->name = strdup_and_add_accel (wv->name);
+ wv->name = add_accel_and_to_external (XCAR (desc));
- accel = gui_name_accelerator (LISP_GETTEXT (XCAR (desc)));
+ accel = gui_name_accelerator (XCAR (desc));
wv->accel = LISP_TO_VOID (accel);
desc = Fcdr (desc);
Lisp_Object cascade = desc;
desc = Fcdr (desc);
if (NILP (desc))
- signal_simple_error ("Keyword in menu lacks a value",
- cascade);
+ syntax_error ("Keyword in menu lacks a value", cascade);
val = Fcar (desc);
desc = Fcdr (desc);
if (EQ (key, Q_included))
|| CHARP (val))
wv->accel = LISP_TO_VOID (val);
else
- signal_simple_error ("bad keyboard accelerator", val);
+ syntax_error ("bad keyboard accelerator", val);
}
else if (EQ (key, Q_label))
{
/* implement in 21.2 */
}
else
- signal_simple_error ("Unknown menu cascade keyword", cascade);
+ syntax_error ("Unknown menu cascade keyword", cascade);
}
if ((!NILP (config_tag)
title_wv->enabled = 1;
title_wv->next = sep_wv;
sep_wv->type = SEPARATOR_TYPE;
- sep_wv->value = menu_separator_style ("==");
+ sep_wv->value = menu_separator_style_and_to_external ("==");
sep_wv->next = 0;
wv->contents = title_wv;
}
else
{
- signal_simple_error ("Menu name (first element) must be a string",
- desc);
+ syntax_error ("Menu name (first element) must be a string", desc);
}
if (deep_p || menubar_root_p)
if (menubar_root_p && NILP (child)) /* the partition */
{
if (partition_seen)
- error (
- "More than one partition (nil) in menubar description");
+ syntax_error
+ ("More than one partition (nil) in menubar description",
+ desc);
partition_seen = 1;
next = xmalloc_widget_value ();
next->type = PUSHRIGHT_TYPE;
wv = NULL;
}
else if (NILP (desc))
- error ("nil may not appear in menu descriptions");
+ syntax_error ("nil may not appear in menu descriptions", desc);
else
- signal_simple_error ("Unrecognized menu descriptor", desc);
+ syntax_error ("Unrecognized menu descriptor", desc);
menu_item_done:
INC_CHARPTR (name_data);
}
+ if (string_result_ptr - string_result == XSTRING_LENGTH (name)
+ && !memcmp (string_result, XSTRING_DATA (name), XSTRING_LENGTH (name)))
+ return name;
+
return make_string (string_result, string_result_ptr - string_result);
}
:included (memq symbol menubar-configuration)
See the variable `menubar-configuration'.
- :filter <function> A menu filter can only be used in a menu item list.
- (i.e. not in a menu item itself). It is used to
+ :filter <function> A menu filter can only be used at the beginning of a
+ submenu description (i.e. not in a menu item itself).
+ (Remember that most of the keywords can take evaluated
+ expressions as well as constants.) The filter is used to
incrementally create a submenu only when it is selected
by the user and not every time the menubar is activated.
The filter function is passed the list of menu items in
- the submenu and must return a list of menu items to be
- used for the menu. It must not destructively modify
+ the submenu and must return the modified list to be
+ actually used. The filter MUST NOT destructively modify
the list of menu items passed to it. It is called only
when the menu is about to be displayed, so other menus
may already be displayed. Vile and terrible things will
:key-sequence keys Used in FSF Emacs as an hint to an equivalent keybinding.
Ignored by XEmacs for easymenu.el compatibility.
+ (XEmacs computes this information automatically.)
For example:
extern int in_menu_callback;
#endif
-
+
#endif /* HAVE_MENUBARS */
#endif /* INCLUDED_menubar_h_ */
extended_command (rrr,RRR,Rrr,ARGS)
*/
-/*
+/*
Here after, Extended CCL Instructions.
Bit length of extended command is 14.
Therefore, the instruction code range is 0..16384(0x3fff).
3:MAP-ID1
4:MAP-ID2
...
- */
+ */
/* Map the code in reg[rrr] by MAPs starting from the Nth (N =
reg[RRR]) map.
where
STARTPOINT is an offset to be used for indexing a map,
ENDPOINT is a maximum index number of a map,
- VAL and VALn is a number, nil, t, or lambda.
+ VAL and VALn is a number, nil, t, or lambda.
Valid index range of a map of type (a) is:
STARTPOINT <= index < STARTPOINT + map_size - 1
int ic; /* Instruction Counter. */
};
-/* For the moment, we only support depth 256 of stack. */
+/* For the moment, we only support depth 256 of stack. */
static struct ccl_prog_stack ccl_prog_stack_struct[256];
int
src++;
goto ccl_read_multibyte_character_suspend;
}
-
+
i = *src++;
#if 0
if (i == LEADING_CODE_COMPOSITION)
SPLIT_CHAR (op, reg[RRR], i, j);
if (j != -1)
i = (i << 7) | j;
-
+
reg[rrr] = i;
break;
SPLIT_CHAR (op, reg[RRR], i, j);
if (j != -1)
i = (i << 7) | j;
-
+
reg[rrr] = i;
break;
else
continue;
}
- else
+ else
continue;
if (NILP (content))
ic = fin_ic;
}
break;
-
+
case CCL_MapMultiple:
{
Lisp_Object map, content, attrib, value;
else
continue;
}
- else
+ else
continue;
if (NILP (content))
}
break;
#endif
-
+
default:
CCL_INVALID_CMD;
}
The rest elements are mapped numbers.
Symbol t means to map to an original number before mapping.
Symbol nil means that the corresponding element is empty.
- Symbol lambda menas to terminate mapping here.
+ Symbol lambda means to terminate mapping here.
*/
DEFUN ("register-code-conversion-map", Fregister_code_conversion_map,
CHECK_SYMBOL (symbol, 0);
CHECK_VECTOR (map, 1);
-
+
for (i = 0; i < len; i++)
{
Lisp_Object slot = XVECTOR (Vcode_conversion_map_vector)->contents[i];
int type;
Lisp_Object registry = Qnil;
Lisp_Object charset;
- Lisp_Object rest, keyword, value;
Lisp_Object ccl_program = Qnil;
Lisp_Object short_name = Qnil, long_name = Qnil;
if (!NILP (charset))
signal_simple_error ("Cannot redefine existing charset", name);
- EXTERNAL_PROPERTY_LIST_LOOP (rest, keyword, value, props)
- {
- if (EQ (keyword, Qshort_name))
- {
- CHECK_STRING (value);
- short_name = value;
- }
-
- if (EQ (keyword, Qlong_name))
- {
- CHECK_STRING (value);
- long_name = value;
- }
-
- else if (EQ (keyword, Qdimension))
- {
- CHECK_INT (value);
- dimension = XINT (value);
- if (dimension < 1 || dimension > 2)
- signal_simple_error ("Invalid value for 'dimension", value);
- }
-
- else if (EQ (keyword, Qchars))
- {
- CHECK_INT (value);
- chars = XINT (value);
- if (chars != 94 && chars != 96)
- signal_simple_error ("Invalid value for 'chars", value);
- }
-
- else if (EQ (keyword, Qcolumns))
- {
- CHECK_INT (value);
- columns = XINT (value);
- if (columns != 1 && columns != 2)
- signal_simple_error ("Invalid value for 'columns", value);
- }
-
- else if (EQ (keyword, Qgraphic))
- {
- CHECK_INT (value);
- graphic = XINT (value);
- if (graphic < 0 || graphic > 1)
- signal_simple_error ("Invalid value for 'graphic", value);
- }
-
- else if (EQ (keyword, Qregistry))
- {
- CHECK_STRING (value);
- registry = value;
- }
-
- else if (EQ (keyword, Qdirection))
- {
- if (EQ (value, Ql2r))
- direction = CHARSET_LEFT_TO_RIGHT;
- else if (EQ (value, Qr2l))
- direction = CHARSET_RIGHT_TO_LEFT;
- else
- signal_simple_error ("Invalid value for 'direction", value);
- }
-
- else if (EQ (keyword, Qfinal))
- {
- CHECK_CHAR_COERCE_INT (value);
- final = XCHAR (value);
- if (final < '0' || final > '~')
- signal_simple_error ("Invalid value for 'final", value);
- }
-
- else if (EQ (keyword, Qccl_program))
- {
- CHECK_VECTOR (value);
- ccl_program = value;
- }
-
- else
- signal_simple_error ("Unrecognized property", keyword);
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (keyword, value, props)
+ {
+ if (EQ (keyword, Qshort_name))
+ {
+ CHECK_STRING (value);
+ short_name = value;
+ }
+
+ if (EQ (keyword, Qlong_name))
+ {
+ CHECK_STRING (value);
+ long_name = value;
+ }
+
+ else if (EQ (keyword, Qdimension))
+ {
+ CHECK_INT (value);
+ dimension = XINT (value);
+ if (dimension < 1 || dimension > 2)
+ signal_simple_error ("Invalid value for 'dimension", value);
+ }
+
+ else if (EQ (keyword, Qchars))
+ {
+ CHECK_INT (value);
+ chars = XINT (value);
+ if (chars != 94 && chars != 96)
+ signal_simple_error ("Invalid value for 'chars", value);
+ }
+
+ else if (EQ (keyword, Qcolumns))
+ {
+ CHECK_INT (value);
+ columns = XINT (value);
+ if (columns != 1 && columns != 2)
+ signal_simple_error ("Invalid value for 'columns", value);
+ }
+
+ else if (EQ (keyword, Qgraphic))
+ {
+ CHECK_INT (value);
+ graphic = XINT (value);
+ if (graphic < 0 || graphic > 1)
+ signal_simple_error ("Invalid value for 'graphic", value);
+ }
+
+ else if (EQ (keyword, Qregistry))
+ {
+ CHECK_STRING (value);
+ registry = value;
+ }
+
+ else if (EQ (keyword, Qdirection))
+ {
+ if (EQ (value, Ql2r))
+ direction = CHARSET_LEFT_TO_RIGHT;
+ else if (EQ (value, Qr2l))
+ direction = CHARSET_RIGHT_TO_LEFT;
+ else
+ signal_simple_error ("Invalid value for 'direction", value);
+ }
+
+ else if (EQ (keyword, Qfinal))
+ {
+ CHECK_CHAR_COERCE_INT (value);
+ final = XCHAR (value);
+ if (final < '0' || final > '~')
+ signal_simple_error ("Invalid value for 'final", value);
+ }
+
+ else if (EQ (keyword, Qccl_program))
+ {
+ CHECK_VECTOR (value);
+ ccl_program = value;
+ }
+
+ else
+ signal_simple_error ("Unrecognized property", keyword);
+ }
+ }
if (!final)
error ("'final must be specified");
CHECK_INT (arg1);
/* It is useful (and safe, according to Olivier Galibert) to strip
- the 8th bit off ARG1 and ARG2 becaue it allows programmers to
+ the 8th bit off ARG1 and ARG2 because it allows programmers to
write (make-char 'latin-iso8859-2 CODE) where code is the actual
Latin 2 code of the character. */
a1 = XINT (arg1) & 0x7f;
#ifdef ERROR_CHECK_TYPECHECK
/* int not Bufbyte even though that is the actual type of a leading byte.
- This way, out-ot-range values will get caught rather than automatically
+ This way, out-of-range values will get caught rather than automatically
truncated. */
INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (int lb);
INLINE_HEADER Lisp_Object
{
int rc;
struct wnn_param param;
- Lisp_Object tail, key, val;
int snum;
if ((snum = check_wnn_server_type ()) == -1) return Qnil;
rc = jl_param_get (wnnfns_buf[snum], ¶m);
if (rc < 0) return Qnil;
- EXTERNAL_PROPERTY_LIST_LOOP (tail, key, val, Vsetvalues_alist)
- {
- int setval;
- CHECK_INT (val);
- setval = XINT (val);
- if (EQ (key, Qwnn_n)) param.n = setval;
- else if (EQ (key, Qwnn_nsho)) param.nsho = setval;
- else if (EQ (key, Qwnn_hindo)) param.p1 = setval;
- else if (EQ (key, Qwnn_len)) param.p2 = setval;
- else if (EQ (key, Qwnn_jiri)) param.p3 = setval;
- else if (EQ (key, Qwnn_flag)) param.p4 = setval;
- else if (EQ (key, Qwnn_jisho)) param.p5 = setval;
- else if (EQ (key, Qwnn_sbn)) param.p6 = setval;
- else if (EQ (key, Qwnn_dbn_len)) param.p7 = setval;
- else if (EQ (key, Qwnn_sbn_cnt)) param.p8 = setval;
- else if (EQ (key, Qwnn_suuji)) param.p9 = setval;
- else if (EQ (key, Qwnn_kana)) param.p10 = setval;
- else if (EQ (key, Qwnn_eisuu)) param.p11 = setval;
- else if (EQ (key, Qwnn_kigou)) param.p12 = setval;
- else if (EQ (key, Qwnn_toji_kakko)) param.p13 = setval;
- else if (EQ (key, Qwnn_fuzokogo)) param.p14 = setval;
- else if (EQ (key, Qwnn_kaikakko)) param.p15 = setval;
- else
- {
- signal_simple_error ("Invalid wnn keyword", key);
- return Qnil;
- }
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (key, val, Vsetvalues_alist)
+ {
+ int setval;
+ CHECK_INT (val);
+ setval = XINT (val);
+ if (EQ (key, Qwnn_n)) param.n = setval;
+ else if (EQ (key, Qwnn_nsho)) param.nsho = setval;
+ else if (EQ (key, Qwnn_hindo)) param.p1 = setval;
+ else if (EQ (key, Qwnn_len)) param.p2 = setval;
+ else if (EQ (key, Qwnn_jiri)) param.p3 = setval;
+ else if (EQ (key, Qwnn_flag)) param.p4 = setval;
+ else if (EQ (key, Qwnn_jisho)) param.p5 = setval;
+ else if (EQ (key, Qwnn_sbn)) param.p6 = setval;
+ else if (EQ (key, Qwnn_dbn_len)) param.p7 = setval;
+ else if (EQ (key, Qwnn_sbn_cnt)) param.p8 = setval;
+ else if (EQ (key, Qwnn_suuji)) param.p9 = setval;
+ else if (EQ (key, Qwnn_kana)) param.p10 = setval;
+ else if (EQ (key, Qwnn_eisuu)) param.p11 = setval;
+ else if (EQ (key, Qwnn_kigou)) param.p12 = setval;
+ else if (EQ (key, Qwnn_toji_kakko)) param.p13 = setval;
+ else if (EQ (key, Qwnn_fuzokogo)) param.p14 = setval;
+ else if (EQ (key, Qwnn_kaikakko)) param.p15 = setval;
+ else
+ {
+ signal_simple_error ("Invalid wnn keyword", key);
+ return Qnil;
+ }
+ }
+ }
#if 0
printf("wnn_n = %d\n",param.n);
#include <unistd.h>
#endif
+/* NAS <= 1.2p5 defines {BIG,LITTLE}_ENDIAN in <audio/fileutil.h>,
+ conflicting with GNU libc (at least); newer versions avoid this
+ name space pollution.
+ DO NOT USE THOSE MACROS in this file. Use NAS_{BIG,LITTLE}_ENDIAN.
+
+ It would be slightly more reliable to do this via configure, but that
+ seems unnecessarily complex.
+*/
#undef LITTLE_ENDIAN
#undef BIG_ENDIAN
+
#include <audio/audiolib.h>
#include <audio/soundlib.h>
#include <audio/snd.h>
#include <audio/wave.h>
#include <audio/fileutil.h>
+/* NAS <= 1.2p5 <audio/fileutil.h> doesn't define the NAS_ versions */
+#ifndef NAS_LITTLE_ENDIAN
+#define NAS_LITTLE_ENDIAN LITTLE_ENDIAN
+#define NAS_BIG_ENDIAN BIG_ENDIAN
+#endif
+
#ifdef emacs
# define XTOOLKIT
memcpy (&si->h, data, sizeof (SndHeader));
- if (LITTLE_ENDIAN)
+ if (NAS_LITTLE_ENDIAN)
{
char n;
char n;
if ((status = dread(c, sizeof(RiffChunk), 1)))
- if (BIG_ENDIAN)
+ if (NAS_BIG_ENDIAN)
swapl(&c->ckSize, n);
return status;
{
AuInt32 dummy;
- wi->format = DataReadS(BIG_ENDIAN);
- wi->channels = DataReadS(BIG_ENDIAN);
- wi->sampleRate = DataReadL(BIG_ENDIAN);
+ wi->format = DataReadS(NAS_BIG_ENDIAN);
+ wi->channels = DataReadS(NAS_BIG_ENDIAN);
+ wi->sampleRate = DataReadL(NAS_BIG_ENDIAN);
/* we don't care about the next two fields */
- dummy = DataReadL(BIG_ENDIAN);
- dummy = DataReadS(BIG_ENDIAN);
+ dummy = DataReadL(NAS_BIG_ENDIAN);
+ dummy = DataReadS(NAS_BIG_ENDIAN);
if (wi->format != RIFF_WAVE_FORMAT_PCM)
Err();
- wi->bitsPerSample = DataReadS(BIG_ENDIAN);
+ wi->bitsPerSample = DataReadS(NAS_BIG_ENDIAN);
/* skip any other format specific fields */
dseek(PAD2(ck.ckSize - 16), 1);
#endif
}
-/* Emulate getloadavg. */
-int
-getloadavg (double loadavg[], int nelem)
-{
- int i;
-
- /* A faithful emulation is going to have to be saved for a rainy day. */
- for (i = 0; i < nelem; i++)
- {
- loadavg[i] = 0.0;
- }
- return i;
-}
-
/* Emulate getpwuid, getpwnam and others. */
#define PASSWD_FIELD_SIZE 256
}
/* Emacs never uses this value, so don't bother making it match
- value returned by stat(). */
+ value returned by xemacs_stat(). */
dir_static.d_ino = 1;
dir_static.d_reclen = sizeof (struct direct) - MAXNAMLEN + 3 +
but is useful for Win32 processes on both Win95 and NT as well. */
Lisp_Object Vwin32_pipe_read_delay;
-/* Control whether stat() attempts to generate fake but hopefully
+/* Control whether xemacs_stat() attempts to generate fake but hopefully
"accurate" inode values, by hashing the absolute truenames of files.
This should detect aliasing between long and short names, but still
allows the possibility of hash collisions. */
start.hStdError = GetStdHandle (STD_ERROR_HANDLE);
/* Explicitly specify no security */
+ /* #### not supported under win98, but will go away */
if (!InitializeSecurityDescriptor (&sec_desc, SECURITY_DESCRIPTOR_REVISION))
goto EH_Fail;
+ /* #### not supported under win98, but will go away */
if (!SetSecurityDescriptorDacl (&sec_desc, TRUE, NULL, FALSE))
goto EH_Fail;
sec_attrs.nLength = sizeof (sec_attrs);
}
/* Handle executable names without an executable suffix. */
- program = make_string (cmdname, strlen (cmdname));
+ program = build_string (cmdname);
GCPRO1 (program);
if (NILP (Ffile_executable_p (program)))
{
if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED))
return Qnil;
+ /* #### not supported under win98, but will go away */
if (!SetThreadLocale (XINT (lcid)))
return Qnil;
#include "device.h"
#include "insdel.h"
-typedef struct colormap_t
+typedef struct colormap_t
{
const char *name;
COLORREF colorref;
/* Colors from X11R6 "XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp" */
/* MSWindows tends to round up the numbers in it's palette, ie where X uses
* 127, MSWindows uses 128. Colors commented as "Adjusted" are tweaked to
- * match the Windows standard palette to increase the likelyhood of
+ * match the Windows standard palette to increase the likelihood of
* mswindows_color_to_string() finding a named match.
*/
-static const colormap_t mswindows_X_color_map[] =
+static const colormap_t mswindows_X_color_map[] =
{
{"white" , PALETTERGB (255, 255, 255) },
{"black" , PALETTERGB (0, 0, 0) },
};
-typedef struct fontmap_t
+typedef struct fontmap_t
{
const char *name;
int value;
} fontmap_t;
/* Default weight first, preferred names listed before synonyms */
-static const fontmap_t fontweight_map[] =
+static const fontmap_t fontweight_map[] =
{
{"Regular" , FW_REGULAR}, /* The standard font weight */
{"Thin" , FW_THIN},
{"Black" , FW_BLACK}
};
-/* Default charset first, no synonyms allowed because these names are
+/* Default charset first, no synonyms allowed because these names are
* matched against the names reported by win32 by match_font() */
-static const fontmap_t charset_map[] =
+static const fontmap_t charset_map[] =
{
{"Western" , ANSI_CHARSET},
{"Symbol" , SYMBOL_CHARSET},
/************************************************************************/
static int
-hexval (char c)
+hexval (char c)
{
/* assumes ASCII and isxdigit(c) */
if (c >= 'a')
/* numeric names look like "#RRGGBB", "#RRRGGGBBB" or "#RRRRGGGGBBBB"
or "rgb:rrrr/gggg/bbbb" */
unsigned int r, g, b;
-
+
for (i=1; i<strlen(name); i++)
{
if (!isxdigit ((int)name[i]))
}
return (PALETTERGB (r, g, b));
}
- else
+ else
return (COLORREF) -1;
}
else if (*name) /* Can't be an empty string */
};
static int CALLBACK
-font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
+old_font_enum_callback_2 (ENUMLOGFONT FAR *lpelfe, NEWTEXTMETRIC FAR *lpntme,
+ int FontType, struct font_enum_t *font_enum)
+{
+ char fontname[MSW_FONTSIZE];
+ Lisp_Object fontname_lispstr;
+ int i;
+
+ /*
+ * The enumerated font weights are not to be trusted because:
+ * a) lpelfe->elfStyle is only filled in for TrueType fonts.
+ * b) Not all Bold and Italic styles of all fonts (including some Vector,
+ * Truetype and Raster fonts) are enumerated.
+ * I guess that fonts for which Bold and Italic styles are generated
+ * 'on-the-fly' are not enumerated. It would be overly restrictive to
+ * disallow Bold And Italic weights for these fonts, so we just leave
+ * weights unspecified. This means that we have to weed out duplicates of
+ * those fonts that do get enumerated with different weights.
+ */
+ if (FontType == 0 /*vector*/ || FontType == TRUETYPE_FONTTYPE)
+ /* Scalable, so leave pointsize blank */
+ sprintf (fontname, "%s::::", lpelfe->elfLogFont.lfFaceName);
+ else
+ /* Formula for pointsize->height from LOGFONT docs in Platform SDK */
+ sprintf (fontname, "%s::%d::", lpelfe->elfLogFont.lfFaceName,
+ MulDiv (lpntme->tmHeight - lpntme->tmInternalLeading,
+ 72, GetDeviceCaps (font_enum->hdc, LOGPIXELSY)));
+
+ /*
+ * The enumerated font character set strings are not to be trusted because
+ * lpelfe->elfScript is returned in the host language and not in English.
+ * We can't know a priori the translations of "Western", "Central European"
+ * etc into the host language, so we must use English. The same argument
+ * applies to the font weight string when matching fonts.
+ */
+ for (i=0; i<countof (charset_map); i++)
+ if (lpelfe->elfLogFont.lfCharSet == charset_map[i].value)
+ {
+ strcat (fontname, charset_map[i].name);
+ break;
+ }
+ if (i==countof (charset_map))
+ strcpy (fontname, charset_map[0].name);
+
+ /* Add the font name to the list if not already there */
+ fontname_lispstr = build_string (fontname);
+ if (NILP (memq_no_quit (fontname_lispstr, font_enum->list)))
+ font_enum->list = Fcons (fontname_lispstr, font_enum->list);
+
+ return 1;
+}
+
+static int CALLBACK
+old_font_enum_callback_1 (ENUMLOGFONT FAR *lpelfe, NEWTEXTMETRIC FAR *lpntme,
+ int FontType, struct font_enum_t *font_enum)
+{
+ /* This function gets called once per facename per character set.
+ * We call a second callback to enumerate the fonts in each facename */
+ return EnumFontFamilies (font_enum->hdc, lpelfe->elfLogFont.lfFaceName,
+ (FONTENUMPROC) old_font_enum_callback_2,
+ (LPARAM) font_enum);
+}
+
+static int CALLBACK
+font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
int FontType, struct font_enum_t *font_enum)
{
char fontname[MSW_FONTSIZE];
/*
* The enumerated font weights are not to be trusted because:
* a) lpelfe->elfStyle is only filled in for TrueType fonts.
- * b) Not all Bold and Italic styles of all fonts (inluding some Vector,
+ * b) Not all Bold and Italic styles of all fonts (including some Vector,
* Truetype and Raster fonts) are enumerated.
* I guess that fonts for which Bold and Italic styles are generated
* 'on-the-fly' are not enumerated. It would be overly restrictive to
}
static int CALLBACK
-font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
+font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
int FontType, struct font_enum_t *font_enum)
{
/* This function gets called once per facename per character set.
* We call a second callback to enumerate the fonts in each facename */
- return EnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont,
- (FONTENUMPROC) font_enum_callback_2,
- (LPARAM) font_enum, 0);
+ return xEnumFontFamiliesExA (font_enum->hdc, &lpelfe->elfLogFont,
+ (FONTENUMPROC) font_enum_callback_2,
+ (LPARAM) font_enum, 0);
}
/*
logfont.lfPitchAndFamily = DEFAULT_PITCH;
font_enum.hdc = hdc;
font_enum.list = Qnil;
- EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1,
- (LPARAM) (&font_enum), 0);
+ if (xEnumFontFamiliesExA)
+ xEnumFontFamiliesExA (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1,
+ (LPARAM) (&font_enum), 0);
+ else /* NT 3.5x */
+ EnumFontFamilies (hdc, 0, (FONTENUMPROC) old_font_enum_callback_1,
+ (LPARAM) (&font_enum));
+
return font_enum.list;
}
mswindows_finalize_font_instance (Lisp_Font_Instance *f);
/*
- * This is a work horse for both mswindows_initialize_font_instanc and
+ * This is a work horse for both mswindows_initialize_font_instance and
* msprinter_initialize_font_instance.
*/
static int
for (i=0; i<countof (fontweight_map); i++)
if (!stricmp (weight, fontweight_map[i].name))
- {
+ {
logfont.lfWeight = fontweight_map[i].value;
break;
}
effects[0] = '\0';
/* Charset */
- /* charset can be specified even if earlier fields havn't been */
+ /* charset can be specified even if earlier fields haven't been */
if (fields < 5)
{
if ((c=strchr (extname, ':')) && (c=strchr (c+1, ':')) &&
f->data = xnew_and_zero (struct mswindows_font_instance_data);
FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0) = hfont;
-
+
/* Some underlined fonts have the descent of one pixel more than their
non-underlined counterparts. Font variants though are assumed to have
identical metrics. So get the font metrics from the underlined variant
int escapeflag)
{
char buf[10];
- sprintf (buf, " 0x%lx",
+ sprintf (buf, " 0x%lx",
(unsigned long)FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0));
write_c_string (buf, printcharfun);
}
break;
default:;
}
-
+
return build_ext_string (extname, Qnative);
}
/* #### Implement me */
if (UNBOUNDP (charset))
return 1;
-
+
return 1;
}
/* CONSOLE_HAS_METHOD (mswindows, mark_font_instance); */
CONSOLE_HAS_METHOD (mswindows, print_font_instance);
CONSOLE_HAS_METHOD (mswindows, finalize_font_instance);
- CONSOLE_HAS_METHOD (mswindows, font_instance_truename);
+ CONSOLE_HAS_METHOD (mswindows, font_instance_truename);
CONSOLE_HAS_METHOD (mswindows, list_fonts);
#ifdef MULE
CONSOLE_HAS_METHOD (mswindows, font_spec_matches_charset);
/* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_font_instance); */
CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_font_instance);
CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_font_instance);
- CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_instance_truename);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_instance_truename);
CONSOLE_INHERITS_METHOD (msprinter, mswindows, list_fonts);
#ifdef MULE
CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_spec_matches_charset);
combinations. Only the one at index 0, neither underlined nor
struk through is created with the font instance. Other fonts are
created as necessary during redisplay, using the one at index 0
- as protptype */
+ as prototype */
#define MSWINDOWS_NUM_FONT_VARIANTS 4
struct mswindows_font_instance_data
{
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 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, Inc.
This file is part of XEmacs.
/* Authors: Jamie Zawinski, Chuck Thompson, Ben Wing */
+/* This file Mule-ized by Ben Wing, 7-10-00. */
+
#include <config.h>
#include "lisp.h"
match - tries the next nearest...
Return value is 1 for normal success, 2 for nearest color success,
- 3 for Non-deallocable sucess. */
+ 3 for Non-deallocable success. */
int
allocate_nearest_color (Display *display, Colormap colormap, Visual *visual,
XColor *color_def)
bl = color_def->blue << (bbits - 8);
else
bl = color_def->blue >> (8 - bbits);
- color_def->pixel = (rd << rshift) | (gr << gshift) | (bl << bshift);
+ color_def->pixel = (rd << rshift) | (gr << gshift) | (bl <<
+ bshift);
status = 3;
}
}
int x;
if( cells == NULL )
- {
- cells = alloca_array (XColor, no_cells);
- for (x = 0; x < no_cells; x++)
- cells[x].pixel = x;
+ {
+ cells = alloca_array (XColor, no_cells);
+ for (x = 0; x < no_cells; x++)
+ cells[x].pixel = x;
- /* read the current colormap */
- XQueryColors (display, colormap, cells, no_cells);
- }
+ /* read the current colormap */
+ XQueryColors (display, colormap, cells, no_cells);
+ }
nearest = 0;
/* I'm assuming CSE so I'm not going to condense this. */
* ((color_def->red >> 8) - (cells[0].red >> 8)))
+
(((color_def->green >> 8) - (cells[0].green >> 8))
- * ((color_def->green >> 8) - (cells[0].green >> 8)))
+ * ((color_def->green >> 8) - (cells[0].green >>
+ 8)))
+
(((color_def->blue >> 8) - (cells[0].blue >> 8))
- * ((color_def->blue >> 8) - (cells[0].blue >> 8))));
+ * ((color_def->blue >> 8) - (cells[0].blue >>
+ 8))));
for (x = 1; x < no_cells; x++)
{
trial_delta = ((((color_def->red >> 8) - (cells[x].red >> 8))
* ((color_def->red >> 8) - (cells[x].red >> 8)))
+
(((color_def->green >> 8) - (cells[x].green >> 8))
- * ((color_def->green >> 8) - (cells[x].green >> 8)))
+ * ((color_def->green >> 8) - (cells[x].green >>
+ 8)))
+
(((color_def->blue >> 8) - (cells[x].blue >> 8))
- * ((color_def->blue >> 8) - (cells[x].blue >> 8))));
+ * ((color_def->blue >> 8) - (cells[x].blue >>
+ 8))));
/* less? Ignore cells marked as previously failing */
if( (trial_delta < nearest_delta) &&
color_def->green = cells[nearest].green;
color_def->blue = cells[nearest].blue;
if (XAllocColor (display, colormap, color_def) != 0)
- status = 2;
+ status = 2;
else
- /* LSK: Either the colour map has changed since
- * we read it, or the colour is allocated
- * read/write... Mark this cmap entry so it's
- * ignored in the next iteration.
- */
- cells[nearest].pixel = ULONG_MAX;
+ /* LSK: Either the colour map has changed since
+ * we read it, or the colour is allocated
+ * read/write... Mark this cmap entry so it's
+ * ignored in the next iteration.
+ */
+ cells[nearest].pixel = ULONG_MAX;
}
}
return status;
}
-int
-x_parse_nearest_color (struct device *d, XColor *color, Bufbyte *name,
- Bytecount len, Error_behavior errb)
+static int
+x_parse_nearest_color (struct device *d, XColor *color, Lisp_Object name,
+ Error_behavior errb)
{
Display *dpy = DEVICE_X_DISPLAY (d);
Colormap cmap = DEVICE_X_COLORMAP (d);
xzero (*color);
{
const Extbyte *extname;
- Extcount extnamelen;
- TO_EXTERNAL_FORMAT (DATA, (name, len),
- ALLOCA, (extname, extnamelen),
- Qbinary);
- result = XParseColor (dpy, cmap, (char *) extname, color);
+ LISP_STRING_TO_EXTERNAL (name, extname, Qx_color_name_encoding);
+ result = XParseColor (dpy, cmap, extname, color);
}
if (!result)
{
- maybe_signal_simple_error ("Unrecognized color", make_string (name, len),
- Qcolor, errb);
+ maybe_signal_simple_error ("Unrecognized color", name, Qcolor, errb);
return 0;
}
result = allocate_nearest_color (dpy, cmap, visual, color);
if (!result)
{
- maybe_signal_simple_error ("Couldn't allocate color",
- make_string (name, len), Qcolor, errb);
+ maybe_signal_simple_error ("Couldn't allocate color", name, Qcolor,
+ errb);
return 0;
}
XColor color;
int result;
- result = x_parse_nearest_color (XDEVICE (device), &color,
- XSTRING_DATA (name),
- XSTRING_LENGTH (name),
- errb);
+ result = x_parse_nearest_color (XDEVICE (device), &color, name, errb);
if (!result)
return 0;
Lisp_Object printcharfun,
int escapeflag)
{
- char buf[100];
+ Bufbyte buf[100];
XColor color = COLOR_INSTANCE_X_COLOR (c);
sprintf (buf, " %ld=(%X,%X,%X)",
color.pixel, color.red, color.green, color.blue);
{
if (COLOR_INSTANCE_X_DEALLOC (c))
{
- XFreeColors (DEVICE_X_DISPLAY (XDEVICE (c->device)), DEVICE_X_COLORMAP (XDEVICE (c->device)),
+ XFreeColors (DEVICE_X_DISPLAY (XDEVICE (c->device)),
+ DEVICE_X_COLORMAP (XDEVICE (c->device)),
&COLOR_INSTANCE_X_COLOR (c).pixel, 1, 0);
}
}
XColor c;
Display *dpy = DEVICE_X_DISPLAY (d);
Colormap cmap = DEVICE_X_COLORMAP (d);
+ const Extbyte *extname;
- const char *extname;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, color, C_STRING_ALLOCA, extname, Qctext);
+ LISP_STRING_TO_EXTERNAL (color, extname, Qx_color_name_encoding);
return XParseColor (dpy, cmap, extname, &c);
}
{
Display *dpy = DEVICE_X_DISPLAY (XDEVICE (device));
XFontStruct *xf;
- const char *extname;
+ const Extbyte *extname;
- TO_EXTERNAL_FORMAT (LISP_STRING, f->name, C_STRING_ALLOCA, extname, Qctext);
+ LISP_STRING_TO_EXTERNAL (f->name, extname, Qx_font_name_encoding);
xf = XLoadQueryFont (dpy, extname);
if (!xf)
Lisp_Object printcharfun,
int escapeflag)
{
- char buf[200];
+ Bufbyte buf[200];
sprintf (buf, " 0x%lx", (unsigned long) FONT_INSTANCE_X_FONT (f)->fid);
write_c_string (buf, printcharfun);
}
"bitstream" fonts even if the bitstream fonts are earlier in the path, and
also picking 100dpi adobe fonts over 75dpi adobe fonts even though the
75dpi are in the path earlier) but sometimes appears to be doing something
- else entirely (for example, removing the bitsream fonts from the path will
+ else entirely (for example, removing the bitstream fonts from the path will
cause the 75dpi adobe fonts to be used instead of the 100dpi, even though
their relative positions in the path (and their names!) have not changed).
The documentation for XSetFontPath() seems to indicate that the order of
- entries in the font path means something, but it's pretty noncommital about
+ entries in the font path means something, but it's pretty noncommittal about
it, and the spirit of the law is apparently not being obeyed...
All the fonts I've seen have a property named `FONT' which contains the
that the various servers are actually doing, please let me know! -- jwz. */
static int
-valid_x_font_name_p (Display *dpy, char *name)
+valid_x_font_name_p (Display *dpy, Extbyte *name)
{
/* Maybe this should be implemented by calling XLoadFont and trapping
the error. That would be a lot of work, and wasteful as hell, but
might be more correct.
*/
int nnames = 0;
- char **names = 0;
+ SExtbyte **names = 0;
if (! name)
return 0;
names = XListFonts (dpy, name, 1, &nnames);
return (nnames != 0);
}
-static char *
+static Extbyte *
truename_via_FONT_prop (Display *dpy, XFontStruct *font)
{
unsigned long value = 0;
- char *result = 0;
+ Extbyte *result = 0;
if (XGetFontProperty (font, XA_FONT, &value))
result = XGetAtomName (dpy, value);
/* result is now 0, or the string value of the FONT property. */
return result; /* this must be freed by caller if non-0 */
}
-static char *
+static Extbyte *
truename_via_random_props (Display *dpy, XFontStruct *font)
{
struct device *d = get_device_from_display (dpy);
unsigned long value = 0;
- char *foundry, *family, *weight, *slant, *setwidth, *add_style;
+ Extbyte *foundry, *family, *weight, *slant, *setwidth, *add_style;
unsigned long pixel, point, res_x, res_y;
- char *spacing;
+ Extbyte *spacing;
unsigned long avg_width;
- char *registry, *encoding;
- char composed_name [2048];
+ Extbyte *registry, *encoding;
+ Extbyte composed_name [2048];
int ok = 0;
- char *result;
+ Extbyte *result;
#define get_string(atom,var) \
if (XGetFontProperty (font, (atom), &value)) \
if (ok)
{
int L = strlen (composed_name) + 1;
- result = (char *) xmalloc (L);
+ result = (Extbyte *) xmalloc (L);
strncpy (result, composed_name, L);
}
else
/* Unbounded, for sufficiently small values of infinity... */
#define MAX_FONT_COUNT 5000
-static char *
-truename_via_XListFonts (Display *dpy, char *font_name)
+static Extbyte *
+truename_via_XListFonts (Display *dpy, Extbyte *font_name)
{
- char *result = 0;
- char **names;
+ Extbyte *result = 0;
+ SExtbyte **names;
int count = 0;
#ifndef XOPENFONT_SORTS
/* But the world I live in is much more perverse. */
names = XListFonts (dpy, font_name, MAX_FONT_COUNT, &count);
while (count--)
+ /* !!#### Not Mule-friendly */
/* If names[count] is lexicographically less than result, use it.
(#### Should we be comparing case-insensitively?) */
if (result == 0 || (strcmp (result, names [count]) < 0))
}
static Lisp_Object
-x_font_truename (Display *dpy, char *name, XFontStruct *font)
+x_font_truename (Display *dpy, Extbyte *name, XFontStruct *font)
{
- char *truename_FONT = 0;
- char *truename_random = 0;
- char *truename = 0;
+ Extbyte *truename_FONT = 0;
+ Extbyte *truename_random = 0;
+ Extbyte *truename = 0;
/* The search order is:
- if FONT property exists, and is a valid name, return it.
if (truename)
{
- Lisp_Object result = build_string (truename);
+ Lisp_Object result = build_ext_string (truename, Qx_font_name_encoding);
XFree (truename);
return result;
}
if (NILP (FONT_INSTANCE_X_TRUENAME (f)))
{
Display *dpy = DEVICE_X_DISPLAY (d);
- char *name = (char *) XSTRING_DATA (f->name);
{
+ Extbyte *nameext;
+
+ LISP_STRING_TO_EXTERNAL (f->name, nameext, Qx_font_name_encoding);
FONT_INSTANCE_X_TRUENAME (f) =
- x_font_truename (dpy, name, FONT_INSTANCE_X_FONT (f));
+ x_font_truename (dpy, nameext, FONT_INSTANCE_X_FONT (f));
}
if (NILP (FONT_INSTANCE_X_TRUENAME (f)))
{
XSETFONT_INSTANCE (font_instance, f);
maybe_signal_simple_error ("Couldn't determine font truename",
- font_instance, Qfont, errb);
+ font_instance, Qfont, errb);
/* Ok, just this once, return the font name as the truename.
(This is only used by Fequal() right now.) */
return f->name;
props = FONT_INSTANCE_X_FONT (f)->properties;
for (i = FONT_INSTANCE_X_FONT (f)->n_properties - 1; i >= 0; i--)
{
- char *name_str = 0;
- char *val_str = 0;
Lisp_Object name, value;
Atom atom = props [i].name;
- name_str = XGetAtomName (dpy, atom);
+ Bufbyte *name_str = 0;
+ Extbyte *namestrext = XGetAtomName (dpy, atom);
+
+ if (namestrext)
+ EXTERNAL_TO_C_STRING (namestrext, name_str, Qx_atom_name_encoding);
+
name = (name_str ? intern (name_str) : Qnil);
if (name_str &&
(atom == XA_FONT ||
!strcmp (name_str, "RELATIVE_WEIGHT") ||
!strcmp (name_str, "STYLE")))
{
- val_str = XGetAtomName (dpy, props [i].card32);
- value = (val_str ? build_string (val_str) : Qnil);
+ Extbyte *val_str = XGetAtomName (dpy, props [i].card32);
+
+ value = (val_str ? build_ext_string (val_str, Qx_atom_name_encoding)
+ : Qnil);
}
else
value = make_int (props [i].card32);
- if (name_str) XFree (name_str);
+ if (namestrext) XFree (namestrext);
result = Fcons (Fcons (name, value), result);
}
return result;
static Lisp_Object
x_list_fonts (Lisp_Object pattern, Lisp_Object device)
{
- char **names;
+ SExtbyte **names;
int count = 0;
Lisp_Object result = Qnil;
- const char *patternext;
+ const Extbyte *patternext;
- TO_EXTERNAL_FORMAT (LISP_STRING, pattern,
- C_STRING_ALLOCA, patternext,
- Qbinary);
+ LISP_STRING_TO_EXTERNAL (pattern, patternext, Qx_font_name_encoding);
names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
patternext, MAX_FONT_COUNT, &count);
while (count--)
- result = Fcons (build_ext_string (names [count], Qbinary), result);
+ result = Fcons (build_ext_string (names[count], Qx_font_name_encoding),
+ result);
if (names)
XFreeFontNames (names);
return result;
static Lisp_Object
x_find_charset_font (Lisp_Object device, Lisp_Object font, Lisp_Object charset)
{
- char **names;
+ SExtbyte **names;
int count = 0;
Lisp_Object result = Qnil;
- const char *patternext;
+ const Extbyte *patternext;
int i;
- TO_EXTERNAL_FORMAT (LISP_STRING, font,
- C_STRING_ALLOCA, patternext,
- Qbinary);
+ LISP_STRING_TO_EXTERNAL (font, patternext, Qx_font_name_encoding);
names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
patternext, MAX_FONT_COUNT, &count);
/* #### This code seems awfully bogus -- mrb */
for (i = 0; i < count; i ++)
{
- const char *intname;
+ const Bufbyte *intname;
- TO_INTERNAL_FORMAT (C_STRING, names[i],
- C_STRING_ALLOCA, intname,
- Qbinary);
+ EXTERNAL_TO_C_STRING (names[i], intname, Qx_font_name_encoding);
if (x_font_spec_matches_charset (XDEVICE (device), charset,
- (Bufbyte *) intname, Qnil, 0, -1))
+ intname, Qnil, 0, -1))
{
result = build_string (intname);
break;
/* Synched up with: Not in FSF. */
+/* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-10-00. */
+
#ifndef INCLUDED_objects_x_h_
#define INCLUDED_objects_x_h_
#define COLOR_INSTANCE_X_COLOR(c) (X_COLOR_INSTANCE_DATA (c)->color)
#define COLOR_INSTANCE_X_DEALLOC(c) (X_COLOR_INSTANCE_DATA (c)->dealloc_on_gc)
-int allocate_nearest_color (Display *display, Colormap screen_colormap, Visual *visual,
- XColor *color_def);
-int x_parse_nearest_color (struct device *d, XColor *color, Bufbyte *name,
- Bytecount len, Error_behavior errb);
+int allocate_nearest_color (Display *display, Colormap screen_colormap,
+ Visual *visual, XColor *color_def);
/*****************************************************************************
Font-Instance
finalose (void *ptr)
{
Lisp_Object obj;
- XSETOBJ (obj, Lisp_Type_Record, ptr);
+ XSETOBJ (obj, ptr);
signal_simple_error
("Can't dump an emacs containing window system objects", obj);
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef INCLUDED_offix_h_
-#define INCLUDED_offix_h_
+#ifndef __DragAndDropH__
+#define __DragAndDropH__ 1L
/* The standard DND types are defined here */
#include "offix-types.h"
int width,int height,
char *image,char *mask,
int hot_x,int hot_y);
-
-#endif /* INCLUDED_offix_h_ */
+#endif
/* The subroutine object for external-debugging-output is kept here
for the convenience of the debugger. */
-Lisp_Object Qexternal_debugging_output;
+Lisp_Object Qexternal_debugging_output, Qalternate_debugging_output;
+
+#ifdef HAVE_MS_WINDOWS
+Lisp_Object Qmswindows_debugging_output;
+#endif
/* Avoid actual stack overflow in print. */
static int print_depth;
int stdout_needs_newline;
-#ifdef WIN32_NATIVE
-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 WIN32_NATIVE
- if (!no_useful_stderr)
- no_useful_stderr = GetStdHandle (STD_ERROR_HANDLE) == 0 ? 1 : -1;
+ HANDLE errhand = GetStdHandle (STD_INPUT_HANDLE);
+ int no_useful_stderr = errhand == 0 || errhand == INVALID_HANDLE_VALUE;
+ if (!no_useful_stderr)
+ no_useful_stderr = !PeekNamedPipe (errhand, 0, 0, 0, 0, 0);
/* we typically have no useful stdout/stderr under windows if we're
being invoked graphically. */
- if (!noninteractive || no_useful_stderr > 0)
+ if (no_useful_stderr)
mswindows_output_console_string (extptr, extlen);
else
#endif
extptr = (Extbyte *) kludge;
extlen = (Extcount) strlen ((char *) kludge);
}
-
+
std_handle_out_external (stream, Qnil, extptr, extlen, 1, 1);
return retval;
}
the flag print-gensym is non-nil, prefix it with #n= to read the
object back with the #n# reader syntax later if needed. */
if (!NILP (Vprint_gensym)
- /* #### Test whether this produces a noticable slow-down for
+ /* #### Test whether this produces a noticeable slow-down for
printing when print-gensym is non-nil. */
&& !EQ (obj, oblookup (Vobarray,
string_data (symbol_name (XSYMBOL (obj))),
UNGCPRO;
}
\f
-/* #ifdef DEBUG_XEMACS */
-/* I don't like seeing `Note: Strange doc (not fboundp) for function
- alternate-debugging-output @ 429542' -slb */
-/* #### Eek! Any clue how to get rid of it? In fact, how about
- getting rid of this function altogether? Does anything actually
- *use* it? --hniksic */
+/* Useful on systems or in places where writing to stdout is unavailable or
+ not working. */
static int alternate_do_pointer;
static char alternate_do_string[5000];
alternate_do_string[alternate_do_pointer] = 0;
return character;
}
-/* #endif / * DEBUG_XEMACS */
DEFUN ("external-debugging-output", Fexternal_debugging_output, 1, 3, 0, /*
Write CHAR-OR-STRING to stderr or stdout.
Vprint_level = make_int (debug_print_level);
print_internal (debug_print_obj, Qexternal_debugging_output, 1);
+ alternate_do_pointer = 0;
+ print_internal (debug_print_obj, Qalternate_debugging_output, 1);
+#ifdef WIN32_NATIVE
+ /* Write out to the debugger, as well */
+ print_internal (debug_print_obj, Qmswindows_debugging_output, 1);
+#endif
Vinhibit_quit = save_Vinhibit_quit;
Vprint_level = save_Vprint_level;
DEFSUBR (Fexternal_debugging_output);
DEFSUBR (Fopen_termscript);
defsymbol (&Qexternal_debugging_output, "external-debugging-output");
+ defsymbol (&Qalternate_debugging_output, "alternate-debugging-output");
+#ifdef HAVE_MS_WINDOWS
+ defsymbol (&Qmswindows_debugging_output, "mswindows-debugging-output");
+#endif
DEFSUBR (Fwith_output_to_temp_buffer);
}
#include <winsock.h>
#endif
+/* Bound by win32-native.el */
+Lisp_Object Qmswindows_construct_process_command_line;
+
/* Arbitrary size limit for code fragments passed to run_in_other_process */
#define FRAGMENT_CODE_SIZE 32
/* ---------------------------- the 95 way ------------------------------- */
static BOOL CALLBACK
-find_child_console (HWND hwnd, struct nt_process_data *cp)
+find_child_console (HWND hwnd, long putada)
{
DWORD thread_id;
DWORD process_id;
+ struct nt_process_data *cp = (struct nt_process_data *) putada;
thread_id = GetWindowThreadProcessId (hwnd, &process_id);
if (process_id == cp->dwProcessId)
static int
send_signal (struct nt_process_data *cp, int pid, int signo)
{
- return send_signal_the_nt_way (cp, pid, signo)
+ return (!mswindows_windows9x_p () && send_signal_the_nt_way (cp, pid, signo))
|| send_signal_the_95_way (cp, pid, signo);
}
if (signo != SIGKILL && signo != SIGTERM
&& signo != SIGQUIT && signo != SIGINT
&& signo != SIGHUP)
- signal_simple_error ("Signal number not supported", make_int (signo));
+ invalid_argument ("Signal number not supported", make_int (signo));
}
\f
/*-----------------------------------------------------------------------*/
signal_cannot_launch (Lisp_Object image_file, DWORD err)
{
mswindows_set_errno (err);
- signal_simple_error_2 ("Error starting", image_file, lisp_strerror (errno));
+ report_file_error ("Error starting", image_file);
}
static void
already does this. */
/* Find out whether the application is windowed or not */
- {
- /* SHGetFileInfo tends to return ERROR_FILE_NOT_FOUND on most
- errors. This leads to bogus error message. */
- DWORD image_type;
- char *p = strrchr ((char *)XSTRING_DATA (program), '.');
- if (p != NULL &&
- (stricmp (p, ".exe") == 0 ||
- stricmp (p, ".com") == 0 ||
- stricmp (p, ".bat") == 0 ||
- stricmp (p, ".cmd") == 0))
- {
- image_type = SHGetFileInfo ((char *)XSTRING_DATA (program), 0,NULL,
- 0, SHGFI_EXETYPE);
- }
- else
- {
- char progname[MAX_PATH];
- sprintf (progname, "%s.exe", (char *)XSTRING_DATA (program));
- image_type = SHGetFileInfo (progname, 0, NULL, 0, SHGFI_EXETYPE);
- }
- if (image_type == 0)
- signal_cannot_launch (program, (GetLastError () == ERROR_FILE_NOT_FOUND
- ? ERROR_BAD_FORMAT : GetLastError ()));
- windowed = HIWORD (image_type) != 0;
- }
+ if (xSHGetFileInfoA)
+ {
+ /* SHGetFileInfo tends to return ERROR_FILE_NOT_FOUND on most
+ errors. This leads to bogus error message. */
+ DWORD image_type;
+ char *p = strrchr ((char *)XSTRING_DATA (program), '.');
+ if (p != NULL &&
+ (stricmp (p, ".exe") == 0 ||
+ stricmp (p, ".com") == 0 ||
+ stricmp (p, ".bat") == 0 ||
+ stricmp (p, ".cmd") == 0))
+ {
+ image_type = xSHGetFileInfoA ((char *)XSTRING_DATA (program), 0,NULL,
+ 0, SHGFI_EXETYPE);
+ }
+ else
+ {
+ char progname[MAX_PATH];
+ sprintf (progname, "%s.exe", (char *)XSTRING_DATA (program));
+ image_type = xSHGetFileInfoA (progname, 0, NULL, 0, SHGFI_EXETYPE);
+ }
+ if (image_type == 0)
+ signal_cannot_launch (program, (GetLastError () == ERROR_FILE_NOT_FOUND
+ ? ERROR_BAD_FORMAT : GetLastError ()));
+ windowed = HIWORD (image_type) != 0;
+ }
+ else /* NT 3.5; we have no idea so just guess. */
+ windowed = 0;
/* Decide whether to do I/O on process handles, or just mark the
process exited immediately upon successful launching. We do I/O if the
hmyslurp = htmp;
}
- /* Convert an argv vector into Win32 style command line. */
+ /* Convert an argv vector into Win32 style command line by a call to
+ lisp function `mswindows-construct-process-command-line'
+ (in win32-native.el) */
{
int i;
- Bufbyte **quoted_args;
- int is_dos_app, is_cygnus_app;
- int is_command_shell;
- 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);
+ Lisp_Object args_or_ret = Qnil;
+ struct gcpro gcpro1;
- {
- /* #### Bleeeeeeeeeeeeeeeeech!!!! The command shells appear to
- use '^' as a quote character, at least under NT. #### I haven't
- tested 95. If it allows no quoting conventions at all, set
- escape_char to 0 and the code below will work. (e.g. NT tolerates
- no quoting -- this command
-
- cmd /c "ls "/Program Files""
-
- actually works.) */
-
- struct gcpro gcpro1, gcpro2;
- Lisp_Object progname = Qnil;
-
- GCPRO2 (program, progname);
- progname = Ffile_name_nondirectory (program);
- progname = Fdowncase (progname, Qnil);
-
- is_command_shell =
- internal_equal (progname, build_string ("command.com"), 0)
- || internal_equal (progname, build_string ("cmd.exe"), 0);
- UNGCPRO;
- }
-
-#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_command_shell ? '^' : 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 */
- if (escape_char)
- 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 (escape_char && *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);
- }
+ GCPRO1 (args_or_ret);
for (i = 0; i < nargv; ++i)
- {
- 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 = Fcons (*argv++, args_or_ret);
+ args_or_ret = Fnreverse (args_or_ret);
+ args_or_ret = Fcons (program, 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 (escape_char && *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 (escape_char && *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';
- }
+ args_or_ret = call1 (Qmswindows_construct_process_command_line,
+ args_or_ret);
- {
- int total_cmdline_len = 0;
- Extcount *extargcount = (Extcount *) alloca_array (Extcount, nargv);
- Extbyte **extarg = (Extbyte **) alloca_array (Extbyte *, nargv);
- Extbyte *command_ptr;
+ if (!STRINGP (args_or_ret))
+ /* Luser wrote his/her own clever version */
+ invalid_argument
+ ("Bogus return value from `mswindows-construct-process-command-line'",
+ 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;
- }
+ LISP_STRING_TO_EXTERNAL (args_or_ret, command_line, Qmswindows_tstr);
- 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;
- }
+ UNGCPRO; /* args_or_ret */
}
+
/* Set `proc_env' to a nul-separated array of the strings in
Vprocess_environment terminated by 2 nuls. */
}
*penv = 0;
}
+
+#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
/* Create process */
{
p->tick++;
process_tick++;
deactivate_process (*((Lisp_Object *) (&vol_proc)));
- error ("Broken pipe error sending to process %s; closed it",
- XSTRING_DATA (p->name));
+ invalid_operation ("Broken pipe error sending to process; closed it",
+ p->name);
}
{
/* Send signal */
if (!send_signal (NT_DATA (p), 0, signo))
- signal_simple_error ("Cannot send signal to process", proc);
+ invalid_operation ("Cannot send signal to process", proc);
}
/*
CHECK_STRING (host);
if (!EQ (protocol, Qtcp))
- signal_simple_error ("Unsupported protocol", protocol);
+ invalid_argument ("Unsupported protocol", protocol);
if (INTP (service))
port = htons ((unsigned short) XINT (service));
CHECK_STRING (service);
svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp");
if (svc_info == 0)
- signal_simple_error ("Unknown service", service);
+ invalid_argument ("Unknown service", service);
port = svc_info->s_port;
}
void
syms_of_process_nt (void)
{
+ DEFSYMBOL (Qmswindows_construct_process_command_line);
}
void
#include "systty.h"
#include "syswait.h"
+#ifdef HPUX
+#include <grp.h> /* See grantpt fixups for HPUX below. */
+#endif
/*
* Implementation-specific data. Pointed to by Lisp_Process->process_data
#define UNIX_DATA(p) ((struct unix_process_data*)((p)->process_data))
-#ifdef HAVE_PTYS
-/* The file name of the pty opened by allocate_pty. */
-
-static char pty_name[24];
-#endif
-
\f
/**********************************************************************/
/* This function used to be visible on the Lisp level, but there is no
real point in doing that. Here is the doc string:
- "Connect to an existing file descriptor.\n\
-Returns a subprocess-object to represent the connection.\n\
-Input and output work as for subprocesses; `delete-process' closes it.\n\
-Args are NAME BUFFER INFD OUTFD.\n\
-NAME is name for process. It is modified if necessary to make it unique.\n\
-BUFFER is the buffer (or buffer-name) to associate with the process.\n\
- Process output goes at end of that buffer, unless you specify\n\
- an output stream or filter function to handle the output.\n\
- BUFFER may be also nil, meaning that this process is not associated\n\
- with any buffer\n\
-INFD and OUTFD specify the file descriptors to use for input and\n\
+ "Connect to an existing file descriptor.
+Return a subprocess-object to represent the connection.
+Input and output work as for subprocesses; `delete-process' closes it.
+Args are NAME BUFFER INFD OUTFD.
+NAME is name for process. It is modified if necessary to make it unique.
+BUFFER is the buffer (or buffer-name) to associate with the process.
+ Process output goes at end of that buffer, unless you specify
+ an output stream or filter function to handle the output.
+ BUFFER may also be nil, meaning that this process is not associated
+ with any buffer.
+INFD and OUTFD specify the file descriptors to use for input and
output, respectively."
*/
CHECK_INT (outfd);
inch = XINT (infd);
- if (get_process_from_usid (FD_TO_USID(inch)))
- error ("There is already a process connected to fd %d", inch);
+ if (get_process_from_usid (FD_TO_USID (inch)))
+ invalid_operation ("There is already a process connected to fd", infd);
if (!NILP (buffer))
buffer = Fget_buffer_create (buffer);
proc = make_process_internal (name);
XPROCESS (proc)->pid = Fcons (infd, name);
XPROCESS (proc)->buffer = buffer;
- init_process_io_handles (XPROCESS (proc), (void*)inch, (void*)XINT (outfd), 0);
+ init_process_io_handles (XPROCESS (proc), (void*)inch, (void*)XINT (outfd),
+ 0);
UNIX_DATA (XPROCESS (proc))->connected_via_filedesc_p = 1;
event_stream_select_process (XPROCESS (proc));
}
#ifdef HAVE_PTYS
+static int allocate_pty_the_old_fashioned_way (void);
+
+/* The file name of the (slave) pty opened by allocate_pty(). */
+#ifndef MAX_PTYNAME_LEN
+#define MAX_PTYNAME_LEN 64
+#endif
+static char pty_name[MAX_PTYNAME_LEN];
/* Open an available pty, returning a file descriptor.
Return -1 on failure.
The file name of the terminal corresponding to the pty
- is left in the variable pty_name. */
+ is left in the variable `pty_name'. */
static int
allocate_pty (void)
{
-#ifndef PTY_OPEN
+ /* Unix98 standardized grantpt, unlockpt, and ptsname, but not the
+ functions required to open a master pty in the first place :-(
+
+ Modern Unix systems all seems to have convenience methods to open
+ a master pty fd in one function call, but there is little
+ agreement on how to do it.
+
+ allocate_pty() tries all the different known easy ways of opening
+ a pty. In case of failure, we resort to the old BSD-style pty
+ grovelling code in allocate_pty_the_old_fashioned_way(). */
+ int master_fd = -1;
+ const char *slave_name = NULL;
+ const char *clone = NULL;
+ static const char * const clones[] = /* Different pty master clone devices */
+ {
+ "/dev/ptmx", /* Various systems */
+ "/dev/ptm/clone", /* HPUX */
+ "/dev/ptc", /* AIX */
+ "/dev/ptmx_bsd" /* Tru64 */
+ };
+
+#ifdef HAVE_GETPT /* glibc */
+ master_fd = getpt ();
+ if (master_fd >= 0)
+ goto have_master;
+#endif /* HAVE_GETPT */
+
+
+#if defined(HAVE_OPENPTY) /* BSD, Tru64, glibc */
+ {
+ int slave_fd = -1;
+ int rc;
+ EMACS_BLOCK_SIGNAL (SIGCHLD);
+ rc = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
+ EMACS_UNBLOCK_SIGNAL (SIGCHLD);
+ if (rc == 0)
+ {
+ slave_name = ttyname (slave_fd);
+ close (slave_fd);
+ goto have_slave_name;
+ }
+ else
+ {
+ if (master_fd >= 0)
+ close (master_fd);
+ if (slave_fd >= 0)
+ close (slave_fd);
+ }
+ }
+#endif /* HAVE_OPENPTY */
+
+#if defined(HAVE__GETPTY) && defined (O_NDELAY) /* SGI */
+ master_fd = -1;
+ EMACS_BLOCK_SIGNAL (SIGCHLD);
+ slave_name = _getpty (&master_fd, O_RDWR | O_NDELAY, 0600, 0);
+ EMACS_UNBLOCK_SIGNAL (SIGCHLD);
+ if (master_fd >= 0 && slave_name != NULL)
+ goto have_slave_name;
+#endif /* HAVE__GETPTY */
+
+ /* Master clone devices are available on most systems */
+ {
+ int i;
+ for (i = 0; i < countof (clones); i++)
+ {
+ clone = clones[i];
+ master_fd = open (clone, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0);
+ if (master_fd >= 0)
+ goto have_master;
+ }
+ clone = NULL;
+ }
+
+ goto lose;
+
+ have_master:
+
+#if defined (HAVE_PTSNAME)
+ slave_name = ptsname (master_fd);
+ if (slave_name)
+ goto have_slave_name;
+#endif
+
+ /* AIX docs say to use ttyname, not ptsname, to get slave_name */
+ if (clone
+ && !strcmp (clone, "/dev/ptc")
+ && (slave_name = ttyname (master_fd)) != NULL)
+ goto have_slave_name;
+
+ goto lose;
+
+ have_slave_name:
+ strncpy (pty_name, slave_name, sizeof (pty_name));
+ pty_name[sizeof (pty_name) - 1] = '\0';
+ setup_pty (master_fd);
+
+ /* We jump through some hoops to frob the pty.
+ It's not obvious that checking the return code here is useful. */
+
+ /* "The grantpt() function will fail if it is unable to successfully
+ invoke the setuid root program. It may also fail if the
+ application has installed a signal handler to catch SIGCHLD
+ signals." */
+#if defined (HAVE_GRANTPT) || defined (HAVE_UNLOCKPT)
+ EMACS_BLOCK_SIGNAL (SIGCHLD);
+
+#if defined (HAVE_GRANTPT)
+ grantpt (master_fd);
+#ifdef HPUX
+ /* grantpt() behavior on some versions of HP-UX differs from what's
+ specified in the man page: the group of the slave PTY is set to
+ the user's primary group, and we fix that. */
+ {
+ struct group *tty_group = getgrnam ("tty");
+ if (tty_group != NULL)
+ chown (pty_name, (uid_t) -1, tty_group->gr_gid);
+ }
+#endif /* HPUX has broken grantpt() */
+#endif /* HAVE_GRANTPT */
+
+#if defined (HAVE_UNLOCKPT)
+ unlockpt (master_fd);
+#endif
+
+ EMACS_UNBLOCK_SIGNAL (SIGCHLD);
+#endif /* HAVE_GRANTPT || HAVE_UNLOCKPT */
+
+ return master_fd;
+
+ lose:
+ if (master_fd >= 0)
+ close (master_fd);
+ return allocate_pty_the_old_fashioned_way ();
+}
+
+/* This function tries to allocate a pty by iterating through file
+ pairs with names like /dev/ptyp1 and /dev/ttyp1. */
+static int
+allocate_pty_the_old_fashioned_way (void)
+{
struct stat stb;
/* Some systems name their pseudoterminals so that there are gaps in
three failures in a row before deciding that we've reached the
end of the ptys. */
int failed_count = 0;
-#endif
int fd;
-#ifndef HAVE_GETPT
int i;
int c;
-#endif
#ifdef PTY_ITERATION
PTY_ITERATION
#else
+# ifndef FIRST_PTY_LETTER
+# define FIRST_PTY_LETTER 'p'
+# endif
for (c = FIRST_PTY_LETTER; c <= 'z'; c++)
for (i = 0; i < 16; i++)
-#endif
+#endif /* PTY_ITERATION */
+
{
#ifdef PTY_NAME_SPRINTF
PTY_NAME_SPRINTF
sprintf (pty_name, "/dev/pty%c%x", c, i);
#endif /* no PTY_NAME_SPRINTF */
-#ifdef PTY_OPEN
- PTY_OPEN;
-#else /* no PTY_OPEN */
-#ifdef IRIS
- /* Unusual IRIS code */
- *ptyv = open ("/dev/ptc", O_RDWR | O_NONBLOCK | OPEN_BINARY, 0);
- if (fd < 0)
- return -1;
- if (fstat (fd, &stb) < 0)
- return -1;
-#else /* not IRIS */
- if (stat (pty_name, &stb) < 0)
+ if (xemacs_stat (pty_name, &stb) < 0)
{
- failed_count++;
- if (failed_count >= 3)
+ if (++failed_count >= 3)
return -1;
}
else
failed_count = 0;
fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0);
-#endif /* not IRIS */
-#endif /* no PTY_OPEN */
if (fd >= 0)
{
- /* check to make certain that both sides are available
- this avoids a nasty yet stupid bug in rlogins */
#ifdef PTY_TTY_NAME_SPRINTF
PTY_TTY_NAME_SPRINTF
#else
sprintf (pty_name, "/dev/tty%c%x", c, i);
#endif /* no PTY_TTY_NAME_SPRINTF */
-#if !defined(UNIPLUS) && !defined(HAVE_GETPT)
- if (access (pty_name, 6) != 0)
+ if (access (pty_name, R_OK | W_OK) == 0)
{
- close (fd);
-#if !defined(IRIS) && !defined(__sgi)
- continue;
-#else
- return -1;
-#endif /* IRIS */
+ setup_pty (fd);
+ return fd;
}
-#endif /* not UNIPLUS */
- setup_pty (fd);
- return fd;
+ close (fd);
}
- }
+ } /* iteration */
return -1;
}
#endif /* HAVE_PTYS */
process_signal_char (int tty_fd, int signo)
{
/* If it's not a tty, pray that these default values work */
- if (!isatty(tty_fd)) {
+ if (! isatty (tty_fd)) {
#define CNTL(ch) (037 & (ch))
switch (signo)
{
- case SIGINT: return CNTL('C');
- case SIGQUIT: return CNTL('\\');
+ case SIGINT: return CNTL ('C');
+ case SIGQUIT: return CNTL ('\\');
#ifdef SIGTSTP
- case SIGTSTP: return CNTL('Z');
+ case SIGTSTP: return CNTL ('Z');
#endif
}
}
* Initialize any process local data. This is called when newly
* created process is connected to real OS file handles. The
* handles are generally represented by void* type, but are
- * of type int (file descriptors) for UNIX
+ * of type int (file descriptors) for UNIX.
*/
static void
Lisp_Object *argv, int nargv,
Lisp_Object program, Lisp_Object cur_dir)
{
- /* This function rewritten by ben@xemacs.org. */
-
int pid;
int inchannel = -1;
int outchannel = -1;
int xforkin = forkin;
int xforkout = forkout;
- if (!pty_flag)
- EMACS_SEPARATE_PROCESS_GROUP ();
-#ifdef HAVE_PTYS
- else
- {
- /* Disconnect the current controlling terminal, pursuant to
- making the pty be the controlling terminal of the process.
- Also put us in our own process group. */
+ /* Disconnect the current controlling terminal, pursuant to
+ making the pty be the controlling terminal of the process.
+ Also put us in our own process group. */
- disconnect_controlling_terminal ();
+ disconnect_controlling_terminal ();
+#ifdef HAVE_PTYS
+ if (pty_flag)
+ {
/* Open the pty connection and make the pty's terminal
our controlling terminal.
Must be done before using tc* functions on xforkin.
This guarantees that isatty(xforkin) is true. */
-# ifdef SETUP_SLAVE_PTY
- SETUP_SLAVE_PTY;
-# endif /* SETUP_SLAVE_PTY */
+# if defined (HAVE_ISASTREAM) && defined (I_PUSH)
+ if (isastream (xforkin))
+ {
+# if defined (I_FIND)
+# define stream_module_pushed(fd, module) (ioctl (fd, I_FIND, module) == 1)
+# else
+# define stream_module_pushed(fd, module) 0
+# endif
+ if (! stream_module_pushed (xforkin, "ptem"))
+ ioctl (xforkin, I_PUSH, "ptem");
+ if (! stream_module_pushed (xforkin, "ldterm"))
+ ioctl (xforkin, I_PUSH, "ldterm");
+ if (! stream_module_pushed (xforkin, "ttcompat"))
+ ioctl (xforkin, I_PUSH, "ttcompat");
+ }
+# endif /* HAVE_ISASTREAM */
# ifdef TIOCSCTTY
/* We ignore the return value
of our new controlling terminal. */
{
- int piddly = EMACS_GET_PROCESS_GROUP ();
+ pid_t piddly = EMACS_GET_PROCESS_GROUP ();
EMACS_SET_TTY_PROCESS_GROUP (xforkin, &piddly);
}
}
new_argv[i + 1] = 0;
- TO_EXTERNAL_FORMAT (LISP_STRING, cur_dir,
- C_STRING_ALLOCA, current_dir,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (cur_dir, current_dir, Qfile_name);
child_setup (xforkin, xforkout, xforkout, new_argv, current_dir);
}
if (pid < 0)
{
+ int save_errno = errno;
close_descriptor_pair (forkin, forkout);
+ errno = save_errno;
report_file_error ("Doing fork", Qnil);
}
/* #### JV: layering violation?
- This function knows too much about the relation between the encodingstream
- (DATA_OUTSTREAM) and te actual output stream p->output_stream.
+ This function knows too much about the relation between the encoding
+ stream (DATA_OUTSTREAM) and the actual output stream p->output_stream.
If encoding streams properly forwarded all calls, we could simply
use DATA_OUTSTREAM everywhere. */
-
+
if (!SETJMP (send_process_frame))
{
/* use a reasonable-sized buffer (somewhere around the size of the
p->tick++;
process_tick++;
deactivate_process (*((Lisp_Object *) (&vol_proc)));
- error ("SIGPIPE raised on process %s; closed it",
- XSTRING_DATA (p->name));
+ invalid_operation ("SIGPIPE raised on process; closed it", p->name);
}
old_sigpipe = (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap);
return usid;
}
-/* send a signal number SIGNO to PROCESS.
+/* If the subtty field of the process data is not filled in, do so now. */
+static void
+try_to_initialize_subtty (struct unix_process_data *upd)
+{
+ if (upd->pty_flag
+ && (upd->subtty = -1 || ! isatty (upd->subtty))
+ && STRINGP (upd->tty_name))
+ upd->subtty = open (XSTRING_DATA (upd->tty_name), O_RDWR, 0);
+}
+
+/* Send signal number SIGNO to PROCESS.
CURRENT_GROUP means send to the process group that currently owns
the terminal being used to communicate with PROCESS.
This is used for various commands in shell mode.
If we can, we try to signal PROCESS by sending control characters
down the pty. This allows us to signal inferiors who have changed
- their uid, for which killpg would return an EPERM error.
+ their uid, for which killpg would return an EPERM error,
+ or processes running on other machines via remote login.
- The method signals an error if the given SIGNO is not valid
-*/
+ The method signals an error if the given SIGNO is not valid. */
static void
unix_kill_child_process (Lisp_Object proc, int signo,
int current_group, int nomsg)
{
- int gid;
- int no_pgrp = 0;
- int kill_retval;
+ pid_t pgid = -1;
Lisp_Process *p = XPROCESS (proc);
-
- if (!UNIX_DATA(p)->pty_flag)
- current_group = 0;
-
- /* If we are using pgrps, get a pgrp number and make it negative. */
- if (current_group)
- {
-#ifdef SIGNALS_VIA_CHARACTERS
- /* If possible, send signals to the entire pgrp
- by sending an input character to it. */
- {
- char sigchar = process_signal_char(UNIX_DATA(p)->subtty, signo);
- if (sigchar) {
- send_process (proc, Qnil, (Bufbyte *) &sigchar, 0, 1);
- return;
- }
- }
-#endif /* ! defined (SIGNALS_VIA_CHARACTERS) */
-
-#ifdef TIOCGPGRP
- /* Get the pgrp using the tty itself, if we have that.
- Otherwise, use the pty to get the pgrp.
- On pfa systems, saka@pfu.fujitsu.co.JP writes:
- "TIOCGPGRP symbol defined in sys/ioctl.h at E50.
- But, TIOCGPGRP does not work on E50 ;-P works fine on E60"
- His patch indicates that if TIOCGPGRP returns an error, then
- we should just assume that p->pid is also the process group id. */
- {
- int err;
-
- err = ioctl ( (UNIX_DATA(p)->subtty != -1
- ? UNIX_DATA(p)->subtty
- : UNIX_DATA(p)->infd), TIOCGPGRP, &gid);
-
-#ifdef pfa
- if (err == -1)
- gid = - XINT (p->pid);
-#endif /* ! defined (pfa) */
- }
- if (gid == -1)
- no_pgrp = 1;
- else
- gid = - gid;
-#else /* ! defined (TIOCGPGRP ) */
- /* Can't select pgrps on this system, so we know that
- the child itself heads the pgrp. */
- gid = - XINT (p->pid);
-#endif /* ! defined (TIOCGPGRP ) */
- }
- else
- gid = - XINT (p->pid);
+ struct unix_process_data *d = UNIX_DATA (p);
switch (signo)
{
case SIGINT:
case SIGQUIT:
case SIGKILL:
- flush_pending_output (UNIX_DATA(p)->infd);
+ flush_pending_output (d->infd);
break;
}
- /* If we don't have process groups, send the signal to the immediate
- subprocess. That isn't really right, but it's better than any
- obvious alternative. */
- if (no_pgrp)
- {
- kill_retval = kill (XINT (p->pid), signo) ? errno : 0;
- }
- else
+ if (! d->pty_flag)
+ current_group = 0;
+
+ /* If current_group is true, we want to send a signal to the
+ foreground process group of the terminal our child process is
+ running on. You would think that would be easy.
+
+ The BSD people invented the TIOCPGRP ioctl to get the foreground
+ process group of a tty. That, combined with killpg, gives us
+ what we want.
+
+ However, the POSIX standards people, in their infinite wisdom,
+ have seen fit to only allow this for processes which have the
+ terminal as controlling terminal, which doesn't apply to us.
+
+ Sooo..., we have to do something non-standard. The ioctls
+ TIOCSIGNAL, TIOCSIG, and TIOCSIGSEND send the signal directly on
+ many systems. POSIX tcgetpgrp(), since it is *documented* as not
+ doing what we want, is actually less likely to work than the BSD
+ ioctl TIOCGPGRP it is supposed to obsolete. Sometimes we have to
+ use TIOCGPGRP on the master end, sometimes the slave end
+ (probably an AIX bug). So we better get a fd for the slave if we
+ haven't got it yet. On some systems none of these work, so then
+ we just fall back to the non-current_group behavior and kill the
+ process group of the child. */
+ if (current_group)
{
- /* gid may be a pid, or minus a pgrp's number */
-#if defined (TIOCSIGNAL) || defined (TIOCSIGSEND)
- if (current_group)
+ try_to_initialize_subtty (d);
+
+#ifdef SIGNALS_VIA_CHARACTERS
+ /* If possible, send signals to the entire pgrp
+ by sending an input character to it. */
+ {
+ char sigchar = process_signal_char (d->subtty, signo);
+ if (sigchar)
+ {
+ send_process (proc, Qnil, (Bufbyte *) &sigchar, 0, 1);
+ return;
+ }
+ }
+#endif /* SIGNALS_VIA_CHARACTERS */
+
+#ifdef TIOCGPGRP
+ if (pgid == -1)
+ ioctl (d->infd, TIOCGPGRP, &pgid); /* BSD */
+ if (pgid == -1 && d->subtty != -1)
+ ioctl (d->subtty, TIOCGPGRP, &pgid); /* Only this works on AIX! */
+#endif /* TIOCGPGRP */
+
+ if (pgid == -1)
{
-#ifdef TIOCSIGNAL
- kill_retval = ioctl (UNIX_DATA(p)->infd, TIOCSIGNAL, signo);
-#else /* ! defined (TIOCSIGNAL) */
- kill_retval = ioctl (UNIX_DATA(p)->infd, TIOCSIGSEND, signo);
-#endif /* ! defined (TIOCSIGNAL) */
+ /* Many systems provide an ioctl to send a signal directly */
+#ifdef TIOCSIGNAL /* Solaris, HP-UX */
+ if (ioctl (d->infd, TIOCSIGNAL, signo) != -1)
+ return;
+#endif /* TIOCSIGNAL */
+
+#ifdef TIOCSIG /* BSD */
+ if (ioctl (d->infd, TIOCSIG, signo) != -1)
+ return;
+#endif /* TIOCSIG */
}
- else
- kill_retval = kill (- XINT (p->pid), signo) ? errno : 0;
-#else /* ! (defined (TIOCSIGNAL) || defined (TIOCSIGSEND)) */
- kill_retval = EMACS_KILLPG (-gid, signo) ? errno : 0;
-#endif /* ! (defined (TIOCSIGNAL) || defined (TIOCSIGSEND)) */
- }
-
- if (kill_retval < 0 && errno == EINVAL)
- error ("Signal number %d is invalid for this system", signo);
+ } /* current_group */
+
+ if (pgid == -1)
+ /* Either current_group is 0, or we failed to get the foreground
+ process group using the trickery above. So we fall back to
+ sending the signal to the process group of our child process.
+ Since this is often a shell that ignores signals like SIGINT,
+ the shell's subprocess is killed, which is the desired effect.
+ The process group of p->pid is always p->pid, since it was
+ created as a process group leader. */
+ pgid = XINT (p->pid);
+
+ /* Finally send the signal. */
+ if (EMACS_KILLPG (pgid, signo) == -1)
+ error ("kill (%ld, %ld) failed: %s",
+ (long) pgid, (long) signo, strerror (errno));
}
-/*
- * Kill any process in the system given its PID.
- *
- * Returns zero if a signal successfully sent, or
- * negative number upon failure
- */
+/* Send signal SIGCODE to any process in the system given its PID.
+ Return zero if successful, a negative number upon failure. */
static int
unix_kill_process_by_pid (int pid, int sigcode)
return kill (pid, sigcode);
}
-/*
- * Return TTY name used to communicate with subprocess
- */
+/* Return TTY name used to communicate with subprocess. */
static Lisp_Object
unix_get_tty_name (Lisp_Process *p)
return UNIX_DATA (p)->tty_name;
}
-/*
- * Canonicalize host name HOST, and return its canonical form
- *
- * The default implementation just takes HOST for a canonical name.
- */
+/* Canonicalize host name HOST, and return its canonical form.
+ The default implementation just takes HOST for a canonical name. */
#ifdef HAVE_SOCKETS
static Lisp_Object
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = 0;
- TO_EXTERNAL_FORMAT (LISP_STRING, host, C_STRING_ALLOCA, ext_host, Qnative);
+ LISP_STRING_TO_EXTERNAL (host, ext_host, Qnative);
retval = getaddrinfo (ext_host, NULL, &hints, &res);
if (retval != 0)
{
char *gai_error;
- TO_INTERNAL_FORMAT (C_STRING, gai_strerror (retval),
- C_STRING_ALLOCA, gai_error,
- Qnative);
+ EXTERNAL_TO_C_STRING (gai_strerror (retval), gai_error, Qnative);
maybe_error (Qprocess, ERROR_ME_NOT,
"%s \"%s\"", gai_error, XSTRING_DATA (host));
canonname = host;
#endif /* ! HAVE_GETADDRINFO */
}
-/* open a TCP network connection to a given HOST/SERVICE. Treated
- exactly like a normal process when reading and writing. Only
- differences are in status display and process deletion. A network
- connection has no PID; you cannot signal it. All you can do is
- deactivate and close it via delete-process */
+/* Open a TCP network connection to a given HOST/SERVICE.
+ Treated exactly like a normal process when reading and writing.
+ Only differences are in status display and process deletion.
+ A network connection has no PID; you cannot signal it. All you can
+ do is deactivate and close it via delete-process. */
static void
unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service,
CHECK_STRING (host);
if (!EQ (protocol, Qtcp) && !EQ (protocol, Qudp))
- error ("Unsupported protocol \"%s\"",
- string_data (symbol_name (XSYMBOL (protocol))));
+ invalid_argument ("Unsupported protocol", protocol);
{
#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO)
else
{
CHECK_STRING (service);
- TO_EXTERNAL_FORMAT (LISP_STRING, service,
- C_STRING_ALLOCA, portstring,
- Qnative);
+ LISP_STRING_TO_EXTERNAL (service, portstring, Qnative);
port = 0;
}
else /* EQ (protocol, Qudp) */
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = 0;
- TO_EXTERNAL_FORMAT (LISP_STRING, host, C_STRING_ALLOCA, ext_host, Qnative);
+ LISP_STRING_TO_EXTERNAL (host, ext_host, Qnative);
retval = getaddrinfo (ext_host, portstring, &hints, &res);
if (retval != 0)
{
char *gai_error;
- TO_INTERNAL_FORMAT (C_STRING, gai_strerror (retval),
- C_STRING_ALLOCA, gai_error,
- Qnative);
+ EXTERNAL_TO_C_STRING (gai_strerror (retval), gai_error, Qnative);
error ("%s/%s %s", XSTRING_DATA (host), portstring, gai_error);
}
svc_info = getservbyname ((char *) XSTRING_DATA (service), "udp");
if (svc_info == 0)
- error ("Unknown service \"%s\"", XSTRING_DATA (service));
+ invalid_argument ("Unknown service", service);
port = svc_info->s_port;
}
*/
static void
-unix_open_multicast_group (Lisp_Object name, Lisp_Object dest, Lisp_Object port,
- Lisp_Object ttl, void** vinfd, void** voutfd)
+unix_open_multicast_group (Lisp_Object name, Lisp_Object dest,
+ Lisp_Object port, Lisp_Object ttl, void** vinfd,
+ void** voutfd)
{
struct ip_mreq imr;
struct sockaddr_in sa;
thettl = (unsigned char) XINT (ttl);
if ((udp = getprotobyname ("udp")) == NULL)
- error ("No info available for UDP protocol");
+ type_error (Qinvalid_operation, "No info available for UDP protocol");
/* Init the sockets. Yes, I need 2 sockets. I couldn't duplicate one. */
if ((rs = socket (PF_INET, SOCK_DGRAM, udp->p_proto)) < 0)
}
else
{
- if (!NILP (Ffile_directory_p (program)))
- error ("Specified program for new process is a directory");
+ /* we still need to canonicalize it and ensure it has the proper
+ ending, e.g. .exe */
+ struct gcpro ngcpro1;
+
+ tem = Qnil;
+ NGCPRO1 (tem);
+ locate_file (list1 (build_string ("")), program, Vlisp_EXEC_SUFFIXES,
+ &tem, X_OK);
+ if (NILP (tem))
+ report_file_error ("Searching for program", list1 (program));
+ program = tem;
+ NUNGCPRO;
}
+ if (!NILP (Ffile_directory_p (program)))
+ invalid_operation ("Specified program for new process is a directory",
+ program);
+
proc = make_process_internal (name);
XPROCESS (proc)->buffer = buffer;
connection has no PID; you cannot signal it. All you can do is
deactivate and close it via delete-process */
-DEFUN ("open-network-stream-internal", Fopen_network_stream_internal, 4, 5, 0, /*
+DEFUN ("open-network-stream-internal", Fopen_network_stream_internal, 4, 5,
+ 0, /*
Open a TCP connection for a service to a host.
Return a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
(Transmission Control Protocol) and 'udp (User Datagram Protocol) are
supported. When omitted, 'tcp is assumed.
-Ouput via `process-send-string' and input via buffer or filter (see
+Output via `process-send-string' and input via buffer or filter (see
`set-process-filter') are stream-oriented. That means UDP datagrams are
not guaranteed to be sent and received in discrete packets. (But small
datagrams around 500 bytes that are not truncated by `process-send-string'
\f
-/* send a signal number SIGNO to PROCESS.
- CURRENT_GROUP means send to the process group that currently owns
- the terminal being used to communicate with PROCESS.
- This is used for various commands in shell mode.
- If NOMSG is zero, insert signal-announcements into process's buffers
- right away.
-
- If we can, we try to signal PROCESS by sending control characters
- down the pty. This allows us to signal inferiors who have changed
- their uid, for which killpg would return an EPERM error. */
-
-static void
-process_send_signal (Lisp_Object process, int signo,
- int current_group, int nomsg)
-{
- /* This function can GC */
- Lisp_Object proc = get_process (process);
-
- if (network_connection_p (proc))
- error ("Network connection %s is not a subprocess",
- XSTRING_DATA (XPROCESS(proc)->name));
- CHECK_LIVE_PROCESS (proc);
-
- MAYBE_PROCMETH (kill_child_process, (proc, signo, current_group, nomsg));
-}
-
-DEFUN ("interrupt-process", Finterrupt_process, 0, 2, 0, /*
-Interrupt process PROCESS. May be process or name of one.
-Nil or no arg means current buffer's process.
-Second arg CURRENT-GROUP non-nil means send signal to
-the current process-group of the process's controlling terminal
-rather than to the process's own process group.
-If the process is a shell, this means interrupt current subjob
-rather than the shell.
-*/
- (process, current_group))
-{
- /* This function can GC */
- process_send_signal (process, SIGINT, !NILP (current_group), 0);
- return process;
-}
-
-DEFUN ("kill-process", Fkill_process, 0, 2, 0, /*
-Kill process PROCESS. May be process or name of one.
-See function `interrupt-process' for more details on usage.
-*/
- (process, current_group))
-{
- /* This function can GC */
-#ifdef SIGKILL
- process_send_signal (process, SIGKILL, !NILP (current_group), 0);
-#else
- error ("kill-process: Not supported on this system");
-#endif
- return process;
-}
-
-DEFUN ("quit-process", Fquit_process, 0, 2, 0, /*
-Send QUIT signal to process PROCESS. May be process or name of one.
-See function `interrupt-process' for more details on usage.
-*/
- (process, current_group))
-{
- /* This function can GC */
-#ifdef SIGQUIT
- process_send_signal (process, SIGQUIT, !NILP (current_group), 0);
-#else
- error ("quit-process: Not supported on this system");
-#endif
- return process;
-}
-
-DEFUN ("stop-process", Fstop_process, 0, 2, 0, /*
-Stop process PROCESS. May be process or name of one.
-See function `interrupt-process' for more details on usage.
-*/
- (process, current_group))
-{
- /* This function can GC */
-#ifdef SIGTSTP
- process_send_signal (process, SIGTSTP, !NILP (current_group), 0);
-#else
- error ("stop-process: Not supported on this system");
-#endif
- return process;
-}
-
-DEFUN ("continue-process", Fcontinue_process, 0, 2, 0, /*
-Continue process PROCESS. May be process or name of one.
-See function `interrupt-process' for more details on usage.
-*/
- (process, current_group))
+static int
+decode_signal (Lisp_Object signal_)
{
- /* This function can GC */
-#ifdef SIGCONT
- process_send_signal (process, SIGCONT, !NILP (current_group), 0);
-#else
- error ("continue-process: Not supported on this system");
-#endif
- return process;
-}
-
-DEFUN ("signal-process", Fsignal_process, 2, 2,
- "nProcess number: \nnSignal code: ", /*
-Send the process with process id PID the signal with code SIGCODE.
-PID must be an integer. The process need not be a child of this Emacs.
-SIGCODE may be an integer, or a symbol whose name is a signal name.
-*/
- (pid, sigcode))
-{
- CHECK_INT (pid);
-
- if (INTP (sigcode))
- ;
+ if (INTP (signal_))
+ return XINT (signal_);
else
{
Bufbyte *name;
- CHECK_SYMBOL (sigcode);
- name = string_data (XSYMBOL (sigcode)->name);
+ CHECK_SYMBOL (signal_);
+ name = string_data (XSYMBOL (signal_)->name);
-#define handle_signal(signal) \
- else if (!strcmp ((const char *) name, #signal)) \
- XSETINT (sigcode, signal)
+#define handle_signal(sym) do { \
+ if (!strcmp ((const char *) name, #sym)) \
+ return sym; \
+ } while (0)
- if (0)
- ;
handle_signal (SIGINT); /* ANSI */
handle_signal (SIGILL); /* ANSI */
handle_signal (SIGABRT); /* ANSI */
#ifdef SIGPWR
handle_signal (SIGPWR);
#endif
- else
- error ("Undefined signal name %s", name);
- }
#undef handle_signal
+ error ("Undefined signal name %s", name);
+ return 0; /* Unreached */
+ }
+}
+
+/* Send signal number SIGNO to PROCESS.
+ CURRENT-GROUP non-nil means send signal to the current
+ foreground process group of the process's controlling terminal rather
+ than to the process's own process group.
+ This is used for various commands in shell mode.
+ If NOMSG is zero, insert signal-announcements into process's buffers
+ right away.
+
+ If we can, we try to signal PROCESS by sending control characters
+ down the pty. This allows us to signal inferiors who have changed
+ their uid, for which kill() would return an EPERM error, or to
+ processes running on another computer through a remote login. */
+
+static void
+process_send_signal (Lisp_Object process, int signo,
+ int current_group, int nomsg)
+{
+ /* This function can GC */
+ Lisp_Object proc = get_process (process);
+
+ if (network_connection_p (proc))
+ error ("Network connection %s is not a subprocess",
+ XSTRING_DATA (XPROCESS(proc)->name));
+ CHECK_LIVE_PROCESS (proc);
+
+ MAYBE_PROCMETH (kill_child_process, (proc, signo, current_group, nomsg));
+}
+
+DEFUN ("process-send-signal", Fprocess_send_signal, 1, 3, 0, /*
+Send signal SIGNAL to process PROCESS.
+SIGNAL may be an integer, or a symbol naming a signal, like `SIGSEGV'.
+PROCESS may be a process, a buffer, the name of a process or buffer, or
+nil, indicating the current buffer's process.
+Third arg CURRENT-GROUP non-nil means send signal to the current
+foreground process group of the process's controlling terminal rather
+than to the process's own process group.
+If the process is a shell that supports job control, this means
+send the signal to the current subjob rather than the shell.
+*/
+ (signal_, process, current_group))
+{
+ /* This function can GC */
+ process_send_signal (process, decode_signal (signal_),
+ !NILP (current_group), 0);
+ return process;
+}
+
+DEFUN ("interrupt-process", Finterrupt_process, 0, 2, 0, /*
+Interrupt process PROCESS.
+See function `process-send-signal' for more details on usage.
+*/
+ (process, current_group))
+{
+ /* This function can GC */
+ process_send_signal (process, SIGINT, !NILP (current_group), 0);
+ return process;
+}
+
+DEFUN ("kill-process", Fkill_process, 0, 2, 0, /*
+Kill process PROCESS.
+See function `process-send-signal' for more details on usage.
+*/
+ (process, current_group))
+{
+ /* This function can GC */
+#ifdef SIGKILL
+ process_send_signal (process, SIGKILL, !NILP (current_group), 0);
+#else
+ error ("kill-process: Not supported on this system");
+#endif
+ return process;
+}
+
+DEFUN ("quit-process", Fquit_process, 0, 2, 0, /*
+Send QUIT signal to process PROCESS.
+See function `process-send-signal' for more details on usage.
+*/
+ (process, current_group))
+{
+ /* This function can GC */
+#ifdef SIGQUIT
+ process_send_signal (process, SIGQUIT, !NILP (current_group), 0);
+#else
+ error ("quit-process: Not supported on this system");
+#endif
+ return process;
+}
+
+DEFUN ("stop-process", Fstop_process, 0, 2, 0, /*
+Stop process PROCESS.
+See function `process-send-signal' for more details on usage.
+*/
+ (process, current_group))
+{
+ /* This function can GC */
+#ifdef SIGTSTP
+ process_send_signal (process, SIGTSTP, !NILP (current_group), 0);
+#else
+ error ("stop-process: Not supported on this system");
+#endif
+ return process;
+}
+
+DEFUN ("continue-process", Fcontinue_process, 0, 2, 0, /*
+Continue process PROCESS.
+See function `process-send-signal' for more details on usage.
+*/
+ (process, current_group))
+{
+ /* This function can GC */
+#ifdef SIGCONT
+ process_send_signal (process, SIGCONT, !NILP (current_group), 0);
+#else
+ error ("continue-process: Not supported on this system");
+#endif
+ return process;
+}
+
+DEFUN ("signal-process", Fsignal_process, 2, 2,
+ "nProcess number: \nnSignal code: ", /*
+Send the process with process id PID the signal with code SIGNAL.
+PID must be an integer. The process need not be a child of this Emacs.
+SIGNAL may be an integer, or a symbol naming a signal, like `SIGSEGV'.
+*/
+ (pid, signal_))
+{
+ CHECK_INT (pid);
+
return make_int (PROCMETH_OR_GIVEN (kill_process_by_pid,
- (XINT (pid), XINT (sigcode)), -1));
+ (XINT (pid), decode_signal (signal_)),
+ -1));
}
DEFUN ("process-send-eof", Fprocess_send_eof, 0, 1, 0, /*
#endif /* HAVE_SOCKETS */
DEFSUBR (Fprocess_send_region);
DEFSUBR (Fprocess_send_string);
+ DEFSUBR (Fprocess_send_signal);
DEFSUBR (Finterrupt_process);
DEFSUBR (Fkill_process);
DEFSUBR (Fquit_process);
#endif /* emacs */
-#ifdef HAVE_GETPT
-#define PTY_ITERATION
-#define PTY_OPEN \
- if ((fd = getpt()) < 0 || grantpt (fd) < 0 || unlockpt (fd) < 0) \
- return -1;
-#define PTY_NAME_SPRINTF
-#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ptsname (fd));
-#endif
-
#endif /* INCLUDED_process_h_ */
EMACS_INT first, last;
Lisp_Object args[4];
int oldlen;
-
+
again:
first = entry->first;
last = entry->last;
HDC hdc = get_frame_dc (f, 1);
HDC hcompdc = get_frame_compdc (f);
HGDIOBJ old=NULL;
- COLORREF bgcolor = GetBkColor (hdc);
const int real_x = IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (p);
const int real_y = IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (p);
const int surface_x = IMAGE_INSTANCE_PIXMAP_WIDTH (p);
/* first blit the mask */
if (IMAGE_INSTANCE_MSWINDOWS_MASK (p))
{
- RGBQUAD col;
- col.rgbBlue = GetBValue (bgcolor);
- col.rgbRed = GetRValue (bgcolor);
- col.rgbGreen = GetGValue (bgcolor);
- col.rgbReserved = 0;
+ RGBQUAD bg;
+ COLORREF bgcolor;
old = SelectObject (hcompdc, IMAGE_INSTANCE_MSWINDOWS_MASK (p));
- SetDIBColorTable (hcompdc, 1, 1, &col);
+ if (IMAGE_INSTANCE_TYPE (p) == IMAGE_MONO_PIXMAP)
+ {
+ COLORREF fgcolor;
+ RGBQUAD fg;
+
+ fgcolor = GetTextColor (hdc);
+ fg.rgbBlue = GetBValue (fgcolor);
+ fg.rgbRed = GetRValue (fgcolor);
+ fg.rgbGreen = GetGValue (fgcolor);
+ fg.rgbReserved = 0;
+ SetDIBColorTable (hcompdc, 0, 1, &fg);
+ }
+
+ bgcolor = GetBkColor (hdc);
+ bg.rgbBlue = GetBValue (bgcolor);
+ bg.rgbRed = GetRValue (bgcolor);
+ bg.rgbGreen = GetGValue (bgcolor);
+ bg.rgbReserved = 0;
+ SetDIBColorTable (hcompdc, 1, 1, &bg);
StretchBlt (hdc,
db->xpos, db->ypos,
static void
mswindows_frame_output_end (struct frame *f)
{
+#ifdef DEFER_WINDOW_POS
HDWP hdwp = FRAME_MSWINDOWS_DATA (f)->hdwp;
if (hdwp != 0)
EndDeferWindowPos (hdwp);
FRAME_MSWINDOWS_DATA (f)->hdwp = 0;
}
-
+#endif
GdiFlush();
}
if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance),
Qlayout))
{
- redisplay_output_layout (w, instance, &dbox, &dga, findex,
+ redisplay_output_layout (window, instance, &dbox, &dga, findex,
cursor_start, cursor_width,
cursor_height);
if (rb->cursor_type == CURSOR_ON)
return 0;
/* Only check dirtiness if we know something has changed. */
else if (crb->type == RUNE_DGLYPH &&
- (XGLYPH_DIRTYP (crb->object.dglyph.glyph) ||
+ (XGLYPH_DIRTYP (crb->object.dglyph.glyph) ||
crb->findex != drb->findex))
{
/* We need some way of telling redisplay_output_layout () that the
return 0;
ii = XIMAGE_INSTANCE (image);
- if (TEXT_IMAGE_INSTANCEP (image) &&
- (crb->findex != drb->findex ||
+ if (TEXT_IMAGE_INSTANCEP (image) &&
+ (crb->findex != drb->findex ||
WINDOW_FACE_CACHEL_DIRTY (w, drb->findex)))
return 0;
- /* It is quite common of the two glyphs to be EQ since in many
+ /* It is quite common for the two glyphs to be EQ since in many
cases they will actually be the same object. This does not
mean, however, that nothing has changed. We therefore need to
check the current hash of the glyph against the last recorded
display hash and the pending display items. See
update_subwindow (). */
if (image_instance_changed (image) ||
- crb->findex != drb->findex ||
+ crb->findex != drb->findex ||
WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))
{
/* We now now we are going to re-output the glyph, but since
changes, send a hint to the output routines that they can
take some short cuts. This is most useful for
layouts. This flag should get reset by the output
- routines.
+ routines.
#### It is possible for us to get here when the
face_cachel is dirty. I do not know what the implications
LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (XCAR (rest));
-
if (IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii)
&&
IMAGE_INSTANCE_DISPLAY_X (ii)
- + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) > x
- &&
+ + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) > x
+ &&
IMAGE_INSTANCE_DISPLAY_X (ii) < x + width
&&
IMAGE_INSTANCE_DISPLAY_Y (ii)
- + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) > y
- &&
+ + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) > y
+ &&
IMAGE_INSTANCE_DISPLAY_Y (ii) < y + height
&&
!EQ (XCAR (rest), ignored_window))
/* The first thing we are going to do is update the display
characteristics of the subwindow. This also clears the dirty
flags as a side effect. */
- update_subwindow (image_instance);
+ redisplay_subwindow (image_instance);
/* This makes the glyph area fit into the display area. */
if (!redisplay_normalize_glyph_area (db, dga))
issues lwlib has to grapple with. We really need to know what has
actually changed and make a layout decision based on that. We also
really need to know what has changed so that we can only make the
- neccessary changes in update_subwindow. This has all now been
+ necessary changes in update_subwindow. This has all now been
implemented, Viva la revolution!
****************************************************************************/
void
-redisplay_output_layout (struct window *w,
+redisplay_output_layout (Lisp_Object domain,
Lisp_Object image_instance,
struct display_box* db, struct display_glyph_area* dga,
face_index findex, int cursor_start, int cursor_width,
int cursor_height)
{
Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
- Lisp_Object window, rest;
+ Lisp_Object rest, window = DOMAIN_WINDOW (domain);
Emchar_dynarr *buf = Dynarr_new (Emchar);
- struct frame *f = XFRAME (w->frame);
- struct device *d = XDEVICE (f->device);
+ struct window *w = XWINDOW (window);
+ struct device *d = DOMAIN_XDEVICE (domain);
int layout_height, layout_width;
- XSETWINDOW (window, w);
-
- layout_height = glyph_height (image_instance, window);
- layout_width = glyph_width (image_instance, window);
+ layout_height = glyph_height (image_instance, domain);
+ layout_width = glyph_width (image_instance, domain);
dga->height = layout_height;
dga->width = layout_width;
/* Flip through the widgets in the layout displaying as necessary */
LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (p))
{
- Lisp_Object child = XCAR (rest);
+ Lisp_Object child = glyph_image_instance (XCAR (rest), image_instance,
+ ERROR_ME_NOT, 1);
struct display_box cdb;
/* For losing HP-UX */
struct display_glyph_area cdga;
cdga.xoffset = IMAGE_INSTANCE_XOFFSET (childii) - dga->xoffset;
cdga.yoffset = IMAGE_INSTANCE_YOFFSET (childii) - dga->yoffset;
- cdga.width = glyph_width (child, window);
- cdga.height = glyph_height (child, window);
+ cdga.width = glyph_width (child, image_instance);
+ cdga.height = glyph_height (child, image_instance);
- IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) =
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) =
IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p);
/* Although normalization is done by the output routines
xzero (dl);
/* Munge boxes into display lines. */
dl.ypos = (cdb.ypos - cdga.yoffset)
- + glyph_ascent (child, window);
- dl.ascent = glyph_ascent (child, window);
- dl.descent = glyph_descent (child, window);
+ + glyph_ascent (child, image_instance);
+ dl.ascent = glyph_ascent (child, image_instance);
+ dl.descent = glyph_descent (child, image_instance);
dl.top_clip = cdga.yoffset;
dl.clip = (dl.ypos + dl.descent) - (cdb.ypos + cdb.height);
/* output_string doesn't understand offsets in
case IMAGE_WIDGET:
if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (childii), Qlayout))
{
- redisplay_output_layout (w, child, &cdb, &cdga, findex,
+ redisplay_output_layout (image_instance, child, &cdb, &cdga, findex,
0, 0, 0);
break;
}
IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) = 0;
}
}
-
+
/* Update any display properties. I'm not sure whether this actually
does anything for layouts except clear the changed flags. */
- update_subwindow (image_instance);
+ redisplay_subwindow (image_instance);
Dynarr_free (buf);
}
{
redisplay_clear_clipped_region (window, findex,
db, dga,
- (int)IMAGE_INSTANCE_PIXMAP_MASK (p),
+ (IMAGE_INSTANCE_PIXMAP_MASK (p) != 0),
Qnil);
/* This shrinks the display box to exactly enclose the glyph
redisplay_clear_clipped_region
Clear the area in the dest display_box not covered by the src
- display_glyph_area using the given face. This is a common occurance
+ display_glyph_area using the given face. This is a common occurrence
for images shorter than the display line. Clipping can be played
around with by altering these. glyphsrc should be normalized.
****************************************************************************/
#endif
tty_frame_output_end (struct frame *f)
{
- struct device *d = XDEVICE (FRAME_DEVICE (f));
- struct console *c = XCONSOLE (DEVICE_CONSOLE (d));
+ struct console *c = XCONSOLE (FRAME_CONSOLE (f));
CONSOLE_TTY_CURSOR_X (c) = CONSOLE_TTY_FINAL_CURSOR_X (c);
CONSOLE_TTY_CURSOR_Y (c) = CONSOLE_TTY_FINAL_CURSOR_Y (c);
OUTPUT1_IF (c, TTY_SD (c).keypad_off);
OUTPUT1_IF (c, TTY_SD (c).cursor_normal);
OUTPUT1_IF (c, TTY_SD (c).end_motion);
- tty_frame_output_end (XFRAME (CONSOLE_SELECTED_FRAME (c)));
+
+ {
+ Lisp_Object frm = CONSOLE_SELECTED_FRAME (c);
+
+ if (!NILP (frm))
+ tty_frame_output_end (XFRAME (frm));
+ }
}
/*****************************************************************************
cursor_start, cursor_width,
cursor_height, 0);
break;
-
+
case IMAGE_WIDGET:
if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance),
Qlayout))
{
- redisplay_output_layout (w, instance, &dbox, &dga, findex,
+ redisplay_output_layout (window, instance, &dbox, &dga, findex,
cursor_start, cursor_width,
cursor_height);
break;
cursor_start, cursor_width,
cursor_height);
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;
}
w->pixel_width, flash_height);
}
else
- /* If it is short, flash it all. */
+ /* If it is short, flash it all. */
XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
w->pixel_width, w->pixel_height);
w->pixel_width, flash_height);
}
else
- /* If it is short, flash it all. */
+ /* If it is short, flash it all. */
XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
w->pixel_width, w->pixel_height);
else
findex = get_builtin_face_cache_index (w, face);
- instance = glyph_image_instance (gb->glyph, data->window,
+ instance = glyph_image_instance (gb->glyph, data->window,
ERROR_ME_NOT, 1);
if (TEXT_IMAGE_INSTANCEP (instance))
{
/* result_str is nil when we're building a frame or icon title. Otherwise,
we're building a modeline, so the offset starts at the modeline
- horizontal scrolling ammount */
+ horizontal scrolling amount */
if (! NILP (result_str))
offset = w->modeline_hscroll;
generate_fstring_runes (w, &data, 0, 0, -1, format_str, 0,
int truncate_win = b ? window_truncation_on (w) : 0;
int end_glyph_width = 0;
- /* we're going to ditch selective display for static text, its an
- FSF thing and invisble extents are the way to go
- here. Implementing it also relies on a number of buffer-specific
+ /* We're going to ditch selective display for static text, it's an
+ FSF thing and invisible extents are the way to go here.
+ Implementing it also relies on a number of buffer-specific
functions that we don't have the luxury of being able to use
here. */
&& !(MINI_WINDOW_P (w) && f->buffers_changed)
&& !f->frame_changed
&& !truncation_changed
- /* check whether start is really at the begining of a line GE */
+ /* check whether start is really at the beginning of a line GE */
&& (!w->start_at_line_beg || beginning_of_line_p (b, startp))
)
{
if (f->clear)
f->frame_changed = 1;
- /* Invalidate the subwindow cache. We use subwindows_changed here to
- cause subwindows to get instantiated. This is because
+ /* Invalidate the subwindow caches. We use subwindows_changed here
+ to cause subwindows to get instantiated. This is because
subwindows_state_changed is less strict - dealing with things
like the clicked state of button. We have to do this before
redisplaying the gutters as subwindows get unmapped in the
process.*/
+ if (f->frame_changed)
+ reset_frame_subwindow_instance_cache (f);
+
if (f->frame_changed || f->subwindows_changed)
{
/* we have to do this so the gutter gets regenerated. */
displayed. The end of the last line is also know as the window end
position.
- WARNING: It is possible that rediplay failed to layout any lines for the
+ WARNING: It is possible that redisplay failed to layout any lines for the
windows. Under normal circumstances this is rare. However it seems that it
does occur in the following situation: A mouse event has come in and we
need to compute its location in a window. That code (in
redisplay_frame (f, 1);
- /* If we don't reset the global redisplay flafs here, subsequent
+ /* If we don't reset the global redisplay flags here, subsequent
changes to the display will not get registered by redisplay
because it thinks it already has registered changes. If you
really knew what you were doing you could confuse redisplay by
to the things that are being displayed, and the context,
e.g. buffers and windows. According to Chuck this is so that we can
get speed, which seems fine to me, however this usage is extended
- too far down the redispay routines IMO. At some level there should
+ too far down the redisplay routines IMO. At some level there should
be functions that know how to display strings with extents and
faces, regardless of buffer etc. After all the window system does
not care. <andy@xemacs.org> */
int get_next_display_block (layout_bounds bounds,
display_block_dynarr *dba, int start_pos,
int *next_start);
-void redisplay_output_layout (struct window *w,
+void redisplay_output_layout (Lisp_Object domain,
Lisp_Object image_instance,
struct display_box* db, struct display_glyph_area* dga,
face_index findex, int cursor_start, int cursor_width,
#ifdef emacs
case before_dot:
DEBUG_PRINT1 ("EXECUTING before_dot.\n");
- if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) >=
- BUF_PT (regex_emacs_buffer))
+ if (!regex_emacs_buffer_p
+ || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
+ >= BUF_PT (regex_emacs_buffer)))
goto fail;
break;
case at_dot:
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
- if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
- != BUF_PT (regex_emacs_buffer))
+ if (!regex_emacs_buffer_p
+ || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
+ != BUF_PT (regex_emacs_buffer)))
goto fail;
break;
case after_dot:
DEBUG_PRINT1 ("EXECUTING after_dot.\n");
- if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
- <= BUF_PT (regex_emacs_buffer))
+ if (!regex_emacs_buffer_p
+ || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
+ <= BUF_PT (regex_emacs_buffer)))
goto fail;
break;
#if 0 /* not emacs19 */
/* In AIX, you allocate a pty by opening /dev/ptc to get the master side.
To get the name of the slave side, you just ttyname() the master side. */
-#define PTY_ITERATION for (c = 0; !c ; c++)
-#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc");
-#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));
-
-/* XEmacs change: #### is this crap necessary? */
-#ifndef NOT_C_CODE
-#include <termios.h>
-#endif
-
/*
* Define HAVE_PTYS if the system supports pty devices.
*/
#define LIBS_DEBUG
#define LIBS_SYSTEM "-lutil -lcompat"
-#define HAVE_GETLOADAVG
-
/* System uses OXTABS instead of the expected TAB3.
(Copied from netbsd.h.) */
#define TABDLY OXTABS
# endif
# endif
+# if CYGWIN_VERSION_DLL_MAJOR < 20
+
void cygwin32_win32_to_posix_path_list (const char*, char*);
int cygwin32_win32_to_posix_path_list_buf_size (const char*);
void cygwin32_posix_to_win32_path_list (const char*, char*);
int cygwin32_posix_to_win32_path_list_buf_size (const char*);
-# if CYGWIN_VERSION_DLL_MAJOR < 20
+
+#define cygwin_win32_to_posix_path_list cygwin32_win32_to_posix_path_list
+#define cygwin_win32_to_posix_path_list_buf_size \
+ cygwin32_win32_to_posix_path_list_buf_size
+#define cygwin_posix_to_win32_path_list cygwin32_posix_to_win32_path_list
+#define cygwin_posix_to_win32_path_list_buf_size \
+ cygwin32_posix_to_win32_path_list_buf_size
+
struct timeval;
struct timezone;
struct itimerval;
int srandom (unsigned seed);
long random (void);
+# else /* not CYGWIN_VERSION_DLL_MAJOR < 20 */
+
+void cygwin_win32_to_posix_path_list (const char*, char*);
+int cygwin_win32_to_posix_path_list_buf_size (const char*);
+void cygwin_posix_to_win32_path_list (const char*, char*);
+int cygwin_posix_to_win32_path_list_buf_size (const char*);
+
# endif /* CYGWIN_VERSION_DLL_MAJOR < 20 */
# if CYGWIN_VERSION_DLL_MAJOR <= 20
double logb (double);
# endif /* CYGWIN_VERSION_DLL_MAJOR <= 20 */
+/* Still left out of 1.1! */
+double logb (double);
+
#endif
#ifndef ORDINARY_LINK
#undef MAIL_USE_SYSTEM_LOCK
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments. */
-
-#define NO_ARG_ARRAY
-
-/* Data type of load average, as read out of kmem. */
-
-#define LOAD_AVE_TYPE long
-
-/* Convert that into an integer that is 100 for a load average of 1.0 */
-
-#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
+/* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
+ since there is no load average available. */
/* Define VIRT_ADDR_VARIES if the virtual addresses of
pure and impure space as loaded can vary, and even their
#define SYSTEM_PURESIZE_EXTRA 15000
#define CYGWIN_CONV_PATH(src, dst) \
-dst = alloca (cygwin32_win32_to_posix_path_list_buf_size(src)); \
-cygwin32_win32_to_posix_path_list(src, dst)
+dst = alloca (cygwin_win32_to_posix_path_list_buf_size(src)); \
+cygwin_win32_to_posix_path_list(src, dst)
#define CYGWIN_WIN32_PATH(src, dst) \
-dst = alloca (cygwin32_posix_to_win32_path_list_buf_size(src)); \
-cygwin32_posix_to_win32_path_list(src, dst)
-
-/*
- * stolen from usg.
- */
-#define HAVE_PTYS
-#define FIRST_PTY_LETTER 'z'
-
-/* Pseudo-terminal support under SVR4 only loops to deal with errors. */
-
-#define PTY_ITERATION for (i = 0, c = 0; i < 1; i++)
-
-/* This sets the name of the master side of the PTY. */
-
-#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
-
-/* This sets the name of the slave side of the PTY. On SysVr4,
- grantpt(3) forks a subprocess, so keep sigchld_handler() from
- intercepting that death. If any child but grantpt's should die
- within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
-
-#define PTY_OPEN \
- fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0)
-
-#define PTY_TTY_NAME_SPRINTF \
- { \
- extern char* ptsname(int); \
- char *ptyname; \
- \
- if (!(ptyname = ptsname (fd))) \
- { close (fd); return -1; } \
- strncpy (pty_name, ptyname, sizeof (pty_name)); \
- pty_name[sizeof (pty_name) - 1] = 0; \
- }
-
-/* ============================================================ */
-
+dst = alloca (cygwin_posix_to_win32_path_list_buf_size(src)); \
+cygwin_posix_to_win32_path_list(src, dst)
#endif /* not __ELF__ */
-#define HAVE_GETLOADAVG
/* #define NO_TERMIO */ /* detected in configure */
#define DECLARE_GETPWUID_WITH_UID_T
#undef SYSTEM_TYPE
#define SYSTEM_TYPE "gnu"
-/* XXX should getloadavg be in libc? Should we have a libutil?
-#define HAVE_GETLOADAVG */
-
#define LIBS_DEBUG
/* XXX emacs should not expect TAB3 to be defined. */
#define WNOHANG 0x1
-/* No need to use sprintf to get the tty name--we get that from _getpty. */
-#undef PTY_TTY_NAME_SPRINTF
-#define PTY_TTY_NAME_SPRINTF
-/* No need to get the pty name at all. */
-#define PTY_NAME_SPRINTF
-/* We need only try once to open a pty. */
-#define PTY_ITERATION
-/* Here is how to do it. */
-/* It is necessary to prevent SIGCHLD signals within _getpty.
- So we block them. */
-#define PTY_OPEN \
-{ \
- char *name; \
- struct stat stb; \
- EMACS_BLOCK_SIGCHLD; \
- name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
- EMACS_UNBLOCK_SIGCHLD; \
- if (name == 0) \
- return -1; \
- if (fd < 0) \
- return -1; \
- if (fstat (fd, &stb) < 0) \
- return -1; \
- strcpy (pty_name, name); \
-}
-
/* jpff@maths.bath.ac.uk reports `struct exception' is not defined
on this system, so inhibit use of matherr. */
#define NO_MATHERR
#undef SETUP_SLAVE_PTY
#endif
-/* No need to use sprintf to get the tty name--we get that from _getpty. */
-#ifdef PTY_TTY_NAME_SPRINTF
-#undef PTY_TTY_NAME_SPRINTF
-#endif
-#define PTY_TTY_NAME_SPRINTF
-/* No need to get the pty name at all. */
-#ifdef PTY_NAME_SPRINTF
-#undef PTY_NAME_SPRINTF
-#endif
-#define PTY_NAME_SPRINTF
-#ifdef emacs
-char *_getpty ();
-#endif
-/* We need only try once to open a pty. */
-#define PTY_ITERATION
-/* Here is how to do it. */
-/* It is necessary to prevent SIGCHLD signals within _getpty.
- So we block them. */
-#define PTY_OPEN \
-{ \
- char *name; \
- struct stat stb; \
- EMACS_BLOCK_SIGCHLD; \
- name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
- EMACS_UNBLOCK_SIGCHLD; \
- if (name == 0) \
- return -1; \
- if (fd < 0) \
- return -1; \
- if (fstat (fd, &stb) < 0) \
- return -1; \
- strcpy (pty_name, name); \
-}
-
/* jpff@maths.bath.ac.uk reports `struct exception' is not defined
on this system, so inhibit use of matherr. */
#define NO_MATHERR
/* XEmacs: removed setpgrp() definition because we use setpgid() when
it's available, and autodetect it. */
+
#undef MAIL_USE_SYSTEM_LOCK
#define HAVE_MSW_C_DIRED
-/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
- * group of arguments and treat it as an array of the arguments. */
-
-#define NO_ARG_ARRAY
-
/* System calls that are encapsulated */
#define ENCAPSULATE_RENAME
#define ENCAPSULATE_OPEN
#define ENCAPSULATE_STAT
#define ENCAPSULATE_FSTAT
-/* Data type of load average, as read out of kmem. */
-
-#define LOAD_AVE_TYPE long
-
-/* Convert that into an integer that is 100 for a load average of 1.0 */
-
-#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
+/* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
+ since there is no load average available. */
/* Define VIRT_ADDR_VARIES if the virtual addresses of
pure and impure space as loaded can vary, and even their
#undef KERNEL_FILE
#undef LDAV_SYMBOL
-#define HAVE_GETLOADAVG
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
#define USG5_4
#endif
-#if OS_RELEASE >= 57
-#define HAVE_GETLOADAVG
-#endif
-
/* Fix understandable GCC lossage on Solaris 2.6 */
#if defined(__GNUC__) && OS_RELEASE >= 56 && !defined(NOT_C_CODE)
#define HAVE_H_ERRNO
#define HAVE_STRUCT_UTIMBUF
-#define HAVE_STRCASECMP
-
/* Compatibility macros. Some used to be routines in nt.c */
#define strcasecmp(x,y) _stricmp(x,y)
#define random() (rand() << 15 | rand())
#endif
#endif
+/* Force the various NT 4 structures and constants to be included; we're
+ careful not to call (or even link with) functions not in NT 3.51 when
+ running on 3.51, but when running on NT 4 or Win9x, we use the later
+ functions, and need their headers. */
+/* The VC++ (5.0, at least) headers treat WINVER non-existent as 0x0400 */
+#if defined (WINVER) && WINVER < 0x0400
+# undef WINVER
+# define WINVER 0x0400
+#endif
+
/* MSVC 6.0 has a mechanism to declare functions which never return */
#if (_MSC_VER >= 1200)
#define DOESNT_RETURN __declspec(noreturn) void
struct scrollbar_instance *sb)
{
int orientation;
-
+
sb->scrollbar_data = xnew_and_zero (struct mswindows_scrollbar_data);
-
+
if (vertical)
orientation = SBS_VERT;
else
orientation = SBS_HORZ;
-
+
SCROLLBAR_MSW_HANDLE (sb) =
CreateWindowEx(0, "SCROLLBAR", 0, orientation|WS_CHILD,
CW_USEDEFAULT, CW_USEDEFAULT,
mswindows_free_scrollbar_instance (struct scrollbar_instance *sb)
{
DestroyWindow (SCROLLBAR_MSW_HANDLE (sb));
- if (sb->scrollbar_data)
+ if (sb->scrollbar_data)
xfree (sb->scrollbar_data);
}
UPDATE_POS_FIELD (scrollbar_width);
UPDATE_POS_FIELD (scrollbar_height);
- if (pos_changed)
+ if (pos_changed)
{
MoveWindow(SCROLLBAR_MSW_HANDLE (sb),
new_scrollbar_x, new_scrollbar_y,
f = XFRAME (frame);
/* SB_LINEDOWN == SB_CHARLEFT etc. This is the way they will
- always be - any Windows is binary compatible backward with
+ always be - any Windows is binary compatible backward with
old programs */
switch (code)
mswindows_enqueue_misc_user_event
(frame, vert ? Qscrollbar_line_down : Qscrollbar_char_right, win);
break;
-
+
case SB_LINEUP:
mswindows_enqueue_misc_user_event
(frame, vert ? Qscrollbar_line_up : Qscrollbar_char_left, win);
break;
-
+
case SB_PAGEDOWN:
mswindows_enqueue_misc_user_event
(win, vert ? Qscrollbar_page_down : Qscrollbar_page_right,
vert ? Qscrollbar_page_up : Qscrollbar_page_left,
vert ? Fcons (win, Qnil) : win);
break;
-
+
case SB_BOTTOM:
mswindows_enqueue_misc_user_event
(frame, vert ? Qscrollbar_to_bottom : Qscrollbar_to_right, win);
int
mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta)
{
- int hasVertBar, hasHorzBar; /* Indicates prescence of scroll bars */
+ int hasVertBar, hasHorzBar; /* Indicates presence of scroll bars */
unsigned wheelScrollLines = 0; /* Number of lines per wheel notch */
/* Find the currently selected window */
/* Synched up with: Not in FSF. */
+/* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-8-00. */
+
#include <config.h>
#include "lisp.h"
mirror = find_scrollbar_window_mirror (f, id);
if (!mirror)
return;
-
+
win = real_window (mirror, 1);
if (NILP (win))
mirror = find_scrollbar_window_mirror (f, id);
if (!mirror)
return;
-
+
win = real_window (mirror, 1);
if (NILP (win))
{
x_offset = WINDOW_LEFT (w);
}
- else
+ else
{
x_offset = WINDOW_RIGHT (w) - scrollbar_width;
if (window_needs_vertical_divider (w))
This is a specifier; use `set-specifier' to change it.
*/ );
Vscrollbar_on_left_p = Fmake_specifier (Qboolean);
-
+
{
/* Kludge. Under X, we want athena scrollbars on the left,
while all other scrollbars go on the right by default. */
s2 = BI_BUF_ZV (buf) - p2;
regex_emacs_buffer = buf;
+ regex_emacs_buffer_p = 1;
i = re_match_2 (bufp, (char *) BI_BUF_BYTE_ADDRESS (buf, p1),
s1, (char *) BI_BUF_BYTE_ADDRESS (buf, p2), s2,
BI_BUF_PT (buf) - BI_BUF_BEGV (buf), &search_regs,
{
Bytecount bis = charcount_to_bytecount (XSTRING_DATA (string), s);
regex_emacs_buffer = buf;
+ regex_emacs_buffer_p = 0;
val = re_search (bufp, (char *) XSTRING_DATA (string),
XSTRING_LENGTH (string), bis,
XSTRING_LENGTH (string) - bis,
/* #### evil current-buffer dependency */
regex_emacs_buffer = current_buffer;
+ regex_emacs_buffer_p = 0;
val = re_search (bufp, (char *) newnonreloc + offset, length, 0,
length, 0);
Bytecount val;
QUIT;
regex_emacs_buffer = buf;
+ regex_emacs_buffer_p = 1;
val = re_search_2 (bufp,
(char *) BI_BUF_BYTE_ADDRESS (buf, p1), s1,
(char *) BI_BUF_BYTE_ADDRESS (buf, p2), s2,
Bytecount val;
QUIT;
regex_emacs_buffer = buf;
+ regex_emacs_buffer_p = 1;
val = re_search_2 (bufp,
(char *) BI_BUF_BYTE_ADDRESS (buf, p1), s1,
(char *) BI_BUF_BYTE_ADDRESS (buf, p2), s2,
BTW "BM" stands for Boyer-Moore, which is one of the standard
string-searching algorithms. It's the best string-searching
- algorithm out there provided
+ algorithm out there, provided that:
a) You're not fazed by algorithm complexity. (Rabin-Karp, which
uses hashing, is much much easier to code but not as fast.)
\f
/* Given a string of words separated by word delimiters,
- compute a regexp that matches those exact words
- separated by arbitrary punctuation. */
+ compute a regexp that matches those exact words
+ separated by arbitrary punctuation. */
static Lisp_Object
wordify (Lisp_Object buffer, Lisp_Object string)
syms_of_search (void)
{
- deferror (&Qsearch_failed, "search-failed", "Search failed", Qerror);
- deferror (&Qinvalid_regexp, "invalid-regexp", "Invalid regexp", Qerror);
+ DEFERROR_STANDARD (Qsearch_failed, Qinvalid_operation);
+ DEFERROR_STANDARD (Qinvalid_regexp, Qsyntax_error);
DEFSUBR (Flooking_at);
DEFSUBR (Fposix_looking_at);
{
/* If it's NIL, we're in trouble. */
if (NILP (value)) return 0;
-
+
/* If it's an integer, assume it's a format ID */
if (INTP (value)) return (UINT) (XINT (value));
/* If it's a string, register the format(!) */
if (STRINGP (value))
return RegisterClipboardFormat (XSTRING_DATA (value));
-
+
/* Check for Windows clipboard format symbols */
if (EQ (value, QCF_TEXT)) return CF_TEXT;
if (EQ (value, QCF_BITMAP)) return CF_BITMAP;
if (EQ (value, QCF_TIFF)) return CF_TIFF;
if (EQ (value, QCF_OEMTEXT)) return CF_OEMTEXT;
if (EQ (value, QCF_DIB)) return CF_DIB;
+#ifdef CF_DIBV5
+ if (EQ (value, QCF_DIBV5)) return CF_DIBV5;
+#endif
if (EQ (value, QCF_PALETTE)) return CF_PALETTE;
if (EQ (value, QCF_PENDATA)) return CF_PENDATA;
if (EQ (value, QCF_RIFF)) return CF_RIFF;
case CF_TIFF: return QCF_TIFF;
case CF_OEMTEXT: return QCF_OEMTEXT;
case CF_DIB: return QCF_DIB;
+#ifdef CF_DIBV5
+ case CF_DIBV5: return QCF_DIBV5;
+#endif
case CF_PALETTE: return QCF_PALETTE;
case CF_PENDATA: return QCF_PENDATA;
case CF_RIFF: return QCF_RIFF;
{
switch (format)
{
- /* This list comes from the SDK documentation */
+ /* This list comes from the SDK documentation */
case CF_DSPENHMETAFILE:
case CF_DSPMETAFILEPICT:
case CF_ENHMETAFILE:
+ case CF_METAFILEPICT:
case CF_BITMAP:
case CF_DSPBITMAP:
case CF_PALETTE:
case CF_DIB:
+#ifdef CF_DIBV5
+ case CF_DIBV5:
+#endif
case CF_DSPTEXT:
case CF_OEMTEXT:
case CF_TEXT:
}
/* Do protocol to assert ourself as a selection owner.
-
+
Under mswindows, we:
* Only set the clipboard if (eq selection-name 'CLIPBOARD)
/* Only continue if we can figure out a clipboard type */
if (!cfType)
return Qnil;
-
+
cfObject = selection_type;
}
data = XCDR (data);
}
-
+
/* We support opaque or string values, but we only mention string
values for now... */
if (!OPAQUEP (data)
&& !STRINGP (data))
return Qnil;
-
+
/* Compute the data length */
if (OPAQUEP (data))
size = XOPAQUE_SIZE (data);
else
size = XSTRING_LENGTH (data) + 1;
-
+
/* Find the frame */
f = selected_frame ();
/* Open the clipboard */
if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
return Qnil;
-
+
/* Allocate memory */
hValue = GlobalAlloc (GMEM_DDESHARE | GMEM_MOVEABLE, size);
-
+
if (!hValue)
{
CloseClipboard ();
return Qnil;
}
-
+
/* Copy the data */
if (OPAQUEP (data))
src = XOPAQUE_DATA (data);
else
src = XSTRING_DATA (data);
-
+
dst = GlobalLock (hValue);
-
+
if (!dst)
{
GlobalFree (hValue);
CloseClipboard ();
-
+
return Qnil;
}
-
+
memcpy (dst, src, size);
GlobalUnlock (hValue);
{
Lisp_Object alist_elt = Qnil, rest;
Lisp_Object cfType_int = make_int (cfType);
-
+
/* First check if there's an element in the alist for this type
already. */
alist_elt = assq_no_quit (cfType_int, Vhandle_alist);
{
/* Free the original handle */
GlobalFree ((HGLOBAL) get_opaque_ptr (XCDR (alist_elt)));
-
+
/* Remove the original one (adding first makes life easier, because
we don't have to special case this being the first element) */
for (rest = Vhandle_alist; !NILP (rest); rest = Fcdr (rest))
}
}
}
-
+
CloseClipboard ();
/* #### Should really return a time, though this is because of the
if (!EQ (selection_name, QCLIPBOARD))
return Qnil;
-
+
/* Find the frame */
f = selected_frame ();
/* #### ajh - Should there be an unwind-protect handler around this?
It could (well it probably won't, but it's always better to
be safe) run out of memory and leave the clipboard open... */
-
+
while ((format = EnumClipboardFormats (format)))
types = Fcons (ms_cf_to_symbol (format), types);
/* If it's an integer, convert to a symbol if appropriate */
if (INTP (type_id))
type_id = ms_cf_to_symbol (XINT (type_id));
-
+
/* If this is a symbol, return it */
if (SYMBOLP (type_id))
return type_id;
MULE could hack it. */
name = make_ext_string (name_buf, numchars,
Fget_coding_system (Qraw_text));
-
+
return name;
}
-
+
return Qnil;
}
void *data;
struct frame *f = NULL;
struct gcpro gcpro1;
-
+
/* Only continue if we're trying to read the clipboard - mswindows doesn't
use the same selection model as X */
if (!EQ (selection_symbol, QCLIPBOARD))
return Qnil;
- /* If this is one fo the X-style atom name symbols, or NIL, convert it
+ /* If this is one of the X-style atom name symbols, or NIL, convert it
as appropriate */
if (NILP (target_type) || x_sym_p (target_type))
{
CloseClipboard ();
GCPRO1 (ret);
-
+
/* Convert this to the appropriate type. If we can't find anything,
then we return a cons of the form (DATA-TYPE . STRING), where the
string contains the raw binary data. */
ret);
UNGCPRO;
-
+
if (NILP (value))
return Fcons (cfObject, ret);
else
void
mswindows_destroy_selection (Lisp_Object selection)
{
- Lisp_Object alist_elt;
-
/* Do nothing if this isn't for the clipboard. */
if (!EQ (selection, QCLIPBOARD))
return;
/* Right. We need to delete everything in Vhandle_alist. */
- alist_elt = Vhandle_alist;
-
- for (alist_elt; !NILP (alist_elt); alist_elt = Fcdr (alist_elt))
- GlobalFree ((HGLOBAL) get_opaque_ptr (XCDR (alist_elt)));
+ {
+ LIST_LOOP_2 (elt, Vhandle_alist)
+ GlobalFree ((HGLOBAL) get_opaque_ptr (XCDR (elt)));
+ }
Vhandle_alist = Qnil;
}
{
const char *nameext;
- TO_EXTERNAL_FORMAT (LISP_STRING, Fsymbol_name (sym),
- C_STRING_ALLOCA, nameext,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (Fsymbol_name (sym), nameext, Qctext);
return XInternAtom (display, nameext, only_if_exists ? True : False);
}
}
That assumed equivalence of time_t and Time, which is not
necessarily the case (e.g. under OSF on the Alphas, where
Time is a 64-bit quantity and time_t is a 32-bit quantity).
-
+
Opaque pointers are the clean way to go here.
*/
selection_time = make_opaque (&thyme, sizeof (thyme));
/* Whichever lazy git wrote this originally just called abort()
when anything didn't go their way... */
-
+
/* Try some other text types */
if (NILP (selection))
selection = select_convert_out (QCLIPBOARD, QSTRING, Qnil);
selection = select_convert_out (QCLIPBOARD, QTEXT, Qnil);
if (NILP (selection))
selection = select_convert_out (QCLIPBOARD, QCOMPOUND_TEXT, Qnil);
-
+
if (CONSP (selection) && SYMBOLP (XCAR (selection))
&& (EQ (XCAR (selection), QSTRING)
|| EQ (XCAR (selection), QTEXT)
if (!STRINGP (selection))
signal_error (Qselection_conversion_error,
build_string ("couldn't convert selection to string"));
-
-
+
+
XmClipboardCopyByName (dpy, window, *data_id,
(char *) XSTRING_DATA (selection),
XSTRING_LENGTH (selection) + 1,
}
local_selection_time = * (Time *) XOPAQUE_DATA (temp_obj);
-
+
if (event->time != CurrentTime &&
local_selection_time > event->time)
{
Atom type;
lisp_data_to_selection_data (d, converted_selection,
&data, &type, &size, &format);
-
+
x_reply_selection_request (event, format, data, size, type);
successful_p = Qt;
/* Tell x_selection_request_lisp_error() it's cool. */
event->type = 0;
xfree (data);
}
-
+
unbind_to (count, Qnil);
DONE_LABEL:
/* We don't own the selection, so that's fine. */
if (NILP (local_selection_time_lisp))
return;
-
+
local_selection_time = * (Time *) XOPAQUE_DATA (local_selection_time_lisp);
/* This SelectionClear is for a selection that we no longer own, so we can
if (changed_owner_time != CurrentTime &&
local_selection_time > changed_owner_time)
return;
-
+
handle_selection_clear (selection_symbol);
}
/* Windows clipboard formats */
Lisp_Object QCF_TEXT, QCF_BITMAP, QCF_METAFILEPICT, QCF_SYLK, QCF_DIF,
- QCF_TIFF, QCF_OEMTEXT, QCF_DIB, QCF_PALETTE, QCF_PENDATA, QCF_RIFF,
- QCF_WAVE, QCF_UNICODETEXT, QCF_ENHMETAFILE, QCF_HDROP, QCF_LOCALE,
+ QCF_TIFF, QCF_OEMTEXT, QCF_DIB, QCF_DIBV5, QCF_PALETTE, QCF_PENDATA,
+ QCF_RIFF, QCF_WAVE, QCF_UNICODETEXT, QCF_ENHMETAFILE, QCF_HDROP, QCF_LOCALE,
QCF_OWNERDISPLAY, QCF_DSPTEXT, QCF_DSPBITMAP, QCF_DSPMETAFILEPICT,
QCF_DSPENHMETAFILE;
Lisp_Object Qselection_conversion_error;
/* A couple of Lisp functions */
-Lisp_Object Qselect_convert_in, Qselect_convert_out;
+Lisp_Object Qselect_convert_in, Qselect_convert_out, Qselect_coerce;
/* These are alists whose CARs are selection-types (whose names are the same
as the names of X Atoms or Windows clipboard formats) and whose CDRs are
*/
Lisp_Object Vselection_converter_out_alist;
Lisp_Object Vselection_converter_in_alist;
+Lisp_Object Vselection_coercion_alist;
Lisp_Object Vselection_appender_alist;
Lisp_Object Vselection_buffer_killed_alist;
Lisp_Object Vselection_coercible_types;
if (NILP (data_type))
data_type = QSTRING;
#endif
-
+
/* Examine the how-to-add argument */
if (EQ (how_to_add, Qreplace_all) || NILP (how_to_add))
{
if (!NILP (value_list))
prev_real_value = assq_no_quit (data_type, value_list);
}
-
+
/* Append values if necessary */
if (!NILP (value_list) && (EQ (how_to_add, Qappend) || EQ (how_to_add, Qt)))
{
error ("cannot append selections of supplied types.");
function = XCDR (function);
-
+
selection_value = call4 (function,
selection_name,
data_type,
selection_data = Fcons (data_type, selection_value);
value_list = Fcons (selection_data, value_list);
}
-
+
if (!NILP (prev_real_value))
{
Lisp_Object rest; /* We know it isn't the CAR, so it's easy. */
-
+
/* Delete the old type entry from the list */
for (rest = value_list; !NILP (rest); rest = Fcdr (rest))
if (EQ (prev_real_value, Fcar (XCDR (rest))))
{
XCDR (rest) = Fcdr (XCDR (rest));
break;
- }
+ }
}
else
{
value_list = Fcons (Fcons (data_type, selection_value),
value_list);
}
-
+
/* Complete the local cache update; note that we destructively
modify the current list entry if there is one */
if (NILP (prev_value))
selection_data = prev_value;
Fsetcar (XCDR (selection_data), value_list);
}
-
+
GCPRO1 (selection_data);
- /* have to do device specific stuff last so that methods can access the
+ /* have to do device specific stuff last so that methods can access the
selection_alist */
if (HAS_DEVMETH_P (XDEVICE (device), own_selection))
selection_time = DEVMETH (XDEVICE (device), own_selection,
else if (SYMBOLP (value) && NILP (type))
types = Fcons (QATOM, types);
}
-
+
UNGCPRO;
return types;
}
-
+
/* remove a selection from our local copy
*/
void
MAYBE_DEVMETH (XDEVICE (device), disown_selection,
(selection_name, selection_time));
-
+
handle_selection_clear (selection_name);
return Qt;
(selection_symbol, target_type, device))
{
/* This function can GC */
- Lisp_Object val = Qnil, element = Qnil;
- struct gcpro gcpro1, gcpro2, gcpro3;
- GCPRO3 (target_type, val, element);
+ Lisp_Object val = Qnil;
+ struct gcpro gcpro1, gcpro2;
+ GCPRO2 (target_type, val);
CHECK_SYMBOL (selection_symbol);
if (NILP (device))
if (NILP (target_type))
target_type = QSTRING;
#endif
-
+
#if 0 /* #### MULTIPLE doesn't work yet and probably never will */
if (CONSP (target_type) &&
XCAR (target_type) == QMULTIPLE)
val = get_local_selection (selection_symbol, target_type);
- if (NILP (val) && (HAS_DEVMETH_P (XDEVICE (device), get_foreign_selection)))
+ if (!NILP (val))
+ {
+ /* If we get something from the local cache, we may need to convert
+ it slightly - to do this, we call select-coerce */
+ val = call3 (Qselect_coerce, selection_symbol, target_type, val);
+ }
+ else if (HAS_DEVMETH_P (XDEVICE (device), get_foreign_selection))
{
+ /* Nothing in the local cache; try the window system */
val = DEVMETH (XDEVICE (device), get_foreign_selection,
(selection_symbol, target_type));
}
if (NILP (val))
{
/* Still nothing. Try coercion. */
-
+
/* Try looking in selection-coercible-types to see if any of
them are present for this selection. We try them *in order*;
the first for which a conversion succeeds gets returned. */
if (NILP (val))
continue;
- /* #### Probably should have a Qselection_coercion_alist and a
- select-coerce function. */
- val = call3 (Qselect_convert_out,
- selection_symbol, target_type, val);
+ val = call3 (Qselect_coerce, selection_symbol, target_type, val);
if (!NILP (val))
break;
}
}
- if (NILP (val))
- {
- UNGCPRO;
-
- return Qnil;
- }
-
/* Used to call clean_local_selection here... but that really belonged
in Lisp (so the equivalent is now built-in to the INTEGER conversion
function select-convert-from-integer) - ajh */
-
+
UNGCPRO;
return val;
}
-/* These two are convenient interfaces to the lisp code in select.el;
+/* These are convenient interfaces to the lisp code in select.el;
this way we can rename them easily rather than having to hunt everywhere.
Also, this gives us access to get_local_selection so that convert_out
can retrieve the internal selection value automatically if passed a
}
Lisp_Object
+select_coerce (Lisp_Object selection,
+ Lisp_Object type,
+ Lisp_Object value)
+{
+ return call3 (Qselect_coerce, selection, type, value);
+}
+
+Lisp_Object
select_convert_out (Lisp_Object selection,
Lisp_Object type,
Lisp_Object value)
if (NILP (value))
{
- Lisp_Object element = Qnil, ret;
- struct gcpro gcpro1;
- GCPRO1 (element);
-
- {
- /* Try looking in selection-coercible-types to see if any of
+ /* Try looking in selection-coercible-types to see if any of
them are present for this selection. We try them *in order*;
the first for which a conversion succeeds gets returned. */
- EXTERNAL_LIST_LOOP_2 (element, Vselection_coercible_types)
- {
- value = get_local_selection (selection, element);
-
- if (NILP (value))
- continue;
-
- ret = call3 (Qselect_convert_out, selection, type, value);
-
- if (!NILP (ret))
- {
- UNGCPRO;
-
- return ret;
- }
- }
- }
-
- UNGCPRO;
-
+ EXTERNAL_LIST_LOOP_2 (element, Vselection_coercible_types)
+ {
+ Lisp_Object ret;
+
+ value = get_local_selection (selection, element);
+
+ if (NILP (value))
+ continue;
+
+ ret = call3 (Qselect_convert_out, selection, type, value);
+
+ if (!NILP (ret))
+ return ret;
+ }
+
return Qnil;
}
return call3 (Qselect_convert_out, selection, type, value);
}
-
+
\f
/* Gets called from kill-buffer; this lets us dispose of buffer-dependent
selections (or alternatively make them independent of the buffer) when
{
Lisp_Object rest;
struct gcpro gcpro1, gcpro2, gcpro3;
-
+
/* For each element of Vselection_alist */
for (rest = Vselection_alist;
!NILP (rest);)
Lisp_Object selection, values, prev = Qnil;
selection = XCAR (rest);
-
+
for (values = XCAR (XCDR (selection));
!NILP (values);
values = XCDR (values))
own-selection from with the buffer-killed handler, then
causes a GC. Just as a note, *don't do this*. */
GCPRO3 (rest, values, value);
-
+
newval = call4 (handler_fn, XCAR (selection), XCAR (value),
XCDR (value), buffer);
UNGCPRO;
-
+
/* Set or delete the value (by destructively modifying
the list). */
if (!NILP (newval))
{
Fsetcdr (value, newval);
-
+
prev = values;
}
else
{
DEFSUBR (Fown_selection_internal);
DEFSUBR (Fget_selection_internal);
- DEFSUBR (Fselection_exists_p);
DEFSUBR (Fget_selection_timestamp);
+ DEFSUBR (Fselection_exists_p);
DEFSUBR (Fdisown_selection_internal);
DEFSUBR (Fselection_owner_p);
DEFSUBR (Favailable_selection_types);
DEFSUBR (Fregister_selection_data_type);
DEFSUBR (Fselection_data_type_name);
-
+
/* Lisp Functions */
defsymbol (&Qselect_convert_in, "select-convert-in");
defsymbol (&Qselect_convert_out, "select-convert-out");
+ defsymbol (&Qselect_coerce, "select-coerce");
/* X Atoms */
defsymbol (&QPRIMARY, "PRIMARY");
defsymbol (&QCF_TIFF, "CF_TIFF");
defsymbol (&QCF_OEMTEXT, "CF_OEMTEXT");
defsymbol (&QCF_DIB, "CF_DIB");
+ defsymbol (&QCF_DIBV5, "CF_DIBV5");
defsymbol (&QCF_PALETTE, "CF_PALETTE");
defsymbol (&QCF_PENDATA, "CF_PENDATA");
defsymbol (&QCF_RIFF, "CF_RIFF");
/* Selection strategies */
defsymbol (&Qreplace_all, "replace-all");
defsymbol (&Qreplace_existing, "replace-existing");
-
- deferror (&Qselection_conversion_error,
- "selection-conversion-error",
- "selection-conversion error", Qio_error);
+
+ DEFERROR_STANDARD (Qselection_conversion_error, Qio_error);
}
void
An alist associating selection-types (such as STRING and TIMESTAMP) with
functions. This is an alias for `selection-converter-out-alist', and should
be considered obsolete. Use the new name instead. */ );
-
+
DEFVAR_LISP ("selection-converter-out-alist",
&Vselection_converter_out_alist /*
An alist associating selection-types (such as STRING and TIMESTAMP) with
See also `selection-converter-out-alist'. */ );
Vselection_converter_in_alist = Qnil;
+ DEFVAR_LISP ("selection-coercion-alist",
+ &Vselection_coercion_alist /*
+An alist associating selection-types (such as STRING and TIMESTAMP) with
+functions. These functions will be called with three args; the name
+of the selection (typically PRIMARY, SECONDARY or CLIPBOARD); the type
+from which the selection should be converted, and the selection value.
+The value passed will be *exactly the same value* that was given to
+`own-selection'; it should be converted into something suitable for
+return to a program calling `get-selection' with the appropriate
+parameters.
+
+See also `selection-converter-in-alist' and
+`selection-converter-out-alist'. */);
+ Vselection_coercion_alist = Qnil;
+
DEFVAR_LISP ("selection-appender-alist",
&Vselection_appender_alist /*
An alist associating selection-types (such as STRING and TIMESTAMP) with
return a value representing the catenation of the two values, or nil to
indicate that this was not possible. */ );
Vselection_appender_alist = Qnil;
-
+
DEFVAR_LISP ("selection-buffer-killed-alist",
&Vselection_buffer_killed_alist /*
An alist associating selection-types (such as STRING and TIMESTAMP) with
automatically converted to another type. Selection values with types in this
list may be subject to conversion attempts to other types. */ );
Vselection_coercible_types = Qnil;
-
+
DEFVAR_LISP ("lost-selection-hooks", &Vlost_selection_hooks /*
A function or functions to be called after we have been notified
that we have lost the selection. The function(s) will be called with one
/* Windows clipboard formats */
extern Lisp_Object QCF_TEXT, QCF_BITMAP, QCF_METAFILEPICT, QCF_SYLK, QCF_DIF,
- QCF_TIFF, QCF_OEMTEXT, QCF_DIB, QCF_PALETTE, QCF_PENDATA, QCF_RIFF,
- QCF_WAVE, QCF_UNICODETEXT, QCF_ENHMETAFILE, QCF_HDROP, QCF_LOCALE,
+ QCF_TIFF, QCF_OEMTEXT, QCF_DIB, QCF_DIBV5, QCF_PALETTE, QCF_PENDATA,
+ QCF_RIFF, QCF_WAVE, QCF_UNICODETEXT, QCF_ENHMETAFILE, QCF_HDROP, QCF_LOCALE,
QCF_OWNERDISPLAY, QCF_DSPTEXT, QCF_DSPBITMAP, QCF_DSPMETAFILEPICT,
QCF_DSPENHMETAFILE;
Lisp_Object select_convert_out (Lisp_Object selection,
Lisp_Object type,
Lisp_Object value);
+Lisp_Object select_coerce (Lisp_Object selection,
+ Lisp_Object type,
+ Lisp_Object value);
/* Notifications */
void handle_selection_clear (Lisp_Object selection_symbol);
{
char *fileext;
- TO_EXTERNAL_FORMAT (LISP_STRING, file,
- C_STRING_ALLOCA, fileext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (file, fileext, Qfile_name);
/* #### NAS code should allow specification of a device. */
if (nas_play_sound_file (fileext, vol))
return Qnil;
char *fileext;
int result;
- TO_EXTERNAL_FORMAT (LISP_STRING, file,
- C_STRING_ALLOCA, fileext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (file, fileext, Qfile_name);
/* #### ESD uses alarm(). But why should we also stop SIGIO? */
stop_interrupts ();
{
const char *fileext;
- TO_EXTERNAL_FORMAT (LISP_STRING, file,
- C_STRING_ALLOCA, fileext,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (file, fileext, Qfile_name);
/* The sound code doesn't like getting SIGIO interrupts.
Unix sucks! */
stop_interrupts ();
DEFVAR_LISP ("native-sound-only-on-console", &Vnative_sound_only_on_console /*
Non-nil value means play sounds only if XEmacs is running
on the system console.
-Nil means always always play sounds, even if running on a non-console tty
+Nil means always play sounds, even if running on a non-console tty
or a secondary X display.
This variable only applies to native sound support.
#include "rangetab.h"
Lisp_Object Qspecifierp;
-Lisp_Object Qprepend, Qremove_tag_set_prepend, Qremove_tag_set_append;
-Lisp_Object Qremove_locale, Qremove_locale_type, Qremove_all;
-Lisp_Object Qfallback;
-
-/* Qinteger, Qboolean, Qgeneric defined in general.c. */
-Lisp_Object Qnatnum;
+Lisp_Object Qremove_tag_set_prepend, Qremove_tag_set_append;
+Lisp_Object Qremove_locale, Qremove_locale_type;
Lisp_Object Qconsole_type, Qdevice_class;
+Lisp_Object Qspecifier_syntax_error;
+Lisp_Object Qspecifier_argument_error;
+Lisp_Object Qspecifier_change_error;
+
static Lisp_Object Vuser_defined_tags;
typedef struct specifier_type_entry specifier_type_entry;
static const struct lrecord_description ste_description_1[] = {
{ XD_LISP_OBJECT, offsetof (specifier_type_entry, symbol) },
- { XD_STRUCT_PTR, offsetof (specifier_type_entry, meths), 1, &specifier_methods_description },
+ { XD_STRUCT_PTR, offsetof (specifier_type_entry, meths), 1,
+ &specifier_methods_description },
{ XD_END }
};
};
static const struct lrecord_description specifier_description[] = {
- { XD_STRUCT_PTR, offsetof (Lisp_Specifier, methods), 1, &specifier_methods_description },
+ { XD_STRUCT_PTR, offsetof (Lisp_Specifier, methods), 1,
+ &specifier_methods_description },
{ XD_LO_LINK, offsetof (Lisp_Specifier, next_specifier) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, global_specs) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, device_specs) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, frame_specs) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, window_specs) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, buffer_specs) },
- { XD_STRUCT_PTR, offsetof (Lisp_Specifier, caching), 1, &specifier_caching_description },
+ { XD_STRUCT_PTR, offsetof (Lisp_Specifier, caching), 1,
+ &specifier_caching_description },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, magic_parent) },
{ XD_LISP_OBJECT, offsetof (Lisp_Specifier, fallback) },
{ XD_SPECIFIER_END }
return Dynarr_at (the_specifier_type_entry_dynarr, i).meths;
}
- maybe_signal_simple_error ("Invalid specifier type", type,
- Qspecifier, errb);
+ maybe_signal_type_error (Qspecifier_argument_error, "Invalid specifier type",
+ type, Qspecifier, errb);
return 0;
}
? Qt : Qnil;
}
-DEFUN ("valid-specifier-locale-type-p", Fvalid_specifier_locale_type_p, 1, 1, 0, /*
+DEFUN ("valid-specifier-locale-type-p", Fvalid_specifier_locale_type_p, 1, 1, 0,
+ /*
Given a specifier LOCALE-TYPE, return non-nil if it is valid.
Valid locale types are 'global, 'device, 'frame, 'window, and 'buffer.
\(Note, however, that in functions that accept either a locale or a locale
!NILP (Fvalid_specifier_locale_p (locale)) ||
!NILP (Fvalid_specifier_locale_type_p (locale)))
return;
- signal_simple_error ("Invalid specifier locale or locale type", locale);
+ signal_type_error (Qspecifier_argument_error,
+ "Invalid specifier locale or locale type", locale);
}
DEFUN ("specifier-locale-type-from-locale", Fspecifier_locale_type_from_locale,
{
/* This cannot GC. */
if (NILP (Fvalid_specifier_locale_p (locale)))
- signal_simple_error ("Invalid specifier locale", locale);
+ signal_type_error (Qspecifier_argument_error, "Invalid specifier locale",
+ locale);
if (DEVICEP (locale)) return Qdevice;
if (FRAMEP (locale)) return Qframe;
if (WINDOWP (locale)) return Qwindow;
else if (!NILP (Fvalid_specifier_locale_p (locale)))
return locale;
else
- signal_simple_error ("Invalid specifier locale", locale);
+ signal_type_error (Qspecifier_argument_error, "Invalid specifier locale",
+ locale);
return Qnil;
}
if (EQ (locale_type, Qwindow)) return LOCALE_WINDOW;
if (EQ (locale_type, Qbuffer)) return LOCALE_BUFFER;
- signal_simple_error ("Invalid specifier locale type", locale_type);
+ signal_type_error (Qspecifier_argument_error, "Invalid specifier locale type",
+ locale_type);
return LOCALE_GLOBAL; /* not reached */
}
}
else if (CONSP (locale))
{
- Lisp_Object elt;
EXTERNAL_LIST_LOOP_2 (elt, locale)
check_valid_locale_or_locale_type (elt);
return locale;
check_valid_domain (Lisp_Object domain)
{
if (NILP (Fvalid_specifier_domain_p (domain)))
- signal_simple_error ("Invalid specifier domain", domain);
+ signal_type_error (Qspecifier_argument_error, "Invalid specifier domain",
+ domain);
}
Lisp_Object
if (!NILP (Fvalid_specifier_tag_p (tag_set)))
return list1 (tag_set);
if (NILP (Fvalid_specifier_tag_set_p (tag_set)))
- signal_simple_error ("Invalid specifier tag-set", tag_set);
+ signal_type_error (Qspecifier_argument_error, "Invalid specifier tag-set",
+ tag_set);
return tag_set;
}
(tag_set))
{
if (NILP (Fvalid_specifier_tag_set_p (tag_set)))
- signal_simple_error ("Invalid tag set", tag_set);
+ signal_type_error (Qspecifier_argument_error, "Invalid tag set", tag_set);
return canonicalize_tag_set (tag_set);
}
return 1;
}
-DEFUN ("device-matches-specifier-tag-set-p", Fdevice_matches_specifier_tag_set_p, 2, 2, 0, /*
+DEFUN ("device-matches-specifier-tag-set-p",
+ Fdevice_matches_specifier_tag_set_p, 2, 2, 0, /*
Return non-nil if DEVICE matches specifier tag set TAG-SET.
This means that DEVICE matches each tag in the tag set. (Every
tag recognized by XEmacs has a predicate associated with it that
CHECK_LIVE_DEVICE (device);
if (NILP (Fvalid_specifier_tag_set_p (tag_set)))
- signal_simple_error ("Invalid tag set", tag_set);
+ signal_type_error (Qspecifier_argument_error, "Invalid tag set", tag_set);
return device_matches_specifier_tag_set_p (device, tag_set) ? Qt : Qnil;
}
CHECK_SYMBOL (tag);
if (valid_device_class_p (tag) ||
valid_console_type_p (tag))
- signal_simple_error ("Cannot redefine built-in specifier tags", tag);
+ signal_type_error (Qspecifier_change_error,
+ "Cannot redefine built-in specifier tags", tag);
/* Try to prevent common instantiators and locales from being
redefined, to reduce ambiguity */
if (NILP (tag) || EQ (tag, Qt) || EQ (tag, Qall) || EQ (tag, Qglobal))
- signal_simple_error ("Cannot define nil, t, 'all, or 'global",
- tag);
+ signal_type_error (Qspecifier_change_error, "Cannot define nil, t, 'all, or 'global",
+ tag);
assoc = assq_no_quit (tag, Vuser_defined_tags);
if (NILP (assoc))
{
}
}
-DEFUN ("device-matching-specifier-tag-list", Fdevice_matching_specifier_tag_list,
+DEFUN ("device-matching-specifier-tag-list",
+ Fdevice_matching_specifier_tag_list,
0, 1, 0, /*
Return a list of all specifier tags matching DEVICE.
DEVICE defaults to the selected device if omitted.
CHECK_SYMBOL (tag);
if (NILP (Fvalid_specifier_tag_p (tag)))
- signal_simple_error ("Invalid specifier tag", tag);
+ signal_type_error (Qspecifier_argument_error, "Invalid specifier tag",
+ tag);
/* Make up some predicates for the built-in types */
if (!CONSP (rest))
{
- maybe_signal_simple_error ("Invalid instantiator list", inst_list,
+ maybe_signal_type_error (Qspecifier_syntax_error,
+ "Invalid instantiator list", inst_list,
Qspecifier, errb);
return Qnil;
}
if (!CONSP (inst_pair = XCAR (rest)))
{
- maybe_signal_simple_error ("Invalid instantiator pair", inst_pair,
+ maybe_signal_type_error (Qspecifier_syntax_error,
+ "Invalid instantiator pair", inst_pair,
Qspecifier, errb);
return Qnil;
}
if (NILP (Fvalid_specifier_tag_set_p (tag_set = XCAR (inst_pair))))
{
- maybe_signal_simple_error ("Invalid specifier tag", tag_set,
+ maybe_signal_type_error (Qspecifier_syntax_error,
+ "Invalid specifier tag", tag_set,
Qspecifier, errb);
return Qnil;
}
Lisp_Object spec, locale;
if (!CONSP (rest) || !CONSP (spec = XCAR (rest)))
{
- maybe_signal_simple_error ("Invalid specification list", spec_list,
+ maybe_signal_type_error (Qspecifier_syntax_error,
+ "Invalid specification list", spec_list,
Qspecifier, errb);
return Qnil;
}
if (NILP (Fvalid_specifier_locale_p (locale = XCAR (spec))))
{
- maybe_signal_simple_error ("Invalid specifier locale", locale,
+ maybe_signal_type_error (Qspecifier_syntax_error,
+ "Invalid specifier locale", locale,
Qspecifier, errb);
return Qnil;
}
if (EQ (Qremove_all, how_to_add))
return SPEC_REMOVE_ALL;
- signal_simple_error ("Invalid `how-to-add' flag", how_to_add);
+ signal_type_error (Qspecifier_argument_error, "Invalid `how-to-add' flag",
+ how_to_add);
return SPEC_PREPEND; /* not reached */
}
{
if (NILP (Vunlock_ghost_specifiers)
&& GHOST_SPECIFIER_P (XSPECIFIER (spec)))
- signal_simple_error ("Attempt to modify read-only specifier",
+ signal_type_error (Qspecifier_change_error,
+ "Attempt to modify read-only specifier",
list1 (spec));
}
else if (add_meth == SPEC_APPEND)
tem = nconc2 (*orig_inst_list, list_to_build_up);
else
- abort ();
+ {
+ abort ();
+ tem = Qnil;
+ }
*orig_inst_list = tem;
}
}
-DEFUN ("check-valid-specifier-matchspec", Fcheck_valid_specifier_matchspec, 2, 2, 0, /*
+DEFUN ("check-valid-specifier-matchspec", Fcheck_valid_specifier_matchspec, 2,
+ 2, 0, /*
Signal an error if MATCHSPEC is invalid for SPECIFIER-TYPE.
See `specifier-matching-instance' for a description of matchspecs.
*/
return UNBOUNDP (val) ? default_ : val;
}
-DEFUN ("specifier-matching-instance-from-inst-list", Fspecifier_matching_instance_from_inst_list,
+DEFUN ("specifier-matching-instance-from-inst-list",
+ Fspecifier_matching_instance_from_inst_list,
4, 5, 0, /*
Attempt to convert a particular inst-list into an instance.
This attempts to instantiate INST-LIST in the given DOMAIN
boolean_validate (Lisp_Object instantiator)
{
if (!EQ (instantiator, Qt) && !EQ (instantiator, Qnil))
- signal_simple_error ("Must be t or nil", instantiator);
+ signal_type_error (Qspecifier_argument_error, "Must be t or nil",
+ instantiator);
}
DEFUN ("boolean-specifier-p", Fboolean_specifier_p, 1, 1, 0, /*
if (!VALID_SINGLE_DISPTABLE_INSTANTIATOR_P (instantiator))
{
lose:
- dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol,
+ dead_wrong_type_argument
+ (display_table_specifier_methods->predicate_symbol,
instantiator);
}
}
{
INIT_LRECORD_IMPLEMENTATION (specifier);
- defsymbol (&Qspecifierp, "specifierp");
+ DEFSYMBOL (Qspecifierp);
- defsymbol (&Qconsole_type, "console-type");
- defsymbol (&Qdevice_class, "device-class");
+ DEFSYMBOL (Qconsole_type);
+ DEFSYMBOL (Qdevice_class);
- /* Qinteger, Qboolean, Qgeneric defined in general.c */
- defsymbol (&Qnatnum, "natnum");
+ /* specifier types defined in general.c. */
DEFSUBR (Fvalid_specifier_type_p);
DEFSUBR (Fspecifier_type_list);
/* locales are defined in general.c. */
- defsymbol (&Qprepend, "prepend");
- defsymbol (&Qremove_tag_set_prepend, "remove-tag-set-prepend");
- defsymbol (&Qremove_tag_set_append, "remove-tag-set-append");
- defsymbol (&Qremove_locale, "remove-locale");
- defsymbol (&Qremove_locale_type, "remove-locale-type");
- defsymbol (&Qremove_all, "remove-all");
+ /* some how-to-add flags in general.c. */
+ DEFSYMBOL (Qremove_tag_set_prepend);
+ DEFSYMBOL (Qremove_tag_set_append);
+ DEFSYMBOL (Qremove_locale);
+ DEFSYMBOL (Qremove_locale_type);
- defsymbol (&Qfallback, "fallback");
+ DEFERROR_STANDARD (Qspecifier_syntax_error, Qsyntax_error);
+ DEFERROR_STANDARD (Qspecifier_argument_error, Qinvalid_argument);
+ DEFERROR_STANDARD (Qspecifier_change_error, Qinvalid_change);
}
void
SPECIFIER_HAS_METHOD (boolean, validate);
- INITIALIZE_SPECIFIER_TYPE (display_table, "display-table", "display-table-p");
+ INITIALIZE_SPECIFIER_TYPE (display_table, "display-table",
+ "display-table-p");
SPECIFIER_HAS_METHOD (display_table, validate);
}
name specifier_instance) to avoid creating "external"
specification loops.
- This method must presume that both INSTANTIATOR and MATCSPEC are
+ This method must presume that both INSTANTIATOR and MATCHSPEC are
already validated by the corresponding validate_* methods, and
may abort if they are invalid.
/* "intern" and friends -- moved here from lread.c and data.c
Copyright (C) 1985-1989, 1992-1994 Free Software Foundation, Inc.
- Copyright (C) 1995 Ben Wing.
+ Copyright (C) 1995, 2000 Ben Wing.
This file is part of XEmacs.
*/
(function, obarray))
{
+ struct gcpro gcpro1;
+
if (NILP (obarray))
obarray = Vobarray;
obarray = check_obarray (obarray);
+ GCPRO1 (obarray);
map_obarray (obarray, mapatoms_1, &function);
+ UNGCPRO;
return Qnil;
}
(regexp, predicate))
{
struct appropos_mapper_closure closure;
+ struct gcpro gcpro1;
CHECK_STRING (regexp);
closure.regexp = regexp;
closure.predicate = predicate;
closure.accumulation = Qnil;
+ GCPRO1 (closure.accumulation);
map_obarray (Vobarray, apropos_mapper, &closure);
closure.accumulation = Fsort (closure.accumulation, Qstring_lessp);
+ UNGCPRO;
return closure.accumulation;
}
if (mask > 0) /* Not always per-buffer */
{
- Lisp_Object elt;
-
/* Set value in each buffer which hasn't shadowed the default */
LIST_LOOP_2 (elt, Vbuffer_alist)
{
if (mask > 0) /* Not always per-console */
{
- Lisp_Object console;
-
/* Set value in each console which hasn't shadowed the default */
LIST_LOOP_2 (console, Vconsole_list)
{
#ifndef Qnull_pointer
/* C guarantees that Qnull_pointer will be initialized to all 0 bits,
so the following is actually a no-op. */
- XSETOBJ (Qnull_pointer, (enum Lisp_Type) 0, 0);
+ XSETOBJ (Qnull_pointer, 0);
#endif
}
+static void
+defsymbol_massage_name_1 (Lisp_Object *location, const char *name, int dump_p,
+ int multiword_predicate_p)
+{
+ char temp[500];
+ int len = strlen (name) - 1;
+ int i;
+
+ if (multiword_predicate_p)
+ assert (len + 1 < sizeof (temp));
+ else
+ assert (len < sizeof (temp));
+ strcpy (temp, name + 1); /* Remove initial Q */
+ if (multiword_predicate_p)
+ {
+ strcpy (temp + len - 1, "_p");
+ len++;
+ }
+ for (i = 0; i < len; i++)
+ if (temp[i] == '_')
+ temp[i] = '-';
+ *location = Fintern (make_string ((const Bufbyte *) temp, len), Qnil);
+ if (dump_p)
+ staticpro (location);
+ else
+ staticpro_nodump (location);
+}
+
+void
+defsymbol_massage_name_nodump (Lisp_Object *location, const char *name)
+{
+ defsymbol_massage_name_1 (location, name, 0, 0);
+}
+
+void
+defsymbol_massage_name (Lisp_Object *location, const char *name)
+{
+ defsymbol_massage_name_1 (location, name, 1, 0);
+}
+
+void
+defsymbol_massage_multiword_predicate_nodump (Lisp_Object *location,
+ const char *name)
+{
+ defsymbol_massage_name_1 (location, name, 0, 1);
+}
+
+void
+defsymbol_massage_multiword_predicate (Lisp_Object *location, const char *name)
+{
+ defsymbol_massage_name_1 (location, name, 1, 1);
+}
+
void
defsymbol_nodump (Lisp_Object *location, const char *name)
{
Fset (*location, *location);
}
+void
+defkeyword_massage_name (Lisp_Object *location, const char *name)
+{
+ char temp[500];
+ int len = strlen (name);
+
+ assert (len < sizeof (temp));
+ strcpy (temp, name);
+ temp[1] = ':'; /* it's an underscore in the C variable */
+
+ defsymbol_massage_name (location, temp);
+ Fset (*location, *location);
+}
+
#ifdef DEBUG_XEMACS
/* Check that nobody spazzed writing a DEFUN. */
static void
* Once we have copied everything across, we re-use the original static
* structure to store a pointer to the newly allocated one. This will be
* used in emodules.c by emodules_doc_subr() to find a pointer to the
- * allocated object so that we can set its doc string propperly.
+ * allocated object so that we can set its doc string properly.
*
- * NOTE: We dont actually use the DOC pointer here any more, but we did
+ * NOTE: We don't actually use the DOC pointer here any more, but we did
* in an earlier implementation of module support. There is no harm in
* setting it here in case we ever need it in future implementations.
* subr->doc will point to the new subr structure that was allocated.
- * Code can then get this value from the statis subr structure and use
+ * Code can then get this value from the static subr structure and use
* it if required.
*
- * FIXME: Should newsubr be staticpro()'ed? I dont think so but I need
+ * FIXME: Should newsubr be staticpro()'ed? I don't think so but I need
* a guru to check.
*/
#define check_module_subr() \
XSYMBOL (sym)->function = Fcons (Qmacro, fun);
}
-void
-deferror (Lisp_Object *symbol, const char *name, const char *messuhhj,
- Lisp_Object inherits_from)
+static void
+deferror_1 (Lisp_Object *symbol, const char *name, const char *messuhhj,
+ Lisp_Object inherits_from, int massage_p)
{
Lisp_Object conds;
- defsymbol (symbol, name);
+ if (massage_p)
+ defsymbol_massage_name (symbol, name);
+ else
+ defsymbol (symbol, name);
assert (SYMBOLP (inherits_from));
conds = Fget (inherits_from, Qerror_conditions, Qnil);
}
void
+deferror (Lisp_Object *symbol, const char *name, const char *messuhhj,
+ Lisp_Object inherits_from)
+{
+ deferror_1 (symbol, name, messuhhj, inherits_from, 0);
+}
+
+void
+deferror_massage_name (Lisp_Object *symbol, const char *name,
+ const char *messuhhj, Lisp_Object inherits_from)
+{
+ deferror_1 (symbol, name, messuhhj, inherits_from, 1);
+}
+
+void
+deferror_massage_name_and_message (Lisp_Object *symbol, const char *name,
+ Lisp_Object inherits_from)
+{
+ char temp[500];
+ int i;
+ int len = strlen (name) - 1;
+
+ assert (len < sizeof (temp));
+ strcpy (temp, name + 1); /* Remove initial Q */
+ temp[0] = toupper (temp[0]);
+ for (i = 0; i < len; i++)
+ if (temp[i] == '_')
+ temp[i] = ' ';
+
+ deferror_1 (symbol, name, temp, inherits_from, 1);
+}
+
+void
syms_of_symbols (void)
{
- defsymbol (&Qvariable_documentation, "variable-documentation");
- defsymbol (&Qvariable_domain, "variable-domain"); /* I18N3 */
- defsymbol (&Qad_advice_info, "ad-advice-info");
- defsymbol (&Qad_activate, "ad-activate");
-
- defsymbol (&Qget_value, "get-value");
- defsymbol (&Qset_value, "set-value");
- defsymbol (&Qbound_predicate, "bound-predicate");
- defsymbol (&Qmake_unbound, "make-unbound");
- defsymbol (&Qlocal_predicate, "local-predicate");
- defsymbol (&Qmake_local, "make-local");
-
- defsymbol (&Qboundp, "boundp");
- defsymbol (&Qglobally_boundp, "globally-boundp");
- defsymbol (&Qmakunbound, "makunbound");
- defsymbol (&Qsymbol_value, "symbol-value");
- defsymbol (&Qset, "set");
- defsymbol (&Qsetq_default, "setq-default");
- defsymbol (&Qdefault_boundp, "default-boundp");
- defsymbol (&Qdefault_value, "default-value");
- defsymbol (&Qset_default, "set-default");
- defsymbol (&Qmake_variable_buffer_local, "make-variable-buffer-local");
- defsymbol (&Qmake_local_variable, "make-local-variable");
- defsymbol (&Qkill_local_variable, "kill-local-variable");
- defsymbol (&Qkill_console_local_variable, "kill-console-local-variable");
- defsymbol (&Qsymbol_value_in_buffer, "symbol-value-in-buffer");
- defsymbol (&Qsymbol_value_in_console, "symbol-value-in-console");
- defsymbol (&Qlocal_variable_p, "local-variable-p");
-
- defsymbol (&Qconst_integer, "const-integer");
- defsymbol (&Qconst_boolean, "const-boolean");
- defsymbol (&Qconst_object, "const-object");
- defsymbol (&Qconst_specifier, "const-specifier");
- defsymbol (&Qdefault_buffer, "default-buffer");
- defsymbol (&Qcurrent_buffer, "current-buffer");
- defsymbol (&Qconst_current_buffer, "const-current-buffer");
- defsymbol (&Qdefault_console, "default-console");
- defsymbol (&Qselected_console, "selected-console");
- defsymbol (&Qconst_selected_console, "const-selected-console");
+ DEFSYMBOL (Qvariable_documentation);
+ DEFSYMBOL (Qvariable_domain); /* I18N3 */
+ DEFSYMBOL (Qad_advice_info);
+ DEFSYMBOL (Qad_activate);
+
+ DEFSYMBOL (Qget_value);
+ DEFSYMBOL (Qset_value);
+ DEFSYMBOL (Qbound_predicate);
+ DEFSYMBOL (Qmake_unbound);
+ DEFSYMBOL (Qlocal_predicate);
+ DEFSYMBOL (Qmake_local);
+
+ DEFSYMBOL (Qboundp);
+ DEFSYMBOL (Qglobally_boundp);
+ DEFSYMBOL (Qmakunbound);
+ DEFSYMBOL (Qsymbol_value);
+ DEFSYMBOL (Qset);
+ DEFSYMBOL (Qsetq_default);
+ DEFSYMBOL (Qdefault_boundp);
+ DEFSYMBOL (Qdefault_value);
+ DEFSYMBOL (Qset_default);
+ DEFSYMBOL (Qmake_variable_buffer_local);
+ DEFSYMBOL (Qmake_local_variable);
+ DEFSYMBOL (Qkill_local_variable);
+ DEFSYMBOL (Qkill_console_local_variable);
+ DEFSYMBOL (Qsymbol_value_in_buffer);
+ DEFSYMBOL (Qsymbol_value_in_console);
+ DEFSYMBOL (Qlocal_variable_p);
+
+ DEFSYMBOL (Qconst_integer);
+ DEFSYMBOL (Qconst_boolean);
+ DEFSYMBOL (Qconst_object);
+ DEFSYMBOL (Qconst_specifier);
+ DEFSYMBOL (Qdefault_buffer);
+ DEFSYMBOL (Qcurrent_buffer);
+ DEFSYMBOL (Qconst_current_buffer);
+ DEFSYMBOL (Qdefault_console);
+ DEFSYMBOL (Qselected_console);
+ DEFSYMBOL (Qconst_selected_console);
DEFSUBR (Fintern);
DEFSUBR (Fintern_soft);
sym = Fintern (make_string_nocopy ((const Bufbyte *) symbol_name,
strlen (symbol_name)), Qnil);
- XSETOBJ (XSYMBOL (sym)->value, Lisp_Type_Record, magic);
+ XSETOBJ (XSYMBOL (sym)->value, magic);
}
void
/* Definitions of symbol-value forwarding for XEmacs Lisp interpreter.
Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
XRECORD_LHEADER (x)->type <= lrecord_type_max_symbol_value_magic)
#define XSYMBOL_VALUE_MAGIC_TYPE(v) \
(((struct symbol_value_magic *) XPNTR (v))->type)
-#define XSETSYMBOL_VALUE_MAGIC(s, p) XSETOBJ (s, Lisp_Type_Record, p)
+#define XSETSYMBOL_VALUE_MAGIC(s, p) XSETOBJ (s, p)
void print_symbol_value_magic (Lisp_Object, Lisp_Object, int);
/********** The various different symbol-value-magic types ***********/
void defsubr_macro (Lisp_Subr *);
#define DEFSUBR_MACRO(Fname) defsubr_macro (&S##Fname)
+void defsymbol_massage_name (Lisp_Object *location, const char *name);
+void defsymbol_massage_name_nodump (Lisp_Object *location, const char *name);
+void defsymbol_massage_multiword_predicate (Lisp_Object *location,
+ const char *name);
+void defsymbol_massage_multiword_predicate_nodump (Lisp_Object *location,
+ const char *name);
void defsymbol (Lisp_Object *location, const char *name);
void defsymbol_nodump (Lisp_Object *location, const char *name);
+#define DEFSYMBOL(name) defsymbol_massage_name (&name, #name)
+#define DEFSYMBOL_NO_DUMP(name) defsymbol_massage_name_nodump (&name, #name)
+#define DEFSYMBOL_MULTIWORD_PREDICATE(name) \
+ defsymbol_massage_multiword_predicate (&name, #name)
+#define DEFSYMBOL_MULTIWORD_PREDICATE_NO_DUMP(name) \
+ defsymbol_massage_multiword_predicate_nodump (&name, #name)
+
void defkeyword (Lisp_Object *location, const char *name);
+void defkeyword_massage_name (Lisp_Object *location, const char *name);
+#define DEFKEYWORD(name) defkeyword_massage_name (&name, #name)
void deferror (Lisp_Object *symbol, const char *name,
const char *message, Lisp_Object inherits_from);
+void deferror_massage_name (Lisp_Object *symbol, const char *name,
+ const char *message, Lisp_Object inherits_from);
+void deferror_massage_name_and_message (Lisp_Object *symbol, const char *name,
+ Lisp_Object inherits_from);
+#define DEFERROR(name, message, inherits_from) \
+ deferror_massage_name (&name, #name, message, inherits_from)
+/* In this case, the error message is the same as the name, modulo some
+ prettifying */
+#define DEFERROR_STANDARD(name, inherits_from) \
+ deferror_massage_name_and_message (&name, #name, inherits_from)
/* Macros we use to define forwarded Lisp variables.
These are used in the syms_of_FILENAME functions. */
void syms_of_device_mswindows (void);
void syms_of_device_x (void);
void syms_of_device (void);
+void syms_of_dialog_mswindows (void);
void syms_of_dialog_x (void);
void syms_of_dialog (void);
void syms_of_dired (void);
void syms_of_eldap (void);
void syms_of_postgresql (void);
void syms_of_gpmevent (void);
+void syms_of_win32 (void);
/* Initialize the console types (dump-time but for reinit_). */
void init_xemacs_process (void);
void init_redisplay (void);
void init_sunpro (void);
+void init_win32 (void);
#endif /* INCLUDED_symsinit_h_ */
and the like. */
struct buffer *regex_emacs_buffer;
+/* Tell the regex routines whether buffer is used or not. */
+int regex_emacs_buffer_p;
+
Lisp_Object Vstandard_syntax_table;
Lisp_Object Vsyntax_designator_chars_string;
extern int no_quit_in_re_search;
extern struct buffer *regex_emacs_buffer;
+extern int regex_emacs_buffer_p;
void update_syntax_table (Lisp_Char_Table *ct);
#endif /* TIOCGWINSZ or ISC4_0 */
#endif /* USG */
-#ifdef HAVE_SYS_STROPTS_H
-#include <sys/stropts.h>
-#endif /* HAVE_SYS_STROPTS_H */
-
/* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */
#ifndef LPASS8
#define LPASS8 0
#if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON)
{
int max_canon = fpathconf (fd, _PC_MAX_CANON);
+#ifdef __hpux__
+ /* HP-UX 10.20 fpathconf returns 768, but this results in
+ truncated input lines, while 255 works. */
+ if (max_canon > 255) max_canon = 255;
+#endif
return (max_canon < 0 ? SAFE_MAX_CANON :
max_canon > SAFE_MAX_CANON ? max_canon - MAX_CANON_SLACK :
max_canon);
void
setup_pty (int fd)
{
- /* I'm told that TOICREMOTE does not mean control chars
+ /* I'm told that TIOCREMOTE does not mean control chars
"can't be sent" but rather that they don't have
input-editing or signaling effects.
That should be good, because we have other ways
#ifdef SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP
-static int inherited_pgroup;
-static int inherited_tty_pgroup;
+static pid_t inherited_pgroup;
+static pid_t inherited_tty_pgroup;
#endif
CONSOLE_LIVE_P (XCONSOLE (Vcontrolling_terminal)))
{
int fd = open ("/dev/tty", O_RDWR, 0);
- int me = getpid ();
+ pid_t me = getpid ();
EMACS_BLOCK_SIGNAL (SIGTTOU);
EMACS_SET_TTY_PROCESS_GROUP (fd, &me);
EMACS_UNBLOCK_SIGNAL (SIGTTOU);
/*
* Return the address of the start of the data segment prior to
* doing an unexec. After unexec the return value is undefined.
- * See crt0.c for further information and definition of data_start.
+ * See ecrt0.c for further information and definition of data_start.
*
* Apparently, on BSD systems this is etext at startup. On
* USG systems (swapping) this is highly mmu dependent and
}
#endif /* ENCAPSULATE_FSTAT */
-#ifdef ENCAPSULATE_STAT
int
-sys_stat (const char *path, struct stat *buf)
+xemacs_stat (const char *path, struct stat *buf)
{
PATHNAME_CONVERT_OUT (path);
#ifdef WIN32_NATIVE
return stat (path, buf);
#endif
}
-#endif /* ENCAPSULATE_STAT */
/****************** file-manipulation calls *****************/
int cpid, status, fd;
struct stat statbuf;
- if (stat (dpath, &statbuf) == 0)
+ if (stat (dpath, &statbuf) == 0) /* we do want stat() here */
{
errno = EEXIST; /* Stat worked, so it already exists */
return -1;
int cpid, status, fd;
struct stat statbuf;
- if (stat (dpath, &statbuf) != 0)
+ if (stat (dpath, &statbuf) != 0) /* we do want stat() here */
{
/* Stat just set errno. We don't have to */
return -1;
}
#endif /* USE_DL_STUBS */
-
-\f
-
-#ifndef HAVE_STRCASECMP
-/*
- * From BSD
- */
-static unsigned char charmap[] = {
- '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
- '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
- '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
- '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
- '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
- '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
- '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
- '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
- '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
- '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
- '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
- '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
- '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
- '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
- '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
- '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
- '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
- '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
- '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
- '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
- '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
- '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
- '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
- '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
- '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
- '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
-};
-
-int
-strcasecmp (char *s1, char *s2)
-{
- unsigned char *cm = charmap;
- unsigned char *us1 = (unsigned char *) s1;
- unsigned char *us2 = (unsigned char *)s2;
-
- while (cm[*us1] == cm[*us2++])
- if (*us1++ == '\0')
- return (0);
-
- return (cm[*us1] - cm[*--us2]);
-}
-#endif /* !HAVE_STRCASECMP */
dll_handle
dll_open (const char *fname)
{
- return (dll_handle)dlopen (fname, RTLD_LAZY | RTLD_GLOBAL);
+ return (dll_handle) dlopen (fname, RTLD_LAZY | RTLD_GLOBAL);
}
int
dll_close (dll_handle h)
{
- return dlclose((void *)h);
+ return dlclose ((void *) h);
}
dll_func
#ifdef DLSYM_NEEDS_UNDERSCORE
char *buf = alloca_array (char, strlen (n) + 2);
*buf = '_';
- (void)strcpy(buf + 1, n);
+ strcpy (buf + 1, n);
n = buf;
#endif
- return (dll_func)dlsym ((void *)h, n);
+ return (dll_func) dlsym ((void *) h, n);
}
dll_var
#ifdef DLSYM_NEEDS_UNDERSCORE
char *buf = alloca_array (char, strlen (n) + 2);
*buf = '_';
- (void)strcpy(buf + 1, n);
+ strcpy (buf + 1, n);
n = buf;
#endif
return (dll_var)dlsym ((void *)h, n);
dll_error (dll_handle h)
{
#if defined(HAVE_DLERROR) || defined(dlerror)
- return (const char *)dlerror ();
+ return (const char *) dlerror ();
#elif defined(HAVE__DLERROR)
- return (const char *)_dlerror();
+ return (const char *) _dlerror();
#else
return "Shared library error";
#endif
dll_handle
dll_open (const char *fname)
{
- shl_t h = shl_load (fname, BIND_DEFERRED,0L);
- shl_t *hp = NULL;
+ /* shl_load will hang hard if passed a NULL fname. */
+ if (fname == NULL) return NULL;
- if (h)
- {
- hp = (shl_t *)malloc (sizeof (shl_t));
- if (!hp)
- shl_unload(h);
- else
- *hp = h;
- }
- return (dll_handle)hp;
+ return (dll_handle) shl_load (fname, BIND_DEFERRED,0L);
}
int
dll_close (dll_handle h)
{
- shl_t hp = *((shl_t *)h);
- free (hp);
- return shl_unload(h);
+ return shl_unload ((shl_t) h);
}
dll_func
{
long handle = 0L;
- if (shl_findsym ((shl_t *)h, n, TYPE_PROCEDURE, &handle))
+ if (shl_findsym ((shl_t *) &h, n, TYPE_PROCEDURE, &handle))
return NULL;
- return (dll_func)handle;
+ return (dll_func) handle;
}
dll_var
{
long handle = 0L;
- if (shl_findsym ((shl_t *)h, n, TYPE_DATA, &handle))
+ if (shl_findsym ((shl_t *) &h, n, TYPE_DATA, &handle))
return NULL;
- return (dll_var)handle;
+ return (dll_var) handle;
}
const char *
if (rc)
return NULL;
- return (dll_handle)1;
+ return (dll_handle) 1;
}
int
DLL_FUNC
dll_function (dll_handle h, const char *n)
{
- return dld_get_func(n);
+ return dld_get_func (n);
}
DLL_FUNC
dll_variable (dll_handle h, const char *n)
{
- return dld_get_symbol(n);
+ return dld_get_symbol (n);
}
#elif defined (WIN32_NATIVE)
dll_handle
dll_open (const char *fname)
{
- return (dll_handle)LoadLibrary (fname);
+ return (dll_handle) LoadLibrary (fname);
}
int
dll_func
dll_function (dll_handle h, const char *n)
{
- return (dll_func)GetProcAddress (h,n);
+ return (dll_func) GetProcAddress (h, n);
}
dll_func
dll_variable (dll_handle h, const char *n)
{
- return (dll_func)GetProcAddress (h,n);
+ return (dll_func) GetProcAddress (h, n);
}
const char *
}
#endif
+/* More stand-ins ... */
+
+#define Qdll_filename_encoding Qfile_name
+#define Qdll_function_name_encoding Qnative
+
#endif /* INCLUDED_sysdll_h_ */
#include <sys/stat.h>
#ifndef WIN32_NATIVE
+/* Some configuration files' definitions for the LOAD_AVE_CVT macro
+ (like sparc.h's) use macros like FSCALE, defined here. */
#include <sys/param.h>
#endif
#endif
#if defined (ENCAPSULATE_FSTAT) && !defined (DONT_ENCAPSULATE)
# undef fstat
-/* Need to use arguments to avoid messing with struct stat */
-# define fstat(fd, buf) sys_fstat (fd, buf)
+# define fstat sys_fstat
#endif
#if !defined (ENCAPSULATE_FSTAT) && defined (DONT_ENCAPSULATE)
# define sys_fstat fstat
#endif
-#ifdef ENCAPSULATE_STAT
-int sys_stat (const char *path, struct stat *buf);
-#endif
-#if defined (ENCAPSULATE_STAT) && !defined (DONT_ENCAPSULATE)
-# undef stat
-/* Need to use arguments to avoid messing with struct stat */
-# define stat(path, buf) sys_stat (path, buf)
-#endif
-#if !defined (ENCAPSULATE_STAT) && defined (DONT_ENCAPSULATE)
-# define sys_stat stat
-#endif
+int xemacs_stat (const char *path, struct stat *buf);
/* encapsulations: file-manipulation calls */
#include <sys/select.h>
#endif
+#ifdef HAVE_SYS_STROPTS_H
+#include <sys/stropts.h> /* isastream(), I_PUSH */
+#endif
+
+#ifdef HAVE_SYS_STRTIO_H
+#include <sys/strtio.h> /* TIOCSIGNAL */
+#endif
+
+#ifdef HAVE_PTY_H
+#include <pty.h> /* openpty() on Tru64, Linux */
+#endif
+
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h> /* openpty() on BSD */
+#endif
+
#ifdef FD_SET
/* We could get this from param.h, but better not to depend on finding that.
/* On bsd, [man says] kill does not accept a negative number to kill a pgrp.
Must do that using the killpg call. */
-#ifdef BSD
-#define EMACS_KILLPG(gid, signo) killpg (gid, signo)
+#ifdef HAVE_KILLPG
+#define EMACS_KILLPG(pid, signo) killpg (pid, signo)
#else
#ifdef WIN32_NATIVE
-#define EMACS_KILLPG(gid, signo) kill (gid, signo)
+#define EMACS_KILLPG(pid, signo) kill (pid, signo)
#else
-#define EMACS_KILLPG(gid, signo) kill (-(gid), signo)
+#define EMACS_KILLPG(pid, signo) kill (-(pid), signo)
#endif
#endif
/* Manipulate a terminal's current (foreground) process group */
/* -------------------------------------------------------------------- */
-/* EMACS_HAVE_TTY_PGRP is true if we can get and set the tty's current
- controlling process group.
+/* EMACS_GET_TTY_PGRP(int FD, pid_t *PGID) sets *PGID to the terminal
+ FD's current foreground process group. Return -1 if there is an error.
- EMACS_GET_TTY_PGRP(int FD, int *PGID) sets *PGID the terminal FD's
- current process group. Return -1 if there is an error.
+ EMACS_SET_TTY_PGRP(int FD, pid_t *PGID) sets the terminal FD's current
+ foreground process group to *PGID. Return -1 if there is an error.
- EMACS_SET_TTY_PGRP(int FD, int *PGID) sets the terminal FD's
- current process group to *PGID. Return -1 if there is an error. */
+ We prefer using the ioctl (BSD) interface instead of its Posix
+ replacement tgetpgrp/tcsetpgrp since that is documented as being
+ restricted to processes sharing the same controlling tty. */
-/* HPUX tty process group stuff doesn't work, says the anonymous voice
- from the past. */
-/* But HPUX people say it does, so I've removed it. --ben */
-# ifdef TIOCGPGRP
-# define EMACS_HAVE_TTY_PGRP
-# else
-# ifdef HAVE_TERMIOS
-# define EMACS_HAVE_TTY_PGRP
-# endif
-# endif
-
-#ifdef EMACS_HAVE_TTY_PGRP
-
-#if defined (HAVE_TERMIOS) && ! defined (BSD_TERMIOS)
+#if defined (TIOCGPGRP)
-/* Resist the urge to insert needless extra parentheses. */
-#define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp (fd))
-#define EMACS_SET_TTY_PGRP(fd, pgid) tcsetpgrp (fd, *(pgid))
+#define EMACS_GET_TTY_PROCESS_GROUP(fd, pgid) ioctl (fd, TIOCGPGRP, pgid)
+#define EMACS_SET_TTY_PROCESS_GROUP(fd, pgid) ioctl (fd, TIOCSPGRP, pgid)
-#elif defined (TIOCSPGRP)
+#elif defined (HAVE_TCGETPGRP)
-#define EMACS_GET_TTY_PGRP(fd, pgid) (ioctl ((fd), TIOCGPGRP, (pgid)))
-#define EMACS_SET_TTY_PGRP(fd, pgid) (ioctl ((fd), TIOCSPGRP, (pgid)))
+#define EMACS_GET_TTY_PROCESS_GROUP(fd, pgid) (*(pgid) = tcgetpgrp (fd))
+#define EMACS_SET_TTY_PROCESS_GROUP(fd, pgid) tcsetpgrp (fd, *(pgid))
-#endif
-
-#endif /* EMACS_HAVE_TTY_PGRP */
-
-#ifndef EMACS_GET_TTY_PGRP
+#else
/* Just ignore this for now and hope for the best */
-#define EMACS_GET_TTY_PGRP(fd, pgid) 0
-#define EMACS_SET_TTY_PGRP(fd, pgif) 0
+#define EMACS_GET_TTY_PROCESS_GROUP(fd, pgid) 0
+#define EMACS_SET_TTY_PROCESS_GROUP(fd, pgif) 0
#endif
-/* XEmacs interim backward-compatibility */
-#define EMACS_GET_TTY_PROCESS_GROUP EMACS_GET_TTY_PGRP
-#define EMACS_SET_TTY_PROCESS_GROUP EMACS_SET_TTY_PGRP
-
/* EMACS_GETPGRP (arg) returns the process group of the terminal. */
#ifdef GETPGRP_VOID
#define FONTENUMPROC FONTENUMEXPROC
#define ntmTm ntmentm
#elif defined (WIN32_LEAN_AND_MEAN)
+#ifdef HAVE_X_WINDOWS
+/* Christ almighty. The problems you get when combining two large code bases,
+ neither with any respect for namespace purity. */
+#undef Status
+#endif
#include <winspool.h>
+#ifdef HAVE_X_WINDOWS
+#define Status int
+#endif
#include <mmsystem.h>
#include <shellapi.h>
#include <ddeml.h>
/* Definitions for Mule under MS Windows */
-/* extern int mswindows_windows9x_p; */
-/* #define EIUNICODE_P (!mswindows_windows9x_p) */
-#define EIUNICODE_P 0
+#include <wchar.h>
+
+#ifdef CYGWIN
+
+/* All but wcscmp and wcslen left out of Cygwin headers -- but present
+ in /usr/include/mingw32/string.h! */
+wchar_t* wcscat (wchar_t*, const wchar_t*);
+wchar_t* wcschr (const wchar_t*, wchar_t);
+int wcscoll (const wchar_t*, const wchar_t*);
+wchar_t* wcscpy (wchar_t*, const wchar_t*);
+size_t wcscspn (const wchar_t*, const wchar_t*);
+/* Note: No wcserror in CRTDLL. */
+wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
+int wcsncmp(const wchar_t*, const wchar_t*, size_t);
+wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
+wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
+wchar_t* wcsrchr(const wchar_t*, wchar_t);
+size_t wcsspn(const wchar_t*, const wchar_t*);
+wchar_t* wcsstr(const wchar_t*, const wchar_t*);
+wchar_t* wcstok(wchar_t*, const wchar_t*);
+size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
+
+#endif /* CYGWIN */
+
+// extern int mswindows_windows9x_p;
+/* #define XEUNICODE_P (!mswindows_windows9x_p) */
+#define XEUNICODE_P 0
+
+#define XETCHAR_SIZE (XEUNICODE_P ? sizeof (WCHAR) : sizeof (CHAR))
+#define MAX_XETCHAR_SIZE sizeof (WCHAR)
+#define XETEXT1(arg) (XEUNICODE_P ? ((char *) (L##arg)) : (arg))
+/* We need to do this indirection in case ARG is also a manifest constant.
+ I don't really understand why. --ben */
+#define XETEXT(arg) XETEXT1(arg)
+#define XECOPY_TCHAR(ptr, ch) \
+ (XEUNICODE_P ? (* (LPWSTR) (ptr) = L##ch) : (* (LPSTR) (ptr) = (ch)))
+#define xetcslen(arg) (XEUNICODE_P ? wcslen ((wchar_t *) arg) : strlen (arg))
+#define xetcscmp(s1, s2) \
+ (XEUNICODE_P ? wcscmp ((wchar_t *) s1, (wchar_t *) s2) \
+ : strcmp (s1, s2))
+#define xetcscpy(s1, s2) \
+ (XEUNICODE_P ? (char *) wcscpy ((wchar_t *) s1, (wchar_t *) s2) \
+ : strcpy (s1, s2))
+#define xetcschr(s, ch) \
+ (XEUNICODE_P ? (char *) wcschr ((wchar_t *) s, (WCHAR) ch) \
+ : strchr (s, ch))
+#define xetcsrchr(s, ch) \
+ (XEUNICODE_P ? (char *) wcsrchr ((wchar_t *) s, (WCHAR) ch) \
+ : strrchr (s, ch))
+
+
+#define LOCAL_FILE_FORMAT_TO_TSTR(path, out) \
+do { \
+ Bufbyte *lttff; \
+ \
+ LOCAL_TO_WIN32_FILE_FORMAT (path, lttff); \
+ C_STRING_TO_EXTERNAL (lttff, out, Qmswindows_tstr); \
+} while (0)
+
+Lisp_Object tstr_to_local_file_format (Extbyte *pathout);
+
+#ifdef CYGWIN
+#define LOCAL_TO_WIN32_FILE_FORMAT(path, pathout) \
+do { \
+ Lisp_Object ltwff1 = (path); \
+ int ltwff2 = \
+ cygwin_posix_to_win32_path_list_buf_size (XSTRING_DATA (ltwff1)); \
+ pathout = (Bufbyte *) alloca (ltwff2); \
+ cygwin_posix_to_win32_path_list (XSTRING_DATA (ltwff1), pathout); \
+} while (0)
+#else
+#define LOCAL_TO_WIN32_FILE_FORMAT(path, pathout) \
+do { \
+ (pathout) = XSTRING_DATA (path); \
+} while (0)
+#endif
+
+#ifdef CYGWIN
+#define WIN32_TO_LOCAL_FILE_FORMAT(path, pathout) \
+do { \
+ Bufbyte *wtlff1 = (path); \
+ int wtlff2 = \
+ cygwin_win32_to_posix_path_list_buf_size (wtlff1); \
+ Bufbyte *wtlff3 = (Bufbyte *) alloca (wtlff2); \
+ cygwin_win32_to_posix_path_list (wtlff1, wtlff3); \
+ (pathout) = build_string (wtlff3); \
+} while (0)
+#else
+#define WIN32_TO_LOCAL_FILE_FORMAT(path, pathout) \
+do { \
+ (pathout) = build_string (path); \
+} while (0)
+#endif
+
+extern BOOL (WINAPI *xSwitchToThread) (VOID);
+
+extern HKL (WINAPI *xGetKeyboardLayout) (DWORD);
+extern BOOL (WINAPI *xSetMenuDefaultItem) (HMENU, UINT, UINT);
+extern BOOL (WINAPI *xInsertMenuItemA) (HMENU, UINT, BOOL, LPCMENUITEMINFOA);
+extern BOOL (WINAPI *xInsertMenuItemW) (HMENU, UINT, BOOL, LPCMENUITEMINFOW);
+extern HANDLE (WINAPI *xLoadImageA) (HINSTANCE, LPCSTR, UINT, int, int, UINT);
+extern HANDLE (WINAPI *xLoadImageW) (HINSTANCE, LPCWSTR, UINT, int, int, UINT);
+extern ATOM (WINAPI *xRegisterClassExA) (CONST WNDCLASSEXA *);
+extern ATOM (WINAPI *xRegisterClassExW) (CONST WNDCLASSEXW *);
+
+extern int (WINAPI *xEnumFontFamiliesExA) (HDC, LPLOGFONTA, FONTENUMPROCA,
+ LPARAM, DWORD);
+extern int (WINAPI *xEnumFontFamiliesExW) (HDC, LPLOGFONTW, FONTENUMPROCW,
+ LPARAM, DWORD);
-#define EITCHAR_SIZE (EIUNICODE_P ? sizeof (WCHAR) : sizeof (CHAR))
-#define EITEXT(arg) (EIUNICODE_P ? L##arg : (arg))
-#define EICOPY_TCHAR(ptr, ch) \
- (EIUNICODE_P ? (* (LPWSTR) (ptr) = L##ch) : (* (LPSTR) (ptr) = (ch)))
+extern DWORD (WINAPI *xSHGetFileInfoA) (LPCSTR, DWORD, SHFILEINFOA FAR *, UINT,
+ UINT);
+extern DWORD (WINAPI *xSHGetFileInfoW) (LPCWSTR, DWORD, SHFILEINFOW FAR *,
+ UINT, UINT);
#endif /* INCLUDED_syswindows_h_ */
const char *term;
int malloc_size = 0;
int c;
- char *tcenv; /* TERMCAP value, if it contais :tc=. */
+ char *tcenv; /* TERMCAP value, if it contains :tc=. */
const char *indirect = 0; /* Terminal type in :tc= in TERMCAP value. */
tem = getenv ("TERMCAP");
/* Synched up with: Not in FSF. */
+/* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-8-00. */
+
#include <config.h>
#include "lisp.h"
return data->help_string;
}
-static void
-print_toolbar_button (Lisp_Object obj, Lisp_Object printcharfun,
- int escapeflag)
-{
- struct toolbar_button *tb = XTOOLBAR_BUTTON (obj);
- char buf[100];
-
- if (print_readably)
- error ("printing unreadable object #<toolbar-button 0x%x>",
- tb->header.uid);
-
- sprintf (buf, "#<toolbar-button 0x%x>", tb->header.uid);
- write_c_string (buf, printcharfun);
-}
-
DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button,
- mark_toolbar_button, print_toolbar_button,
- 0, 0, 0, 0,
+ mark_toolbar_button, 0, 0, 0, 0, 0,
struct toolbar_button);
DEFUN ("toolbar-button-p", Ftoolbar_button_p, 1, 1, 0, /*
which buffer to check in. #### I think this is a bad thing.
See if we can't get enough information to this function so
that it can check.
-
+
#### Wrong. We shouldn't be checking the value at all here.
The user might set or change the value at any time. */
value = Fsymbol_value (elt[0]);
#include "elhash.h"
#include "process.h"
#include "tooltalk.h"
+#include "syssignal.h"
Lisp_Object Vtooltalk_fd;
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_message_arg_val_set (m, n, value_ext);
}
else if (EQ (attribute, Qtt_status))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
(*fun_str) (m, value_ext);
}
{
const char *vtype_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, vtype, C_STRING_ALLOCA, vtype_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (vtype, vtype_ext, Qnative);
if (NILP (value))
tt_message_arg_add (m, n, vtype_ext, NULL);
else if (STRINGP (value))
{
const char *value_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_message_arg_add (m, n, vtype_ext, value_ext);
}
else if (INTP (value))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_file_add (p, value_ext);
}
else if (EQ (attribute, Qtt_object))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_object_add (p, value_ext);
}
else if (EQ (attribute, Qtt_op))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_op_add (p, value_ext);
}
else if (EQ (attribute, Qtt_otype))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_otype_add (p, value_ext);
}
else if (EQ (attribute, Qtt_scope))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_sender_add (p, value_ext);
}
else if (EQ (attribute, Qtt_sender_ptype))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_sender_ptype_add (p, value_ext);
}
else if (EQ (attribute, Qtt_session))
{
const char *value_ext;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_session_add (p, value_ext);
}
else if (EQ (attribute, Qtt_state))
{
const char *vtype_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, vtype, C_STRING_ALLOCA, vtype_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (vtype, vtype_ext, Qnative);
if (NILP (value))
tt_pattern_arg_add (p, n, vtype_ext, NULL);
else if (STRINGP (value))
{
const char *value_ext;
- TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+ LISP_STRING_TO_EXTERNAL (value, value_ext, Qnative);
tt_pattern_arg_add (p, n, vtype_ext, value_ext);
}
else if (INTP (value))
defsymbol (&Qtt_reply, "reply");
defsymbol (&Qtt_fail, "fail");
- deferror (&Qtooltalk_error, "tooltalk-error", "ToolTalk error", Qio_error);
+ DEFERROR (Qtooltalk_error, "ToolTalk error", Qio_error);
}
void
#include <fcntl.h>
#include <config.h>
#include <string.h>
+
+#define DONT_ENCAPSULATE /* filenames are external in unex*.c */
#include "sysfile.h"
+
#define PERROR(arg) perror(arg);exit(-1)
#ifndef HAVE_A_OUT_H
#include <errno.h>
#include <a.out.h>
+#include "lisp.h"
/*
* Minor modification to enable dumping with shared libraries added by
#ifdef HPUX_USE_SHLIBS
#include <dl.h> /* User-space dynamic loader entry points */
-void Save_Shared_Data(void);
-int run_time_remap();
+static void Save_Shared_Data (void);
+static void Restore_Shared_Data (void);
#endif
-#define min(x,y) ( ((x)<(y))?(x):(y) )
-
void write_header(int file, struct header *hdr, struct som_exec_auxhdr *auxhdr);
void read_header (int file, struct header *hdr, struct som_exec_auxhdr *auxhdr);
void save_data_space (int file, struct header *hdr,
/* Create a new a.out file, same as old but with current data space */
int
-unexec(char new_name[], /* name of the new a.out file to be created */
- char old_name[], /* name of the old a.out file */
- char *new_end_of_text, /* ptr to new edata/etext; NOT USED YET */
- int dummy1, int dummy2) /* not used by emacs */
+unexec (char *new_name, /* name of the new a.out file to be created */
+ char *old_name, /* name of the old a.out file */
+ uintptr_t new_end_of_text, /* ptr to new edata/etext; NOT USED YET */
+ uintptr_t dummy1, uintptr_t dummy2) /* not used by emacs */
{
int old, new;
int old_size, new_size;
for (; size > 0; size -= len)
{
- len = min(size, sizeof(buffer));
- if (read(old, buffer, len) != len)
- { perror("Read failure on a.out file"); exit(1); }
- if (write(new, buffer, len) != len)
- { perror("Write failure in a.out file"); exit(1); }
+ len = size < sizeof (buffer) ? size : sizeof (buffer);
+ if (read (old, buffer, len) != len)
+ {
+ perror ("Read failure on a.out file");
+ exit (1);
+ }
+ if (write (new, buffer, len) != len)
+ {
+ perror ("Write failure in a.out file");
+ exit (1);
+ }
}
}
void *Brk_On_Dump = 0; /* Brk value to restore... stored as a global */
-void Save_Shared_Data () {
- Brk_On_Dump = sbrk( 0 );
-}
-
-void Restore_Shared_Data () {
- brk ( Brk_On_Dump );
+static void
+Save_Shared_Data (void)
+{
+ Brk_On_Dump = sbrk (0);
}
-int run_time_remap (int d) {
- Restore_Shared_Data();
+static void
+Restore_Shared_Data (void)
+{
+ brk (Brk_On_Dump);
}
/* run_time_remap is the magic called by startup code in the dumped executable
- * if RUN_TIME_REMAP is set.
- */
+ if RUN_TIME_REMAP is set. */
+int
+run_time_remap (char *dummy)
+{
+ Restore_Shared_Data ();
+ return 0;
+}
#endif /* HPUX_USE_SHLIBS */
* version of my_ebss in lastfile.c and a new firstfile.c file. jhar */
#include <config.h>
-#include <stdlib.h> /* _fmode */
-#include <stdio.h>
-#include <fcntl.h>
-#include <windows.h>
+#include "lisp.h"
+
+#include "syswindows.h"
#include "nt.h"
#include "ntheap.h"
}
/* Dump out .data and .bss sections into a new executable. */
-void
-unexec (char *new_name, char *old_name, void *start_data, void *start_bss,
- void *entry_address)
+int
+unexec (char *new_name, char *old_name, unsigned int start_data,
+ unsigned int start_bss, unsigned int entry_address)
{
file_data in_file, out_file;
char out_filename[MAX_PATH], in_filename[MAX_PATH];
close_file_data (&in_file);
close_file_data (&out_file);
+
+ return 0;
}
/* Routines to manipulate NT executable file sections. */
if (data_size > five_percent * 15)
{
warnlevel++;
- (*warn_function) ("Warning: past 75% of memory limit");
+ (*save_warn_fun) ("Warning: past 75% of memory limit");
}
break;
if (data_size > five_percent * 17)
{
warnlevel++;
- (*warn_function) ("Warning: past 85% of memory limit");
+ (*save_warn_fun) ("Warning: past 85% of memory limit");
}
break;
if (data_size > five_percent * 19)
{
warnlevel++;
- (*warn_function) ("Warning: past 95% of memory limit");
+ (*save_warn_fun) ("Warning: past 95% of memory limit");
}
break;
default:
- (*warn_function) ("Warning: past acceptable memory limits");
+ (*save_warn_fun) ("Warning: past acceptable memory limits");
break;
}
warn_function = save_warn_fun;
warnlevel = 2;
if (EXCEEDS_LISP_PTR (cp))
- (*warn_function) ("Warning: memory in use exceeds lisp pointer size");
+ {
+ if (warn_function)
+ {
+ /* temporarily reset the warn_function to 0 or we will get infinite
+ looping. */
+ save_warn_fun = warn_function;
+ warn_function = 0;
+ (*save_warn_fun)
+ ("Warning: memory in use exceeds lisp pointer size");
+ warn_function = save_warn_fun;
+ }
+ }
}
/* Cause reinitialization based on job parameters;
/* Divider surface width (not counting 3-d borders) */
Lisp_Object Vvertical_divider_line_width;
-/* Spacing between outer egde of divider border and window edge */
+/* Spacing between outer edge of divider border and window edge */
Lisp_Object Vvertical_divider_spacing;
/* How much to scroll by per-line. */
p->line_start_cache = Dynarr_new (line_start_cache);
p->subwindow_instance_cache = make_lisp_hash_table (30,
HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQUAL);
+ HASH_TABLE_EQ);
p->line_cache_last_updated = Qzero;
INIT_DISP_VARIABLE (last_point_x, 0);
INIT_DISP_VARIABLE (last_point_y, 0);
{
if (!NILP (w->hchild) || !NILP (w->vchild))
return 0;
-
+
#ifdef HAVE_SCROLLBARS
if (!NILP (w->scrollbar_on_top_p))
return window_scrollbar_height (w);
The names are somewhat confusing; here's a table to help out:
- width height
+ width height
-------------------------------------------------------------------------
w/o gutters
(rows/columns) window-width window-text-area-height
}
DEFUN ("modeline-hscroll", Fmodeline_hscroll, 0, 1, 0, /*
-Return the horizontal scrolling ammount of WINDOW's modeline.
+Return the horizontal scrolling amount of WINDOW's modeline.
If the window has no modeline, return nil.
*/
(window))
}
DEFUN ("set-modeline-hscroll", Fset_modeline_hscroll, 2, 2, 0, /*
-Set the horizontal scrolling ammount of WINDOW's modeline to NCOL.
+Set the horizontal scrolling amount of WINDOW's modeline to NCOL.
If NCOL is negative, it will silently be forced to 0.
If the window has no modeline, return nil. Otherwise, return the actual
value that was set.
(window))
{
struct window *w = decode_window (window);
+ struct frame *f = XFRAME (w->frame);
- int left = w->pixel_left;
- int top = w->pixel_top;
+ int left =
+ w->pixel_left - FRAME_LEFT_BORDER_END (f) - FRAME_LEFT_GUTTER_BOUNDS (f);
+ int top =
+ w->pixel_top - FRAME_TOP_BORDER_END (f) - FRAME_TOP_GUTTER_BOUNDS (f);
return list4 (make_int (left),
make_int (top),
DEFUN ("window-point", Fwindow_point, 0, 1, 0, /*
Return current value of point in WINDOW.
-For a nonselected window, this is the value point would have
+For a non-selected window, this is the value point would have
if that window were selected.
Note that, when WINDOW is the selected window and its buffer
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);
+ elisp_maphash (unmap_subwindow_instance_cache_mapper,
+ w->subwindow_instance_cache, (void*)1);
}
/* we're deleting W; set the structure of W to indicate this. */
\f
DEFUN ("next-window", Fnext_window, 0, 4, 0, /*
-Return next window after WINDOW in canonical ordering of windows.
+Return the next window after WINDOW in the canonical ordering of windows.
If omitted, WINDOW defaults to the selected window.
Optional second arg MINIBUF t means count the minibuffer window even
If ALL-FRAMES is a frame, restrict search to windows on that frame.
Anything else means restrict to WINDOW's frame.
-Optional fourth argument CONSOLE controls which consoles or devices the
+Optional fourth arg CONSOLE controls which consoles or devices the
returned window may be on. If CONSOLE is a console, return windows only
on that console. If CONSOLE is a device, return windows only on that
device. If CONSOLE is a console type, return windows only on consoles
minibuf = (minibuf_level ? minibuf_window : Qlambda);
else if (! EQ (minibuf, Qt))
minibuf = Qlambda;
- /* Now minibuf can be t => count all minibuffer windows,
- lambda => count none of them,
+ /* Now `minibuf' is one of:
+ t => count all minibuffer windows
+ lambda => count none of them
or a specific minibuffer window (the active one) to count. */
/* all_frames == nil doesn't specify which frames to include. */
return frame_first_window (XFRAME (all_frames));
else if (! EQ (all_frames, Qt))
all_frames = Qnil;
- /* Now all_frames is t meaning search all frames,
- nil meaning search just current frame,
- visible meaning search just visible frames,
- 0 meaning search visible and iconified frames,
- or a window, meaning search the frame that window belongs to. */
+ /* Now `all_frames' is one of:
+ t => search all frames
+ nil => search just the current frame
+ visible => search just visible frames
+ 0 => search visible and iconified frames
+ a window => search the frame that window belongs to. */
/* Do this loop at least once, to get the next window, and perhaps
again, if we hit the minibuffer and that is not acceptable. */
if (! NILP (all_frames))
{
- Lisp_Object tem1;
-
- tem1 = tem;
+ Lisp_Object tem1 = tem;
tem = next_frame (tem, all_frames, console);
+
/* In the case where the minibuffer is active,
and we include its frame as well as the selected one,
next_frame may get stuck in that frame.
else break;
}
}
- /* "acceptable" is the correct spelling. */
/* Which windows are acceptable?
Exit the loop and accept this window if
this isn't a minibuffer window,
}
DEFUN ("previous-window", Fprevious_window, 0, 4, 0, /*
-Return the window preceding WINDOW in canonical ordering of windows.
+Return the window preceding WINDOW in the canonical ordering of windows.
If omitted, WINDOW defaults to the selected window.
Optional second arg MINIBUF t means count the minibuffer window even
counts, all windows on all frames that share that minibuffer count
too. Therefore, `previous-window' can be used to iterate through
the set of windows even when the minibuffer is on another frame. If
-the minibuffer does not count, only windows from WINDOW's frame count
+the minibuffer does not count, only windows from WINDOW's frame count.
-If optional third arg ALL-FRAMES t means include windows on all frames.
+Optional third arg ALL-FRAMES t means include windows on all frames.
ALL-FRAMES nil or omitted means cycle within the frames as specified
above. ALL-FRAMES = `visible' means include windows on all visible frames.
ALL-FRAMES = 0 means include windows on all visible and iconified frames.
If ALL-FRAMES is a frame, restrict search to windows on that frame.
Anything else means restrict to WINDOW's frame.
-Optional fourth argument CONSOLE controls which consoles or devices the
+Optional fourth arg CONSOLE controls which consoles or devices the
returned window may be on. If CONSOLE is a console, return windows only
on that console. If CONSOLE is a device, return windows only on that
device. If CONSOLE is a console type, return windows only on consoles
minibuf = (minibuf_level ? minibuf_window : Qlambda);
else if (! EQ (minibuf, Qt))
minibuf = Qlambda;
- /* Now minibuf can be t => count all minibuffer windows,
- lambda => count none of them,
+ /* Now `minibuf' is one of:
+ t => count all minibuffer windows
+ lambda => count none of them
or a specific minibuffer window (the active one) to count. */
/* all_frames == nil doesn't specify which frames to include.
return frame_first_window (XFRAME (all_frames));
else if (! EQ (all_frames, Qt))
all_frames = Qnil;
- /* Now all_frames is t meaning search all frames,
- nil meaning search just current frame,
- visible meaning search just visible frames,
- 0 meaning search visible and iconified frames,
- or a window, meaning search the frame that window belongs to. */
+ /* Now `all_frames' is one of:
+ t => search all frames
+ nil => search just the current frame
+ visible => search just visible frames
+ 0 => search visible and iconified frames
+ a window => search the frame that window belongs to. */
/* Do this loop at least once, to get the next window, and perhaps
again, if we hit the minibuffer and that is not acceptable. */
tem = WINDOW_FRAME (XWINDOW (window));
if (! NILP (all_frames))
- /* It's actually important that we use prev_frame here,
+ /* It's actually important that we use previous_frame here,
rather than next_frame. All the windows acceptable
according to the given parameters should form a ring;
Fnext_window and Fprevious_window should go back and
window_loop assumes that these `ring' requirement are
met. */
{
- Lisp_Object tem1;
-
- tem1 = tem;
- tem = prev_frame (tem, all_frames, console);
+ Lisp_Object tem1 = tem;
+ tem = previous_frame (tem, all_frames, console);
/* In the case where the minibuffer is active,
and we include its frame as well as the selected one,
next_frame may get stuck in that frame.
int lose_lose = 0;
Lisp_Object devcons, concons;
- /* FRAME_ARG is Qlambda to stick to one frame,
- Qvisible to consider all visible frames,
- or Qt otherwise. */
-
/* If we're only looping through windows on a particular frame,
FRAME points to that frame. If we're looping through windows
on all frames, FRAME is 0. */
-
if (FRAMEP (frames))
frame = XFRAME (frames);
else if (NILP (frames))
frame = selected_frame ();
else
frame = 0;
+
+ /* FRAME_ARG is Qlambda to stick to one frame,
+ Qvisible to consider all visible frames,
+ or Qt otherwise. */
if (frame)
frame_arg = Qlambda;
else if (ZEROP (frames))
if (NILP (the_frame))
continue;
- if (!device_matches_console_spec (the_frame, device, console))
+ if (!device_matches_console_spec (device,
+ NILP (console) ?
+ FRAME_CONSOLE (XFRAME (the_frame)) :
+ console))
continue;
/* Pick a window to start with. */
/* Pick the next window now, since some operations will delete
the current window. */
- next_window = Fnext_window (w, mini ? Qt : Qnil, frame_arg, Qt);
+ next_window = Fnext_window (w, mini ? Qt : Qnil, frame_arg, device);
/* #### Still needed ?? */
/* Given the outstanding quality of the rest of this code,
Make WINDOW display BUFFER as its contents.
BUFFER can be a buffer or buffer name.
-With non-nil optional argument `norecord', do not modify the
+With non-nil optional argument NORECORD, do not modify the
global or per-frame buffer ordering.
*/
(window, buffer, norecord))
The main editor command loop selects the buffer of the selected window
before each command.
-With non-nil optional argument `norecord', do not modify the
+With non-nil optional argument NORECORD, do not modify the
global or per-frame buffer ordering.
*/
(window, norecord))
/* we have already caught dead-window errors */
if (!NILP (w->hchild) || !NILP (w->vchild))
error ("Trying to select non-leaf window");
-
+
w->use_time = make_int (++window_select_count);
if (EQ (window, old_selected_window))
p->line_start_cache = Dynarr_new (line_start_cache);
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
- p->subwindow_instance_cache =
+ p->subwindow_instance_cache =
make_lisp_hash_table (30,
HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQUAL);
+ HASH_TABLE_EQ);
/* Put new into window structure in place of window */
replace_window (window, new);
DEFUN ("split-window", Fsplit_window, 0, 3, "", /*
Split WINDOW, putting SIZE lines in the first of the pair.
WINDOW defaults to selected one and SIZE to half its size.
-If optional third arg HOR-FLAG is non-nil, split side by side
+If optional third arg HORFLAG is non-nil, split side by side
and put SIZE columns in the first of the pair.
*/
(window, chsize, horflag))
record_unwind_protect (free_window_configuration, old_window_config);
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. */
+#ifdef BROKEN_SUBWINDOW_REDISPLAY
+ /* Force subwindows to be remapped. This is overkill but saves
+ us having to rely on the redisplay code to unmap any extant
+ subwindows.
+
+ #### It does cause some extra flashing though which we could
+ possibly avoid. So consider trying to get redisplay to work
+ correctly.
+
+ Removing the instances from the frame cache is wrong because
+ an instance is only put in the frame cache when it is
+ instantiated. So if we do this there is a chance that stuff
+ will never get put back in the frame cache. */
reset_frame_subwindow_instance_cache (f);
-
+#endif
#if 0
/* JV: This is bogus,
First of all, the units are inconsistent. The frame sizes are measured
in characters but the window sizes are stored in pixels. So if a
font size change happened between saving and restoring, the
frame "sizes" maybe equal but the windows still should be
- resized. This is tickled alot by the new "character size
- stays constant" policy in 21.0. It leads to very wierd
+ resized. This is tickled a lot by the new "character size
+ stays constant" policy in 21.0. It leads to very weird
glitches (and possibly crashes when asserts are tickled).
- Just changing the units doens't help because changing the
+ Just changing the units doesn't help because changing the
toolbar configuration can also change the pixel positions.
Luckily there is a much simpler way of doing this, see below.
*/
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_VALUE_WEAK,
- HASH_TABLE_EQUAL);
+ /* When we restore a window's configuration, the identity of
+ the window hasn't actually changed - so there is no
+ reason why we shouldn't preserve the instance cache for
+ it - unless it was originally deleted. This will often
+ buy us something as we will not have to re-instantiate
+ all the instances. This is because this is an instance
+ cache - not a display cache. Preserving the display cache
+ would definitely be wrong.
+
+ We specifically want to do this for tabs, since for some
+ reason finding a file will cause the configuration to be
+ set. */
+ if (NILP (w->subwindow_instance_cache))
+ w->subwindow_instance_cache =
+ make_lisp_hash_table (30,
+ HASH_TABLE_KEY_VALUE_WEAK,
+ HASH_TABLE_EQ);
SET_LAST_MODIFIED (w, 1);
SET_LAST_FACECHANGE (w);
w->config_mark = 0;
+ /* #### Consider making the instance cache a winslot. */
#define WINDOW_SLOT(slot, compare) w->slot = p->slot
#include "winslots.h"
config->frame_height = FRAME_HEIGHT (f); */
/* When using `push-window-configuration', often the minibuffer ends
up as the selected window because functions run as the result of
- user interaction e.g. hyper-apropros. It seems to me the sensible
+ user interaction e.g. hyper-apropos. It seems to me the sensible
thing to do is not record the minibuffer here. */
if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level)
config->current_window = FRAME_SELECTED_WINDOW (f);
}
else
{
- /* optimised case */
+ /* optimized case */
dl = Dynarr_atp (dla, y);
db = get_display_block_from_line (dl, TEXT);
Used by `with-output-to-temp-buffer'.
If this function is used, then it must do the entire job of showing
the buffer; `temp-buffer-show-hook' is not run unless this function runs it.
+\(`temp-buffer-show-hook' is obsolete. Do not use in new code.)
*/ );
Vtemp_buffer_show_function = Qnil;
WINDOW_SLOT (vertical_divider_shadow_thickness, EQ);
/* Divider surface width (not counting 3-d borders) */
WINDOW_SLOT (vertical_divider_line_width, EQ);
- /* Spacing between outer egde of divider border and window edge */
+ /* Spacing between outer edge of divider border and window edge */
WINDOW_SLOT (vertical_divider_spacing, EQ);
/* Whether vertical dividers are always displayed */
WINDOW_SLOT (vertical_divider_always_visible_p, EQ);
+2000-10-04 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.36 is released.
+
+2000-09-27 Martin Buchholz <martin@xemacs.org>
+
+ * automated/lisp-tests.el: Add `current-time' test.
+
+2000-09-16 Martin Buchholz <martin@xemacs.org>
+
+ * automated/mule-tests.el: Add ucs tests.
+
+ * DLL/dltest.c: Remove reference to obsolete emacsfns.h
+
+2000-08-03 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * automated/lisp-test.el: Check matching \\= against string
+ doesn't crash XEmacs.
+ From: Markus Linnala <maage@cs.tut.fi>
+
+2000-07-26 Andy Piper <andy@xemacs.org>
+
+ * glyph-test.el: fix for new glyph instantiation mechanism.
+
+2000-07-31 Martin Buchholz <martin@xemacs.org>
+
+ * automated/hash-table-tests.el:
+ Fix up test suite to comply with new hash table weakness API.
+
2000-07-19 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.35 is released.
# include <config.h>
# include "lisp.h"
-# include "emacsfns.h"
Lisp_Object Qdltest_counter;
(dolist (size '(0 1 100))
(dolist (rehash-size '(1.1 9.9))
(dolist (rehash-threshold '(0.2 .9))
- (dolist (weakness '(nil t key value))
+ (dolist (weakness '(nil key value key-or-value key-and-value))
(dolist (data '(() (1 2) (1 2 3 4)))
(let ((ht (make-hash-table
:test test
(Assert (eq weakness (hash-table-weakness ht))))))))))
(loop for (fun weakness) in '((make-hashtable nil)
- (make-weak-hashtable t)
+ (make-weak-hashtable key-and-value)
(make-key-weak-hashtable key)
(make-value-weak-hashtable value))
do (Assert (eq weakness (hash-table-weakness (funcall fun 10)))))
(loop for (type weakness) in '((non-weak nil)
- (weak t)
+ (weak key-and-value)
(key-weak key)
(value-weak value))
do (Assert (equal (make-hash-table :type type)
(Assert (equal (split-string "foo,,bar" ",+") '("foo" "bar")))
(Assert (equal (split-string ",foo,,bar," ",+") '("" "foo" "bar" "")))
+(Assert (not (string-match "\\(\\.\\=\\)" ".")))
+
;;-----------------------------------------------------
;; Test near-text buffer functions.
;;-----------------------------------------------------
(Check-Error 'wrong-type-argument (subseq 3 2))
(Check-Error 'args-out-of-range (subseq [1 2 3] -42))
(Check-Error 'args-out-of-range (subseq [1 2 3] 0 42))
+
+;;-----------------------------------------------------
+;; Time-related tests
+;;-----------------------------------------------------
+(Assert (= (length (current-time-string)) 24))
;; Add many more file operation tests here...
+ ;;---------------------------------------------------------------
+ ;; Test Unicode-related functions
+ ;;---------------------------------------------------------------
+ (let* ((scaron (make-char 'latin-iso8859-2 57)))
+ (loop for code in '(#x0000 #x2222 #x4444 #xffff) do
+ (progn
+ (set-ucs-char code scaron)
+ (Assert (eq scaron (ucs-char code)))))
+
+ (Assert (eq nil (set-ucs-char #x1ffff scaron)))
+ (Check-Error wrong-type-argument (set-ucs-char -10000 scaron)))
+
)
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq im (make-glyph [xpm :file "xemacs-icon.xpm"])))
+ (setq im (make-glyph [xbm :file "xemacsicon.xbm"])))
(set-extent-begin-glyph
(make-extent (point) (point))
(setq ok-select nil)
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq radio-button1
- (make-glyph
+ (make-glyph
+ (setq radio-button1
[button :face widget
:descriptor ["ok1" (setq ok-select t)
:style radio :selected ok-select]])))
;; button in a group
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq radio-button2
- (make-glyph
-` [button :descriptor ["ok2" (setq ok-select nil) :style radio
+ (make-glyph
+ (setq radio-button2
+ [button :descriptor ["ok2" (setq ok-select nil) :style radio
:selected (not ok-select)]])))
;; toggle button
(set-extent-begin-glyph
:selected (not ok-select)]])))
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq toggle-button
- (make-glyph [button :descriptor ["ok4" :style toggle
- :callback
- (setq ok-select (not ok-select))
- :selected ok-select]])))
+ (make-glyph
+ (setq toggle-button
+ [button :descriptor ["ok4" :style toggle
+ :callback
+ (setq ok-select (not ok-select))
+ :selected ok-select]])))
;; normal pushbutton
(set-extent-begin-glyph
(setq tree (make-glyph
[tree-view :width 10
:descriptor "My Tree"
- :properties (:items (["One" foo]
- (["Two" foo]
- ["Four" foo]
- "Six")
- "Three"))])))
+ :items (["One" foo]
+ (["Two" foo]
+ ["Four" foo]
+ "Six")
+ "Three")])))
;; tab control
(set-extent-begin-glyph
[tab-control :descriptor "My Tab"
:face highlight
:orientation right
- :properties (:items (["One" foo :selected t]
- ["Two" fee :selected nil]
- ["Three" foo :selected nil]))])))
+ :items (["One" foo :selected t]
+ ["Two" fee :selected nil]
+ ["Three" foo :selected nil])])))
;; progress gauge
(set-extent-begin-glyph
(make-extent (point) (point))
(setq pgauge (make-glyph
- [progress-gauge :width 10 :height 2
+ [progress-gauge :width 10 :height 2 :value 0
:descriptor "ok"])))
;; progress the progress ...
(let ((x 0))
(while (<= x 100)
- (set-image-instance-property (glyph-image-instance pgauge) :value x)
+ (set-glyph-image pgauge `[progress-gauge :width 10 :height 2
+ :descriptor "ok" :value ,x])
(setq x (+ x 5))
(sit-for 0.1)))
;; progress the progress ...
(let ((x 0))
(while (<= x 100)
- (set-image-instance-property (glyph-image-instance pg) :value x)
+ (set-glyph-image pg
+ `[progress-gauge :width 5 :pixel-height 16
+ :descriptor "ok" :value ,x])
(setq x (+ x 5))
(sit-for 0.1)))
;; edit box
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq edit-field (make-glyph [edit-field :pixel-width 50 :pixel-height 30
+ (make-glyph (setq edit-field [edit-field :pixel-width 50 :pixel-height 30
:face bold-italic
:descriptor ["Hello"]])))
;; combo box
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq combo-box (make-glyph
- [combo-box :width 10 :descriptor ["Hello"]
- :properties (:items ("One" "Two" "Three"))])))
+ (make-glyph (setq combo-box
+ [combo-box :width 10 :descriptor ["Hello"]
+ :items ("One" "Two" "Three")])))
;; label
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq label (make-glyph [label :pixel-width 150 :descriptor "Hello"])))
+ (make-glyph (setq label [label :pixel-width 150 :descriptor "Hello"])))
;; string
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq str (make-glyph [string :data "Hello There"])))
+ (make-glyph
+ (setq str
+ [string :data "Hello There"])))
;; scrollbar
;(set-extent-begin-glyph
;; layout
(setq layout
(make-glyph
- [layout :descriptor "The Layout"
- :orientation vertical
- :justify left
- :border [string :data "Hello There Mrs"]
- :items ([native-layout :orientation horizontal
- :items (radio-button1 radio-button2)]
- edit-field toggle-button label str)]))
-(set-glyph-face layout 'gui-element)
+ `[layout :descriptor "The Layout"
+ :orientation vertical
+ :justify left
+ :border [string :data "Hello There Mrs"]
+ :items ([layout :orientation horizontal
+ :items (,radio-button1 ,radio-button2)]
+ ,edit-field ,toggle-button ,label ,str)]))
+;(set-glyph-face layout 'gui-element)
(set-extent-begin-glyph
(make-extent (point) (point)) layout)
+;; another test layout
+(set-extent-begin-glyph
+ (make-extent (point) (point))
+ (setq layout-2
+ (make-glyph `[layout :descriptor "The Layout"
+ :orientation vertical
+ :items ([progress-gauge :value 0 :width 10 :height 2
+ :descriptor "ok"])])))
+
+(set-glyph-image layout-2 `[layout :descriptor "The Layout"
+ :orientation vertical
+ :items ([progress-gauge :value 4 :width 10 :height 2
+ :descriptor "ok"])])
(setq test-toggle-widget nil)
(defun test-toggle (widget)
(set-specifier bottom-gutter-height 'autodetect)
(set-specifier bottom-gutter-border-width 2)
-(set-gutter-element bottom-gutter 'str str)
+
+(set-gutter-element
+ bottom-gutter 'str
+ (make-glyph
+ [layout :orientation vertical
+ :justify left :margin-width 4
+ :items ([string :data "Fontifying glyphs.c..."]
+ [layout :orientation horizontal
+ :items
+ ([progress-gauge :value 0 :pixel-height 24
+ :pixel-width 250 :descriptor
+ "Progress"]
+ [button :pixel-height 24
+ :descriptor " Stop "
+ :callback (quote quit)])])]))
+
(set-gutter-element bottom-gutter 'str2 str2)
(set-gutter-element-visible-p bottom-gutter-visible-p 'str t)
(set-gutter-element-visible-p bottom-gutter-visible-p 'str2 t)
+
emacs_is_beta=t
emacs_major_version=21
emacs_minor_version=2
-emacs_beta_version=35
-xemacs_codename="Nike"
+emacs_beta_version=36
+xemacs_codename="Notus"
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8