From b623fb6516df4ba24a9a16f8199b4341eb9aff52 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 24 Aug 1999 07:53:08 +0000 Subject: [PATCH] Sync up with r21-2-19-tomo-3. --- CHANGES-beta | 45 + ChangeLog | 120 +++ INSTALL | 4 + Makefile.in.in | 27 +- README.packages | 5 +- config.guess | 2 +- configure | 1774 +++++++++++++++++++-------------------- configure.in | 118 ++- configure.usage | 16 +- etc/HELLO | 2 +- etc/NEWS | 58 +- etc/TUTORIAL.ru | 2 +- etc/TUTORIAL.th | 844 +++++++++---------- etc/package-index.LATEST.pgp | 1267 +++++++++++++++------------- lib-src/ChangeLog | 17 + lib-src/Makefile.in.in | 1 + lib-src/config.values.in | 6 + lisp/ChangeLog | 1131 ++++++++++++++++++++++--- lisp/buffer.el | 5 + lisp/code-files.el | 3 - lisp/config.el | 2 +- lisp/cus-edit.el | 562 ++++++++++--- lisp/cus-face.el | 100 ++- lisp/custom.el | 510 ++++++++--- lisp/dumped-lisp.el | 4 +- lisp/files.el | 4 +- lisp/fill.el | 12 +- lisp/font-menu.el | 2 +- lisp/gui.el | 1 + lisp/help-nomule.el | 13 + lisp/help.el | 4 +- lisp/lib-complete.el | 103 ++- lisp/list-mode.el | 44 +- lisp/menubar-items.el | 31 +- lisp/minibuf.el | 32 +- lisp/mule/chinese.el | 133 +-- lisp/mule/cyrillic.el | 275 +++--- lisp/mule/english.el | 84 +- lisp/mule/ethiopic.el | 4 +- lisp/mule/european.el | 379 ++++----- lisp/mule/greek.el | 40 +- lisp/mule/hebrew.el | 34 +- lisp/mule/japanese.el | 92 +- lisp/mule/korean.el | 74 +- lisp/mule/misc-lang.el | 10 +- lisp/mule/mule-category.el | 21 + lisp/mule/mule-ccl.el | 244 +++++- lisp/mule/mule-cmds.el | 1197 +++++++++++++++++++++----- lisp/mule/mule-help.el | 4 +- lisp/mule/mule-misc.el | 129 ++- lisp/mule/thai-xtis-chars.el | 45 + lisp/mule/thai-xtis.el | 268 +++--- lisp/mule/vietnamese.el | 89 +- lisp/packages.el | 14 +- lisp/rect.el | 341 +++++--- lisp/select.el | 19 +- lisp/simple.el | 4 +- lisp/subr.el | 12 +- lisp/toolbar.el | 2 +- lisp/wid-edit.el | 2 +- lisp/x-win-sun.el | 6 +- lwlib/ChangeLog | 39 + lwlib/lwlib-Xm.c | 259 ++++-- lwlib/lwlib.c | 26 + lwlib/lwlib.h | 10 +- man/ChangeLog | 64 +- man/custom.texi | 72 +- man/emodules.texi | 162 ++-- man/texinfo.texi | 2 +- man/widget.texi | 2 +- man/xemacs/packages.texi | 27 +- nt/ChangeLog | 34 + nt/xemacs.mak | 210 ++++- src/ChangeLog | 822 +++++++++++++++++- src/Makefile.in.in | 2 +- src/alloc.c | 23 +- src/buffer.c | 2 +- src/buffer.h | 9 + src/bytecode.c | 10 +- src/chartab.c | 127 +++ src/config.h.in | 17 +- src/console-tty.c | 14 + src/console.c | 2 +- src/console.h | 1 + src/data.c | 9 +- src/database.c | 2 +- src/depend | 45 +- src/device.c | 2 +- src/device.h | 4 + src/dialog-msw.c | 22 +- src/dialog-x.c | 5 +- src/editfns.c | 2 + src/eldap.c | 105 +-- src/eldap.h | 4 +- src/elhash.c | 17 + src/emacs.c | 7 + src/eval.c | 2 +- src/event-Xt.c | 38 +- src/event-msw.c | 45 +- src/event-stream.c | 2 +- src/events.c | 2 +- src/extents.c | 11 +- src/faces.c | 2 +- src/file-coding.c | 140 ++- src/floatfns.c | 7 +- src/fns.c | 2 +- src/frame.c | 15 +- src/frame.h | 24 + src/gdbinit | 96 +-- src/general.c | 2 + src/glyphs-msw.c | 346 +++++++- src/glyphs-widget.c | 178 ++-- src/glyphs-x.c | 425 +++++++++- src/glyphs-x.h | 34 +- src/glyphs.c | 59 +- src/glyphs.h | 39 +- src/gui-x.c | 181 +--- src/gui.c | 252 +++++- src/gui.h | 62 +- src/indent.c | 67 +- src/input-method-xlib.c | 222 +++-- src/keymap.c | 8 + src/lisp.h | 9 +- src/lrecord.h | 167 +++- src/lstream.c | 2 +- src/marker.c | 7 +- src/menubar-msw.c | 75 +- src/menubar-x.c | 5 +- src/menubar.c | 22 +- src/menubar.h | 2 +- src/mule-ccl.c | 970 ++++++++++++++++++++- src/mule-ccl.h | 19 +- src/mule-charset.c | 48 +- src/nt.c | 1 - src/objects.c | 4 +- src/opaque.c | 5 +- src/paths.h.in | 8 + src/process.c | 2 +- src/rangetab.c | 2 +- src/redisplay-msw.c | 123 +-- src/redisplay-output.c | 111 ++- src/redisplay-x.c | 219 ++--- src/redisplay.c | 1016 ++++++++++++++++++++-- src/redisplay.h | 41 + src/s/cygwin32.h | 2 +- src/s/linux.h | 14 +- src/scrollbar.c | 39 +- src/search.c | 44 + src/sheap.c | 1 - src/specifier.c | 2 +- src/symbols.c | 26 +- src/symeval.h | 2 +- src/symsinit.h | 5 + src/syntax.c | 72 +- src/sysdep.c | 1 - src/toolbar.c | 2 +- src/tooltalk.c | 25 +- src/window.c | 59 +- src/window.h | 3 +- src/winslots.h | 23 + tests/ChangeLog | 12 + tests/automated/base64-tests.el | 248 ------ tests/glyph-test.el | 67 +- version.sh | 6 +- 164 files changed, 12940 insertions(+), 5385 deletions(-) create mode 100644 lisp/mule/thai-xtis-chars.el delete mode 100644 tests/automated/base64-tests.el diff --git a/CHANGES-beta b/CHANGES-beta index 401605d..5f58f45 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,5 +1,50 @@ -*- indented-text -*- +to 21.2.19 "Shinjuku" +-- various fixes from Gunnar Evermann +-- XIM fixes from Kazuyuki IENAGA +-- keymap fix from Katsumi Yamaoka +-- Microsoft build fixes from Adrian Aichner +-- documentation update from Adrian Aichner +-- rect.el rewrite from Didier Verna +-- custom comment fields from Didier Verna +-- various fixes from Karl Hegbloom +-- filling fix from Yoshiki Hayashi +-- miscellaneous changes from Jeff Miller and Didier Verna +-- configure hacking from Steve Baur +-- various fixes from Bob Weiner +-- Mule synching from MORIOKA Tomohiko +-- various fixes from Steve Baur +-- LDAP configure changes from Gregory Neil Shapiro +-- gutter implementation from Andy Piper +-- tab widgets in gutter from Andy Piper +-- Custom themes, API part. See etc/custom/theme-examples from Jan Vroonhof + +to 21.2.18 "Toshima" +-- miscellaneous fixes from Steve Baur +-- miscellaneous fixes from Didier Verna +-- various bug fixes from Karl Hegbloom +-- miscellaneous fixes from Bob Weiner +-- fix for XIM server crashing and taking down XEmacs from Kazuyuki IENAGA +-- valid-image-instantiator-format-p tightened up by Andy Piper. +-- glyph widget support under X/Motif from Andy Piper +-- Make docdir configurable, update package searching rules from Michael + Sperber +-- Fix for Japanese word/character movements from MORIOKA Tomohiko +-- lrecord struct header size fix from Olivier Galibert + +to 21.2.17 "Chiyoda" +-- miscellaneous bug fixes from Steve Baur +-- font menu fix from Robert Pluim +-- ldap API update from Oscar Figueiredo +-- Fix thai-xtis charset width from MORIOKA Tomohiko +-- CCL engine fix from MORIOKA Tomohiko +-- mswindows build fixes from Norbert Koch +-- miscellaneous fixes from Andy Piper +-- automated tests for mswindows from Adrian Aichner +-- tree-view and tab-control widget glyph support from Andy Piper + to 21.2.16 "Sumida" +-- miscellaneous fixes from Hrvoje Niksic and Olivier Galibert -- make selection more mswindows conformant. -- Make customize use specifiers from Jan Vroonhof -- Cyrillic CCL crash fix from MORIOKA Tomohiko diff --git a/ChangeLog b/ChangeLog index baae190..df796c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,126 @@ * configure.in: Add new option `--with-utf-2000'; define `UTF2000' if it is specified. +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-28 Michael Sperber [Mr. Preprocessor] + + * configure.in: Removed superfluous call to AC_FUNC_MMAP. + +1999-03-07 Gregory Neil Shapiro + + * configure.in: Check for Kerberos and the need for the DES + library before checking for LDAP in case LDAP requires these + libraries. + +1999-07-26 SL Baur + + * configure.in: Rename --with-shlib to --with-modules for + consistency with the other two options that use that name. + + * configure.usage (--with-modules): Document it. + +1999-07-23 Jan Vroonhof + + * etc/custom/example-themes/example-theme.el: + * etc/custom/example-themes/europe-theme.el: + * etc/custom/example-themes/ex-custom-file: Some simple examples + illustrating the custom theme support. + +1999-07-17 MORIOKA Tomohiko + + * etc/HELLO (Thai): Modify for new font. + +1999-06-29 MORIOKA Tomohiko + + * etc/TUTORIAL.th: Change code to tis-620. + +1999-07-22 SL Baur + + * configure.in: add sco7 support + From Bob Weiner + +1999-07-22 SL Baur + + * Makefile.in.in (install-arch-dep): Install config.values into + docdir. + From Karl M. Hegbloom + +1999-07-21 SL Baur + + * Makefile.in.in (inststaticdir): New variable. + (instvardir): Ditto. + (install-arch-dep): Use them. + + * configure.in (sitelispdir): Need to use ${PROGNAME}. + (sitemoduledir): Ditto. + (inststaticdir): New variable. + (instvardir): Ditto. + (infodir): Use them. + (lispdir): Ditto. + (moduledir): Ditto. + (pkgdir): Ditto. + (etcdir): Ditto. + (lockdir): Ditto. + (archlibdir): Ditto. + +1999-07-14 SL Baur + + * InfoDock 4.0.8 is released + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-06 SL Baur + + * config.guess (main): Synch with newer config.guess for HP + support. + From Marcus Thiessel + +1999-06-25 Michael Sperber [Mr. Preprocessor] + + * configure.in (with_prefix): Added --with-prefix, defaults to + yes, to control whether the value of --prefix is compiled into the + binary. + +1999-07-03 Andy Piper + + * configure.usage (--with-widgets): add. + +1999-07-02 Andy Piper + + * configure.in: Make sure we get motif in lwlib if we have widgets + and motif. + +1999-06-25 SL Baur + + * configure.in (version): Fix --with-infodock test. + +1999-06-15 Michael Sperber [Mr. Preprocessor] + + * configure.in: --prefix and --exec-prefix are now only compiled + into the binary if user-defined. + +1999-03-23 Michael Sperber [Mr. Preprocessor] + + * configure.in: Made docdir configurable. + + * Makefile.in (docdir): Added variable for custom DOC directory. + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + +1999-06-13 Oscar Figueiredo + + * configure.in (with_ldap): Check libldap independently of liblber + Do not test alternate library names such as libldap10 + Test the presence of a variety of LDAP API functions which were + formerly assumed to be present according to dubious heuristics + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released diff --git a/INSTALL b/INSTALL index 88a377f..82dda47 100644 --- a/INSTALL +++ b/INSTALL @@ -630,6 +630,10 @@ GNU software; here are some variables specific to XEmacs. above), is `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME' (where VERSION and CONFIGURATION-NAME are as described above). +`docdir' indicates where to put Lisp documentation strings that XEmacs + refers to as it runs. It defaults the value of `archlibdir' + (see above). + `moduledir' indicates where XEmacs installs and expects to find any dynamic modules. Its default value, based on `archlibdir' (see above) is diff --git a/Makefile.in.in b/Makefile.in.in index 69496da..e8205ae 100644 --- a/Makefile.in.in +++ b/Makefile.in.in @@ -93,6 +93,14 @@ PROGNAME=@PROGNAME@ ## not need to change them. This defaults to /usr/local. prefix=@prefix@ +## Variable data (as per each program update) goes here +## The default is ${PROGNAME} +inststaticdir=@inststaticdir@ + +## Static data (constant across program updates) goes here +## The default is ${PROGNAME}-${version} +instvardir=@instvardir@ + ## Like `prefix', but used for architecture-specific files. exec_prefix=@exec_prefix@ @@ -191,6 +199,9 @@ etcdir=@etcdir@ ## currently being edited. lockdir=@lockdir@ +# Where to put the DOC file. +docdir=@docdir@ + ## Where to put executables to be run by XEmacs rather than ## the user. This path usually includes the XEmacs version ## and configuration name, so that multiple configurations @@ -393,9 +404,8 @@ install-arch-dep: mkdir if test -f ../Installation; then \ ${INSTALL_DATA} ../Installation ${archlibdir}/Installation; \ fi; \ - for f in DOC config.values; do \ - ${INSTALL_DATA} lib-src/$${f} ${archlibdir}/$${f}; \ - done ; \ + ${INSTALL_DATA} lib-src/config.values ${docdir}/config.values; \ + ${INSTALL_DATA} lib-src/DOC ${docdir}/DOC; \ for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \ do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \ else true; fi @@ -404,10 +414,10 @@ install-arch-dep: mkdir cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} if test "${prefix}" != "${exec_prefix}"; then \ for dir in \ - lib/${PROGNAME} \ - lib/${PROGNAME}-${version}/etc \ - lib/${PROGNAME}-${version}/info \ - lib/${PROGNAME}-${version}/lisp; do \ + lib/${inststaticdir} \ + lib/${instvardir}/etc \ + lib/${instvardir}/info \ + lib/${instvardir}/lisp; do \ if test ! -d ${exec_prefix}/$${dir}; then \ $(LN_S) ${prefix}/$${dir} ${exec_prefix}/$${dir}; fi; \ done; \ @@ -449,7 +459,6 @@ install-arch-indep: mkdir info chmod 0644 ${infodir}/$${file}; \ done ; \ fi - ## Note it's `xemacs' not ${PROGNAME} cd ${srcdir}/etc && \ for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \ ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ @@ -471,7 +480,7 @@ MAKEPATH=./lib-src/make-path ## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use ## make-path instead of mkdir. Not all mkdirs have the `-p' flag. mkdir: FRC.mkdir - ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \ + ${MAKEPATH} ${COPYDESTS} ${lockdir} ${docdir} ${infodir} ${archlibdir} \ ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir} \ ${sitelispdir} ${moduledir} ${sitemoduledir} -chmod 0777 ${lockdir} diff --git a/README.packages b/README.packages index 2ab2262..4ac2cfa 100644 --- a/README.packages +++ b/README.packages @@ -213,10 +213,9 @@ User Package directories ------------------------ In addition to the system wide packages, each user can have his own -packages installed in "~/.xemacs" (Note that this will most likely -change to "~/.xemacs/packages" in the near future). If you want to +packages installed in "~/.xemacs/xemacs-packages". If you want to install packages there using the interactive tools, you need to set -'pui-package-install-dest-dir' to "~/xemacs" +'pui-package-install-dest-dir' to "~/.xemacs/xemacs-packages" Site lisp/Site start -------------------- diff --git a/config.guess b/config.guess index 6e82336..7f2ead9 100755 --- a/config.guess +++ b/config.guess @@ -368,7 +368,7 @@ EOF case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) + 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >dummy.c #include #include diff --git a/configure b/configure index 348ca0b..be14ef6 100755 --- a/configure +++ b/configure @@ -227,22 +227,27 @@ datadir='${prefix}/lib' statedir='${prefix}/lib' libdir='${exec_prefix}/lib' mandir='${prefix}/man/man1' -infodir='${datadir}/${PROGNAME}-${version}/info' +inststaticdir='${PROGNAME}' +instvardir='${PROGNAME}-${version}' +infodir='${datadir}/${instvardir}/info' infopath='' install_pp='' -lispdir='${datadir}/${PROGNAME}-${version}/lisp' -moduledir='${datadir}/${PROGNAME}-${version}/${configuration}/modules' -sitelispdir='${datadir}/xemacs/site-lisp' -sitemoduledir='${datadir}/xemacs/site-modules' -pkgdir='${datadir}/${PROGNAME}-${version}/lisp' +lispdir='${datadir}/${instvardir}/lisp' +moduledir='${datadir}/${instvardir}/${configuration}/modules' +sitelispdir='${datadir}/${inststaticdir}/site-lisp' +sitemoduledir='${datadir}/${inststaticdir}/site-modules' +pkgdir='${datadir}/${instvardir}/lisp' package_path='' -etcdir='${datadir}/${PROGNAME}-${version}/etc' -lockdir='${statedir}/${PROGNAME}/lock' -archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}' +etcdir='${datadir}/${instvardir}/etc' +lockdir='${statedir}/${inststaticdir}/lock' +archlibdir='${datadir}/${instvardir}/${configuration}' +docdir='${archlibdir}' +with_prefix='yes' with_site_lisp='no' with_site_modules='yes' with_menubars='' with_scrollbars='' +with_widgets='' with_dialogs='' with_file_coding='' cpp='' cppflags='' libs='' ldflags='' @@ -306,7 +311,8 @@ while test $# != 0; do case "$opt" in with_site_lisp | \ - with_site_modules | \ + with_prefix | \ + with_site_modules | \ with_x | \ with_x11 | \ with_msw | \ @@ -359,7 +365,7 @@ while test $# != 0; do use_assertions | \ memory_usage_stats | \ with_clash_detection | \ - with_shlib | \ + with_modules | \ no_doc_file ) case "$val" in y | ye | yes ) val=yes ;; @@ -549,6 +555,14 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1; eval "$opt=\"$val\"" case "$opt" in + exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF + Defining EXEC_PREFIX_USER_DEFINED +EOF +cat >> confdefs.h <<\EOF +#define EXEC_PREFIX_USER_DEFINED 1 +EOF +} + ;; lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF Defining LISPDIR_USER_DEFINED EOF @@ -646,6 +660,14 @@ cat >> confdefs.h <<\EOF EOF } ;; + docdir ) { test "$extra_verbose" = "yes" && cat << \EOF + Defining DOCDIR_USER_DEFINED +EOF +cat >> confdefs.h <<\EOF +#define DOCDIR_USER_DEFINED 1 +EOF +} + ;; exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF Defining ARCHLIBDIR_USER_DEFINED EOF @@ -663,7 +685,8 @@ EOF "with_menubars" | \ "with_scrollbars" | \ - "with_dialogs" ) + "with_dialogs" | \ + "with_widgets" ) case "$val" in l | lu | luc | luci | lucid ) val=lucid ;; m | mo | mot | moti | motif ) val=motif ;; @@ -771,7 +794,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:775: checking whether ln -s works" >&5 +echo "configure:798: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -896,7 +919,7 @@ EOF if test "$with_infodock" = "yes"; then - if test ! -f ../ID-INSTALL; then + if test ! -f ../../ID-INSTALL; then echo "Cannot build InfoDock without InfoDock sources" with_infodock=no fi @@ -1016,7 +1039,7 @@ EOF echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:1020: checking "host system type"" >&5 +echo "configure:1043: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1399,6 +1422,7 @@ EOF else NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; fi ;; + *-sysv5* ) opsys=sco7 ;; *-386bsd* ) opsys=386bsd ;; *-freebsd* ) opsys=freebsd ;; *-nextstep* ) opsys=nextstep ;; @@ -1508,7 +1532,7 @@ xe_save_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1512: checking for $ac_word" >&5 +echo "configure:1536: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1535,7 +1559,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1539: checking for $ac_word" >&5 +echo "configure:1563: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1583,7 +1607,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1587: checking for $ac_word" >&5 +echo "configure:1611: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1612,7 +1636,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1616: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1640: 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' @@ -1625,12 +1649,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1629 "configure" +#line 1653 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1658: \"$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 @@ -1658,19 +1682,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1662: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1686: 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:1667: checking whether we are using GNU C" >&5 +echo "configure:1691: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1698: \"$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 @@ -1688,7 +1712,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1692: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1716: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1721,7 +1745,7 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1725: checking for $ac_word" >&5 +echo "configure:1749: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1748,7 +1772,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1752: checking for $ac_word" >&5 +echo "configure:1776: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1796,7 +1820,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1800: checking for $ac_word" >&5 +echo "configure:1824: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1825,7 +1849,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1829: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1853: 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' @@ -1838,12 +1862,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1842 "configure" +#line 1866 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1871: \"$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 @@ -1871,19 +1895,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1899: 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:1880: checking whether we are using GNU C" >&5 +echo "configure:1904: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1911: \"$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 @@ -1901,7 +1925,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1905: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1929: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1934,7 +1958,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1938: checking for $ac_word" >&5 +echo "configure:1962: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1961,7 +1985,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1965: checking for $ac_word" >&5 +echo "configure:1989: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2009,7 +2033,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2013: checking for $ac_word" >&5 +echo "configure:2037: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2038,7 +2062,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2066: 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' @@ -2051,12 +2075,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 2055 "configure" +#line 2079 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2084: \"$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 @@ -2084,19 +2108,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2088: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2112: 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:2093: checking whether we are using GNU C" >&5 +echo "configure:2117: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2124: \"$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 @@ -2114,7 +2138,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2118: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2142: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2151,7 +2175,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2155: checking how to run the C preprocessor" >&5 +echo "configure:2179: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2164,13 +2188,13 @@ if test -z "$CPP"; then # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2198: \"$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 : @@ -2181,13 +2205,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2215: \"$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 : @@ -2198,13 +2222,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2232: \"$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 : @@ -2229,9 +2253,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2233: checking for AIX" >&5 +echo "configure:2257: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2262: checking for GNU libc" >&5 +echo "configure:2286: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2272,7 +2296,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2294,7 +2318,7 @@ EOF cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2580,7 +2604,7 @@ test -n "$unexec" && extra_objs="$extra_objs $unexec" && if test "$ext fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2584: checking for dynodump" >&5 +echo "configure:2608: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2618,12 +2642,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2622: checking for terminateAndUnload in -lC" >&5 +echo "configure:2646: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2662: \"$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 @@ -2738,7 +2762,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2742: checking "for runtime libraries flag"" >&5 +echo "configure:2766: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -2760,14 +2784,14 @@ if test "$GCC" = "yes"; then done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -2869,10 +2893,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2873: checking for malloc_get_state" >&5 +echo "configure:2897: checking for malloc_get_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_get_state=yes" else @@ -2915,10 +2939,10 @@ doug_lea_malloc=no fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2919: checking for malloc_set_state" >&5 +echo "configure:2943: checking for malloc_set_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2969: \"$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 @@ -2961,16 +2985,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2965: checking whether __after_morecore_hook exists" >&5 +echo "configure:2989: checking whether __after_morecore_hook exists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2998: \"$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 @@ -3029,7 +3053,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3033: checking for $ac_word" >&5 +echo "configure:3057: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3084,7 +3108,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3088: checking for a BSD compatible install" >&5 +echo "configure:3112: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3138,7 +3162,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3142: checking for $ac_word" >&5 +echo "configure:3166: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3170,15 +3194,15 @@ for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3174: checking for $ac_hdr" >&5 +echo "configure:3198: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3206: \"$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* @@ -3211,15 +3235,15 @@ for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3215: checking for $ac_hdr" >&5 +echo "configure:3239: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3247: \"$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* @@ -3252,15 +3276,15 @@ for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3256: checking for $ac_hdr" >&5 +echo "configure:3280: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3288: \"$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* @@ -3290,10 +3314,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3294: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3318: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3309,7 +3333,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3333,10 +3357,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3337: checking for ANSI C header files" >&5 +echo "configure:3361: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3344,7 +3368,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3372: \"$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* @@ -3361,7 +3385,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3379,7 +3403,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3397,7 +3421,7 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3408,7 +3432,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3434,10 +3458,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3438: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3462: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3446,7 +3470,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3470,10 +3494,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3474: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3498: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3485,7 +3509,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3510,9 +3534,9 @@ fi echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3514: checking for struct utimbuf" >&5 +echo "configure:3538: checking for struct utimbuf" >&5 cat > conftest.$ac_ext < @@ -3531,7 +3555,7 @@ int main() { static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3559: \"$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 @@ -3551,10 +3575,10 @@ fi rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3555: checking return type of signal handlers" >&5 +echo "configure:3579: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3571,7 +3595,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3593,10 +3617,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3597: checking for size_t" >&5 +echo "configure:3621: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3627,10 +3651,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3631: checking for pid_t" >&5 +echo "configure:3655: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3661,10 +3685,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3665: checking for uid_t in sys/types.h" >&5 +echo "configure:3689: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3700,10 +3724,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3704: checking for mode_t" >&5 +echo "configure:3728: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3734,10 +3758,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3738: checking for off_t" >&5 +echo "configure:3762: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3769,9 +3793,9 @@ fi echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3773: checking for struct timeval" >&5 +echo "configure:3797: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -3787,7 +3811,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3809,10 +3833,10 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3813: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3837: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -3820,7 +3844,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3844,10 +3868,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3848: checking for tm_zone in struct tm" >&5 +echo "configure:3872: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3855,7 +3879,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3878,10 +3902,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3882: checking for tzname" >&5 +echo "configure:3906: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3891,7 +3915,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3917,10 +3941,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3921: checking for working const" >&5 +echo "configure:3945: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3994,7 +4018,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3998: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4022: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4019,12 +4043,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4023: checking whether byte ordering is bigendian" >&5 +echo "configure:4047: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4035,11 +4059,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4050,7 +4074,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4067,7 +4091,7 @@ fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4107,10 +4131,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4111: checking size of short" >&5 +echo "configure:4135: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -4121,7 +4145,7 @@ main() exit(0); } EOF -if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4149,10 +4173,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4153: checking size of int" >&5 +echo "configure:4177: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -4163,7 +4187,7 @@ main() exit(0); } EOF -if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4185,10 +4209,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4189: checking size of long" >&5 +echo "configure:4213: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -4199,7 +4223,7 @@ main() exit(0); } EOF -if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4221,10 +4245,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4225: checking size of long long" >&5 +echo "configure:4249: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4235,7 +4259,7 @@ main() exit(0); } EOF -if { (eval echo configure:4239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4263: \"$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 @@ -4257,10 +4281,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4261: checking size of void *" >&5 +echo "configure:4285: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4271,7 +4295,7 @@ main() exit(0); } EOF -if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4299: \"$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 @@ -4294,7 +4318,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4298: checking for long file names" >&5 +echo "configure:4322: 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: @@ -4340,10 +4364,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4344: checking for sin" >&5 +echo "configure:4368: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4394: \"$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 @@ -4384,12 +4408,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4388: checking for sin in -lm" >&5 +echo "configure:4412: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4428: \"$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 @@ -4444,14 +4468,14 @@ EOF cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4479: \"$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 @@ -4468,7 +4492,7 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4472: checking type of mail spool file locking" >&5 +echo "configure:4496: checking type of mail spool file locking" >&5 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -4493,12 +4517,12 @@ fi case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4497: checking for cma_open in -lpthreads" >&5 +echo "configure:4521: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4537: \"$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 @@ -4545,7 +4569,7 @@ fi esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4549: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4573: 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; @@ -4556,7 +4580,7 @@ fi if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4560: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4584: 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 ;; @@ -4566,7 +4590,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:4570: checking "for specified window system"" >&5 +echo "configure:4594: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4599,7 +4623,7 @@ if test "$with_x11" != "no"; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4603: checking for X" >&5 +echo "configure:4627: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4659,12 +4683,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4692: \"$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* @@ -4733,14 +4757,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4768: \"$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. @@ -4849,17 +4873,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4853: checking whether -R must be followed by a space" >&5 +echo "configure:4877: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4875,14 +4899,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4918,12 +4942,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4922: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4946: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4962: \"$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 @@ -4958,12 +4982,12 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4962: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4986: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5002: \"$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 @@ -5003,10 +5027,10 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5007: checking for gethostbyname" >&5 +echo "configure:5031: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5057: \"$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 @@ -5050,12 +5074,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5054: checking for gethostbyname in -lnsl" >&5 +echo "configure:5078: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5094: \"$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 @@ -5096,10 +5120,10 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5100: checking for connect" >&5 +echo "configure:5124: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5150: \"$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 @@ -5145,12 +5169,12 @@ fi xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5149: checking "$xe_msg_checking"" >&5 +echo "configure:5173: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5189: \"$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 @@ -5185,10 +5209,10 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:5189: checking for remove" >&5 +echo "configure:5213: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5239: \"$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 @@ -5232,12 +5256,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5236: checking for remove in -lposix" >&5 +echo "configure:5260: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5276: \"$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 @@ -5272,10 +5296,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5276: checking for shmat" >&5 +echo "configure:5300: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5326: \"$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 @@ -5319,12 +5343,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5323: checking for shmat in -lipc" >&5 +echo "configure:5347: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5363: \"$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 @@ -5371,12 +5395,12 @@ fi xe_msg_checking="for IceConnectionNumber in -lICE" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5375: checking "$xe_msg_checking"" >&5 +echo "configure:5399: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5415: \"$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 @@ -5556,7 +5580,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5560: checking for X defines extracted by xmkmf" >&5 +echo "configure:5584: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5588,15 +5612,15 @@ EOF ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5592: checking for X11/Intrinsic.h" >&5 +echo "configure:5616: checking for X11/Intrinsic.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5624: \"$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* @@ -5620,12 +5644,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5624: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5648: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5664: \"$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 @@ -5661,12 +5685,12 @@ fi xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5665: checking "$xe_msg_checking"" >&5 +echo "configure:5689: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5705: \"$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 @@ -5704,12 +5728,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5708: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5732: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5748: \"$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 @@ -5743,12 +5767,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5747: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5771: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5787: \"$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 @@ -5782,14 +5806,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5786: checking the version of X11 being used" >&5 +echo "configure:5810: checking the version of X11 being used" >&5 cat > conftest.$ac_ext < int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -5814,15 +5838,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5818: checking for $ac_hdr" >&5 +echo "configure:5842: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5850: \"$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* @@ -5853,7 +5877,7 @@ done echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5857: checking for XFree86" >&5 +echo "configure:5881: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5873,12 +5897,12 @@ EOF test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5877: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5901: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5917: \"$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 @@ -5928,19 +5952,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5932: checking for main in -lXbsd" >&5 +echo "configure:5956: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5968: \"$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 @@ -5977,22 +6001,22 @@ fi fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:5981: checking for MS-Windows" >&5 +echo "configure:6005: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:5984: checking for main in -lgdi32" >&5 +echo "configure:6008: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6020: \"$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 @@ -6042,6 +6066,7 @@ EOF && extra_objs="$extra_objs dialog-msw.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"dialog-msw.o\"" fi + test "$with_widgets" != "no" && with_widgets=msw else test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"scrollbar-msw.o\"" @@ -6057,12 +6082,12 @@ EOF fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6091: \"$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 @@ -6138,7 +6163,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:6142: checking for WM_COMMAND option" >&5; +echo "configure:6167: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -6153,15 +6178,15 @@ fi test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:6157: checking for X11/Xauth.h" >&5 +echo "configure:6182: checking for X11/Xauth.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6190: \"$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* @@ -6184,12 +6209,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:6188: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6213: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6229: \"$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 @@ -6245,15 +6270,15 @@ if test "$with_tooltalk" != "no" ; then for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6249: checking for ${dir}tt_c.h" >&5 +echo "configure:6274: checking for ${dir}tt_c.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6282: \"$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* @@ -6289,12 +6314,12 @@ if test "$with_tooltalk" != "no" ; then xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6293: checking "$xe_msg_checking"" >&5 +echo "configure:6318: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure: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 @@ -6362,15 +6387,15 @@ fi test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6366: checking for Dt/Dt.h" >&5 +echo "configure:6391: checking for Dt/Dt.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6399: \"$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* @@ -6393,12 +6418,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6397: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6422: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6438: \"$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 @@ -6478,7 +6503,7 @@ EOF fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6482: checking if drag and drop API is needed" >&5 +echo "configure:6507: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6499,18 +6524,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:6503: checking for LDAP" >&5 +echo "configure:6528: 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:6506: checking for ldap.h" >&5 +echo "configure:6531: checking for ldap.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6539: \"$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* @@ -6533,15 +6558,15 @@ fi } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6537: checking for lber.h" >&5 +echo "configure:6562: checking for lber.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6570: \"$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* @@ -6563,16 +6588,96 @@ with_ldap=no fi } if test "$with_ldap" != "no"; then - test -z "$with_umich_ldap" && { + +echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 +echo "configure:6594: checking for ldap_search in -lldap" >&5 +ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lldap " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + 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 + with_ldap_nolber=yes +else + echo "$ac_t""no" 1>&6 +with_ldap_nolber=no +fi + + + test "$with_ldap_nolber" = "no" && { 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:6571: checking "$xe_msg_checking"" >&5 +echo "configure:6635: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + 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 + with_ldap_lber=yes +else + echo "$ac_t""no" 1>&6 +with_ldap_lber=no +fi + + } + test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { +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:6676: checking "$xe_msg_checking"" >&5 +ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lldap -llber -lkrb" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6692: \"$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 @@ -6597,32 +6702,34 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_umich_ldap=yes + with_ldap_krb=yes else echo "$ac_t""no" 1>&6 -with_umich_ldap=no +with_ldap_krb=no fi } - test "$with_umich_ldap" = "no" && { -echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 -echo "configure:6610: checking for ldap_set_option in -lldap10" >&5 -ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'` + test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { +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:6717: checking "$xe_msg_checking"" >&5 +ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` -xe_check_libs=" -lldap10 " +xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6733: \"$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 @@ -6636,14 +6743,14 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_ns_ldap=yes + with_ldap_krbdes=yes else echo "$ac_t""no" 1>&6 -with_ns_ldap=no +with_ldap_krbdes=no fi } - test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes + test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes fi if test "$with_ldap" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -6657,44 +6764,89 @@ EOF extra_objs="$extra_objs eldap.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"eldap.o\"" fi - if test "$with_umich_ldap" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_UMICH_LDAP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_UMICH_LDAP 1 -EOF -} - + if test "$with_ldap_nolber" = "yes" ; then + LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi + else + if test "$with_ldap_krb" = "yes" ; then + LIBS="-lkrb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$LIBS"; fi + fi + if test "$with_ldap_krbdes" = "yes" ; then + LIBS="-ldes $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldes\" to \$LIBS"; fi + LIBS="-lkrb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$LIBS"; fi + fi LIBS="-llber $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$LIBS"; fi LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi - elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_NS_LDAP + fi + 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:6784: checking for $ac_func" >&5 + +cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $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 -cat >> confdefs.h <<\EOF -#define HAVE_NS_LDAP 1 +if { (eval echo configure:6810: \"$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 <&6 +fi +done - LIBS="-lldap10 $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap10\" to \$LIBS"; fi - elif test "$with_ldap" = "yes" ; then - LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi - fi fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:6690: checking for graphics libraries" >&5 +echo "configure:6842: 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:6695: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6847: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < int main(int c, char **v) { @@ -6702,7 +6854,7 @@ echo "configure:6695: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6858: \"$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 @@ -6744,17 +6896,17 @@ EOF libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:6748: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:6900: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -6780,15 +6932,15 @@ EOF test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:6784: checking for compface.h" >&5 +echo "configure:6936: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6944: \"$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* @@ -6811,12 +6963,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:6815: checking for UnGenFace in -lcompface" >&5 +echo "configure:6967: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6983: \"$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 @@ -6879,12 +7031,12 @@ EOF if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:6883: checking for inflate in -lc" >&5 +echo "configure:7035: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7051: \"$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 @@ -6914,12 +7066,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:6918: checking for inflate in -lz" >&5 +echo "configure:7070: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7086: \"$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 @@ -6949,12 +7101,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:6953: checking for inflate in -lgz" >&5 +echo "configure:7105: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7121: \"$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 @@ -6995,15 +7147,15 @@ fi test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:6999: checking for jpeglib.h" >&5 +echo "configure:7151: checking for jpeglib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7159: \"$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* @@ -7026,12 +7178,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:7030: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7182: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7198: \"$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 @@ -7078,10 +7230,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:7082: checking for pow" >&5 +echo "configure:7234: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7260: \"$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 @@ -7125,15 +7277,15 @@ fi } test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7129: checking for png.h" >&5 +echo "configure:7281: checking for png.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7289: \"$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* @@ -7156,12 +7308,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:7160: checking for png_read_image in -lpng" >&5 +echo "configure:7312: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7328: \"$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 @@ -7195,10 +7347,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:7199: checking for workable png version information" >&5 +echo "configure:7351: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -7206,7 +7358,7 @@ echo "configure:7199: checking for workable png version information" >&5 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:7210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7362: \"$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 @@ -7249,15 +7401,15 @@ EOF test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:7253: checking for tiffio.h" >&5 +echo "configure:7405: checking for tiffio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7413: \"$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* @@ -7280,12 +7432,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7284: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7436: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7452: \"$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 @@ -7335,16 +7487,16 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7339: checking for X11 graphics libraries" >&5 +echo "configure:7491: checking for X11 graphics libraries" >&5 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7343: checking for XawScrollbarSetThumb in -lXaw" >&5 +echo "configure:7495: checking for XawScrollbarSetThumb in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7511: \"$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 @@ -7379,15 +7531,15 @@ fi ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7383: checking for Xm/Xm.h" >&5 +echo "configure:7535: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7543: \"$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* @@ -7404,12 +7556,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:7408: checking for XmStringFree in -lXm" >&5 +echo "configure:7560: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7576: \"$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 @@ -7449,9 +7601,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7453: checking for Lesstif" >&5 +echo "configure:7605: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -7486,8 +7638,13 @@ esac case "$with_scrollbars" in "" | "yes" ) with_scrollbars="lucid" ;; esac +case "$with_widgets" in "" | "yes" ) + if test "$have_motif" = "yes"; then with_widgets="motif" + else with_widgets=no + fi ;; +esac -all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" +all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" case "$all_widgets" in *athena* ) { test "$extra_verbose" = "yes" && cat << \EOF @@ -7682,7 +7839,7 @@ if test "$with_x11" = "yes"; then test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-x.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"toolbar-x.o\"" fi - test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" && if test "$extra_verbose" = "yes"; then + test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"gui-x.o\"" fi else @@ -7714,7 +7871,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:7718: checking for Mule-related features" >&5 +echo "configure:7875: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -7739,15 +7896,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7743: checking for $ac_hdr" >&5 +echo "configure:7900: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7908: \"$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* @@ -7778,12 +7935,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7782: checking for strerror in -lintl" >&5 +echo "configure:7939: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7955: \"$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 @@ -7855,18 +8012,18 @@ EOF fi echo "checking for Mule input methods" 1>&6 -echo "configure:7859: checking for Mule input methods" >&5 +echo "configure:8016: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:7862: checking for XIM" >&5 +echo "configure:8019: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:7865: checking for XOpenIM in -lX11" >&5 +echo "configure:8022: checking for XOpenIM in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8038: \"$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 @@ -7901,12 +8058,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:7905: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:8062: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8078: \"$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 @@ -7982,15 +8139,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:7986: checking for XFontSet" >&5 +echo "configure:8143: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:7989: checking for XmbDrawString in -lX11" >&5 +echo "configure:8146: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8162: \"$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 @@ -8041,15 +8198,15 @@ EOF test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:8045: checking for wnn/jllib.h" >&5 +echo "configure:8202: checking for wnn/jllib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8210: \"$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* @@ -8074,10 +8231,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8078: checking for $ac_func" >&5 +echo "configure:8235: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8261: \"$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 @@ -8129,12 +8286,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:8133: checking for crypt in -lcrypt" >&5 +echo "configure:8290: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8306: \"$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 @@ -8180,12 +8337,12 @@ fi if test -z "$with_wnn" -o "$with_wnn" = "yes"; then echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:8184: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:8341: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8357: \"$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 @@ -8214,12 +8371,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:8218: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:8375: checking for jl_dic_list_e in -lwnn4" >&5 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn4 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8391: \"$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 @@ -8248,12 +8405,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:8252: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:8409: checking for jl_dic_list_e in -lwnn6" >&5 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8425: \"$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 @@ -8282,12 +8439,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:8286: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:8443: checking for dic_list_e in -lwnn6_fromsrc" >&5 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6_fromsrc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8459: \"$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 @@ -8346,12 +8503,12 @@ EOF if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:8350: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:8507: checking for jl_fi_dic_list in -l$libwnn" >&5 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -l$libwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8523: \"$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 @@ -8397,15 +8554,15 @@ EOF if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8401: checking for canna/jrkanji.h" >&5 +echo "configure:8558: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8566: \"$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* @@ -8432,15 +8589,15 @@ fi c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8436: checking for canna/jrkanji.h" >&5 +echo "configure:8593: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8444: \"$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* @@ -8468,15 +8625,15 @@ fi test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:8472: checking for canna/RK.h" >&5 +echo "configure:8629: checking for canna/RK.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8637: \"$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* @@ -8499,12 +8656,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8503: checking for RkBgnBun in -lRKC" >&5 +echo "configure:8660: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8676: \"$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 @@ -8538,12 +8695,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8542: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:8699: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8715: \"$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 @@ -8603,12 +8760,12 @@ if test "$need_motif" = "yes" ; then libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:8607: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:8764: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8780: \"$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 @@ -8705,10 +8862,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8709: checking for $ac_func" >&5 +echo "configure:8866: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8892: \"$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 @@ -8772,10 +8929,10 @@ case "$opsys" in * ) for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8776: checking for $ac_func" >&5 +echo "configure:8933: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8959: \"$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 @@ -8834,10 +8991,10 @@ esac for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8838: checking for $ac_func" >&5 +echo "configure:8995: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9021: \"$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 @@ -8896,12 +9053,12 @@ then echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:8900: checking for kstat_open in -lkstat" >&5 +echo "configure:9057: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9073: \"$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 @@ -8946,12 +9103,12 @@ fi echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:8950: checking for kvm_read in -lkvm" >&5 +echo "configure:9107: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8996,16 +9153,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:9000: checking whether netdb declares h_errno" >&5 +echo "configure:9157: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9166: \"$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 @@ -9025,16 +9182,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:9029: checking for sigsetjmp" >&5 +echo "configure:9186: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:9038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9195: \"$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 @@ -9054,11 +9211,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:9058: checking whether localtime caches TZ" >&5 +echo "configure:9215: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9093,7 +9250,7 @@ main() exit (0); } EOF -if { (eval echo configure:9097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -9123,9 +9280,9 @@ fi if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:9127: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:9284: checking whether gettimeofday accepts one or two arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9308: \"$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 @@ -9169,19 +9326,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:9173: checking for inline" >&5 +echo "configure:9330: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -9231,17 +9388,17 @@ fi # 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:9235: checking for working alloca.h" >&5 +echo "configure:9392: checking for working alloca.h" >&5 cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9402: \"$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 @@ -9265,10 +9422,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:9269: checking for alloca" >&5 +echo "configure:9426: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9457: \"$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 @@ -9335,10 +9492,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:9339: checking whether alloca needs Cray hooks" >&5 +echo "configure:9496: checking whether alloca needs Cray hooks" >&5 cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9366: checking for $ac_func" >&5 +echo "configure:9523: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9549: \"$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 @@ -9418,10 +9575,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:9422: checking stack direction for C alloca" >&5 +echo "configure:9579: checking stack direction for C alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -9469,15 +9626,15 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" && if test "$extra_verbos ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:9473: checking for vfork.h" >&5 +echo "configure:9630: checking for vfork.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9638: \"$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* @@ -9505,10 +9662,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9509: checking for working vfork" >&5 +echo "configure:9666: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -9603,7 +9760,7 @@ main() { } } EOF -if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -9629,10 +9786,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:9633: checking for working strcoll" >&5 +echo "configure:9790: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -9642,7 +9799,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -9670,10 +9827,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9674: checking for $ac_func" >&5 +echo "configure:9831: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9857: \"$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 @@ -9724,10 +9881,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:9728: checking whether getpgrp takes no argument" >&5 +echo "configure:9885: checking whether getpgrp takes no argument" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -9809,10 +9966,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9813: checking for working mmap" >&5 +echo "configure:9970: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -9845,7 +10002,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:9849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -9866,271 +10023,6 @@ cat >> confdefs.h <<\EOF EOF } -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9874: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9882: \"$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 <&6 -fi -done - -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9914: checking for $ac_func" >&5 - -cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $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:9940: \"$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 <&6 -fi -done - -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9968: checking for working mmap" >&5 - -cat > conftest.$ac_ext < -#include -#include - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} - -EOF -if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 -then - ac_cv_func_mmap_fixed_mapped=yes -else - conftest_rc="$?" - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_MMAP -EOF -cat >> confdefs.h <<\EOF -#define HAVE_MMAP 1 -EOF -} - -fi - test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes @@ -10145,15 +10037,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:10149: checking for termios.h" >&5 +echo "configure:10041: checking for termios.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10049: \"$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* @@ -10196,15 +10088,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:10200: checking for termio.h" >&5 +echo "configure:10092: checking for termio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10100: \"$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* @@ -10236,10 +10128,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:10240: checking for socket" >&5 +echo "configure:10132: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10158: \"$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 @@ -10277,15 +10169,15 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:10281: checking for netinet/in.h" >&5 +echo "configure:10173: checking for netinet/in.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10181: \"$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* @@ -10302,15 +10194,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:10306: checking for arpa/inet.h" >&5 +echo "configure:10198: checking for arpa/inet.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10206: \"$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* @@ -10335,9 +10227,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:10339: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:10231: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -10348,7 +10240,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:10352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10244: \"$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 @@ -10366,9 +10258,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:10370: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:10262: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -10378,7 +10270,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10274: \"$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 @@ -10409,10 +10301,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:10413: checking for msgget" >&5 +echo "configure:10305: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10331: \"$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 @@ -10450,15 +10342,15 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:10454: checking for sys/ipc.h" >&5 +echo "configure:10346: checking for sys/ipc.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10354: \"$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* @@ -10475,15 +10367,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:10479: checking for sys/msg.h" >&5 +echo "configure:10371: checking for sys/msg.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10379: \"$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* @@ -10521,15 +10413,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:10525: checking for dirent.h" >&5 +echo "configure:10417: checking for dirent.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10425: \"$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* @@ -10556,15 +10448,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:10560: checking for sys/dir.h" >&5 +echo "configure:10452: checking for sys/dir.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10460: \"$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* @@ -10597,15 +10489,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:10601: checking for nlist.h" >&5 +echo "configure:10493: checking for nlist.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10501: \"$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* @@ -10635,7 +10527,7 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:10639: checking "for sound support"" >&5 +echo "configure:10531: checking "for sound support"" >&5 case "$with_sound" in native | both ) with_native_sound=yes;; nas | no ) with_native_sound=no;; @@ -10646,15 +10538,15 @@ 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:10650: checking for multimedia/audio_device.h" >&5 +echo "configure:10542: checking for multimedia/audio_device.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10550: \"$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* @@ -10702,12 +10594,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:10706: checking for ALopenport in -laudio" >&5 +echo "configure:10598: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10614: \"$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 @@ -10749,12 +10641,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:10753: checking for AOpenAudio in -lAlib" >&5 +echo "configure:10645: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10661: \"$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 @@ -10803,15 +10695,15 @@ fi for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:10807: checking for ${dir}/soundcard.h" >&5 +echo "configure:10699: checking for ${dir}/soundcard.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10707: \"$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* @@ -10881,7 +10773,7 @@ EOF fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -10908,7 +10800,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:10912: checking for TTY-related features" >&5 +echo "configure:10804: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -10924,12 +10816,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:10928: checking for tgetent in -lncurses" >&5 +echo "configure:10820: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10836: \"$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 @@ -10973,15 +10865,15 @@ EOF ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10977: checking for ncurses/curses.h" >&5 +echo "configure:10869: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10877: \"$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* @@ -11003,15 +10895,15 @@ fi ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:11007: checking for ncurses/term.h" >&5 +echo "configure:10899: checking for ncurses/term.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10907: \"$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* @@ -11041,15 +10933,15 @@ fi c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:11045: checking for ncurses/curses.h" >&5 +echo "configure:10937: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10945: \"$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* @@ -11084,12 +10976,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:11088: checking for tgetent in -l$lib" >&5 +echo "configure:10980: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10996: \"$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 @@ -11131,12 +11023,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:11135: checking for tgetent in -lcurses" >&5 +echo "configure:11027: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11043: \"$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 @@ -11165,12 +11057,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:11169: checking for tgetent in -ltermcap" >&5 +echo "configure:11061: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11077: \"$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 @@ -11229,15 +11121,15 @@ EOF test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:11233: checking for gpm.h" >&5 +echo "configure:11125: checking for gpm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11133: \"$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* @@ -11260,12 +11152,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:11264: checking for Gpm_Open in -lgpm" >&5 +echo "configure:11156: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11172: \"$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 @@ -11326,20 +11218,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:11330: checking for database support" >&5 +echo "configure:11222: checking for database support" >&5 if test "$with_database_gnudbm $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:11335: checking for ndbm.h" >&5 +echo "configure:11227: checking for ndbm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11235: \"$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* @@ -11369,12 +11261,12 @@ fi if test "$with_database_gnudbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:11373: checking for dbm_open in -lgdbm" >&5 +echo "configure:11265: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11281: \"$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 @@ -11413,10 +11305,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:11417: checking for dbm_open" >&5 +echo "configure:11309: checking for dbm_open" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11335: \"$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 @@ -11458,12 +11350,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:11462: checking for dbm_open in -ldbm" >&5 +echo "configure:11354: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11370: \"$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 @@ -11515,10 +11407,10 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:11519: checking for Berkeley db.h" >&5 +echo "configure:11411: checking for Berkeley db.h" >&5 for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -11552,9 +11444,9 @@ rm -f conftest* if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:11556: checking for Berkeley DB version" >&5 +echo "configure:11448: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -11573,10 +11465,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:11577: checking for $dbfunc" >&5 +echo "configure:11469: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11495: \"$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 @@ -11618,12 +11510,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:11622: checking for $dbfunc in -ldb" >&5 +echo "configure:11514: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11530: \"$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 @@ -11698,12 +11590,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:11702: checking for SOCKSinit in -lsocks" >&5 +echo "configure:11594: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11610: \"$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 @@ -11771,15 +11663,15 @@ for ac_hdr in dlfcn.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11775: checking for $ac_hdr" >&5 +echo "configure:11667: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11675: \"$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* @@ -11816,14 +11708,14 @@ else fi done -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { +test -z "$with_modules" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:11822: checking for dlopen in -ldl" >&5 +echo "configure:11714: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11730: \"$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 @@ -11855,20 +11747,20 @@ cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF } - DLL_LIB=dl; with_shlib=yes + DLL_LIB=dl; with_modules=yes else echo "$ac_t""no" 1>&6 fi } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { +test -z "$with_modules" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11867: checking for _dlopen in -lc" >&5 +echo "configure:11759: checking for _dlopen in -lc" >&5 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11775: \"$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 @@ -11900,20 +11792,20 @@ cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF } - DLL_LIB=; with_shlib=yes + DLL_LIB=; with_modules=yes else echo "$ac_t""no" 1>&6 fi } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { +test -z "$with_modules" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11912: checking for dlopen in -lc" >&5 +echo "configure:11804: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11820: \"$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 @@ -11945,20 +11837,20 @@ cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF } - DLL_LIB=; with_shlib=yes + DLL_LIB=; with_modules=yes else echo "$ac_t""no" 1>&6 fi } -test -z "$with_shlib" && { +test -z "$with_modules" && { echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:11957: checking for shl_load in -ldld" >&5 +echo "configure:11849: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11865: \"$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 @@ -11990,20 +11882,20 @@ cat >> confdefs.h <<\EOF #define HAVE_SHL_LOAD 1 EOF } - DLL_LIB=dld; with_shlib=yes + DLL_LIB=dld; with_modules=yes else echo "$ac_t""no" 1>&6 fi } -test -z "$with_shlib" && { +test -z "$with_modules" && { echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:12002: checking for dld_init in -ldld" >&5 +echo "configure:11894: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11910: \"$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 @@ -12035,13 +11927,13 @@ cat >> confdefs.h <<\EOF #define HAVE_DLD_INIT 1 EOF } - DLL_LIB=dld; with_shlib=yes + DLL_LIB=dld; with_modules=yes else echo "$ac_t""no" 1>&6 fi } -if test "$with_shlib" = "yes"; then +if test "$with_modules" = "yes"; then dll_ld= dll_ldflags= @@ -12053,7 +11945,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:12057: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:11949: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -12081,9 +11973,9 @@ if test "$GCC" = "yes"; then XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:12085: checking checking whether we are using GNU C" >&5 +echo "configure:11977: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:12109: checking how to produce PIC code" >&5 +echo "configure:12001: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -12198,18 +12090,18 @@ if test -n "$dll_cflags"; then # Check to make sure the dll_cflags actually works. echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 -echo "configure:12202: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:12094: checking if PIC flag ${dll_cflags} really works" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $dll_cflags -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12105: \"$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 @@ -12240,7 +12132,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:12244: checking if C compiler can produce shared libraries" >&5 +echo "configure:12136: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -12291,14 +12183,14 @@ if test -n "$xcldf"; then xe_libs= ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -12323,7 +12215,7 @@ if test -z "$LTLD"; then if test "$XEGCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:12327: checking for ld used by GCC" >&5 +echo "configure:12219: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -12348,7 +12240,7 @@ echo "configure:12327: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:12352: checking for GNU ld" >&5 +echo "configure:12244: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -12386,7 +12278,7 @@ ld_dynamic_link_flags= # Check to see if it really is or isn't GNU ld. echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 -echo "configure:12390: checking if the linker is GNU ld" >&5 +echo "configure:12282: checking if the linker is GNU ld" >&5 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LTLD -v 2>&1 &5; then xe_gnu_ld=yes @@ -12413,7 +12305,7 @@ else # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 -echo "configure:12417: checking whether the linker supports shared libraries" >&5 +echo "configure:12309: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -12629,10 +12521,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12633: checking for $ac_func" >&5 +echo "configure:12525: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12551: \"$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 @@ -12684,16 +12576,16 @@ done else echo "configure: warning: disabling shared library support" 1>&2 - with_shlib=no + with_modules=no fi fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -12864,6 +12756,9 @@ rm -f core + + + PREFIX=$prefix while true; do case "$PREFIX" in @@ -12874,6 +12769,7 @@ done + EXEC_PREFIX=$exec_prefix while true; do case "$EXEC_PREFIX" in @@ -12984,6 +12880,17 @@ done +DOCDIR=$docdir +while true; do + case "$DOCDIR" in + *\$* ) eval "DOCDIR=$DOCDIR" ;; + *) break ;; + esac +done + + + + ARCHLIBDIR=$archlibdir while true; do case "$ARCHLIBDIR" in @@ -13022,6 +12929,16 @@ RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$( : ${XEMACS_CC:=$CC} +if test "$with_prefix" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining PREFIX_USER_DEFINED +EOF +cat >> confdefs.h <<\EOF +#define PREFIX_USER_DEFINED 1 +EOF +} + +fi if test "$with_site_lisp" = "no"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -13337,9 +13254,7 @@ test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley test "$with_database_dbm" = yes && echo " Compiling in support for DBM." test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." -test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)." -test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)." -test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)." +test "$with_ldap" = yes && echo " Compiling in support for LDAP." test "$with_ncurses" = yes && echo " Compiling in support for ncurses." test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." @@ -13376,6 +13291,9 @@ case "$with_scrollbars" in athena ) echo " Using Athena scrollbars." ;; athena3d ) echo " Using Athena-3d scrollbars." ;; esac +case "$with_widgets" in + motif ) echo " Using Motif native widgets." ;; +esac case "$with_dialogs" in motif ) echo " Using Motif dialog boxes." @@ -13389,7 +13307,7 @@ case "$with_dialogs" in athena ) echo " Using Athena dialog boxes." ;; athena3d ) echo " Using Athena-3d dialog boxes." ;; esac -test "$with_shlib" = "yes" && echo " Compiling in DLL support." +test "$with_modules" = "yes" && echo " Compiling in DSO module support." test "$with_clash_detection" = yes && \ echo " Clash detection will use \"$lockdir\" for locking files." echo " movemail will use \"$mail_locking\" for locking mail spool files." @@ -13425,7 +13343,7 @@ for file in $internal_makefile_list; do ac_output_files="${ac_output_files+$ac_output_files }$file" done ac_output_files="$ac_output_files src/paths.h lib-src/config.values" -if test "$with_shlib" = "yes"; then +if test "$with_modules" = "yes"; then ac_output_files="$ac_output_files lib-src/ellcc.h" fi @@ -13554,10 +13472,14 @@ s%@PROGNAME@%$PROGNAME%g s%@version@%$version%g s%@configuration@%$configuration%g s%@canonical@%$canonical%g +s%@inststaticdir@%$inststaticdir%g +s%@instvardir@%$instvardir%g s%@srcdir@%$srcdir%g s%@pkgdir@%$pkgdir%g s%@statedir@%$statedir%g +s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g s%@PREFIX@%$PREFIX%g +s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g s%@EXEC_PREFIX@%$EXEC_PREFIX%g s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g s%@INFODIR@%$INFODIR%g @@ -13585,10 +13507,12 @@ s%@ETCDIR@%$ETCDIR%g s%@lockdir@%$lockdir%g s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g s%@LOCKDIR@%$LOCKDIR%g +s%@docdir@%$docdir%g +s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g +s%@DOCDIR@%$DOCDIR%g s%@archlibdir@%$archlibdir%g s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g s%@ARCHLIBDIR@%$ARCHLIBDIR%g -s%@docdir@%$docdir%g s%@bitmapdir@%$bitmapdir%g s%@extra_objs@%$extra_objs%g s%@machfile@%$machfile%g diff --git a/configure.in b/configure.in index 612946d..57f59e3 100644 --- a/configure.in +++ b/configure.in @@ -345,22 +345,27 @@ datadir='${prefix}/lib' statedir='${prefix}/lib' libdir='${exec_prefix}/lib' mandir='${prefix}/man/man1' -infodir='${datadir}/${PROGNAME}-${version}/info' +inststaticdir='${PROGNAME}' +instvardir='${PROGNAME}-${version}' +infodir='${datadir}/${instvardir}/info' infopath='' install_pp='' -lispdir='${datadir}/${PROGNAME}-${version}/lisp' -moduledir='${datadir}/${PROGNAME}-${version}/${configuration}/modules' -sitelispdir='${datadir}/xemacs/site-lisp' -sitemoduledir='${datadir}/xemacs/site-modules' -pkgdir='${datadir}/${PROGNAME}-${version}/lisp' +lispdir='${datadir}/${instvardir}/lisp' +moduledir='${datadir}/${instvardir}/${configuration}/modules' +sitelispdir='${datadir}/${inststaticdir}/site-lisp' +sitemoduledir='${datadir}/${inststaticdir}/site-modules' +pkgdir='${datadir}/${instvardir}/lisp' package_path='' -etcdir='${datadir}/${PROGNAME}-${version}/etc' -lockdir='${statedir}/${PROGNAME}/lock' -archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}' +etcdir='${datadir}/${instvardir}/etc' +lockdir='${statedir}/${inststaticdir}/lock' +archlibdir='${datadir}/${instvardir}/${configuration}' +docdir='${archlibdir}' +with_prefix='yes' with_site_lisp='no' with_site_modules='yes' with_menubars='' with_scrollbars='' +with_widgets='' with_dialogs='' with_file_coding='' dnl const_is_losing is removed - we rely on AC_C_CONST instead. @@ -463,7 +468,8 @@ while test $# != 0; do dnl Process (many) boolean options with_site_lisp | \ - with_site_modules | \ + with_prefix | \ + with_site_modules | \ with_x | \ with_x11 | \ with_msw | \ @@ -516,7 +522,7 @@ while test $# != 0; do use_assertions | \ memory_usage_stats | \ with_clash_detection | \ - with_shlib | \ + with_modules | \ no_doc_file ) dnl Make sure the value given was either "yes" or "no". case "$val" in @@ -711,6 +717,8 @@ while test $# != 0; do dnl You need to synchronize this with the way the dnl default values are built. case "$opt" in + dnl prefix is taken care of by --with-prefix + exec_prefix ) AC_DEFINE(EXEC_PREFIX_USER_DEFINED) ;; lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;; sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;; moduledir ) AC_DEFINE(MODULEDIR_USER_DEFINED) ;; @@ -724,6 +732,7 @@ while test $# != 0; do AC_DEFINE(MODULEDIR_USER_DEFINED) AC_DEFINE(ETCDIR_USER_DEFINED) ;; statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; + docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;; exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; esac ;; @@ -737,7 +746,8 @@ while test $# != 0; do dnl Has the user specified the toolkit(s) to use for GUI elements? "with_menubars" | \ "with_scrollbars" | \ - "with_dialogs" ) + "with_dialogs" | \ + "with_widgets" ) case "$val" in l | lu | luc | luci | lucid ) val=lucid ;; m | mo | mot | moti | motif ) val=motif ;; @@ -933,7 +943,7 @@ AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") if test "$with_infodock" = "yes"; then - if test ! -f ../ID-INSTALL; then + if test ! -f ../../ID-INSTALL; then echo "Cannot build InfoDock without InfoDock sources" with_infodock=no fi @@ -1475,6 +1485,7 @@ case "$canonical" in else NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; fi ;; + *-sysv5* ) opsys=sco7 ;; *-386bsd* ) opsys=386bsd ;; *-freebsd* ) opsys=freebsd ;; *-nextstep* ) opsys=nextstep ;; @@ -2477,6 +2488,7 @@ if test "$with_msw" != "no"; then && XE_ADD_OBJS(toolbar-msw.o) test "$with_dialogs" != "no" && with_dialogs=msw \ && XE_ADD_OBJS(dialog-msw.o) + test "$with_widgets" != "no" && with_widgets=msw else test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o) test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) @@ -2672,23 +2684,29 @@ AC_CHECKING(for LDAP) test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } if test "$with_ldap" != "no"; then - test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) } - test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) } - test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes + AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no) + test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) } + test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krb=yes, with_ldap_krb=no, -llber -lkrb) } + test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krbdes=yes, with_ldap_krbdes=no, -llber -lkrb -ldes) } + test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes fi if test "$with_ldap" = "yes"; then AC_DEFINE(HAVE_LDAP) XE_ADD_OBJS(eldap.o) - if test "$with_umich_ldap" = "yes" ; then - AC_DEFINE(HAVE_UMICH_LDAP) - XE_PREPEND(-llber, LIBS) + if test "$with_ldap_nolber" = "yes" ; then XE_PREPEND(-lldap, LIBS) - elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then - AC_DEFINE(HAVE_NS_LDAP) - XE_PREPEND(-lldap10, LIBS) - elif test "$with_ldap" = "yes" ; then + else + if test "$with_ldap_krb" = "yes" ; then + XE_PREPEND(-lkrb, LIBS) + fi + if test "$with_ldap_krbdes" = "yes" ; then + XE_PREPEND(-ldes, LIBS) + XE_PREPEND(-lkrb, LIBS) + fi + XE_PREPEND(-llber, LIBS) XE_PREPEND(-lldap, LIBS) fi + AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) fi dnl ---------------------- @@ -2879,8 +2897,13 @@ esac case "$with_scrollbars" in "" | "yes" ) with_scrollbars="lucid" ;; esac +case "$with_widgets" in "" | "yes" ) + if test "$have_motif" = "yes"; then with_widgets="motif" + else with_widgets=no + fi ;; +esac -all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" +all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" case "$all_widgets" in *athena* ) AC_DEFINE(LWLIB_USES_ATHENA) @@ -2933,7 +2956,7 @@ if test "$with_x11" = "yes"; then test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o) test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o) test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o) - test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o) + test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o) else if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then echo "Attempt to Build NAS sound without X" @@ -3275,7 +3298,6 @@ int main (int argc, char *argv[]) esac AC_MSG_RESULT($have_mmap) test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP) -AC_FUNC_MMAP dnl rel_alloc requires either GNU malloc or system malloc with mmap dnl We only turn rel_alloc on by default if mmap is available. @@ -3611,12 +3633,12 @@ fi dnl autodetect dll support AC_CHECK_HEADERS(dlfcn.h, [have_dlfcn=yes AC_DEFINE(HAVE_DLFCN_H)]) -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } -test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } -test -z "$with_shlib" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_shlib=yes]) } -test -z "$with_shlib" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_shlib=yes]) } -if test "$with_shlib" = "yes"; then +test -z "$with_modules" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_modules=yes]) } +test -z "$with_modules" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_modules=yes]) } +test -z "$with_modules" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_modules=yes]) } +test -z "$with_modules" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_modules=yes]) } +test -z "$with_modules" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_modules=yes]) } +if test "$with_modules" = "yes"; then XE_SHLIB_STUFF if test "$can_build_shared" = "yes"; then AC_DEFINE(HAVE_SHLIB) @@ -3627,7 +3649,7 @@ if test "$with_shlib" = "yes"; then AC_CHECK_FUNCS(dlerror _dlerror) else AC_MSG_WARN(disabling shared library support) - with_shlib=no + with_modules=no fi fi @@ -3744,6 +3766,8 @@ AC_SUBST(PROGNAME) AC_SUBST(version) AC_SUBST(configuration) AC_SUBST(canonical) +AC_SUBST(inststaticdir) +AC_SUBST(instvardir) AC_SUBST(srcdir) AC_SUBST(bindir) AC_SUBST(datadir) @@ -3753,6 +3777,7 @@ AC_SUBST(libdir) AC_SUBST(mandir) AC_SUBST(prefix) +AC_SUBST(PREFIX_USER_DEFINED) dnl Yo, Stephen Bourne! I want to marry you! PREFIX=$prefix while true; do @@ -3764,6 +3789,7 @@ done AC_SUBST(PREFIX) AC_SUBST(exec_prefix) +AC_SUBST(EXEC_PREFIX_USER_DEFINED) EXEC_PREFIX=$exec_prefix while true; do case "$EXEC_PREFIX" in @@ -3872,6 +3898,17 @@ while true; do done AC_SUBST(LOCKDIR) +AC_SUBST(docdir) +AC_SUBST(DOCDIR_USER_DEFINED) +DOCDIR=$docdir +while true; do + case "$DOCDIR" in + *\$* ) eval "DOCDIR=$DOCDIR" ;; + *) break ;; + esac +done +AC_SUBST(DOCDIR) + AC_SUBST(archlibdir) AC_SUBST(ARCHLIBDIR_USER_DEFINED) ARCHLIBDIR=$archlibdir @@ -3919,6 +3956,10 @@ dnl Useful for building XEmacs with a C++ or 64-bit compiler. : ${XEMACS_CC:=$CC} AC_SUBST(XEMACS_CC) +dnl The default is yes +if test "$with_prefix" = "yes"; then + AC_DEFINE(PREFIX_USER_DEFINED) +fi dnl The default is no if test "$with_site_lisp" = "no"; then @@ -4070,9 +4111,7 @@ test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley test "$with_database_dbm" = yes && echo " Compiling in support for DBM." test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." -test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)." -test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)." -test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)." +test "$with_ldap" = yes && echo " Compiling in support for LDAP." test "$with_ncurses" = yes && echo " Compiling in support for ncurses." test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." @@ -4109,6 +4148,9 @@ case "$with_scrollbars" in athena ) echo " Using Athena scrollbars." ;; athena3d ) echo " Using Athena-3d scrollbars." ;; esac +case "$with_widgets" in + motif ) echo " Using Motif native widgets." ;; +esac case "$with_dialogs" in motif ) echo " Using Motif dialog boxes." @@ -4122,7 +4164,7 @@ case "$with_dialogs" in athena ) echo " Using Athena dialog boxes." ;; athena3d ) echo " Using Athena-3d dialog boxes." ;; esac -test "$with_shlib" = "yes" && echo " Compiling in DLL support." +test "$with_modules" = "yes" && echo " Compiling in DSO module support." test "$with_clash_detection" = yes && \ echo " Clash detection will use \"$lockdir\" for locking files." echo " movemail will use \"$mail_locking\" for locking mail spool files." @@ -4165,7 +4207,7 @@ for file in $internal_makefile_list; do ac_output_files="${ac_output_files+$ac_output_files }$file" done ac_output_files="$ac_output_files src/paths.h lib-src/config.values" -if test "$with_shlib" = "yes"; then +if test "$with_modules" = "yes"; then ac_output_files="$ac_output_files lib-src/ellcc.h" fi diff --git a/configure.usage b/configure.usage index 6d44544..dbeeb9a 100644 --- a/configure.usage +++ b/configure.usage @@ -47,6 +47,9 @@ Compilation options: Installation options: --prefix=DIR Install files below DIR. Defaults to `/usr/local'. +--with-prefix Compile the value of --prefix into the executable. + Defaults to `yes'. +--without-prefix Don't compile the value of --prefix into the executable. Window-system options: @@ -66,6 +69,9 @@ Window-system options: --with-dialogs=TYPE Use TYPE dialog boxes (motif, athena, athena3d, or no). Lucid menubars and scrollbars are the default. Motif dialog boxes will be used if Motif can be found. +--with-widgets=TYPE Use TYPE widgets (motif, athena, athena3d, or no). + Motif widgets will be used if Motif can be found. + Other widget types are currently unsupported. --with-dragndrop (*) Compile in the generic drag and drop API. This is automatically added if one of the drag and drop protocols is found (currently CDE, OffiX, MSWindows). @@ -130,6 +136,8 @@ Additional features: --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent concurrent updates of mail spool files. Valid types are `lockf', `flock', and `file'. +--with-modules Compile in experimental support for dynamically + loaded libraries (Dynamic Shared Objects). --with-site-lisp=yes Allow for a site-lisp directory in the XEmacs hierarchy searched before the installation packages. --with-site-modules=no Disable site-modules directory in the XEmacs hierarchy, @@ -219,10 +227,10 @@ Other options: Defaults to `${statedir}/xemacs/lock'. You may also specify any of the `path' variables found in Makefile.in, -including --bindir, --libdir, --lispdir, --sitelispdir, --datadir, ---infodir, --mandir and so on. Note that we recommend against -explicitly setting any of these variables. See the INSTALL file for a -complete list plus the reasons we advise not changing them. +including --bindir, --libdir, --docdir, --lispdir, --sitelispdir, +--datadir, --infodir, --mandir and so on. Note that we recommend +against explicitly setting any of these variables. See the INSTALL +file for a complete list plus the reasons we advise not changing them. If successful, configure leaves its status in config.status. If unsuccessful after disturbing the status quo, it removes config.status. diff --git a/etc/HELLO b/etc/HELLO index 7938aa5..748f116 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -26,7 +26,7 @@ Russian (.LN@NcNaNaNZNXNY) N7NTN`NPNRNaNbNRNcNYNbNU! Slovak Dobr.BN} deNr Spanish (Espa.ANqol) N!Hola! Swedish (Svenska) Hej, Goddag -Thai ($(?@0R0I0R0d070B0(B) $(?J0G8J04H$0C8:0(B, $(?J0G8J04H$2P0(B +Thai ($(?@0R0I0R0d070B0(B) $(?J0G8J04H$0C8:0(B, $(?J0G8J04H$2P0(B Tigrigna ($(3"8#r!N"^(B) $(3!Q!,!<"8(B Turkish (T.AN|rkNge) Merhaba diff --git a/etc/NEWS b/etc/NEWS index a8f7c80..29238ae 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -33,6 +33,30 @@ file. * Changes in XEmacs 21.2 ======================== +** The functions in rect.el have been almost completely rewritten... +to avoid inserting undesirable spaces, notably at the end of lines. +Two typical examples of this old behavior are `string-rectangle', which filled +all lines up to the right side of the rectangle, and `clear-rectangle', which +filled even empty lines up to the left side. + +This is not the case any more. All these functions have been rewritten to +avoid inserting unwanted spaces, and an optional prefix now allows them to +behave the old way. + +As a side effect, `move-to-column' now also accepts 'coerce as its second +argument, meaning that the line shouldn't be filled if its too short to reach +the desired column. + +** You can now customize and save comments for faces and variables. + +In Custom buffers, a new menu entry allows you to add and edit a comment. +Comments for variables can also be assigned by calling +`customize-set-(value|variable)' with a prefix argument. + +** XEmacs now locates the early package hierarchy at ~/.xemacs/packages. + +This has changed from simply ~/.xemacs. + ** `delete-key-deletes-forward' now defaults to t. `delete-key-deletes-forward' is the variable that regulates the @@ -41,11 +65,11 @@ and a delete key. If set to nil, the key labeled "Delete" will delete backward. If set to non-nil, the "Delete" key will delete forward, except on keyboards where a "Backspace" key is not provided. -Unless our implementation has bugs, the only reason why you would want +Unless our implementation has bugs, the only reason why you would want to set `delete-key-deletes-forward' to nil is if you want to use the Delete key to delete backwards, despite the presence (according to Xlib) of a BackSpace key on the keyboard. - + ** Interactive searching and matching case improvements. Case sensitiveness in searching operations is normally controlled by @@ -53,7 +77,7 @@ the variable `case-fold-search' (if non-nil, case is ignored while searching). This mechanism has now been slightly improved for interactive searches: if the search string (or regexp) contains uppercase characters, the searching is forced to be case-sensitive, -`case-fold-search'. +`case-fold-search'. The new behavior affects all functions performing interactive searches, like `zap-to-char', `list-matching-lines', `tags-search' @@ -88,6 +112,34 @@ maintained internally. The new primitives available for this purpose are functions named `user-name-completion' and `user-name-all-completions'. +** Native widgets can be displayed in buffers. + +The glyph system has been extended to allow the display of glyphs that +are implemented as native window-system widgets. Thus you can embed +buttons, scrollbars, combo boxes, edit fields and progress gauges in a +buffer. As a side effect subwindow support now works once again. + +This support is currently only available under MS-Windows. + +** X-Face support is now available under MS-Windows + +If an X-Face libary built under MS-Windows is available then XEmacs +will use this at build time. + +** The font-menu is now available under MS-Windows + +** MS-Windows support for selection is much more robust + +Generally selection should now do what you would expect under +MS-Windows: the middle mouse button will paste your current selection +or the clipboard; conversions from different types of selection to the +clipboard can be made; the kill-ring and friends will be updated as +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 + * Lisp and internal changes in XEmacs 21.2 ========================================== diff --git a/etc/TUTORIAL.ru b/etc/TUTORIAL.ru index 49b17ff..c8c4cce 100644 --- a/etc/TUTORIAL.ru +++ b/etc/TUTORIAL.ru @@ -1079,4 +1079,4 @@ Copyright (c) 1985, 1996 Free Software Foundation writing, and sharing free software! // ÚÁÍÅÞÁÎÉÑ, ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË Ó ÎÅÔÅÒÐÅÎÉÅÍ ÖÄÕ ÐÏ ÁÄÒÅÓÕ bor@vb.dn.ua -// Vladimir Bormotov. \ No newline at end of file +// Vladimir Bormotov. diff --git a/etc/TUTORIAL.th b/etc/TUTORIAL.th index e2319c6..add2dc9 100644 --- a/etc/TUTORIAL.th +++ b/etc/TUTORIAL.th @@ -1,669 +1,669 @@ ============================== - GNUEMACS ,T@RIR0-Uh10;Xh19(B (Mule) ,T`0:Wi1M'05i19(B + GNUEMACS ÀÒÉÒ­Õè»Øè¹ (Mule) àº×éͧµé¹ ============================== -,TKARB`K05X1(B: ,T`M!JRC)0:Q1:`0:Wi1M'05i1909Ui1(B 0,T6Y1!`0"U1B90"Vi19b4B0BV14K0EQ1!07Uh10Gh1R(B ",TEM'`0Eh19`EB04U1!0Gh1R`0CU1B90CYi1(B" - ,T:CC07Q1407Uh1`0CTh1A05i1904i1GB(B ">>" ,T(P0AU1$S0JQh1'0Gh1R(B 0,T5h1Md;(Pc0Ki17SMPdC(B +ËÁÒÂà˵Ø: àÍ¡ÊÒéºÑºàº×éͧµé¹¹Õé ¶Ù¡à¢Õ¹¢Öé¹â´ÂÂÖ´ËÅÑ¡·ÕèÇèÒ "ÅͧàÅè¹àÅ´աÇèÒàÃÕ¹ÃÙé" + ºÃ÷Ѵ·ÕèàÃÔèÁµé¹´éÇ ">>" ¨ÐÁÕ¤ÓÊÑè§ÇèÒ µèÍ仨ÐãËé·ÓÍÐäà - ,Tb4B07Qh1Gd;(B ,T!RC0;i1M9$S0JQh1'c0Ki10!Q1:(B Mule ,T7Sd04i1b4Bc0*i1(B 0,T;Xh1A$M9b7CE(B (0,T;Xh1A07Uh1:9K09i1R0JQ1A0 ,TKARB06V1'(B ,Tc0Ki1!40;Xh1A$M9b7CE0$i1R'd0Gi1(B ,Ta0Ei1G!40;Xh1A(B <0,T5Q1G0MQ1!IC(B> 0,T5Q1GM0Bh1R'`0*h19(B C-f - ,TKARB06V1'(B ,Tc0Ki1!40;Xh1A$M9b7CE0$i1R'd0Gi1(B ,Ta0Ei1G!40;Xh1A(B f +C-<µÑÇÍÑ¡ÉÃ> ËÁÒ¶֧ ãËé¡´»ØèÁ¤Í¹â·ÃŤéÒ§äÇé áÅéÇ¡´»ØèÁ <µÑÇÍÑ¡ÉÃ> µÑÇÍÂèÒ§àªè¹ C-f + ËÁÒ¶֧ ãËé¡´»ØèÁ¤Í¹â·ÃŤéÒ§äÇé áÅéÇ¡´»ØèÁ f <> - >> ,T5M909Ui1"Mc0Ki1EM'!4(B C-v (View Next Screen 0,T4Y1K09i1R05h1Md;(B) 0,T4Y1(B ,T`0>Wh1M`0EWh1M9d;0Mh1R9K09i1R(B - 0,T5h1Md;(B - 0,T5h1M(R!09Ui1`0;g1905i19d;(B 0,T7X1!$0CQi1'07Uh10Mh1R9K09i1RK09Vh1'(B ,Tf(B ,T(:"Mc0Ki17Sc97S9M'`04U1BG0!Q19(B ,T`0>Wh1M`0EWh1M9d;(B - 0,T4Y1K09i1R05h1Md;(B + >> µÍ¹¹Õé¢ÍãËéÅͧ¡´ C-v (View Next Screen ´Ù˹éÒµèÍä») ´Ù à¾×èÍàÅ×è͹ä»Íèҹ˹éÒ + µèÍä» + µèͨҡ¹Õéà»ç¹µé¹ä» ·Ø¡¤ÃÑ駷ÕèÍèҹ˹éÒ˹Öè§ æ ¨º¢ÍãËé·Ó㹷ӹͧà´ÕÂǡѹ à¾×èÍàÅ×èÍ¹ä» + ´Ù˹éÒµèÍä» -ESC <0,T5Q1G0MQ1!IC(B> ,TKARB06V1'(B ,Tc0Ki1!40;Xh1A(B ESC ,Ta0Ei1G;0Eh1MB(B ,TK0EQ1'(R!09Qi190(V1'!40;Xh1A(B <0,T5Q1G0MQ1!IC(B> ,T5RA(B +ESC <µÑÇÍÑ¡ÉÃ> ËÁÒ¶֧ ãËé¡´»ØèÁ ESC áÅéÇ»ÅèÍ ËÅѧ¨Ò¡¹Ñ鹨֧¡´»ØèÁ <µÑÇÍÑ¡ÉÃ> µÒÁ -,TKARB`K05X1(B: <0,T5Q1G0MQ1!IC(B> ,Td0Ah10Gh1R`0;g1905Q1GcK0-h1K0CW1M05Q1G`0Eg1!(B ,T(Pc0Ki1$GRAKARB`K0AW1M90!Q19`0AWh1M06Y1!c0*i1c9(B - ,T$S0JQh1'(B 0,T6i1RKR!0AU10;Xh1A(B META ,Tc0Ki1!4(B 0,T!g1(PJRARC6c0*i1!RC!4(B M-<0,T5Q1G0MQ1!IC(B> ,Ta79(B - ,T!RC(B ESC <0,T5Q1G0MQ1!IC(B> ,Td04i1(B (0,T$W1Mc0Ki1!40;Xh1A(B META 0,T$i1R'd0Gi1(B ,Ta0Ei1G0(V1'!4(B <0,T5Q1G0MQ1!IC(B>) +ËÁÒÂà˵Ø: <µÑÇÍÑ¡ÉÃ> äÁèÇèÒà»ç¹µÑÇãË­èËÃ×͵ÑÇàÅç¡ ¨ÐãËé¤ÇÒÁËÁÒÂàËÁ×͹¡Ñ¹àÁ×èͶ١ãªéã¹ + ¤ÓÊÑè§ ¶éÒËÒ¡ÁÕ»ØèÁ META ãËé¡´ ¡ç¨ÐÊÒÁÒöãªé¡Òá´ M-<µÑÇÍÑ¡ÉÃ> á·¹ + ¡Òà ESC <µÑÇÍÑ¡ÉÃ> ä´é (¤×ÍãËé¡´»ØèÁ META ¤éÒ§äÇé áÅéǨ֧¡´ <µÑÇÍÑ¡ÉÃ>) -0,T"i1MJS0$Q1-(B: ,T`GER(P`0ET1!c0*i1(B Emacs ,Tc0Ki1!4(B C-x C-c ,TK0CW1Mc9!C03U107Uh10JQh1'(B Emacs ,T(R!(B csh - 0,T!g1JRARC6c0*i1(B suspend (,TK0BX140*Qh1G$CRG(B) ,Td04i1(B ,T!RC(B suspend Emacs ,T7Sd04i1b4B(B - ,T!4(B C-z +¢éÍÊӤѭ: àÇÅÒ¨ÐàÅÔ¡ãªé Emacs ãËé¡´ C-x C-c ËÃ×Í㹡óշÕèÊÑè§ Emacs ¨Ò¡ csh + ¡çÊÒÁÒöãªé suspend (ËÂØ´ªÑèǤÃÒÇ) ä´é ¡Òà suspend Emacs ·Óä´éâ´Â + ¡´ C-z - 0,T5h1M(R!09Ui1(B ,T"Mc0Ki10;i1M9$S0JQh1'(B C-v 0,T7X1!(B ,Tf(B ,T$0CQi1'07Uh10Mh1R9(:K09Vh1'K09i1R(B + µèͨҡ¹Õé ¢ÍãËé»é͹¤ÓÊÑè§ C-v ·Ø¡ æ ¤ÃÑ駷ÕèÍèÒ¹¨ºË¹Öè§Ë¹éÒ - ,T@RBc9K09i1R07Uh1a0Ei1G0!Q1:K09i1R06Q14d;(B ,T(P0AU1`09Wi1MKR0+i1S0!Q19M0BYh1:R':CC07Q14(B 0,T7Uh1`0;g19`0*h1909Ui1(B 0,T!g1`0>Wh1Mc0Ki1JRARC60CYi1(B -,Td04i10Gh1R(B ,T`09Wi1MKR07Uh1aJ4'M0BYh109Qi19(B 0,T5h1M`09Wh1M'0!Q19M0BYh1(B + ÀÒÂã¹Ë¹éÒ·ÕèáÅéǡѺ˹éÒ¶Ñ´ä» ¨ÐÁÕà¹×éÍËÒ«éӡѹÍÂÙèºÒ§ºÃ÷Ѵ ·Õèà»ç¹àªè¹¹Õé ¡çà¾×èÍãËéÊÒÁÒöÃÙé +ä´éÇèÒ à¹×éÍËÒ·ÕèáÊ´§ÍÂÙè¹Ñé¹ µèÍà¹×èͧ¡Ñ¹ÍÂÙè - 0,T!h1M90MWh19(B ,T(S`0;g19(P05i1M'0CYi10GT108U1!RCbB!0Bi1RB5SaK09h1'd;AR(B ,T@RBc9a0?i1A0"i1M0AY1E`0JU1B0!h1M9(B ,T5RA07Uh1:M!d;(B -,Ta0Ei1G(B 0,T!g10$W1M(B C-v ,Tc0*i1JSK0CQ1:`0EWh1M9d;0"i1R'K09i1R(B 0,T6i1R(P`0EWh1M9!0EQ1:07Uh1`0!h1R(B 0,T!g1c0Ki1!4(B ESC v + ¡è͹Í×è¹ ¨Óà»ç¹¨ÐµéͧÃÙéÇÔ¸Õ¡ÒÃâ¡ÂéÒµÓá˹è§ä»ÁÒ ÀÒÂã¹á¿éÁ¢éÍÁÙÅàÊÕ¡è͹ µÒÁ·ÕèºÍ¡ä» +áÅéÇ ¡ç¤×Í C-v ãªéÊÓËÃѺàÅ×è͹仢éҧ˹éÒ ¶éÒ¨ÐàÅ×è͹¡ÅѺ·Õèà¡èÒ ¡çãËé¡´ ESC v - >> ,TEM'c0*i1(B ESC v ,TaEP(B C-v ,T`0>Wh1M`0EWh1M9d;AR04Y1(B 0,TJQ1!JM'JRA$0CQi1'(B + >> Åͧãªé ESC v áÅÐ C-v à¾×èÍàÅ×è͹ä»ÁÒ´Ù ÊÑ¡ÊͧÊÒÁ¤ÃÑé§ -,TJ0CX1;(B +ÊÃØ» === - ,T$S0JQh1'(B ,TJSK0CQ1:`0EWh1M9d;AR07U1EPK09i1R@RBc9a0?i1A0"i1M0AY1E(B 0,T$W1M(B + ¤ÓÊÑè§ ÊÓËÃѺàÅ×è͹ä»ÁÒ·ÕÅÐ˹éÒÀÒÂã¹á¿éÁ¢éÍÁÙÅ ¤×Í - C-v ,T`0EWh1M9d;0"i1R'K09i1R(B ,TK09Vh1'K09i1R(M(B - ESC v ,T`0EWh1M9d;0"i1R'K0EQ1'(B ,TK09Vh1'K09i1R(M(B - C-l ,T`0"U1B9K09i1R(McK0Ah1(B ,TaEPc9"3P`04U1BG0!Q19(B 0,T!g1c0Ki1`0EWh1M95SaK09h1'"M'`$M0Cl1`+M0Cl1(B (cursor) - ,Td;M0BYh15C'!ER'(M(B + C-v àÅ×è͹仢éҧ˹éÒ Ë¹Öè§Ë¹éÒ¨Í + ESC v àÅ×è͹仢éÒ§ËÅѧ ˹Öè§Ë¹éÒ¨Í + C-l à¢Õ¹˹éÒ¨ÍãËÁè áÅÐã¹¢³Ðà´ÕÂǡѹ ¡çãËéàÅ×è͹µÓá˹觢ͧà¤ÍÃìà«ÍÃì (cursor) + ä»ÍÂÙèµÃ§¡ÅÒ§¨Í - >> ,T"Mc0Ki10JQ1'`!504Y10Gh1R(B ,Tc9"3P09Ui1`$M0Cl1`+M0Cl1M0BYh107Uh1dK9(B ,T>0Ci1MA07Qi1'(S0"i1M$GRA07Uh1M0BYh1CM:0"i1R'"M'(B - ,T`$M0Cl1`+M0Cl104i1GB(B ,Ta0Ei1GEM'!4(B C-l 0,T4Y1(B ,T5CG(JM:04Y10Gh1R(B ,T`$M0Cl1`+M0Cl1`0EWh1M9d;M0BYh107Uh1dK9(B - 0,T"i1M$GRA07Uh1M0BYh1CM:0"i1R'`;0EUh1B9d;M0Bh1R'dC(B + >> ¢ÍãËéÊѧࡵ´ÙÇèÒ ã¹¢³Ð¹Õéà¤ÍÃìà«ÍÃìÍÂÙè·Õèä˹ ¾ÃéÍÁ·Ñ駨ӢéͤÇÒÁ·ÕèÍÂÙèÃͺ¢éÒ§¢Í§ + à¤ÍÃìà«ÍÃì´éÇ áÅéÇÅͧ¡´ C-l ´Ù µÃǨÊͺ´ÙÇèÒ à¤ÍÃìà«ÍÃìàÅ×è͹ä»ÍÂÙè·Õèä˹ + ¢éͤÇÒÁ·ÕèÍÂÙèÃͺ¢éÒ§à»ÅÕè¹ä»ÍÂèÒ§äà -0,TGT108U1bB!0Bi1RB`$M0Cl1`+M0Cl10"Qi190>Wi190R9(B +ÇÔ¸Õâ¡ÂéÒÂà¤ÍÃìà«ÍÃì¢Ñé¹¾×é¹°Ò¹ ======================= - ,T5M909Ui1(B ,T`CR0!g10CYi10GT108U1bB!0Bi1RBd;ARa::07U1EPK09i1Ra0Ei1G(B 0,T5h1Md;(B 0,T!g1AR`0CU1B90CYi10GT108U1bB!0Bi1RBd;07Uh15SaK09h1'c4(B -,T5SaK09h1'K09Vh1'@RBc9K09i1R`04U1BG0!Q19(B 0,T+Vh1'JRARC67Sd04i1KERB0GT108U1(B 0,TGT108U1K09Vh1'0!g10$W1Mc0Ki1c0*i1$S0JQh1'(B ,Td;:CC07Q140!h1M9K09i1R(B -(previous) ,Td;:CC07Q1405h1Md;(B (next) ,Td;04i1R9K09i1R(B (forward) ,Td;04i1R9K0EQ1'(B (backward) ,T$S0JQh1'(B -,T`K0Eh1R09Ui1(B 0,T6Y1!05Qi1'd0Gi107Uh1(B C-p C-n C-f ,TaEP(B C-b ,T5RAES04Q1:(B 0,T+Vh1'(P7Sc0Ki1bB!0Bi1RBd;ARd04i1(B ,Tb4B`07U1B:0!Q1:(B -,T5SaK09h1'0;Q1(0(X10:Q19(B ,TJ0CX1;`0"U1B9`0;g19a<9@R>d04i104Q1'09Ui1(B + µÍ¹¹Õé àÃÒ¡çÃÙéÇÔ¸Õâ¡ÂéÒÂä»ÁÒẺ·ÕÅÐ˹éÒáÅéÇ µèÍä» ¡çÁÒàÃÕ¹ÃÙéÇÔ¸Õâ¡ÂéÒÂä»·ÕèµÓá˹è§ã´ +µÓá˹è§Ë¹Öè§ÀÒÂã¹Ë¹éÒà´ÕÂǡѹ «Öè§ÊÒÁÒö·Óä´éËÅÒÂÇÔ¸Õ ÇÔ¸Õ˹Ö觡ç¤×ÍãËéãªé¤ÓÊÑè§ ä»ºÃ÷Ѵ¡è͹˹éÒ +(previous) 仺Ã÷ѴµèÍä» (next) ä»´éҹ˹éÒ (forward) ä»´éÒ¹ËÅѧ (backward) ¤ÓÊÑè§ +àËÅèÒ¹Õé ¶Ù¡µÑé§äÇé·Õè C-p C-n C-f áÅÐ C-b µÒÁÅӴѺ «Ö觨зÓãËéâ¡ÂéÒÂä»ÁÒä´é â´Âà·Õº¡Ñº +µÓá˹觻Ѩ¨ØºÑ¹ ÊÃØ»à¢Õ¹à»ç¹á¼¹ÀÒ¾ä´é´Ñ§¹Õé - ,T:CC07Q1407Uh1a0Ei1G(B C-p + ºÃ÷Ѵ·ÕèáÅéÇ C-p : : - 0,T5Q1G0MQ1!IC04i1R9K0EQ1'(B C-b .... ,T5SaK09h1'`$M0Cl1`+M0Cl10;Q1(0(X10:Q19(B .... 0,T5Q1G0MQ1!IC04i1R9K09i1R(B C-f + µÑÇÍÑ¡ÉôéÒ¹ËÅѧ C-b .... µÓá˹è§à¤ÍÃìà«ÍÃì»Ñ¨¨ØºÑ¹ .... µÑÇÍÑ¡Éôéҹ˹éÒ C-f : : - ,T:CC07Q1405h1Md;(B C-n + ºÃ÷ѴµèÍä» C-n - ,T$S0JQh1'`K0Eh1R09Ui1(B ,T`MRAR(R!05Q1G0MQ1!IC05Q1GaC!"M'(B ,T$S0Gh1R(B Previous Next Backward Forward -0,T+Vh1'(P0*h1GBc0Ki1(Sd04i1d0Ah1BR!(B ,T$S0JQh1'`K0Eh1R09Ui1`0;g19$S0JQh1'JSK0CQ1:!RCbB!0Bi1RB0"Qi190>Wi190R9(B 0,T+Vh1'05i1M'c0*i1M0BYh1`JAM(B + ¤ÓÊÑè§àËÅèÒ¹Õé àÍÒÁÒ¨Ò¡µÑÇÍÑ¡ÉõÑÇáá¢Í§ ¤ÓÇèÒ Previous Next Backward Forward +«Ö觨ЪèÇÂãËé¨Óä´éäÁèÂÒ¡ ¤ÓÊÑè§àËÅèÒ¹Õéà»ç¹¤ÓÊÑè§ÊÓËÃѺ¡ÒÃâ¡ÂéÒ¢Ñé¹¾×é¹°Ò¹ «Ö觵éͧãªéÍÂÙèàÊÁÍ - >> ,TEM'!4(B C-n 0,T4Y1KERB(B ,Tf(B ,T$0CQi1'(B ,T`0>Wh1M`0EWh1M9`$M0Cl1`+M0Cl1AR0BQ1':CC07Q1409Ui1(B (,T:CC07Q1407Uh1!S0EQ1'0Mh1R9(B - ,TM0BYh109Ui1(B) + >> Åͧ¡´ C-n ´ÙËÅÒÂ æ ¤ÃÑé§ à¾×èÍàÅ×è͹à¤ÍÃìà«ÍÃìÁÒÂѧºÃ÷Ѵ¹Õé (ºÃ÷Ѵ·Õè¡ÓÅѧÍèÒ¹ + ÍÂÙè¹Õé) - >> ,TEM'!4(B C-f 0,T4Y1KERB(B ,Tf(B ,T$0CQi1'(B ,T`0>Wh1M`0EWh1M9`$M0Cl1`+M0Cl1d;0BQ1'5C'!ER'"M':CC07Q14(B ,Ta0Ei1GEM'(B - ,T!4(B C-p ,T`0EWh1M90"Vi190"i1R':904Y1(B 0,TJQ1'`!504Y104i1GB0Gh1R(B ,T5SaK09h1'"M'`$M0Cl1`+M0Cl1`;0EUh1B9d;M0Bh1R'dC(B + >> Åͧ¡´ C-f ´ÙËÅÒÂ æ ¤ÃÑé§ à¾×èÍàÅ×è͹à¤ÍÃìà«ÍÃìä»ÂѧµÃ§¡ÅÒ§¢Í§ºÃ÷Ѵ áÅéÇÅͧ + ¡´ C-p àÅ×è͹¢Öé¹¢éÒ§º¹´Ù Êѧࡵ´Ù´éÇÂÇèÒ µÓá˹觢ͧà¤ÍÃìà«ÍÃìà»ÅÕè¹ä»ÍÂèÒ§äà - >> ,TEM'!4(B C-b ,T"3P07Uh1M0BYh107Uh15SaK09h1'K09i1R0JX14"M':CC07Q1404Y1(B 0,TJQ1'`!504Y104i1GB0Gh1R(B ,T`$M0Cl1`+M0Cl1`$0EWh1M9(B - ,Td;M0Bh1R'dC(B ,T(R!09Qi19c0Ki1!4(B C-b 0,TMU1!JM'JRA$0CQi1'(B ,Ta0Ei1G!4(B C-f ,T`0>Wh1M`0EWh1M9d;0BQ1'07i1RB0JX14(B - ,T"M':CC07Q1404Y1(B ,T`$M0Cl1`+M0Cl1(P`0;g19M0Bh1R'dC(B 0,T6i1R!4(9`EB07i1RB:CC07Q14d;(B + >> Åͧ¡´ C-b ¢³Ð·ÕèÍÂÙè·ÕèµÓá˹è§Ë¹éÒÊØ´¢Í§ºÃ÷Ѵ´Ù Êѧࡵ´Ù´éÇÂÇèÒ à¤ÍÃìà«ÍÃìà¤Å×è͹ + ä»ÍÂèÒ§äà ¨Ò¡¹Ñé¹ãËé¡´ C-b ÍÕ¡ÊͧÊÒÁ¤ÃÑé§ áÅéÇ¡´ C-f à¾×èÍàÅ×è͹ä»Âѧ·éÒÂÊØ´ + ¢Í§ºÃ÷Ѵ´Ù à¤ÍÃìà«ÍÃì¨Ðà»ç¹ÍÂèÒ§äà ¶éÒ¡´¨¹àÅ·éÒºÃÃ·Ñ´ä» - ,T`GER07Uh1`0EWh1M9`$M0Cl1`+M0Cl1(B ,T(9`EB:CC07Q14aC!0JX14K0CW1M:CC07Q1407i1RB0JX14"M'K09i1Rd;(B ,T`$M0Cl1`+M0Cl1(P(B -,T`0EWh1M9d;0BQ1':CC07Q1405h1Md;c907T1H7R'09Qi19(B ,Tf(B ,TaEP;0CQ1:c0Ki1`$M0Cl1`+M0Cl1!0EQ1:ARM0BYh1:9K09i1R(M`JAM(B + àÇÅÒ·ÕèàÅ×è͹à¤ÍÃìà«ÍÃì ¨¹àźÃ÷ѴááÊØ´ËÃ×ͺÃ÷Ѵ·éÒÂÊØ´¢Í§Ë¹éÒä» à¤ÍÃìà«ÍÃì¨Ð +àÅ×è͹ä»ÂѧºÃ÷ѴµèÍä»ã¹·ÔÈ·Ò§¹Ñé¹ æ áÅлÃѺãËéà¤ÍÃìà«ÍÃì¡ÅѺÁÒÍÂÙ躹˹éÒ¨ÍàÊÁÍ - >> ,TEM'!4(B C-n ,T`0>Wh1M`0EWh1M9`$M0Cl1`+M0Cl1c0Ki1`EB:CC07Q140Eh1R'0JX14"M'K09i1R(M04Y1(B ,Ta0Ei1G0JQ1'`!504Y10Gh1R(B - ,T`0!T14MPdC0"Vi19(B ,TaEP5SaK09h1'"M'`$M0Cl1`+M0Cl1`;0EUh1B9d;M0Bh1R'dC(B + >> Åͧ¡´ C-n à¾×èÍàÅ×è͹à¤ÍÃìà«ÍÃìãËéàźÃ÷ѴÅèÒ§ÊØ´¢Í§Ë¹éҨʹ٠áÅéÇÊѧࡵ´ÙÇèÒ + à¡Ô´ÍÐäâÖé¹ áÅеÓá˹觢ͧà¤ÍÃìà«ÍÃìà»ÅÕè¹ä»ÍÂèÒ§äà - 0,T6i1R0CYi10JV1!0Gh1R!RC"0BQ1:d;07U1EP05Q1G0MQ1!IC09Qi190MW14MR40BW14BR4(B 0,T!g1JRARC6c0*i1!RC`0EWh1M9`$M0Cl1`+M0Cl1d;07U1EP$S(B -,Td04i1(B ,T!4(B ESC f ,T`0>Wh1Mc0Ki1`0EWh1M9d;0"i1R'K09i1RK09Vh1'$S(B ,TaEP(B ESC b ,T`0>Wh1Mc0Ki1`0EWh1M9d;0"i1R'K0EQ1'K09Vh1'$S(B + ¶éÒÃÙéÊÖ¡ÇèÒ¡ÒâÂѺ价ÕÅеÑÇÍÑ¡ÉùÑé¹Í×´ÍÒ´Â×´ÂÒ´ ¡çÊÒÁÒöãªé¡ÒÃàÅ×è͹à¤ÍÃìà«ÍÃìä»·ÕÅÐ¤Ó +ä´é ¡´ ESC f à¾×èÍãËéàÅ×è͹仢éҧ˹éÒ˹Öè§¤Ó áÅÐ ESC b à¾×èÍãËéàÅ×è͹仢éÒ§ËÅѧ˹Öè§¤Ó -,TKARB`K05X1(B: ,TJSK0CQ1:@RIRd7B(B 0,TBQ1'd0Ah1JRARC6a0:h1'aB!5SaK09h1'"M'$Sd04i106Y1!05i1M'(B 0,T(V1'd0Ah1(B - ,TJRARC6c0*i1JM'$S0JQh1'09Ui1d04i1(B +ËÁÒÂà˵Ø: ÊÓËÃѺÀÒÉÒä·Â ÂѧäÁèÊÒÁÒöáºè§á¡µÓá˹觢ͧ¤Óä´é¶Ù¡µéͧ ¨Ö§äÁè + ÊÒÁÒöãªéÊͧ¤ÓÊÑ觹Õéä´é - >> ,TEM'!4(B ESC f ,TaEP(B ESC b ,TEM'04Y1KERB(B ,Tf(B ,T$0CQi1'(B ,TaEPEM'c0*i10Ch1GA0!Q1:(B C-f 0,T!Q1:(B C-b 0,T4Y1(B - 0,T4i1GB(B + >> Åͧ¡´ ESC f áÅÐ ESC b Åͧ´ÙËÅÒÂ æ ¤ÃÑé§ áÅÐÅͧãªéÃèÇÁ¡Ñº C-f ¡Ñº C-b ´Ù + ´éÇ - ,T(P0JQ1'`!5`0Kg19d04i10Gh1R(B ESC f ,TaEP(B ESC b 0,TAU10CY1;a::$0Ei1RB$0EV1'0!Q1:(B C-f ,TaEP(B C-b ,Tb4B0Jh1G9cK0-h1(B -ESC <0,T5Q1G0MQ1!IC(B> ,T(Pc0*i1`0!Uh1BG0!Q1:!RC0(Q14!RC0"i1M$GRA(B 0,TJh1G9(B C-<0,T5Q1G0MQ1!IC(B> ,T(Pc0*i10!Q1:0JTh1'07Uh1`0;g190>Wi190R9AR!(B -,T!0Gh1R(B (,T`0*h19(B 0,T5Q1G0MQ1!IC(B ,TK0CW1M(B ,T:CC07Q14(B) + ¨ÐÊѧࡵàËç¹ä´éÇèÒ ESC f áÅÐ ESC b ÁÕÃٻẺ¤ÅéÒ¤ÅÖ§¡Ñº C-f áÅÐ C-b â´ÂÊèǹãË­è +ESC <µÑÇÍÑ¡ÉÃ> ¨Ðãªéà¡ÕèÂǡѺ¡ÒèѴ¡ÒâéͤÇÒÁ Êèǹ C-<µÑÇÍÑ¡ÉÃ> ¨Ðãªé¡ÑºÊÔ觷Õèà»ç¹¾×é¹°Ò¹ÁÒ¡ +¡ÇèÒ (àªè¹ µÑÇÍÑ¡Éà ËÃ×Í ºÃ÷Ѵ) - C-a 0,T!Q1:(B C-e ,T`0;g19$S0JQh1'09h1R(P0CYi1d0Gi1(B ,T`>CRP0$h1M90"i1R'JP4G!04U107U1`04U1BG(B C-a ,Tc0*i1JSK0CQ1:`0EWh1M9(B -,T`$M0Cl1`+M0Cl1d;07Uh15SaK09h1'K09i1R0JX14"M':CC07Q14(B C-e ,TJSK0CQ1:`0EWh1M9d;07Uh15SaK09h1'07i1RB0JX14"M':CC07Q14(B + C-a ¡Ñº C-e à»ç¹¤ÓÊÑ觹èÒ¨ÐÃÙéäÇé à¾ÃÒФè͹¢éÒ§Êдǡ´Õ·Õà´ÕÂÇ C-a ãªéÊÓËÃѺàÅ×è͹ +à¤ÍÃìà«ÍÃìä»·ÕèµÓá˹è§Ë¹éÒÊØ´¢Í§ºÃ÷Ѵ C-e ÊÓËÃѺàÅ×è͹价ÕèµÓá˹觷éÒÂÊØ´¢Í§ºÃ÷Ѵ - >> ,TEM'!4(B C-a 0,T4Y1JM'$0CQi1'(B ,TK0EQ1'(R!09Qi19c0Ki1!4(B C-e 0,T4Y1JM'$0CQi1'(B ,Ta0Ei1GEM'0JQ1'`!504Y10Gh1R(B ,T!RC(B - ,T!4$S0JQh1'09Ui1AR!!0Gh1RJM'$0CQi1'(B ,T(Pd0Ah10*h1GBc0Ki1`0EWh1M9`$M0Cl1`+M0Cl1d;dK9d04i1AR!!0Gh1R09Qi190MU1!(B + >> Åͧ¡´ C-a ´ÙÊͧ¤ÃÑé§ ËÅѧ¨Ò¡¹Ñé¹ãËé¡´ C-e ´ÙÊͧ¤ÃÑé§ áÅéÇÅͧÊѧࡵ´ÙÇèÒ ¡Òà + ¡´¤ÓÊÑ觹ÕéÁÒ¡¡ÇèÒÊͧ¤ÃÑé§ ¨ÐäÁèªèÇÂãËéàÅ×è͹à¤ÍÃìà«ÍÃìä»ä˹ä´éÁÒ¡¡ÇèÒ¹Ñé¹ÍÕ¡ - 0,TBQ1'0AU10MU1!JM'$S0JQh1'(B ,TJSK0CQ1:!RC`0EWh1M9`$M0Cl1`+M0Cl1a::0'h1RB(B ,Tf(B 0,T$W1M(B ,T$S0JQh1'(B ESC < ,TJSK0CQ1:!RC`0EWh1M9(B -,T`$M0Cl1`+M0Cl1d;07Uh15SaK09h1'aC!0JX14"M'a0?i1A0"i1M0AY1E(B ,TaEP$S0JQh1'(B ESC > ,TJSK0CQ1:!RC`0EWh1M9d;5SaK09h1'07i1RB0JX14(B + ÂѧÁÕÍÕ¡Êͧ¤ÓÊÑè§ ÊÓËÃѺ¡ÒÃàÅ×è͹à¤ÍÃìà«ÍÃìẺ§èÒÂ æ ¤×Í ¤ÓÊÑè§ ESC < ÊÓËÃѺ¡ÒÃàÅ×è͹ +à¤ÍÃìà«ÍÃìä»·ÕèµÓá˹è§ááÊØ´¢Í§á¿éÁ¢éÍÁÙÅ áÅФÓÊÑè§ ESC > ÊÓËÃѺ¡ÒÃàÅ×è͹仵Óá˹觷éÒÂÊØ´ - ,T`CR`0CU1B!5SaK09h1'"M'0"i1M$GRA(B 0,T7Uh10AU1`$M0Cl1`+M0Cl1M0BYh10Gh1R(B "0,T(X14(B (point)" ,TK0CW1M0>Y140MU1!M0Bh1R'K09Vh1'd04i1(B -0,TGh1R(B ,T`$M0Cl1`+M0Cl1(B ,T`0;g190JTh1'07Uh1:M!c0Ki1`CR0CYi10Gh1R(B 0,T(X14(B ,TM0BYh15C'dK9"M'K09i1R(M(B + àÃÒàÃÕ¡µÓá˹觢ͧ¢éͤÇÒÁ ·ÕèÁÕà¤ÍÃìà«ÍÃìÍÂÙèÇèÒ "¨Ø´ (point)" ËÃ×;ٴÍÕ¡ÍÂèҧ˹Öè§ä´é +ÇèÒ à¤ÍÃìà«ÍÃì à»ç¹ÊÔ觷ÕèºÍ¡ãËéàÃÒÃÙéÇèÒ ¨Ø´ ÍÂÙèµÃ§ä˹¢Í§Ë¹éÒ¨Í - ,TJ0CX1;$S0JQh1'JSK0CQ1:!RC`$0EWh1M9d;AR(B 0,T+Vh1'CGA!RC`$0EWh1M907Uh1c9K09h1GB"M'$S(B ,TK09h1GB"M':CC07Q14d0Gi104i1GB(B -,Td04i104Q1'09Ui1(B + ÊÃØ»¤ÓÊÑè§ÊÓËÃѺ¡ÒÃà¤Å×è͹ä»ÁÒ «Öè§ÃÇÁ¡ÒÃà¤Å×è͹·Õèã¹Ë¹èÇ¢ͧ¤Ó ˹èÇ¢ͧºÃ÷ѴäÇé´éÇ +ä´é´Ñ§¹Õé - C-f ,Td;0"i1R'K09i1RK09Vh1'05Q1G0MQ1!IC(B - C-b ,T!0EQ1:0"i1R'K0EQ1'K09Vh1'05Q1G0MQ1!IC(B + C-f 仢éҧ˹éÒ˹Ö觵ÑÇÍÑ¡Éà + C-b ¡ÅѺ¢éÒ§ËÅѧ˹Ö觵ÑÇÍÑ¡Éà - ESC f ,Td;0"i1R'K09i1RK09Vh1'$S(B - ESC b ,T!0EQ1:0"i1R'K0EQ1'K09Vh1'$S(B + ESC f 仢éҧ˹éÒ˹Öè§¤Ó + ESC b ¡ÅѺ¢éÒ§ËÅѧ˹Öè§¤Ó - C-n ,T`0EWh1M9d;:CC07Q1405h1Md;(B - C-p ,T`0EWh1M9d;:CC07Q1407Uh1a0Ei1G(B + C-n àÅ×è͹仺Ã÷ѴµèÍä» + C-p àÅ×è͹仺Ã÷Ѵ·ÕèáÅéÇ - ESC ] ,T`0EWh1M9d;5SaK09h1'07i1RB0JX14"M'0Bh1MK09i1R(B (paragraph) - ESC [ ,T`0EWh1M9d;5SaK09h1'aC!0JX14"M'0Bh1MK09i1R(B + ESC ] àÅ×è͹仵Óá˹觷éÒÂÊØ´¢Í§ÂèÍ˹éÒ (paragraph) + ESC [ àÅ×è͹仵Óá˹è§ááÊØ´¢Í§ÂèÍ˹éÒ - C-a ,T`0EWh1M9d;5SaK09h1'aC!0JX14"M':CC07Q14(B - C-e ,T`0EWh1M9d;5SaK09h1'07i1RB0JX14"M':CC07Q14(B + C-a àÅ×è͹仵Óá˹è§ááÊØ´¢Í§ºÃ÷Ѵ + C-e àÅ×è͹仵Óá˹觷éÒÂÊØ´¢Í§ºÃ÷Ѵ - ESC < ,T`0EWh1M9d;5SaK09h1'aC!0JX14"M'a0?i1A0"i1M0AY1E(B - ESC > ,T`0EWh1M9d;5SaK09h1'07i1RB0JX14"M'a0?i1A0"i1M0AY1E(B + ESC < àÅ×è͹仵Óá˹è§ááÊØ´¢Í§á¿éÁ¢éÍÁÙÅ + ESC > àÅ×è͹仵Óá˹觷éÒÂÊØ´¢Í§á¿éÁ¢éÍÁÙÅ - >> ,TEM'c0*i1$S0JQh1'a05h1EP$S0JQh1'04Y1(B ,T$S0JQh1'`K0Eh1R09Ui1`0;g19$S0JQh1'07Uh1c0*i10!Q190:h1MB0JX14(B ,T$S0JQh1'JM'$S0JQh1'K0EQ1'(B - ,T(P`0EWh1M9`$M0Cl1`+M0Cl1(B ,Td;0BQ1'07Uh107Uh10$h1M90"i1R'd!E(B ,Tc0Ki1EM'c0*i1$S0JQh1'(B C-v ,TaEP(B ESC v ,T`0>Wh1M(B - ,T`0EWh1M9`$M0Cl1`+M0Cl1!0EQ1:AR07Uh15C'09Ui1(B + >> Åͧãªé¤ÓÊÑè§áµèÅФÓÊÑ觴٠¤ÓÊÑè§àËÅèÒ¹Õéà»ç¹¤ÓÊÑ觷Õèãªé¡Ñ¹ºèÍÂÊØ´ ¤ÓÊÑè§Êͧ¤ÓÊÑè§ËÅѧ + ¨ÐàÅ×è͹à¤ÍÃìà«ÍÃì ä»Âѧ·Õè·Õè¤è͹¢éÒ§ä¡Å ãËéÅͧãªé¤ÓÊÑè§ C-v áÅÐ ESC v à¾×èÍ + àÅ×è͹à¤ÍÃìà«ÍÃì¡ÅѺÁÒ·ÕèµÃ§¹Õé - ,TJSK0CQ1:$S0JQh1'0MWh19(B ,Tf(B ,T"M'(B Emacs 0,T!g1`0*h190!Q19(B ,T$S0JQh1'`K0Eh1R09Ui1(PJRARC6`0>Th1A05Q1G`0EW1M!(B (argument) -,T`0>Wh1M!SK94(B ,T(S9G9$0CQi1'(B ,Tc9!RC;0/T10:Q105T1'R9d04i1(B ,T!RC!SK94(S9G9$0CQi1'(B ,T7Sd04i1b4B!4(B C-u ,Ta0Ei1G5RA(B -0,T4i1GB(S9G9$0CQi1'07Uh105i1M'!RC0!h1M9(B ,Ta0Ei1G0(V1'0$h1MB!4$S0JQh1'5RA(B + ÊÓËÃѺ¤ÓÊÑè§Í×è¹ æ ¢Í§ Emacs ¡çàªè¹¡Ñ¹ ¤ÓÊÑè§àËÅèÒ¹Õé¨ÐÊÒÁÒöà¾ÔèÁµÑÇàÅ×Í¡ (argument) +à¾×èÍ¡Ó˹´ ¨Ó¹Ç¹¤ÃÑé§ ã¹¡Òû¯ÔºÑµÔ§Ò¹ä´é ¡ÒáÓ˹´¨Ó¹Ç¹¤ÃÑé§ ·Óä´éâ´Â¡´ C-u áÅéǵÒÁ +´éǨӹǹ¤ÃÑ駷Õèµéͧ¡Òáè͹ áÅéǨ֧¤èÍ¡´¤ÓÊÑ觵ÒÁ - 0,T5Q1GM0Bh1R'`0*h19(B ,T$S0JQh1'(B C-u 8 C-f ,TKARB06V1'(B ,Tc0Ki1`0EWh1M9d;0"i1R'K09i1R(B 8 0,T5Q1G0MQ1!IC(B + µÑÇÍÂèÒ§àªè¹ ¤ÓÊÑè§ C-u 8 C-f ËÁÒ¶֧ ãËéàÅ×è͹仢éҧ˹éÒ 8 µÑÇÍÑ¡Éà - >> ,Tc0Ki1EM'!SK94(S9G9$0CQi1'07Uh1`KARPJAJSK0CQ1:$S0JQh1'(B C-n ,TK0CW1M(B C-p ,T`0>Wh1M`0EWh1M9`$M0Cl1`+M0Cl1(B - ,Tc0Ki1ARM0BYh1c!0Ei1:CC07Q1409Ui1c0Ki1AR!07Uh10JX14`07h1R07Uh1(P7Sd04i1(B ,Tc9!RC`0EWh1M9`$M0Cl1`+M0Cl1$0CQi1'`04U1BG(B + >> ãËéÅͧ¡Ó˹´¨Ó¹Ç¹¤ÃÑ駷ÕèàËÁÒÐÊÁÊÓËÃѺ¤ÓÊÑè§ C-n ËÃ×Í C-p à¾×èÍàÅ×è͹à¤ÍÃìà«ÍÃì + ãËéÁÒÍÂÙèã¡ÅéºÃ÷Ѵ¹ÕéãËéÁÒ¡·ÕèÊØ´à·èÒ·Õè¨Ð·Óä´é 㹡ÒÃàÅ×è͹à¤ÍÃìà«ÍÃì¤ÃÑé§à´ÕÂÇ - ,TJSK0CQ1:(B C-v ,TaEP(B ESC v ,T(Pd04i1> ,TEM'!4(B C-u 3 C-v 0,T4Y1(B + >> Åͧ¡´ C-u 3 C-v ´Ù - ,T`0EWh1M9!0EQ1:07Uh1`0!h1Rd04i1b4B(B C-u 3 ESC v + àÅ×è͹¡ÅѺ·Õèà¡èÒä´éâ´Â C-u 3 ESC v -,T$S0JQh1'B!`0ET1!(B +¤ÓÊÑè§Â¡àÅÔ¡ ========= - ,T$S0JQh1'(B C-g ,Tc0*i1JSK0CQ1:0JQh1'B!`0ET1!$S0JQh1'05h1R'(B ,Tf(B 0,T7Uh105i1M'!RC!RC0;i1M90"i1M0AY1E`0>Th1A`05T1A(B 0,T5Q1GM0Bh1R'`0*h19(B -,TCPK0Gh1R'07Uh1c0Jh105Q1G`0EW1M!(B (argument) ,TM0BYh1(B ,TK0CW1MCPK0Gh1R'$S0JQh1'07Uh105i1M'!RC!40;Xh1AAR!!0Gh1R(B 2 0,T;Xh1A0"Vi19d;(B 0,T6i1R(B -,TKR!05i1M'!RCB!`0ET1!(B 0,T!g1c0Ki1!4(B C-g + ¤ÓÊÑè§ C-g ãªéÊÓËÃѺÊÑè§Â¡àÅÔ¡¤ÓÊÑ觵èÒ§ æ ·Õèµéͧ¡ÒáÒûé͹¢éÍÁÙÅà¾ÔèÁàµÔÁ µÑÇÍÂèÒ§àªè¹ +ÃÐËÇèÒ§·ÕèãÊèµÑÇàÅ×Í¡ (argument) ÍÂÙè ËÃ×ÍÃÐËÇèÒ§¤ÓÊÑ觷Õèµéͧ¡Òá´»ØèÁÁÒ¡¡ÇèÒ 2 »ØèÁ¢Öé¹ä» ¶éÒ +ËÒ¡µéͧ¡ÒáàÅÔ¡ ¡çãËé¡´ C-g - >> ,TEM'!SK94(S9G9$0CQi1'c0Ki1`0;g19(B 100 ,Tb4B!RC!4(B C-u 100 ,Ta0Ei1G!4(B C-g 0,T4Y1(B ,TK0EQ1'(R!09Qi19(B - ,Tc0Ki1EM'!4(B C-f 0,T4Y1(B ,Ta0Ei1G0JQ1'`!504Y10Gh1R`$M0Cl1`+M0Cl1`0EWh1M9d;0!Uh105Q1G0MQ1!IC(B ,TK0CW1M5M907Uh1>ER4d;!4(B - ESC ,Tb4Bd0Ah105Qi1'c((B 0,T!g1JRARC6!4(B C-g ,TB!`0ET1!d04i1(B + >> Åͧ¡Ó˹´¨Ó¹Ç¹¤ÃÑé§ãËéà»ç¹ 100 â´Â¡Òá´ C-u 100 áÅéÇ¡´ C-g ´Ù ËÅѧ¨Ò¡¹Ñé¹ + ãËéÅͧ¡´ C-f ´Ù áÅéÇÊѧࡵ´ÙÇèÒà¤ÍÃìà«ÍÃìàÅ×è͹仡ÕèµÑÇÍÑ¡Éà ËÃ×͵͹·Õè¾ÅҴ仡´ + ESC â´ÂäÁèµÑé§ã¨ ¡çÊÒÁÒö¡´ C-g ¡àÅÔ¡ä´é -0,T"i1M0ER4(B (Error) +¢éͼԴ¾ÅÒ´ (Error) ================ - ,Tc9:R'$0CQi1'(B ,TMR((P0AU1!RC0JQh1';0/T10:Q105T1'R9:R'M0Bh1R'(B 0,T7Uh1(B Emacs ,TBMA0CQ1:d0Ah1d04i1`0!T140"Vi19(B 0,T5Q1GM0Bh1R'`0*h19(B -,T!RC!4$S0JQh1'$M9b7CE:R'$S0JQh1'(B 0,T7Uh1d0Ah1d04i1!SK94d0Gi1c9(B Emacs 0,T!g1(P7Sc0Ki1(B Emacs 0,TJh1'`0JU1B'`05W1M9(B -,TaEPaJ4'ER4M0Bh1R'dC(B + 㹺ҧ¤ÃÑé§ ÍÒ¨¨ÐÁÕ¡ÒÃÊÑ觻¯ÔºÑµÔ§Ò¹ºÒ§ÍÂèÒ§ ·Õè Emacs ÂÍÁÃѺäÁèä´éà¡Ô´¢Öé¹ µÑÇÍÂèÒ§àªè¹ +¡Òá´¤ÓÊÑ觤͹â·Ãźҧ¤ÓÊÑè§ ·ÕèäÁèä´é¡Ó˹´äÇéã¹ Emacs ¡ç¨Ð·ÓãËé Emacs Êè§àÊÕ§àµ×͹ +áÅÐáÊ´§¼Å·ÕèºÃ÷ѴÅèÒ§ÊØ´¢Í§¨Í ºÍ¡ÇèÒ¼Ô´¾ÅÒ´ÍÂèÒ§äà - ,T$S0JQh1':R'$S0JQh1'07Uh1`0"U1B9d0Gi1c9`M!JRC)0:Q1:09Ui1(B ,TMR(c0*i1d0Ah1d04i10!Q1:(B Emacs ,T:R'0CXh19(B (version) 0,T+Vh1'(P(B -,T7Sc0Ki10AU1!RCaJ4'ER4(B (error) 0,T"Vi19(B ,Tc9!C03U109Ui1(B ,T"Mc0Ki1!40;Xh1AMPdC0!g1d04i1(B ,T`0>Wh1M`0EWh1M9d;0BQ1'0Jh1G9(B -0,T5h1Md;(B + ¤ÓÊÑ觺ҧ¤ÓÊÑ觷Õèà¢Õ¹äÇéã¹àÍ¡ÊÒéºÑº¹Õé ÍÒ¨ãªéäÁèä´é¡Ñº Emacs ºÒ§ÃØè¹ (version) «Ö觨Р+·ÓãËéÁÕ¡ÒÃáÊ´§¼Å¢éͼԴ¾ÅÒ´ (error) ¢Öé¹ ã¹¡Ã³Õ¹Õé ¢ÍãËé¡´»ØèÁÍÐäáçä´é à¾×èÍàÅ×è͹ä»ÂѧÊèǹ +µèÍä» -0,TGT19b40Gl1(B (Window) +ÇÔ¹â´Çì (Window) ============== - Emacs ,TJRARC6`0;T140GT19b40Gl1d04i1>0Ci1MA0!Q19KERB0GT19b40Gl1(B ,TaEPc0*i10GT19b40Gl1`K0Eh1R09Qi19aJ4'08l1"M'$S0JQh1':R'$S0JQh1'(B ,TK0CW1M(B Help ,TMM!`0JU1B0!h1M9(B + Emacs ÊÒÁÒöà»Ô´ÇÔ¹â´Çìä´é¾ÃéÍÁ¡Ñ¹ËÅÒÂÇÔ¹â´Çì áÅÐãªéÇÔ¹â´ÇìàËÅèÒ¹Ñé¹áÊ´§¼Å¢éͤÇÒÁ +µèÒ§ æ µÒÁµéͧ¡ÒÃä´é ¡è͹Í×è¹ ¡ç¤ÇèзӤÇÒÁÃÙé¨Ñ¡¡Ñº¤ÓÊÑè§ ·ÕèãªéÊÓËÃѺ¡ÒÃźÇÔ¹â´ÇìÊèǹà¡Ô¹ +ã¹àÇÅÒ·ÕèáÊ´§¼ÅÅѾ¸ì¢Í§¤ÓÊÑ觺ҧ¤ÓÊÑè§ ËÃ×Í Help ÍÍ¡àÊÕ¡è͹ - C-x 1 ,T7Sc0Ki1`0;g190GT19b40Gl1`04U1BG(B + C-x 1 ·ÓãËéà»ç¹ÇÔ¹â´Çìà´ÕÂÇ - ,T$S0JQh1'(B C-x 1 ,Tc0*i1JSK0CQ1:E:0GT19b40Gl10MWh19(B ,Ta0Ei1G"BRB0GT19b40Gl107Uh10AU1`$M0Cl1`+M0Cl1M0BYh1(B ,Tc0Ki1`05g1A(M`0;g19(B -0,TGT19b40Gl1`04U1BG(B + ¤ÓÊÑè§ C-x 1 ãªéÊÓËÃѺźÇÔ¹â´ÇìÍ×è¹ áÅéÇ¢ÂÒÂÇÔ¹â´Çì·ÕèÁÕà¤ÍÃìà«ÍÃìÍÂÙè ãËéàµçÁ¨Íà»ç¹ +ÇÔ¹â´Çìà´ÕÂÇ - >> ,Tc0Ki1`0EWh1M9`$M0Cl1`+M0Cl1AR07Uh1:CC07Q1409Ui1(B ,Ta0Ei1G!4(B C-u 0 C-l + >> ãËéàÅ×è͹à¤ÍÃìà«ÍÃìÁÒ·ÕèºÃ÷Ѵ¹Õé áÅéÇ¡´ C-u 0 C-l - >> ,TEM'!4(B C-h k C-f 0,T4Y1(B ,Ta0Ei1G0JQ1'`!504Y10Gh1R0GT19b40Gl109Ui1`;0EUh1B9d;M0Bh1R'dC(B ,T`0AWh1M0AU10GT19b40Gl1cK0Ah10+Vh1'(B - ,TM08T1:RB0GT108U1c0*i1$S0JQh1'(B C-f ,T;CR!/0"Vi19(B + >> Åͧ¡´ C-h k C-f ´Ù áÅéÇÊѧࡵ´ÙÇèÒÇÔ¹â´Çì¹Õéà»ÅÕè¹ä»ÍÂèÒ§äà àÁ×èÍÁÕÇÔ¹â´ÇìãËÁè«Öè§ + ͸ԺÒÂÇÔ¸Õãªé¤ÓÊÑè§ C-f »ÃÒ¡¯¢Öé¹ - >> ,TEM'!4(B C-x 1 ,T`0>Wh1ME:0GT19b40Gl107Uh1b<0Eh10"Vi19ARcK0Ah1(B ,TMM!(B + >> Åͧ¡´ C-x 1 à¾×èÍźÇÔ¹â´Çì·Õèâ¼Åè¢Öé¹ÁÒãËÁè ÍÍ¡ -,T!RCa7C!(B (insert) ,TaEP(B ,T!RCE:(B (delete) +¡ÒÃá·Ã¡ (insert) áÅÐ ¡ÒÃź (delete) =================================== - ,T:9(B Emacs ,T`CR(PJRARC60>T1A0>l105Q1G0MQ1!IC`0"i1Rd;d04i1`EB(B ,T`0AWh1M05i1M'!RC0>T1A0>l10"i1M$GRA(B Emacs ,T(P(B -0,T6W1M0Gh1R05Q1GK09Q1'0JW1M07Uh1AM'`0Kg19d04i107X1!05Q1G(B (,T`0*h19(B 'A' '7' '*' ',T!(B' ,TaEP0MWh19(B ,Tf(B) ,T`0;g190"i1M$GRA07Uh105i1M'!RC(P(B -,Ta7C!(B (insert) ,T`0"i1Rd;5C'(B ,Tf(B ,T`0AWh1M(P(::CC07Q14(B ,Tc0Ki1!4(B ,T`0>Wh1M`05T1A0MQ1!IC0"Vi19:CC07Q14cK0Ah1(B -(linefeed character) ,Ta7C!`0"i1Rd;(B + º¹ Emacs àÃÒ¨ÐÊÒÁÒö¾ÔÁ¾ìµÑÇÍÑ¡ÉÃà¢éÒä»ä´éàÅ àÁ×è͵éͧ¡ÒþÔÁ¾ì¢éͤÇÒÁ Emacs ¨Ð +¶×ÍÇèÒµÑÇ˹ѧÊ×Í·ÕèÁͧàËç¹ä´é·Ø¡µÑÇ (àªè¹ 'A' '7' '*' '¡' áÅÐÍ×è¹ æ) à»ç¹¢éͤÇÒÁ·Õèµéͧ¡ÒèР+á·Ã¡ (insert) à¢éÒ仵ç æ àÁ×èͨШººÃ÷Ѵ ãËé¡´ à¾×èÍàµÔÁÍÑ¡ÉâÖ鹺Ã÷ѴãËÁè +(linefeed character) á·Ã¡à¢éÒä» - ,Tc0Ki1!4(B ,T`0AWh1M05i1M'!RC(PE:05Q1G0MQ1!IC07Uh1`0>Th1'0>T1A0>l1`0"i1Rd;(B ,TKARB06V1'0;Xh1A`0"U1B9(B -,T:90 -,Tc0*i1JSK0CQ1:E:05Q1G0MQ1!IC07Uh1M0BYh10!h1M9K09i1R5SaK09h1'`$M0Cl1`+M0Cl10;Q1(0(X10:Q19(B + ãËé¡´ àÁ×è͵éͧ¡ÒèÐźµÑÇÍÑ¡É÷Õèà¾Ô觾ÔÁ¾ìà¢éÒä» ËÁÒ¶֧»ØèÁà¢Õ¹ +º¹¼ÔÇ˹éÒäÇéÇèÒ "Delete" ËÃ×ͺҧ·ÕÍÒ¨¨Ðà¢Õ¹äÇé "Rubout" ¡çä´é â´Â·ÑèÇä» +ãªéÊÓËÃѺźµÑÇÍÑ¡É÷ÕèÍÂÙè¡è͹˹éÒµÓá˹è§à¤ÍÃìà«ÍÃì»Ñ¨¨ØºÑ¹ - >> ,TEM'0>T1A0>l105Q1G0MQ1!IC`0"i1Rd;KERB(B ,Tf(B 0,T5Q1G(B ,Ta0Ei1Gc0*i1(B ,TE:05Q1G0MQ1!IC`K0Eh1R09Qi1907Ti1'(B + >> Åͧ¾ÔÁ¾ìµÑÇÍÑ¡ÉÃà¢éÒä»ËÅÒÂ æ µÑÇ áÅéÇãªé źµÑÇÍÑ¡ÉÃàËÅèÒ¹Ñé¹·Ôé§ - >> ,TEM'0>T1A0>l10"i1M$GRAE'd;c0Ki1`0!T19"M:"GR(B (right margin) ,T`GER07Uh10>T1A0>l10"i1M$GRA`0"i1Rd;(B - ,TBRG`0!T19$GRA!0Gi1R'"M'K09Vh1':CC07Q14(B ,T:CC07Q1409Qi190!g1(P(B "0,T6Y1!05h1M(B" ,Tc0Ki1BRG`0!T19K09Vh1'K09i1R(M(B - ,Tb4Bc0Jh1`$0CWh1M'KARB(B '\' ,Td0Gi107Uh1"M:"GR0JX14(B ,T`0>Wh1M:M!c0Ki10CYi10Gh1R:CC07Q1409Ui10BQ1'0AU105h1M(B Emacs ,T(P(B - ,T`0EWh1M9(B (scroll) ,TK09i1R(M`0>Wh1Mc0Ki1`0Kg195SaK09h1'07Uh1!S0EQ1'a0!i1d"M0BYh1d04i1M0Bh1R'0*Q14`(9(B 0,T6i1RKR!(B - ,T"M:"GRK0CW1M"M:0+i1RB"M'0AU1`$0CWh1M'KARB(B '\' ,TM0BYh1(B 0,T!g1`0;g19!RC:M!c0Ki10CYi10Gh1R(B ,T:CC07Q1409Qi190BQ1'0AU105h1M(B - ,Td;c907T1H7R'09Qi19(B ,Tf(B + >> Åͧ¾ÔÁ¾ì¢éͤÇÒÁŧä»ãËéà¡Ô¹¢Íº¢ÇÒ (right margin) àÇÅÒ·Õè¾ÔÁ¾ì¢éͤÇÒÁà¢éÒä» + ÂÒÇà¡Ô¹¤ÇÒÁ¡ÇéÒ§¢Í§Ë¹Ö觺Ã÷Ѵ ºÃ÷Ѵ¹Ñ鹡ç¨Ð "¶Ù¡µèÍ" ãËéÂÒÇà¡Ô¹Ë¹Öè§Ë¹éÒ¨Í + â´ÂãÊèà¤Ã×èͧËÁÒ '\' äÇé·Õè¢Íº¢ÇÒÊØ´ à¾×èͺ͡ãËéÃÙéÇèÒºÃ÷Ѵ¹ÕéÂѧÁÕµèÍ Emacs ¨Ð + àÅ×è͹ (scroll) ˹éÒ¨Íà¾×èÍãËéàËç¹µÓá˹觷Õè¡ÓÅѧá¡éä¢ÍÂÙèä´éÍÂèÒ§ªÑ´à¨¹ ¶éÒËÒ¡ + ¢Íº¢ÇÒËÃ×͢ͺ«éÒ¢ͧÁÕà¤Ã×èͧËÁÒ '\' ÍÂÙè ¡çà»ç¹¡Òú͡ãËéÃÙéÇèÒ ºÃ÷Ѵ¹Ñé¹ÂѧÁÕµèÍ + ä»ã¹·ÔÈ·Ò§¹Ñé¹ æ - ,TEM';0/T10:Q105T104Y1`EB(B ,T$'(P0*h1GBc0Ki1`0"i1Rc(0'h1RB!0Gh1R!RCM08T1:RB04i1GB05Q1GK09Q1'0JW1M(B + Åͧ»¯ÔºÑµÔ´ÙàÅ ¤§¨ÐªèÇÂãËéà¢éÒ㨧èÒ¡ÇèÒ¡ÒÃ͸ԺÒ´éǵÑÇ˹ѧÊ×Í - >> ,Tc0Ki1"0BQ1:`$M0Cl1`+M0Cl1d;d0Gi1:9:CC07Q140+Vh1'06Y1!05h1Mc0Ki1BRG`0!T19K09Vh1'K09i1R(M(B 0,T7Uh1`0>Th1'0;i1M9`0"i1Rd;`0AWh1M(B - 0,TJQ1!$0CYh109Ui1(B ,Ta0Ei1Gc0*i1(B C-d ,TE:0"i1M$GRAMM!:R'0Jh1G9(B ,T(9$GRABRG"M'0"i1M$GRAM0BYh1@RBc9K09Vh1'(B - ,T:CC07Q14(B 0,TJQ1'`!504Y10Gh1R`$0CWh1M'KARB(B '\' ,T(PKRBd;(B + >> ãËé¢ÂѺà¤ÍÃìà«ÍÃìä»äÇ麹ºÃ÷Ѵ«Ö觶١µèÍãËéÂÒÇà¡Ô¹Ë¹Öè§Ë¹éÒ¨Í ·Õèà¾Ô觻é͹à¢éÒä»àÁ×èÍ + ÊÑ¡¤ÃÙè¹Õé áÅéÇãªé C-d ź¢éͤÇÒÁÍÍ¡ºÒ§Êèǹ ¨¹¤ÇÒÁÂÒǢͧ¢éͤÇÒÁÍÂÙèÀÒÂã¹Ë¹Öè§ + ºÃ÷Ѵ Êѧࡵ´ÙÇèÒà¤Ã×èͧËÁÒ '\' ¨ÐËÒÂä» - >> ,Tc0Ki1`0EWh1M9`$M0Cl1`+M0Cl1d;d0Gi107Uh15SaK09h1'aC!0JX14"M':CC07Q14(B ,Ta0Ei1G!4(B 0,T4Y1(B ,T!RC7S(B - ,Ta::09Ui1(B ,T(P7Sc0Ki10JQ1-0EQ1!I03l10$Qh19CPK0Gh1R':CC07Q1406Y1!E:MM!d;(B ,T:CC07Q1409Qi190!g1(P06Y1!`MRd;05h1M0!Q1:(B - ,T:CC07Q140!h1M9K09i1R09Qi19(B ,TCGA0!Q19`0;g19:CC07Q14BRG:CC07Q14`04U1BG(B ,TaEPMR((P0AU10JQ1-0EQ1!I03l105h1M:CC07Q14(B - ,T;CR!/0"Vi19(B + >> ãËéàÅ×è͹à¤ÍÃìà«ÍÃìä»äÇé·ÕèµÓá˹è§ááÊØ´¢Í§ºÃ÷Ѵ áÅéÇ¡´ ´Ù ¡ÒÃ·Ó + Ẻ¹Õé ¨Ð·ÓãËéÊÑ­Åѡɳì¤Ñè¹ÃÐËÇèÒ§ºÃ÷Ѵ¶Ù¡ÅºÍÍ¡ä» ºÃ÷Ѵ¹Ñ鹡ç¨Ð¶Ù¡àÍÒ仵è͡Ѻ + ºÃ÷Ѵ¡è͹˹éÒ¹Ñé¹ ÃÇÁ¡Ñ¹à»ç¹ºÃ÷ѴÂÒǺÃ÷Ѵà´ÕÂÇ áÅÐÍÒ¨¨ÐÁÕÊÑ­ÅѡɳìµèͺÃ÷Ѵ + »ÃÒ¡¯¢Öé¹ - >> ,Tc0Ki1!4(B ,T`0>Wh1M`0>Th1A(B 0,T5Q1G0MQ1!IC0"Vi19:CC07Q14cK0Ah1(B ,T!0EQ1:d;M0Bh1R'`04T1A(B + >> ãËé¡´ à¾×èÍà¾ÔèÁ µÑÇÍÑ¡ÉâÖ鹺Ã÷ѴãËÁè ¡ÅѺä»ÍÂèÒ§à´ÔÁ - ,T$S0JQh1'0Jh1G9cK0-h1"M'(B Emacs ,T(PJRARC6!SK94(S9G9$0CQi1'07Uh105i1M'!RCc0Ki1;0/T10:Q105T1d04i1(B ,TCGA07Qi1'!RC(B -,Ta7C!(B (insert) 0,T5Q1G0MQ1!IC04i1GB(B + ¤ÓÊÑè§ÊèǹãË­è¢Í§ Emacs ¨ÐÊÒÁÒö¡Ó˹´¨Ó¹Ç¹¤ÃÑ駷Õèµéͧ¡ÒÃãË黯ԺѵÔä´é ÃÇÁ·Ñ駡Òà +á·Ã¡ (insert) µÑÇÍÑ¡ÉôéÇ - >> ,TEM'0;i1M9$S0JQh1'(B C-u 8 * 0,T4Y1(B 0,TJQ1'`!504Y10Gh1R`0!T14MPdC0"Vi19(B + >> Åͧ»é͹¤ÓÊÑè§ C-u 8 * ´Ù Êѧࡵ´ÙÇèÒà¡Ô´ÍÐäâÖé¹ - 0,T6i1R05i1M'!RC(P`0>Th1A:CC07Q140Gh1R'(B ,Tf(B (blank line) ,TCPK0Gh1R'JM':CC07Q14(B ,Tc0Ki1`0EWh1M9d;07Uh15SaK09h1'(B -,TaC!0JX14"M':CC07Q1407Uh1JM'(B ,Ta0Ei1G!4(B C-o + ¶éÒµéͧ¡ÒèÐà¾ÔèÁºÃ÷ѴÇèÒ§ æ (blank line) ÃÐËÇèÒ§ÊͧºÃ÷Ѵ ãËéàÅ×è͹价ÕèµÓáË¹è§ +ááÊØ´¢Í§ºÃ÷Ѵ·ÕèÊͧ áÅéÇ¡´ C-o - >> ,Tc0Ki1`0EWh1M9d;07Uh15SaK09h1'aC!0JX14"M':CC07Q14c40!g1d04i1(B ,Ta0Ei1GEM'!4(B C-o 0,T4Y1(B + >> ãËéàÅ×è͹价ÕèµÓá˹è§ááÊØ´¢Í§ºÃ÷Ѵ㴡çä´é áÅéÇÅͧ¡´ C-o ´Ù - 0,T6V1'5C'09Ui1(B ,T`CR0!g1d04i1`0CU1B90GT108U10>Wi190R9JSK0CQ1:!RC0;i1M90"i1M$GRA(B ,TaEP!RCa0!i107Uh10 ,TE:05Q1G0MQ1!IC07Uh1M0BYh1K09i1R`$M0Cl1`+M0Cl1(B - C-d ,TE:05Q1G0MQ1!IC07Uh1M0BYh107Uh1`$M0Cl1`+M0Cl1(B + źµÑÇÍÑ¡É÷ÕèÍÂÙè˹éÒà¤ÍÃìà«ÍÃì + C-d źµÑÇÍÑ¡É÷ÕèÍÂÙè·Õèà¤ÍÃìà«ÍÃì - ESC ,TE:$S07Uh1M0BYh1K09i1R`$M0Cl1`+M0Cl1(B - ESC d ,TE:$S05Qi1'a05h15SaK09h1'07Uh1`$M0Cl1`+M0Cl1M0BYh1(B + ESC ź¤Ó·ÕèÍÂÙè˹éÒà¤ÍÃìà«ÍÃì + ESC d ź¤ÓµÑé§áµèµÓá˹觷Õèà¤ÍÃìà«ÍÃìÍÂÙè - C-k ,TE::CC07Q1405Qi1'a05h15SaK09h1'07Uh1`$M0Cl1`+M0Cl1M0BYh1(B + C-k źºÃ÷ѴµÑé§áµèµÓá˹觷Õèà¤ÍÃìà«ÍÃìÍÂÙè - ,Tc9:R'$0CQi1'(B ,T`CRMR(05i1M'!RC(P`MR0Jh1G907Uh1E:d;!0EQ1:0$W19AR(B ,Tb;Ca!CA(B Emacs ,T(P(S0Jh1G907Uh1E:(B -,TMM!d0Gi1(B ,T`GER07Uh1E:0"i1M$GRAc9K09h1GB07Uh1AR!!0Gh1RK09Vh1'05Q1G0MQ1!IC(B ,Tc0Ki1c0*i1$S0JQh1'(B C-y ,T`GER07Uh105i1M'!RC(P`MR(B -0,T"i1M$GRA!0EQ1:0$W19(B 0,TJTh1'07Uh1$GCCP0GQ1'0!g10$W1M(B C-y ,Td0Ah1c0*h1c0*i1d04i1`0>U1B'a0$h15SaK09h1'07Uh1E:0"i1M$GRAMM!`07h1R09Qi19(B ,Ta05h1(P(B -,Tc0*i10!Q1:5SaK09h1'c40!g1d04i1(B C-y ,T`0;g19$S0JQh1'JSK0CQ1:a7C!0"i1M$GRA07Uh1`0!g1:d0Gi1(B ,TE'c95SaK09h1'07Uh10AU1`$M0Cl1`+M0Cl1M0BYh1(B -,T`CRJRARC6c0*i1$GRAJRARC609Ui1c9!RC`$0EWh1M90Bi1RB0"i1M$GRAd04i1(B + 㹺ҧ¤ÃÑé§ àÃÒÍÒ¨µéͧ¡ÒèÐàÍÒÊèǹ·Õèź仡ÅѺ¤×¹ÁÒ â»Ãá¡ÃÁ Emacs ¨Ð¨ÓÊèǹ·Õèź +ÍÍ¡äÇé àÇÅÒ·Õèź¢éͤÇÒÁã¹Ë¹èÇ·ÕèÁÒ¡¡ÇèÒ˹Ö觵ÑÇÍÑ¡Éà ãËéãªé¤ÓÊÑè§ C-y àÇÅÒ·Õèµéͧ¡ÒèÐàÍÒ +¢éͤÇÒÁ¡ÅѺ¤×¹ ÊÔ觷Õè¤ÇÃÃÐÇѧ¡ç¤×Í C-y äÁèãªèãªéä´éà¾Õ§á¤èµÓá˹觷Õèź¢éͤÇÒÁÍÍ¡à·èÒ¹Ñé¹ áµè¨Ð +ãªé¡ÑºµÓá˹è§ã´¡çä´é C-y à»ç¹¤ÓÊÑè§ÊÓËÃѺá·Ã¡¢éͤÇÒÁ·Õèà¡çºäÇé ŧ㹵Óá˹觷ÕèÁÕà¤ÍÃìà«ÍÃìÍÂÙè +àÃÒÊÒÁÒöãªé¤ÇÒÁÊÒÁÒö¹Õé㹡ÒÃà¤Å×è͹ÂéÒ¢éͤÇÒÁä´é - ,T$S0JQh1'JSK0CQ1:!RCE:0AU1M0BYh1JM'a::0$W1M(B ,T$S0JQh1'(B "Delete" 0,T!Q1:(B ,T$S0JQh1'(B "Kill" ,T$S0JQh1'(B "Kill" -,T(P`0!g1:0Jh1G9E:MM!d0Gi1(B ,Ta05h1$S0JQh1'(B "Delete" ,T(Pd0Ah1`0!g1:(B ,Ta05h106i1RKR!c0*i1$S0JQh1'09Ui1KERB(B ,Tf(B ,T$0CQi1'(B 0,T!g1(P`0!g1:(B -0,TJh1G907Uh1E:MM!d0Gi1c0Ki1(B + ¤ÓÊÑè§ÊÓËÃѺ¡ÒÃźÁÕÍÂÙèÊͧẺ¤×Í ¤ÓÊÑè§ "Delete" ¡Ñº ¤ÓÊÑè§ "Kill" ¤ÓÊÑè§ "Kill" +¨Ðà¡çºÊèǹźÍÍ¡äÇé áµè¤ÓÊÑè§ "Delete" ¨ÐäÁèà¡çº áµè¶éÒËÒ¡ãªé¤ÓÊÑ觹ÕéËÅÒÂ æ ¤ÃÑé§ ¡ç¨Ðà¡çº +Êèǹ·ÕèźÍÍ¡äÇéãËé - >> ,Tc0Ki1!4(B C-n 0,TJQ1!JM'JRA$0CQi1'(B ,T`0>Wh1M`0EWh1M9d;0BQ1'07Uh107Uh1`KARPJA:9K09i1R(M(B ,Ta0Ei1GEM'!4(B C-k ,T`0>Wh1M(B - ,TE::CC07Q1409Qi19MM!04Y1(B + >> ãËé¡´ C-n ÊÑ¡ÊͧÊÒÁ¤ÃÑé§ à¾×èÍàÅ×è͹ä»Âѧ·Õè·ÕèàËÁÒÐÊÁº¹Ë¹éÒ¨Í áÅéÇÅͧ¡´ C-k à¾×èÍ + źºÃ÷Ѵ¹Ñé¹ÍÍ¡´Ù - ,T`0AWh1M!4(B C-k ,T$0CQi1'aC!(B 0,T"i1M$GRAc9:CC07Q1409Qi19(P06Y1!E:MM!(B ,TaEP`0AWh1M!40MU1!(B C-k 0,TMU1!$0CQi1'(B ,T:CC07Q14(B -0,T9Qi19`M'07Qi1':CC07Q140!g1(P06Y1!E:MM!d;04i1GB(B ,Ta05h106i1R!SK94(S9G9$0CQi1'c0Ki10!Q1:$S0JQh1'(B C-k 0,T!g1(PKARB06V1'(B ,Tc0Ki1E:(B -,T:CC07Q14MM!(B (0,T7Qi1'`09Wi1MKRaEP05Q1G:CC07Q14(B) ,T`0;g19(S9G9:CC07Q14(B ,T`07h1R0!Q1:(S9G9$0CQi1'07Uh1!SK94(B + àÁ×èÍ¡´ C-k ¤ÃÑé§áá ¢éͤÇÒÁ㹺Ã÷Ѵ¹Ñ鹨ж١źÍÍ¡ áÅÐàÁ×èÍ¡´ÍÕ¡ C-k ÍÕ¡¤ÃÑé§ ºÃ÷Ѵ +¹Ñé¹àͧ·Ñ駺Ã÷Ѵ¡ç¨Ð¶Ù¡ÅºÍÍ¡ä»´éÇ áµè¶éÒ¡Ó˹´¨Ó¹Ç¹¤ÃÑé§ãËé¡Ñº¤ÓÊÑè§ C-k ¡ç¨ÐËÁÒ¶֧ ãËéź +ºÃ÷ѴÍÍ¡ (·Ñé§à¹×éÍËÒáÅеÑǺÃ÷Ѵ) à»ç¹¨Ó¹Ç¹ºÃ÷Ѵ à·èҡѺ¨Ó¹Ç¹¤ÃÑ駷Õè¡Ó˹´ - ,T:CC07Q1407Uh1`0>Th1'E:MM!d;(B ,T(P06Y1!`0!g1:d0Gi1(B ,TaEPJRARC69S!0EQ1:0$W19ARd04i1(B ,Tb4Bc0*i1$S0JQh1'(B C-y + ºÃ÷Ѵ·Õèà¾Ôè§ÅºÍÍ¡ä» ¨Ð¶Ù¡à¡çºäÇé áÅÐÊÒÁÒö¹Ó¡ÅѺ¤×¹ÁÒä´é â´Âãªé¤ÓÊÑè§ C-y - >> ,TEM'!4(B C-y 0,T4Y1(B + >> Åͧ¡´ C-y ´Ù - 0,T"i1M$GRA07Uh106Y1!E:MM!(B ,Tb4B!RC!4(B C-k ,TKERB(B ,Tf(B ,T$0CQi1'(B ,T(P06Y1!`0!g1:CG:CGAd0Gi1(B ,TaEPJRARC69S(B -,T!0EQ1:AR07Qi1'KA4d04i1c9$0CQi1'`04U1BG(B ,Tb4B!RC!4(B C-y + ¢éͤÇÒÁ·Õè¶Ù¡ÅºÍÍ¡ â´Â¡Òá´ C-k ËÅÒÂ æ ¤ÃÑé§ ¨Ð¶Ù¡à¡çºÃǺÃÇÁäÇé áÅÐÊÒÁÒö¹Ó +¡ÅѺÁÒ·Ñé§ËÁ´ä´é㹤ÃÑé§à´ÕÂÇ â´Â¡Òá´ C-y - >> ,TEM'!4(B C-k 0,T4Y1KERB(B ,Tf(B ,T$0CQi1'(B + >> Åͧ¡´ C-k ´ÙËÅÒÂ æ ¤ÃÑé§ - >> ,T$S0JQh1'JSK0CQ1:`0CU1B!0"i1M$GRA!0EQ1:AR(B 0,T$W1M(B C-y 0,T!h1M90MWh19c0Ki1`0EWh1M9`$M0Cl1`+M0Cl1E'd;0"i1R'0Eh1R'(B - 0,TJQ1!JM'JRA:CC07Q14(B ,Ta0Ei1GEM'!4(B C-y 0,T4Y1(B 0,T!g1(PJRARC60$Q14EM!(B (copy) 0,T"i1M$GRAd04i1(B + >> ¤ÓÊÑè§ÊÓËÃѺàÃÕ¡¢éͤÇÒÁ¡ÅѺÁÒ ¤×Í C-y ¡è͹Í×è¹ãËéàÅ×è͹à¤ÍÃìà«ÍÃìŧ仢éÒ§ÅèÒ§ + ÊÑ¡ÊͧÊÒÁºÃ÷Ѵ áÅéÇÅͧ¡´ C-y ´Ù ¡ç¨ÐÊÒÁÒö¤Ñ´ÅÍ¡ (copy) ¢éͤÇÒÁä´é - 0,T6i1R5M909Ui1`0!g1:0"i1M$GRAMPdC:R'M0Bh1R'd0Gi1(B ,Ta0Ei1GE:0"i1M$GRA0MWh19`0>Th1A`0"i1Rd;0MU1!(B ,T(P`0!T14MPdC0"Vi19(B -,T08l10$W1M(B C-y ,T(P`0CU1B!0$W19d04i1a0$h1`0>U1B'0"i1M$GRA07Uh1E:MM!$0CQi1'0Eh1R0JX14`07h1R09Qi19(B + ¶éҵ͹¹Õéà¡çº¢éͤÇÒÁÍÐäúҧÍÂèÒ§äÇé áÅéÇź¢éͤÇÒÁÍ×è¹à¾ÔèÁà¢éÒä»ÍÕ¡ ¨Ðà¡Ô´ÍÐäâÖé¹ +¼ÅÅѾ¸ì¤×Í C-y ¨ÐàÃÕ¡¤×¹ä´éá¤èà¾Õ§¢éͤÇÒÁ·ÕèźÍÍ¡¤ÃÑé§ÅèÒÊØ´à·èÒ¹Ñé¹ - >> ,TEM'E::CC07Q1404Y1K09Vh1':CC07Q14(B ,Ta0Ei1G`0EWh1M9`$M0Cl1`+M0Cl1d;07Uh10MWh19(B ,Ta0Ei1GE::CC07Q14MM!04Y10MU1!K09Vh1'(B - ,T:CC07Q14(B ,TEM'!4(B C-y 0,T4Y1(B ,Ta0Ei1G0JQ1'`!504Y10Gh1R(Pd04i1a0$h1`0>U1B':CC07Q1407Uh1JM'0$W19`07h1R09Qi19(B + >> ÅͧźºÃ÷Ѵ´Ù˹Ö觺Ã÷Ѵ áÅéÇàÅ×è͹à¤ÍÃìà«ÍÃìä»·ÕèÍ×è¹ áÅéÇźºÃ÷ѴÍÍ¡´ÙÍա˹Öè§ + ºÃ÷Ѵ Åͧ¡´ C-y ´Ù áÅéÇÊѧࡵ´ÙÇèÒ¨Ðä´éá¤èà¾Õ§ºÃ÷Ѵ·ÕèÊͧ¤×¹à·èÒ¹Ñé¹ -,T!RC0MQ1904Y1(B (UNDO) +¡ÒÃÍѹ´Ù (UNDO) ============= - ,T`GER07Uh1a0!i1d"0"i1M$GRA:R'M0Bh1R'(B ,Ta0Ei1G05i1M'!RC(P`;0EUh1B9!0EQ1:c0Ki1`0;g19M0Bh1R'`04T1A(B 0,T!g1JRARC67Sd04i107X1!(B -,T`0AWh1M04i1GB$S0JQh1'(B C-x u ,Tb4B;!05T1(B ,T(Pc0*i1JSK0CQ1:B!`0ET1!$S0JQh1'(B 0,T7Uh10;i1M9`0"i1Rd;b4Bd0Ah105Qi1'c((B ,TJRARC6c0*i1(B -,T$S0JQh1'09Ui10!Uh1$0CQi1'0!g1d04i15RA05i1M'!RC(B + àÇÅÒ·Õèá¡é䢢éͤÇÒÁºÒ§ÍÂèÒ§ áÅéǵéͧ¡ÒèÐà»ÅÕ蹡ÅѺãËéà»ç¹ÍÂèÒ§à´ÔÁ ¡çÊÒÁÒö·Óä´é·Ø¡ +àÁ×èÍ´éǤÓÊÑè§ C-x u â´Â»¡µÔ ¨ÐãªéÊÓËÃѺ¡àÅÔ¡¤ÓÊÑè§ ·Õè»é͹à¢éÒä»â´ÂäÁèµÑé§ã¨ ÊÒÁÒöãªé +¤ÓÊÑ觹Õé¡Õè¤ÃÑ駡çä´éµÒÁµéͧ¡Òà - >> ,TEM'E::CC07Q1409Ui1MM!04Y1(B 0,T4i1GB$S0JQh1'(B C-k ,Ta0Ei1G`0CU1B!!0EQ1:0$W19AR04i1GB(B C-x u + >> ÅͧźºÃ÷Ѵ¹ÕéÍÍ¡´Ù ´éǤÓÊÑè§ C-k áÅéÇàÃÕ¡¡ÅѺ¤×¹ÁÒ´éÇ C-x u - ,T$S0JQh1'(B C-_ 0,T!g1`0;g19$S0JQh1'0MQ1904Y10MU1!0MQ19K09Vh1'(B ,T$GRAJRARC6`K0AW1M90!Q1:$S0JQh1'(B C-x u + ¤ÓÊÑè§ C-_ ¡çà»ç¹¤ÓÊÑè§Íѹ´ÙÍÕ¡Íѹ˹Öè§ ¤ÇÒÁÊÒÁÒöàËÁ×͹¡Ñº¤ÓÊÑè§ C-x u - ,TJRARC6!SK94(S9G9$0CQi1'c0Ki1$S0JQh1'(B C-_ ,TaEP(B C-x u ,Td04i1(B + ÊÒÁÒö¡Ó˹´¨Ó¹Ç¹¤ÃÑé§ãËé¤ÓÊÑè§ C-_ áÅÐ C-x u ä´é -,Ta0?i1A0"i1M0AY1E(B (File) +á¿éÁ¢éÍÁÙÅ (File) ============== - ,T`CR(S`0;g1905i1M'`0!g1:0CQ1!IR(B (save) 0,T"i1M$GRA07Uh1a0!i1d"d0Gi1c9a0?i1A0"i1M0AY1E(B 0,T6i1R05i1M'!RC(Pc0Ki10JTh1'07Uh1(B -,Ta0!i1d"`;0EUh1B9d;M0Bh1R'6RGC(B ,Td0Ah1`0*h1909Qi19(B 0,TJTh1'07Uh1a0!i1d"d;0!g1(PKRBd;(B 0,T7Q1907U107Uh1`0ET1!!RCc0*i1(B Emacs + àÃÒ¨Óà»ç¹µéͧà¡çºÃÑ¡ÉÒ (save) ¢éͤÇÒÁ·Õèá¡éä¢äÇéã¹á¿éÁ¢éÍÁÙÅ ¶éÒµéͧ¡ÒèÐãËéÊÔ觷Õè +á¡éä¢à»ÅÕè¹ä»ÍÂèÒ§¶ÒÇà äÁèàªè¹¹Ñé¹ ÊÔ觷Õèá¡éä¢ä»¡ç¨ÐËÒÂä» ·Ñ¹·Õ·ÕèàÅÔ¡¡ÒÃãªé Emacs - ,Ta0?i1A0"i1M0AY1E07Uh1AM'`0Kg19M0BYh1(B 0,T$W1M0JTh1'07Uh10:Q1907V1!0JTh1'07Uh1!S0EQ1'a0!i1d"M0BYh1(B ,TK0CW1M0>Y140'h1RB(B ,Tf(B 0,T!g10$W1Ma0?i1A0"i1M0AY1E07Uh1AM'`0Kg19(B -,TM0BYh10$W1M05Q1Ga0?i1A0"i1M0AY1E07Uh1!S0EQ1'a0!i1d"M0BYh1(B + á¿éÁ¢éÍÁÙÅ·ÕèÁͧàËç¹ÍÂÙè ¤×ÍÊÔ觷ÕèºÑ¹·Ö¡ÊÔ觷Õè¡ÓÅѧá¡éä¢ÍÂÙè ËÃ×;ٴ§èÒÂ æ ¡ç¤×Íá¿éÁ¢éÍÁÙÅ·ÕèÁͧàËç¹ +ÍÂÙè¤×͵ÑÇá¿éÁ¢éÍÁÙÅ·Õè¡ÓÅѧá¡éä¢ÍÂÙè - ,Ta05h1(9!0Gh1Ra0?i1A0"i1M0AY1E(P06Y1!`0!g1:0CQ1!IR(B (save) ,TE'd;(B ,Ta0?i1A0"i1M0AY1E07Uh106Y1!a0!i1d"M0BYh1(B ,T(Pd0Ah106Y1!`0"U1B907Q1:(B -,TE'd;M0Bh1R'`04g14"R4(B 0,TMQ1909Ui1`0>Wh1M`0;g19!RC0;i1M'0!Q19!RC`0"U1B907Q1:a0?i1A0"i1M0AY1E07Uh1a0!i1d"d;a::$0CVh1'(B ,Tf(B ,T!ER'(B ,Tf(B -,Tb4Bd0Ah1d04i105Qi1'c((B + áµè¨¹¡ÇèÒá¿éÁ¢éÍÁÙŨж١à¡çºÃÑ¡ÉÒ (save) Å§ä» á¿éÁ¢éÍÁÙÅ·Õè¶Ù¡á¡éä¢ÍÂÙè ¨ÐäÁè¶Ù¡à¢Õ¹·Ñº +ŧä»ÍÂèÒ§à´ç´¢Ò´ Íѹ¹Õéà¾×èÍà»ç¹¡Òûéͧ¡Ñ¹¡ÒÃà¢Õ¹·Ñºá¿éÁ¢éÍÁÙÅ·Õèá¡éä¢ä»áºº¤ÃÖè§ æ ¡ÅÒ§ æ +â´ÂäÁèä´éµÑé§ã¨ - ,T9M!(R!09Ui1(B ,T`0>Wh1M`0;g19!RC0;i1M'0!Q19!RC`0!g1:0CQ1!IR(B (save) 0,TJTh1'07Uh1a0!i1d"0Th1A`05T1A`0!Uh1BG0!Q1::CC07Q14bKA4(B (mode line) ,Tc95M9K0EQ1'(B +ËÁÒÂà˵Ø: ¨ÐÁÕ¤Ó͸ԺÒÂà¾ÔèÁàµÔÁà¡ÕèÂǡѺºÃ÷ѴâËÁ´ (mode line) 㹵͹ËÅѧ - ,T$S0JQh1'c0Ki1KRa0?i1A0"i1M0AY1E(B ,TaEP$S0JQh1'c0Ki1`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E(B 0,TAU10EQ1!I3Pa5!05h1R'(R!$S0JQh1'07Uh10 + áÅéÇ Emacs ¨Ð¶ÒÁª×èͧ͢á¿éÁ¢éÍÁÙÅ â´Â»ÃÒ¡¯¢Öé¹·ÕèÊèǹÅèÒ§¢Í§¨Í àÃÒàÃÕ¡Êèǹ·ÕèãËé»é͹ +ª×èÍá¿éÁ¢éÍÁÙŹÑé¹ÇèÒ ÁԹԺѿà¿ÍÃì (mini buffer) ÁԹԺѿà¿ÍÃì¨Ð¶Ù¡ãªé§Ò¹ã¹ÅѡɳйÕé ÁԹԺѿà¿ÍÃì +¨ÐËÁ´Ë¹éÒ·ÕèáÅÐËÒÂä» ËÅѧ¨Ò¡·Õè»é͹ª×èÍá¿éÁ¢éÍÁÙÅ áÅéÇ¡´»ØèÁ - >> ,TEM'!4(B C-x C-f ,Ta0Ei1G5RA04i1GB(B C-g 0,T4Y1(B ,T`0;g19!RC0JQh1'B!`0ET1!`09Wi1MKRc90AT109T10:Q1?`?M0Cl1(B ,TK0CW1M(B - ,TB!`0ET1!$S0JQh1'(B C-x C-f 0,T4Q1'09Qi19(B Emacs ,T(Pd0Ah10$i19KRa0?i1A0"i1M0AY1Ec4(B ,Tf(B + >> Åͧ¡´ C-x C-f áÅéǵÒÁ´éÇ C-g ´Ù à»ç¹¡ÒÃÊÑè§Â¡àÅÔ¡à¹×éÍËÒã¹ÁԹԺѿà¿ÍÃì ËÃ×Í + ¡àÅÔ¡¤ÓÊÑè§ C-x C-f ´Ñ§¹Ñé¹ Emacs ¨ÐäÁè¤é¹ËÒá¿éÁ¢éÍÁÙÅã´ æ - ,T$CRG09Ui1(B ,TAREM'`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E04Y1(B ,T`GER07Uh105i1M'!RC`0!g1:0CQ1!IR0JTh1'07Uh1a0!i1d"AR(906V1'5M909Ui1(B 0,T!g1c0Ki1c0*i1(B -,T$S0JQh1'04Q1'09Ui1(B + ¤ÃÒǹÕé ÁÒÅͧà¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅ´Ù àÇÅÒ·Õèµéͧ¡ÒÃà¡çºÃÑ¡ÉÒÊÔ觷Õèá¡éä¢ÁÒ¨¹¶Ö§µÍ¹¹Õé ¡çãËéãªé +¤ÓÊÑ觴ѧ¹Õé - C-x C-s ,T`0!g1:0CQ1!IR(B (save) ,Ta0?i1A0"i1M0AY1E(B + C-x C-s à¡çºÃÑ¡ÉÒ (save) á¿éÁ¢éÍÁÙÅ - ,Ta0Ei1G`09Wi1MKR07Uh1M0BYh1c9(B Emacs 0,T!g1(P06Y1!`0"U1B9E'd;07Uh1a0?i1A0"i1M0AY1E(B ,T`GER`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E(B ,Ta0?i1A0"i1M0AY1E(B -0,T5i19)0:Q1:(Pd0Ah10JY1-KRBd;(B ,Ta05h1(P06Y1!`0!g1:d0Gi1c90*Wh1McK0Ah1(B 0,T+Vh1'd04i1AR(R!0*Wh1M`0!h1R07Uh105h1M07i1RB04i1GB(B '~' + áÅéÇà¹×éÍËÒ·ÕèÍÂÙèã¹ Emacs ¡ç¨Ð¶Ù¡à¢Õ¹ŧ价Õèá¿éÁ¢éÍÁÙÅ àÇÅÒà¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅ á¿éÁ¢éÍÁÙÅ +µé¹©ºÑº¨ÐäÁèÊÙ­ËÒÂä» áµè¨Ð¶Ù¡à¡çºäÇé㹪×èÍãËÁè «Öè§ä´éÁÒ¨Ò¡ª×èÍà¡èÒ·ÕèµèÍ·éÒ´éÇ '~' - ,TK0EQ1'(R!07Uh1`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E`J0Cg1(a0Ei1G(B Emacs 0,T!g1(PaJ4'0*Wh1Ma0?i1A0"i1M0AY1E07Uh1`0!g1:c0Ki104Y1(B + ËÅѧ¨Ò¡·Õèà¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅàÊÃç¨áÅéÇ Emacs ¡ç¨ÐáÊ´§ª×èÍá¿éÁ¢éÍÁÙÅ·Õèà¡çºãËé´Ù - >> ,TEM'!4(B C-x C-x ,T`0>Wh1M`0!g1:0CQ1!IRJS`9R"M'(B Tutorial 0,T9Ui104Y1(B 0,T!g1(P`0Kg190Gh1R(B 0,T7Uh10Jh1G90Eh1R'(B - ,T"M'(M(B 0,TAU10"i1M$GRA0Gh1R(B "Wrote ...../TUTORIAL.th" ,T;CR!/0"Vi19(B + >> Åͧ¡´ C-x C-x à¾×èÍà¡çºÃÑ¡ÉÒÊÓà¹Ò¢Í§ Tutorial ¹Õé´Ù ¡ç¨ÐàËç¹ÇèÒ ·ÕèÊèǹÅèÒ§ + ¢Í§¨Í ÁÕ¢éͤÇÒÁÇèÒ "Wrote ...../TUTORIAL.th" »ÃÒ¡¯¢Öé¹ - ,T`GER07Uh1(PJ0Ci1R'a0?i1A0"i1M0AY1EcK0Ah1(B 0,T!g1c0Ki17SCRG0!Q1:0Gh1R(P0$i19KR(B (find-file) ,Ta0?i1A0"i1M0AY1E`0!h1R0+Vh1'0AU1(B -,TM0BYh10!h1M9K09i1R09Ui1a0Ei1G(B ,Ta0Ei1G0>T1A0>l10"i1M$GRAE'd;c9a0?i1A0"i1M0AY1E07Uh1KR`(M(B + àÇÅÒ·Õè¨ÐÊÃéÒ§á¿éÁ¢éÍÁÙÅãËÁè ¡çãËé·ÓÃÒǡѺÇèҨФé¹ËÒ (find-file) á¿éÁ¢éÍÁÙÅà¡èÒ«Öè§ÁÕ +ÍÂÙè¡è͹˹éÒ¹ÕéáÅéÇ áÅéǾÔÁ¾ì¢éͤÇÒÁŧä»ã¹á¿éÁ¢éÍÁÙÅ·ÕèËÒà¨Í - ,TaEP`GER07Uh10JQh1'`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E`07h1R09Qi19(B 0,T$W1M5M907Uh1(B Emacs ,T(P`0!g1:`09Wi1MKR07Uh1a0!i1d"AR07Qi1'KA4(B ,TE'(B -,Tc9a0?i1A0"i1M0AY1E`0;g19$0CQi1'aC!(B + áÅÐàÇÅÒ·ÕèÊÑè§à¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅà·èÒ¹Ñé¹ ¤×͵͹·Õè Emacs ¨Ðà¡çºà¹×éÍËÒ·Õèá¡éä¢ÁÒ·Ñé§ËÁ´ ŧ +ã¹á¿éÁ¢éÍÁÙÅà»ç¹¤ÃÑé§áá -0,T:Q1?`?M0Cl1(B (Buffer) +ºÑ¿à¿ÍÃì (Buffer) =============== - 0,T6i1RKR!0JQh1'c0Ki1KRa0?i1A0"i1M0AY1E0MQ1907Uh1JM'(B 0,T4i1GB$S0JQh1'(B C-x C-f ,T`09Wi1MKR"M'a0?i1A0"i1M0AY1EaC!(B 0,T!g1(P0BQ1'$'(B -0,T6Y1!`0!g1:0CQ1!IRM0BYh1c9(B Emacs 0,TJTh1'07Uh1`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E07Uh10Mh1R9`0"i1RAR(B 0,T+Vh1'M0BYh1@RBc9(B Emacs ,T`0CU1B!0Gh1R(B -0,T:Q1?`?M0Cl1(B (Buffer) ,T`GER07Uh10Mh1R9a0?i1A0"i1M0AY1EcK0Ah1`0"i1RAR(B Emacs 0,T!g1(PJ0Ci1R'0:Q1?`?M0Cl1cK0Ah1(B 0,T"Vi19AR@RBc9(B + ¶éÒËÒ¡ÊÑè§ãËéËÒá¿éÁ¢éÍÁÙÅÍѹ·ÕèÊͧ ´éǤÓÊÑè§ C-x C-f à¹×éÍËҢͧá¿éÁ¢éÍÁÙÅáá ¡ç¨ÐÂѧ¤§ +¶Ù¡à¡çºÃÑ¡ÉÒÍÂÙèã¹ Emacs ÊÔ觷Õèà¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅ·ÕèÍèÒ¹à¢éÒÁÒ «Öè§ÍÂÙèÀÒÂã¹ Emacs àÃÕ¡ÇèÒ +ºÑ¿à¿ÍÃì (Buffer) àÇÅÒ·ÕèÍèÒ¹á¿éÁ¢éÍÁÙÅãËÁèà¢éÒÁÒ Emacs ¡ç¨ÐÊÃéÒ§ºÑ¿à¿ÍÃìãËÁè ¢Öé¹ÁÒÀÒÂã¹ - 0,T6i1R05i1M'!RC(P04Y1CRB!RC"M'0:Q1?`?M0Cl1(B 0,T7Uh106Y1!`0!g1:0CQ1!IRM0BYh1@RBc9(B Emacs 0,T!g1c0Ki1!4$S0JQh1'(B + ¶éÒµéͧ¡ÒèдÙÃÒ¡ÒâͧºÑ¿à¿ÍÃì ·Õè¶Ù¡à¡çºÃÑ¡ÉÒÍÂÙèÀÒÂã¹ Emacs ¡çãËé¡´¤ÓÊÑè§ C-x C-b - >> ,TEM'!4(B C-x C-b 0,T4Y1(B 0,TJQ1'`!504Y10Gh1Ra05h1EP0:Q1?`?M0Cl10AU10*Wh1M0Gh1RMPdC(B ,TaEP06Y1!05Qi1'0*Wh1Md0Gi10Gh1R(B - ,TM0Bh1R'dC(B ,Tc9(B Emacs + >> Åͧ¡´ C-x C-b ´Ù Êѧࡵ´ÙÇèÒáµèÅкѿà¿ÍÃìÁÕª×èÍÇèÒÍÐäà áÅж١µÑ駪×èÍäÇéÇèÒ + ÍÂèÒ§äà 㹠Emacs - 0,TAU1:R'0:Q1?`?M0Cl1(B 0,T7Uh1d0Ah10AU10$Yh10!Q1:a0?i1A0"i1M0AY1E(0CT1'(B ,Tf(B 0,T5Q1GM0Bh1R'`0*h19(B ,Td0Ah10AU1a0?i1A0"i1M0AY1E07Uh10AU10*Wh1M0Gh1R(B "*Buffer -List*" ,TM0BYh1(0CT1'(B ,Tf(B ,Ta05h1`0;g190:Q1?`?M0Cl107Uh1J0Ci1R'0"Vi19AR`0>Wh1MaJ4'CRB!RC0:Q1?`?M0Cl1(B ,Tb4B$S0JQh1'(B C-x C-b + ÁÕºÒ§ºÑ¿à¿ÍÃì ·ÕèäÁèÁÕ¤Ùè¡Ñºá¿éÁ¢éÍÁÙŨÃÔ§ æ µÑÇÍÂèÒ§àªè¹ äÁèÁÕá¿éÁ¢éÍÁÙÅ·ÕèÁÕª×èÍÇèÒ "*Buffer +List*" ÍÂÙè¨ÃÔ§ æ áµèà»ç¹ºÑ¿à¿ÍÃì·ÕèÊÃéÒ§¢Öé¹ÁÒà¾×èÍáÊ´§ÃÒ¡Òúѿà¿ÍÃì â´Â¤ÓÊÑè§ C-x C-b - 0,T"i1M$GRA07X1!0"i1M$GRA07Uh1;CR!/M0BYh1c90GT19b40Gl1"M'(B Emacs 0,T9Qi19(B ,T(PM0BYh1c90:Q1?`?M0Cl1c40:Q1?`?M0Cl1K09Vh1'`JAM(B + ¢éͤÇÒÁ·Ø¡¢éͤÇÒÁ·Õè»ÃÒ¡¯ÍÂÙèã¹ÇÔ¹â´Çì¢Í§ Emacs ¹Ñé¹ ¨ÐÍÂÙè㹺ѿà¿ÍÃì㴺ѿà¿ÍÃì˹Öè§àÊÁÍ - >> ,TEM'!4(B C-x 1 ,T`0>Wh1ME:CRB!RC0:Q1?`?M0Cl1MM!04Y1(B + >> Åͧ¡´ C-x 1 à¾×èÍźÃÒ¡Òúѿà¿ÍÃìÍÍ¡´Ù - ,T!RC`0CU1B!a0?i1A0"i1M0AY1E0MWh190"Vi19ARa0!i1d"(B ,T5M907Uh1!S0EQ1'a0!i1d"a0?i1A0"i1M0AY1EK09Vh1'M0BYh109Qi19(B ,T(Pd0Ah17Sc0Ki1a0?i1A0"i1M0AY1E(B -,TaC!06Y1!`0!g1:0CQ1!IR(B 0,TJTh1'07Uh1a0!i1d"d;c9a0?i1A0"i1M0AY1EaC!(P06Y1!0:Q1907V1!d0Gi1c90:Q1?`?M0Cl1"M'a0?i1A0"i1M0AY1E09Qi19(B ,T`07h1R09Qi19(B + ¡ÒÃàÃÕ¡á¿éÁ¢éÍÁÙÅÍ×è¹¢Öé¹ÁÒá¡éä¢ µÍ¹·Õè¡ÓÅѧá¡éä¢á¿éÁ¢éÍÁÙÅ˹Öè§ÍÂÙè¹Ñé¹ ¨ÐäÁè·ÓãËéá¿éÁ¢éÍÁÙÅ +áá¶Ù¡à¡çºÃÑ¡ÉÒ ÊÔ觷Õèá¡éä¢ä»ã¹á¿éÁ¢éÍÁÙÅáá¨Ð¶Ù¡ºÑ¹·Ö¡äÇé㹺ѿà¿ÍÃì¢Í§á¿éÁ¢éÍÁÙŹÑé¹ à·èÒ¹Ñé¹ - ,T!RCJ0Ci1R'0:Q1?`?M0Cl1cK0Ah10"Vi19(B ,TJSK0CQ1:a0!i1d"a0?i1A0"i1M0AY1E0MQ1907Uh1JM'(B ,Ta0Ei1Ga0!i1MPdC:R'M0Bh1R'c90:Q1?`?M0Cl109Qi19(B -,T(Pd0Ah10AU1Wh1M(B -,Ta0!i1d"c95M9K0EQ1'(B + ¡ÒÃÊÃéÒ§ºÑ¿à¿ÍÃìãËÁè¢Öé¹ ÊÓËÃѺá¡éä¢á¿éÁ¢éÍÁÙÅÍѹ·ÕèÊͧ áÅéÇá¡éÍÐäúҧÍÂèҧ㹺ѿà¿ÍÃì¹Ñé¹ +¨ÐäÁèÁÕ¼Åã´ æ µèͺѿà¿ÍÃì¢Í§á¿éÁ¢éÍÁÙÅÍѹ·Õè˹Ö觷Ñé§ÊÔé¹ ¨Ø´¹Õé·ÓãËéÊÒÁÒöà¡çºá¿éÁ¢éÍÁÙÅááäÇéà¾×èÍ +á¡éä¢ã¹µÍ¹ËÅѧ - ,Ta05h1`GER07Uh105i1M'!RC(P`0!g1:0CQ1!IR(B (save) 0,T:Q1?`?M0Cl1E'd;c9a0?i1A0"i1M0AY1E(B 0,T4i1GB$S0JQh1'(B C-x C-s 0,T9Qi19(B -,T(P05i1M'J0GT170+l1d;0BQ1'0:Q1?`?M0Cl107Uh105i1M'!RC(P`0!g1:(B 0,T4i1GB$S0JQh1'(B C-x C-f 0,T+Vh1'0$h1M90"i1R'0BXh1'BR!(B ,T`CR0AU1$S0JQh1'0+Vh1'(B -,Tc0*i1JSK0CQ1:!RC09Ui1b4B`)>RP(B 0,T$W1M(B + áµèàÇÅÒ·Õèµéͧ¡ÒèÐà¡çºÃÑ¡ÉÒ (save) ºÑ¿à¿ÍÃìŧä»ã¹á¿éÁ¢éÍÁÙÅ ´éǤÓÊÑè§ C-x C-s ¹Ñé¹ +¨ÐµéͧÊÇÔ·«ìä»ÂѧºÑ¿à¿ÍÃì·Õèµéͧ¡ÒèÐà¡çº ´éǤÓÊÑè§ C-x C-f «Ö觤è͹¢éÒ§ÂØè§ÂÒ¡ àÃÒÁÕ¤ÓÊÑ觫Öè§ +ãªéÊÓËÃѺ¡ÒùÕéâ´Â੾ÒÐ ¤×Í - C-x s ,T`0!g1:0CQ1!IR(B (save) 0,T7X1!0:Q1?`?M0Cl107Uh10AU1M0BYh1(B + C-x s à¡çºÃÑ¡ÉÒ (save) ·Ø¡ºÑ¿à¿ÍÃì·ÕèÁÕÍÂÙè - C-x s ,T(P`0!g1:0CQ1!IR07X1!0:Q1?`?M0Cl107Uh106Y1!a0!i1d"`09Wi1MKRd;(B ,TE'c9a0?i1A0"i1M0AY1E(B ,Tb4B(P6RA0!h1M90Gh1R(Pc0Ki1(B -,T`0!g1:0:Q1?`?M0Cl109Ui1dKA(B y ,TK0CW1M(B n 0,T!Q1:0:Q1?`?M0Cl1a05h1EP0:Q1?`?M0Cl1(B ,T$S6RA(P;CR!/c90Jh1G90Eh1R'"M'K09i1R(M(B 0,T4Q1'(B -0,T5Q1GM0Bh1R'09Ui1(B + C-x s ¨Ðà¡çºÃÑ¡ÉÒ·Ø¡ºÑ¿à¿ÍÃì·Õè¶Ù¡á¡éä¢à¹×éÍËÒä» Å§ã¹á¿éÁ¢éÍÁÙÅ â´Â¨Ð¶ÒÁ¡è͹ÇèÒ¨ÐãËé +à¡çººÑ¿à¿ÍÃì¹ÕéäËÁ y ËÃ×Í n ¡ÑººÑ¿à¿ÍÃìáµèÅкѿà¿ÍÃì ¤Ó¶ÒÁ¨Ð»ÃÒ¡¯ã¹ÊèǹÅèÒ§¢Í§Ë¹éÒ¨Í ´Ñ§ +µÑÇÍÂèÒ§¹Õé Save file /usr/private/yours/TUTORIAL.th? (y or n) -,T!RC"BRB$S0JQh1'(B (extension) +¡ÒâÂÒ¤ÓÊÑè§ (extension) ======================= - ,Tc9b;Ca!CA(B Editor 0,T9Ui1(B 0,TAU1(S9G9$S0JQh1'AR!!0Gh1R(B ,T(S9G9$S0JQh1'0+Vh1'JRARC6!4d04i1b4B0;Xh1A$M9b7CE(B -,TK0CW1M0;Xh1A(B META ,Td04i1KA4(B ,T$S0JQh1'"BRB(B (eXtend) 0,TAU1d0Gi1`0>Wh1Mc0Ki1JRARC6c0*i1$S0JQh1'`K0Eh1R09Ui1d04i1KA4(B 0,TAU1M0BYh1(B 2 -,Ta::(B 0,T4Q1'09Ui1(B + ã¹â»Ãá¡ÃÁ Editor ¹Õé Áըӹǹ¤ÓÊÑè§ÁÒ¡¡ÇèÒ ¨Ó¹Ç¹¤ÓÊÑ觫Öè§ÊÒÁÒö¡´ä´éâ´Â»ØèÁ¤Í¹â·ÃÅ +ËÃ×Í»ØèÁ META ä´éËÁ´ ¤ÓÊÑ觢ÂÒ (eXtend) ÁÕäÇéà¾×èÍãËéÊÒÁÒöãªé¤ÓÊÑè§àËÅèÒ¹Õéä´éËÁ´ ÁÕÍÂÙè 2 +Ẻ ´Ñ§¹Õé - C-x ,T"BRB`0>Th1A04i1GB05Q1G0MQ1!IC(B ,TJSK0CQ1:!405Q1G0MQ1!IC5RA`0"i1Rd;(B 1 0,T5Q1G(B - ESC x ,T"BRB`0>Th1A04i1GB0*Wh1M$S0JQh1'(B ,TJSK0CQ1:!40*Wh1M$S0JQh1'5RA`0"i1Rd;07Qi1'KA4(B + C-x ¢ÂÒÂà¾ÔèÁ´éǵÑÇÍÑ¡Éà ÊÓËÃѺ¡´µÑÇÍÑ¡ÉõÒÁà¢éÒä» 1 µÑÇ + ESC x ¢ÂÒÂà¾ÔèÁ´éǪ×èͤÓÊÑè§ ÊÓËÃѺ¡´ª×èͤÓÊÑ觵ÒÁà¢éÒä»·Ñé§ËÁ´ - ,T$S0JQh1';CP`@709Ui1(B 0,T!g1`0;g19$S0JQh1'07Uh10AU1;CPbB*09l1(B ,Ta05h10Jh1G9cK0-h1(P06Y1!`0CU1B!c0*i1(B 0,T9i1MB$0CQi1'!0Gh1R$S0JQh1'07Qh1Gd;(B -0,T5Q1GM0Bh1R'`0*h19(B ,T$S0JQh1'KRa0?i1A0"i1M0AY1E(B (find) C-x C-f ,T$S0JQh1'`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E(B (save) C-x C-s -,T$S0JQh1'(B C-x C-c (,T`0ET1!(B Editor) 0,T5h1R'0!g1`0;g19K09Vh1'c9$S0JQh1'`K0Eh1R09Ui1(B + ¤ÓÊÑ觻ÃÐàÀ·¹Õé ¡çà»ç¹¤ÓÊÑ觷ÕèÁÕ»ÃÐ⪹ì áµèÊèǹãË­è¨Ð¶Ù¡àÃÕ¡ãªé ¹éͤÃÑ駡ÇèÒ¤ÓÊÑ觷ÑèÇä» +µÑÇÍÂèÒ§àªè¹ ¤ÓÊÑè§ËÒá¿éÁ¢éÍÁÙÅ (find) C-x C-f ¤ÓÊÑè§à¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅ (save) C-x C-s +¤ÓÊÑè§ C-x C-c (àÅÔ¡ Editor) µèÒ§¡çà»ç¹Ë¹Öè§ã¹¤ÓÊÑè§àËÅèÒ¹Õé - ,T$S0JQh1'(B C-z ,T`0;g19$S0JQh1'07Uh1c0*i1c9c9!RCMM!(R!(B Emacs 0,T$h1M90"i1R'0:h1MB(B ,T$S0JQh1'09Ui1(Pd0Ah1B!`0ET1!(B -Emacs ,T`EB07U1`04U1BG(B ,Ta05h1(PK0BX14(B Emacs ,Td0Gi10*Qh1G$CRG(B ,T`0>Wh1Mc0Ki1JRARC6!0EQ1:d;c0*i1(B csh ,Td04i10MU1!(B ,T!RC!4(B -C-z 0,T(V1'`0;g19!RCK0BX14(B Emacs ,Td0Gi10*Qh1G$CRG`07h1R09Qi19(B ,T(Pd0Ah17S$GRA`0JU1BKRBc0Ki10!Q1:`09Wi1MKR07Uh1a0!i1d"d;(B + ¤ÓÊÑè§ C-z à»ç¹¤ÓÊÑ觷Õèãªéã¹ã¹¡ÒÃÍÍ¡¨Ò¡ Emacs ¤è͹¢éÒ§ºèÍ ¤ÓÊÑ觹Õé¨ÐäÁè¡àÅÔ¡ +Emacs àÅ·Õà´ÕÂÇ áµè¨ÐËÂØ´ Emacs äÇéªÑèǤÃÒÇ à¾×èÍãËéÊÒÁÒö¡ÅѺä»ãªé csh ä´éÍÕ¡ ¡Òá´ +C-z ¨Ö§à»ç¹¡ÒÃËÂØ´ Emacs äÇéªÑèǤÃÒÇà·èÒ¹Ñé¹ ¨ÐäÁè·Ó¤ÇÒÁàÊÕÂËÒÂãËé¡Ñºà¹×éÍËÒ·Õèá¡éä¢ä» -,TKARB`K05X1(B: ,Ta05h170Gh1R(B ,Tc9!C03U107Uh1c0*i1:9(B X-window ,TK0CW1Mc0*i1(B sh ,TM0BYh1(B 0,T!g1(Pd0Ah10AU1$GRAJRARC609Ui1(B +ËÁÒÂà˵Ø: áµè·ÇèÒ ã¹¡Ã³Õ·Õèãªéº¹ X-window ËÃ×Íãªé sh ÍÂÙè ¡ç¨ÐäÁèÁÕ¤ÇÒÁÊÒÁÒö¹Õé - ,T$S0JQh1';CP`@7(B C-x 0,TAU1AR!ARBKERB$S0JQh1'(B ,T$S0JQh1'07Uh1M08T1:RBd;a0Ei1G0AU104Q1'09Ui1(B + ¤ÓÊÑ觻ÃÐàÀ· C-x ÁÕÁÒ¡ÁÒÂËÅÒ¤ÓÊÑè§ ¤ÓÊÑ觷Õè͸ԺÒÂä»áÅéÇÁմѧ¹Õé - C-x C-f ,TKRa0?i1A0"i1M0AY1E(B (find) ,TJSK0CQ1:a0!i1d"(B - C-x C-s ,T`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E(B (save) - C-x C-b ,TaJ4'CRB!RC0:Q1?`?M0Cl1(B (buffer list) - C-x C-c ,T`0ET1!!RCc0*i1(B Editor ,TaEP`0!g1:0CQ1!IRa0?i1A0"i1M0AY1Eb4B0MQ15b90AQ105T1(B ,Ta05h106i1RKR!0AU1a0?i1A(B - 0,T"i1M0AY1E:R'0MQ1906Y1!a0!i1d"(B 0,T!g1c0Ki16RA0Gh1R(P`0!g1:0CQ1!IRa0?i1A0"i1M0AY1E09Qi19dKA(B ,Tb4B07Qh1Gd;(B - ,T!RCMM!(R!(B Emacs ,T7Sd04i1b4B$S0JQh1'(B C-x C-s C-x C-c 0,T$W1Mc0Ki1`0!g1:0CQ1!IR(B - 0,T!h1M9a0Ei1G0(V1'`0ET1!(B + C-x C-f ËÒá¿éÁ¢éÍÁÙÅ (find) ÊÓËÃѺá¡éä¢ + C-x C-s à¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅ (save) + C-x C-b áÊ´§ÃÒ¡Òúѿà¿ÍÃì (buffer list) + C-x C-c àÅÔ¡¡ÒÃãªé Editor áÅÐà¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙÅâ´ÂÍѵâ¹ÁÑµÔ áµè¶éÒËÒ¡ÁÕá¿éÁ + ¢éÍÁÙźҧÍѹ¶Ù¡á¡éä¢ ¡çãËé¶ÒÁÇèÒ¨Ðà¡çºÃÑ¡ÉÒá¿éÁ¢éÍÁÙŹÑé¹äËÁ â´Â·ÑèÇä» + ¡ÒÃÍÍ¡¨Ò¡ Emacs ·Óä´éâ´Â¤ÓÊÑè§ C-x C-s C-x C-c ¤×ÍãËéà¡çºÃÑ¡ÉÒ + ¡è͹áÅéǨ֧àÅÔ¡ - ,T$S0JQh1'"BRB`0>Th1Aa::0*Wh1M09Qi19(B ,Tc0*i1JSK0CQ1:$S0JQh1'07Uh1d0Ah10$h1MBd04i1c0*i1(B ,TK0CW1M$S0JQh1'07Uh1c0*i1`)>RP0!Q1:bKA40>T1`HI:R'(B -,TbKA4(B 0,T5Q1GM0Bh1R'`0*h19(B ,T$S0JQh1'(B "command-apropos" 0,T+Vh1'(P6RA(B 0,T$U10Bl1`0GT10Cl14(B (keyword) ,Ta0Ei1GaJ4'> ,TEM'!4(B ESC x ,T5RA04i1GB(B "command-apropos" ,TK0CW1M(B - "command-a" ,TK0EQ1'(R!09Qi190!g1!4(B "kanji" 0,T4Y1(B + >> Åͧ¡´ ESC x µÒÁ´éÇ "command-apropos" ËÃ×Í + "command-a" ËÅѧ¨Ò¡¹Ñ鹡硴 "kanji" ´Ù - ,Tc0Ki1!4(B C-x 1 ,T`GER05i1M'!RC(PE:(B "0,TGT19b40Gl1(B" 0,T7Uh1b<0Eh10"Vi19ARcK0Ah1(B + ãËé¡´ C-x 1 àÇÅÒµéͧ¡ÒèÐź "ÇÔ¹â´Çì" ·Õèâ¼Åè¢Öé¹ÁÒãËÁè -,T:CC07Q14bKA4(B (Mode Line) +ºÃ÷ѴâËÁ´ (Mode Line) ===================== - ,T`GER07Uh10>T1A0>l1$S0JQh1'`0"i1Rd;0*i1R(B ,Tf(B Emacs ,T(PaJ4'0JTh1'07Uh10>T1A0>l1E'd;5C':CC07Q140Eh1R'0JX14"M'(M0+Vh1'`0CU1B!(B -0,TGh1R(B echo area ,T:CC07Q140+Vh1'M0BYh106Q140"Vi19ARK09Vh1':CC07Q14(B ,T`0CU1B!0Gh1R:CC07Q14bKA4(B (mode line) ,T:CC07Q14(B -,TbKA40AU10EQ1!I3P04Q1'09Ui1(B + àÇÅÒ·Õè¾ÔÁ¾ì¤ÓÊÑè§à¢éÒ仪éÒ æ Emacs ¨ÐáÊ´§ÊÔ觷Õè¾ÔÁ¾ìŧ仵çºÃ÷ѴÅèÒ§ÊØ´¢Í§¨Í«Öè§àÃÕ¡ +ÇèÒ echo area ºÃ÷Ѵ«Öè§ÍÂÙè¶Ñ´¢Öé¹ÁÒ˹Ö觺Ã÷Ѵ àÃÕ¡ÇèÒºÃ÷ѴâËÁ´ (mode line) ºÃ÷Ѵ +âËÁ´ÁÕÅѡɳдѧ¹Õé [--]J:--**-Mule: TUTORIAL.th (Fundamental) ---NN%-------------- -,TKARB`K05X1(B: ,T5C'0Jh1G9(B NN ,T"M'(B NN% ,T(P0AU105Q1G`E"c0Jh1M0BYh1(B ,T:CC07Q14bKA407Uh1aJ4'M0BYh1MR((Pa5!05h1R'(B - ,Td;(R!05Q1GM0Bh1R'0:i1R'(B ,Ta05h10!g1d0Ah1`0;g19dC(B 0,T5Q1GM0Bh1R'`0*h19(B ,TMR((P0AU1`GERK0CW1M(B uptime - ,TaJ4'D05T1!CCA07Uh1a5!05h1R'0!Q19b4B0JTi19`0*T1'(B ,T`0AWh1MM0BYh1c9bKA4K0EQ1!07Uh105h1R'0!Q19(B 0,T5Q1GM0Bh1R'(B -,T`0*h19(B ,T`GERb;Ca!CA@RIR(B ,T(P0AU1$S0JQh1'JSK0CQ1:J0Ci1R'(B ,TKARB`K05X1(B (comment) ,TM0BYh1(B ,T`09Wh1M'(R!0GT108U1c0Jh1(B -,TKARB`K05X1"M'@RIRa05h1EP@RIRa5!05h1R'0!Q19(B ,T$S0JQh1'09Ui10!g1(Pa5!05h1R'0!Q19d;c9a05h1EPbKA4K0EQ1!(B ,T`0>Wh1Mc0Ki1(B -,TJRARC6c0Jh1KARB`K05X1c9a05h1EP@RIRd04i1M0Bh1R'06Y1!05i1M'(B + ¤ÓÊÑ觺ҧ¤ÓÊÑ觨ÐÁվĵԡÃÃÁ·ÕèᵡµèÒ§¡Ñ¹â´ÂÊÔé¹àªÔ§ àÁ×èÍÍÂÙèã¹âËÁ´ËÅÑ¡·ÕèµèÒ§¡Ñ¹ µÑÇÍÂèÒ§ +àªè¹ àÇÅÒâ»Ãá¡ÃÁÀÒÉÒ ¨ÐÁÕ¤ÓÊÑè§ÊÓËÃѺÊÃéÒ§ ËÁÒÂà赯 (comment) ÍÂÙè à¹×èͧ¨Ò¡ÇÔ¸ÕãÊè +ËÁÒÂà˵آͧÀÒÉÒáµèÅÐÀÒÉÒᵡµèÒ§¡Ñ¹ ¤ÓÊÑ觹Õé¡ç¨ÐᵡµèÒ§¡Ñ¹ä»ã¹áµèÅÐâËÁ´ËÅÑ¡ à¾×èÍãËé +ÊÒÁÒöãÊèËÁÒÂà˵Øã¹áµèÅÐÀÒÉÒä´éÍÂèÒ§¶Ù¡µéͧ - ,T$S0JQh1'JSK0CQ1:!RC`;0EUh1B9bKA4c0Ki1`0;g19bKA4K0EQ1!0MWh19(B 0,T$W1M$S0JQh1'"BRB(B (extend) 0,T+Vh1'0*Wh1M$S0JQh1'`0;g190*Wh1M(B -,TbKA4(B 0,T5Q1GM0Bh1R'`0*h19(B ,T$S0JQh1'(B M-x fundamental-mode 0,T$W1M$S0JQh1'JSK0CQ1:`;0EUh1B9bKA4`0;g19bKA4(B + ¤ÓÊÑè§ÊÓËÃѺ¡ÒÃà»ÅÕè¹âËÁ´ãËéà»ç¹âËÁ´ËÅÑ¡Í×è¹ ¤×ͤÓÊÑ觢ÂÒ (extend) «Ö觪×èͤÓÊÑè§à»ç¹ª×èÍ +âËÁ´ µÑÇÍÂèÒ§àªè¹ ¤ÓÊÑè§ M-x fundamental-mode ¤×ͤÓÊÑè§ÊÓËÃѺà»ÅÕè¹âËÁ´à»ç¹âËÁ´ Fundamental - ,T`GER07Uh1(Pa0!i1d"a0?i1A0"i1M0AY1E@RIR0MQ1'!DI(B 0,T!g1c0Ki1c0*i1(B Text mode + àÇÅÒ·Õè¨Ðá¡éä¢á¿éÁ¢éÍÁÙÅÀÒÉÒÍѧ¡ÄÉ ¡çãËéãªé Text mode - >> ,TEM'0;i1M9$S0JQh1'(B M-x text-mode + >> Åͧ»é͹¤ÓÊÑè§ M-x text-mode - 0,T6i1R05i1M'!RCKR0"i1M0AY1E`0>Th1A`0!Uh1BG0!Q1:bKA4K0EQ1!07Uh1c0*i1M0BYh1c90;Q1(0(X10:Q19(B 0,T!g1c0Ki10;i1M9$S0JQh1'(B C-h m + ¶éÒµéͧ¡ÒÃËÒ¢éÍÁÙÅà¾ÔèÁà¡ÕèÂǡѺâËÁ´ËÅÑ¡·ÕèãªéÍÂÙè㹻Ѩ¨ØºÑ¹ ¡çãËé»é͹¤ÓÊÑè§ C-h m - >> ,Tc0Ki1!4(B C-h m ,T`0>Wh1M0HV1!IR0"i1Ma5!05h1R'CPK0Gh1R'(B Text mode 0,T!Q1:(B Fundamental mode + >> ãËé¡´ C-h m à¾×èÍÈÖ¡ÉÒ¢éÍᵡµèÒ§ÃÐËÇèÒ§ Text mode ¡Ñº Fundamental mode - >> ,Tc0Ki1!4(B C-x 1 ,T`0>Wh1ME:`M!JRCMM!(R!(M(B + >> ãËé¡´ C-x 1 à¾×èÍźàÍ¡ÊÒÃÍÍ¡¨Ò¡¨Í - ,T5C'0Jh1G90+i1RB"M':CC07Q14bKA4(B ,T(P0AU10JQ1-0EQ1!I03l1(B '[--]' ,T`0>Wh1MaJ4'bKA4JSK0CQ1:!RC0;i1M90"i1M0AY1E(B -(input mode) ,TM0BYh1(B 0,TJQ1-0EQ1!I03l1(B [--] ,TKARB06V1'JRARC60;i1M90"i1M0AY1Ed04i104i1GB05Q1G0MQ1!IC@RIR0MQ1'!DI(B -(English alphabets) ,T!0CX13R0Mh1R90$Yh10AW1M"M'(B "Tamago" ,TJSK0CQ1:CRBEP`0MU1B4"M'0GT108U1c0*i1(B + µÃ§Êèǹ«éÒ¢ͧºÃ÷ѴâËÁ´ ¨ÐÁÕÊÑ­Åѡɳì '[--]' à¾×èÍáÊ´§âËÁ´ÊÓËÃѺ¡Òûé͹¢éÍÁÙÅ +(input mode) ÍÂÙè ÊÑ­Åѡɳì [--] ËÁÒ¶֧ÊÒÁÒö»é͹¢éÍÁÙÅä´é´éǵÑÇÍÑ¡ÉÃÀÒÉÒÍѧ¡ÄÉ +(English alphabets) ¡ÃسÒÍèÒ¹¤ÙèÁ×ͧ͢ "Tamago" ÊÓËÃѺÃÒÂÅÐàÍÕ´¢Í§ÇÔ¸Õãªé - ,TaEP5C'04i1R9"GR"M'0JQ1-0EQ1!I03l109Qi19(B ,T(P0AU1`$0CWh1M'KARBaJ4'J6R9P"M'(B flag ,T"M'CP::C0KQ1J(B -(coding-system) ,TM0BYh1(B Mule ,TJRARC6!SK94CP::C0KQ1JaB!`)>RPJSK0CQ1:(B ,T!RC`0!g1:0Mh1R9a0?i1A0"i1M0AY1E(B -,T!RC0;i1M90"i1M0AY1E(R!0$U10Bl1:M0Cl14(B ,T!RCaJ4'RP(B -0,TJQ1-0EQ1!I03l10*h1GB(S(B (mnemonic) ,T"M'CP::C0KQ1JJSK0CQ1:!RC`0!g1:0Mh1R9a0?i1A0"i1M0AY1E(B ,T`07h1R09Qi19(B + áÅеç´éÒ¹¢ÇҢͧÊÑ­Åѡɳì¹Ñé¹ ¨ÐÁÕà¤Ã×èͧËÁÒÂáÊ´§Ê¶Ò¹Ð¢Í§ flag ¢Í§ÃкºÃËÑÊ +(coding-system) ÍÂÙè Mule ÊÒÁÒö¡Ó˹´ÃкºÃËÑÊá¡੾ÒÐÊÓËÃѺ ¡ÒÃà¡çºÍèÒ¹á¿éÁ¢éÍÁÙÅ +¡Òûé͹¢éÍÁÙŨҡ¤ÕÂìºÍÃì´ ¡ÒÃáÊ´§¼ÅÍÍ¡·Ò§¨Í ä´éÍÔÊÃШҡ¡Ñ¹ áµèâ´Â»¡µÔ¨ÐáÊ´§à©¾ÒÐ +ÊÑ­ÅѡɳìªèÇÂ¨Ó (mnemonic) ¢Í§ÃкºÃËÑÊÊÓËÃѺ¡ÒÃà¡çºÍèÒ¹á¿éÁ¢éÍÁÙÅ à·èÒ¹Ñé¹ - >> ,T5CG(04Y10Gh1R0AU10JQ1-0EQ1!I03l1(B ,T$0Ei1RB$0EV1'0!Q1:(B "J:" "S:" "E:" ,TaJ4'M0BYh107Uh1:CC07Q14bKA4K0CW1Md0Ah1(B + >> µÃǨ´ÙÇèÒÁÕÊÑ­ÅÑ¡É³ì ¤ÅéÒ¤ÅÖ§¡Ñº "J:" "S:" "E:" áÊ´§ÍÂÙè·ÕèºÃ÷ѴâËÁ´ËÃ×ÍäÁè - 0,T5Q1G0MQ1!IC05Q1GaC!0$W1M(B 0,TJQ1-0EQ1!I03l10*h1GB(S(B (mnemonic) ,T"M'CP::C0KQ1J07Uh1c0*i1M0BYh1(B 0,T5Q1G(B ':' ,TaJ4'c0Ki10CYi1(B -0,TGh1R0AU105Q1G0MQ1!IC"M'@RIR0MWh19(B ,T9M!(R!@RIR0MQ1'!DIaJ4'M0BYh1(B (,T`0*h19(B ,T@RIR0(U19(B ,T@RIR0-Uh10;Xh19(B ,T`0;g1905i19(B) 0,T5Q1G(B J -,TKARB06V1'(B ,TC0KQ1J07Uh1c0*i10!Q1:(B JUNET 0,T$W1M(B ,TC0KQ1J(B JIS 0,T5Q1G(B S ,TKARB06V1'(B Shift-JIS ,TaEP(B 0,T5Q1G(B E ,TKARB06V1'(B -,TC0KQ1J(B EUC ,T@RIR0-Uh10;Xh19(B ,T(PJ0EQ1:`;0EUh1B9(B (toggle) ,T!RCaJ4'> ,TEM'0;i1M9$S0JQh1'(B C-x C-k t 0,T4Y1JM'$0CQi1'(B + >> Åͧ»é͹¤ÓÊÑè§ C-x C-k t ´ÙÊͧ¤ÃÑé§ - 0,T6i1R`7M0Cl10AT109Q1E07Uh1c0*i1M0BYh10AU10;Xh1A(B META ,TaEPbKA407Uh1c0*i1M0BYh1`0;g19C0KQ1J(B JIS ,T`CR0!g1(PJRARC6c0*i10;Xh1A(B META -,Ta79!RC!40;Xh1A(B ESCAPE ,Td04i1(B 0,TGT108U1c0*i1(P`K0AW1M90!Q1:!RCc0*i10;Xh1A$M9b7CE(B 0,T$W1Mc0Ki1!40;Xh1A(B META 0,T$i1R'd0Gi1a0Ei1G0(V1'(B -,T!405Q1G0MQ1!IC5RA(B M-<0,T5Q1G0MQ1!IC(B> ,T(P7SK09i1R07Uh1`K0AW1M90!Q1:(B ESC <0,T5Q1G0MQ1!IC(B> 0,T9Qh190$W1M(B 0,T7X1!M0Bh1R'07Uh1M08T1:RBAR(B -,T(906V1'0(X1409Ui1(B ,T(P0BQ1'$'0AU1 ,Tc0Ki1`0;g19(B M-<0,T5Q1G0MQ1!IC(B> ,Ta05h10"i1M(B -,T$GCCP0GQ1'0!g10$W1M(B 0,T;Xh1A(B META ,T(Pd0Ah1JRARC6c0*i1d04i10!Q1:C0KQ1J(B Shift-JIS ,TaEP(B EUC + ¶éÒà·ÍÃìÁÔ¹ÑÅ·ÕèãªéÍÂÙèÁÕ»ØèÁ META áÅÐâËÁ´·ÕèãªéÍÂÙèà»ç¹ÃËÑÊ JIS àÃÒ¡ç¨ÐÊÒÁÒöãªé»ØèÁ META +á·¹¡Òá´»ØèÁ ESCAPE ä´é ÇÔ¸Õãªé¨ÐàËÁ×͹¡Ñº¡ÒÃãªé»ØèÁ¤Í¹â·ÃÅ ¤×ÍãËé¡´»ØèÁ META ¤éÒ§äÇéáÅéǨ֧ +¡´µÑÇÍÑ¡ÉõÒÁ M-<µÑÇÍÑ¡ÉÃ> ¨Ð·Ó˹éÒ·ÕèàËÁ×͹¡Ñº ESC <µÑÇÍÑ¡ÉÃ> ¹Ñ蹤×Í ·Ø¡ÍÂèÒ§·Õè͸ԺÒÂÁÒ +¨¹¶Ö§¨Ø´¹Õé ¨ÐÂѧ¤§ÁÕ¼ÅàËÁ×͹à´ÔÁ ËÅѧ¨Ò¡à»ÅÕè¹ ESC <µÑÇÍÑ¡ÉÃ> ãËéà»ç¹ M-<µÑÇÍÑ¡ÉÃ> áµè¢éÍ +¤ÇÃÃÐÇѧ¡ç¤×Í »ØèÁ META ¨ÐäÁèÊÒÁÒöãªéä´é¡ÑºÃËÑÊ Shift-JIS áÅÐ EUC - ,T!RC`;0EUh1B9CP::C0KQ1J(P0AU1U1B'0!Q1:a05h1EP0:Q1?`?M0Cl1`07h1R09Qi19(B ,TJRARC604Y1$S0JQh1'`0!Uh1BG0!Q1:CP::C0KQ1J(B -,Td04i1b4B$S0JQh1'(B C-h a coding-system + ¡ÒÃà»ÅÕè¹ÃкºÃËÑʨÐÁÕ¼Åá¤èà¾Õ§¡ÑºáµèÅкѿà¿ÍÃìà·èÒ¹Ñé¹ ÊÒÁÒö´Ù¤ÓÊÑè§à¡ÕèÂǡѺÃкºÃËÑÊ +ä´éâ´Â¤ÓÊÑè§ C-h a coding-system - >> ,Tc0Ki10;i1M9$S0JQh1'(B C-h a coding-system ,Ta0Ei1G0Mh1R9CRBEP`0MU1B4"M'$S0JQh1'(B - set-display-coding-system set-file-coding-system ,TaEP(B - set-process-coding-system ,T(R!`M!JRC07Uh1;CR!/0"Vi19(B + >> ãËé»é͹¤ÓÊÑè§ C-h a coding-system áÅéÇÍèÒ¹ÃÒÂÅÐàÍÕ´¢Í§¤ÓÊÑè§ + set-display-coding-system set-file-coding-system áÅÐ + set-process-coding-system ¨Ò¡àÍ¡ÊÒ÷Õè»ÃÒ¡¯¢Öé¹ -,T!RC0$i19KR(B (search) +¡Òäé¹ËÒ (search) ================ - Emacs ,TJRARC60$i19KRJRB0MQ1!"CP(B (string) ,T@RBc9a0?i1A0"i1M0AY1Ed;7R'0"i1R'K09i1RK0CW1M0"i1R'K0EQ1'd04i1(B -0,T6i1R05i1M'!RC0$i19KRd;7R'0"i1R'K09i1R"M'5SaK09h1'`$M0Cl1`+M0Cl1(B (cursor) 0,T!g1c0Ki1!4(B C-s 0,T6i1R05i1M'!RC0$i19KR(B -,Td;7R'0"i1R'K0EQ1'"M'5SaK09h1'`$M0Cl1`+M0Cl1(B 0,T!g1c0Ki1!4(B C-r ,TK0EQ1'(R!09Qi19(P0AU10"i1M$GRA0Gh1R(B "I-search:" -,T;CR!/0"Vi195C'(B echo area ,TB!`0ET1!!RC0$i19KRd04i104i1GB!RC!4(B ESC + Emacs ÊÒÁÒö¤é¹ËÒÊÒÂÍÑ¡¢ÃÐ (string) ÀÒÂã¹á¿éÁ¢éÍÁÙÅä»·Ò§¢éҧ˹éÒËÃ×Í¢éÒ§ËÅѧä´é +¶éÒµéͧ¡Òäé¹ËÒä»·Ò§¢éҧ˹éҢͧµÓá˹è§à¤ÍÃìà«ÍÃì (cursor) ¡çãËé¡´ C-s ¶éÒµéͧ¡Òäé¹ËÒ +ä»·Ò§¢éÒ§ËÅѧ¢Í§µÓá˹è§à¤ÍÃìà«ÍÃì ¡çãËé¡´ C-r ËÅѧ¨Ò¡¹Ñ鹨ÐÁÕ¢éͤÇÒÁÇèÒ "I-search:" +»ÃÒ¡¯¢Ö鹵ç echo area ¡àÅÔ¡¡Òäé¹ËÒä´é´éÇ¡Òá´ ESC - >> ,T!4(B C-s ,T`0>Wh1M`0CTh1A!RC0$i19KR(B ,Ta0Ei1G!405Q1G0MQ1!IC"M'$S0Gh1R(B "cursor" ,TE'd;07U1EP05Q1GM0Bh1R'(B - 0,T*i1R(B ,Ta0Ei1G0JQ1'`!504Y10Gh1R`$M0Cl1`+M0Cl1"0BQ1:d;M0Bh1R'dC(B + >> ¡´ C-s à¾×èÍàÃÔèÁ¡Òäé¹ËÒ áÅéÇ¡´µÑÇÍÑ¡Éâͧ¤ÓÇèÒ "cursor" ŧ价ÕÅеÑÇÍÂèÒ§ + ªéÒ áÅéÇÊѧࡵ´ÙÇèÒà¤ÍÃìà«ÍÃì¢ÂѺä»ÍÂèÒ§äà - >> ,TEM'!4(B C-s 0,T4Y10MU1!K09Vh1'$0CQi1'`0>Wh1M0$i19KR$S0Gh1R(B "cursor" 0,T5Q1G05h1Md;(B + >> Åͧ¡´ C-s ´ÙÍա˹Ö觤ÃÑé§à¾×èͤé¹ËÒ¤ÓÇèÒ "cursor" µÑǵèÍä» - >> ,T!4(B 0,T4Y1(B 4 ,T$0CQi1'(B ,Ta0Ei1G0JQ1'`!504Y10Gh1R!RC`$0EWh1M907Uh1"M'`$M0Cl1`+M0Cl1(B + >> ¡´ ´Ù 4 ¤ÃÑé§ áÅéÇÊѧࡵ´ÙÇèÒ¡ÒÃà¤Å×è͹·Õè¢Í§à¤ÍÃìà«ÍÃì - >> ,T!4(B ESC ,T`0>Wh1MB!`0ET1!!RC0$i19KR(B + >> ¡´ ESC à¾×èÍ¡àÅÔ¡¡Òäé¹ËÒ - ,T!RC0$i19KR(P`0CTh1A0"Vi1907Q1907U1(B ,Tc9CPK0Gh1R'07Uh10>T1A0>l1JRB0MQ1!"CP07Uh105i1M'!RC(P0$i19KR(B ,T`0"i1Rd;`0>U1B':R'0Jh1G9(B -0,T6i1R05i1M'!RC(P0$i19KR05Q1G05h1Md;(B 0,T!g1c0Ki1!4(B C-s 0,TMU1!K09Vh1'$0CQi1'(B 0,T6i1RKR!0$i19KRJRB0MQ1!"CP07Uh10;i1M9`0"i1Rd;d0Ah1>:(B 0,T!g1(B -,T(P0AU10"i1M$GRA;CR!/0"Vi19(B ,Tc0Ki1!4(B C-g ,T`0>Wh1MB!`0ET1!(B + ¡Òäé¹ËÒ¨ÐàÃÔèÁ¢Ö鹷ѹ·Õ ã¹ÃÐËÇèÒ§·Õè¾ÔÁ¾ìÊÒÂÍÑ¡¢ÃзÕèµéͧ¡ÒèФé¹ËÒ à¢éÒä»à¾Õ§ºÒ§Êèǹ +¶éÒµéͧ¡ÒèФé¹ËÒµÑǵèÍä» ¡çãËé¡´ C-s Íա˹Ö觤ÃÑé§ ¶éÒËÒ¡¤é¹ËÒÊÒÂÍÑ¡¢ÃзÕè»é͹à¢éÒä»äÁ辺 ¡ç +¨ÐÁÕ¢éͤÇÒÁ»ÃÒ¡¯¢Öé¹ ãËé¡´ C-g à¾×èÍ¡àÅÔ¡ - ,TCPK0Gh1R'07Uh10$i19KRM0BYh1(B 0,T6i1R!4(B 0,T5Q1G0MQ1!IC05Q1G0JX1407i1RBc9JRB0MQ1!"CP0!g1(P06Y1!E:d;(B ,Ta0Ei1G(B -,T`$M0Cl1`+M0Cl10!g1(P!0EQ1:d;5SaK09h1'0!h1M9K09i1R(B 0,T5Q1GM0Bh1R'`0*h19(B 0,T6i1R!4(B "cu" 0,T!g1(P0$i19KRd;06V1'5SaK09h1'07Uh10AU1$S0Gh1R(B -"cu" ,Ta05h106i1R!4(B ,Tc90(Q1'KGP09Ui1(B 0,T5Q1G(B 'u' ,Tc9(B search line 0,T!g1(PKRBd;(B ,Ta0Ei1G`$M0Cl1`+M0Cl1(B -,T(P"0BQ1:!0EQ1:d;07Uh15SaK09h1'07Uh10AU105Q1G(B 'c' ,TM0BYh1(B + ÃÐËÇèÒ§·Õè¤é¹ËÒÍÂÙè ¶éÒ¡´ µÑÇÍÑ¡ÉõÑÇÊØ´·éÒÂã¹ÊÒÂÍÑ¡¢ÃСç¨Ð¶Ù¡Åºä» áÅéÇ +à¤ÍÃìà«ÍÃì¡ç¨Ð¡ÅѺ仵Óá˹觡è͹˹éÒ µÑÇÍÂèÒ§àªè¹ ¶éÒ¡´ "cu" ¡ç¨Ð¤é¹ËÒ件֧µÓá˹觷ÕèÁÕ¤ÓÇèÒ +"cu" áµè¶éÒ¡´ 㹨ѧËÇйÕé µÑÇ 'u' ã¹ search line ¡ç¨ÐËÒÂä» áÅéÇà¤ÍÃìà«ÍÃì +¨Ð¢ÂѺ¡ÅѺ价ÕèµÓá˹觷ÕèÁÕµÑÇ 'c' ÍÂÙè - 0,T6i1R!405Q1G0MQ1!IC$M9b7CE(B (control character) 0,T5Q1G0MWh19(B ,T9M!`K09W1M(R!(B C-s ,TK0CW1M(B C-r -,T!RC0$i19KR0!g1(P0JTi190JX14E'(B + ¶éÒ¡´µÑÇÍÑ¡Éä͹â·ÃÅ (control character) µÑÇÍ×è¹ ¹Í¡à˹×ͨҡ C-s ËÃ×Í C-r +¡Òäé¹ËÒ¡ç¨ÐÊÔé¹Êشŧ - ,T$S0JQh1'(B C-s ,T(P0$i19KRJRB0MQ1!"CP07Uh105i1M'!RC(B ,Td;7R'0"i1R'K09i1R"M'5SaK09h1'`$M0Cl1`+M0Cl1(B 0,T6i1R05i1M'!RC(B -0,T$i19KRd;7R'07T1HK0EQ1'(B 0,T!g1c0Ki1!4(B C-r 0,T9Qh190$W1M(B ,TJRARC6c0*i1(B C-s ,TaEP(B C-r ,TJ0EQ1:0!Q19`0>Wh1M0$i19KRd;d04i1c907Qi1'(B -,TJM'07T1H7R'(B C-s ,TaEP(B C-r ,T7SK09i1R07Uh1`K0AW1M90!Q1907X1!;CP!RC(B ,T(P05h1R'0!Q190!g15C'07T1H7R'!RC0$i19KR`07h1R09Qi19(B + ¤ÓÊÑè§ C-s ¨Ð¤é¹ËÒÊÒÂÍÑ¡¢ÃзÕèµéͧ¡Òà 价ҧ¢éҧ˹éҢͧµÓá˹è§à¤ÍÃìà«ÍÃì ¶éÒµéͧ¡Òà +¤é¹ËÒä»·Ò§·ÔÈËÅѧ ¡çãËé¡´ C-r ¹Ñ蹤×Í ÊÒÁÒöãªé C-s áÅÐ C-r ÊÅѺ¡Ñ¹à¾×èͤé¹ËÒä»ä´éã¹·Ñé§ +Êͧ·ÔÈ·Ò§ C-s áÅÐ C-r ·Ó˹éÒ·ÕèàËÁ×͹¡Ñ¹·Ø¡»ÃСÒà ¨ÐµèÒ§¡Ñ¹¡çµÃ§·ÔÈ·Ò§¡Òäé¹ËÒà·èÒ¹Ñé¹ Recursive Editing Level - ,T:R'07U1(B ,T`CRMR((PK0EX14`0"i1Rd;M0BYh1c9J6R9P07Uh1`0CU1B!0Gh1R(B Recursive Editing Level ,Td04i1b4B(B -,Td0Ah105Qi1'c((B ,Tc9bKA409Ui1(B ,T`$0CWh1M'KARBG'`0Eg1:(B '()' 0,T7Uh1aJ4'0*Wh1MbKA4K0EQ1!(B (major mode) ,TM0BYh1(P0AU1G'`0Eg1:(B -'[]' 0,TEi1MA(B ,T`0>Th1A0"Vi190MU1!K09Vh1'0*Qi19(B 0,T5Q1GM0Bh1R'`0*h19(B 0,T6i1R`04T1A`0;g19(B (Fundamental) ,TM0BYh1(B 0,T!g1(P`;0EUh1B9`0;g19(B -[(Fundamental)] ,Ta79(B + ºÒ§·Õ àÃÒÍÒ¨¨ÐËÅØ´à¢éÒä»ÍÂÙèã¹Ê¶Ò¹Ð·ÕèàÃÕ¡ÇèÒ Recursive Editing Level ä´éâ´Â +äÁèµÑé§ã¨ ã¹âËÁ´¹Õé à¤Ã×èͧËÁÒÂǧàÅçº '()' ·ÕèáÊ´§ª×èÍâËÁ´ËÅÑ¡ (major mode) ÍÂÙè¨ÐÁÕǧàÅçº +'[]' ÅéÍÁ à¾ÔèÁ¢Öé¹Íա˹Ö觪Ñé¹ µÑÇÍÂèÒ§àªè¹ ¶éÒà´ÔÁà»ç¹ (Fundamental) ÍÂÙè ¡ç¨Ðà»ÅÕè¹à»ç¹ +[(Fundamental)] á·¹ -,TKARB`K05X1(B: ,T`CR(Pd0Ah1M08T1:RB`0!Uh1BG0!Q1:(B Recursive Editing Level ,Tc907Uh109Ui1(B +ËÁÒÂà˵Ø: àÃÒ¨ÐäÁè͸ԺÒÂà¡ÕèÂǡѺ Recursive Editing Level ã¹·Õè¹Õé - ,Tc0Ki1!4(B M-x top-level ,T`0>Wh1M07Uh1(PMM!(R!(B Recursive Editing Level + ãËé¡´ M-x top-level à¾×èÍ·Õè¨ÐÍÍ¡¨Ò¡ Recursive Editing Level - >> ,TEM'!404Y1(B ,T5C'0Jh1G90Eh1R'"M'(M(P0AU10"i1M$GRA0Gh1R(B "Back to top level" ,T;CR!/0"Vi19(B + >> Åͧ¡´´Ù µÃ§ÊèǹÅèÒ§¢Í§¨Í¨ÐÁÕ¢éͤÇÒÁÇèÒ "Back to top level" »ÃÒ¡¯¢Öé¹ - ,T`09Wh1M'(R!(B ,T`CRM0BYh1c9CP04Q1::90JX14(B (top level) ,TM0BYh1a0Ei1G(B ,T$S0JQh1'09Ui10(V1'd0Ah10AU1Wh1M07Uh1(PMM!(R!(B Recursive Editing Level ,Td04i1(B + äÁèÊÒÁÒöãªé ¤ÓÊÑè§ C-g à¾×èÍ·Õè¨ÐÍÍ¡¨Ò¡ Recursive Editing Level ä´é Help ==== - Emacs 0,TAU1$GRAJRARC607Uh10AU1;CPbB*09l1(B ,TAR!ARBKERBM0Bh1R'(B 0,T+Vh1'd0Ah1JRARC6M08T1:RBd04i1KA4c907Uh109Ui1(B -,Ta05h1`CR(PJRARC6`0CU1B!c0*i1(B ,T`0>Wh1M07Uh1(P`0CU1B90CYi1$GRAJRARC6`K0Eh1R09Ui1(B ,Td04i1b4B!RC!4(B C-h 0,T+Vh1'(P(B -0,T*h1GBc0Ki1`CRd04i10CQ1:0CYi10"i1M0AY1E`0>Th1A`05T1AKERBM0Bh1R'(B + Emacs ÁÕ¤ÇÒÁÊÒÁÒö·ÕèÁÕ»ÃÐ⪹ì ÁÒ¡ÁÒÂËÅÒÂÍÂèÒ§ «Öè§äÁèÊÒÁÒö͸ԺÒÂä´éËÁ´ã¹·Õè¹Õé +áµèàÃÒ¨ÐÊÒÁÒöàÃÕ¡ãªé à¾×èÍ·Õè¨ÐàÃÕ¹ÃÙé¤ÇÒÁÊÒÁÒöàËÅèÒ¹Õé ä´éâ´Â¡Òá´ C-h «Ö觨Р+ªèÇÂãËéàÃÒä´éÃѺÃÙé¢éÍÁÙÅà¾ÔèÁàµÔÁËÅÒÂÍÂèÒ§ - 0,TGT108U1c0*i10$W1Mc0Ki1!4(B C-h ,Ta0Ei1G5RA04i1GB05Q1G`0EW1M!(B (option) 0,TMU1!K09Vh1'05Q1G0MQ1!IC(B 0,T6i1Rd0Ah10CYi10Gh1R(P05i1M'c0*i1(B -0,T5Q1G`0EW1M!MPdC(B 0,T!g1c0Ki1!4(B C-h ? ,Ta0Ei1G(P0AU1$SM08T1:RB`0!Uh1BG0!Q1:05Q1G`0EW1M!;CR!/0"Vi19(B ,Td04i1KR!`;0EUh1B9c((P(B -,Td0Ah1`0CU1B!(B HELP ,TK0EQ1'(R!!4(B C-h 0,T!g1c0Ki1!4(B C-g ,T`0>Wh1MB!`0ET1!d04i1(B + ÇÔ¸Õãªé¤×ÍãËé¡´ C-h áÅéǵÒÁ´éǵÑÇàÅ×Í¡ (option) Íա˹Ö觵ÑÇÍÑ¡Éà ¶éÒäÁèÃÙéÇèҨеéͧãªé +µÑÇàÅ×Í¡ÍÐäà ¡çãËé¡´ C-h ? áÅéǨÐÁÕ¤Ó͸ԺÒÂà¡ÕèÂǡѺµÑÇàÅ×Í¡»ÃÒ¡¯¢Öé¹ ä´éËÒ¡à»ÅÕè¹㨨Р+äÁèàÃÕ¡ HELP ËÅѧ¨Ò¡¡´ C-h ¡çãËé¡´ C-g à¾×èÍ¡àÅÔ¡ä´é - ,T$S0JQh1'(B HELP 0,T>Wi190R907Uh10JX140MQ19K09Vh1'0!g10$W1M(B C-h c ,Ta0Ei1G5RA04i1GB!RC!4$S0JQh1':R'$S0JQh1'(B 0,T+Vh1'(Pc0Ki1$S(B -,TM08T1:RB0JQi19(B ,Tf(B ,T`0!Uh1BG0!Q1:$S0JQh1'09Qi19(B + ¤ÓÊÑè§ HELP ¾×é¹°Ò¹·ÕèÊØ´Íѹ˹Ö觡ç¤×Í C-h c áÅéǵÒÁ´éÇ¡Òá´¤ÓÊÑ觺ҧ¤ÓÊÑè§ «Ö觨ÐãËé¤Ó +͸ԺÒÂÊÑé¹ æ à¡ÕèÂǡѺ¤ÓÊÑ觹Ñé¹ - >> ,TEM'!4(B C-h c C-p 0,T4Y1(B 0,T+Vh1'(Pc0Ki10"i1M$GRA0Gh1R(B + >> Åͧ¡´ C-h c C-p ´Ù «Ö觨ÐãËé¢éͤÇÒÁÇèÒ "C-p runs the command previous-line" - ,T$S0JQh1'09Ui1(P0*h1GB0CWi1M0?Wi19$GRA(S(B ,T`0!Uh1BG0!Q1:$S0JQh1'07Uh1`$B0> ,TEM'!4(B C-h k C-p 0,T4Y1(B + >> Åͧ¡´ C-h k C-p ´Ù - 0,T!g1(P0AU10GT19b40Gl1`0>Th1Ac9(B Emacs 0,TMU1!K09Vh1'0MQ19(B ,T`0>Wh1MaJ4'CRBEP`0MU1B4"M'$S0JQh1'09Qi19(B ,T`0AWh1M0Mh1R9(:a0Ei1G(B -0,T!g1c0Ki1!4(B C-x 1 ,T`0>Th1AE:0GT19b40Gl1MM!(B + ¡ç¨ÐÁÕÇÔ¹â´Çìà¾ÔèÁã¹ Emacs Íա˹Öè§Íѹ à¾×èÍáÊ´§ÃÒÂÅÐàÍÕ´¢Í§¤ÓÊÑ觹Ñé¹ àÁ×èÍÍèÒ¹¨ºáÅéÇ +¡çãËé¡´ C-x 1 à¾ÔèÁźÇÔ¹â´ÇìÍÍ¡ - 0,T5Q1G`0EW1M!0MWh1907Uh10AU1;CPbB*09l1(B 0,TAU104Q1'09Ui1(B + µÑÇàÅ×Í¡Í×è¹·ÕèÁÕ»ÃÐ⪹ì Áմѧ¹Õé - C-h f ,Tc0Ki1c0Jh10*Wh1M"M'$S0JQh1'(B ,T`0>Wh1MaJ4'CRBEP`0MU1B4`0!Uh1BG0!Q1:$S0JQh1'09Qi19(B + C-h f ãËéãÊèª×èͧ͢¤ÓÊÑè§ à¾×èÍáÊ´§ÃÒÂÅÐàÍÕ´à¡ÕèÂǡѺ¤ÓÊÑ觹Ñé¹ - >> ,Tc0Ki1!4(B C-h f previous-line ,Ta0Ei1G5RA04i1GB(B ,T`0>Wh1MaJ4'CRBEP`0MU1B4`0!Uh1BG(B - 0,T!Q1:$S0JQh1'0+Vh1'`0CU1B!c0*i1d04i1(R!!RC!4(B C-p + >> ãËé¡´ C-h f previous-line áÅéǵÒÁ´éÇ à¾×èÍáÊ´§ÃÒÂÅÐàÍÕ´à¡ÕèÂÇ + ¡Ñº¤ÓÊÑ觫Öè§àÃÕ¡ãªéä´é¨Ò¡¡Òá´ C-p - C-h a ,Ta0Ei1G5RA04i1GB0$U10Bl1`0GT10Cl14(B (keyword) ,T`0>Wh1MaJ4'$S0JQh1'07X1!$S0JQh1'(B 0,T7Uh10AU10$U10Bl1`0GT10Cl14(B ,TCGAM0BYh1(B - ,T$S0JQh1'`K0Eh1R09Ui1JRARC6`0CU1B!c0*i1d04i1b4B!RC!4(B ESC x + C-h a áÅéǵÒÁ´éǤÕÂìàÇÔÃì´ (keyword) à¾×èÍáÊ´§¤ÓÊÑ觷ء¤ÓÊÑè§ ·ÕèÁÕ¤ÕÂìàÇÔÃì´ ÃÇÁÍÂÙè + ¤ÓÊÑè§àËÅèÒ¹ÕéÊÒÁÒöàÃÕ¡ãªéä´éâ´Â¡Òá´ ESC x - >> ,TEM'!4(B C-h a file ,Ta0Ei1G5RA04i1GB(B ,T`0>Wh1MaJ4'0*Wh1M$S0JQh1'07X1!$S0JQh1'07Uh10AU1$S0Gh1R(B - "file" ,TCGAM0BYh1(B 0,T+Vh1'(P0AU1(B find-file ,TaEP(B write-file 0,T7Uh1`0CU1B!c0*i1d04i1b4B!RC!4(B - C-x C-f ,TaEP(B C-x C-w ,TCGAM0BYh104i1GB(B + >> Åͧ¡´ C-h a file áÅéǵÒÁ´éÇ à¾×èÍáÊ´§ª×èͤÓÊÑ觷ء¤ÓÊÑ觷ÕèÁÕ¤ÓÇèÒ + "file" ÃÇÁÍÂÙè «Ö觨ÐÁÕ find-file áÅÐ write-file ·ÕèàÃÕ¡ãªéä´éâ´Â¡Òá´ + C-x C-f áÅÐ C-x C-w ÃÇÁÍÂÙè´éÇ -0,T7i1RB0JX1409Ui1(B +·éÒÂÊØ´¹Õé ====== -,TM0Bh1R0EW1A(B: ,T$S0JQh1'JSK0CQ1:!RC`0ET1!(B Emacs 0,T$W1M(B C-x C-c +ÍÂèÒÅ×Á: ¤ÓÊÑè§ÊÓËÃѺ¡ÒÃàÅÔ¡ Emacs ¤×Í C-x C-c - ,T`M!JRC)0:Q1:`0:Wi1M'05i1909Ui1(B 0,T5Qi1'c(`0"U1B90"Vi19JSK0CQ1:0RP(B 0,T6i1RKR!0AU10(X14dK907Uh1d0Ah1(B -,T`0"i1Rc((B 0,T!g1M0Bh1R0AQ1Ga05h1b7I05Q1G`M'(B ,Ta05h1"Mc0Ki1bB9$GRA0RP(B -,TM0Bh1R'0BTh1'0!Q1:(B EMACS ,T`09Wh1M'(R!`0;g19b;Ca!CA07Uh10AU1$GRAJRARC6KER!KERBAR!(B 0,TMQ1907Uh1(0CT1'a0Ei1G(B EMACS -,T7Sd04i107X1!0JTh1'07X1!M0Bh1R'(B + ËÅѧ¨Ò¡ãªé EMACS ´ÙÊÑ¡ÊͧÊÒÁÇѹ ¡ç¤§¨ÐªÔ¹ä»àͧ 㹵͹áá ÍÒ¨¨ÐÁըش·ÕèÃÙéÊÖ¡ÊѺʹáÅÐ +äÁèà¢éÒã¨ÍÂÙèºéÒ§ áµèÊÔ觹ÕéÂèÍÁà¡Ô´¢Öé¹àÊÁÍ àÇÅÒáµèàÃÔèÁãªé Editor ãËÁèã´ æ ¡çµÒÁ â´Â੾ÒÐ +ÍÂèÒ§ÂÔ觡Ѻ EMACS à¹×èͧ¨Ò¡à»ç¹â»Ãá¡ÃÁ·ÕèÁÕ¤ÇÒÁÊÒÁÒöËÅÒ¡ËÅÒÂÁÒ¡ Íѹ·Õè¨ÃÔ§áÅéÇ EMACS +·Óä´é·Ø¡ÊÔ觷ءÍÂèÒ§ -,T"M"M:0$X13(B +¢Í¢Íº¤Ø³ ======= - ,T`M!JRC)0:Q1:09Ui1(B 0,T4Q14a;E'AR(R!(B "MicroEMACS (kemacs) ,T@RIR0-Uh10;Xh19(B ,T`0:Wi1M'05i19(B" 0,T+Vh1'd04i1AR(R!(B -JUNET ,T`0>Wh1Mc0Ki1c0*i1`0;g19(B Tutorial ,TJSK0CQ1:(B GNUEmacs (Nemacs) + àÍ¡ÊÒéºÑº¹Õé ´Ñ´á»Å§ÁÒ¨Ò¡ "MicroEMACS (kemacs) ÀÒÉÒ­Õè»Øè¹ àº×éͧµé¹" «Öè§ä´éÁÒ¨Ò¡ +JUNET à¾×èÍãËéãªéà»ç¹ Tutorial ÊÓËÃѺ GNUEmacs (Nemacs) - ,T`M!JRC09Ui1(B 0,T4Q14a;E'AR(R!(B "JOVE Tutorial" (19 ,TA!CR$A(B 86) ,T"M'(B Jonathan Payne - 0,T+Vh1'04Q14a;E'AR(R!`M!JRC"M'(B Steve Zimmerman ,Ta0Kh1'(B CCA-UNIX 0,T+Vh1'04Q14a;E'(B (0,TMU1!07U1(B) ,TAR(B - ,T(R!`M!JRC(B "Teach-Emacs" ,T)0:Q1:`0:Wi1M'05i19(B (31 0,T5X1ER$A(B 85) ,T"M'(B MIT + àÍ¡ÊÒùÕé ´Ñ´á»Å§ÁÒ¨Ò¡ "JOVE Tutorial" (19 Á¡ÃÒ¤Á 86) ¢Í§ Jonathan Payne + «Ö觴Ѵá»Å§ÁÒ¨Ò¡àÍ¡ÊÒâͧ Steve Zimmerman áËè§ CCA-UNIX «Ö觴Ѵá»Å§ (ÍÕ¡·Õ) ÁÒ + ¨Ò¡àÍ¡ÊÒà "Teach-Emacs" ©ºÑºàº×éͧµé¹ (31 µØÅÒ¤Á 85) ¢Í§ MIT Update - February 1986 by Dana Hoggatt. @@ -671,20 +671,20 @@ JUNET ,T`0>Wh1Mc0Ki1c0*i1`0;g19(B Tutorial ,TJSK0CQ1:(B GNUEmacs ( Update/Translate - July 1987 by SANETO Takanori -,T"M"M:0$X13`0;g190>T1`HI(B +¢Í¢Íº¤Ø³à»ç¹¾ÔàÈÉ ============== - 0,T$X13(B SANETO Takanori (,T+R`9b5P(B ,T7R!Rb90CT1(B) 0,TER4(B 0,T"i1M0AY1E`07g1((B ,TaEP0MWh19(B ,Tf(B ,Td0Gi1a05h1`0>U1B'0" + distribution mule + priority high + category "mule" + dump nil + description "Dictionary support" + filename "lookup-1.03-pkg.tar.gz" + md5sum "d99759b042f8bf401d487e4ea140450d" + size 212861 + provides (lookup) + requires (cookie lookup) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(os-utils + (standards-version 1.1 + version "1.18" + author-version "21.1" + date "1999-07-20" + build-date "1999-07-30" + maintainer "XEmacs Development Team " + distribution xemacs + priority medium + category "os" + dump nil + description "Miscellaneous O/S utilities." + filename "os-utils-1.18-pkg.tar.gz" + md5sum "bafbe5e2628fc678daad46b07ba7fef6" + size 179680 + provides (archive-mode background crypt crypt++ inf-lisp jka-compr lpr mchat tar-mode telnet terminal uncompress) + requires (xemacs-base) + type single +)) +)) +;;;@@@ +(package-get-update-base-entry (quote (ediff - (standards-version 1.0 - version "1.19" + (standards-version 1.1 + version "1.22" author-version "2.72" - date "1999-04-06" - build-date "1999-05-13" + date "1999-05-27" + build-date "1999-07-30" maintainer "Michael Kifer " - distribution stable + distribution xemacs priority medium category "prog" dump nil description "Interface over GNU patch." - filename "ediff-1.19-pkg.tar.gz" - md5sum "d6e0edc88c5d09279df71ce9aff41b25" - size 281804 + filename "ediff-1.22-pkg.tar.gz" + md5sum "a9ece02fc03ac74ee4501845dec88710" + size 282084 provides (ediff) requires (pcl-cvs elib dired xemacs-base) type regular @@ -68,20 +115,20 @@ ;;;@@@ (package-get-update-base-entry (quote (skk - (standards-version 1.0 - version "1.12" + (standards-version 1.1 + version "1.14" author-version "10.38" - date "1998-10-01" - build-date "1999-02-02" + date "1999-05-18" + build-date "1999-07-30" maintainer "SL Baur " distribution mule priority medium category "mule" - dump t + dump nil description "Japanese Language Input Method." - filename "skk-1.12-pkg.tar.gz" - md5sum "f690c518a0da65c4dc9fe2a867026c26" - size 1514106 + filename "skk-1.14-pkg.tar.gz" + md5sum "b8c89832f314570cb251147ced107c49" + size 1514095 provides (skk skk-tut) requires (viper mule-base elib xemacs-base) type regular @@ -90,20 +137,20 @@ ;;;@@@ (package-get-update-base-entry (quote (egg-its - (standards-version 1.0 - version "1.16" - author-version "21.0b65" - date "1999-03-05" - build-date "1999-03-11" + (standards-version 1.1 + version "1.19" + author-version "21.1" + date "1999-07-26" + build-date "1999-07-30" maintainer "XEmacs Development Team " distribution mule priority high category "mule" - dump t + dump nil description "Wnn (4.2 and 6) support. SJ3 support." - filename "egg-its-1.16-pkg.tar.gz" - md5sum "5a3b23dbe609feeabfc108ae142715c3" - size 257562 + filename "egg-its-1.19-pkg.tar.gz" + md5sum "121037363bae6925fd4933f861cbdabb" + size 261537 provides (egg-cnpinyin egg-cnzhuyin egg-cwnn-leim egg-jisx0201 egg-jsymbol egg-kwnn-leim egg-leim egg-sj3-client egg-sj3-leim egg-sj3 egg-wnn egg) requires (leim mule-base fsf-compat xemacs-base) type regular @@ -112,20 +159,20 @@ ;;;@@@ (package-get-update-base-entry (quote (edict - (standards-version 1.0 - version "1.07" + (standards-version 1.1 + version "1.08" author-version "0.9.8" date "1998-07-23" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "Stephen J. Turnbull " distribution mule priority high category "mule" dump nil description "Lisp Interface to EDICT, Kanji Dictionary" - filename "edict-1.07-pkg.tar.gz" - md5sum "493ef0ec6f2760e5c94423c23c9d124e" - size 71661 + filename "edict-1.08-pkg.tar.gz" + md5sum "f339e93a2cb02d9224e4bf9f313b0b62" + size 71621 provides (dui-registry dui edict-edit edict-english edict-japanese edict-morphology edict-test edict ts-mode) requires (mule-base xemacs-base) type regular @@ -134,20 +181,20 @@ ;;;@@@ (package-get-update-base-entry (quote (leim - (standards-version 1.0 - version "1.12" - author-version "21.0b62" - date "1998-07-23" - build-date "1999-02-02" + (standards-version 1.1 + version "1.13" + author-version "21.1" + date "1999-06-29" + build-date "1999-07-30" maintainer "XEmacs Development Team " distribution mule priority medium category "mule" dump nil description "Quail. All non-English and non-Japanese language support." - filename "leim-1.12-pkg.tar.gz" - md5sum "07cc5be34a0d9d312b883b430349a882" - size 1671757 + filename "leim-1.13-pkg.tar.gz" + md5sum "9cd059afefa3aff94fd1802c8db6c39a" + size 1702922 provides () requires (mule-base fsf-compat xemacs-base) type regular @@ -156,20 +203,20 @@ ;;;@@@ (package-get-update-base-entry (quote (locale - (standards-version 1.0 - version "1.13" - author-version "21.0" + (standards-version 1.1 + version "1.14" + author-version "21.1" date "1999-05-11" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " distribution mule priority high category "mule" dump nil description "Localized menubars and localized splash screens." - filename "locale-1.13-pkg.tar.gz" - md5sum "4735b4005dfce55cf3581885add18836" - size 33964 + filename "locale-1.14-pkg.tar.gz" + md5sum "5a5c7e878596a1009e97a8c4f491826c" + size 35744 provides () requires (mule-base) type regular @@ -178,42 +225,42 @@ ;;;@@@ (package-get-update-base-entry (quote (mule-base - (standards-version 1.0 - version "1.29" - author-version "21.0" - date "1999-05-13" - build-date "1999-05-13" + (standards-version 1.1 + version "1.32" + author-version "21.1" + date "1999-06-30" + build-date "1999-07-30" maintainer "SL Baur " distribution mule priority high category "mule" - dump t + dump nil description "Basic Mule support, required for building with Mule." - filename "mule-base-1.29-pkg.tar.gz" - md5sum "9b713b6f95c4016dc29d7b584c78f7d1" - size 420205 + filename "mule-base-1.32-pkg.tar.gz" + md5sum "40950af24540e6cfc6875a9ddc7bab5d" + size 453902 provides (canna-leim canna char-table china-util cyril-util isearch-ext japan-util ccl can-n-egg mule-help) - requires (fsf-compat xemacs-base) + requires (fsf-compat xemacs-base apel) type regular )) )) ;;;@@@ (package-get-update-base-entry (quote (strokes - (standards-version 1.0 - version "1.04" - author-version "21.0b62" + (standards-version 1.1 + version "1.05" + author-version "21.1" date "1998-01-25" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "oa" dump nil description "Mouse enhancement utility." - filename "strokes-1.04-pkg.tar.gz" - md5sum "9a83020e888d140da2360dcac83c7c86" - size 43481 + filename "strokes-1.05-pkg.tar.gz" + md5sum "42b991c28dc393a78f9da792f15e53d3" + size 43480 provides (strokes) requires (text-modes edit-utils mail-lib xemacs-base) type regular @@ -222,20 +269,20 @@ ;;;@@@ (package-get-update-base-entry (quote (time - (standards-version 1.0 - version "1.07" + (standards-version 1.1 + version "1.08" author-version "1.17" date "1998-04-24" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "oa" dump nil description "Display time & date on the modeline." - filename "time-1.07-pkg.tar.gz" - md5sum "4cc97d84357412fb7d737a88b6f05cbe" - size 20006 + filename "time-1.08-pkg.tar.gz" + md5sum "c67d7143de5694ec4a7e17023ceab902" + size 19994 provides (time) requires (xemacs-base) type regular @@ -244,20 +291,20 @@ ;;;@@@ (package-get-update-base-entry (quote (text-modes - (standards-version 1.0 - version "1.19" - author-version "21.0" - date "1999-04-22" - build-date "1999-05-13" + (standards-version 1.1 + version "1.21" + author-version "21.1" + date "1999-07-06" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority high category "oa" dump nil description "Miscellaneous support for editing text files." - filename "text-modes-1.19-pkg.tar.gz" - md5sum "9031e37912506b87a9a4fc4aa8107c13" - size 207865 + filename "text-modes-1.21-pkg.tar.gz" + md5sum "d9d9505dfbe52854b3337eddfce093d1" + size 207873 provides (autoinsert crontab-edit filladapt fold-isearch folding image-mode iso-acc iso-ascii iso-cvt iso-insert iso-swed swedish tabify whitespace-mode winmgr-mode xpm-mode xrdb-mode) requires (ispell fsf-compat xemacs-base) type regular @@ -266,20 +313,20 @@ ;;;@@@ (package-get-update-base-entry (quote (slider - (standards-version 1.0 - version "1.09" + (standards-version 1.1 + version "1.10" author-version "0.3x1" date "1998-08-13" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution experimental + distribution xemacs priority low category "oa" dump nil description "User interface tool." - filename "slider-1.09-pkg.tar.gz" - md5sum "b211a950179fee88712fc5c38e395069" - size 12004 + filename "slider-1.10-pkg.tar.gz" + md5sum "a67e165592a2921ff0978a69befa0d6d" + size 12000 provides (slider color-selector) requires () type regular @@ -288,20 +335,20 @@ ;;;@@@ (package-get-update-base-entry (quote (sgml - (standards-version 1.0 - version "1.04" - author-version "21.0b62" + (standards-version 1.1 + version "1.05" + author-version "21.1" date "1998-01-25" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "oa" dump nil description "SGML/Linuxdoc-SGML editing." - filename "sgml-1.04-pkg.tar.gz" - md5sum "2b762a0fbdda616916624dc2fa53e647" - size 26938 + filename "sgml-1.05-pkg.tar.gz" + md5sum "ead5d1671dfebf394be76166c786b0c2" + size 26937 provides (sgml linuxdoc-sgml) requires (xemacs-base) type regular @@ -310,20 +357,20 @@ ;;;@@@ (package-get-update-base-entry (quote (psgml - (standards-version 1.0 - version "1.12" + (standards-version 1.1 + version "1.14" author-version "1.01" - date "1999-03-05" - build-date "1999-03-05" + date "1999-06-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "oa" dump nil description "Validated HTML/SGML editing." - filename "psgml-1.12-pkg.tar.gz" - md5sum "7303b3a604659b64f24b0847b3a686d5" - size 425458 + filename "psgml-1.14-pkg.tar.gz" + md5sum "44102484c3e5588bab21005cec1a46e1" + size 425227 provides (psgml sgml) requires (edit-utils) type regular @@ -332,20 +379,20 @@ ;;;@@@ (package-get-update-base-entry (quote (pc - (standards-version 1.0 - version "1.15" - author-version "21.0" + (standards-version 1.1 + version "1.16" + author-version "21.1" date "1999-04-13" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "oa" dump nil description "PC style interface emulation." - filename "pc-1.15-pkg.tar.gz" - md5sum "99ad6b816d02360a4a9ccb5425974818" - size 16315 + filename "pc-1.16-pkg.tar.gz" + md5sum "d721157770274b9fee0b16933764c636" + size 16324 provides (delbs fusion pc-select pending-del s-region) requires (xemacs-base) type regular @@ -354,20 +401,20 @@ ;;;@@@ (package-get-update-base-entry (quote (ispell - (standards-version 1.0 - version "1.15" + (standards-version 1.1 + version "1.16" author-version "3.2" - date "1999-05-13" - build-date "1999-05-13" + date "1999-07-22" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "oa" dump nil description "Spell-checking with GNU ispell." - filename "ispell-1.15-pkg.tar.gz" - md5sum "23632bd9fc2f7e4c0303865c35c5f4a5" - size 68118 + filename "ispell-1.16-pkg.tar.gz" + md5sum "a3140984afc8a9d5aa0d0116625b2d07" + size 68157 provides (ispell) requires () type regular @@ -376,20 +423,20 @@ ;;;@@@ (package-get-update-base-entry (quote (frame-icon - (standards-version 1.0 - version "1.06" - author-version "21.0b62" + (standards-version 1.1 + version "1.07" + author-version "21.1" date "1998-07-14" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "oa" dump nil description "Set up mode-specific icons for each frame under XEmacs" - filename "frame-icon-1.06-pkg.tar.gz" - md5sum "bc4f6e838a4fa12d7f3b8b1996b3a9ac" - size 33483 + filename "frame-icon-1.07-pkg.tar.gz" + md5sum "320909b8d8caa9754c08963878acbb8b" + size 33434 provides (forms forms-mode) requires () type regular @@ -398,20 +445,20 @@ ;;;@@@ (package-get-update-base-entry (quote (forms - (standards-version 1.0 - version "1.10" + (standards-version 1.1 + version "1.11" author-version "2.37" date "1999-05-11" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "oa" dump nil description "Forms editing support (obsolete, use Widget instead)." - filename "forms-1.10-pkg.tar.gz" - md5sum "a8ad3a114859c0981a1f884072bf4b1b" - size 48264 + filename "forms-1.11-pkg.tar.gz" + md5sum "36604485f4a1031d28968fe2c8534a6d" + size 48263 provides (forms forms-mode) requires () type regular @@ -420,20 +467,20 @@ ;;;@@@ (package-get-update-base-entry (quote (calendar - (standards-version 1.0 - version "1.10" - author-version "21.0b63" - date "1999-02-08" - build-date "1999-03-01" + (standards-version 1.1 + version "1.12" + author-version "21.1" + date "1999-06-24" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "oa" dump nil description "Calendar and diary support." - filename "calendar-1.10-pkg.tar.gz" - md5sum "09e93d157d2853a35e735a6a04f54055" - size 248580 + filename "calendar-1.12-pkg.tar.gz" + md5sum "d6ad2b3a3477d04ca3b669a67eecc8bc" + size 250669 provides (appt cal-dst cal-french cal-mayan cal-x cal-xemacs calendar diary-ins diary-lib holidays lunar solar) requires (xemacs-base) type regular @@ -442,20 +489,20 @@ ;;;@@@ (package-get-update-base-entry (quote (calc - (standards-version 1.0 - version "1.10" + (standards-version 1.1 + version "1.11" author-version "2.02fX3" date "1998-07-25" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "oa" dump nil description "Emacs calculator" - filename "calc-1.10-pkg.tar.gz" - md5sum "148c82bf6f213d6e2fb234e1f21e4699" - size 1616821 + filename "calc-1.11-pkg.tar.gz" + md5sum "7a0cce9d75b5c70f02db67f18eb6a97d" + size 1616700 provides (calc) requires () type regular @@ -464,20 +511,20 @@ ;;;@@@ (package-get-update-base-entry (quote (speedbar - (standards-version 1.0 - version "1.12" + (standards-version 1.1 + version "1.13" author-version "0.6.2x" - date "1999-03-05" - build-date "1999-03-12" + date "1999-07-15" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "oa" dump nil description "Provides a seperate frame with convenient references." - filename "speedbar-1.12-pkg.tar.gz" - md5sum "3b578d06426921193ac2b8337a669bfa" - size 64892 + filename "speedbar-1.13-pkg.tar.gz" + md5sum "0a2352aa6866888fc8ecdc7ec8d86516" + size 64955 provides (speedbar) requires (xemacs-base) type regular @@ -486,20 +533,20 @@ ;;;@@@ (package-get-update-base-entry (quote (edit-utils - (standards-version 1.0 - version "1.39" - author-version "21.0" - date "1999-05-11" - build-date "1999-05-13" + (standards-version 1.1 + version "1.41" + author-version "21.1" + date "1999-07-07" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority high category "oa" dump nil description "Miscellaneous editor extensions, you probably need this." - filename "edit-utils-1.39-pkg.tar.gz" - md5sum "f129277008f56e86ec8630a299df7408" - size 577970 + filename "edit-utils-1.41-pkg.tar.gz" + md5sum "a3d5116811348bde6d56976ce94a991a" + size 579673 provides (abbrevlist atomic-extents avoid backup-dir balloon-help big-menubar blink-cursor blink-paren bookmark compare-w completion dabbrev desktop detached-minibuf edit-toolbar fast-lock file-part floating-toolbar flow-ctrl foldout func-menu hippie-exp icomplete id-select info-look iswitchb lazy-lock lazy-shot live-icon man mic-paren paren popper mode-motion+ outl-mouse page-ext blink-paren paren permanent-buffers recent-files redo reportmail rsz-minibuf saveconfsavehist saveplace scroll-in-place tempo toolbar-utils tree-menu uniquify where-was-i-db) requires (xemacs-base) type single @@ -508,20 +555,20 @@ ;;;@@@ (package-get-update-base-entry (quote (view-process - (standards-version 1.0 - version "1.06" + (standards-version 1.1 + version "1.07" author-version "2.4" date "1998-01-24" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "os" dump nil description "A Unix process browsing tool." - filename "view-process-1.06-pkg.tar.gz" - md5sum "61c4c7175f23cb4cfd314e10303b238c" - size 59958 + filename "view-process-1.07-pkg.tar.gz" + md5sum "47a82bb6569dd9d9bed03a57c9391538" + size 59953 provides (view-process-mode) requires (xemacs-base) type regular @@ -552,20 +599,20 @@ ;;;@@@ (package-get-update-base-entry (quote (ilisp - (standards-version 1.0 - version "1.07" + (standards-version 1.1 + version "1.08" author-version "5.8" date "1998-01-24" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "os" dump nil description "Front-end for Inferior Lisp." - filename "ilisp-1.07-pkg.tar.gz" - md5sum "38cb2d94926e310a6e71ec1be854d636" - size 262173 + filename "ilisp-1.08-pkg.tar.gz" + md5sum "12041533cb292d9d58a55278c8882c70" + size 262171 provides (ilisp completer) requires (xemacs-base) type regular @@ -574,20 +621,20 @@ ;;;@@@ (package-get-update-base-entry (quote (igrep - (standards-version 1.0 - version "1.05" + (standards-version 1.1 + version "1.06" author-version "2.83" date "1998-08-11" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "os" dump nil description "Enhanced front-end for Grep." - filename "igrep-1.05-pkg.tar.gz" - md5sum "e70d4973a2af4dbd6222f5943bfa1a50" - size 14935 + filename "igrep-1.06-pkg.tar.gz" + md5sum "9a61dc2c81e909993e14254f30df3ee7" + size 14927 provides (igrep) requires (dired xemacs-base) type regular @@ -596,20 +643,20 @@ ;;;@@@ (package-get-update-base-entry (quote (eterm - (standards-version 1.0 - version "1.08" - author-version "21.0b62" - date "1998-06-28" - build-date "1999-02-02" + (standards-version 1.1 + version "1.09" + author-version "21.1" + date "1999-07-07" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "os" dump nil description "Terminal emulation." - filename "eterm-1.08-pkg.tar.gz" - md5sum "77e56529b5de6a0a0dd46c5d1634eebf" - size 108905 + filename "eterm-1.09-pkg.tar.gz" + md5sum "9cdab77e28dc87a79db4c503c961b37a" + size 109066 provides (eterm) requires (xemacs-base) type regular @@ -618,20 +665,20 @@ ;;;@@@ (package-get-update-base-entry (quote (viper - (standards-version 1.0 - version "1.14" + (standards-version 1.1 + version "1.17" author-version "3.061" - date "1999-03-03" - build-date "1999-03-05" + date "1999-05-27" + build-date "1999-07-30" maintainer "Michael Kifer " - distribution stable + distribution xemacs priority low category "wp" dump nil description "VI emulation support." - filename "viper-1.14-pkg.tar.gz" - md5sum "0e118822906e195dc352f28c8efc01e0" - size 317899 + filename "viper-1.17-pkg.tar.gz" + md5sum "89285f1297d73552d43602cf1288aefd" + size 317943 provides (viper) requires (xemacs-base) type regular @@ -640,20 +687,20 @@ ;;;@@@ (package-get-update-base-entry (quote (tpu - (standards-version 1.0 - version "1.08" + (standards-version 1.1 + version "1.09" author-version "4.2X" date "1998-07-23" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "Kevin Oberman " - distribution normal + distribution xemacs priority medium category "wp" dump nil description "DEC EDIT/TPU support." - filename "tpu-1.08-pkg.tar.gz" - md5sum "2306ac55a0a1ed23da02a85c91f881bb" - size 58804 + filename "tpu-1.09-pkg.tar.gz" + md5sum "9a467bd306599d97f0f5be0266850d79" + size 58814 provides (tpu) requires () type regular @@ -662,20 +709,20 @@ ;;;@@@ (package-get-update-base-entry (quote (textools - (standards-version 1.0 - version "1.08" - author-version "21.0b62" + (standards-version 1.1 + version "1.09" + author-version "21.1" date "1998-04-29" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stabl + distribution xemacs priority medium category "wp" dump nil description "Miscellaneous TeX support." - filename "textools-1.08-pkg.tar.gz" - md5sum "22dd0e16433a96547fde5757c6793388" - size 79176 + filename "textools-1.09-pkg.tar.gz" + md5sum "d0e16392dfdcd9ec8eab4ebc8da9948e" + size 79187 provides (bib-mode bibtex refer-to-bibtex) requires (xemacs-base) type single @@ -684,20 +731,20 @@ ;;;@@@ (package-get-update-base-entry (quote (texinfo - (standards-version 1.0 - version "1.14" - author-version "21.0b62" + (standards-version 1.1 + version "1.15" + author-version "21.1" date "1998-07-20" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority high category "wp" dump nil description "XEmacs TeXinfo support." - filename "texinfo-1.14-pkg.tar.gz" - md5sum "b1b6a7f4c1ff10be38d3e27d1213f1c8" - size 127830 + filename "texinfo-1.15-pkg.tar.gz" + md5sum "3c0ba97404953b4383d06f0a88a3a6cd" + size 127873 provides (makeinfo tex-mode texinfmt texinfo texnfo-tex texnfo-upd) requires (xemacs-base) type regular @@ -706,20 +753,20 @@ ;;;@@@ (package-get-update-base-entry (quote (reftex - (standards-version 1.0 - version "1.13" + (standards-version 1.1 + version "1.14" author-version "3.43" date "1999-04-06" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "Carsten Dominik " - distribution stable + distribution xemacs priority medium category "wp" dump nil description "Emacs support for LaTeX cross-references, citations.." - filename "reftex-1.13-pkg.tar.gz" - md5sum "5e9196a6fdda2587bec1aff19d6322ec" - size 216008 + filename "reftex-1.14-pkg.tar.gz" + md5sum "e56e631f54e895ed95377be6e882bed5" + size 215968 provides (reftex) requires (fsf-compat xemacs-base) type regular @@ -728,20 +775,20 @@ ;;;@@@ (package-get-update-base-entry (quote (edt - (standards-version 1.0 - version "1.07" - author-version "21.0b62" + (standards-version 1.1 + version "1.08" + author-version "21.1" date "1998-04-07" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "wp" dump nil description "DEC EDIT/EDT emulation." - filename "edt-1.07-pkg.tar.gz" - md5sum "6c48ceb9686c50058be3938288940bc5" - size 46131 + filename "edt-1.08-pkg.tar.gz" + md5sum "bade43d3b5c90a4b9c969a1f85ef606e" + size 46128 provides (edt) requires (xemacs-base) type regular @@ -750,20 +797,20 @@ ;;;@@@ (package-get-update-base-entry (quote (crisp - (standards-version 1.0 - version "1.09" + (standards-version 1.1 + version "1.10" author-version "1.34" date "1998-08-18" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "wp" dump nil description "Crisp/Brief emulation." - filename "crisp-1.09-pkg.tar.gz" - md5sum "faa9b6f2868a7e5b212d1094039cf526" - size 10067 + filename "crisp-1.10-pkg.tar.gz" + md5sum "82fcef8e2a2c6e0d40c68f6142c6a780" + size 10065 provides (crisp scroll-lock) requires () type regular @@ -772,20 +819,20 @@ ;;;@@@ (package-get-update-base-entry (quote (auctex - (standards-version 1.0 - version "1.16" + (standards-version 1.1 + version "1.17" author-version "9.7p" date "1998-09-30" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "wp" dump nil description "Basic TeX/LaTeX support." - filename "auctex-1.16-pkg.tar.gz" - md5sum "56e3454a1162c25db93fc84bdab61d0f" - size 365136 + filename "auctex-1.17-pkg.tar.gz" + md5sum "be1dc85bba341dba02ec13ce06bf9609" + size 365053 provides (auc-old bib-cite font-latex latex multi-prompt tex-buf tex-info tex-jp tex-site tex) requires (xemacs-base) type regular @@ -794,20 +841,20 @@ ;;;@@@ (package-get-update-base-entry (quote (vhdl - (standards-version 1.0 - version "1.07" + (standards-version 1.1 + version "1.08" author-version "2.74" date "1998-01-24" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "prog" dump nil description "Support for VHDL." - filename "vhdl-1.07-pkg.tar.gz" - md5sum "0eae8d15cff7d7b6dd7e1d00029c0e3a" - size 65961 + filename "vhdl-1.08-pkg.tar.gz" + md5sum "8d3422f8b6ba5584dbf89d3ef6759594" + size 65948 provides (vhdl-mode) requires () type regular @@ -816,20 +863,20 @@ ;;;@@@ (package-get-update-base-entry (quote (vc - (standards-version 1.0 - version "1.17" - author-version "21.0b63" - date "1999-02-25" - build-date "1999-03-01" + (standards-version 1.1 + version "1.19" + author-version "21.1" + date "1999-06-07" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "prog" dump nil description "Version Control for Free systems." - filename "vc-1.17-pkg.tar.gz" - md5sum "4e80458c0e6d4cf2805ed6a46135e1c6" - size 84499 + filename "vc-1.19-pkg.tar.gz" + md5sum "2794428c1167de3f1db8e9928041b065" + size 84689 provides (vc) requires (dired xemacs-base) type regular @@ -838,20 +885,20 @@ ;;;@@@ (package-get-update-base-entry (quote (vc-cc - (standards-version 1.0 - version "1.11" - author-version "21.0b62" + (standards-version 1.1 + version "1.12" + author-version "21.1" date "1998-12-09" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "prog" dump nil description "Version Control for ClearCase (UnFree) systems." - filename "vc-cc-1.11-pkg.tar.gz" - md5sum "561ab60400e3fa6bfef8ad8567a3702d" - size 96544 + filename "vc-cc-1.12-pkg.tar.gz" + md5sum "db978159bf5d1d194782b79961d003d1" + size 96520 provides (vc) requires (dired xemacs-base) type regular @@ -860,20 +907,20 @@ ;;;@@@ (package-get-update-base-entry (quote (sh-script - (standards-version 1.0 - version "1.08" + (standards-version 1.1 + version "1.10" author-version "2.0e" - date "1998-05-12" - build-date "1999-02-02" + date "1999-05-31" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "prog" dump nil description "Support for editing shell scripts." - filename "sh-script-1.08-pkg.tar.gz" - md5sum "f2f584ab19761b1db14160d9d3cbc6f3" - size 33900 + filename "sh-script-1.10-pkg.tar.gz" + md5sum "003e39a5e97acce6f9b751a1fec5e398" + size 33987 provides (sh-script executable) requires (xemacs-base) type regular @@ -882,20 +929,20 @@ ;;;@@@ (package-get-update-base-entry (quote (scheme - (standards-version 1.0 - version "1.07" - author-version "21.0b62" - date "1998-09-08" - build-date "1999-02-02" + (standards-version 1.1 + version "1.09" + author-version "21.1" + date "1999-06-15" + build-date "1999-07-30" maintainer "Karl M. Hegbloom " - distribution contrib + distribution xemacs priority low category "prog" dump nil description "Front-end support for Inferior Scheme." - filename "scheme-1.07-pkg.tar.gz" - md5sum "998d46aee749b32493cae61cac3888d2" - size 36292 + filename "scheme-1.09-pkg.tar.gz" + md5sum "a4542795594e46af3b803d44ed3d7c8d" + size 36505 provides (scheme xscheme cmuscheme cmuscheme48) requires (xemacs-base) type regular @@ -904,20 +951,20 @@ ;;;@@@ (package-get-update-base-entry (quote (prog-modes - (standards-version 1.0 - version "1.19" - author-version "21.0" - date "1999-05-12" - build-date "1999-05-13" + (standards-version 1.1 + version "1.21" + author-version "21.1" + date "1999-07-15" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "prog" dump nil description "Support for various programming languages." - filename "prog-modes-1.19-pkg.tar.gz" - md5sum "11da842b17ee65837bc56c13d76f49af" - size 596965 + filename "prog-modes-1.21-pkg.tar.gz" + md5sum "e83aff3ead4ab018d07b9b22e9ba301d" + size 601321 provides (autoconf-mode cperl-mode eiffel3 f90 fortran ksh-mode m4-mode makefile perl-mode postscript python-mode rexx-mode simula-mode tcl teco verilog-mod) requires (mail-lib xemacs-devel xemacs-base) type regular @@ -926,20 +973,20 @@ ;;;@@@ (package-get-update-base-entry (quote (emerge - (standards-version 1.0 - version "1.05" - author-version "21.0b62" + (standards-version 1.1 + version "1.06" + author-version "21.1" date "1998-04-07" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "prog" dump nil description "Another interface over GNU patch." - filename "emerge-1.05-pkg.tar.gz" - md5sum "1f4d70d7f4e73290837b2dbd2189be99" - size 61009 + filename "emerge-1.06-pkg.tar.gz" + md5sum "1f4c3003975e8c540742c37cd398dd4b" + size 61012 provides (emerge) requires () type regular @@ -948,20 +995,20 @@ ;;;@@@ (package-get-update-base-entry (quote (debug - (standards-version 1.0 - version "1.09" - author-version "21.0" + (standards-version 1.1 + version "1.10" + author-version "21.1" date "1999-05-12" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "prog" dump nil description "GUD, gdb, dbx debugging support." - filename "debug-1.09-pkg.tar.gz" - md5sum "24442a34f07cdd97ed52aa2c88c3de0b" - size 103161 + filename "debug-1.10-pkg.tar.gz" + md5sum "81fab3bf4b08036d122f1e6abb7ffc74" + size 103093 provides (dbx gdb-highlight gdb gdbsrc gud history) requires (xemacs-base) type regular @@ -970,20 +1017,20 @@ ;;;@@@ (package-get-update-base-entry (quote (c-support - (standards-version 1.0 - version "1.12" - author-version "21.0b64" + (standards-version 1.1 + version "1.13" + author-version "21.1" date "1999-03-02" - build-date "1999-03-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "prog" dump nil description "Basic single-file add-ons for editing C code." - filename "c-support-1.12-pkg.tar.gz" - md5sum "a793cd83bb595d34771332a46d2abfd4" - size 69913 + filename "c-support-1.13-pkg.tar.gz" + md5sum "d4568a0fd8c0ea31917ad37e190e443b" + size 69931 provides (c-comment-edit cmacexp ctypes hideif hideshow) requires (cc-mode xemacs-base) type regular @@ -992,20 +1039,20 @@ ;;;@@@ (package-get-update-base-entry (quote (ada - (standards-version 1.0 - version "1.06" + (standards-version 1.1 + version "1.07" author-version "2.27" date "1998-01-24" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "prog" dump nil description "Ada language support." - filename "ada-1.06-pkg.tar.gz" - md5sum "0f3d2dc2ff33d40092b324a7a5a363d6" - size 54364 + filename "ada-1.07-pkg.tar.gz" + md5sum "f12fe7c6ac8ed3bcfeb761ffd9e60661" + size 54369 provides (ada-mode ada-stmt) requires () type regular @@ -1014,20 +1061,20 @@ ;;;@@@ (package-get-update-base-entry (quote (pcl-cvs - (standards-version 1.0 - version "1.38" + (standards-version 1.1 + version "1.40" author-version "R-2_0-Beta_2" - date "1998-11-17" - build-date "1999-02-02" + date "1999-06-16" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "prog" dump nil description "CVS frontend." - filename "pcl-cvs-1.38-pkg.tar.gz" - md5sum "a5ff4e61dffe3985c20385eb741d4783" - size 163524 + filename "pcl-cvs-1.40-pkg.tar.gz" + md5sum "2ad22b28bb14a7bade0b2fad0723d35f" + size 163639 provides (pcl-cvs generic-sc) requires (xemacs-base elib dired) type regular @@ -1036,20 +1083,20 @@ ;;;@@@ (package-get-update-base-entry (quote (cc-mode - (standards-version 1.0 - version "1.15" + (standards-version 1.1 + version "1.16" author-version "5.25" date "1998-12-30" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "Barry Warsaw " - distribution stable + distribution xemacs priority medium category "prog" dump nil description "C, C++ and Java language support." - filename "cc-mode-1.15-pkg.tar.gz" - md5sum "ca73b190e79f96ab928eecd12af94222" - size 212611 + filename "cc-mode-1.16-pkg.tar.gz" + md5sum "9f8c53d9abca09982e739344c733c7c3" + size 212664 provides (cc-mode) requires (xemacs-base) type regular @@ -1058,20 +1105,20 @@ ;;;@@@ (package-get-update-base-entry (quote (misc-games - (standards-version 1.0 - version "1.11" - author-version "21.0b65" + (standards-version 1.1 + version "1.12" + author-version "21.1" date "1999-03-05" - build-date "1999-03-11" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "games" dump nil description "Other amusements and diversions." - filename "misc-games-1.11-pkg.tar.gz" - md5sum "80149e00e5698d0a48945c918bd2d0ba" - size 166197 + filename "misc-games-1.12-pkg.tar.gz" + md5sum "74c3421bdfdfe77989741389f0e1330a" + size 166163 provides (decipher gomoku hanoi life morse rot13) requires (xemacs-base) type single @@ -1080,20 +1127,20 @@ ;;;@@@ (package-get-update-base-entry (quote (mine - (standards-version 1.0 - version "1.10" + (standards-version 1.1 + version "1.11" author-version "1.9" date "1998-05-09" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "games" dump nil description "Minehunt Game." - filename "mine-1.10-pkg.tar.gz" - md5sum "a2d4f93830fe86e4d4e2f081ec0517fb" - size 66679 + filename "mine-1.11-pkg.tar.gz" + md5sum "fad5f9d385ac22c2cf446db18e57300e" + size 66703 provides (xmine) requires (xemacs-base) type regular @@ -1102,20 +1149,20 @@ ;;;@@@ (package-get-update-base-entry (quote (games - (standards-version 1.0 - version "1.09" + (standards-version 1.1 + version "1.10" author-version "1.04" date "1998-06-04" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "Glynn Clements " - distribution stable + distribution xemacs priority low category "games" dump nil description "Tetris, Sokoban, and Snake." - filename "games-1.09-pkg.tar.gz" - md5sum "76a327a228745576538711180a9e444e" - size 32146 + filename "games-1.10-pkg.tar.gz" + md5sum "e43de212a7ceb56cbaad7e40eb775dd2" + size 32184 provides (gamegrid snake tetris sokoban) requires (xemacs-base) type regular @@ -1124,20 +1171,20 @@ ;;;@@@ (package-get-update-base-entry (quote (cookie - (standards-version 1.0 - version "1.10" - author-version "21.0b62" + (standards-version 1.1 + version "1.11" + author-version "21.1" date "1998-04-07" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "games" dump nil description "Spook and Yow (Zippy quotes)." - filename "cookie-1.10-pkg.tar.gz" - md5sum "1c5599fa30e346af452c126d872121be" - size 34198 + filename "cookie-1.11-pkg.tar.gz" + md5sum "291ea47a1e71de661de365aea0addb60" + size 34221 provides (cookie1 yow) requires (xemacs-base) type regular @@ -1146,20 +1193,20 @@ ;;;@@@ (package-get-update-base-entry (quote (bbdb - (standards-version 1.0 - version "1.07" - author-version "2.00.02" - date "1998-10-08" - build-date "1999-02-02" + (standards-version 1.1 + version "1.08" + author-version "2.00.06" + date "1999-01-24" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "comm" dump nil description "The Big Brother Data Base" - filename "bbdb-1.07-pkg.tar.gz" - md5sum "e28c4aed70df000812d34cb3795c2f72" - size 282200 + filename "bbdb-1.08-pkg.tar.gz" + md5sum "c95ed737fab5b59e88d9acc33703697b" + size 282061 provides (bbdb) requires (bbdb edit-utils gnus mh-e rmail supercite vm tm apel mail-lib xemacs-base) type regular @@ -1168,20 +1215,20 @@ ;;;@@@ (package-get-update-base-entry (quote (zenirc - (standards-version 1.0 - version "1.05" + (standards-version 1.1 + version "1.06" author-version "2.112" date "1998-08-15" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "comm" dump nil description "ZENIRC IRC Client." - filename "zenirc-1.05-pkg.tar.gz" - md5sum "df432e4987ddd0dd65e0124d7d910967" - size 276054 + filename "zenirc-1.06-pkg.tar.gz" + md5sum "7b701d195193ad6b0bf8e2067e17e372" + size 276012 provides (zenirc) requires (zenirc) type regular @@ -1190,20 +1237,20 @@ ;;;@@@ (package-get-update-base-entry (quote (mew - (standards-version 1.0 - version "1.07" + (standards-version 1.1 + version "1.08" author-version "1.93b38x1" date "1998-12-09" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "comm" dump nil description "Messaging in an Emacs World." - filename "mew-1.07-pkg.tar.gz" - md5sum "04ed302d5a3735169835e52dadc9e84d" - size 518432 + filename "mew-1.08-pkg.tar.gz" + md5sum "47ff3e8966c6a198cbae3a413139f4b7" + size 518502 provides (mew) requires (mew) type regular @@ -1212,20 +1259,20 @@ ;;;@@@ (package-get-update-base-entry (quote (tm - (standards-version 1.0 - version "1.18" - author-version "21.0" + (standards-version 1.1 + version "1.20" + author-version "21.1" date "1999-02-06" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "comm" dump nil description "Emacs MIME support." - filename "tm-1.18-pkg.tar.gz" - md5sum "3d7641bd11adb085686384ffee80bf04" - size 330163 + filename "tm-1.20-pkg.tar.gz" + md5sum "d602235f7efdcdd37e7758101e3c162d" + size 329547 provides (tm tm-edit tm-view mime-setup) requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base) type regular @@ -1234,20 +1281,20 @@ ;;;@@@ (package-get-update-base-entry (quote (gnus - (standards-version 1.0 - version "1.40" + (standards-version 1.1 + version "1.42" author-version "5.6.45x1" date "1999-03-12" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "comm" dump nil description "The Gnus Newsreader and Mailreader." - filename "gnus-1.40-pkg.tar.gz" - md5sum "df916949c14fc6a1dcd5b3f3158a5497" - size 1873480 + filename "gnus-1.42-pkg.tar.gz" + md5sum "f076c9ae4ca6ab468454d8036a178501" + size 1872714 provides (gnus message) requires (gnus tm apel w3 mh-e mailcrypt rmail mail-lib xemacs-base) type regular @@ -1256,20 +1303,20 @@ ;;;@@@ (package-get-update-base-entry (quote (rmail - (standards-version 1.0 - version "1.08" - author-version "21.0b62" + (standards-version 1.1 + version "1.10" + author-version "21.1" date "1998-06-28" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "comm" dump nil description "An obsolete Emacs mailer." - filename "rmail-1.08-pkg.tar.gz" - md5sum "90f98f9043e0c6f2180ffec9c6904eca" - size 96450 + filename "rmail-1.10-pkg.tar.gz" + md5sum "4a8b8e1d7b68957ab357d8f86f232fac" + size 96442 provides (rmail rmailsum) requires (tm apel mail-lib xemacs-base) type regular @@ -1278,42 +1325,42 @@ ;;;@@@ (package-get-update-base-entry (quote (mailcrypt - (standards-version 1.0 - version "1.07" - author-version "3.4" - date "1998-01-24" - build-date "1999-02-02" + (standards-version 1.1 + version "2.01" + author-version "3.5.3" + date "1999-03-12" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "comm" dump nil description "Support for messaging encryption with PGP." - filename "mailcrypt-1.07-pkg.tar.gz" - md5sum "350dccab50ef0800b95d44ef62cca359" - size 86362 + filename "mailcrypt-2.01-pkg.tar.gz" + md5sum "1225a54298f26e6a06749dfb0665b658" + size 134061 provides (mailcrypt) - requires (gnus vm mail-lib xemacs-base) + requires (mail-lib fsf-compat xemacs-base) type regular )) )) ;;;@@@ (package-get-update-base-entry (quote (supercite - (standards-version 1.0 - version "1.12" + (standards-version 1.1 + version "1.13" author-version "3.55x3" date "1999-04-06" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "comm" dump nil description "An Emacs citation tool for News & Mail messages." - filename "supercite-1.12-pkg.tar.gz" - md5sum "7188738f17ec05c1561fe054fdf120dd" - size 99564 + filename "supercite-1.13-pkg.tar.gz" + md5sum "7f599f29f111dca3e62c3baeec2b2d91" + size 99547 provides (supercite) requires (mail-lib xemacs-base) type regular @@ -1322,20 +1369,20 @@ ;;;@@@ (package-get-update-base-entry (quote (mh-e - (standards-version 1.0 - version "1.09" - author-version "21.0b62" + (standards-version 1.1 + version "1.10" + author-version "21.1" date "1998-07-12" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "comm" dump nil description "Front end support for MH." - filename "mh-e-1.09-pkg.tar.gz" - md5sum "89e6f44e8dca03f6be10068391831262" - size 176469 + filename "mh-e-1.10-pkg.tar.gz" + md5sum "e04e85a9ff62282a18a06872c840e22f" + size 176436 provides (mh-e) requires (mail-lib xemacs-base) type regular @@ -1344,20 +1391,20 @@ ;;;@@@ (package-get-update-base-entry (quote (gnats - (standards-version 1.0 - version "1.08" + (standards-version 1.1 + version "1.09" author-version "3.101" date "1998-08-01" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority high category "comm" dump nil description "XEmacs bug reports." - filename "gnats-1.08-pkg.tar.gz" - md5sum "8c1e3100399aac86c63683b1836d4a61" - size 189265 + filename "gnats-1.09-pkg.tar.gz" + md5sum "0893c6cad7179a2be79744bdfc0c6932" + size 189250 provides (gnats gnats-admin send-pr) requires (mail-lib xemacs-base) type regular @@ -1366,20 +1413,20 @@ ;;;@@@ (package-get-update-base-entry (quote (footnote - (standards-version 1.0 - version "1.10" + (standards-version 1.1 + version "1.11" author-version "0.18x" date "1999-03-11" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "SL Baur " - distribution stable + distribution xemacs priority low category "comm" dump nil description "Footnoting in mail message editing modes." - filename "footnote-1.10-pkg.tar.gz" - md5sum "124d7e58ba9905db7488ee142470249f" - size 18356 + filename "footnote-1.11-pkg.tar.gz" + md5sum "7aa931c602913134e5e716de752439db" + size 18364 provides (footnote) requires (mail-lib xemacs-base) type regular @@ -1388,21 +1435,21 @@ ;;;@@@ (package-get-update-base-entry (quote (eudc - (standards-version 1.0 - version "1.28" - author-version "1.28" - date "1999-02-13" - build-date "1999-03-01" - maintainer "Oscar Figueiredo " - distribution stable + (standards-version 1.1 + version "1.29" + author-version "1.29" + date "1999-07-21" + build-date "1999-07-30" + maintainer "Oscar Figueiredo " + distribution xemacs priority low category "comm" dump nil description "Emacs Unified Directory Client (LDAP, PH)." - filename "eudc-1.28-pkg.tar.gz" - md5sum "e88e7ed791d16105824812edcd743bc6" - size 62476 - provides (eudc eudc-ldap eudc-ph) + filename "eudc-1.29-pkg.tar.gz" + md5sum "23f490bd6771d873c1869fa1ac56a3a8" + size 71390 + provides (eudc eudc-ldap eudc-ph eudc-bbdb) requires (fsf-compat xemacs-base bbdb) type regular )) @@ -1410,20 +1457,20 @@ ;;;@@@ (package-get-update-base-entry (quote (net-utils - (standards-version 1.0 - version "1.11" - author-version "21.0b62" + (standards-version 1.1 + version "1.12" + author-version "21.1" date "1998-07-01" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "comm" dump nil description "Miscellaneous Networking Utilities." - filename "net-utils-1.11-pkg.tar.gz" - md5sum "f9d52e6e6b4f53ccf5cdd3521403e276" - size 107193 + filename "net-utils-1.12-pkg.tar.gz" + md5sum "49b7e1d0f2f97519eca07d3562f6a00d" + size 107202 provides (ilisp-browse-cltl2 emacsbug feedmail metamail net-utils rcompile shadowfile webjump webster-www) requires (w3 efs mail-lib xemacs-base) type single @@ -1432,20 +1479,20 @@ ;;;@@@ (package-get-update-base-entry (quote (w3 - (standards-version 1.0 - version "1.13" + (standards-version 1.1 + version "1.14" author-version "4.0pre39x1" date "1999-03-02" - build-date "1999-03-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution experimental + distribution xemacs priority high category "comm" dump nil description "A Web browser." - filename "w3-1.13-pkg.tar.gz" - md5sum "8e9f70ef2c4b43090cfbf86974517c66" - size 682040 + filename "w3-1.14-pkg.tar.gz" + md5sum "693692928758ea53e9fa76527893a483" + size 680740 provides (w3 url) requires (w3 mail-lib xemacs-base) type regular @@ -1454,20 +1501,20 @@ ;;;@@@ (package-get-update-base-entry (quote (vm - (standards-version 1.0 - version "1.20" - author-version "6.71" + (standards-version 1.1 + version "1.21" + author-version "6.72" date "1999-05-13" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "comm" dump nil description "An Emacs mailer." - filename "vm-1.20-pkg.tar.gz" - md5sum "120d25d3541fc7ef4bb34659a4aba89c" - size 614987 + filename "vm-1.21-pkg.tar.gz" + md5sum "1110173b0759dbed61e9b1690d32d984" + size 619207 provides (vm) requires (mail-lib xemacs-base) type regular @@ -1476,20 +1523,20 @@ ;;;@@@ (package-get-update-base-entry (quote (sounds-wav - (standards-version 1.0 - version "1.07" - author-version "21.0b64" + (standards-version 1.1 + version "1.08" + author-version "21.1" date "1999-02-02" - build-date "1999-03-05" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority high category "libs" dump nil description "XEmacs Microsoft sound files." - filename "sounds-wav-1.07-pkg.tar.gz" - md5sum "60a70b85e8711fb1c9a1c7d0f4bf8ee0" - size 149045 + filename "sounds-wav-1.08-pkg.tar.gz" + md5sum "8d34b4f2a6cb90f3d86c94d018cc3912" + size 149046 provides () requires () type regular @@ -1498,20 +1545,20 @@ ;;;@@@ (package-get-update-base-entry (quote (sounds-au - (standards-version 1.0 - version "1.07" - author-version "21.0b64" + (standards-version 1.1 + version "1.08" + author-version "21.1" date "1999-02-02" - build-date "1999-03-05" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority high category "libs" dump nil description "XEmacs Sun sound files." - filename "sounds-au-1.07-pkg.tar.gz" - md5sum "4b5acd296b50102e50565650d9d7ec0b" - size 126184 + filename "sounds-au-1.08-pkg.tar.gz" + md5sum "8344fa28ad13a14e67accf72168ac91a" + size 126196 provides () requires () type regular @@ -1520,20 +1567,20 @@ ;;;@@@ (package-get-update-base-entry (quote (xemacs-devel - (standards-version 1.0 - version "1.21" - author-version "21.0b62" - date "1998-10-20" - build-date "1999-02-02" + (standards-version 1.1 + version "1.23" + author-version "21.1" + date "1999-05-28" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "libs" dump nil description "Emacs Lisp developer support." - filename "xemacs-devel-1.21-pkg.tar.gz" - md5sum "aa472f2d412382c2fdd3150105ca7d1c" - size 83543 + filename "xemacs-devel-1.23-pkg.tar.gz" + md5sum "f0f629aed67569b793347ca9713fc836" + size 83642 provides (docref eldoc elp find-func hide-copyleft ielm regexp-opt trace) requires (xemacs-base) type single @@ -1542,20 +1589,20 @@ ;;;@@@ (package-get-update-base-entry (quote (tooltalk - (standards-version 1.0 - version "1.09" - author-version "21.0b62" + (standards-version 1.1 + version "1.10" + author-version "21.1" date "1998-07-25" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution contrib + distribution xemacs priority low category "libs" dump nil description "Support for building with Tooltalk." - filename "tooltalk-1.09-pkg.tar.gz" - md5sum "368d6407bf82711bee9a01fa6908b576" - size 9271 + filename "tooltalk-1.10-pkg.tar.gz" + md5sum "6e73fe7a0ef9d9511e885999b806f914" + size 9279 provides () requires () type regular @@ -1564,20 +1611,20 @@ ;;;@@@ (package-get-update-base-entry (quote (elib - (standards-version 1.0 - version "1.04" + (standards-version 1.1 + version "1.05" author-version "1.0" date "1998-10-01" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution mule + distribution xemacs priority high category "libs" dump nil description "Portable Emacs Lisp utilities library." - filename "elib-1.04-pkg.tar.gz" - md5sum "d17596beb9b03292e322f8460c36eb81" - size 72834 + filename "elib-1.05-pkg.tar.gz" + md5sum "b9f0d18ae78f70a65a341c515aae2095" + size 72809 provides (avltree bintree cookie dll elib-node queue-f queue-m read stack-f stack-m string) requires () type single @@ -1586,20 +1633,20 @@ ;;;@@@ (package-get-update-base-entry (quote (edebug - (standards-version 1.0 - version "1.07" - author-version "21.0b62" + (standards-version 1.1 + version "1.08" + author-version "21.1" date "1998-03-12" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority low category "libs" dump nil description "An Emacs Lisp debugger." - filename "edebug-1.07-pkg.tar.gz" - md5sum "62d3e581feac2c3a73917ad0d81151b0" - size 112408 + filename "edebug-1.08-pkg.tar.gz" + md5sum "366450f91a308c84471f7cdb98fd907c" + size 112428 provides (edebug cl-read cust-print eval-reg cl-specs) requires (xemacs-base) type regular @@ -1608,20 +1655,20 @@ ;;;@@@ (package-get-update-base-entry (quote (Sun - (standards-version 1.0 - version "1.10" - author-version "21.0b62" + (standards-version 1.1 + version "1.11" + author-version "21.1" date "1998-07-25" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution sun + distribution xemacs priority low category "libs" dump nil description "Support for Sparcworks." - filename "Sun-1.10-pkg.tar.gz" - md5sum "54cce5cbb182d99de5562a586714e50c" - size 63693 + filename "Sun-1.11-pkg.tar.gz" + md5sum "8920cd925c5bff8b9d4a353d08c1f7ff" + size 63685 provides (sccs eos-browser eos-common eos-debugger eos-debugger eos-editor eos-init eos-load eos-menubar eos-toolbar sunpro) requires (cc-mode xemacs-base) type regular @@ -1630,20 +1677,20 @@ ;;;@@@ (package-get-update-base-entry (quote (apel - (standards-version 1.0 - version "1.11" - author-version "9.18" - date "1999-05-08" - build-date "1999-05-13" + (standards-version 1.1 + version "1.15" + author-version "9.20" + date "1999-07-26" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution mule + distribution xemacs priority high category "libs" dump nil description "A Portable Emacs Library. Used by XEmacs MIME support." - filename "apel-1.11-pkg.tar.gz" - md5sum "4c53047e1f0964b24626c29ee40a04c5" - size 73997 + filename "apel-1.15-pkg.tar.gz" + md5sum "503832a7c28fe700afc35dbaf7fdeb01" + size 79178 provides (atype emu-20 emu-e19 emu-x20 emu-xemacs emu file-detect filename install mule-caesar path-util richtext std11-parse std11 tinyrich) requires (fsf-compat xemacs-base) type regular @@ -1652,20 +1699,20 @@ ;;;@@@ (package-get-update-base-entry (quote (efs - (standards-version 1.0 - version "1.14" + (standards-version 1.1 + version "1.15" author-version "1.18" date "1999-01-03" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "Mike Sperber " - distribution stable + distribution xemacs priority medium category "libs" dump nil description "Treat files on remote systems the same as local files." - filename "efs-1.14-pkg.tar.gz" - md5sum "2b4128fec0dcb31834f404ef962f10ab" - size 369742 + filename "efs-1.15-pkg.tar.gz" + md5sum "4c88a1915bace153310c681f24deb14d" + size 369713 provides (efs) requires (xemacs-base vm dired) type regular @@ -1674,20 +1721,20 @@ ;;;@@@ (package-get-update-base-entry (quote (dired - (standards-version 1.0 - version "1.05" + (standards-version 1.1 + version "1.06" author-version "7.9" date "1998-12-09" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "Mike Sperber " - distribution stable + distribution xemacs priority medium category "libs" dump nil description "Manage file systems." - filename "dired-1.05-pkg.tar.gz" - md5sum "392440b1472a2415b0b9b6779df93619" - size 187654 + filename "dired-1.06-pkg.tar.gz" + md5sum "9c857aa147bf53d972ad6ac30ce34bd4" + size 187691 provides (diff dired) requires (xemacs-base) type regular @@ -1696,20 +1743,20 @@ ;;;@@@ (package-get-update-base-entry (quote (mail-lib - (standards-version 1.0 - version "1.23" - author-version "21.0" + (standards-version 1.1 + version "1.24" + author-version "21.1" date "1999-04-13" - build-date "1999-05-13" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution stable + distribution xemacs priority medium category "libs" dump nil description "Fundamental lisp files for providing email support." - filename "mail-lib-1.23-pkg.tar.gz" - md5sum "4293acbed286a63581f55b7a16e4a489" - size 131968 + filename "mail-lib-1.24-pkg.tar.gz" + md5sum "9428816ccc49d99be80dcbfc34d7917f" + size 131977 provides (browse-url highlight-headers mail-abbrevs mail-extr mail-utils reporter rfc822 rmail-mini rmailout sendmail smtpmail) requires (xemacs-base) type regular @@ -1718,20 +1765,20 @@ ;;;@@@ (package-get-update-base-entry (quote (fsf-compat - (standards-version 1.0 - version "1.05" - author-version "21.0b62" + (standards-version 1.1 + version "1.06" + author-version "21.1" date "1998-09-12" - build-date "1999-02-02" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution mule + distribution xemacs priority high category "libs" dump nil description "FSF Emacs compatibility files." - filename "fsf-compat-1.05-pkg.tar.gz" - md5sum "64cb1984a71974f3f40c0be1a971f441" - size 17347 + filename "fsf-compat-1.06-pkg.tar.gz" + md5sum "b167c9b6e4b6ff464d34143782d6c633" + size 17356 provides (overlay thingatpt timer x-popup-menu) requires () type single @@ -1740,20 +1787,20 @@ ;;;@@@ (package-get-update-base-entry (quote (xemacs-base - (standards-version 1.0 - version "1.30" - author-version "21.0" - date "1998-11-30" - build-date "1999-05-13" + (standards-version 1.1 + version "1.32" + author-version "21.1" + date "1999-07-22" + build-date "1999-07-30" maintainer "XEmacs Development Team " - distribution mule + distribution xemacs priority high category "libs" dump nil description "Fundamental XEmacs support, you almost certainly need this." - filename "xemacs-base-1.30-pkg.tar.gz" - md5sum "d9e95850fe8e13a04166d59d62fb38ab" - size 430640 + filename "xemacs-base-1.32-pkg.tar.gz" + md5sum "ae699a67f9922ad330fc1e5d45d3ff87" + size 430787 provides (add-log advice annotations assoc case-table chistory comint-xemacs comint compile debug ebuff-menu echistory edmacro ehelp electric enriched env facemenu ffap helper imenu iso-syntax macros novice outline overlay passwd pp regi ring shell skeleton sort thing time-stamp timezone xbm-button xpm-button) requires () type regular @@ -1761,3 +1808,11 @@ )) ;;;@@@ ;; Package Index file ends here +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v0.9.8 (SunOS) +Comment: For info see http://www.gnupg.org + +iEYEARECAAYFAjehBIcACgkQEng2Tdz4C2tvvQCbBYGskNM16GwRfw/DjTS4byZN +6CIAnRGmsWGM/07NNA6mEyejc3SDD7/3 +=NjSE +-----END PGP SIGNATURE----- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index fa9d5e1..b466a85 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,20 @@ +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-22 SL Baur + + * Makefile.in.in (datadir): Add. + From Jeff Miller + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index 87116be..9fa565b 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -53,6 +53,7 @@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ srcdir=@srcdir@ +datadir=@datadir@ top_srcdir=@top_srcdir@ archlibdir=@archlibdir@ configuration=@configuration@ diff --git a/lib-src/config.values.in b/lib-src/config.values.in index 45d1924..3a1cdc1 100644 --- a/lib-src/config.values.in +++ b/lib-src/config.values.in @@ -24,9 +24,12 @@ CPP "@CPP@" CPPFLAGS "@CPPFLAGS@" CXXFLAGS "@CXXFLAGS@" DEFS "@DEFS@" +DOCDIR "@DOCDIR@" +DOCDIR_USER_DEFINED "@DOCDIR_USER_DEFINED@" ETCDIR "@ETCDIR@" ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@" EXEC_PREFIX "@EXEC_PREFIX@" +EXEC_PREFIX_USER_DEFINED "@EXEC_PREFIX_USER_DEFINED@" FFLAGS "@FFLAGS@" INFODIR "@INFODIR@" INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@" @@ -50,6 +53,7 @@ MODULEDIR_USER_DEFINED "@MODULEDIR_USER_DEFINED@" PACKAGE_PATH "@PACKAGE_PATH@" PACKAGE_PATH_USER_DEFINED "@PACKAGE_PATH_USER_DEFINED@" PREFIX "@PREFIX@" +PREFIX_USER_DEFINED "@PREFIX_USER_DEFINED@" PROGNAME "@PROGNAME@" RANLIB "@RANLIB@" RECURSIVE_MAKE "@RECURSIVE_MAKE@" @@ -93,6 +97,8 @@ includedir "@includedir@" infodir "@infodir@" infopath "@infopath@" install_pp "@install_pp@" +inststaticdir "@inststaticdir@" +instvardir "@instvardir@" internal_makefile_list "@internal_makefile_list@" ld "@ld@" ld_dynamic_link_flags "@ld_dynamic_link_flags@" diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0adbe44..ca8e984 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +1999-08-24 MORIOKA Tomohiko + + * mule/mule-cmds.el (reset-language-environment): Fix problem when + coding-system `iso-10646-ucs-4' is not defined. + 1999-06-17 MORIOKA Tomohiko * bytecomp.el (byte-compile-insert-header): Use utf-8 as @@ -18,16 +23,863 @@ * mule/vietnamese.el (leading-code-private-11): Deleted [defined as builtin variable]. -1999-06-09 MORIOKA Tomohiko - - * mule/cyrillic.el (cyrillic-koi8-r-decode-table): Set 32 for - missing characters to avoid crash. - 1999-06-04 MORIOKA Tomohiko * files.el (insert-file-contents-literally): Treat file as binary; call file-name-handlers. [sync with Emacs 20.3.10] +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-28 SL Baur + + * code-files.el (insert-file-contents): Fix docstring. + revert previous change. + +1999-07-26 Yoshiki Hayashi + + * fill.el (fill-region-as-paragraph): Change re-break-point to + contain word-across-newline plus one character so that filling + Japanese and Chinese works as desired. + * simple.el (do-auto-fill): Ditto. + +1999-07-26 SL Baur + + * mule/japanese.el ("Japanese"): Do not specify a default input + method. + Suggested by MORIOKA Tomohiko + +1999-07-23 Jan Vroonhof + + * custom.el ((not (fboundp 'defun*))): Insert autoload crap to be + able to use cl-macs macro in early lisp. + +1999-07-23 Jan Vroonhof + + * custom.el: + * cus-face.el: + * cus-edit.el: + Massive custom Theme API changes. + +1999-07-22 MORIOKA Tomohiko + + * code-files.el (insert-file-contents): Regard + coding-system-magic-cookie if `coding-system-for-read' is nil. + +1999-07-22 MORIOKA Tomohiko + + * mule/thai-xtis.el: Add coding: local variable, to avoid + bootstrapping problem with C locale. + +1999-07-22 Andy Piper + + * dumped-lisp.el (preloaded-file-list): guard against putting + gutter-items in a less than functional XEmacs. + * gutter-items.el: put call to `add-tab-to-gutter' back in. + +1999-07-18 Bob Weiner + + * fill.el (fill-context-prefix): Fixed bug that prevented the + setting of an adaptive fill prefix when the `dont-skip-first' was + t. + +1999-07-22 SL Baur + + * gutter-items.el: remove unguarded call to `add-tab-to-gutter'. + +1999-06-25 Karl M. Hegbloom + + * files.el (interpreter-mode-alist): add `make', `guile', and + `emacs' entries. (#!/usr/bin/make -f ought to send a file into + makefile-mode, guile is a scheme, and someday XEmacs will be + modular enough to use as an efficient scripting tool.) + +1999-07-06 MORIOKA Tomohiko + + * mule/mule-cmds.el (reset-language-environment): Regard + coding-category `utf-8' and `ucs-4' if they are available. + +1999-07-06 MORIOKA Tomohiko + + * mule/mule-cmds.el (set-default-coding-systems): Fix DOC-string. + (prefer-coding-system): Fix DOC-string. + + * mule/mule-cmds.el (coding-system-change-eol-conversion): Fix + DOC-string too. + + * mule/mule-cmds.el (mule-keymap): Change keymap name from MULE to + Mule. + (coding-system-change-eol-conversion): Fix DOC-string. + +1999-06-30 MORIOKA Tomohiko + + * mule/mule-cmds.el (mule-keymap): Use `describe-coding-system' + instead of `list-coding-system'. + +1999-06-29 MORIOKA Tomohiko + + * menubar-items.el (default-menubar): `select-input-method' was + renamed to `set-input-method'. + + * mule/mule-cmds.el (set-language-info-alist): Fix setting for + "Set Language Environment" menu. + + * mule/mule-cmds.el (set-language-info-alist): Fix setting for + "Describe Language Support" menu. + +1999-06-29 MORIOKA Tomohiko + + * mule/chinese.el ("Chinese-GB"): Rename + `chinese-gb-environment-setup-function' to + `setup-chinese-gb-environment-internal'. + +1999-06-29 MORIOKA Tomohiko + + * mule/korean.el: Use `define-coding-system-alias' instead of + `copy-coding-system'. + +1999-06-29 MORIOKA Tomohiko + + * mule/mule-cmds.el (set-language-environment-coding-systems): + Treat duplicated coding-categories. + +1999-06-29 MORIOKA Tomohiko + + * mule/japanese.el: Use `define-coding-system-alias' instead of + `copy-coding-system'. + +1999-06-29 MORIOKA Tomohiko + + * mule/vietnamese.el: Specify `iso-8-1' as a category of + coding-system `viscii'. + +1999-06-29 MORIOKA Tomohiko + + * mule/cyrillic.el: + - Specify `iso-8-1' as a category of coding-system `koi8-r'. + (cyrillic-alternativnyj-decode-table): New variable. + (cyrillic-alternativnyj-encode-table): New variable. + - Specify `iso-8-1' as a category of coding-system + `alternativnyj'. + - Abolish general Cyrillic environment. + +1999-06-29 MORIOKA Tomohiko + + * mule/chinese.el: + - Use `define-coding-system-alias' instead of `copy-coding-system'. + - Register `chinese-gb-environment-setup-function' as a + `setup-function' of "Chinese-GB" environment. + +1999-06-29 MORIOKA Tomohiko + + * mule/mule-cmds.el (set-language-info-alist): Allow dummy + optional argument `parents'. + + * mule/thai-xtis.el: Specify `tis-620' as `tutorial-coding-system' + property for Thai-XTIS. + + * mule/mule-help.el (help-with-tutorial): Use property + `tutorial-coding-system' of language-info as a coding-system to + read tutorial file. + +1999-06-29 MORIOKA Tomohiko + + * mule/thai-xtis.el: Don't setup `setup-function' and + `exit-function'. + + * mule/mule-cmds.el (set-language-environment-coding-systems): Use + `set-coding-category-system' to set up coding-system for + coding-category. + + * mule/mule-cmds.el (prefer-coding-system): Use + `set-coding-category-system' to set up coding-system for + coding-category. + +1999-06-29 MORIOKA Tomohiko + + * mule/thai-xtis.el: Specify TUTORIAL.th as the tutorial file for + Thai-XTIS environment. + + * mule/mule-cmds.el (prefer-coding-system): Use + `find-coding-system' instead of `coding-system-p'. + +1999-06-28 MORIOKA Tomohiko + + * mule/mule-cmds.el (set-language-environment-coding-systems): + Modify eol-type for XEmacs. + + * mule/thai-xtis.el: Delete unused local variable `category'. + + * mule/mule-cmds.el (coding-system-change-eol-conversion): New + function. + (prefer-coding-system): Don't call + `update-coding-systems-internal'; use function + `coding-category-list' instead of variable `coding-category-list'; + use `set-coding-priority-list' instead of `set-coding-priority'; + modify `eol-type' for XEmacs. + + * mule/mule-misc.el (string-width): Use `charset-width' instead of + `charset-columns'. + (char-width): Likewise. + +1999-06-28 MORIOKA Tomohiko + + * mule/thai-xtis.el: Specify `iso-8-1' as coding-category of + `tis-620'. + + * mule/mule-cmds.el (set-language-environment-coding-systems): Use + `set-coding-priority-list' instead of `set-coding-priority'; don't + call `update-coding-systems-internal'. + + * mule/mule-misc.el (coding-system-get): New function. + (coding-system-put): New function. + (coding-system-category): New function. + +1999-06-28 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Load "thai-xtis-chars" + when Mule is running; load "mule/thai-xtis" instead of "thai-xtis" + to avoid conflict with leim/quail/thai-xtis. + + * mule/thai-xtis.el: Split definition of the charset `thai-xtis' + to thai-xtis-chars.el. + + * mule/thai-xtis-chars.el: New file (split from + mule/thai-xtis.el). + +1999-06-28 MORIOKA Tomohiko + + * mule/thai-xtis.el: + - Change category for the charset `thai-xtis' to `?x' from `?T'. + - Add syntax entries. + - Put `preferred-coding-system' of the charset `thai-xtis' to + `tis-620'. + +1999-06-28 TAKAHASHI Naoto + + * mule/thai-xtis.el: ccl-decode-thai-xtis and subroutines + rewritten to use write-multibyte-character. + +1999-06-28 MORIOKA Tomohiko + + mule/mule-cmds.el (view-hello-file): Use `iso-2022-7bit' instead + of `iso-2022-7'. + (prefer-coding-system): Synced up with Emacs 20.3.11 but not + ported yet. + (read-input-method-name): Treat optional argument `default'. + +1999-06-28 MORIOKA Tomohiko + + * mule/mule-cmds.el (set-language-info): Don't set up menus at + all. + (set-language-info-alist): Set up menus here. + +1999-06-28 MORIOKA Tomohiko + + * minibuf.el (completing-read): Add new optional argument + `default'. + (read-coding-system): Add new optional argument + `default-coding-system'. + +1999-06-03 Ken'ichi Handa + + * mule/vietnamese.el (ccl-encode-vscii): Typo fixed + (viet-viscii-...->viet-vscii...). + +1999-05-13 Ken'ichi Handa + + * mule/mule-cmds.el: Change MULE to Mule in docstrings + and menus. + +1999-04-12 Richard M. Stallman + + * mule/mule-cmds.el (input-method-function): Add permanent-local + property. + +1999-03-30 Dave Love + + * mule/mule-cmds.el (current-language-environment): Doc fix. + +1999-02-06 Richard Stallman + + * mule/european.el (setup-slovenian-environment): New function. + ("Slovenian"): New language environment. + +1999-01-27 Dave Love + + * mule/mule-cmds.el (current-language-environment): Provide :link, + :type (choices) and appropriate :get. + +1999-01-14 Kenichi Handa + + * mule/mule-cmds.el (describe-language-environment): Don't alter + input-method-alist. + +1999-01-06 Eli Zaretskii + + * mule/mule-cmds.el (prefer-coding-system): Call + set-coding-priority, so that the internal array of priorities is + also updated. + +1998-12-30 Eli Zaretskii + + * mule/mule-cmds.el (prefer-coding-system): If the argument + requires specific EOL conversion type, make the default coding + systems use that. + +1998-12-17 Eli Zaretskii + + * mule/mule-cmds.el (set-language-environment): Pass the default + eol-type to set-language-environment-coding-systems. + (set-default-coding-systems): Copy the eol-type property for the + new default values of {buffer-file,process}-coding-system from the + old defaults. + (set-language-environment-coding-systems): Accept an optional + argument EOL-TYPE, and set the eol-type property of the default + coding systems accordingly. + +1998-10-26 Kenichi Handa + + * mule/chinese.el (pre-write-encode-hz): Cancel previous change, + use generate-new-buffer instead of get-buffer-create. + +1998-10-21 Kenichi Handa + + * mule/chinese.el (pre-write-encode-hz): Use with-temp-buffer. + +1998-10-16 Markus Rost + + * mule/mule-cmds.el (default-input-method): Fix custom type. + +1998-10-12 Richard Stallman + + * mule/mule-cmds.el (setup-specified-language-environment): + Add apropos-inhibit property. + (describe-specified-language-support): Likewise. + +1998-09-06 Bill Richter + + * mule/mule-cmds.el: Doc fixes. + +1998-09-02 Kenichi Handa + + * mule/mule-cmds.el (register-input-method): Doc-string + modified. + +1998-09-01 Dave Love + + * mule/mule-cmds.el (current-language-environment): Fix + setter function. + +1998-08-31 Paul Eggert + + * mule/chinese.el, mule/cyrillic.el, mule/ethiopic.el, + mule/european.el, mule/hebrew.el, mule/japanese.el, + mule/korean.el, mule/vietnamese.el: Add coding: local variable, to + avoid bootstrapping problem if you need to recompile all the Lisp + files using interpreted code. + +1998-08-26 Kenichi Handa + + * mule/european.el ("Latin-1"): Modify `documentation' key value. + ("Latin-2"): Likewise. + +1998-08-18 Per Starback + + * mule/european.el (setup-latin2-environment): Fix typo. + +1998-08-18 Kenichi Handa + + * mule/european.el: Give proper value of `input-method' key to all + lang. env. + + * mule/mule-cmds.el (activate-input-method): Handle the case that + the arg INPUT-METHOD is nil correctly. + (read-multilingual-string): Activate the specified input method + before calling read-string. Afterward, activate the original + input method. + +1998-08-15 Kenichi HANDA + + * mule/mule-cmds.el (language-info-alist): Doc-string modified. + (set-language-info-alist): Fix typo in doc-string. + + * mule/hebrew.el ("Hebrew"): Delete describe-function key. + +1998-08-09 Kenichi HANDA + + * mule/mule-cmds.el (language-info-alist): Doc-string modified. + (reset-language-environment): New function for the job that + setup-english-environment used to do. + (set-language-environment): Do more setups according to the info + in language-info-alist. + (read-language-name): Handle the case that the arg KEY is nil. + (describe-language-environment): Handle input-method property. + + * mule/: All files under this directory, which related with + specific languages (such as mule/european.el, mule/greek.el, + mule/hebrew.el, mule/misc-lang.el), modified as below. + (setup-XXX-environment): Just call set-language-environment. If + they used to do some other jobs than what done by + set-language-environment, those jobs are done in + setup-XXX-environment-internal now. + ("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change + the value to setup-XXX-environment-internal. Add properties + input-method and features. + + * mule/english.el (setup-english-environment): Just call + reset-language-environment. + + * mule/european.el (setup-8-bit-environment): Function deleted. + +1998-08-08 Richard Stallman + + * mule/mule-cmds.el (input-method-exit-on-first-char) + (input-method-use-echo-area): Doc fixes. + +1998-08-06 Kenichi Handa + + * mule/mule-cmds.el (input-method-exit-on-first-char): New + variable. + (input-method-use-echo-area): New variable. + +1998-08-01 Kenichi HANDA + + * mule/mule-cmds.el (language-info-alist): Doc-string modified. + +1998-07-30 Ken'ichi Handa + + * mule/mule-cmds.el (activate-input-method): Update mode line. + (inactivate-input-method): Likewise. + +1998-07-19 Kenichi Handa + + * mule/mule-cmds.el (read-multilingual-string): Don't activate an + input method in the current buffer, but just bind + current-input-method. + +1998-07-08 Kenichi Handa + + * mule/hebrew.el ("Hebrew"): Add coding-priority. + + * mule/misc-lang.el ("IPA"): Add coding-priority and + coding-system. + +1998-06-26 Ken'ichi Handa + + * mule/greek.el: Add coding-priority. + +1998-05-23 Richard Stallman + + * mule/mule-cmds.el (register-input-method): Rename arg ENV to + LANG-ENV. + +1998-05-20 Richard Stallman + + * mule/mule-cmds.el (register-input-method): Fix previous change. + (setup-specified-language-environment): Doc fix. + +1998-05-19 Richard Stallman + + * mule/mule-cmds.el: Several doc fixes. + (get-language-info, set-language-info): Rename argument. + (set-language-info-alist): Likewise. + (register-input-method): Rename argument. + (activate-input-method): If INPUT-METHOD is nil, deactivate. + +1998-05-04 Kenichi Handa + + * mule/mule-cmds.el (toggle-input-method): Use a more appropriate + default value while reading an input method. + +1998-05-01 Kenichi Handa + + * mule/mule-cmds.el (universal-coding-system-argument): + Use buffer-file-coding-system as default. + +1998-04-14 Andreas Schwab + + * mule/korean.el ("Korean"): Doc fix. + +1998-04-11 Kenichi Handa + + * mule/mule-cmds.el (describe-language-environment): Print the + languge environment at the head. + +1998-04-06 Kenichi Handa + + * mule/japanese.el: Set exit-function to exit-japanese-environment + for Japanese environment. + +1998-03-20 Richard Stallman + + * mule/mule-cmds.el (set-language-environment): Doc fix. + (current-language-environment): Use defcustom. + (default-input-method): Specify :type. + +1998-03-02 Kenichi Handa + + * mule/mule-cmds.el (set-default-coding-systems): Doc-string + modified. + (prefer-coding-system): Doc-string modified. + +1998-01-21 Kenichi Handa + + * mule/mule-cmds.el (set-language-info): Doc-string + describes `coding-priority' KEY. + (set-language-environment-coding-systems): New function. + (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-environment-coding-systems): New function. + + * mule/chinese.el: Remove setting up of + describe-chinese-environment-map and + setup-chinese-environment-map. Exclude them in args of calls to + set-language-info-alist. Register coding-priority key in + language-info-alist. + + * mule/cyrillic.el: Remove setting up of + describe-cyrillic-environment-map and + setup-cyrillic-environment-map. Exclude them in args of calls to + set-language-info-alist. Register coding-priority key in + language-info-alist. + + * mule/english.el: Register coding-priority key in + language-info-alist. + + * mule/ethiopic.el: Register coding-priority key in + language-info-alist. + + * mule/european.el: Remove setting up of + describe-european-environment-map and + setup-european-environment-map. Exclude them in args of calls to + set-language-info-alist. Register coding-priority key in + language-info-alist. Add "German" language env. + (setup-8-bit-environment): Delete CODING-SYSTEM arg. + (setup-german-environment): New function. + + * mule/greek.el (setup-greek-environment): For Greek lang. env., + change default input method to "greek-postfix". + + * mule/japanese.el, mule/korean.el, mule/vietnamese.el: Register + coding-priority key in + +1997-12-19 Stephen Eglen + + * mule/mule-cmds.el (set-language-info): Doc fix. + (input-method-inactivate-hook): Doc fix. + +1997-11-20 Karl Heuer + + * mule/mule-cmds.el (set-input-method): Renamed from + select-input-method. + +1997-11-07 Kenichi Handa + + * mule/mule-cmds.el (set-language-environment): Run + exit-language-environment-hook before calling `exit-function' + which is specified for the language environment. + +1997-10-23 Kenichi Handa + + * mule/mule-cmds.el (set-default-coding-systems): Doc-string + modified. + (prefer-coding-system): Likewise. + (describe-language-environment): Print aliases of each coding + system. + (set-language-environment-hook): New variable. + (exit-language-environment-hook): New variable. + (set-language-environment): Call these hooks. Before setting a + new language environment, exit from the + current-language-environment if necessary. + (input-method-verbose-flag): The value can be nil, t, + complex-only, or default. + (input-method-highlight-flag): Doc-string augmented. + (activate-input-method): Check if we can run the registered + function to activate an input method. + + * mule/korean.el: Set exit-function for language environment + "Korean" to exit-korean-environment. + (setup-korean-environment): Moved to korea-util.el. + +1997-10-21 Kenichi Handa + + * mule/mule-cmds.el (read-multilingual-string): Use + current-input-method prior to default-input-method. Don't bind + current-input-method by `let', instead, activate the specified + input method in the current buffer temporarily. + +1997-10-19 John F. Whitehead + + * mule/mule-cmds.el (describe-language-environment): Fix prompt. + +1997-10-21 Kenichi Handa + + * mule/chinese.el (post-read-decode-hz): Return the result of + decode-hz-region. + (pre-write-encode-hz): Do not change the value of + last-coding-system. + +1998-09-06 Bill Richter + + * mule/mule-ccl.el: Doc fixes. + +1998-04-20 Kenichi Handa + + * mule/mule-ccl.el (declare-ccl-program): New optional arg VECTOR. + (check-ccl-program): New macro. + +1998-01-21 Kenichi Handa + + * mule/mule-ccl.el: Comment about CCL syntax modified. + (ccl-command-table): Add read-multibyte-character and + write-multibyte-character. + (ccl-code-table): Add ex-cmd. + (ccl-extended-code-table): New variable. + (ccl-embed-extended-command): New function. + (ccl-compile-read-multibyte-character, + ccl-compile-write-multibyte-character) New functions. + (ccl-dump-ex-cmd, ccl-dump-read-multibyte-character, + ccl-dump-write-multibyte-character): New functions. + +1999-07-22 SL Baur + + * config.el (config-value-file): config.values is installed into + doc-directory. + From Karl M. Hegbloom + +1999-07-19 Didier Verna + + * rect.el: all functions rewritten, except when noted. Below is a + list of interface changes. + (apply-on-rectangle): new function. Obsoletes + `operate-on-rectangle'. All functions that used to call this + function now call the new one. + (kill-rectangle): added optional prefix arg to fill lines. + (delete-rectangle): ditto. + (delete-extract-rectangle): ditto. + (open-rectangle): ditto. + (clear-rectangle): ditto. + (delete-rectangle-line): added third arg FILL. + (delete-extract-rectangle-line): ditto. + (open-rectangle-line): ditto. + (clear-rectangle-line): ditto. + +1999-07-18 Andy Piper + + * menubar-items.el (default-menubar): add gutter options. + + * gutter-items.el: new file. + (gutter): new group for custom. + (gutter-visible-p): new variable. + (default-gutter-position): ditto. + (buffers-tab): new group for the buffers tab. + (gutter-buffers-tab): widget to put in the gutter. + (buffers-tab-max-size): max number of tabs. + (buffers-tab-switch-to-buffer-function): function to call when a + tab is pressed. + (buffers-tab-omit-function): filter buffers with this function. + (buffers-tab-format-buffer-line-function): format buffer names for + inclusion in tabs. + (buffers-tab-switch-to-buffer): like switch-to-buffer but without + the record. + (build-buffers-tab-internal): build a list of tab items. + (buffers-tab-items): ditto. + (add-tab-to-gutter): put a tab in the gutter area. + (update-tab-in-gutter): reset the buffers in the tab. + + * dumped-lisp.el (preloaded-file-list): dump gutter-items. + + * buffer.el (switch-to-buffer): run switch-to-buffer-hooks. + (switch-to-buffer-hooks): new hook. + + * toolbar.el (default-toolbar-position): fix typo. + +1999-07-16 Andy Piper + + * gui.el (make-dialog-frame): turn off gutters for dialogs. + +1999-07-15 Didier Verna + + * cus-edit.el (custom-prompt-variable): optional third arg makes + prompt for a comment string. + (customize-set-value): optional prefix makes this function handle + variable comments. + (customize-set-variable): ditto. + (customize-save-variable): ditto. + (customize-customized): handle custom comments. + (customize-save-customized): ditto. + (custom-variable-state-set): ditto. + (custom-face-state-set): ditto. + (customize-saved): ditto. + (custom-variable-set): ditto. + (custom-face-set): ditto. + (custom-variable-save): ditto. + (custom-face-save): ditto. + (custom-variable-reset-saved): ditto. + (custom-face-reset-saved): ditto. + (custom-variable-reset-standard): ditto. + (custom-face-reset-standard): ditto. + (custom-comment-face): new face. + (custom-comment-tag-face): ditto. + (custom-comment): new widget. + (custom-comment-create): new function. + (custom-comment-delete): ditto. + (custom-comment-value-set): ditto. + (custom-comment-show): ditto. + (custom-comment-invisible-p): ditto. + (custom-variable-value-create): create a comment field widget. + (custom-face-value-create): ditto. + (custom-variable-menu): new entry for adding a custom comment. + (custom-face-menu): ditto. + (custom-save-variables): possibly save custom comments. + (custom-save-faces): ditto. + + * cus-face.el (custom-set-faces): the arguments can now have a + custom comment as fourth argument. + + * custom.el (custom-set-variables): the arguments can now have a + custom comment as fifth element. + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-13 SL Baur + + * lib-complete.el (read-library-name): Revert previous change. + (read-library): Ditto. + +1999-06-24 Karl M. Hegbloom + + * packages.el (packages-package-list): Capitalize docstring. + + * packages.el (packages-find-package-library-path): Use #'nconc + rather than #'append to reduce consing -- #'mapcar uses Flist, + which returns a freshly consed list. #'append would create yet + another fresh list, using Fmake_list in concat. + + * packages.el (package-provide): Use setq with remassq like it + says in its docstring. + +1999-07-06 SL Baur + + * lib-complete.el (progn-with-message): Fix typo. + +1999-07-06 SL Baur + + * mule/mule-misc.el (char-octet): Make function match docstring. + From Katsumi Yamaoka + +1999-06-15 Karl M. Hegbloom + + * wid-edit.el (widget-documentation): corrected spelling error. + +1999-06-23 Jonathan Marten + + * x-win-sun.el (x-win-init-sun): Don't rebind Find and Sh-find + keys if already bound + +1999-07-06 SL Baur + + * lib-complete.el (progn-with-message): Revert previous changes. + +1999-06-24 Bob Weiner + + * lib-complete.el (find-library): + (find-library-other-window): + (find-library-other-frame): Completely rewrote + so that these functions actually work when called non-interactively. + Also made them handle LIBRARY arguments which end with .el or .elc. + +1999-06-24 Bob Weiner + + * simple.el (indent-new-comment-line): Locally bound + `block-comment-start' to `comstart' or else when this is called + from do-auto-fill, e.g. in Lisp mode, it will insert any non-nil + `block-comment-start' value, ignoring any existing spacing after a + comment prefix in the previous line and producing ugly comments. + +1999-06-23 Bob Weiner + + * list-mode.el (mouse-choose-completion): + (choose-completion): + (completion-switch-to-minibuffer): Added. + ([Tab]): [Tab] previously switched to the minibuffer + but since [space] does that and since most applications in the + world use [Tab] to select the next item in a list, do that in the + *Completions* buffer too. This will cause the least confusion + among the largest population of users. -- Bob Weiner, BeOpen.com, + 06/23/1999. + +1999-06-22 Bob Weiner + + * help.el (help-buffer-name): Added support for a null value + of `help-buffer-prefix-string' since some buffers require no + prefix. + +1999-06-20 Bob Weiner + + * list-mode.el (completion-list-mode-quit): Added and bound to {q} + in the completion-list-mode-map to bury the completions buffer + even when the minibuffer is no longer active. + +1999-06-20 Bob Weiner + + * list-mode.el (list-mode): It is visually disconcerting to have + the text cursor disappear within list buffers, especially when + moving from window to window, so leave it visible. + +1999-07-01 SL Baur + + * menubar-items.el (default-menubar): Conditionalize the bug + report menu item (which may not be possible in this XEmacs). + Reported by: Ken'ichi Handa + +1999-06-30 SL Baur + + * subr.el (with-current-buffer): DOC string fix. + Suggested by Bob Weiner + +1999-06-25 Charles G Waldman + + * cus-face.el (custom-face-italic): insert missing args + +1999-06-24 Michael Sperber [Mr. Preprocessor] + + * packages.el (package-locations): Changed default early package + hierarchies to ~/.xemacs/mule-packages and + ~/.xemacs/xemacs-packages. + +1999-06-23 SL Baur + + * mule/mule-category.el (Top Level): ASCII is also latin-1. + +1999-06-15 Michael Sperber [Mr. Preprocessor] + + * packages.el (package-locations): Changed default early package + hierarchy to ~/.xemacs/packages. + (package-locations): Removed `packages' as a possible name for a + late package hierarchy. + +1999-06-20 MORIOKA Tomohiko + + * mule/mule-category.el (word-combining-categories): Set up new + variable. + (word-separating-categories): Likewise. + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + +1999-06-17 Robert Pluim + + * font-menu.el (font-menu-set-font): allow for nil specification + of font size. + 1999-06-16 MORIOKA Tomohiko * mule/thai-xtis.el: Specify `columns' of the charset `thai-xtis' @@ -38,10 +890,29 @@ * mule/cyrillic.el (cyrillic-koi8-r-decode-table): Use NBSP of ISO 8859-5 instead of ISO 8859-1. -1999-06-04 MORIOKA Tomohiko +1999-06-15 SL Baur - * files.el (insert-file-contents-literally): Treat file as binary; - call file-name-handlers. [sync with Emacs 20.3.10] + * mule/vietnamese.el (viet-vscii-encode-table): Use split-char. + (viet-viscii-encode-table): Ditto. + + * mule/mule-misc.el: Delete split-char & split-char-or-char-int. + Make obsolete definition of char-octet. + +1999-06-14 SL Baur + + * subr.el: Move no-Mule make-char ... + * help-nomule.el (make-char): To here. + (string-width): Make Mule compatibility alias. + +1999-06-15 Andy Piper + + * select.el (get-selection-no-error): really make there be no-error. + (get-selection): revert to original. + +1999-06-11 Andy Piper + + * select.el (selection-sets-clipboard): renamed. + (own-selection): use it. 1999-06-11 XEmacs Build Bot @@ -59,13 +930,13 @@ 1999-06-10 Jan Vroonhof - * cus-face.el: - * cus-edit.el: - * faces.el: - (custom): - (face-spec-set): - * faces.el (frob-face-property): - * font-menu.el (font-menu-set-font): + * cus-face.el: + * cus-edit.el: + * faces.el: + (custom): + (face-spec-set): + * faces.el (frob-face-property): + * font-menu.el (font-menu-set-font): Actually apply changes from 1999-03-17 1999-06-10 Andy Piper @@ -218,7 +1089,7 @@ (mswindows-font-menu-font-data): ditto. (mswindows-font-menu-load-font): ditto. - * x-font-menu.el (x-reset-device-font-menus): made device specific. + * x-font-menu.el (x-reset-device-font-menus): made device specific. (x-font-menu-font-data): ditto. (x-font-menu-load-font): ditto. @@ -568,12 +1439,12 @@ 1999-02-19 Jan Vroonhof - * x-faces.el (x-init-global-faces): Add default tag to specifiers, + * x-faces.el (x-init-global-faces): Add default tag to specifiers, so they can be overridden by x-init-face-from-resources. Additionally specify the font name also with an x tag. 1999-03-08 Andy Piper - + * package-get.el (package-get-base): autoload. * menubar-items.el (default-menubar): add update menu item. Fix @@ -624,12 +1495,12 @@ 1999-03-03 Martin Buchholz - * menubar-items.el (default-menubar): + * menubar-items.el (default-menubar): Implement the ``Mule->Set coding system of process'' menu item. 1999-02-18 Martin Buchholz - * files.el (auto-mode-alist): Use c-mode for *.i pre-processed cpp + * files.el (auto-mode-alist): Use c-mode for *.i pre-processed cpp files - Change some `if's to `when's @@ -706,7 +1577,7 @@ 1999-02-15 Martin Buchholz - * paths.el: + * paths.el: - improved automounter tmp directory support. - support 4 (!) empirically discovered automounter conventions @@ -793,7 +1664,7 @@ 1998-12-30 Martin Buchholz - * font.el (font-default-object-for-device): + * font.el (font-default-object-for-device): Oops! This `or' can't be replaced by `unless'. Fixed inability to run w3, among other things. @@ -806,7 +1677,7 @@ 1998-12-23 Hrvoje Niksic - * mouse.el (default-mouse-motion-handler): Disable help echo while + * mouse.el (default-mouse-motion-handler): Disable help echo while in the minibuffer. 1998-12-28 Martin Buchholz @@ -862,7 +1733,7 @@ 1998-11-30 Hrvoje Niksic - * cus-dep.el (Custom-make-dependencies): Be smarter about trapping + * cus-dep.el (Custom-make-dependencies): Be smarter about trapping errors. 1998-12-04 Hrvoje Niksic @@ -911,7 +1782,7 @@ bytecompile time. 1998-11-30 Martin Buchholz - + * x-win-xfree86.el: * x-win-sun.el (x-win-init-sun): * x-win-sun.el: @@ -1122,7 +1993,7 @@ 1998-11-26 Jan Vroonhof - * faces.el (get-custom-frame-properties): Revert Hrvoje Niksic change + * faces.el (get-custom-frame-properties): Revert Hrvoje Niksic change of Dec 4, 1997. 1998-11-25 Hrvoje Niksic @@ -1156,20 +2027,20 @@ (package-get-remove-copy): Default to 't' we no longer need this kludge as we do not currently use depenencies. - + (package-get-was-current): New variable. (package-get-require-base): New 'force-current' argument. (package-get-update-base): idem (package-get-package-provider): idem (package-get-locate-index-file): New 'no-remote' argument. (package-get-locate-file): idem. - + (package-get-maybe-save-index): New function. (package-get-update-base): Use it. 1998-10-28 Greg Klanderman - * package-get.el (package-get-remote): default to nil; by default, + * package-get.el (package-get-remote): default to nil; by default, don't go out to the net via EFS. They must select a download site. (package-get-download-sites): new variable. (package-get-download-menu): new function. @@ -1184,22 +2055,22 @@ * package-get.el (package-get): bugfix code checking installed version for case where package is not currently installed. (package-get-require-signed-base-updates): new variable. - (package-get-update-base-from-buffer): remove REMOTE-SOURCE arg, it was + (package-get-update-base-from-buffer): remove REMOTE-SOURCE arg, it was deemed not a goot thing. Use the variable package-get-allow-unsigned-base-updates instead. 1998-10-16 Greg Klanderman - * package-get.el (package-get): Don't install an older version than + * package-get.el (package-get): Don't install an older version than we already have unless explicitly told to. Issue a warning. * package-ui.el (pui-add-required-packages): when adding dependencies, don't add packages that are up to date. - (pui-package-symbol-char): Don't consider a package out of date + (pui-package-symbol-char): Don't consider a package out of date if you have a newer version installed than the latest version in package-get-base. - * package-get.el (package-get-base-filename): document that it may + * package-get.el (package-get-base-filename): document that it may be a path relative to package-get-remote; new default value. (package-get-locate-file): new function. (package-get-update-base): use it to expand package-get-base-filename. @@ -1222,7 +2093,7 @@ * cus-face.el (custom-set-face-update-spec): Add autoload cookie 1998-10-20 Malcolm Box - + * etags.el (find-tag-default): Run find-tag-hook using run-hooks rather than funcall @@ -1243,7 +2114,7 @@ 1998-10-14 Jan Vroonhof * auto-save.el: expand-file 'auto-save-*-dir' at runtime not at - dump time. + dump time. 1998-10-15 Greg Klanderman @@ -1282,7 +2153,7 @@ 1998-10-12 Jan Vroonhof - * menubar-items.el (default-menubar): pui-list-package has nothing + * menubar-items.el (default-menubar): pui-list-package has nothing to with Customize. Move all the package stuff to a new Item in Options. * package-ui.el (pui-menu): Add menu and Popup menu. @@ -1378,9 +2249,9 @@ * package-admin.el (package-admin-delete-binary-package): General cleanup. Remove unnessary use of progn and - save-excursion. + save-excursion. (package-admin-delete-binary-package): Do NOT mess with file - modes. That is evil. + modes. That is evil. (package-admin-delete-binary-package): Wrap all deleting in condition-case. The data in MANIFEST is untrustworthy. (package-admin-delete-binary-package): Let the OS worry about non @@ -1414,8 +2285,8 @@ 1998-09-29 Colin Rafferty - * sound.el (default-sound-directory-list): Initialize with all the - "sounds" directories in `data-directory-list'. It used to just be + * sound.el (default-sound-directory-list): Initialize with all the + "sounds" directories in `data-directory-list'. It used to just be the first one. * packages.el (locate-data-directory-list): Created. This gives @@ -1426,7 +2297,7 @@ * minibuf.el (read-from-minibuffer): No longer bind help-form but make a binding in the local keymap until help-char handling is - improved. + improved. * help.el (help-keymap-with-help-key): Provide keymap with help binding. @@ -1447,7 +2318,7 @@ 1998-09-21 Martin Buchholz - * bytecomp.el (byte-compile-buffer-substring): + * bytecomp.el (byte-compile-buffer-substring): Fix for: (byte-compile (defun f () (buffer-substring))) ==> ** buffer-substring called with 3 args, but requires 0-3 - new code not only works, but is more readable, too. @@ -1525,7 +2396,7 @@ 1998-08-27 Jan Vroonhof * x-font-menu.el (font-menu-set-font): Add "pt" units to size - argument. + argument. 1998-09-03 Darryl Okahata @@ -1533,14 +2404,14 @@ keyword `:completion-string', which allows the programmer to change the "Possible completions are:" prompt. - * menubar-items.el: Added new pulldown menu-pick to start up the + * menubar-items.el: Added new pulldown menu-pick to start up the visual package browser/installer: Options->Customize->List Packages * package-admin.el: Added hooks for installing under both Unix and MS Windows. Does additional error checking. No longer - calls "add-big-package.sh" to install packages under Unix; now + calls "add-big-package.sh" to install packages under Unix; now calls gunzip & tar directly. * package-get.el: Added ability to install packages from files @@ -1553,7 +2424,7 @@ Changed all occurences of `concat' to use `expand-file-name'. * package-ui.el: New file which implements the main visual - package browser/installer, which is started via a menu pick or + package browser/installer, which is started via a menu pick or M-x pui-list packages. 1998-09-03 Hrvoje Niksic @@ -1599,8 +2470,8 @@ 1998-08-19 Michael Sperber [Mr. Preprocessor] - * loadup.el: - * make-docfile.el: + * loadup.el: + * make-docfile.el: * update-elc.el: Don't set `source-directory' (now defunct as a global variable) no more. @@ -1620,7 +2491,7 @@ * faces.el (set-face-property): (set-face-dim-p): (face-dim-p): updated the doc strings now that the dim property isn't - tty-specific. + tty-specific. (face-equal): the dim property is now a common one. * cus-face.el (custom-face-attributes): New face attribute: `dim' @@ -1663,8 +2534,8 @@ 1998-08-01 Kai Haberzettl - * startup.el(startup-splash-frame-body): - Update Copyright notice in splash screen + * startup.el(startup-splash-frame-body): + Update Copyright notice in splash screen 1998-07-20 Greg Klanderman @@ -1717,7 +2588,7 @@ 1998-07-16 Colin Rafferty * menubar-items.el (default-menubar): Removed references to - `data-directory', and use `locate-data-file' instead, and made + `data-directory', and use `locate-data-file' instead, and made then greyed out if they don't exist. 1998-07-14 Oscar Figueiredo @@ -1798,7 +2669,7 @@ * Symbols that have been obsolete for at least 3 years removed. - * cl-macs.el (cl-parse-loop-clause): Delete obsolete references to + * cl-macs.el (cl-parse-loop-clause): Delete obsolete references to screen- functions. (toplevel): remove setf methods for screen functions. * cl-macs.el (extent-data): defsetf removed. @@ -1943,7 +2814,7 @@ * faces.el (xpm-color-symbols): remove hardcoded defaults these are handled by the gui-element face fallbacks now. - + * x-faces.el: default gui-element face to "background" as well as the default face. @@ -1957,7 +2828,7 @@ corresponding to `page-delim' goes first and the hack in `forward-paragraph' will work. With bug analysis from Bob Weiner - + 1998-06-29 Kyle Jones * subr.el (remove-hook): When checking the hook value @@ -1982,7 +2853,7 @@ 1998-06-29 Kyle Jones - * subr.el (remove-hook): Don't treat the hook value as a + * subr.el (remove-hook): Don't treat the hook value as a list unless it is both consp and not functionp. 1998-06-29 SL Baur @@ -2052,7 +2923,7 @@ 1998-06-15 Jonathan Harris - * minibuf.el: make read-color-completion-table call + * minibuf.el: make read-color-completion-table call (mswindows-color-list for mswindows devices. 1998-06-18 Sam Mikes @@ -2108,7 +2979,7 @@ (Info-save-auto-generated-dir): New variable (Info-maybe-update-dir): Use `Info-auto-generate-directory' (Info-build-dir-anew): Second parameter removed. Use - `Info-save-auto-generated-dir' + `Info-save-auto-generated-dir' (Info-rebuild-dir): Ditto 1998-06-02 Christoph Wedler @@ -2216,7 +3087,7 @@ 1998-06-02 Didier Verna * cus-face.el (custom-face-attributes): generalized the use of - toggle buttons for boolean attributes. + toggle buttons for boolean attributes. Re-ordered the items a bit. 1998-06-01 SL Baur @@ -2365,7 +3236,7 @@ Wed May 27, 1998 Darryl Okahata * x-select.el: selection cleanup. (x-cut-copy-clear-internal) moved to (cut-copy-clear-internal) in select.el. Ditto for (x-delete-primary-selection) (x-kill-primary-selection) - (x-copy-primary-selection). + (x-copy-primary-selection). (own-clipboard): new function. * msw-select.el: use the new kill/delete/copy/cut-copy-clear @@ -2473,7 +3344,7 @@ Wed May 27, 1998 Darryl Okahata comint-process-echoes setting to t. 1998-05-17 Michael Sperber [Mr. Preprocessor] - + * packages.el (packages-no-package-hierarchy-regexp): Introduced and used following the interface change of `paths-find-recursive-path'. @@ -2487,7 +3358,7 @@ Wed May 27, 1998 Darryl Okahata 1998-05-16 Hrvoje Niksic - * simple.el (delete-forward-p): Make it a defun; do X garbage only + * simple.el (delete-forward-p): Make it a defun; do X garbage only on X devices, rather than on all non-TTY devices. 1998-05-16 Kirill M. Katsnelson @@ -2567,11 +3438,11 @@ Wed May 27, 1998 Darryl Okahata 1998-05-15 Kirill M. Katsnelson - * device.el (device-pixel-width): - (device-pixel-height): - (device-mm-width): - (device-mm-height): - (device-bitplanes): + * device.el (device-pixel-width): + (device-pixel-height): + (device-mm-width): + (device-mm-height): + (device-bitplanes): (device-color-cells): Swapped parameters to device-system-metric according to the interface change. @@ -2782,8 +3653,8 @@ Wed May 27, 1998 Darryl Okahata 1998-05-10 Kirill M. Katsnelson * device.el: (device-pixel-width): Reflected name/parameters - change to device-system-metric. - (device-pixel-height): Ditto. + change to device-system-metric. + (device-pixel-height): Ditto. (device-mm-width): Ditto. (device-mm-height): Ditto. (device-bitplanes): Ditto. @@ -2855,11 +3726,11 @@ Wed May 27, 1998 Darryl Okahata 1998-04-18 Kirill M. Katsnelson - * device.el (device-pixel-height): - (device-pixel-width): - (device-mm-width): - (device-mm-height): - (device-bitplanes): + * device.el (device-pixel-height): + (device-pixel-width): + (device-mm-width): + (device-mm-height): + (device-bitplanes): (device-color-cells): Moved these 6 functions from device.c; they all use single (device-system-metrics) call. @@ -2868,7 +3739,7 @@ Wed May 27, 1998 Darryl Okahata * dumped-lisp.el (preloaded-file-list): x-menubar.el and x-toolbar.el were renamed. - * menubar-items.el: + * menubar-items.el: * toolbar-items.el: Renamed from x-menubar/x-toolbar. Suggested by Hrvoje Niksic @@ -2914,12 +3785,12 @@ Wed May 27, 1998 Darryl Okahata 1998-05-03 Hrvoje Niksic - * help.el (function-arglist): If no arguments are documented for a + * help.el (function-arglist): If no arguments are documented for a subr, print nothing rather than incorrect output. 1998-05-05 SL Baur - * cmdloop.el (command-error): Update bail-out error message to use + * cmdloop.el (command-error): Update bail-out error message to use `emacs-program-name'. * lib-complete.el: Remove reader macro cruft. @@ -3042,7 +3913,7 @@ Wed May 27, 1998 Darryl Okahata 1998-04-30 Hrvoje Niksic - * modeline.el (defining-kbd-macro): Restore modeline indication of + * modeline.el (defining-kbd-macro): Restore modeline indication of kbd-macro being recorded. (add-minor-mode): Simplify docstring. (modeline-minor-mode-menu): Remove stuff. @@ -3050,7 +3921,7 @@ Wed May 27, 1998 Darryl Okahata 1998-04-29 Andy Piper * code-process.el (call-process): dynamically decide process - coding type. + coding type. 1998-04-29 Jim Radford @@ -3148,7 +4019,7 @@ Wed May 27, 1998 Darryl Okahata 1998-04-25 Oscar Figueiredo * info.el (Info-parse-dir-entries): Fixed regexp - (Info-build-dir-anew): Remove full suffix and capitalize info file + (Info-build-dir-anew): Remove full suffix and capitalize info file name for files with no @direntry (Info-batch-rebuild-dir): New function (Info-suffixed-file): Check for regular files instead of simple @@ -3262,11 +4133,11 @@ Wed Apr 22 12:59:35 1998 Andy Piper 1998-04-19 Oscar Figueiredo * info.el (Info-maybe-update-dir): Bug fix in `conservative' behaviour - (Info-build-dir-anew): Add a final newline. - (Info-build-dir-anew): Do not issue warning when rebuilding policy + (Info-build-dir-anew): Add a final newline. + (Info-build-dir-anew): Do not issue warning when rebuilding policy is `always' (Info-rebuild-dir): Ditto - + * dumped-lisp.el (preloaded-file-list): Added ldap.el 1998-04-21 SL Baur @@ -3280,7 +4151,7 @@ Wed Apr 22 12:59:35 1998 Andy Piper 1998-04-19 SL Baur - * packages.el (package-locations): infodock-packages must override + * packages.el (package-locations): infodock-packages must override mule-packages and packages. 1998-04-19 Jonathan Harris @@ -3309,7 +4180,7 @@ Wed Apr 22 12:59:35 1998 Andy Piper * packages.el, setup-paths.el: Set various path searching depths to 1. - * packages.el (packages-hierarchy-depth): + * packages.el (packages-hierarchy-depth): (packages-load-path-depth): Introduced and used. * setup-paths.el (paths-load-path-depth): Introduced and used. @@ -3319,12 +4190,12 @@ Wed Apr 22 12:59:35 1998 Andy Piper 1998-04-15 Michael Sperber [Mr. Preprocessor] - * setup-paths.el (paths-construct-info-path): Removed + * setup-paths.el (paths-construct-info-path): Removed dependency on behavior of (file-name-as-directory ""). 1998-04-09 Oscar Figueiredo - * ldap.el (ldap-search): Adapt to the new low-level API using ldap + * ldap.el (ldap-search): Adapt to the new low-level API using ldap lisp objects 1998-04-14 Michael Sperber [Mr. Preprocessor] @@ -3336,7 +4207,7 @@ Wed Apr 22 12:59:35 1998 Andy Piper * wid-edit.el: We cannot just set the help-echo or balloon-help properties for an extent based on the :help-echo widget property, since help-echo and balloon-help cause an EXTENT to - get passed in, where :help-echo functions are expecting a WIDGET + get passed in, where :help-echo functions are expecting a WIDGET 1998-04-15 Kirill M. Katsnelson @@ -3452,7 +4323,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * dump-paths.el, startup.el: Removed package-path as a global variable. - * package-admin.el (package-admin-add-single-file-package): + * package-admin.el (package-admin-add-single-file-package): (package-admin-add-binary-package): Changed package-path to late-packages. @@ -3470,7 +4341,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * x-toolbar.el: Added toolbar-vector-xxxxxx defvars. Modified initial-toolbar-spec to use new toolbar-vector-xxxxxx defvars. This - eases the use of toolbar-add/kill-item functions. + eases the use of toolbar-add/kill-item functions. 1998-04-07 Kirill M. Katsnelson @@ -3484,11 +4355,11 @@ Thu Apr 16 12:59:35 1998 Andy Piper (Info-rebuild-dir): Appropriately parse multi-line description strings, and multi-section dir files. Issue warning when dir is rebuilt as temporary - (Info-build-dir-anew): Issue warning when dir is built as + (Info-build-dir-anew): Issue warning when dir is built as temporary 1998-04-04 Kirill M. Katsnelson - + * list-mode.el (list-mode-map): Bind highlight motion commands to standard keys left, right, C-b and C-f. @@ -3508,7 +4379,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * isearch-mode.el (isearch-just-started): New variable. (isearch-mode): Set it. - (isearch-repeat): Advance one character forward only if the search + (isearch-repeat): Advance one character forward only if the search was successful, and was not just started. (isearch-repeat): Clear isearch-just-started. @@ -3545,7 +4416,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-30 Kyle Jones - * loaddefs.el: Don't set debug-ignored-errors; leave + * loaddefs.el: Don't set debug-ignored-errors; leave its default value set to nil. 1998-03-29 Damon Lipparelli @@ -3555,7 +4426,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-29 Oscar Figueiredo * info.el (Info-rebuild-outdated-dir): New custom var - (Info-insert-node): Create/update dir file when needed, ie when it + (Info-insert-node): Create/update dir file when needed, ie when it does not exist or is older than some info files in directory 1998-04-01 Michael Sperber [Mr. Preprocessor] @@ -3750,7 +4621,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-18 SL Baur * frame.el (frame-initialize): Use `delete-console' instead of - `delete-device' to delete the stream console to match the usage in + `delete-device' to delete the stream console to match the usage in Fkill_emacs. 1998-03-16 SL Baur @@ -3790,11 +4661,11 @@ Sun Mar 29 1998 Andy Piper 1998-03-03 Kirill M. Katsnelson * msw-glyphs.el: New file. Defines TTY-style glyphs for - mswindows. Must be reworked along with glyphs.el, or + mswindows. Must be reworked along with glyphs.el, or merged into it, after there is images support. * dumped-lisp.el (preloaded-file-list): Dump msw-glyphs.el when - 'mswindows. + 'mswindows. 1998-03-13 SL Baur @@ -3804,7 +4675,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-11 Pete Ware - * files.el (set-auto-mode): If a mode is not fboundp, check to see + * files.el (set-auto-mode): If a mode is not fboundp, check to see if there is an existing package that handles it and warn the user about that mode. @@ -3825,7 +4696,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-10 Glynn Clements - * files.el (backup-enable-predicate): fix breakage introduced + * files.el (backup-enable-predicate): fix breakage introduced by TMPDIR patch. 1998-03-09 Kyle Jones @@ -4003,7 +4874,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper decided in `mouse-drag-modeline'. (mouse-drag-modeline): A button release event is considered a mouse click is both X (modeline scroll) and Y (modeline drag) pos - stay unchanged. + stay unchanged. 1998-02-25 SL Baur @@ -4054,18 +4925,18 @@ Tue Feb 17 12:50:37 1998 Andy Piper if it exists, becasuse 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 + showing the temp buffer. killing the buffer fucks with the window configuration, hosing temp-buffer-show-function. 1998-02-23 Didier Verna - * modeline.el (mouse-drag-modeline): + * modeline.el (mouse-drag-modeline): - Always scroll the modeline that was originally clicked on. - - Use x pixels instead of x characters (which doesn't work anyway) + - Use x pixels instead of x characters (which doesn't work anyway) as horizontal reference for modeline dragging. This allows us to keep on dragging the modeline even if the motion event occurs in - another window. + another window. 1998-02-23 Didier Verna @@ -4097,7 +4968,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1998-02-17 Didier Verna * mouse.el (default-mouse-track-set-point-in-window): rewrote this - function to handle correctly the case of a toolbar one side of the + function to handle correctly the case of a toolbar one side of the window: scrolling will not necessarily happen. 1998-02-17 Kyle Jones @@ -4116,20 +4987,20 @@ Tue Feb 17 12:50:37 1998 Andy Piper * autoload.el (generate-file-autoloads-1): Don't force an extra line out when copying on-the-same line autoloads. - * x-menubar.el (default-menubar): Add Sokoban to the menubar if it + * x-menubar.el (default-menubar): Add Sokoban to the menubar if it is installed. 1998-02-14 Martin Buchholz - * x11/x-win-xfree86.el (x-win-init-xfree86): - * x11/x-win-sun.el (x-win-init-sun): - * x11/x-init.el (x-initialize-compose): + * x11/x-win-xfree86.el (x-win-init-xfree86): + * x11/x-win-sun.el (x-win-init-sun): + * x11/x-init.el (x-initialize-compose): * prim/simple.el: - (backward-or-forward-kill-sexp): - (backward-or-forward-kill-sentence): - (backward-or-forward-kill-word): - (backward-or-forward-delete-char): - * prim/isearch-mode.el (isearch-help-or-delete-char): + (backward-or-forward-kill-sexp): + (backward-or-forward-kill-sentence): + (backward-or-forward-kill-word): + (backward-or-forward-delete-char): + * prim/isearch-mode.el (isearch-help-or-delete-char): Use x-keysym-on-keyboard-sans-modifiers-p instead of x-keysym-on-keyboard-p to detect backspace. Use symbols instead of strings (now deprecated) with x-keysym-*-p. @@ -4228,7 +5099,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1997-06-15 Richard Stallman * text-mode.el (text-mode): Let all-white lines separate paragraphs. - + 1997-06-11 Richard Stallman * text-mode.el (paragraph-indent-text-mode): @@ -4321,7 +5192,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * about.el: Add xemacs.org email manager. - * package-get-base.el (package-get-base): Updated with most recent + * package-get-base.el (package-get-base): Updated with most recent package updates. 1998-01-14 Jens-Ulrik Holger Petersen @@ -4338,7 +5209,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper (describe-key): Use `princ' "%s" to print object. (describe-function-1): Use `princ' "%s" to print object. Commented out alias lines removed. - (help-pretty-print-limit): New variable to control pretty-printing + (help-pretty-print-limit): New variable to control pretty-printing of variable values. (help-maybe-pretty-print-value): Steve wins! Renamed back from `help-pretty-print-value' again. Only print-print when OBJECT is @@ -4357,9 +5228,9 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1998-01-13 Martin Buchholz - * lisp/packages.el: - * lisp/package-admin.el: - * lisp/build-report.el: + * lisp/packages.el: + * lisp/package-admin.el: + * lisp/build-report.el: Fix typos. 1998-01-14 Christoph Wedler @@ -4542,10 +5413,10 @@ Tue Feb 17 12:50:37 1998 Andy Piper * package-get.el: Changes to work with real data. From Pete Ware - * packages.el (packages-reload-autoloads): Guard load for the time + * packages.el (packages-reload-autoloads): Guard load for the time being. - * update-elc.el ("packages.el"): Force loading packages.el instead + * update-elc.el ("packages.el"): Force loading packages.el instead of possibly out-of-date packges.elc. * make-docfile.el ("packages.el"): Ditto. @@ -4601,7 +5472,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1997-12-29 Colin Rafferty - * packages.el (packages-find-packages-1): Made it signal a warning + * packages.el (packages-find-packages-1): Made it signal a warning for an error in an auto-autoload.el file. 1997-12-30 SL Baur @@ -4742,10 +5613,10 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1997-12-18 SL Baur - * startup.el (set-default-load-path): Make sure lisp and site-lisp + * startup.el (set-default-load-path): Make sure lisp and site-lisp get trailing slashes when added to the load-path. - * x-init.el (init-x-win): Locate where XEmacs X localization files + * x-init.el (init-x-win): Locate where XEmacs X localization files are. 1997-12-18 Kyle Jones @@ -4840,11 +5711,11 @@ Tue Feb 17 12:50:37 1998 Andy Piper * startup.el (set-default-load-path): Only search package-path when not running temacs. - * dumped-lisp.el (preloaded-file-list): Remove Egg/Its dumped lisp + * dumped-lisp.el (preloaded-file-list): Remove Egg/Its dumped lisp files. * loadup.el: Correct commentary. Reformatting. - (really-early-error-handler): Use absolute path to the + (really-early-error-handler): Use absolute path to the first dumped-lisp.el file. (really-early-error-handler): Print full path name of each dumped lisp file (inherited from InfoDock). @@ -4884,7 +5755,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1997-12-15 Hrvoje Niksic - * modeline.el (mouse-drag-modeline): Give the modeline a "pressed" + * modeline.el (mouse-drag-modeline): Give the modeline a "pressed" look. 1997-12-16 Oscar Figueiredo @@ -4900,7 +5771,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1997-12-17 Hrvoje Niksic - * etags.el (get-tag-table-buffer): Use explicit lists as arguments + * etags.el (get-tag-table-buffer): Use explicit lists as arguments to `ecase'. 1997-12-14 SL Baur diff --git a/lisp/buffer.el b/lisp/buffer.el index c829284..e7920c0 100644 --- a/lisp/buffer.el +++ b/lisp/buffer.el @@ -32,6 +32,9 @@ ;;; Code: +(defvar switch-to-buffer-hooks nil + "Hooks to run after a recorded buffer switch.") + (defun switch-to-buffer (bufname &optional norecord) "Select buffer BUFNAME in the current window. BUFNAME may be a buffer or a buffer name and is created if it did not exist. @@ -65,6 +68,8 @@ the window-buffer correspondences." (next-window (minibuffer-window)) (selected-window)) buf) + ;; XEmacs change + (or norecord (run-hook-with-args 'switch-to-buffer-hooks buf)) buf)) (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) diff --git a/lisp/code-files.el b/lisp/code-files.el index c07749a..87306b8 100644 --- a/lisp/code-files.el +++ b/lisp/code-files.el @@ -374,9 +374,6 @@ with the file contents. This is better than simply deleting and inserting the whole thing because (1) it preserves some marker positions and (2) it puts less data in the undo list. -NOTE: When Mule support is enabled, the REPLACE argument is -currently ignored. - The coding system used for decoding the file is determined as follows: 1. `coding-system-for-read', if non-nil. diff --git a/lisp/config.el b/lisp/config.el index 6952081..50fdd03 100644 --- a/lisp/config.el +++ b/lisp/config.el @@ -29,7 +29,7 @@ ;;; Code: -(defvar config-value-file (expand-file-name "config.values" exec-directory) +(defvar config-value-file (expand-file-name "config.values" doc-directory) "File containing configuration parameters and their values.") (defvar config-value-hash-table nil diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index efe6ffb..5851776 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -617,7 +617,7 @@ when the action is chosen.") ;;; The Customize Commands -(defun custom-prompt-variable (prompt-var prompt-val) +(defun custom-prompt-variable (prompt-var prompt-val &optional comment) "Prompt for a variable and a value and return them as a list. PROMPT-VAR is the prompt for the variable, and PROMPT-VAL is the prompt for the value. The %s escape in PROMPT-VAL is replaced with @@ -627,10 +627,13 @@ If the variable has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If the variable has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value." +`:prompt-value' property of that widget will be used for reading the value. + +If optional COMMENT argument is non nil, also prompt for a comment and return +it as the third element in the list." (let* ((var (read-variable prompt-var)) - (minibuffer-help-form '(describe-variable var))) - (list var + (minibuffer-help-form '(describe-variable var)) + (val (let ((prop (get var 'variable-interactive)) (type (get var 'custom-type)) (prompt (format prompt-val var))) @@ -649,24 +652,36 @@ If the variable has a `custom-type' property, it must be a widget and the (symbol-value var)) (not (boundp var)))) (t - (eval-minibuffer prompt))))))) + (eval-minibuffer prompt)))))) + (if comment + (list var val + (read-string "Comment: " (get var 'variable-comment))) + (list var val)) + )) ;;;###autoload -(defun customize-set-value (var val) +(defun customize-set-value (var val &optional comment) "Set VARIABLE to VALUE. VALUE is a Lisp object. If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value." +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment." (interactive (custom-prompt-variable "Set variable: " - "Set %s to value: ")) + "Set %s to value: " + current-prefix-arg)) - (set var val)) + (set var val) + (cond ((string= comment "") + (put var 'variable-comment nil)) + (comment + (put var 'variable-comment comment)))) ;;;###autoload -(defun customize-set-variable (var val) +(defun customize-set-variable (var val &optional comment) "Set the default for VARIABLE to VALUE. VALUE is a Lisp object. If VARIABLE has a `custom-set' property, that is used for setting @@ -679,14 +694,24 @@ If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value. " +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment." (interactive (custom-prompt-variable "Set variable: " - "Set customized value for %s to: ")) + "Set customized value for %s to: " + current-prefix-arg)) (funcall (or (get var 'custom-set) 'set-default) var val) - (put var 'customized-value (list (custom-quote val)))) + (put var 'customized-value (list (custom-quote val))) + (cond ((string= comment "") + (put var 'variable-comment nil) + (put var 'customized-variable-comment nil)) + (comment + (put var 'variable-comment comment) + (put var 'customized-variable-comment comment)))) + ;;;###autoload -(defun customize-save-variable (var val) +(defun customize-save-variable (var val &optional comment) "Set the default for VARIABLE to VALUE, and save it for future sessions. If VARIABLE has a `custom-set' property, that is used for setting VARIABLE, otherwise `set-default' is used. @@ -698,11 +723,21 @@ If VARIABLE has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. If VARIABLE has a `custom-type' property, it must be a widget and the -`:prompt-value' property of that widget will be used for reading the value. " +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment." (interactive (custom-prompt-variable "Set and ave variable: " - "Set and save value for %s as: ")) + "Set and save value for %s as: " + current-prefix-arg)) (funcall (or (get var 'custom-set) 'set-default) var val) (put var 'saved-value (list (custom-quote val))) + (custom-push-theme 'theme-value var 'user 'set (list (custom-quote val))) + (cond ((string= comment "") + (put var 'variable-comment nil) + (put var 'saved-variable-comment nil)) + (comment + (put var 'variable-comment comment) + (put var 'saved-variable-comment comment))) (custom-save-all)) ;;;###autoload @@ -842,10 +877,12 @@ If SYMBOL is nil, customize all faces." (interactive) (let ((found nil)) (mapatoms (lambda (symbol) - (and (get symbol 'customized-face) + (and (or (get symbol 'customized-face) + (get symbol 'customized-face-comment)) (find-face symbol) (push (list symbol 'custom-face) found)) - (and (get symbol 'customized-value) + (and (or (get symbol 'customized-value) + (get symbol 'customized-variable-comment)) (boundp symbol) (push (list symbol 'custom-variable) found)))) (if (not found) @@ -859,10 +896,12 @@ If SYMBOL is nil, customize all faces." (interactive) (let ((found nil)) (mapatoms (lambda (symbol) - (and (get symbol 'saved-face) + (and (or (get symbol 'saved-face) + (get symbol 'saved-face-comment)) (find-face symbol) (push (list symbol 'custom-face) found)) - (and (get symbol 'saved-value) + (and (or (get symbol 'saved-value) + (get symbol 'saved-variable-comment)) (boundp symbol) (push (list symbol 'custom-variable) found)))) (if (not found ) @@ -1705,6 +1744,77 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (delete-region start (point))) found)) +;;; The `custom-comment' Widget. + +;; like the editable field +(defface custom-comment-face '((((class grayscale color) + (background light)) + (:background "gray85")) + (((class grayscale color) + (background dark)) + (:background "dim gray")) + (t + (:italic t))) + "Face used for comments on variables or faces" + :group 'custom-faces) + +;; like font-lock-comment-face +(defface custom-comment-tag-face + '((((class color) (background dark)) (:foreground "gray80")) + (((class color) (background light)) (:foreground "blue4")) + (((class grayscale) (background light)) + (:foreground "DimGray" :bold t :italic t)) + (((class grayscale) (background dark)) + (:foreground "LightGray" :bold t :italic t)) + (t (:bold t))) + "Face used for variables or faces comment tags" + :group 'custom-faces) + +(define-widget 'custom-comment 'string + "User comment" + :tag "Comment" + :help-echo "Edit a comment here" + :sample-face 'custom-comment-tag-face + :value-face 'custom-comment-face + :value-set 'custom-comment-value-set + :create 'custom-comment-create + :delete 'custom-comment-delete) + +(defun custom-comment-create (widget) + (let (ext) + (widget-default-create widget) + (widget-put widget :comment-extent + (setq ext (make-extent (widget-get widget :from) + (widget-get widget :to)))) + (set-extent-property ext 'start-open t) + (when (equal (widget-get widget :value) "") + (set-extent-property ext 'invisible t)) + )) + +(defun custom-comment-delete (widget) + (widget-default-delete widget) + (delete-extent (widget-get widget :comment-extent))) + +(defun custom-comment-value-set (widget value) + (widget-default-value-set widget value) + (if (equal value "") + (set-extent-property (widget-get widget :comment-extent) + 'invisible t) + (set-extent-property (widget-get widget :comment-extent) + 'invisible nil))) + +;; Those functions are for the menu. WIDGET is NOT the comment widget. It's +;; the global custom one +(defun custom-comment-show (widget) + (set-extent-property + (widget-get (widget-get widget :comment-widget) :comment-extent) + 'invisible nil)) + +(defun custom-comment-invisible-p (widget) + (extent-property + (widget-get (widget-get widget :comment-widget) :comment-extent) + 'invisible)) + ;;; The `custom-variable' Widget. (defface custom-variable-tag-face '((((class color) @@ -1870,23 +1980,40 @@ Otherwise, look up symbol in `custom-guess-type-alist'." :value value) children)))) (unless (eq custom-buffer-style 'tree) - ;; Now update the state. (unless (eq (preceding-char) ?\n) (widget-insert "\n")) - (if (eq state 'hidden) - (widget-put widget :custom-state state) - (custom-variable-state-set widget)) ;; Create the magic button. (let ((magic (widget-create-child-and-convert widget 'custom-magic nil))) (widget-put widget :custom-magic magic) (push magic buttons)) - ;; Update properties. - (widget-put widget :custom-form form) - (widget-put widget :buttons buttons) - (widget-put widget :children children) ;; Insert documentation. + ;; ### NOTE: this is ugly!!!! I need to do update the :buttons property + ;; before the call to `widget-default-format-handler'. Otherwise, I + ;; loose my current `buttons'. This function shouldn't be called like + ;; this anyway. The doc string widget should be added like the others. + ;; --dv + (widget-put widget :buttons buttons) (widget-default-format-handler widget ?h) + ;; The comment field + (unless (eq state 'hidden) + (let* ((comment (get symbol 'variable-comment)) + (comment-widget + (widget-create-child-and-convert + widget 'custom-comment + :parent widget + :value (or comment "")))) + (widget-put widget :comment-widget comment-widget) + ;; Don't push it !!! Custom assumes that the first child is the + ;; value one. + (setq children (append children (list comment-widget))))) + ;; Update the rest of the properties properties. + (widget-put widget :custom-form form) + (widget-put widget :children children) + ;; Now update the state. + (if (eq state 'hidden) + (widget-put widget :custom-state state) + (custom-variable-state-set widget)) ;; See also. (unless (eq state 'hidden) (when (eq (widget-get widget :custom-level) 1) @@ -1910,22 +2037,32 @@ Otherwise, look up symbol in `custom-guess-type-alist'." (value (if (default-boundp symbol) (funcall get symbol) (widget-get widget :value))) + (comment (get symbol 'variable-comment)) tmp - (state (cond ((setq tmp (get symbol 'customized-value)) + temp + (state (cond ((progn (setq tmp (get symbol 'customized-value)) + (setq temp + (get symbol 'customized-variable-comment)) + (or tmp temp)) (if (condition-case nil - (equal value (eval (car tmp))) + (and (equal value (eval (car tmp))) + (equal comment temp)) (error nil)) 'set 'changed)) - ((setq tmp (get symbol 'saved-value)) + ((progn (setq tmp (get symbol 'saved-value)) + (setq temp (get symbol 'saved-variable-comment)) + (or tmp temp)) (if (condition-case nil - (equal value (eval (car tmp))) + (and (equal value (eval (car tmp))) + (equal comment temp)) (error nil)) 'saved 'changed)) ((setq tmp (get symbol 'standard-value)) (if (condition-case nil - (equal value (eval (car tmp))) + (and (equal value (eval (car tmp))) + (equal comment nil)) (error nil)) 'standard 'changed)) @@ -1945,7 +2082,8 @@ Otherwise, look up symbol in `custom-guess-type-alist'." (memq (widget-get widget :custom-state) '(modified changed))))) ("Reset to Saved" custom-variable-reset-saved (lambda (widget) - (and (get (widget-value widget) 'saved-value) + (and (or (get (widget-value widget) 'saved-value) + (get (widget-value widget) 'saved-variable-comment)) (memq (widget-get widget :custom-state) '(modified set changed rogue))))) ("Reset to Standard Settings" custom-variable-reset-standard @@ -1954,6 +2092,8 @@ Otherwise, look up symbol in `custom-guess-type-alist'." (memq (widget-get widget :custom-state) '(modified set changed saved rogue))))) ("---" ignore ignore) + ("Add Comment" custom-comment-show custom-comment-invisible-p) + ("---" ignore ignore) ("Don't show as Lisp expression" custom-variable-edit (lambda (widget) (eq (widget-get widget :custom-form) 'lisp))) @@ -2005,18 +2145,34 @@ Optional EVENT is the location for the menu." (child (car (widget-get widget :children))) (symbol (widget-value widget)) (set (or (get symbol 'custom-set) 'set-default)) - val) + (comment-widget (widget-get widget :comment-widget)) + (comment (widget-value comment-widget)) + val) (cond ((eq state 'hidden) (error "Cannot set hidden variable")) ((setq val (widget-apply child :validate)) (goto-char (widget-get val :from)) (error "%s" (widget-get val :error))) ((memq form '(lisp mismatch)) + (when (equal comment "") + (setq comment nil) + ;; Make the comment invisible by hand if it's empty + (set-extent-property (widget-get comment-widget :comment-extent) + 'invisible t)) (funcall set symbol (eval (setq val (widget-value child)))) - (put symbol 'customized-value (list val))) + (put symbol 'customized-value (list val)) + (put symbol 'variable-comment comment) + (put symbol 'customized-variable-comment comment)) (t + (when (equal comment "") + (setq comment nil) + ;; Make the comment invisible by hand if it's empty + (set-extent-property (widget-get comment-widget :comment-extent) + 'invisible t)) (funcall set symbol (setq val (widget-value child))) - (put symbol 'customized-value (list (custom-quote val))))) + (put symbol 'customized-value (list (custom-quote val))) + (put symbol 'variable-comment comment) + (put symbol 'customized-variable-comment comment))) (custom-variable-state-set widget) (custom-redraw-magic widget))) @@ -2027,6 +2183,8 @@ Optional EVENT is the location for the menu." (child (car (widget-get widget :children))) (symbol (widget-value widget)) (set (or (get symbol 'custom-set) 'set-default)) + (comment-widget (widget-get widget :comment-widget)) + (comment (widget-value comment-widget)) val) (cond ((eq state 'hidden) (error "Cannot set hidden variable")) @@ -2034,14 +2192,34 @@ Optional EVENT is the location for the menu." (goto-char (widget-get val :from)) (error "%s" (widget-get val :error))) ((memq form '(lisp mismatch)) + (when (equal comment "") + (setq comment nil) + ;; Make the comment invisible by hand if it's empty + (set-extent-property (widget-get comment-widget :comment-extent) + 'invisible t)) (put symbol 'saved-value (list (widget-value child))) - (funcall set symbol (eval (widget-value child)))) + (custom-push-theme 'theme-value symbol 'user + 'set (list (widget-value child))) + (funcall set symbol (eval (widget-value child))) + (put symbol 'variable-comment comment) + (put symbol 'saved-variable-comment comment)) (t + (when (equal comment "") + (setq comment nil) + ;; Make the comment invisible by hand if it's empty + (set-extent-property (widget-get comment-widget :comment-extent) + 'invisible t)) (put symbol 'saved-value (list (custom-quote (widget-value child)))) - (funcall set symbol (widget-value child)))) + (custom-push-theme 'theme-value symbol 'user + 'set (list (custom-quote (widget-value + child)))) + (funcall set symbol (widget-value child)) + (put symbol 'variable-comment comment) + (put symbol 'saved-variable-comment comment))) (put symbol 'customized-value nil) + (put symbol 'customized-variable-comment nil) (custom-save-all) (custom-variable-state-set widget) (custom-redraw-magic widget))) @@ -2049,28 +2227,45 @@ Optional EVENT is the location for the menu." (defun custom-variable-reset-saved (widget) "Restore the saved value for the variable being edited by WIDGET." (let* ((symbol (widget-value widget)) - (set (or (get symbol 'custom-set) 'set-default))) - (if (get symbol 'saved-value) - (condition-case nil - (funcall set symbol (eval (car (get symbol 'saved-value)))) - (error nil)) - (signal 'error (list "No saved value for variable" symbol))) + (set (or (get symbol 'custom-set) 'set-default)) + (comment-widget (widget-get widget :comment-widget)) + (value (get symbol 'saved-value)) + (comment (get symbol 'saved-variable-comment))) + (cond ((or value comment) + (put symbol 'variable-comment comment) + (condition-case nil + (funcall set symbol (eval (car value))) + (error nil))) + (t + (signal 'error (list "No saved value for variable" symbol)))) (put symbol 'customized-value nil) + (put symbol 'customized-variable-comment nil) (widget-put widget :custom-state 'unknown) + ;; This call will possibly make the comment invisible (custom-redraw widget))) (defun custom-variable-reset-standard (widget) "Restore the standard setting for the variable being edited by WIDGET." (let* ((symbol (widget-value widget)) - (set (or (get symbol 'custom-set) 'set-default))) + (set (or (get symbol 'custom-set) 'set-default)) + (comment-widget (widget-get widget :comment-widget))) (if (get symbol 'standard-value) (funcall set symbol (eval (car (get symbol 'standard-value)))) (signal 'error (list "No standard setting known for variable" symbol))) + (put symbol 'variable-comment nil) (put symbol 'customized-value nil) - (when (get symbol 'saved-value) + (put symbol 'customized-variable-comment nil) + (when (or (get symbol 'saved-value) (get symbol 'saved-variable-comment)) (put symbol 'saved-value nil) + (custom-push-theme 'theme-value symbol 'user 'reset 'standard) + ;; As a special optimizations we do not (explictly) + ;; save resets to standard when no theme set the value. + (if (null (cdr (get symbol 'theme-value))) + (put symbol 'theme-value nil)) + (put symbol 'saved-variable-comment nil) (custom-save-all)) (widget-put widget :custom-state 'unknown) + ;; This call will possibly make the comment invisible (custom-redraw widget))) ;;; The `custom-face-edit' Widget. @@ -2225,6 +2420,7 @@ Match frames with dark backgrounds") (defun custom-face-value-create (widget) "Create a list of the display specifications for WIDGET." (let ((buttons (widget-get widget :buttons)) + children (symbol (widget-get widget :value)) (tag (widget-get widget :tag)) (state (widget-get widget :custom-state)) @@ -2274,6 +2470,16 @@ Match frames with dark backgrounds") (widget-put widget :buttons buttons) ;; Insert documentation. (widget-default-format-handler widget ?h) + ;; The comment field + (unless (eq state 'hidden) + (let* ((comment (get symbol 'face-comment)) + (comment-widget + (widget-create-child-and-convert + widget 'custom-comment + :parent widget + :value (or comment "")))) + (widget-put widget :comment-widget comment-widget) + (push comment-widget children))) ;; See also. (unless (eq state 'hidden) (when (eq (widget-get widget :custom-level) 1) @@ -2307,7 +2513,8 @@ Match frames with dark backgrounds") 'sexp)) :value spec))) (custom-face-state-set widget) - (widget-put widget :children (list edit))) + (push edit children) + (widget-put widget :children children)) (message "Creating face editor...done")))))) (defvar custom-face-menu @@ -2315,11 +2522,14 @@ Match frames with dark backgrounds") ("Save for Future Sessions" custom-face-save) ("Reset to Saved" custom-face-reset-saved (lambda (widget) - (get (widget-value widget) 'saved-face))) + (or (get (widget-value widget) 'saved-face) + (get (widget-value widget) 'saved-face-comment)))) ("Reset to Standard Setting" custom-face-reset-standard (lambda (widget) (get (widget-value widget) 'face-defface-spec))) ("---" ignore ignore) + ("Add Comment" custom-comment-show custom-comment-invisible-p) + ("---" ignore ignore) ("Show all display specs" custom-face-edit-all (lambda (widget) (not (eq (widget-get widget :custom-form) 'all)))) @@ -2356,15 +2566,30 @@ widget. If FILTER is nil, ACTION is always valid.") (defun custom-face-state-set (widget) "Set the state of WIDGET." - (let ((symbol (widget-value widget))) - (widget-put widget :custom-state (cond ((get symbol 'customized-face) - 'set) - ((get symbol 'saved-face) - 'saved) - ((get symbol 'face-defface-spec) - 'standard) - (t - 'rogue))))) + (let* ((symbol (widget-value widget)) + (comment (get symbol 'face-comment)) + tmp temp) + (widget-put widget :custom-state + (cond ((progn + (setq tmp (get symbol 'customized-face)) + (setq temp (get symbol 'customized-face-comment)) + (or tmp temp)) + (if (equal temp comment) + 'set + 'changed)) + ((progn + (setq tmp (get symbol 'saved-face)) + (setq temp (get symbol 'saved-face-comment)) + (or tmp temp)) + (if (equal temp comment) + 'saved + 'changed)) + ((get symbol 'face-defface-spec) + (if (equal comment nil) + 'standard + 'changed)) + (t + 'rogue))))) (defun custom-face-action (widget &optional event) "Show the menu for `custom-face' WIDGET. @@ -2385,9 +2610,18 @@ Optional EVENT is the location for the menu." "Make the face attributes in WIDGET take effect." (let* ((symbol (widget-value widget)) (child (car (widget-get widget :children))) - (value (widget-value child))) + (value (widget-value child)) + (comment-widget (widget-get widget :comment-widget)) + (comment (widget-value comment-widget))) + (when (equal comment "") + (setq comment nil) + ;; Make the comment invisible by hand if it's empty + (set-extent-property (widget-get comment-widget :comment-extent) + 'invisible t)) (put symbol 'customized-face value) (face-spec-set symbol value nil '(custom)) + (put symbol 'customized-face-comment comment) + (put symbol 'face-comment comment) (custom-face-state-set widget) (custom-redraw-magic widget))) @@ -2395,10 +2629,21 @@ Optional EVENT is the location for the menu." "Make the face attributes in WIDGET default." (let* ((symbol (widget-value widget)) (child (car (widget-get widget :children))) - (value (widget-value child))) + (value (widget-value child)) + (comment-widget (widget-get widget :comment-widget)) + (comment (widget-value comment-widget))) + (when (equal comment "") + (setq comment nil) + ;; Make the comment invisible by hand if it's empty + (set-extent-property (widget-get comment-widget :comment-extent) + 'invisible t)) (face-spec-set symbol value nil '(custom)) (put symbol 'saved-face value) + (custom-push-theme 'theme-face symbol 'user 'set value) (put symbol 'customized-face nil) + (put symbol 'face-comment comment) + (put symbol 'customized-face-comment nil) + (put symbol 'saved-face-comment comment) (custom-save-all) (custom-face-state-set widget) (custom-redraw-magic widget))) @@ -2407,12 +2652,18 @@ Optional EVENT is the location for the menu." "Restore WIDGET to the face's default attributes." (let* ((symbol (widget-value widget)) (child (car (widget-get widget :children))) - (value (get symbol 'saved-face))) - (unless value + (value (get symbol 'saved-face)) + (comment (get symbol 'saved-face-comment)) + (comment-widget (widget-get widget :comment-widget))) + (unless (or value comment) (signal 'error (list "No saved value for this face" symbol))) (put symbol 'customized-face nil) + (put symbol 'customized-face-comment nil) (face-spec-set symbol value nil '(custom)) + (put symbol 'face-comment comment) (widget-value-set child value) + ;; This call manages the comment visibility + (widget-value-set comment-widget (or comment "")) (custom-face-state-set widget) (custom-redraw-magic widget))) @@ -2420,15 +2671,25 @@ Optional EVENT is the location for the menu." "Restore WIDGET to the face's standard settings." (let* ((symbol (widget-value widget)) (child (car (widget-get widget :children))) - (value (get symbol 'face-defface-spec))) + (value (get symbol 'face-defface-spec)) + (comment-widget (widget-get widget :comment-widget))) (unless value (signal 'error (list "No standard setting for this face" symbol))) (put symbol 'customized-face nil) - (when (get symbol 'saved-face) + (put symbol 'customized-face-comment nil) + (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment)) (put symbol 'saved-face nil) + (custom-push-theme 'theme-face symbol 'user 'reset 'standard) + ;; Do not explictly save resets to standards without themes. + (if (null (cdr (get symbol 'theme-face))) + (put symbol 'theme-face nil)) + (put symbol 'saved-face-comment nil) (custom-save-all)) (face-spec-set symbol value nil '(custom)) + (put symbol 'face-comment nil) (widget-value-set child value) + ;; This call manages the comment visibility + (widget-value-set comment-widget "") (custom-face-state-set widget) (custom-redraw-magic widget))) @@ -2977,7 +3238,7 @@ explicitly load that file for the settings to take effect." :group 'customize) (defun custom-save-delete (symbol) - "Delete the call to SYMBOL form `custom-file'. + "Delete the call to SYMBOL form in `custom-file'. Leave point at the location of the call, or after the last expression." (let ((find-file-hooks nil) (auto-mode-alist nil)) @@ -2997,87 +3258,152 @@ Leave point at the location of the call, or after the last expression." (throw 'found nil)))))) (defun custom-save-variables () - "Save all customized variables in `custom-file'." - (save-excursion - (custom-save-delete 'custom-set-variables) - (let ((standard-output (current-buffer))) - (unless (bolp) - (princ "\n")) - (princ "(custom-set-variables") - (mapatoms (lambda (symbol) - (let ((value (get symbol 'saved-value)) - (requests (get symbol 'custom-requests)) - (now (not (or (get symbol 'standard-value) - (and (not (boundp symbol)) - (not (get symbol 'force-value))))))) - (when value - (princ "\n '(") - (prin1 symbol) - (princ " ") - (prin1 (car value)) - (cond (requests - (if now - (princ " t ") - (princ " nil ")) - (prin1 requests) - (princ ")")) - (now - (princ " t)")) - (t - (princ ")"))))))) + "Save all customized variables in `custom-file'." + (save-excursion + (custom-save-delete 'custom-load-themes) + (custom-save-delete 'custom-reset-variables) + (custom-save-delete 'custom-set-variables) + (custom-save-loaded-themes) + (custom-save-resets 'theme-value 'custom-reset-variables nil) + (let ((standard-output (current-buffer))) + (unless (bolp) + (princ "\n")) + (princ "(custom-set-variables") + (mapatoms (lambda (symbol) + (let ((spec (car-safe (get symbol 'theme-value))) + (requests (get symbol 'custom-requests)) + (now (not (or (get symbol 'standard-value) + (and (not (boundp symbol)) + (not (eq (get symbol 'force-value) + 'rogue)))))) + (comment (get symbol 'saved-variable-comment))) + (when (or (and spec (eq (car spec) 'user) + (eq (second spec) 'set)) comment) + (princ "\n '(") + (princ symbol) + (princ " ") + ;; This comment stuf is in the way #### + ;; Is (eq (third spec) (car saved-value)) ???? + ;; (prin1 (third spec)) + (prin1 (car (get symbol 'saved-value))) + (when (or now requests comment) + (princ (if now " t" " nil"))) + (when (or comment requests) + (princ " ") + (prin1 requests)) + (when comment + (princ " ") + (prin1 comment)) + (princ ")"))))) (princ ")") (unless (looking-at "\n") (princ "\n"))))) +(defvar custom-save-face-ignoring nil) + +(defun custom-save-face-internal (symbol) + (let ((theme-spec (car-safe (get symbol 'theme-face))) + (comment (get symbol 'saved-face-comment)) + (now (not (or (get symbol 'face-defface-spec) + (and (not (find-face symbol)) + (not (eq (get symbol 'force-face) 'rogue))))))) + (when (or (and (not (memq symbol custom-save-face-ignoring)) + ;; Don't print default face here. + theme-spec + (eq (car theme-spec) 'user) + (eq (second theme-spec) 'set)) comment) + (princ "\n '(") + (princ symbol) + (princ " ") + (prin1 (get symbol 'saved-face)) + (if (or comment now) + (princ (if now " t" " nil"))) + (when comment + (princ " ") + (prin1 comment)) + (princ ")")))) + (defun custom-save-faces () "Save all customized faces in `custom-file'." (save-excursion + (custom-save-delete 'custom-reset-faces) (custom-save-delete 'custom-set-faces) + (custom-save-resets 'theme-face 'custom-reset-faces '(default)) (let ((standard-output (current-buffer))) (unless (bolp) (princ "\n")) (princ "(custom-set-faces") - (let ((value (get 'default 'saved-face))) ;; The default face must be first, since it affects the others. - (when value - (princ "\n '(default ") - (prin1 value) - (if (or (get 'default 'face-defface-spec) - (and (not (find-face 'default)) - (not (get 'default 'force-face)))) - (princ ")") - (princ " t)")))) - (mapatoms (lambda (symbol) - (let ((value (get symbol 'saved-face))) - (when (and (not (eq symbol 'default)) - ;; Don't print default face here. - value) - (princ "\n '(") - (prin1 symbol) - (princ " ") - (prin1 value) - (if (or (get symbol 'face-defface-spec) - (and (not (find-face symbol)) - (not (get symbol 'force-face)))) - (princ ")") - (princ " t)")))))) + (custom-save-face-internal 'default) + (let ((custom-save-face-ignoring '(default))) + (mapatoms #'custom-save-face-internal)) (princ ")") (unless (looking-at "\n") (princ "\n"))))) +(defun custom-save-resets (property setter special) + (let (started-writing ignored-special) + ;; (custom-save-delete setter) Done by caller + (let ((standard-output (current-buffer)) + (mapper `(lambda (object) + (let ((spec (car-safe (get object (quote ,property))))) + (when (and (not (memq object ignored-special)) + (eq (car spec) 'user) + (eq (second spec) 'reset)) + ;; Do not write reset statements unless necessary. + (unless started-writing + (setq started-writing t) + (unless (bolp) + (princ "\n")) + (princ "(") + (princ (quote ,setter)) + (princ "\n '(") + (princ object) + (princ " ") + (prin1 (third spec)) + (princ ")"))))))) + (mapc mapper special) + (setq ignored-special special) + (mapatoms mapper) + (when started-writing + (princ ")\n"))))) + + +(defun custom-save-loaded-themes () + (let ((themes (reverse (get 'user 'theme-loads-themes))) + (standard-output (current-buffer))) + (when themes + (unless (bolp) (princ "\n")) + (princ "(custom-load-themes") + (mapc (lambda (theme) + (princ "\n '") + (prin1 theme)) themes) + (princ " )\n")))) + ;;;###autoload (defun customize-save-customized () "Save all user options which have been set in this session." (interactive) (mapatoms (lambda (symbol) (let ((face (get symbol 'customized-face)) - (value (get symbol 'customized-value))) + (value (get symbol 'customized-value)) + (face-comment (get symbol 'customized-face-comment)) + (variable-comment + (get symbol 'customized-variable-comment))) (when face (put symbol 'saved-face face) + (custom-push-theme 'theme-face symbol 'user 'set value) (put symbol 'customized-face nil)) (when value (put symbol 'saved-value value) - (put symbol 'customized-value nil))))) + (custom-push-theme 'theme-value symbol 'user 'set value) + (put symbol 'customized-value nil)) + (when variable-comment + (put symbol 'saved-variable-comment variable-comment) + (put symbol 'customized-variable-comment nil)) + (when face-comment + (put symbol 'saved-face-comment face-comment) + (put symbol 'customized-face-comment nil))))) ;; We really should update all custom buffers here. (custom-save-all)) diff --git a/lisp/cus-face.el b/lisp/cus-face.el index ddc6c87..18f2d38 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -30,6 +30,7 @@ "Like `defface', but FACE is evaluated as a normal argument." ;; (when (fboundp 'pureload) ;; (error "Attempt to declare a face during dump")) + ;; #### should we possibly reset force-face here? (unless (get face 'face-defface-spec) (put face 'face-defface-spec spec) (unless (find-face face) @@ -69,7 +70,7 @@ Text size (e.g. 9pt or 2mm).") custom-set-face-font-size custom-face-font-size) (:family (editable-field :format "Font Family: %v" :help-echo "\ -Name of font family to use (e.g. times).") +Name of font family to use (e.g. times).") custom-set-face-font-family custom-face-font-family) (:background-pixmap (editable-field :format "Background pixmap: %v" :help-echo "\ @@ -184,7 +185,7 @@ If FRAME is nil, use the default face." (defun custom-face-italic (face &rest args) "Return non-nil if the font of FACE is italic." - (let* ((font (apply 'face-font-name face)) + (let* ((font (apply 'face-font-name face args)) ;; Gag (fontobj (font-create-object font))) (font-italic-p fontobj))) @@ -240,33 +241,94 @@ If FRAME is nil, use the default face." ;;;###autoload (defun custom-set-faces (&rest args) "Initialize faces according to user preferences. +This asociates the setting with the USER theme. The arguments should be a list where each entry has the form: - (FACE SPEC [NOW]) + (FACE SPEC [NOW [COMMENT]]) SPEC will be stored as the saved value for FACE. If NOW is present and non-nil, FACE will also be created according to SPEC. +COMMENT is a string comment about FACE. See `defface' for the format of SPEC." - (while args - (let ((entry (car args))) - (if (listp entry) - (let ((face (nth 0 entry)) - (spec (nth 1 entry)) - (now (nth 2 entry))) + (apply #'custom-theme-set-faces 'user args)) + +;;;###autoload +(defun custom-theme-set-faces (theme &rest args) + "Initialize faces according to settings specified by args. +Records the settings as belonging to THEME. + +See `custom-set-faces' for a description of the arguments ARGS." + (custom-check-theme theme) + (let ((immediate (get theme 'theme-immediate))) + (while args + (let ((entry (car args))) + (if (listp entry) + (let ((face (nth 0 entry)) + (spec (nth 1 entry)) + (now (nth 2 entry)) + (comment (nth 3 entry))) + (put face 'saved-face spec) + (custom-push-theme 'theme-face face theme 'set spec) + (put face 'saved-face-comment comment) + (when (or now immediate) + (put face 'force-face (if now 'rogue 'immediate))) + (when (or now immediate (find-face face)) + (put face 'face-comment comment) + (unless (find-face face) + (make-empty-face face)) + (face-spec-set face spec nil '(custom))) + (setq args (cdr args))) + ;; Old format, a plist of FACE SPEC pairs. + (let ((face (nth 0 args)) + (spec (nth 1 args))) (put face 'saved-face spec) - (when now - (put face 'force-face t)) - (when (or now (find-face face)) + (custom-push-theme 'theme-face face theme 'set spec)) + (setq args (cdr (cdr args)))))))) + +;;;###autoload +(defun custom-theme-face-value (face theme) + "Return spec of FACE in THEME if the THEME modifies the +FACE. Nil otherwise." + (car-safe (custom-theme-value theme (get face 'theme-face)))) + +(defun custom-theme-reset-internal-face (face to-theme) + (let ((spec (custom-theme-face-value face to-theme)) + was-in-theme) + (setq was-in-theme spec) + (setq spec (or spec (get face 'standard-value))) + (when spec + (put face 'save-face was-in-theme) + (when (or (get face 'force-face) (find-face face)) (unless (find-face face) (make-empty-face face)) - (face-spec-set face spec nil '(custom))) - (setq args (cdr args))) - ;; Old format, a plist of FACE SPEC pairs. - (let ((face (nth 0 args)) - (spec (nth 1 args))) - (put face 'saved-face spec)) - (setq args (cdr (cdr args))))))) + (face-spec-set face spec))) + spec)) + +;;;###autoload +(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. + +ARGS is a list of lists of the form + + (face to-theme) + +This means reset face to its value in to-theme." + (mapc #'(lambda (arg) + (apply #'custom-theme-reset-internal-face arg) + (custom-push-theme (car arg) 'theme-face theme 'reset (cadr arg))) + args)) + +;;;###autoload +(defun custom-reset-faces (&rest args) + "Reset the value of the face to values previously defined. +Assosiate this setting with the 'user' theme. + +ARGS is defined as for `custom-theme-reset-faces'" + (apply #'custom-theme-reset-faces 'user args)) + ;;; The End. diff --git a/lisp/custom.el b/lisp/custom.el index 77dd59d..b27b551 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -31,12 +31,18 @@ ;; This file only contain the code needed to declare and initialize ;; user options. The code to customize options is autoloaded from -;; `cus-edit.el'. +;; `cus-edit.el'. ;; ;; The code implementing face declarations is in `cus-face.el' ;;; Code: +(eval-when-compile + (load "cl-macs")) + +(if (not (fboundp 'defun*)) + (autoload 'defun* "cl-macs")) + (require 'widget) (defvar custom-define-hook nil @@ -55,8 +61,8 @@ symbol." (unless (default-boundp symbol) ;; Use the saved value if it exists, otherwise the standard setting. (set-default symbol (if (get symbol 'saved-value) - (eval (car (get symbol 'saved-value))) - (eval value))))) + (eval (car (get symbol 'saved-value))) + (eval value))))) (defun custom-initialize-set (symbol value) "Initialize SYMBOL with VALUE. @@ -64,83 +70,83 @@ Like `custom-initialize-default', but use the function specified by `:set' to initialize SYMBOL." (unless (default-boundp symbol) (funcall (or (get symbol 'custom-set) 'set-default) - symbol - (if (get symbol 'saved-value) - (eval (car (get symbol 'saved-value))) - (eval value))))) + symbol + (if (get symbol 'saved-value) + (eval (car (get symbol 'saved-value))) + (eval value))))) (defun custom-initialize-reset (symbol value) "Initialize SYMBOL with VALUE. Like `custom-initialize-set', but use the function specified by `:get' to reinitialize SYMBOL if it is already bound." (funcall (or (get symbol 'custom-set) 'set-default) - symbol - (cond ((default-boundp symbol) - (funcall (or (get symbol 'custom-get) 'default-value) - symbol)) - ((get symbol 'saved-value) - (eval (car (get symbol 'saved-value)))) - (t - (eval value))))) + symbol + (cond ((default-boundp symbol) + (funcall (or (get symbol 'custom-get) 'default-value) + symbol)) + ((get symbol 'saved-value) + (eval (car (get symbol 'saved-value)))) + (t + (eval value))))) (defun custom-initialize-changed (symbol value) "Initialize SYMBOL with VALUE. -Like `custom-initialize-reset', but only use the `:set' function if the +Like `custom-initialize-reset', but only use the `:set' function if the not using the standard setting. Otherwise, use the `set-default'." (cond ((default-boundp symbol) - (funcall (or (get symbol 'custom-set) 'set-default) - symbol - (funcall (or (get symbol 'custom-get) 'default-value) - symbol))) - ((get symbol 'saved-value) - (funcall (or (get symbol 'custom-set) 'set-default) - symbol - (eval (car (get symbol 'saved-value))))) - (t - (set-default symbol (eval value))))) + (funcall (or (get symbol 'custom-set) 'set-default) + symbol + (funcall (or (get symbol 'custom-get) 'default-value) + symbol))) + ((get symbol 'saved-value) + (funcall (or (get symbol 'custom-set) 'set-default) + symbol + (eval (car (get symbol 'saved-value))))) + (t + (set-default symbol (eval value))))) (defun custom-declare-variable (symbol value doc &rest args) "Like `defcustom', but SYMBOL and VALUE are evaluated as normal arguments." ;; Remember the standard setting. (put symbol 'standard-value (list value)) ;; Maybe this option was rogue in an earlier version. It no longer is. - (when (get symbol 'force-value) - ;; It no longer is. + (when (eq (get symbol 'force-value) 'rogue) + ;; It no longer is. (put symbol 'force-value nil)) (when doc (put symbol 'variable-documentation doc)) (let ((initialize 'custom-initialize-reset) - (requests nil)) - (while args + (requests nil)) + (while args (let ((arg (car args))) - (setq args (cdr args)) - (check-argument-type 'keywordp arg) - (let ((keyword arg) - (value (car args))) - (unless args - (signal 'error (list "Keyword is missing an argument" keyword))) - (setq args (cdr args)) - (cond ((eq keyword :initialize) - (setq initialize value)) - ((eq keyword :set) - (put symbol 'custom-set value)) - ((eq keyword :get) - (put symbol 'custom-get value)) - ((eq keyword :require) - (setq requests (cons value requests))) - ((eq keyword :type) - (put symbol 'custom-type value)) - ((eq keyword :options) - (if (get symbol 'custom-options) - ;; Slow safe code to avoid duplicates. - (mapc (lambda (option) - (custom-add-option symbol option)) - value) - ;; Fast code for the common case. - (put symbol 'custom-options (copy-sequence value)))) - (t - (custom-handle-keyword symbol keyword value - 'custom-variable)))))) + (setq args (cdr args)) + (check-argument-type 'keywordp arg) + (let ((keyword arg) + (value (car args))) + (unless args + (signal 'error (list "Keyword is missing an argument" keyword))) + (setq args (cdr args)) + (cond ((eq keyword :initialize) + (setq initialize value)) + ((eq keyword :set) + (put symbol 'custom-set value)) + ((eq keyword :get) + (put symbol 'custom-get value)) + ((eq keyword :require) + (setq requests (cons value requests))) + ((eq keyword :type) + (put symbol 'custom-type value)) + ((eq keyword :options) + (if (get symbol 'custom-options) + ;; Slow safe code to avoid duplicates. + (mapc (lambda (option) + (custom-add-option symbol option)) + value) + ;; Fast code for the common case. + (put symbol 'custom-options (copy-sequence value)))) + (t + (custom-handle-keyword symbol keyword value + 'custom-variable)))))) (put symbol 'custom-requests requests) ;; Do the actual initialization. (funcall initialize symbol value)) @@ -158,29 +164,29 @@ Neither SYMBOL nor VALUE needs to be quoted. If SYMBOL is not already bound, initialize it to VALUE. The remaining arguments should have the form - [KEYWORD VALUE]... + [KEYWORD VALUE]... The following KEYWORD's are defined: -:type VALUE should be a widget type for editing the symbols value. - The default is `sexp'. +:type VALUE should be a widget type for editing the symbols value. + The default is `sexp'. :options VALUE should be a list of valid members of the widget type. -:group VALUE should be a customization group. +:group VALUE should be a customization group. Add SYMBOL to that group. :initialize VALUE should be a function used to initialize the - variable. It takes two arguments, the symbol and value - given in the `defcustom' call. The default is - `custom-initialize-set' -:set VALUE should be a function to set the value of the symbol. - It takes two arguments, the symbol to set and the value to - give it. The default is `set-default'. -:get VALUE should be a function to extract the value of symbol. - The function takes one argument, a symbol, and should return - the current value for that symbol. The default is - `default-value'. + variable. It takes two arguments, the symbol and value + given in the `defcustom' call. The default is + `custom-initialize-set' +:set VALUE should be a function to set the value of the symbol. + It takes two arguments, the symbol to set and the value to + give it. The default is `set-default'. +:get VALUE should be a function to extract the value of symbol. + The function takes one argument, a symbol, and should return + 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 - option. + required after initialization, of the the user have saved this + option. Read the section about customization in the Emacs Lisp manual for more information." @@ -237,7 +243,7 @@ information." (defun custom-declare-group (symbol members doc &rest args) "Like `defgroup', but SYMBOL is evaluated as a normal argument." - (while members + (while members (apply 'custom-add-to-group symbol (car members)) (pop members)) (put symbol 'custom-group (nconc members (get symbol 'custom-group))) @@ -248,15 +254,15 @@ information." (setq args (cdr args)) (check-argument-type 'keywordp arg) (let ((keyword arg) - (value (car args))) - (unless args - (signal 'error (list "Keyword is missing an argument" keyword))) - (setq args (cdr args)) - (cond ((eq keyword :prefix) - (put symbol 'custom-prefix value)) - (t - (custom-handle-keyword symbol keyword value - 'custom-group)))))) + (value (car args))) + (unless args + (signal 'error (list "Keyword is missing an argument" keyword))) + (setq args (cdr args)) + (cond ((eq keyword :prefix) + (put symbol 'custom-prefix value)) + (t + (custom-handle-keyword symbol keyword value + 'custom-group)))))) (run-hooks 'custom-define-hook) symbol) @@ -273,7 +279,7 @@ edit faces, and `custom-group' for editing groups. The remaining arguments should have the form - [KEYWORD VALUE]... + [KEYWORD VALUE]... The following KEYWORD's are defined: @@ -291,9 +297,9 @@ information." "To existing GROUP add a new OPTION of type WIDGET. If there already is an entry for that option, overwrite it." (let* ((members (get group 'custom-group)) - (old (assq option members))) + (old (assq option members))) (if old - (setcar (cdr old) widget) + (setcar (cdr old) widget) (put group 'custom-group (nconc members (list (list option widget)))))) (puthash group t custom-group-hash-table)) @@ -302,32 +308,32 @@ If there already is an entry for that option, overwrite it." (defun custom-handle-all-keywords (symbol args type) "For customization option SYMBOL, handle keyword arguments ARGS. Third argument TYPE is the custom option type." - (while args + (while args (let ((arg (car args))) (setq args (cdr args)) (check-argument-type 'keywordp arg) (let ((keyword arg) - (value (car args))) - (unless args - (signal 'error (list "Keyword is missing an argument" keyword))) - (setq args (cdr args)) - (custom-handle-keyword symbol keyword value type))))) + (value (car args))) + (unless args + (signal 'error (list "Keyword is missing an argument" keyword))) + (setq args (cdr args)) + (custom-handle-keyword symbol keyword value type))))) (defun custom-handle-keyword (symbol keyword value type) "For customization option SYMBOL, handle KEYWORD with VALUE. Fourth argument TYPE is the custom option type." (cond ((eq keyword :group) - (custom-add-to-group value symbol type)) - ((eq keyword :version) - (custom-add-version symbol value)) - ((eq keyword :link) - (custom-add-link symbol value)) - ((eq keyword :load) - (custom-add-load symbol value)) - ((eq keyword :tag) - (put symbol 'custom-tag value)) - (t - (signal 'error (list "Unknown keyword" keyword))))) + (custom-add-to-group value symbol type)) + ((eq keyword :version) + (custom-add-version symbol value)) + ((eq keyword :link) + (custom-add-link symbol value)) + ((eq keyword :load) + (custom-add-load symbol value)) + ((eq keyword :tag) + (put symbol 'custom-tag value)) + (t + (signal 'error (list "Unknown keyword" keyword))))) (defun custom-add-option (symbol option) "To the variable SYMBOL add OPTION. @@ -356,46 +362,278 @@ LOAD should be either a library file name, or a feature name." (unless (member load loads) (put symbol 'custom-loads (cons load loads))))) +;;; deftheme macro + +(defvar custom-known-themes '(user standard) + "Themes that have been defthemed.") + +;; #### add strings for group +;; #### during bootstrap we cannot use cl-macs stuff +(defun* custom-define-theme (theme feature &optional doc + &key short-description immediate variable-reset-string + variable-set-string face-set-string face-reset-string + &allow-other-keys) + (push theme custom-known-themes) + (put theme 'theme-feature feature) + (put theme 'theme-documentation doc) + (if immediate (put theme 'theme-immediate immediate)) + (if variable-reset-string + (put theme 'theme-variable-reset-string variable-reset-string )) + (if variable-set-string + (put theme 'theme-variable-set-string variable-set-string )) + (if face-reset-string + (put theme 'theme-face-reset-string face-reset-string )) + (if face-set-string + (put theme 'theme-face-set-string face-set-string )) + (if short-description + (put theme 'theme-short-description short-description ))) + +(defun custom-make-theme-feature (theme) + (intern (concat (symbol-name theme) "-theme"))) + +(defmacro deftheme (theme &rest body) + "(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 +following keyboard arguments + +:short-description DESC + DESC is a short (one line) description of the theme. If not given DOC + is used. +:immediate FLAG + If FLAG is non-nil variables set in this theme are bound + immediately when loading the theme. +:variable-set-string VARIABLE_-SET-STRING + A string used by the UI to indicate that the value takes it + setting from this theme. It is passed to FORMAT with the + name of the theme a additional argument. + If not given, a generic description is used. +:variable-reset-string VARIABLE-RESET-STRING + As above but used in the case the variable has been forced to + the value in this theme. +:face-set-string FACE-SET-STRING +:face-reset-string FACE-RESET-STRING + As above but for faces." + (let ((feature (custom-make-theme-feature theme))) + `(custom-define-theme (quote ,theme) (quote ,feature) ,@body))) + +(defsubst custom-theme-p (theme) + "Non-nil when THEME has been defined." + (memq theme custom-known-themes)) + +(defsubst custom-check-theme (theme) + "Check whether THEME is valid and signal an error if NOT" + (unless (custom-theme-p theme) + (error "Unknown theme `%s'" theme))) + + +; #### do we need to deftheme 'user and/or 'standard here to make the +; code in cus-edit cleaner?. + ;;; Initializing. -(defun custom-set-variables (&rest args) - "Initialize variables according to user preferences. +(defun custom-push-theme (prop symbol theme mode value) + (let ((old (get symbol prop))) + (if (eq (car-safe (car-safe old)) theme) + (setq old (cdr old))) + (put symbol prop (cons (list theme mode value) old)))) +(defun custom-set-variables (&rest args) + "Initialize variables according to user preferences. +The settings are registered as theme `user'. The arguments should be a list where each entry has the form: - (SYMBOL VALUE [NOW]) + (SYMBOL VALUE [NOW [REQUEST [COMMENT]]]) The unevaluated VALUE is stored as the saved value for SYMBOL. If NOW is present and non-nil, VALUE is also evaluated and bound as -the default value for the SYMBOL." - (while args - (let ((entry (car args))) - (if (listp entry) - (let* ((symbol (nth 0 entry)) - (value (nth 1 entry)) - (now (nth 2 entry)) - (requests (nth 3 entry)) - (set (or (get symbol 'custom-set) 'set-default))) - (put symbol 'saved-value (list value)) - (cond (now - ;; Rogue variable, set it now. - (put symbol 'force-value t) - (funcall set symbol (eval value))) - ((default-boundp symbol) - ;; Something already set this, overwrite it. - (funcall set symbol (eval value)))) - (when requests - (put symbol 'custom-requests requests) - (mapc 'require requests)) - (setq args (cdr args))) - ;; Old format, a plist of SYMBOL VALUE pairs. - (message "Warning: old format `custom-set-variables'") - (ding) - (sit-for 2) - (let ((symbol (nth 0 args)) - (value (nth 1 args))) - (put symbol 'saved-value (list value))) - (setq args (cdr (cdr args))))))) +the default value for the SYMBOL. +REQUEST is a list of features we must 'require for SYMBOL. +COMMENT is a comment string about SYMBOL." + (apply 'custom-theme-set-variables 'user args)) + +(defun custom-theme-set-variables (theme &rest args) + "Initialize variables according to settings specified by args. +Records the settings as belonging to THEME. + +See `custom-set-variables' for a description of the arguments ARGS." + (custom-check-theme theme) + (let ((immediate (get theme 'theme-immediate))) + (while args * etc/custom/example-themes/example-theme.el: + (let ((entry (car args))) + (if (listp entry) + (let* ((symbol (nth 0 entry)) + (value (nth 1 entry)) + (now (nth 2 entry)) + (requests (nth 3 entry)) + (comment (nth 4 entry)) + (set (or (get symbol 'custom-set) 'set-default))) + (put symbol 'saved-value (list value)) + (custom-push-theme 'theme-value symbol theme 'set value) + (put symbol 'saved-variable-comment comment) + (cond ((or now immediate) + ;; Rogue variable, set it now. + (put symbol 'force-value (if now 'rogue 'immediate)) + (funcall set symbol (eval value))) + ((default-boundp symbol) + ;; Something already set this, overwrite it. + (funcall set symbol (eval value)))) + (and (or now (default-boundp symbol)) + (put symbol 'variable-comment comment)) + (when requests + (put symbol 'custom-requests requests) + (mapc 'require requests)) + (setq args (cdr args))) + ;; Old format, a plist of SYMBOL VALUE pairs. + (message "Warning: old format `custom-set-variables'") + (ding) + (sit-for 2) + (let ((symbol (nth 0 args)) + (value (nth 1 args))) + (put symbol 'saved-value (list value)) + (custom-push-theme 'theme-value symbol theme 'set value)) + (setq args (cdr (cdr args)))))))) + +(defvar custom-loaded-themes nil + "Themes in the order they are loaded.") + +(defun custom-theme-loaded-p (theme) + "Return non-nil when THEME has been loaded." + (memq theme custom-loaded-themes)) + +(defun provide-theme (theme) + "Indicate that this file provides THEME." + (custom-check-theme theme) + (provide (get theme 'theme-feature)) + (push theme custom-loaded-themes)) + +(defun require-theme (theme &optional soft) + "Try to load a theme by requiring its feature." + ;; Note we do no check for validity of the theme here. + ;; This allows to pull in themes by a file-name convention + (require (get theme 'theme-feature (custom-make-theme-feature theme)))) + +(defun custom-do-theme-reset (theme) + ; #### untested! slow! + (let (spec-list) + (mapatoms (lambda (symbol) + (setq spec-list (get symbol 'theme-value)) + (when spec-list + (setq spec-list (delete-if (lambda (elt) + (eq (car elt) theme)) + spec-list)) + (put symbol 'theme-value spec-list) + (custom-theme-reset-internal symbol 'user)) + (setq spec-list (get symbol 'theme-face)) + (when spec-list + (setq spec-list (delete-if (lambda (elt) + (eq (car elt) theme)) + spec-list)) + (put symbol 'theme-face spec-list) + (custom-theme-reset-internal-face symbol 'user)))))) + +(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 + - a SYMBOL + require the theme SYMBOL + - a list (reset THEME) + Undo all the settings made by THEME. + - a list (hidden THEME) + require the THEME but hide it from the user." + (custom-check-theme by-theme) + (dolist (theme body) + (cond ((and (consp theme) (eq (car theme) 'reset)) + (custom-do-theme-reset (cadr theme))) + ((and (consp theme) (eq (car theme) 'hidden)) + (require-theme (cadr theme)) + (unless (custom-theme-loaded-p (cadr theme)) + (put (cadr theme) 'theme-hidden t))) + (t + (require-theme theme) + (remprop theme 'theme-hidden))) + (push theme (get by-theme 'theme-loads-themes)))) + +(defun custom-load-themes (&rest body) + "Load themes for the USER theme as specified by BODY. + +BODY is as with custom-theme-load-themes." + (apply #'custom-theme-load-themes 'user body)) + + + + +(defsubst copy-upto-last (elt list) + "Copy all the elements of the list upto the last occurence 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-value (theme theme-spec-list) + "Determine the value for THEME defined by THEME-SPEC-LIST. +Returns (list value) if found. Nil otherwise." + ;; Note we do _NOT_ singal an error if the theme is unkown + ;; it might have gone away without the user knowing. + (let ((theme-or-lower (memq theme (cons 'user custom-loaded-themes))) + value) + (mapc #'(lambda (theme-spec) + (when (member (car theme-spec) theme-or-lower) + (setq value (cdr theme-spec)) + ;; We need to continue because if theme =A and we found + ;; B then if the load order is B A C B + ;; we actually want the value in C. + (setq theme-or-lower (copy-upto-last (car theme-spec) + theme-or-lower)) + ;; We could should circuit if this is now nil. + )) + theme-spec-list) + (if value + (if (eq (car value) 'set) + (list (cadr value)) + ;; Yet another reset spec. car value = reset + (custom-theme-value (cadr value) theme-spec-list))))) + + +(defun custom-theme-variable-value (variable theme) + "Return (list value) value of VARIABLE in THEME if the THEME modifies the +VARIABLE. Nil otherwise." + (custom-theme-value theme (get variable 'theme-value))) + +(defun custom-theme-reset-internal (symbol to-theme) + (let ((value (custom-theme-variable-value symbol to-theme)) + was-in-theme) + (setq was-in-theme value) + (setq value (or value (get symbol 'standard-value))) + (when value + (put symbol 'saved-value was-in-theme) + (if (or (get 'force-value symbol) (default-boundp symbol)) + (funcall (get symbol 'custom-set 'set-default) symbol + (eval (car value))))) + value)) + + +(defun custom-theme-reset-variables (theme &rest args) + "Reset the value of the variables to values previously defined. +Assosiate this setting with THEME. + +ARGS is a list of lists of the form + + (variable to-theme) + +This means reset variable to its value in to-theme." + (custom-check-theme theme) + (mapc #'(lambda (arg) + (apply #'custom-theme-reset-internal arg) + (custom-push-theme 'theme-value (car arg) theme 'reset (cadr arg))) + args)) + +(defun custom-reset-variables (&rest args) + "Reset the value of the variables to values previously defined. +Assosiate this setting with the `user' theme. + +The ARGS are as in `custom-theme-reset-variables'." + (apply #'custom-theme-reset-variables 'user args)) + ;;; The End. diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el index 1a95fdd..75b2cea 100644 --- a/lisp/dumped-lisp.el +++ b/lisp/dumped-lisp.el @@ -133,7 +133,8 @@ (when-feature mule "japanese") (when-feature mule "korean") (when-feature mule "misc-lang") - (when-feature mule "thai-xtis") + (when-feature mule "thai-xtis-chars") + (when-feature mule "mule/thai-xtis") ; overloaded in leim/quail (when-feature mule "viet-chars") (when-feature (and mule (not utf-2000)) "vietnamese") @@ -164,6 +165,7 @@ (when-feature (and (not infodock) (or x mswindows) menubar) "menubar-items") (when-feature (and infodock (or x mswindows) menubar) "id-menus") + (when-feature (and gutter menubar window-system) "gutter-items") (when-feature x "x-faces") (when-feature x "x-iso8859-1") (when-feature x "x-mouse") diff --git a/lisp/files.el b/lisp/files.el index 4f41c82..0b23435 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1224,7 +1224,9 @@ REGEXP and search the list again for another match.") ("python" . python-mode) ("awk\\b" . awk-mode) ("rexx" . rexx-mode) - ("scm" . scheme-mode) + ("scm\\|guile" . scheme-mode) + ("emacs" . emacs-lisp-mode) + ("make" . makefile-mode) ("^:" . sh-mode)) "Alist mapping interpreter names to major modes. This alist is used to guess the major mode of a file based on the diff --git a/lisp/fill.el b/lisp/fill.el index 780d6e6..748cba4 100644 --- a/lisp/fill.el +++ b/lisp/fill.el @@ -226,9 +226,10 @@ first line, insist it must match FIRST-LINE-REGEXP." ;; XEmacs change (if (not dont-skip-first) (forward-line 1)) - (if (>= (point) to) - (goto-char firstline) - (setq at-second t)) + (cond ((>= (point) to) + (goto-char firstline)) + ((/= (point) from) + (setq at-second t))) (move-to-left-margin) ;; XEmacs change (let ((start (point)) @@ -236,7 +237,7 @@ first line, insist it must match FIRST-LINE-REGEXP." ;(eol (save-excursion (end-of-line) (point))) ) (setq result - (if (not (looking-at paragraph-start)) + (if (or dont-skip-first (not (looking-at paragraph-start))) (cond ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp)) (buffer-substring-no-properties start (match-end 0))) (adaptive-fill-function (funcall adaptive-fill-function))))) @@ -429,7 +430,8 @@ space does not end a sentence, so don't break a line there." ;; This is the actual filling loop. (let ((prefixcol 0) linebeg (re-break-point (if (featurep 'mule) - (concat "[ \n\t]\\|" word-across-newline) + (concat "[ \n\t]\\|" word-across-newline + ".\\|." word-across-newline) "[ \n\t]"))) (while (not (eobp)) (setq linebeg (point)) diff --git a/lisp/font-menu.el b/lisp/font-menu.el index 0103764..e22202f 100644 --- a/lisp/font-menu.el +++ b/lisp/font-menu.el @@ -400,7 +400,7 @@ or if you change your font path, you can call this to re-initialize the menus." (list :family family :size (concat (int-to-string - (/ size + (/ (or size from-size) (specifier-instance font-menu-size-scaling (selected-device)))) "pt"))) diff --git a/lisp/gui.el b/lisp/gui.el index 893efe5..d23ea03 100644 --- a/lisp/gui.el +++ b/lisp/gui.el @@ -64,6 +64,7 @@ Normally it also has no modelines, menubars, or toolbars." menubar-visible-p nil has-modeline-p nil default-toolbar-visible-p nil + default-gutter-visible-p nil modeline-shadow-thickness 0 left ,(+ fleft (- (/ fwidth 2) (/ (* dfwidth fontw) diff --git a/lisp/help-nomule.el b/lisp/help-nomule.el index 1f4a0bb..cc90cd2 100644 --- a/lisp/help-nomule.el +++ b/lisp/help-nomule.el @@ -100,6 +100,19 @@ With a prefix argument, choose the language." ;; Now, signal the error (signal (car error-data) (cdr error-data))))))) +;; General Mule-compatibility stuffs +(define-function 'string-width 'length) + +;; The following was originally in subr.el +(defun make-char (charset &optional arg1 arg2) + "Make a character from CHARSET and octets ARG1 and ARG2. +This function is available for compatibility with Mule-enabled XEmacsen. +When CHARSET is `ascii', return (int-char ARG1). Otherwise, return +that value with the high bit set. ARG2 is always ignored." + (int-char (if (eq charset 'ascii) + arg1 + (logior arg1 #x80)))) + (provide 'help-nomule) diff --git a/lisp/help.el b/lisp/help.el index eb7b1b6..abe3bfc 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -461,7 +461,9 @@ You should never set this directory, only let-bind it.") (if (and (integerp help-max-help-buffers) (> help-max-help-buffers 0) (stringp name)) - (format "*%s: %s*" help-buffer-prefix-string name) + (if help-buffer-prefix-string + (format "*%s: %s*" help-buffer-prefix-string name) + (format "*%s*" name)) (format "*%s*" help-buffer-prefix-string))) ;; Use this function for displaying help when C-h something is pressed diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el index 7ae20c3..69d5554 100644 --- a/lisp/lib-complete.el +++ b/lisp/lib-complete.el @@ -38,7 +38,6 @@ ;; Last Modified By: Heiko M|nkel ;; Additional XEmacs integration By: Chuck Thompson ;; Last Modified On: Thu Jul 1 14:23:00 1994 -;; RCS Info : $Revision: 1.3.2.1 $ $Locker: $ ;; ======================================================================== ;; NOTE: XEmacs must be redumped if this file is changed. ;; @@ -57,6 +56,7 @@ ;;; ChangeLog: ;; 4/26/97: sb Mule-ize. +;; 6/24/1999 much rewriting from Bob Weiner ;;; Code: @@ -217,7 +217,6 @@ where each has the form (if tail (setcdr tail nil))))) ;;=== Read a filename, with completion in a search path =================== -(defvar read-library-internal-search-path) (defun read-library-internal (FILE FILTER FLAG) "Don't call this." @@ -255,79 +254,93 @@ Optional sixth argument FILTER can be used to provide a function to (cond ((equal library "") DEFAULT) (FULL (locate-file library read-library-internal-search-path - '(".el" ".el.gz" ".elc"))) + '(".el" ".el.gz" ".elc"))) (t library)))) +(defun read-library-name (prompt) + "PROMPTs for and returns an existing Elisp library name (without any suffix) or the empty string." + (interactive) + (let ((read-library-internal-search-path load-path)) + (completing-read prompt + 'read-library-internal + (lambda (fn) + (cond + ((string-match "\\.el\\(\\.gz\\|\\.Z\\)?$" fn) + (substring fn 0 (match-beginning 0))))) + t nil))) + ;; NOTE: as a special case, read-library may be used to read a filename ;; relative to the current directory, returning a *relative* pathname ;; (read-file-name returns a full pathname). ;; ;; eg. (read-library "Local header: " '(nil) nil) -(defun get-library-path () - "Front end to read-library" - (read-library "Find Library file: " load-path nil t t - (function (lambda (fn) - (cond - ;; decompression doesn't work with mule -slb - ((string-match (if (featurep 'mule) - "\\.el$" - "\\.el\\(\\.gz\\)?$") fn) - (substring fn 0 (match-beginning 0)))))) - )) - ;;=== Replacement for load-library with completion ======================== (defun load-library (library) "Load the library named LIBRARY. This is an interface to the function `load'." (interactive - (list (read-library "Load Library: " load-path nil nil nil - (function (lambda (fn) - (cond - ((string-match "\\.elc?$" fn) - (substring fn 0 (match-beginning 0)))))) - ))) + (list (read-library "Load library: " load-path nil nil nil + (function (lambda (fn) + (cond + ((string-match "\\.elc?$" fn) + (substring fn 0 (match-beginning 0)))))) + ))) (load library)) -;;=== find-library with completion (Author: Heiko Muenkel) =================== +;;=== find-library with completion (Author: Bob Weiner) =================== -(defun find-library (library &optional codesys) - "Find and edit the source for the library named LIBRARY. -The extension of the LIBRARY must be omitted. -Under XEmacs/Mule, the optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." +(defun find-library (library &optional codesys display-function) + "Find and display in the current window the source for the Elisp LIBRARY. +LIBRARY should be a name without any path information and may include or omit +the \".el\" suffix. Under XEmacs/Mule, the optional second argument CODESYS +specifies the coding system to use when decoding the file. Interactively, +with a prefix argument, this prompts for the coding system. Optional third +argument DISPLAY-FUNCTION must take two arguments, the filename to display +and CODESYS. The default for DISPLAY-FUNCTION is `find-file'." (interactive - (list (get-library-path) + (list (read-library-name "Find library: ") (if current-prefix-arg (read-coding-system "Coding System: ")))) - (find-file library codesys)) + (let ((path (if (or (null library) (equal library "")) + nil + (locate-file library load-path + ;; decompression doesn't work with Mule -slb + (if (featurep 'mule) + ":.el:.elc" + ":.el:.el.gz:.el.Z:.elc"))))) + (if path (funcall (if (fboundp display-function) + display-function 'find-file) + path codesys) + (error "(find-library): Cannot locate library `%s'" library)))) (defun find-library-other-window (library &optional codesys) - "Load the library named LIBRARY in another window. -Under XEmacs/Mule, the optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." + "Find and display in another window the source for the Elisp LIBRARY. +LIBRARY should be a name without any path information and may include or omit +the \".el\" suffix. Under XEmacs/Mule, the optional second argument CODESYS +specifies the coding system to use when decoding the file. Interactively, +with a prefix argument, this prompts for the coding system." (interactive - (list (get-library-path) + (list (read-library-name "Find library in other window: ") (if current-prefix-arg - (read-coding-system "Coding System: ")))) - (find-file-other-window library codesys)) + (read-coding-system "Coding System: ")))) + (find-library library codesys 'find-file-other-window)) (defun find-library-other-frame (library &optional codesys) - "Load the library named LIBRARY in a newly-created frame. -Under XEmacs/Mule, the optional second argument specifies the -coding system to use when decoding the file. Interactively, -with a prefix argument, you will be prompted for the coding system." + "Find and display in another frame the source for the Elisp LIBRARY. +LIBRARY should be a name without any path information and may include or omit +the \".el\" suffix. Under XEmacs/Mule, the optional second argument CODESYS +specifies the coding system to use when decoding the file. Interactively, +with a prefix argument, this prompts for the coding system." (interactive - (list (get-library-path) + (list (read-library-name "Find library in other frame: ") (if current-prefix-arg (read-coding-system "Coding System: ")))) - (find-file-other-frame library codesys)) + (find-library library codesys 'find-file-other-frame)) -; This conflicts with an existing binding -;(define-key global-map "\C-xl" 'find-library) +;; This conflicts with an existing binding. +;;(define-key global-map "\C-xl" 'find-library) (define-key global-map "\C-x4l" 'find-library-other-window) (define-key global-map "\C-x5l" 'find-library-other-frame) diff --git a/lisp/list-mode.el b/lisp/list-mode.el index b3603e5..b2b828b 100644 --- a/lisp/list-mode.el +++ b/lisp/list-mode.el @@ -77,7 +77,10 @@ (make-local-variable 'next-line-add-newlines) (setq next-line-add-newlines nil) (setq list-mode-extent nil) - (set-specifier text-cursor-visible-p nil (current-buffer)) +;; It is visually disconcerting to have the text cursor disappear within list +;; buffers, especially when moving from window to window, so leave it +;; visible. -- Bob Weiner, 06/20/1999 +; (set-specifier text-cursor-visible-p nil (current-buffer)) (setq buffer-read-only t) (goto-char (point-min)) (run-hooks 'list-mode-hook)) @@ -458,21 +461,23 @@ buffer." (define-derived-mode completion-list-mode list-mode "Completion List" "Major mode for buffers showing lists of possible completions. -Type \\\\[choose-completion] in the completion list\ - to select the completion near point. -Use \\\\[mouse-choose-completion] to select one\ - with the mouse." +\\{completion-list-mode-map}" (make-local-variable 'completion-base-size) (setq completion-base-size nil)) (let ((map completion-list-mode-map)) + (define-key map 'button2up 'mouse-choose-completion) + (define-key map 'button2 'undefined) + (define-key map "\C-m" 'choose-completion) (define-key map "\e\e\e" 'delete-completion-window) (define-key map "\C-g" 'minibuffer-keyboard-quit) - (define-key map "q" 'abort-recursive-edit) - (define-key map " " (lambda () (interactive) - (select-window (minibuffer-window)))) - (define-key map "\t" (lambda () (interactive) - (select-window (minibuffer-window))))) + (define-key map "q" 'completion-list-mode-quit) + (define-key map " " 'completion-switch-to-minibuffer) + ;; [Tab] used to switch to the minibuffer but since [space] does that and + ;; since most applications in the world use [Tab] to select the next item + ;; in a list, do that in the *Completions* buffer too. -- Bob Weiner, + ;; BeOpen.com, 06/23/1999. + (define-key map "\t" 'next-list-mode-item)) (defvar completion-reference-buffer nil "Record the buffer that was current when the completion list was requested. @@ -486,6 +491,10 @@ but it talks about the buffer in `completion-reference-buffer'. If this is nil, it means to compare text to determine which part of the tail end of the buffer's text is involved in completion.") +;; These names are referenced in the doc string for `completion-list-mode'. +(defalias 'choose-completion 'list-mode-item-keyboard-selected) +(defalias 'mouse-choose-completion 'list-mode-item-mouse-selected) + (defun delete-completion-window () "Delete the completion list window. Go to the window from which completion was requested." @@ -495,6 +504,21 @@ Go to the window from which completion was requested." (if (get-buffer-window buf) (select-window (get-buffer-window buf))))) +(defun completion-switch-to-minibuffer () + "Move from a completions buffer to the active minibuffer window." + (interactive) + (select-window (minibuffer-window))) + +(defun completion-list-mode-quit () + "Abort any recursive edit and bury the completions buffer." + (interactive) + (condition-case () + (abort-recursive-edit) + (error nil)) + ;; If there was no recursive edit to abort, simply bury the completions + ;; list buffer. + (if (eq major-mode 'completion-list-mode) (bury-buffer))) + (defun completion-do-in-minibuffer () (interactive "_") (save-excursion diff --git a/lisp/menubar-items.el b/lisp/menubar-items.el index 0b95009..b284749 100644 --- a/lisp/menubar-items.el +++ b/lisp/menubar-items.el @@ -143,7 +143,7 @@ ("Set language environment") "--" ["Toggle input method" toggle-input-method] - ["Select input method" select-input-method] + ["Select input method" set-input-method] ["Describe input method" describe-input-method] "--" ["Describe current coding systems" @@ -737,6 +737,32 @@ :selected (eq default-toolbar-position 'right)] ) ))) + ,@(if (featurep 'gutter) + '(("Gutter Appearance" + ["Visible" + (customize-set-variable 'gutter-visible-p + (not gutter-visible-p)) + :style toggle + :selected gutter-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)] + ) + ))) ("Mouse" ["Avoid Text..." (customize-set-variable 'mouse-avoidance-mode @@ -955,7 +981,8 @@ ["No Warranty" describe-no-warranty] ["XEmacs License" describe-copying] ["The Latest Version" describe-distribution]) - ["Send Bug Report..." report-emacs-bug])))) + ["Send Bug Report..." report-emacs-bug + :active (fboundp 'report-emacs-bug)])))) (defun maybe-add-init-button () diff --git a/lisp/minibuf.el b/lisp/minibuf.el index 4a8ad96..0061576 100644 --- a/lisp/minibuf.el +++ b/lisp/minibuf.el @@ -748,7 +748,7 @@ See also the variable completion-highlight-first-word-only for control over (defun completing-read (prompt table &optional predicate require-match - initial-contents history) + initial-contents history default) "Read a string in the minibuffer, with completion. Args: PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-CONTENTS, HISTORY. PROMPT is a string to prompt with; normally it ends in a colon and a space. @@ -770,19 +770,25 @@ HISTORY, if non-nil, specifies a history list which INITIAL-CONTENTS corresponds to). If HISTORY is `t', no history will be recorded. Positions are counted starting from 1 at the beginning of the list. +DEFAULT, if non-nil, is the default value. Completion ignores case if the ambient value of `completion-ignore-case' is non-nil." (let ((minibuffer-completion-table table) (minibuffer-completion-predicate predicate) (minibuffer-completion-confirm (if (eq require-match 't) nil t)) - (last-exact-completion nil)) - (read-from-minibuffer prompt - initial-contents - (if (not require-match) - minibuffer-local-completion-map - minibuffer-local-must-match-map) - nil - history))) + (last-exact-completion nil) + ret) + (setq ret (read-from-minibuffer prompt + initial-contents + (if (not require-match) + minibuffer-local-completion-map + minibuffer-local-must-match-map) + nil + history)) + (if (and (string= ret "") + default) + default + ret))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2107,10 +2113,12 @@ On mswindows devices, this uses `mswindows-color-list'." ;;(if (featurep 'mule) -(defun read-coding-system (prompt) +(defun read-coding-system (prompt &optional default-coding-system) "Read a coding-system (or nil) from the minibuffer. -Prompting with string PROMPT." - (intern (completing-read prompt obarray 'find-coding-system t))) +Prompting with string PROMPT. +If the user enters null input, return second argument DEFAULT-CODING-SYSTEM." + (intern (completing-read prompt obarray 'find-coding-system t nil nil + default-coding-system))) (defun read-non-nil-coding-system (prompt) "Read a non-nil coding-system from the minibuffer. diff --git a/lisp/mule/chinese.el b/lisp/mule/chinese.el index a4fd892..aff138f 100644 --- a/lisp/mule/chinese.el +++ b/lisp/mule/chinese.el @@ -1,4 +1,4 @@ -;;; chinese.el --- Support for Chinese +;;; chinese.el --- Support for Chinese -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -104,28 +104,34 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (make-coding-system -;; 'chinese-iso-7bit 2 ?C +;; 'iso-2022-cn 2 ?C ;; "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN)" ;; '(ascii ;; (nil chinese-gb2312 chinese-cns11643-1) ;; (nil chinese-cns11643-2) -;; (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5 -;; chinese-cns11643-6 chinese-cns11643-7) +;; nil ;; nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil -;; init-bol)) +;; init-bol) +;; '((safe-charsets ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2) +;; (mime-charset . iso-2022-cn))) -;; (define-coding-system-alias 'iso-2022-cn 'chinese-iso-7bit) -;; (define-coding-system-alias 'iso-2022-cn-ext 'chinese-iso-7bit) +;; (define-coding-system-alias 'chinese-iso-7bit 'iso-2022-cn) -;; (define-prefix-command 'describe-chinese-environment-map) -;; (define-key-after describe-language-environment-map [Chinese] -;; '("Chinese" . describe-chinese-environment-map) -;; t) +;; (make-coding-system +;; 'iso-2022-cn-ext 2 ?C +;; "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN-EXT)" +;; '(ascii +;; (nil chinese-gb2312 chinese-cns11643-1) +;; (nil chinese-cns11643-2) +;; (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5 +;; chinese-cns11643-6 chinese-cns11643-7) +;; nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil +;; init-bol) +;; '((safe-charsets ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2 +;; chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5 +;; chinese-cns11643-6 chinese-cns11643-7) +;; (mime-charset . iso-2022-cn-ext))) -;; (define-prefix-command 'setup-chinese-environment-map) -;; (define-key-after setup-language-environment-map [Chinese] -;; '("Chinese" . setup-chinese-environment-map) -;; t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Chinese GB2312 (simplified) @@ -134,8 +140,10 @@ ;; (make-coding-system ;; 'chinese-iso-8bit 2 ?c ;; "ISO 2022 based EUC encoding for Chinese GB2312 (MIME:CN-GB-2312)" -;; '((ascii t) chinese-gb2312 chinese-sisheng nil -;; nil ascii-eol ascii-cntl nil nil single-shift nil)) +;; '(ascii chinese-gb2312 nil nil +;; nil ascii-eol ascii-cntl nil nil nil nil) +;; '((safe-charsets ascii chinese-gb2312) +;; (mime-charset . cn-gb-2312))) (make-coding-system 'cn-gb-2312 'iso2022 @@ -149,14 +157,19 @@ ;; (define-coding-system-alias 'cn-gb-2312 'chinese-iso-8bit) ;; (define-coding-system-alias 'euc-china 'chinese-iso-8bit) +;; (define-coding-system-alias 'euc-cn 'chinese-iso-8bit) -(copy-coding-system 'cn-gb-2312 'gb2312) -(copy-coding-system 'cn-gb-2312 'chinese-euc) +(define-coding-system-alias 'gb2312 'cn-gb-2312) +(define-coding-system-alias 'chinese-euc 'cn-gb-2312) ;; (make-coding-system ;; 'chinese-hz 0 ?z ;; "Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)" -;; nil) +;; nil +;; '((safe-charsets ascii chinese-gb2312) +;; (mime-charset . hz-gb-2312) +;; (post-read-conversion . post-read-decode-hz) +;; (pre-write-conversion . pre-write-encode-hz))) ;; (put 'chinese-hz 'post-read-conversion 'post-read-decode-hz) ;; (put 'chinese-hz 'pre-write-conversion 'pre-write-encode-hz) @@ -171,41 +184,48 @@ ;; (define-coding-system-alias 'hz-gb-2312 'chinese-hz) ;; (define-coding-system-alias 'hz 'chinese-hz) -(copy-coding-system 'hz-gb-2312 'hz) -(copy-coding-system 'hz-gb-2312 'chinese-hz) +(define-coding-system-alias 'hz 'hz-gb-2312) (defun post-read-decode-hz (len) - (let ((pos (point))) - (decode-hz-region pos (+ pos len)))) + (let ((pos (point)) + (buffer-modified-p (buffer-modified-p)) + last-coding-system-used) + (prog1 + (decode-hz-region pos (+ pos len)) + (set-buffer-modified-p buffer-modified-p)))) (defun pre-write-encode-hz (from to) - (let ((buf (current-buffer)) - (work (get-buffer-create " *pre-write-encoding-work*"))) - (set-buffer work) - (erase-buffer) + (let ((buf (current-buffer))) + (set-buffer (generate-new-buffer " *temp*")) (if (stringp from) (insert from) (insert-buffer-substring buf from to)) - (encode-hz-region 1 (point-max)) + (let (last-coding-system-used) + (encode-hz-region 1 (point-max))) nil)) (set-language-info-alist - "Chinese-GB" '((setup-function . (setup-chinese-gb-environment - . setup-chinese-environment-map)) - (charset . (chinese-gb2312 sisheng)) - (coding-system - . (cn-gb-2312 iso-2022-7bit hz-gb-2312)) + "Chinese-GB" '((setup-function . setup-chinese-gb-environment-internal) + (charset chinese-gb2312 sisheng) + (coding-system cn-gb-2312 iso-2022-7bit hz-gb-2312) + (coding-priority cn-gb-2312 big5 iso-2022-7bit) + (input-method . "chinese-py-punct") + (features china-util) (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") - (documentation . ("Support for Chinese GB2312 character set." - . describe-chinese-environment-map)) - )) + (documentation . "Support for Chinese GB2312 character set.")) + '("Chinese")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Chinese BIG5 (traditional) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (make-coding-system -;; 'chinese-big5 3 ?B "BIG5 8-bit encoding for Chinese (MIME:CN-BIG5)") +;; 'chinese-big5 3 ?B "BIG5 8-bit encoding for Chinese (MIME:CN-BIG5)" +;; nil +;; '((safe-charsets ascii chinese-big5-1 chinese-big5-2) +;; (mime-charset . cn-big5) +;; (charset-origin-alist (chinese-big5-1 "BIG5" encode-big5-char) +;; (chinese-big5-2 "BIG5" encode-big5-char)))) (make-coding-system 'big5 'big5 @@ -215,8 +235,7 @@ ;; (define-coding-system-alias 'big5 'chinese-big5) ;; (define-coding-system-alias 'cn-big5 'chinese-big5) -(copy-coding-system 'big5 'cn-big5) -(copy-coding-system 'big5 'chinese-big5) +(define-coding-system-alias 'cn-big5 'big5) ;; Big5 font requires special encoding. (define-ccl-program ccl-encode-big5-font @@ -240,29 +259,29 @@ (set-charset-ccl-program 'chinese-big5-2 ccl-encode-big5-font) (set-language-info-alist - "Chinese-BIG5" '((setup-function . (setup-chinese-big5-environment - . setup-chinese-environment-map)) - (charset . (chinese-big5-1 chinese-big5-2)) - (coding-system . (big5 iso-2022-7bit)) + "Chinese-BIG5" '((charset chinese-big5-1 chinese-big5-2) + (coding-system big5 iso-2022-7bit) + (coding-priority big5 cn-gb-2312 iso-2022-7bit) + (input-method . "chinese-py-punct-b5") + (features china-util) (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B") - (documentation . ("Support for Chinese Big5 character set." - . describe-chinese-environment-map)) - )) + (documentation . "Support for Chinese Big5 character set.")) + '("Chinese")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Chinese CNS11643 (traditional) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (set-language-info-alist -;; "Chinese-CNS" '((setup-function . (setup-chinese-cns-environment -;; . setup-chinese-environment-map)) -;; (charset . (chinese-cns11643-1 chinese-cns11643-2 -;; chinese-cns11643-3 chinese-cns11643-4 -;; chinese-cns11643-5 chinese-cns11643-6 -;; chinese-cns11643-7)) -;; (coding-system . (chinese-iso-7bit)) -;; (documentation . ("Support for Chinese CNS character sets." -;; . describe-chinese-environment-map)) -;; )) +;; "Chinese-CNS" '((charset chinese-cns11643-1 chinese-cns11643-2 +;; chinese-cns11643-3 chinese-cns11643-4 +;; chinese-cns11643-5 chinese-cns11643-6 +;; chinese-cns11643-7) +;; (coding-system iso-2022-cn) +;; (coding-priority iso-2022-cn chinese-big5 chinese-iso-8bit) +;; (features china-util) +;; (input-method . "chinese-cns-quick") +;; (documentation . "Support for Chinese CNS character sets.")) +;; '("Chinese")) ;;; chinese.el ends here diff --git a/lisp/mule/cyrillic.el b/lisp/mule/cyrillic.el index 15ed22b..a766710 100644 --- a/lisp/mule/cyrillic.el +++ b/lisp/mule/cyrillic.el @@ -1,4 +1,4 @@ -;;; cyrillic.el --- Support for languages which use Cyrillic characters +;;; cyrillic.el --- Support for Cyrillic -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -32,32 +32,23 @@ ;; For syntax of Cyrillic (modify-syntax-entry 'cyrillic-iso8859-5 "w") -(modify-syntax-entry ?.LN- ".") -(modify-syntax-entry ?.LNp ".") -(modify-syntax-entry ?.LN} ".") +(modify-syntax-entry ?,L-(B ".") +(modify-syntax-entry ?,Lp(B ".") +(modify-syntax-entry ?,L}(B ".") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; CYRILLIC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-prefix-command 'describe-cyrillic-environment-map) -;; (define-key-after describe-language-environment-map [Cyrillic] -;; '("Cyrillic" . describe-cyrillic-environment-map) -;; t) - -;; (define-prefix-command 'setup-cyrillic-environment-map) -;; (define-key-after setup-language-environment-map [Cyrillic] -;; '("Cyrillic" . setup-cyrillic-environment-map) -;; t) - - ;; ISO-8859-5 staff ;; (make-coding-system ;; 'cyrillic-iso-8bit 2 ?5 ;; "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)" -;; '((ascii t) (cyrillic-iso8859-5 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil)) +;; '(ascii cyrillic-iso8859-5 nil nil +;; nil nil nil nil nil nil nil) +;; '((safe-charsets ascii cyrillic-iso8859-5) +;; (mime-charset . iso-8859-5))) ;; (define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit) @@ -72,14 +63,15 @@ )) (set-language-info-alist - "Cyrillic-ISO" '((setup-function . (setup-cyrillic-iso-environment - . setup-cyrillic-environment-map)) - (charset . (cyrillic-iso8859-5)) + "Cyrillic-ISO" '((charset cyrillic-iso8859-5) (tutorial . "TUTORIAL.ru") - (coding-system . (iso-8859-5)) - (sample-text . "Russian (.LN@NcNaNaNZNXNY) N7NTN`NPNRNaNbNRNcNYNbNU!") - (documentation . ("Support for Cyrillic ISO-8859-5." - . describe-cyrillic-environment-map)))) + (coding-system iso-8859-5) + (coding-priority iso-8859-5) + (input-method . "cyrillic-yawerty") + (features cyril-util) + (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") + (documentation . "Support for Cyrillic ISO-8859-5.")) + '("Cyrillic")) ;; KOI-8 staff @@ -96,13 +88,13 @@ 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ?$B(!(B ?$B("(B ?$B(#(B ?$B($(B ?$B(&(B ?$B(%(B ?$B('(B ?$B()(B ?$B(((B ?$B(*(B ?$B(+(B 32 ?$(G#'(B ?$(G#+(B ?$(G#/(B 32 - 32 ?$(C"F(B 32 32 ?$B"#(B 32 ?$B"e(B ?$A!V(B ?$A!\(B ?$A!](B ?.LN 32 ?.AN0 ?N2 ?N7 ?Nw - ?$(G#D(B 32 32 ?.LNq 32 32 32 32 32 32 32 32 32 32 32 ?$(G#E(B - 32 32 ?$(G#G(B ?.LN! 32 32 32 32 32 32 32 32 ?$(G#F(B 32 32 ?.AN) - ?.LNn ?NP ?NQ ?Nf ?NT ?NU ?Nd ?NS ?Ne ?NX ?NY ?NZ ?N[ ?N\ ?N] ?N^ - ?.LN_ ?No ?N` ?Na ?Nb ?Nc ?NV ?NR ?Nl ?Nk ?NW ?Nh ?Nm ?Ni ?Ng ?Nj - ?.LNN ?N0 ?N1 ?NF ?N4 ?N5 ?ND ?N3 ?NE ?N8 ?N9 ?N: ?N; ?N< ?N= ?N> - ?.LN? ?NO ?N@ ?NA ?NB ?NC ?N6 ?N2 ?NL ?NK ?N7 ?NH ?NM ?NI ?NG ?NJ ] + 32 ?$(C"F(B 32 32 ?$B"#(B 32 ?$B"e(B ?$A!V(B ?$A!\(B ?$A!](B ?,L (B 32 ?,A0(B ?,A2(B ?,A7(B ?,Aw(B + ?$(G#D(B 32 32 ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 ?$(G#E(B + 32 32 ?$(G#G(B ?,L!(B 32 32 32 32 32 32 32 32 ?$(G#F(B 32 32 ?,A)(B + ?,Ln(B ?,LP(B ?,LQ(B ?,Lf(B ?,LT(B ?,LU(B ?,Ld(B ?,LS(B ?,Le(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B + ?,L_(B ?,Lo(B ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,LV(B ?,LR(B ?,Ll(B ?,Lk(B ?,LW(B ?,Lh(B ?,Lm(B ?,Li(B ?,Lg(B ?,Lj(B + ?,LN(B ?,L0(B ?,L1(B ?,LF(B ?,L4(B ?,L5(B ?,LD(B ?,L3(B ?,LE(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B + ?,L?(B ?,LO(B ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,L6(B ?,L2(B ?,LL(B ?,LK(B ?,L7(B ?,LH(B ?,LM(B ?,LI(B ?,LG(B ?,LJ(B ] "Cyrillic KOI8-R decoding table.") (defvar cyrillic-koi8-r-encode-table @@ -110,7 +102,7 @@ (i 0)) (while (< i 256) (let* ((ch (aref cyrillic-koi8-r-decode-table i)) - (split (split-char-or-char-int ch))) + (split (split-char ch))) (cond ((eq (car split) 'cyrillic-iso8859-5) (aset table (logior (nth 1 split) 128) i) ) @@ -141,17 +133,22 @@ (write-read-repeat r0 , cyrillic-koi8-r-encode-table)))))) "CCL program to encode KOI8.") -;(make-coding-system -; 'cyrillic-koi8 4 -; ;; We used to use ?K. It is true that ?K is more strictly correct, -; ;; but it is also used for Korean. -; ;; So people who use koi8 for languages other than Russian -; ;; will have to forgive us. -; ?R "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)" -; (cons ccl-decode-koi8 ccl-encode-koi8)) - -;(define-coding-system-alias 'koi8-r 'cyrillic-koi8) -;(define-coding-system-alias 'koi8 'cyrillic-koi8) +;; (make-coding-system +;; 'cyrillic-koi8 4 +;; ;; We used to use ?K. It is true that ?K is more strictly correct, +;; ;; but it is also used for Korean. +;; ;; So people who use koi8 for languages other than Russian +;; ;; will have to forgive us. +;; ?R "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)" +;; '(ccl-decode-koi8 . ccl-encode-koi8) +;; '((safe-charsets ascii cyrillic-iso8859-5) +;; (mime-charset . koi8-r) +;; (valid-codes (0 . 127) 163 179 (192 . 255)) +;; (charset-origin-alist (cyrillic-iso8859-5 "KOI8-R" +;; cyrillic-encode-koi8-r-char)))) + +;; (define-coding-system-alias 'koi8-r 'cyrillic-koi8) +;; (define-coding-system-alias 'koi8 'cyrillic-koi8) (make-coding-system 'koi8-r 'ccl @@ -160,83 +157,102 @@ encode ,ccl-encode-koi8 mnemonic "KOI8")) -;(define-coding-system-alias 'koi8-r 'koi8) +;; it is not correct, but XEmacs doesn't have `ccl' category... +(coding-system-put 'koi8-r 'category 'iso-8-1) ;; (define-ccl-program ccl-encode-koi8-font -;; '(0 -;; ((r1 -= 160) -;; (r1 = r1 -;; [ 32 179 32 32 32 32 32 32 32 32 32 32 32 32 32 32 -;; 225 226 247 231 228 229 246 250 233 234 235 236 237 238 239 240 -;; 242 243 244 245 230 232 227 254 251 253 255 249 248 252 224 241 -;; 193 194 215 199 196 197 214 218 201 202 203 204 205 206 207 208 -;; 210 211 212 213 198 200 195 222 219 221 223 217 216 220 192 209 -;; 32 163 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) -;; )) +;; `(0 +;; ((r1 |= 128) +;; (r1 = r1 ,cyrillic-koi8-r-encode-table))) ;; "CCL program to encode Cyrillic chars to KOI font.") ;; (setq font-ccl-encoder-alist ;; (cons (cons "koi8" ccl-encode-koi8-font) font-ccl-encoder-alist)) +;; (defvar cyrillic-koi8-r-nonascii-translation-table +;; (make-translation-table-from-vector cyrillic-koi8-r-decode-table) +;; "Value of `nonascii-translation-table' in Cyrillic-KOI8 language environment..") + (set-language-info-alist - "Cyrillic-KOI8" '((setup-function . (setup-cyrillic-koi8-environment - . setup-cyrillic-environment-map)) - (charset . (cyrillic-iso8859-5)) - (coding-system . (koi8-r)) + "Cyrillic-KOI8" '((charset cyrillic-iso8859-5) + (coding-system koi8-r) + (coding-priority koi8-r) + (input-method . "cyrillic-yawerty") + (features cyril-util) (tutorial . "TUTORIAL.ru") - (sample-text . "Russian (.LN@NcNaNaNZNXNY) N7NTN`NPNRNaNbNRNcNYNbNU!") - (documentation . ("Support for Cyrillic KOI-8." - . describe-cyrillic-environment-map)))) + (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") + (documentation . "Support for Cyrillic KOI8-R.")) + '("Cyrillic")) ;;; ALTERNATIVNYJ staff +(eval-and-compile + +(defvar cyrillic-alternativnyj-decode-table + [ + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 + ?,L0(B ?,L1(B ?,L2(B ?,L3(B ?,L4(B ?,L5(B ?,L6(B ?,L7(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B ?,L?(B + ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,LD(B ?,LE(B ?,LF(B ?,LG(B ?,LH(B ?,LI(B ?,LJ(B ?,LK(B ?,LL(B ?,LM(B ?,LN(B ?,LO(B + ?,LP(B ?,LQ(B ?,LR(B ?,LS(B ?,LT(B ?,LU(B ?,LV(B ?,LW(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B ?,L_(B + 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 + 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 + 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 + ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,Ld(B ?,Le(B ?,Lf(B ?,Lg(B ?,Lh(B ?,Li(B ?,Lj(B ?,Lk(B ?,Ll(B ?,Lm(B ?,Ln(B ?,Lo(B + ?,L!(B ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 32 32 ?,Lp(B] + "Cyrillic ALTERNATIVNYJ decoding table.") + +(defvar cyrillic-alternativnyj-encode-table + (let ((table (make-vector 256 32)) + (i 0)) + (while (< i 256) + (let* ((ch (aref cyrillic-alternativnyj-decode-table i)) + (split (split-char ch))) + (if (eq (car split) 'cyrillic-iso8859-5) + (aset table (logior (nth 1 split) 128) i) + (if (/= ch 32) + (aset table ch i)))) + (setq i (1+ i))) + table) + "Cyrillic ALTERNATIVNYJ encoding table.") + +) + + (define-ccl-program ccl-decode-alternativnyj - '(3 + `(3 ((read r0) (loop - (write-read-repeat - r0 - [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?.LN0 ?N1 ?N2 ?N3 ?N4 ?N5 ?N6 ?N7 ?N8 ?N9 ?N: ?N; ?N< ?N= ?N> ?N? - ?.LN@ ?NA ?NB ?NC ?ND ?NE ?NF ?NG ?NH ?NI ?NJ ?NK ?NL ?NM ?NN ?NO - ?.LNP ?NQ ?NR ?NS ?NT ?NU ?NV ?NW ?NX ?NY ?NZ ?N[ ?N\ ?N] ?N^ ?N_ - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - ?.LN` ?Na ?Nb ?Nc ?Nd ?Ne ?Nf ?Ng ?Nh ?Ni ?Nj ?Nk ?Nl ?Nm ?Nn ?No - ?.LN! ?Nq 32 32 32 32 32 32 32 32 32 32 32 32 32 ?Np])))) + (write-read-repeat r0 ,cyrillic-alternativnyj-decode-table)))) "CCL program to decode Alternativnyj.") (define-ccl-program ccl-encode-alternativnyj `(1 ((read r0) (loop - (if (r0 != ,(charset-id 'cyrillic-iso8859-5)) - (write-read-repeat r0) - ((read r0) - (r0 -= 160) - (write-read-repeat - r0 - [ 32 240 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 - 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 - 255 241 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) - ))))) + (if (r0 != ,(charset-id 'cyrillic-iso8859-5)) + (write-read-repeat r0) + ((read r0) + (write-read-repeat r0 ,cyrillic-alternativnyj-encode-table)))))) "CCL program to encode Alternativnyj.") ;; (make-coding-system -;; 'alternativnyj 4 -;; ?A "Coding-system used for Alternativnyj" -;; (cons ccl-decode-alternativnyj ccl-encode-alternativnyj)) +;; 'cyrillic-alternativnyj 4 ?A +;; "ALTERNATIVNYJ 8-bit encoding for Cyrillic" +;; '(ccl-decode-alternativnyj . ccl-encode-alternativnyj) +;; '((safe-charsets ascii cyrillic-iso8859-5) +;; (valid-codes (0 . 175) (224 . 241) 255) +;; (charset-origin-alist (cyrillic-iso8859-5 "ALTERNATIVNYJ" +;; cyrillic-encode-koi8-r-char)))) + + +;; (define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj) (make-coding-system 'alternativnyj 'ccl @@ -245,65 +261,32 @@ encode ,ccl-encode-alternativnyj mnemonic "Cy.Alt")) +;; it is not correct, but XEmacs doesn't have `ccl' category... +(coding-system-put 'alternativnyj 'category 'iso-8-1) + ;; (define-ccl-program ccl-encode-alternativnyj-font ;; '(0 -;; ((r1 -= 160) -;; (r1 = r1 -;; [ 32 240 32 32 32 32 32 32 32 32 32 32 32 32 32 32 -;; 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 -;; 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 -;; 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 -;; 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 -;; 255 241 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) -;; )) +;; ((r1 |= 128) +;; (r1 = r1 ,cyrillic-alternativnyj-encode-table))) ;; "CCL program to encode Cyrillic chars to Alternativnyj font.") ;; (setq font-ccl-encoder-alist ;; (cons (cons "alternativnyj" ccl-encode-alternativnyj-font) ;; font-ccl-encoder-alist)) -(set-language-info-alist - "Cyrillic-ALT" '((setup-function . (setup-cyrillic-alternativnyj-environment - . setup-cyrillic-environment-map)) - (charset . (cyrillic-iso8859-5)) - (coding-system . (alternativnyj)) - (tutorial . "TUTORIAL.ru") - (sample-text . "Russian (.LN@NcNaNaNZNXNY) N7NTN`NPNRNaNbNRNcNYNbNU!") - (documentation . ("Support for Cyrillic ALTERNATIVNYJ." - . describe-cyrillic-environment-map)))) - -;;; GENERAL - -(defun setup-cyrillic-environment () - "Setup multilingual environment for Cyrillic users." - (interactive) - (setq primary-language "Cyrillic") - - (setq coding-category-iso-8-1 'iso-8859-5) - - (set-coding-priority - '(coding-category-iso-7 - coding-category-iso-8-1)) - - (setq-default buffer-file-coding-system 'iso-8859-5) - (set-terminal-coding-system 'iso-8859-5) - (set-keyboard-coding-system 'iso-8859-5) - - (setq default-input-method '("Cyrillic" . "quail-yawerty")) - ) - -(defun describe-cyrillic-support () - "Describe how Emacs support Cyrillic." - (interactive) - (describe-language-support-internal "Cyrillic")) +;; (defvar cyrillic-alternativnyj-nonascii-translation-table +;; (make-translation-table-from-vector cyrillic-alternativnyj-decode-table) +;; "Value of `nonascii-translation-table' in Cyrillic-ALT language environment.") (set-language-info-alist - "Cyrillic" '((setup-function . setup-cyrillic-environment) - (describe-function . describe-cyrillic-support) - (charset . (cyrillic-iso8859-5)) - (tutorial . "TUTORIAL.ru") - (coding-system . (iso-8859-5 koi8-r alternativnyj)) - (sample-text . "Russian (.LN@NcNaNaNZNXNY) N7NTN`NPNRNaNbNRNcNYNbNU!") - (documentation . nil))) + "Cyrillic-ALT" '((charset cyrillic-iso8859-5) + (coding-system alternativnyj) + (coding-priority alternativnyj) + (input-method . "cyrillic-yawerty") + (features cyril-util) + (tutorial . "TUTORIAL.ru") + (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") + (documentation . "Support for Cyrillic ALTERNATIVNYJ.")) + '("Cyrillic")) ;;; cyrillic.el ends here diff --git a/lisp/mule/english.el b/lisp/mule/english.el index 60731be..640a472 100644 --- a/lisp/mule/english.el +++ b/lisp/mule/english.el @@ -1,8 +1,7 @@ ;;; english.el --- English support -;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. +;; Copyright (C) 1997,1999 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. -;; Copyright (C) 1997 MORIOKA Tomohiko ;; Keywords: multibyte character, character set, syntax, category @@ -29,90 +28,17 @@ ;; English as a language environment is one of the ways to reset ;; various multilingual environment to the original settting. -;; modified for XEmacs by MORIOKA Tomohiko - ;;; Code (defun setup-english-environment () "Reset multilingual environment of Emacs to the default status. -The default status is as follows. - - The default value of enable-multibyte-characters is t. - - The default value of buffer-file-coding-system is nil. - The coding system for terminal output is nil. - The coding system for keyboard input is nil. - - The order of priorities of coding categories and the coding system - bound to each category are as follows - coding category coding system - -------------------------------------------------- - coding-category-iso-7 iso-2022-7bit - coding-category-iso-8-1 iso-8859-1 - coding-category-iso-8-2 iso-8859-1 - coding-category-iso-7-else iso-2022-7bit-lock - coding-category-iso-8-else iso-2022-8bit-ss2 - coding-category-emacs-mule no-conversion - coding-category-sjis japanese-shift-jis - coding-category-big5 chinese-big5 - coding-category-binarry no-conversion -" +See the function `reset-language-environment' for more detail." (interactive) - ;; (setq-default enable-multibyte-characters t) - - ;; (setq coding-category-iso-7 'iso-2022-7bit - ;; coding-category-iso-8-1 'iso-8859-1 - ;; coding-category-iso-8-2 'iso-8859-1 - ;; coding-category-iso-7-else 'iso-2022-7bit-lock - ;; coding-category-iso-8-else 'iso-2022-8bit-ss2 - ;; coding-category-emacs-mule 'no-conversion - ;; coding-category-sjis 'japanese-shift-jis - ;; coding-category-big5 'chinese-big5 - ;; coding-category-binary 'binary) - (set-coding-category-system 'iso-7 'iso-2022-7bit) - (set-coding-category-system 'iso-8-1 'iso-8859-1) - (set-coding-category-system 'iso-8-2 'iso-8859-1) - (set-coding-category-system 'iso-lock-shift 'iso-2022-lock) - (set-coding-category-system 'iso-8-designate 'ctext) - (set-coding-category-system 'no-conversion 'no-conversion) - (set-coding-category-system 'shift-jis 'shift_jis) - (set-coding-category-system 'big5 'big5) - - ;; (set-coding-priority - ;; '(coding-category-iso-7 - ;; coding-category-iso-8-2 - ;; coding-category-iso-8-1 - ;; coding-category-iso-7-else - ;; coding-category-iso-8-else - ;; coding-category-emacs-mule - ;; coding-category-raw-text - ;; coding-category-sjis - ;; coding-category-big5 - ;; coding-category-binary)) - (set-coding-priority-list - '(iso-7 - iso-8-2 - iso-8-1 - iso-8-designate - iso-lock-shift - no-conversion - shift-jis - big5)) - - (set-default-coding-systems nil) - ;; Don't alter the terminal and keyboard coding systems here. - ;; The terminal still supports the same coding system - ;; that it supported a minute ago. -;;; (set-terminal-coding-system-internal nil) -;;; (set-keyboard-coding-system-internal nil) - - ;;(setq nonascii-insert-offset 0) - ) + (reset-language-environment)) (set-language-info-alist - "English" '((setup-function . setup-english-environment) - (tutorial . "TUTORIAL") - (charset . (ascii)) + "English" '((tutorial . "TUTORIAL") + (charset ascii) (sample-text . "Hello!, Hi!, How are you?") (documentation . "\ Nothing special is needed to handle English.") diff --git a/lisp/mule/ethiopic.el b/lisp/mule/ethiopic.el index f7ddcaa..9c31637 100644 --- a/lisp/mule/ethiopic.el +++ b/lisp/mule/ethiopic.el @@ -1,6 +1,6 @@ -;;; ethiopic.el --- Support for Ethiopic +;;; ethiopic.el --- Support for Ethiopic -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. +;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1997 MORIOKA Tomohiko diff --git a/lisp/mule/european.el b/lisp/mule/european.el index 420ca2c..54a3ca3 100644 --- a/lisp/mule/european.el +++ b/lisp/mule/european.el @@ -1,4 +1,4 @@ -;;; european.el --- Support for European languages +;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -52,126 +52,87 @@ ;;; EUROPEANS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-prefix-command 'describe-european-environment-map) -;; (define-key-after describe-language-environment-map [European] -;; '("European" . describe-european-environment-map) -;; t) - -;; (define-prefix-command 'setup-european-environment-map) -;; (define-key-after setup-language-environment-map [European] -;; '("European" . setup-european-environment-map) -;; t) - -;; Setup for LANGAUGE which uses one-byte 8-bit CHARSET, one-byte -;; 8-bit CODING-SYSTEM, and INPUT-METHOD. -(defun setup-8-bit-environment (language charset coding-system input-method) - (setup-english-environment) - (set-default-coding-systems coding-system) - ;; (setq coding-category-iso-8-1 coding-system - ;; coding-category-iso-8-2 coding-system) - (set-coding-category-system 'iso-8-1 coding-system) - (set-coding-category-system 'iso-8-2 coding-system) - - ;; (if charset - ;; (let ((nonascii-offset (- (make-char charset) 128))) - ;; ;; Set up for insertion of characters in this character set - ;; ;; when codes 0200 - 0377 are typed in. - ;; (setq nonascii-insert-offset nonascii-offset))) - - (if input-method - (setq default-input-method input-method)) - - ;; If this is a Latin-N character set, set up syntax for it in - ;; single-byte mode. We can't use require because the file - ;; must be eval'd each time in case we change from one Latin-N to another. - ;; (if (string-match "^Latin-\\([1-9]\\)$" language) - ;; (load (downcase language) nil t)) - ) ;; Latin-1 (ISO-8859-1) ;; (make-coding-system ;; 'iso-latin-1 2 ?1 -;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-1, Compound Text Encoding)" -;; '((ascii t) (latin-iso8859-1 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t)) +;; "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)" +;; '(ascii latin-iso8859-1 nil nil +;; nil nil nil nil nil nil nil nil nil nil nil nil t) +;; '((safe-charsets ascii latin-iso8859-1) +;; (mime-charset . iso-8859-1))) ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1) ;; (define-coding-system-alias 'latin-1 'iso-latin-1) -;; (define-coding-system-alias 'ctext 'iso-latin-1) + +;; (make-coding-system +;; 'compound-text 2 ?1 +;; "ISO 2022 based encoding used in inter client communication of X" +;; '((ascii t) (latin-iso8859-1 t) nil nil +;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t) +;; '((safe-charsets . t))) + +;; (define-coding-system-alias 'ctext 'compound-text) (defun setup-latin1-environment () "Set up multilingual environment (MULE) for European Latin-1 users." (interactive) - (setup-8-bit-environment "Latin-1" 'latin-iso8859-1 'iso-8859-1 - "latin-1-prefix")) + (set-language-environment "Latin-1")) (set-language-info-alist - "Latin-1" '((setup-function . (setup-latin1-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-1)) - (coding-system . (iso-8859-1)) + "Latin-1" '((charset ascii latin-iso8859-1) + (coding-system iso-8859-1) + (coding-priority iso-8859-1) + (input-method . "latin-1-prefix") (sample-text . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") - (documentation . ("\ -These languages are supported with the Latin-1 (ISO-8859-1) character set: + (documentation . "\ +This language environment is a generic one for Latin-1 (ISO-8859-1) +character set which supports the following languages: Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. -" . describe-european-environment-map)) - )) +We also have a German specific language environment \"German\".")) + '("European")) (set-language-info-alist - "German" '((setup-function . (setup-latin1-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-1)) - (coding-system . (iso-8859-1)) - (tutorial . "TUTORIAL.de") - (sample-text - . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") - (documentation . ("\ + "French" '((charset ascii latin-iso8859-1) + (coding-system iso-8859-1) + (coding-priority iso-8859-1) + (tutorial . "TUTORIAL.fr") + (sample-text + . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") + (documentation . ("\ These languages are supported with the Latin-1 (ISO-8859-1) character set: Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. -" . describe-european-environment-map)) - )) +"))) + '("European")) (set-language-info-alist - "French" '((setup-function . (setup-latin1-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-1)) - (coding-system . (iso-8859-1)) - (tutorial . "TUTORIAL.fr") - (sample-text - . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") - (documentation . ("\ + "Norwegian" '((charset ascii latin-iso8859-1) + (coding-system iso-8859-1) + (coding-priority iso-8859-1) + (tutorial . "TUTORIAL.no") + (sample-text + . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") + (documentation . ("\ These languages are supported with the Latin-1 (ISO-8859-1) character set: Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. -" . describe-european-environment-map)) - )) +"))) + '("European")) -(set-language-info-alist - "Norwegian" '((setup-function . (setup-latin1-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-1)) - (coding-system . (iso-8859-1)) - (tutorial . "TUTORIAL.no") - (sample-text - . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") - (documentation . ("\ -These languages are supported with the Latin-1 (ISO-8859-1) character set: - Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, - Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. -" . describe-european-environment-map)) - )) ;; Latin-2 (ISO-8859-2) ;; (make-coding-system ;; 'iso-latin-2 2 ?2 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" -;; '((ascii t) (latin-iso8859-2 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil)) +;; '(ascii latin-iso8859-2 nil nil +;; nil nil nil nil nil nil nil) +;; '((safe-charsets ascii latin-iso8859-2) +;; (mime-charset . iso-8859-2))) ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2) ;; (define-coding-system-alias 'latin-2 'iso-latin-2) @@ -188,67 +149,65 @@ These languages are supported with the Latin-1 (ISO-8859-1) character set: (defun setup-latin2-environment () "Set up multilingual environment (MULE) for European Latin-2 users." (interactive) - (setup-8-bit-environment "Latin-2" 'latin-iso8859-2 'iso-8859-2 - "latin-2-prefix")) + (set-language-environment "Latin-2")) (set-language-info-alist - "Latin-2" '((setup-function . (setup-latin2-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-2)) - (coding-system . (iso-8859-2)) - (documentation . ("\ -These languages are supported with the Latin-2 (ISO-8859-2) character set: + "Latin-2" '((charset ascii latin-iso8859-2) + (coding-system iso-8859-2) + (coding-priority iso-8859-2) + (input-method . "latin-2-prefix") + (documentation . "\ +This language environment is a generic one for Latin-2 (ISO-8859-2) +character set which supports the following languages: Albanian, Czech, English, German, Hungarian, Polish, Romanian, - Serbian, Croatian, Slovak, Slovene, and Swedish. -" . describe-european-environment-map)) - )) + Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), + and Swedish.")) + '("European")) (set-language-info-alist - "Croatian" '((setup-function . (setup-latin2-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-2)) + "Croatian" '((charset ascii latin-iso8859-2) + (coding-system iso-8859-2) + (coding-priority iso-8859-2) (tutorial . "TUTORIAL.hr") - (coding-system . (iso-8859-2)) - (documentation . ("\ -These languages are supported with the Latin-2 (ISO-8859-2) character set: + (documentation . "\ +This language environment is a generic one for Latin-2 (ISO-8859-2) +character set which supports the following languages: Albanian, Czech, English, German, Hungarian, Polish, Romanian, - Serbian, Croatian, Slovak, Slovene, and Swedish. -" . describe-european-environment-map)) - )) + Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), + and Swedish.")) + '("European")) (set-language-info-alist - "Polish" '((setup-function . (setup-latin2-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-2)) - (tutorial . "TUTORIAL.pl") - (coding-system . (iso-8859-2)) - (documentation . ("\ -These languages are supported with the Latin-2 (ISO-8859-2) character set: + "Polish" '((charset ascii latin-iso8859-2) + (coding-system iso-8859-2) + (coding-priority iso-8859-2) + (tutorial . "TUTORIAL.pl") + (documentation . "\ +This language environment is a generic one for Latin-2 (ISO-8859-2) +character set which supports the following languages: Albanian, Czech, English, German, Hungarian, Polish, Romanian, - Serbian, Croatian, Slovak, Slovene, and Swedish. -" . describe-european-environment-map)) - )) + Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), + and Swedish.")) + '("European")) ;; Romanian support originally from romanian.el (defun setup-romanian-environment () "Setup multilingual environment (MULE) for Romanian." (interactive) - (setup-8-bit-environment "Romanian" 'latin-iso8859-2 'iso-8859-2 - "romanian")) + (set-language-environment "Romanian")) (set-language-info-alist - "Romanian" '((setup-function . (setup-romanian-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-2)) + "Romanian" '((charset ascii latin-iso8859-2) + (coding-system iso-8859-2) + (coding-priority iso-8859-2) + (input-method . "latin-2-postfix") (tutorial . "TUTORIAL.ro") - (coding-system . (iso-8859-2)) - (documentation . ("\ -These languages are supported with the Latin-2 (ISO-8859-2) character set: - Albanian, Czech, English, German, Hungarian, Polish, Romanian, - Serbian, Croatian, Slovak, Slovene, and Swedish. -" . describe-european-environment-map)) - )) + (sample-text . "Bun,Bc(B ziua, bine a,B~(Bi venit!") + (documentation . t)) + '("European")) + +(provide 'romanian) ;; Czech support originally from czech.el ;; Author: Milan Zamazal @@ -257,24 +216,18 @@ These languages are supported with the Latin-2 (ISO-8859-2) character set: (defun setup-czech-environment () "Set up multilingual environment (MULE) for czech users." (interactive) - (setup-8-bit-environment "Czech" 'latin-iso8859-2 'iso-8859-2 - "czech")) - + (set-language-environment "Czech")) (set-language-info-alist - "Czech" - '((setup-function . (setup-czech-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-2)) - (coding-system . (iso-8859-2)) - (tutorial . "TUTORIAL.cs") - (documentation . ("\ -These languages are supported with the Latin-2 (ISO-8859-2) character set: -Albanian, Czech, English, German, Hungarian, Polish, Romanian, -Serbian, Croatian, Slovak, Slovene, and Swedish. -" . describe-european-environment-map)) -)) + "Czech" '((charset ascii latin-iso8859-2) + (coding-system iso-8859-2) + (coding-priority iso-8859-2) + (tutorial . "TUTORIAL.cs") + (sample-text . "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!") + (documentation . t)) + '("European")) +(provide 'czech) ;; Latin-3 (ISO-8859-3) @@ -282,8 +235,10 @@ Serbian, Croatian, Slovak, Slovene, and Swedish. ;; (make-coding-system ;; 'iso-latin-3 2 ?3 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" -;; '((ascii t) (latin-iso8859-3 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil)) +;; '(ascii latin-iso8859-3 nil nil +;; nil nil nil nil nil nil nil) +;; '((safe-charsets ascii latin-iso8859-3) +;; (mime-charset . iso-8859-3))) ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3) ;; (define-coding-system-alias 'latin-3 'iso-latin-3) @@ -300,28 +255,29 @@ Serbian, Croatian, Slovak, Slovene, and Swedish. (defun setup-latin3-environment () "Set up multilingual environment (MULE) for European Latin-3 users." (interactive) - (setup-8-bit-environment "Latin-3" 'latin-iso8859-3 'iso-8859-3 - "latin-3-prefix")) + (set-language-environment "Latin-3")) (set-language-info-alist - "Latin-3" '((setup-function . (setup-latin3-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-3)) - (coding-system . (iso-8859-3)) - (documentation . ("\ + "Latin-3" '((charset ascii latin-iso8859-3) + (coding-system iso-8859-3) + (coding-priority iso-8859-3) + (input-method . "latin-3-prefix") + (documentation . "\ These languages are supported with the Latin-3 (ISO-8859-3) character set: Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, - German, Italian, Maltese, Spanish, and Turkish. -" . describe-european-environment-map)) - )) + German, Italian, Maltese, Spanish, and Turkish.")) + '("European")) + ;; Latin-4 (ISO-8859-4) ;; (make-coding-system ;; 'iso-latin-4 2 ?4 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" -;; '((ascii t) (latin-iso8859-4 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil)) +;; '(ascii latin-iso8859-4 nil nil +;; nil nil nil nil nil nil nil) +;; '((safe-charsets ascii latin-iso8859-4) +;; (mime-charset . iso-8895-4))) ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4) ;; (define-coding-system-alias 'latin-4 'iso-latin-4) @@ -338,28 +294,29 @@ These languages are supported with the Latin-3 (ISO-8859-3) character set: (defun setup-latin4-environment () "Set up multilingual environment (MULE) for European Latin-4 users." (interactive) - (setup-8-bit-environment "Latin-4" 'latin-iso8859-4 'iso-8859-4 - "latin-4-prefix")) + (set-language-environment "Latin-4")) (set-language-info-alist - "Latin-4" '((setup-function . (setup-latin4-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-4)) - (coding-system . (iso-8859-4)) - (documentation . ("\ + "Latin-4" '((charset ascii latin-iso8859-4) + (coding-system iso-8859-4) + (coding-priority iso-8859-4) + (input-method . "latin-4-prefix") + (documentation . "\ These languages are supported with the Latin-4 (ISO-8859-4) character set: Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, - Latvian, Lithuanian, and Norwegian. -" . describe-european-environment-map)) - )) + Latvian, Lithuanian, and Norwegian.")) + '("European")) + ;; Latin-5 (ISO-8859-9) ;; (make-coding-system ;; 'iso-latin-5 2 ?9 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" -;; '((ascii t) (latin-iso8859-9 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil)) +;; '(ascii latin-iso8859-9 nil nil +;; nil nil nil nil nil nil nil) +;; '((safe-charsets ascii latin-iso8859-9) +;; (mime-charset . iso-8859-9))) ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5) ;; (define-coding-system-alias 'latin-5 'iso-latin-5) @@ -376,46 +333,52 @@ These languages are supported with the Latin-4 (ISO-8859-4) character set: (defun setup-latin5-environment () "Set up multilingual environment (MULE) for European Latin-5 users." (interactive) - (setup-8-bit-environment "Latin-5" 'latin-iso8859-9 'iso-8859-5 - "latin-5-prefix")) + (set-language-environment "Latin-5")) + +(set-language-info-alist + "Latin-5" '((charset ascii latin-iso8859-9) + (coding-system iso-8859-9) + (coding-priority iso-8859-9) + (input-method . "latin-5-prefix") + (documentation . "\ +These languages are supported with the Latin-5 (ISO-8859-9) character set.")) + '("European")) + + +(defun setup-german-environment () + "Set up multilingual environment (MULE) for German users." + (interactive) + (set-language-environment "German")) + +(set-language-info-alist + "German" '((tutorial . "TUTORIAL.de") + (charset ascii latin-iso8859-1) + (coding-system iso-8859-1) + (coding-priority iso-8859-1) + (input-method . "german-postfix") + (sample-text . "\ +German (Deutsch Nord) Guten Tag +German (Deutsch S,A|(Bd) Gr,A|_(B Gott") + (documentation . "\ +This language environment is almost the same as Latin-1, +but default input method is set to \"german-postfix\".")) + '("European")) + +(defun setup-slovenian-environment () + "Setup multilingual environment (MULE) for Slovenian." + (interactive) + (set-language-environment "Slovenian")) (set-language-info-alist - "Latin-5" '((setup-function . (setup-latin5-environment - . setup-european-environment-map)) - (charset . (ascii latin-iso8859-9)) - (coding-system . (iso-8859-5)) - (documentation . ("\ -These languages are supported with the Latin-5 (ISO-8859-9) character set. -" . describe-european-environment-map)) - )) - -;; (defun setup-european-environment () -;; "Setup multilingual environment (MULE) for European languages users. -;; It actually reset MULE to the default status, and -;; set quail-latin-1 as the default input method to be selected. -;; See also the documentation of setup-english-environment." -;; (setup-english-environment) -;; (setq default-input-method '("European" . "quail-latin-1"))) - -;; (defun describe-european-support () -;; "Describe how Emacs support European languages." -;; (interactive) -;; (describe-language-support-internal "European")) - -;; (set-language-info-alist -;; "European" '((setup-function . setup-european-environment) -;; (describe-function . describe-european-support) -;; (charset . (ascii latin-iso8859-1 latin-iso8859-2 -;; latin-iso8859-3 latin-iso8859-4 latin-iso8859-9)) -;; (coding-system . (iso-8859-1 iso-8859-2 iso-8859-3 -;; iso-8859-4 iso-8859-9)) -;; (sample-text -;; . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") -;; (documentation . "\ -;; Almost all of European languages are supported by the character sets and -;; coding systems listed below. -;; To input them, LEIM (Libraries for Emacs Input Methods) should have been -;; installed.") -;; )) + "Slovenian" '((charset . (ascii latin-iso8859-2)) + (coding-system . (iso-8859-2)) + (coding-priority . (iso-8859-2)) + (input-method . "latin-2-postfix") + (tutorial . "TUTORIAL.sl") + (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!") + (documentation . t)) + '("European")) + +(provide 'slovenian) ;;; european.el ends here diff --git a/lisp/mule/greek.el b/lisp/mule/greek.el index b878c67..f37bc25 100644 --- a/lisp/mule/greek.el +++ b/lisp/mule/greek.el @@ -33,31 +33,25 @@ (loop for c from 54 to 126 do (modify-syntax-entry (make-char 'greek-iso8859-7 c) "w")) (modify-syntax-entry (make-char 'greek-iso8859-7 32) "w") ; no-break space -(modify-syntax-entry ?,F7(B ".") -(modify-syntax-entry ?,F;(B ".") -(modify-syntax-entry ?,F=(B ".") +(modify-syntax-entry ?.FN7 ".") +(modify-syntax-entry ?N; ".") +(modify-syntax-entry ?N= ".") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; GREEK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-language-environment 'greek -;; "Greek" -;; (lambda () -;; (set-coding-category-system 'iso-8-designate 'iso-8859-7) -;; (set-coding-priority-list '(iso-8-designate iso-8-1)) -;; (set-default-buffer-file-coding-system 'iso-8859-7) -;; (setq terminal-coding-system 'iso-8859-7) -;; (setq keyboard-coding-system 'iso-8859-7) -;; ;; (setq-default quail-current-package -;; ;; (assoc "greek" quail-package-alist)) -;; )) ;; (make-coding-system -;; 'iso-8859-7 2 ?7 "MIME ISO-8859-7" -;; '((ascii t) (greek-iso8859-7 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil)) +;; 'greek-iso-8bit 2 ?7 +;; "ISO 2022 based 8-bit encoding for Greek (MIME:ISO-8859-7)" +;; '(ascii greek-iso8859-7 nil nil +;; nil nil nil nil nil nil nil) +;; '((safe-charsets ascii greek-iso8859-7) +;; (mime-charset . iso-8859-7))) + +;; (define-coding-system-alias 'iso-8859-7 'greek-iso-8bit) (make-coding-system 'iso-8859-7 'iso2022 "MIME ISO-8859-7" @@ -71,14 +65,14 @@ (defun setup-greek-environment () "Setup multilingual environment (MULE) for Greek." (interactive) - (setup-8-bit-environment "Greek" 'greek-iso8859-7 'iso-8859-7 "greek") - ) + (set-language-environment "Greek")) (set-language-info-alist - "Greek" '((setup-function . setup-greek-environment) - (charset . (greek-iso8859-7)) - (coding-system . (iso-8859-7)) - (sample-text . "Greek (,FGkk]mija(B) ,FCei\(B ,Fsar(B") + "Greek" '((charset greek-iso8859-7) + (coding-system iso-8859-7) + (coding-priority iso-8859-7) + (input-method . "greek") + (sample-text . "Greek (NGNkNkN]NmNiNjNa) NCNeNiN\ NsNaNr") (documentation . t))) ;;; greek.el ends here diff --git a/lisp/mule/hebrew.el b/lisp/mule/hebrew.el index 767fc0a..9e89fa1 100644 --- a/lisp/mule/hebrew.el +++ b/lisp/mule/hebrew.el @@ -1,4 +1,4 @@ -;;; hebrew.el --- Support for Hebrew +;;; hebrew.el --- Support for Hebrew -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -37,8 +37,10 @@ ;; (make-coding-system ;; 'hebrew-iso-8bit 2 ?8 ;; "ISO 2022 based 8-bit encoding for Hebrew (MIME:ISO-8859-8)" -;; '((ascii t) (hebrew-iso8859-8 t) nil nil -;; nil ascii-eol ascii-cntl nil nil nil nil nil t)) +;; '(ascii hebrew-iso8859-8 nil nil +;; nil ascii-eol ascii-cntl nil nil nil nil nil t) +;; '((safe-charsets ascii hebrew-iso8859-8) +;; (mime-charset . iso-8859-8))) ;; (define-coding-system-alias 'iso-8859-8 'hebrew-iso-8bit) @@ -51,7 +53,7 @@ charset-g3 t no-iso6429 t mnemonic "MIME/Hbrw" -)) + )) (make-coding-system 'ctext-hebrew 'iso2022 @@ -67,26 +69,14 @@ "Setup multilingual environment (MULE) for Hebrew. But, please note that right-to-left writing is not yet supported." (interactive) - (setup-8-bit-environment "Hebrew" 'hebrew-iso8859-8 'iso-8859-8 - "hebrew") - (set-coding-category-system 'iso-8-designate 'iso-8859-8) - (set-coding-priority-list - '(iso-8-designate - iso-8-1 - iso-7 - iso-8-2 - iso-lock-shift - no-conversion - shift-jis - big5)) - ) + (set-language-environment "Hebrew")) (set-language-info-alist - "Hebrew" '((setup-function . setup-hebrew-environment) - (describe-function . describe-hebrew-support) - (charset . (hebrew-iso8859-8)) - (coding-system . (iso-8859-8)) - (sample-text . "Hebrew ,Hylem(B") + "Hebrew" '((charset hebrew-iso8859-8) + (coding-system iso-8859-8) + (coding-priority iso-8859-8) + (input-method . "hebrew") + (sample-text . "Hebrew [2],Hylem[0](B") (documentation . "Right-to-left writing is not yet supported.") )) diff --git a/lisp/mule/japanese.el b/lisp/mule/japanese.el index fbc7328..cc8bc03 100644 --- a/lisp/mule/japanese.el +++ b/lisp/mule/japanese.el @@ -1,4 +1,4 @@ -;;; japanese.el --- Japanese support +;;; japanese.el --- Japanese support -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -144,10 +144,11 @@ ;; 'iso-2022-jp 2 ?J ;; "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)" ;; '((ascii japanese-jisx0208-1978 japanese-jisx0208 -;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil -;; short ascii-eol ascii-cntl seven)) - -;; (define-coding-system-alias 'junet 'iso-2022-jp) +;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201) nil nil nil +;; short ascii-eol ascii-cntl seven) +;; '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208 +;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201) +;; (mime-charset . iso-2022-jp))) (make-coding-system 'iso-2022-jp 'iso2022 @@ -160,26 +161,47 @@ mnemonic "MULE/7bit" )) -(copy-coding-system 'iso-2022-jp 'junet) +(define-coding-system-alias 'junet 'iso-2022-jp) + +;; (make-coding-system +;; 'iso-2022-jp-2 2 ?J +;; "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)" +;; '((ascii japanese-jisx0208-1978 japanese-jisx0208 +;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201 +;; chinese-gb2312 korean-ksc5601) nil +;; (nil latin-iso8859-1 greek-iso8859-7) nil +;; short ascii-eol ascii-cntl seven nil single-shift) +;; '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208 +;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201 +;; chinese-gb2312 korean-ksc5601 +;; latin-iso8859-1 greek-iso8859-7) +;; (mime-charset . iso-2022-jp-2))) ;; (make-coding-system -;; 'shift_jis 1 ?S -;; "Coding-system of Shift-JIS used in Japan." t) +;; 'japanese-shift-jis 1 ?S +;; "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)" +;; nil +;; '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 +;; latin-jisx0201 katakana-jisx0201) +;; (mime-charset . shift_jis) +;; (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char) +;; (katakana-jisx0201 "SJIS" encode-sjis-char)))) (make-coding-system 'shift_jis 'shift-jis "Coding-system of Shift-JIS used in Japan." '(mnemonic "Ja/SJIS")) -;;(define-coding-system-alias 'shift_jis 'sjis) - -(copy-coding-system 'shift_jis 'sjis) +;; (define-coding-system-alias 'shift_jis 'japanese-shift-jis) +;; (define-coding-system-alias 'sjis 'japanese-shift-jis) ;; (make-coding-system -;; 'iso-2022-jp-1978-irv 2 ?J -;; "Coding-system used for old jis terminal." -;; '((ascii t) nil nil nil -;; short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)) +;; 'japanese-iso-7bit-1978-irv 2 ?j +;; "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman" +;; '((ascii japanese-jisx0208-1978 japanese-jisx0208 +;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil +;; short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis) +;; '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201)) (make-coding-system 'iso-2022-jp-1978-irv 'iso2022 @@ -192,15 +214,19 @@ mnemonic "Ja-78/7bit" )) -;;(define-coding-system-alias 'iso-2022-jp-1978-irv 'old-jis) +;; (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv) +;; (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv) -(copy-coding-system 'iso-2022-jp-1978-irv 'old-jis) +(define-coding-system-alias 'old-jis 'iso-2022-jp-1978-irv) ;; (make-coding-system -;; 'euc-japan-1990 2 ?E -;; "Coding-system of Japanese EUC (Extended Unix Code)." +;; 'japanese-iso-8bit 2 ?E +;; "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)" ;; '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212 -;; short ascii-eol ascii-cntl nil nil single-shift)) +;; short ascii-eol ascii-cntl nil nil single-shift) +;; '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978 +;; katakana-jisx0201 japanese-jisx0212) +;; (mime-charset . euc-jp))) (make-coding-system 'euc-jp 'iso2022 @@ -213,20 +239,26 @@ mnemonic "Ja/EUC" )) -;;(define-coding-system-alias 'euc-japan-1990 'euc-japan) +;; (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit) +;; (define-coding-system-alias 'euc-japan 'japanese-iso-8bit) +;; (define-coding-system-alias 'euc-jp 'japanese-iso-8bit) -(copy-coding-system 'euc-jp 'euc-japan) ; only for w3 -(copy-coding-system 'euc-jp 'japanese-euc) +(define-coding-system-alias 'euc-japan 'euc-jp) ; only for w3 +(define-coding-system-alias 'japanese-euc 'euc-jp) (set-language-info-alist - "Japanese" '((setup-function . setup-japanese-environment) + "Japanese" '((setup-function . setup-japanese-environment-internal) + (exit-function . exit-japanese-environment) (tutorial . "TUTORIAL.ja") - (charset . (japanese-jisx0208 japanese-jisx0208-1978 - japanese-jisx0212 latin-jisx0201 - katakana-jisx0201)) - (coding-system . (iso-2022-jp euc-jp - shift_jis iso-2022-jp-1978-irv)) - (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B") + (charset japanese-jisx0208 japanese-jisx0208-1978 + japanese-jisx0212 latin-jisx0201 katakana-jisx0201) + (coding-system iso-2022-jp euc-jp + shift_jis iso-2022-jp-2) + (coding-priority iso-2022-jp euc-jp + shift_jis iso-2022-jp-2) +;; (input-method . "japanese") + (features japan-util) + (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B") (documentation . t))) ;;; japanese.el ends here diff --git a/lisp/mule/korean.el b/lisp/mule/korean.el index 2763262..f42ef2d 100644 --- a/lisp/mule/korean.el +++ b/lisp/mule/korean.el @@ -1,4 +1,4 @@ -;;; korean.el --- Support for Korean +;;; korean.el --- Support for Korean -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -66,10 +66,12 @@ (setq-default its:*current-map* (its:get-mode-map "hangul")))) ;; (make-coding-system -;; 'euc-kr 2 ?K -;; "Coding-system of Korean EUC (Extended Unix Code)." -;; '((ascii t) korean-ksc5601 nil nil -;; nil ascii-eol ascii-cntl)) +;; 'korean-iso-8bit 2 ?K +;; "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)" +;; '(ascii korean-ksc5601 nil nil +;; nil ascii-eol ascii-cntl) +;; '((safe-charsets ascii korean-ksc5601) +;; (mime-charset . euc-kr))) (make-coding-system 'euc-kr 'iso2022 @@ -81,14 +83,16 @@ ;;(define-coding-system-alias 'euc-kr 'euc-korea) -(copy-coding-system 'euc-kr 'korean-euc) +(define-coding-system-alias 'korean-euc 'euc-kr) ;; (make-coding-system ;; 'iso-2022-kr 2 ?k -;; "MIME ISO-2022-KR" +;; "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)." ;; '(ascii (nil korean-ksc5601) nil nil ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil -;; designation-bol)) +;; designation-bol) +;; '((safe-charsets ascii korean-ksc5601) +;; (mime-charset . iso-2022-kr))) (make-coding-system 'iso-2022-kr 'iso2022 @@ -101,49 +105,23 @@ mnemonic "Ko/7bit" eol-type lf)) -(defun setup-korean-environment () - "Setup multilingual environment (MULE) for Korean." - (interactive) - (setup-english-environment) - ;; (setq coding-category-iso-8-2 'euc-kr) - (set-coding-category-system 'iso-8-2 'euc-kr) - - ;; (set-coding-priority - ;; '(coding-category-iso-7 - ;; coding-category-iso-8-2 - ;; coding-category-iso-8-1)) - (set-coding-priority-list - '(iso-8-2 - iso-7 - iso-8-1 - iso-8-designate - iso-lock-shift - no-conversion - shift-jis - big5)) - - (set-default-coding-systems 'euc-kr) - - ;; (when (eq 'x (device-type (selected-device))) - ;; (x-use-halfwidth-roman-font 'korean-ksc5601 "ksc5636")) - - ;; EGG specific setup 97.02.05 jhod - (when (featurep 'egg) - (when (not (featurep 'egg-kor)) - (provide 'egg-kor) - (load "its-hangul") - (setq its:*standard-modes* - (cons (its:get-mode-map "hangul") its:*standard-modes*))) - (setq-default its:*current-map* (its:get-mode-map "hangul"))) - - (setq default-input-method "korean-hangul")) +;; (define-coding-system-alias 'korean-iso-7bit-lock 'iso-2022-kr) (set-language-info-alist - "Korean" '((setup-function . setup-korean-environment) + "Korean" '((setup-function . setup-korean-environment-internal) + (exit-function . exit-korean-environment) (tutorial . "TUTORIAL.ko") - (charset . (korean-ksc5601)) - (coding-system . (iso-2022-kr euc-kr)) + (charset korean-ksc5601) + (coding-system euc-kr iso-2022-kr) + (coding-priority euc-kr iso-2022-kr) + (input-method . "korean-hangul") + (features korea-util) (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<H3gGO=J4O1n(B") - (documentation . t))) + (documentation . "\ +The following key bindings are available while using Korean input methods: + Shift-SPC: toggle-korean-input-mthod + Control-F9: quail-hangul-switch-symbol-ksc + F9: quail-hangul-switch-hanja") + )) ;;; korean.el ends here diff --git a/lisp/mule/misc-lang.el b/lisp/mule/misc-lang.el index 236f9b0..b0f9ff3 100644 --- a/lisp/mule/misc-lang.el +++ b/lisp/mule/misc-lang.el @@ -1,6 +1,6 @@ ;;; misc-lang.el --- support for miscellaneous languages (characters) -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. +;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1997 MORIOKA Tomohiko @@ -40,11 +40,13 @@ (defun setup-ipa-environment () "Setup multilingual environment (MULE) for IPA." (interactive) - (setup-english-environment)) + (set-language-environment "IPA")) (set-language-info-alist - "IPA" '((setup-function . setup-ipa-environment) - (charset . (ipa)) + "IPA" '((charset . (ipa)) + (coding-priority iso-2022-7bit) + (coding-system iso-2022-7bit) + (input-method . "ipa") (documentation . "\ IPA is International Phonetic Alphabet for English, French, German and Italian."))) diff --git a/lisp/mule/mule-category.el b/lisp/mule/mule-category.el index bcc1e03..deb9efc 100644 --- a/lisp/mule/mule-category.el +++ b/lisp/mule/mule-category.el @@ -1,6 +1,8 @@ ;;; mule-category.el --- category functions for XEmacs/Mule. ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN. +;; Licensed to the Free Software Foundation. ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1995 Sun Microsystems. @@ -243,9 +245,11 @@ Each element is a list of a charset, a designator, and maybe a doc string.") (let (i l) (define-category ?a "ASCII character set.") + (define-category ?l "Latin-1 through Latin-5 character set") (setq i 32) (while (< i 127) (modify-category-entry i ?a) + (modify-category-entry i ?l) (setq i (1+ i))) (setq l predefined-category-list) (while l @@ -255,6 +259,23 @@ Each element is a list of a charset, a designator, and maybe a doc string.") (modify-category-entry (car (car l)) (nth 1 (car l))) (setq l (cdr l)))) +;;; Setting word boundary. + +(setq word-combining-categories + '((?l . ?l))) + +(setq word-separating-categories ; (2-byte character sets) + '((?A . ?K) ; Alpha numeric - Katakana + (?A . ?C) ; Alpha numeric - Chinese + (?H . ?A) ; Hiragana - Alpha numeric + (?H . ?K) ; Hiragana - Katakana + (?H . ?C) ; Hiragana - Chinese + (?K . ?A) ; Katakana - Alpha numeric + (?K . ?C) ; Katakana - Chinese + (?C . ?A) ; Chinese - Alpha numeric + (?C . ?K) ; Chinese - Katakana + )) + ;;; At the present, I know Japanese and Chinese text can ;;; break line at any point under a restriction of 'kinsoku'. (defvar word-across-newline "\\(\\cj\\|\\cc\\|\\ct\\)" diff --git a/lisp/mule/mule-ccl.el b/lisp/mule/mule-ccl.el index 7f28d19..b0c44cd 100644 --- a/lisp/mule/mule-ccl.el +++ b/lisp/mule/mule-ccl.el @@ -74,11 +74,13 @@ ;; (read REG ...) ;; | (read-if (REG OPERATOR ARG) CCL_BLOCK CCL_BLOCK) ;; | (read-branch REG CCL_BLOCK [CCL_BLOCK ...]) +;; | (read-multibyte-character REG {charset} REG {code-point}) ;; WRITE := ;; (write REG ...) ;; | (write EXPRESSION) ;; | (write integer) | (write string) | (write REG ARRAY) ;; | string +;; | (write-multibyte-character REG(charset) REG(codepoint)) ;; CALL := (call ccl-program-name) ;; END := (end) ;; @@ -89,14 +91,15 @@ ;; | < | > | == | <= | >= | != | de-sjis | en-sjis ;; ASSIGNMENT_OPERATOR := ;; += | -= | *= | /= | %= | &= | '|=' | ^= | <<= | >>= -;; ARRAY := '[' interger ... ']' +;; ARRAY := '[' integer ... ']' ;;; Code: (defconst ccl-command-table [if branch loop break repeat write-repeat write-read-repeat - read read-if read-branch write call end] - "*Vector of CCL commands (symbols).") + read read-if read-branch write call end + read-multibyte-character write-multibyte-character] + "Vector of CCL commands (symbols).") ;; Put a property to each symbol of CCL commands for the compiler. (let (op (i 0) (len (length ccl-command-table))) @@ -137,8 +140,21 @@ jump-cond-expr-register read-jump-cond-expr-const read-jump-cond-expr-register + ex-cmd ] - "*Vector of CCL compiled codes (symbols).") + "Vector of CCL compiled codes (symbols).") + +(defconst ccl-extended-code-table + [read-multibyte-character + write-multibyte-character + translate-character + translate-character-const-tbl + nil nil nil nil nil nil nil nil nil nil nil nil ; 0x04-0x0f + iterate-multiple-map + map-multiple + map-single + ] + "Vector of CCL extended compiled codes (symbols).") ;; Put a property to each symbol of CCL codes for the disassembler. (let (code (i 0) (len (length ccl-code-table))) @@ -148,6 +164,15 @@ (put code 'ccl-dump-function (intern (format "ccl-dump-%s" code))) (setq i (1+ i)))) +(let (code (i 0) (len (length ccl-extended-code-table))) + (while (< i len) + (setq code (aref ccl-extended-code-table i)) + (if code + (progn + (put code 'ccl-ex-code i) + (put code 'ccl-dump-function (intern (format "ccl-dump-%s" code))))) + (setq i (1+ i)))) + (defconst ccl-jump-code-list '(jump jump-cond write-register-jump write-register-read-jump write-const-jump write-const-read-jump write-string-jump @@ -162,7 +187,7 @@ (defconst ccl-register-table [r0 r1 r2 r3 r4 r5 r6 r7] - "*Vector of CCL registers (symbols).") + "Vector of CCL registers (symbols).") ;; Put a property to indicate register number to each symbol of CCL. ;; registers. @@ -175,7 +200,7 @@ (defconst ccl-arith-table [+ - * / % & | ^ << >> <8 >8 // nil nil nil < > == <= >= != de-sjis en-sjis] - "*Vector of CCL arithmetic/logical operators (symbols).") + "Vector of CCL arithmetic/logical operators (symbols).") ;; Put a property to each symbol of CCL operators for the compiler. (let (arith (i 0) (len (length ccl-arith-table))) @@ -186,7 +211,7 @@ (defconst ccl-assign-arith-table [+= -= *= /= %= &= |= ^= <<= >>= <8= >8= //=] - "*Vector of CCL assignment operators (symbols).") + "Vector of CCL assignment operators (symbols).") ;; Put a property to each symbol of CCL assignment operators for the compiler. (let (arith (i 0) (len (length ccl-assign-arith-table))) @@ -258,6 +283,16 @@ (aset ccl-program-vector ccl-current-ic code) (setq ccl-current-ic (1+ ccl-current-ic)))) +;; extended ccl command format +;; |- 14-bit -|- 3-bit --|- 3-bit --|- 3-bit --|- 5-bit -| +;; |- EX-OP --|-- REG3 --|-- REG2 --|-- REG ---|-- OP ---| +(defun ccl-embed-extended-command (ex-op reg reg2 reg3) + (let ((data (logior (ash (get ex-op 'ccl-ex-code) 3) + (if (symbolp reg3) + (get reg3 'ccl-register-number) + 0)))) + (ccl-embed-code 'ex-cmd reg data reg2))) + ;; Just advance `ccl-current-ic' by INC. (defun ccl-increment-ic (inc) (setq ccl-current-ic (+ ccl-current-ic inc))) @@ -524,7 +559,9 @@ (let ((unconditional-jump (ccl-compile-1 true-cmds))) (if (null false-cmds) ;; This is the place to jump to if condition is false. - (ccl-embed-current-address jump-cond-address) + (progn + (ccl-embed-current-address jump-cond-address) + (setq unconditional-jump nil)) (let (end-true-part-address) (if (not unconditional-jump) (progn @@ -802,6 +839,119 @@ (ccl-embed-code 'end 0 0) t) +;; Compile read-multibyte-character +(defun ccl-compile-read-multibyte-character (cmd) + (if (/= (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command 'read-multibyte-character rrr RRR 0)) + nil) + +;; Compile write-multibyte-character +(defun ccl-compile-write-multibyte-character (cmd) + (if (/= (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command 'write-multibyte-character rrr RRR 0)) + nil) + +;; Compile translate-character +;; (defun ccl-compile-translate-character (cmd) +;; (if (/= (length cmd) 4) +;; (error "CCL: Invalid number of arguments: %s" cmd)) +;; (let ((Rrr (nth 1 cmd)) +;; (RRR (nth 2 cmd)) +;; (rrr (nth 3 cmd))) +;; (ccl-check-register rrr cmd) +;; (ccl-check-register RRR cmd) +;; (cond ((and (symbolp Rrr) (not (get Rrr 'ccl-register-number))) +;; (if (not (get Rrr 'translation-table)) +;; (error "CCL: Invalid translation table %s in %s" Rrr cmd)) +;; (ccl-embed-extended-command 'translate-character-const-tbl +;; rrr RRR 0) +;; (ccl-embed-data Rrr)) +;; (t +;; (ccl-check-register Rrr cmd) +;; (ccl-embed-extended-command 'translate-character rrr RRR Rrr)))) +;; nil) + +;; (defun ccl-compile-iterate-multiple-map (cmd) +;; (ccl-compile-multiple-map-function 'iterate-multiple-map cmd) +;; nil) + +;; (defun ccl-compile-map-multiple (cmd) +;; (if (/= (length cmd) 4) +;; (error "CCL: Invalid number of arguments: %s" cmd)) +;; (let ((func '(lambda (arg mp) +;; (let ((len 0) result add) +;; (while arg +;; (if (consp (car arg)) +;; (setq add (funcall func (car arg) t) +;; result (append result add) +;; add (+ (-(car add)) 1)) +;; (setq result +;; (append result +;; (list (car arg))) +;; add 1)) +;; (setq arg (cdr arg) +;; len (+ len add))) +;; (if mp +;; (cons (- len) result) +;; result)))) +;; arg) +;; (setq arg (append (list (nth 0 cmd) (nth 1 cmd) (nth 2 cmd)) +;; (funcall func (nth 3 cmd) nil))) +;; (ccl-compile-multiple-map-function 'map-multiple arg)) +;; nil) + +;; (defun ccl-compile-map-single (cmd) +;; (if (/= (length cmd) 4) +;; (error "CCL: Invalid number of arguments: %s" cmd)) +;; (let ((RRR (nth 1 cmd)) +;; (rrr (nth 2 cmd)) +;; (map (nth 3 cmd)) +;; id) +;; (ccl-check-register rrr cmd) +;; (ccl-check-register RRR cmd) +;; (ccl-embed-extended-command 'map-single rrr RRR 0) +;; (cond ((symbolp map) +;; (if (get map 'code-conversion-map) +;; (ccl-embed-data map) +;; (error "CCL: Invalid map: %s" map))) +;; (t +;; (error "CCL: Invalid type of arguments: %s" cmd)))) +;; nil) + +;; (defun ccl-compile-multiple-map-function (command cmd) +;; (if (< (length cmd) 4) +;; (error "CCL: Invalid number of arguments: %s" cmd)) +;; (let ((RRR (nth 1 cmd)) +;; (rrr (nth 2 cmd)) +;; (args (nthcdr 3 cmd)) +;; map) +;; (ccl-check-register rrr cmd) +;; (ccl-check-register RRR cmd) +;; (ccl-embed-extended-command command rrr RRR 0) +;; (ccl-embed-data (length args)) +;; (while args +;; (setq map (car args)) +;; (cond ((symbolp map) +;; (if (get map 'code-conversion-map) +;; (ccl-embed-data map) +;; (error "CCL: Invalid map: %s" map))) +;; ((numberp map) +;; (ccl-embed-data map)) +;; (t +;; (error "CCL: Invalid type of arguments: %s" cmd))) +;; (setq args (cdr args))))) + + ;;; CCL dump staffs ;; To avoid byte-compiler warning. @@ -1069,17 +1219,69 @@ (insert "\n")) (setq i (1+ i))))) +(defun ccl-dump-ex-cmd (rrr cc) + (let* ((RRR (logand cc ?\x7)) + (Rrr (logand (ash cc -3) ?\x7)) + (ex-op (aref ccl-extended-code-table (logand (ash cc -6) ?\x3fff)))) + (insert (format "<%s> " ex-op)) + (funcall (get ex-op 'ccl-dump-function) rrr RRR Rrr))) + +(defun ccl-dump-read-multibyte-character (rrr RRR Rrr) + (insert (format "read-multibyte-character r%d r%d\n" RRR rrr))) + +(defun ccl-dump-write-multibyte-character (rrr RRR Rrr) + (insert (format "write-multibyte-character r%d r%d\n" RRR rrr))) + +;; (defun ccl-dump-translate-character (rrr RRR Rrr) +;; (insert (format "translation table(r%d) r%d r%d\n" Rrr RRR rrr))) + +;; (defun ccl-dump-translate-character-const-tbl (rrr RRR Rrr) +;; (let ((tbl (ccl-get-next-code))) +;; (insert (format "translation table(%S) r%d r%d\n" tbl RRR rrr)))) + +;; (defun ccl-dump-iterate-multiple-map (rrr RRR Rrr) +;; (let ((notbl (ccl-get-next-code)) +;; (i 0) id) +;; (insert (format "iterate-multiple-map r%d r%d\n" RRR rrr)) +;; (insert (format "\tnumber of maps is %d .\n\t [" notbl)) +;; (while (< i notbl) +;; (setq id (ccl-get-next-code)) +;; (insert (format "%S" id)) +;; (setq i (1+ i))) +;; (insert "]\n"))) + +;; (defun ccl-dump-map-multiple (rrr RRR Rrr) +;; (let ((notbl (ccl-get-next-code)) +;; (i 0) id) +;; (insert (format "map-multiple r%d r%d\n" RRR rrr)) +;; (insert (format "\tnumber of maps and separators is %d\n\t [" notbl)) +;; (while (< i notbl) +;; (setq id (ccl-get-next-code)) +;; (if (= id -1) +;; (insert "]\n\t [") +;; (insert (format "%S " id))) +;; (setq i (1+ i))) +;; (insert "]\n"))) + +;; (defun ccl-dump-map-single (rrr RRR Rrr) +;; (let ((id (ccl-get-next-code))) +;; (insert (format "map-single r%d r%d map(%S)\n" RRR rrr id)))) + + ;; CCL emulation staffs ;; Not yet implemented. +;; Auto-loaded functions. + ;;;###autoload -(defmacro declare-ccl-program (name) +(defmacro declare-ccl-program (name &optional vector) "Declare NAME as a name of CCL program. To compile a CCL program which calls another CCL program not yet -defined, it must be declared as a CCL program in advance." - `(put ',name 'ccl-program-idx (register-ccl-program ',name nil))) +defined, it must be declared as a CCL program in advance. +Optional arg VECTOR is a compiled CCL code of the CCL program." + `(put ',name 'ccl-program-idx (register-ccl-program ',name ,vector))) ;;;###autoload (defmacro define-ccl-program (name ccl-program &optional doc) @@ -1092,9 +1294,27 @@ The compiled code is a vector of integers." nil)) ;;;###autoload +(defmacro check-ccl-program (ccl-program &optional name) + "Check validity of CCL-PROGRAM. +If CCL-PROGRAM is a symbol denoting a valid CCL program, return +CCL-PROGRAM, else return nil. +If CCL-PROGRAM is a vector and optional arg NAME (symbol) is supplied, +register CCL-PROGRAM by name NAME, and return NAME." + `(let ((result ,ccl-program)) + (cond ((symbolp ,ccl-program) + (or (numberp (get ,ccl-program 'ccl-program-idx)) + (setq result nil))) + ((vectorp ,ccl-program) + (setq result ,name) + (register-ccl-program result ,ccl-program)) + (t + (setq result nil))) + result)) + +;;;###autoload (defun ccl-execute-with-args (ccl-prog &rest args) "Execute CCL-PROGRAM with registers initialized by the remaining args. -The return value is a vector of resulting CCL registeres." +The return value is a vector of resulting CCL registers." (let ((reg (make-vector 8 0)) (i 0)) (while (and args (< i 8)) diff --git a/lisp/mule/mule-cmds.el b/lisp/mule/mule-cmds.el index 32c22ed..332e7f8 100644 --- a/lisp/mule/mule-cmds.el +++ b/lisp/mule/mule-cmds.el @@ -1,6 +1,6 @@ ;;; mule-cmds.el --- Commands for multilingual environment -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. +;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1997 MORIOKA Tomohiko @@ -27,8 +27,8 @@ ;;; MULE related key bindings and menus. -(defvar mule-keymap (make-sparse-keymap "MULE") - "Keymap for MULE (Multilingual environment) specific commands.") +(defvar mule-keymap (make-sparse-keymap "Mule") + "Keymap for Mule (Multilingual environment) specific commands.") ;; Keep "C-x C-m ..." for mule specific commands. (define-key ctl-x-map "\C-m" mule-keymap) @@ -38,10 +38,12 @@ (define-key mule-keymap "t" 'set-terminal-coding-system) (define-key mule-keymap "k" 'set-keyboard-coding-system) (define-key mule-keymap "p" 'set-buffer-process-coding-system) -(define-key mule-keymap "\C-\\" 'select-input-method) +(define-key mule-keymap "x" 'set-selection-coding-system) +(define-key mule-keymap "X" 'set-next-selection-coding-system) +(define-key mule-keymap "\C-\\" 'set-input-method) (define-key mule-keymap "c" 'universal-coding-system-argument) ;;(define-key mule-keymap "c" 'list-coding-system-briefly) ; XEmacs -(define-key mule-keymap "C" 'list-coding-system) ; XEmacs +(define-key mule-keymap "C" 'describe-coding-system) ; XEmacs (define-key mule-keymap "r" 'toggle-display-direction) ; XEmacs (define-key mule-keymap "l" 'set-language-environment) @@ -63,18 +65,80 @@ ;; but it won't be used that frequently. (define-key global-map "\C-\\" 'toggle-input-method) +;;; This is no good because people often type Shift-SPC +;;; meaning to type SPC. -- rms. +;;; ;; Here's an alternative key binding for X users (Shift-SPACE). +;;; (define-key global-map [?\S- ] 'toggle-input-method) + +(defun coding-system-change-eol-conversion (coding-system eol-type) + "Return a coding system which differs from CODING-SYSTEM in eol conversion. +The returned coding system converts end-of-line by EOL-TYPE +but text as the same way as CODING-SYSTEM. +EOL-TYPE should be `lf', `crlf', `cr' or nil. +If EOL-TYPE is nil, the returned coding system detects +how end-of-line is formatted automatically while decoding. + +EOL-TYPE can be specified by an symbol `unix', `dos' or `mac'. +They means `lf', `crlf', and `cr' respectively." + (if (symbolp eol-type) + (setq eol-type (cond ((or (eq eol-type 'unix) + (eq eol-type 'lf)) + 'eol-lf) + ((or (eq eol-type 'dos) + (eq eol-type 'crlf)) + 'eol-crlf) + ((or (eq eol-type 'mac) + (eq eol-type 'cr)) + 'eol-cr) + (t eol-type)))) + (let ((orig-eol-type (coding-system-eol-type coding-system))) + (if (null orig-eol-type) + (if (not eol-type) + coding-system + (coding-system-property coding-system eol-type)) + (let ((base (coding-system-base coding-system))) + (if (not eol-type) + base + (if (= eol-type orig-eol-type) + coding-system + (setq orig-eol-type (coding-system-eol-type base)) + (if (null orig-eol-type) + (coding-system-property base eol-type)))))))) + +;; (defun coding-system-change-text-conversion (coding-system coding) +;; "Return a coding system which differs from CODING-SYSTEM in text conversion. +;; The returned coding system converts text by CODING +;; but end-of-line as the same way as CODING-SYSTEM. +;; If CODING is nil, the returned coding system detects +;; how text is formatted automatically while decoding." +;; (if (not coding) +;; (coding-system-base coding-system) +;; (let ((eol-type (coding-system-eol-type coding-system))) +;; (coding-system-change-eol-conversion +;; coding +;; (if (numberp eol-type) (aref [unix dos mac] eol-type)))))) + (defun view-hello-file () "Display the HELLO file which list up many languages and characters." (interactive) ;; We have to decode the file in any environment. - (let ((coding-system-for-read 'iso-2022-7)) + (let ((coding-system-for-read 'iso-2022-7bit)) (find-file-read-only (expand-file-name "HELLO" data-directory)))) (defun universal-coding-system-argument () "Execute an I/O command using the specified coding system." (interactive) - (let* ((coding-system - (read-coding-system "Coding system for following command: ")) + (let* ((default (and buffer-file-coding-system + (not (eq (coding-system-type buffer-file-coding-system) + t)) + (coding-system-name buffer-file-coding-system))) + (coding-system + (read-coding-system + (if default + (format "Coding system for following command (default, %s): " + default) + "Coding system for following command: ") + default)) (keyseq (read-key-sequence (format "Command to execute with %s:" coding-system))) (cmd (key-binding keyseq))) @@ -85,15 +149,21 @@ (defun set-default-coding-systems (coding-system) "Set default value of various coding systems to CODING-SYSTEM. -The follwing coding systems are set: +This sets the following coding systems: o coding system of a newly created buffer o default coding system for terminal output o default coding system for keyboard input - o default coding system for subprocess I/O" + o default coding system for subprocess I/O + o default coding system for converting file names." (check-coding-system coding-system) ;;(setq-default buffer-file-coding-system coding-system) (set-default-buffer-file-coding-system coding-system) - ;;(setq default-terminal-coding-system coding-system) + ;; (if default-enable-multibyte-characters + ;; (setq default-file-name-coding-system coding-system)) + ;; If coding-system is nil, honor that on MS-DOS as well, so + ;; that they could reset the terminal coding system. + ;; (unless (and (eq window-system 'pc) coding-system) + ;; (setq default-terminal-coding-system coding-system)) (setq terminal-coding-system coding-system) ;;(setq default-keyboard-coding-system coding-system) (setq keyboard-coding-system coding-system) @@ -108,160 +178,471 @@ The follwing coding systems are set: (defun prefer-coding-system (coding-system) "Add CODING-SYSTEM at the front of the priority list for automatic detection. -This also sets the following coding systems to CODING-SYSTEM: +This also sets the following coding systems: o coding system of a newly created buffer o default coding system for terminal output o default coding system for keyboard input - o default coding system for subprocess I/O" + o default coding system for converting file names. + +If CODING-SYSTEM specifies a certain type of EOL conversion, the coding +systems set by this function will use that type of EOL conversion. + +This command does not change the default value of terminal coding system +for MS-DOS terminal, because DOS terminals only support a single coding +system, and Emacs automatically sets the default to that coding system at +startup." (interactive "zPrefer coding system: ") - (if (not (and coding-system (coding-system-p coding-system))) + (if (not (and coding-system (find-coding-system coding-system))) (error "Invalid coding system `%s'" coding-system)) (let ((coding-category (coding-system-category coding-system)) - (parent (coding-system-parent coding-system))) + (base (coding-system-base coding-system)) + (eol-type (coding-system-eol-type coding-system))) (if (not coding-category) ;; CODING-SYSTEM is no-conversion or undecided. (error "Can't prefer the coding system `%s'" coding-system)) - (set coding-category (or parent coding-system)) - (if (not (eq coding-category (car coding-category-list))) + (set-coding-category-system coding-category (or base coding-system)) + ;; (update-coding-systems-internal) + (or (eq coding-category (car (coding-category-list))) ;; We must change the order. - (setq coding-category-list - (cons coding-category - (delq coding-category coding-category-list)))) - (if (and parent (interactive-p)) - (message "Highest priority is set to %s (parent of %s)" - parent coding-system)) - (set-default-coding-systems (or parent coding-system)))) - + (set-coding-priority-list (list coding-category))) + (if (and base (interactive-p)) + (message "Highest priority is set to %s (base of %s)" + base coding-system)) + ;; If they asked for specific EOL conversion, honor that. + (if (memq eol-type '(lf crlf mac)) + (setq coding-system + (coding-system-change-eol-conversion base eol-type)) + (setq coding-system base)) + (set-default-coding-systems coding-system))) + +;; (defun find-coding-systems-region-subset-p (list1 list2) +;; "Return non-nil if all elements in LIST1 are included in LIST2. +;; Comparison done with EQ." +;; (catch 'tag +;; (while list1 +;; (or (memq (car list1) list2) +;; (throw 'tag nil)) +;; (setq list1 (cdr list1))) +;; t)) + +;; (defun find-coding-systems-region (from to) +;; "Return a list of proper coding systems to encode a text between FROM and TO. +;; All coding systems in the list can safely encode any multibyte characters +;; in the text. +;; +;; If the text contains no multibyte characters, return a list of a single +;; element `undecided'." +;; (find-coding-systems-for-charsets (find-charset-region from to))) + +;; (defun find-coding-systems-string (string) +;; "Return a list of proper coding systems to encode STRING. +;; All coding systems in the list can safely encode any multibyte characters +;; in STRING. +;; +;; If STRING contains no multibyte characters, return a list of a single +;; element `undecided'." +;; (find-coding-systems-for-charsets (find-charset-string string))) + +;; (defun find-coding-systems-for-charsets (charsets) +;; "Return a list of proper coding systems to encode characters of CHARSETS. +;; CHARSETS is a list of character sets." +;; (if (or (null charsets) +;; (and (= (length charsets) 1) +;; (eq 'ascii (car charsets)))) +;; '(undecided) +;; (setq charsets (delq 'composition charsets)) +;; (let ((l (coding-system-list 'base-only)) +;; (charset-preferred-codings +;; (mapcar (function +;; (lambda (x) +;; (if (eq x 'unknown) +;; 'raw-text +;; (get-charset-property x 'preferred-coding-system)))) +;; charsets)) +;; (priorities (mapcar (function (lambda (x) (symbol-value x))) +;; coding-category-list)) +;; codings coding safe) +;; (if (memq 'unknown charsets) +;; ;; The region contains invalid multibyte characters. +;; (setq l '(raw-text))) +;; (while l +;; (setq coding (car l) l (cdr l)) +;; (if (and (setq safe (coding-system-get coding 'safe-charsets)) +;; (or (eq safe t) +;; (find-coding-systems-region-subset-p charsets safe))) +;; ;; We put the higher priority to coding systems included +;; ;; in CHARSET-PREFERRED-CODINGS, and within them, put the +;; ;; higher priority to coding systems which support smaller +;; ;; number of charsets. +;; (let ((priority +;; (+ (if (coding-system-get coding 'mime-charset) 4096 0) +;; (lsh (length (memq coding priorities)) 7) +;; (if (memq coding charset-preferred-codings) 64 0) +;; (if (> (coding-system-type coding) 0) 32 0) +;; (if (consp safe) (- 32 (length safe)) 0)))) +;; (setq codings (cons (cons priority coding) codings))))) +;; (mapcar 'cdr +;; (sort codings (function (lambda (x y) (> (car x) (car y)))))) +;; ))) + +;; (defun find-multibyte-characters (from to &optional maxcount excludes) +;; "Find multibyte characters in the region specified by FROM and TO. +;; If FROM is a string, find multibyte characters in the string. +;; The return value is an alist of the following format: +;; ((CHARSET COUNT CHAR ...) ...) +;; where +;; CHARSET is a character set, +;; COUNT is a number of characters, +;; CHARs are found characters of the character set. +;; Optional 3rd arg MAXCOUNT limits how many CHARs are put in the above list. +;; Optional 4th arg EXCLUDE is a list of character sets to be ignored. +;; +;; For invalid characters, CHARs are actually strings." +;; (let ((chars nil) +;; charset char) +;; (if (stringp from) +;; (let ((idx 0)) +;; (while (setq idx (string-match "[^\000-\177]" from idx)) +;; (setq char (aref from idx) +;; charset (char-charset char)) +;; (if (eq charset 'unknown) +;; (setq char (match-string 0))) +;; (if (or (eq charset 'unknown) +;; (not (or (eq excludes t) (memq charset excludes)))) +;; (let ((slot (assq charset chars))) +;; (if slot +;; (if (not (memq char (nthcdr 2 slot))) +;; (let ((count (nth 1 slot))) +;; (setcar (cdr slot) (1+ count)) +;; (if (or (not maxcount) (< count maxcount)) +;; (nconc slot (list char))))) +;; (setq chars (cons (list charset 1 char) chars))))) +;; (setq idx (1+ idx)))) +;; (save-excursion +;; (goto-char from) +;; (while (re-search-forward "[^\000-\177]" to t) +;; (setq char (preceding-char) +;; charset (char-charset char)) +;; (if (eq charset 'unknown) +;; (setq char (match-string 0))) +;; (if (or (eq charset 'unknown) +;; (not (or (eq excludes t) (memq charset excludes)))) +;; (let ((slot (assq charset chars))) +;; (if slot +;; (if (not (member char (nthcdr 2 slot))) +;; (let ((count (nth 1 slot))) +;; (setcar (cdr slot) (1+ count)) +;; (if (or (not maxcount) (< count maxcount)) +;; (nconc slot (list char))))) +;; (setq chars (cons (list charset 1 char) chars)))))))) +;; (nreverse chars))) + +;; (defvar last-coding-system-specified nil +;; "Most recent coding system explicitly specified by the user when asked. +;; This variable is set whenever Emacs asks the user which coding system +;; to use in order to write a file. If you set it to nil explicitly, +;; then call `write-region', then afterward this variable will be non-nil +;; only if the user was explicitly asked and specified a coding system.") + +;; (defun select-safe-coding-system (from to &optional default-coding-system) +;; "Ask a user to select a safe coding system from candidates. +;; The candidates of coding systems which can safely encode a text +;; between FROM and TO are shown in a popup window. +;; +;; Optional arg DEFAULT-CODING-SYSTEM specifies a coding system to be +;; checked at first. If omitted, buffer-file-coding-system of the +;; current buffer is used. +;; +;; If the text can be encoded safely by DEFAULT-CODING-SYSTEM, it is +;; returned without any user interaction. +;; +;; Kludgy feature: if FROM is a string, the string is the target text, +;; and TO is ignored." +;; (or default-coding-system +;; (setq default-coding-system buffer-file-coding-system)) +;; (let* ((charsets (if (stringp from) (find-charset-string from) +;; (find-charset-region from to))) +;; (safe-coding-systems (find-coding-systems-for-charsets charsets))) +;; (if (or (not enable-multibyte-characters) +;; (eq (car safe-coding-systems) 'undecided) +;; (eq default-coding-system 'no-conversion) +;; (and default-coding-system +;; (memq (coding-system-base default-coding-system) +;; safe-coding-systems))) +;; default-coding-system +;; +;; ;; At first, change each coding system to the corresponding +;; ;; mime-charset name if it is also a coding system. +;; (let ((l safe-coding-systems) +;; mime-charset) +;; (while l +;; (setq mime-charset (coding-system-get (car l) 'mime-charset)) +;; (if (and mime-charset (coding-system-p mime-charset)) +;; (setcar l mime-charset)) +;; (setq l (cdr l)))) +;; +;; (let ((non-safe-chars (find-multibyte-characters +;; from to 3 +;; (and default-coding-system +;; (coding-system-get default-coding-system +;; 'safe-charsets)))) +;; show-position overlays) +;; (save-excursion +;; ;; Highlight characters that default-coding-system can't encode. +;; (when (integerp from) +;; (goto-char from) +;; (let ((found nil)) +;; (while (and (not found) +;; (re-search-forward "[^\000-\177]" to t)) +;; (setq found (assq (char-charset (preceding-char)) +;; non-safe-chars)))) +;; (forward-line -1) +;; (setq show-position (point)) +;; (save-excursion +;; (while (and (< (length overlays) 256) +;; (re-search-forward "[^\000-\177]" to t)) +;; (let* ((char (preceding-char)) +;; (charset (char-charset char))) +;; (when (assq charset non-safe-chars) +;; (setq overlays (cons (make-overlay (1- (point)) (point)) +;; overlays)) +;; (overlay-put (car overlays) 'face 'highlight)))))) +;; +;; ;; At last, ask a user to select a proper coding system. +;; (unwind-protect +;; (save-window-excursion +;; (when show-position +;; ;; At first, be sure to show the current buffer. +;; (set-window-buffer (selected-window) (current-buffer)) +;; (set-window-start (selected-window) show-position)) +;; ;; Then, show a helpful message. +;; (with-output-to-temp-buffer "*Warning*" +;; (save-excursion +;; (set-buffer standard-output) +;; (insert "The target text contains the following non ASCII character(s):\n") +;; (let ((len (length non-safe-chars)) +;; (shown 0)) +;; (while (and non-safe-chars (< shown 3)) +;; (when (> (length (car non-safe-chars)) 2) +;; (setq shown (1+ shown)) +;; (insert (format "%25s: " (car (car non-safe-chars)))) +;; (let ((l (nthcdr 2 (car non-safe-chars)))) +;; (while l +;; (if (or (stringp (car l)) (char-valid-p (car l))) +;; (insert (car l))) +;; (setq l (cdr l)))) +;; (if (> (nth 1 (car non-safe-chars)) 3) +;; (insert "...")) +;; (insert "\n")) +;; (setq non-safe-chars (cdr non-safe-chars))) +;; (if (< shown len) +;; (insert (format "%27s\n" "...")))) +;; (insert (format "\ +;; These can't be encoded safely by the coding system %s. +;; +;; Please select one from the following safe coding systems:\n" +;; default-coding-system)) +;; (let ((pos (point)) +;; (fill-prefix " ")) +;; (mapcar (function (lambda (x) (princ " ") (princ x))) +;; safe-coding-systems) +;; (fill-region-as-paragraph pos (point))))) +;; +;; ;; Read a coding system. +;; (let* ((safe-names (mapcar (lambda (x) (list (symbol-name x))) +;; safe-coding-systems)) +;; (name (completing-read +;; (format "Select coding system (default %s): " +;; (car safe-coding-systems)) +;; safe-names nil t nil nil +;; (car (car safe-names))))) +;; (setq last-coding-system-specified (intern name)) +;; (if (integerp (coding-system-eol-type default-coding-system)) +;; (setq last-coding-system-specified +;; (coding-system-change-eol-conversion +;; last-coding-system-specified +;; (coding-system-eol-type default-coding-system)))) +;; last-coding-system-specified)) +;; (kill-buffer "*Warning*") +;; (while overlays +;; (delete-overlay (car overlays)) +;; (setq overlays (cdr overlays))))))))) + +;; (setq select-safe-coding-system-function 'select-safe-coding-system) + +;; (defun select-message-coding-system () +;; "Return a coding system to encode the outgoing message of the current buffer. +;; It at first tries the first coding system found in these variables +;; in this order: +;; (1) local value of `buffer-file-coding-system' +;; (2) value of `sendmail-coding-system' +;; (3) value of `default-buffer-file-coding-system' +;; (4) value of `default-sendmail-coding-system' +;; If the found coding system can't encode the current buffer, +;; or none of them are bound to a coding system, +;; it asks the user to select a proper coding system." +;; (let ((coding (or (and (local-variable-p 'buffer-file-coding-system) +;; buffer-file-coding-system) +;; sendmail-coding-system +;; default-buffer-file-coding-system +;; default-sendmail-coding-system))) +;; (if (eq coding 'no-conversion) +;; ;; We should never use no-conversion for outgoing mails. +;; (setq coding nil)) +;; (if (fboundp select-safe-coding-system-function) +;; (funcall select-safe-coding-system-function +;; (point-min) (point-max) coding) +;; coding))) -;;; Language support staffs. +;;; Language support stuff. (defvar language-info-alist nil - "Alist of language names vs the corresponding information of various kind. + "Alist of language environment definitions. Each element looks like: (LANGUAGE-NAME . ((KEY . INFO) ...)) -where LANGUAGE-NAME is a string, -KEY is a symbol denoting the kind of information, -INFO is any Lisp object which contains the actual information related -to KEY.") - -(defun get-language-info (language-name key) - "Return the information for LANGUAGE-NAME of the kind KEY. -KEY is a symbol denoting the kind of required information." - (if (symbolp language-name) - (setq language-name (symbol-name language-name))) - (let ((lang-slot (assoc-ignore-case language-name language-info-alist))) +where LANGUAGE-NAME is a string, the name of the language environment, +KEY is a symbol denoting the kind of information, and +INFO is the data associated with KEY. +Meaningful values for KEY include + + documentation value is documentation of what this language environment + is meant for, and how to use it. + charset value is a list of the character sets used by this + language environment. + sample-text value is one line of text, + written using those character sets, + appropriate for this language environment. + setup-function value is a function to call to switch to this + language environment. + exit-function value is a function to call to leave this + language environment. + coding-system value is a list of coding systems that are good + for saving text written in this language environment. + This list serves as suggestions to the user; + in effect, as a kind of documentation. + coding-priority value is a list of coding systems for this language + environment, in order of decreasing priority. + This is used to set up the coding system priority + list when you switch to this language environment. + input-method value is a default input method for this language + environment. + features value is a list of features requested in this + language environment. + tutorial value is a tutorial file name written in the language.") + +(defun get-language-info (lang-env key) + "Return information listed under KEY for language environment LANG-ENV. +KEY is a symbol denoting the kind of information. +For a list of useful values for KEY and their meanings, +see `language-info-alist'." + (if (symbolp lang-env) + (setq lang-env (symbol-name lang-env))) + (let ((lang-slot (assoc-ignore-case lang-env language-info-alist))) (if lang-slot (cdr (assq key (cdr lang-slot)))))) -(defun set-language-info (language-name key info) - "Set for LANGUAGE-NAME the information INFO under KEY. +(defun set-language-info (lang-env key info) + "Modify part of the definition of language environment LANG-ENV. +Specifically, this stores the information INFO under KEY +in the definition of this language environment. KEY is a symbol denoting the kind of information. -INFO is any Lisp object which contains the actual information. - -Currently, the following KEYs are used by Emacs: - -charset: list of symbols whose values are charsets specific to the language. - -coding-system: list of coding systems specific to the language. - -tutorial: a tutorial file name written in the language. - -sample-text: one line short text containing characters of the language. - -documentation: t or a string describing how Emacs supports the language. - If a string is specified, it is shown before any other information - of the language by the command `describe-language-environment'. - -setup-function: a function to call for setting up environment - convenient for a user of the language. - -If KEY is documentation or setup-function, you can also specify -a cons cell as INFO, in which case, the car part should be -a normal value as INFO for KEY (as described above), -and the cdr part should be a symbol whose value is a menu keymap -in which an entry for the language is defined. But, only the car part -is actually set as the information. +INFO is the value for that information. -We will define more KEYs in the future. To avoid conflict, -if you want to use your own KEY values, make them start with `user-'." - (if (symbolp language-name) - (setq language-name (symbol-name language-name))) +For a list of useful values for KEY and their meanings, +see `language-info-alist'." + (if (symbolp lang-env) + (setq lang-env (symbol-name lang-env))) (let (lang-slot key-slot) - (setq lang-slot (assoc language-name language-info-alist)) + (setq lang-slot (assoc lang-env language-info-alist)) (if (null lang-slot) ; If no slot for the language, add it. - (setq lang-slot (list language-name) + (setq lang-slot (list lang-env) language-info-alist (cons lang-slot language-info-alist))) (setq key-slot (assq key lang-slot)) (if (null key-slot) ; If no slot for the key, add it. (progn (setq key-slot (list key)) (setcdr lang-slot (cons key-slot (cdr lang-slot))))) - ;; Setup menu. - (cond ((eq key 'documentation) - ;; (define-key-after - ;; (if (consp info) - ;; (prog1 (symbol-value (cdr info)) - ;; (setq info (car info))) - ;; describe-language-environment-map) - ;; (vector (intern language-name)) - ;; (cons language-name 'describe-specified-language-support) - ;; t) - (if (consp info) - (setq info (car info))) - (when (featurep 'menubar) - (eval-after-load - "menubar-items.elc" - `(add-menu-button - '("Mule" "Describe Language Support") - (vector ,language-name - '(describe-language-environment ,language-name) - t)))) - ) - ((eq key 'setup-function) - ;; (define-key-after - ;; (if (consp info) - ;; (prog1 (symbol-value (cdr info)) - ;; (setq info (car info))) - ;; setup-language-environment-map) - ;; (vector (intern language-name)) - ;; (cons language-name 'setup-specified-language-environment) - ;; t) - (if (consp info) - (setq info (car info))) - (when (featurep 'menubar) - (eval-after-load - "menubar-items.elc" - `(add-menu-button - '("Mule" "Set Language Environment") - (vector ,language-name - '(set-language-environment ,language-name) - t)))) - )) - - (setcdr key-slot info) - )) - -(defun set-language-info-alist (language-name alist) - "Set for LANGUAGE-NAME the information in ALIST. -ALIST is an alist of KEY and INFO. See the documentation of + (setcdr key-slot info))) + +(defun set-language-info-alist (lang-env alist &optional parents) + "Store ALIST as the definition of language environment LANG-ENV. +ALIST is an alist of KEY and INFO values. See the documentation of `set-language-info' for the meanings of KEY and INFO." - (if (symbolp language-name) - (setq language-name (symbol-name language-name))) - (while alist - (set-language-info language-name (car (car alist)) (cdr (car alist))) - (setq alist (cdr alist)))) + (if (symbolp lang-env) + (setq lang-env (symbol-name lang-env))) + (let (; (describe-map describe-language-environment-map) + ; (setup-map setup-language-environment-map) + ) + ;; (if parents + ;; (let ((l parents) + ;; map parent-symbol parent) + ;; (while l + ;; (if (symbolp (setq parent-symbol (car l))) + ;; (setq parent (symbol-name parent)) + ;; (setq parent parent-symbol parent-symbol (intern parent))) + ;; (setq map (lookup-key describe-map (vector parent-symbol))) + ;; (if (not map) + ;; (progn + ;; (setq map (intern (format "describe-%s-environment-map" + ;; (downcase parent)))) + ;; (define-prefix-command map) + ;; (define-key-after describe-map (vector parent-symbol) + ;; (cons parent map) t))) + ;; (setq describe-map (symbol-value map)) + ;; (setq map (lookup-key setup-map (vector parent-symbol))) + ;; (if (not map) + ;; (progn + ;; (setq map (intern (format "setup-%s-environment-map" + ;; (downcase parent)))) + ;; (define-prefix-command map) + ;; (define-key-after setup-map (vector parent-symbol) + ;; (cons parent map) t))) + ;; (setq setup-map (symbol-value map)) + ;; (setq l (cdr l))))) + + ;; Set up menu items for this language env. + (let ((doc (assq 'documentation alist))) + (when doc + ;; (define-key-after describe-map (vector (intern lang-env)) + ;; (cons lang-env 'describe-specified-language-support) t) + (when (featurep 'menubar) + (eval-after-load + "menubar-items.elc" + `(add-menu-button + '("Mule" "Describe Language Support") + (vector ,lang-env + '(describe-language-environment ,lang-env) + t)))) + )) + ;; (define-key-after setup-map (vector (intern lang-env)) + ;; (cons lang-env 'setup-specified-language-environment) t) + (when (featurep 'menubar) + (eval-after-load + "menubar-items.elc" + `(add-menu-button + '("Mule" "Set Language Environment") + (vector ,lang-env + '(set-language-environment ,lang-env) + t)))) + + (while alist + (set-language-info lang-env (car (car alist)) (cdr (car alist))) + (setq alist (cdr alist))))) (defun read-language-name (key prompt &optional default) - "Read language name which has information for KEY, prompting with PROMPT. -DEFAULT is the default choice of language. -This returns a language name as a string." + "Read a language environment name which has information for KEY. +If KEY is nil, read any language environment. +Prompt with PROMPT. DEFAULT is the default choice of language environment. +This returns a language environment name as a string." (let* ((completion-ignore-case t) (name (completing-read prompt language-info-alist - (function (lambda (elm) (assq key elm))) - t nil default))) + (and key + (function (lambda (elm) (assq key elm)))) + t nil nil default))) (if (and (> (length name) 0) - (get-language-info name key)) + (or (not key) + (get-language-info name key))) name))) ;;; Multilingual input methods. @@ -276,7 +657,7 @@ Emacs loads this file at startup time.") ";;; %s -- list of LEIM (Library of Emacs Input Method) ;; ;; This file contains a list of LEIM (Library of Emacs Input Method) -;; in the same directory as this file. Loading this file registeres +;; in the same directory as this file. Loading this file registers ;; the whole input methods in Emacs. ;; ;; Each entry has the form: @@ -321,10 +702,13 @@ If nil, that means no input method is activated now.") (put 'current-input-method-title 'permanent-local t) (defcustom default-input-method nil - "*Default input method for multilingual text. + "*Default input method for multilingual text (a string). This is the input method activated automatically by the command `toggle-input-method' (\\[toggle-input-method])." - :group 'mule) + :group 'mule + :type '(choice (const nil) string)) + +(put 'input-method-function 'permanent-local t) (defvar input-method-history nil "History list for some commands that read input methods.") @@ -348,26 +732,40 @@ This function is called with no argument.") (put 'describe-current-input-method-function 'permanent-local t) (defvar input-method-alist nil - "Alist of input method names vs the corresponding information to use it. + "Alist of input method names vs how to use them. Each element has the form: - (INPUT-METHOD LANGUAGE-NAME ACTIVATE-FUNC TITLE DESCRIPTION ...) -See the function `register-input-method' for the meanings of each elements.") + (INPUT-METHOD LANGUAGE-ENV ACTIVATE-FUNC TITLE DESCRIPTION ARGS...) +See the function `register-input-method' for the meanings of the elements.") + +(defun register-input-method (input-method lang-env &rest args) + "Register INPUT-METHOD as an input method for language environment ENV. +INPUT-METHOD and LANG-ENV are symbols or strings. -(defun register-input-method (input-method language-name &rest args) - "Register INPUT-METHOD as an input method for LANGUAGE-NAME. -INPUT-METHOD and LANGUAGE-NAME are symbols or strings. The remaining arguments are: - ACTIVATE-FUNC, TITLE, DESCRIPTION, and ARG ... - where, -ACTIVATE-FUNC is a function to call for activating this method. -TITLE is a string shown in mode-line while this method is active, -DESCRIPTION is a string describing about this method, -Arguments to ACTIVATE-FUNC are INPUT-METHOD and ARGs." - (if (symbolp language-name) - (setq language-name (symbol-name language-name))) + ACTIVATE-FUNC, TITLE, DESCRIPTION, and ARGS... +ACTIVATE-FUNC is a function to call to activate this method. +TITLE is a string to show in the mode line when this method is active. +DESCRIPTION is a string describing this method and what it is good for. +The ARGS, if any, are passed as arguments to ACTIVATE-FUNC. +All told, the arguments to ACTIVATE-FUNC are INPUT-METHOD and the ARGS. + +This function is mainly used in the file \"leim-list.el\" which is +created at building time of emacs, registering all quail input methods +contained in the emacs distribution. + +In case you want to register a new quail input method by yourself, be +careful to use the same input method title as given in the third +parameter of `quail-define-package' (if the values are different, the +string specified in this function takes precedence). + +The commands `describe-input-method' and `list-input-methods' need +this duplicated values to show some information about input methods +without loading the affected quail packages." + (if (symbolp lang-env) + (setq lang-env (symbol-name lang-env))) (if (symbolp input-method) (setq input-method (symbol-name input-method))) - (let ((info (cons language-name args)) + (let ((info (cons lang-env args)) (slot (assoc input-method input-method-alist))) (if slot (setcdr slot info) @@ -387,32 +785,39 @@ The return value is a string." ;; This binding is necessary because input-method-history is ;; buffer local. (input-method (completing-read prompt input-method-alist - nil t nil 'input-method-history) - ;;default) - )) - (if (string-equal input-method "") - (setq input-method default)) + nil t nil 'input-method-history + default))) (if (> (length input-method) 0) input-method (if inhibit-null (error "No valid input method is specified"))))) (defun activate-input-method (input-method) - "Turn INPUT-METHOD on. -If some input method is already on, turn it off at first." - (if (symbolp input-method) + "Switch to input method INPUT-METHOD for the current buffer. +If some other input method is already active, turn it off first. +If INPUT-METHOD is nil, deactivate any current input method." + (if (and input-method (symbolp input-method)) (setq input-method (symbol-name input-method))) (if (and current-input-method (not (string= current-input-method input-method))) - (inactivate-input-method)) - (unless current-input-method + (inactivate-input-method)) + (unless (or current-input-method (null input-method)) (let ((slot (assoc input-method input-method-alist))) (if (null slot) (error "Can't activate input method `%s'" input-method)) - (apply (nth 2 slot) input-method (nthcdr 5 slot)) + (let ((func (nth 2 slot))) + (if (functionp func) + (apply (nth 2 slot) input-method (nthcdr 5 slot)) + (if (and (consp func) (symbolp (car func)) (symbolp (cdr func))) + (progn + (require (cdr func)) + (apply (car func) input-method (nthcdr 5 slot))) + (error "Can't activate input method `%s'" input-method)))) (setq current-input-method input-method) (setq current-input-method-title (nth 3 slot)) - (run-hooks 'input-method-activate-hook)))) + (unwind-protect + (run-hooks 'input-method-activate-hook) + (force-mode-line-update))))) (defun inactivate-input-method () "Turn off the current input method." @@ -428,12 +833,12 @@ If some input method is already on, turn it off at first." (unwind-protect (run-hooks 'input-method-inactivate-hook) (setq current-input-method nil - current-input-method-title nil))))) + current-input-method-title nil) + (force-mode-line-update))))) -(defun select-input-method (input-method) - "Select and turn on INPUT-METHOD. -This sets the default input method to what you specify, -and turn it on for the current buffer." +(defun set-input-method (input-method) + "Select and activate input method INPUT-METHOD for the current buffer. +This also sets the default input method to the one you specify." (interactive (let* ((default (or (car input-method-history) default-input-method))) (list (read-input-method-name @@ -445,28 +850,35 @@ and turn it on for the current buffer." (defun toggle-input-method (&optional arg) "Turn on or off a multilingual text input method for the current buffer. -With arg, read an input method from minibuffer and turn it on. +With no prefix argument, if an input method is currently activated, +turn it off. Otherwise, activate an input method -- the one most +recently used, or the one specified in `default-input-method', or +the one read from the minibuffer. -Without arg, if some input method is currently activated, turn it off, -else turn on an input method selected last time -or the default input method (see `default-input-method'). +With a prefix argument, read an input method from the minibuffer and +turn it on. -When there's no input method to turn on, turn on what read from minibuffer." +The default is to use the most recent input method specified +\(not including the currently active input method, if any)." (interactive "P") - (let* ((default (or (car input-method-history) default-input-method))) - (if (and current-input-method (not arg)) - (inactivate-input-method) + (if (and current-input-method (not arg)) + (inactivate-input-method) + (let ((default (or (car input-method-history) default-input-method))) + (if (and arg default (equal current-input-method default) + (> (length input-method-history) 1)) + (setq default (nth 1 input-method-history))) (activate-input-method (if (or arg (not default)) - (read-input-method-name - (if default "Input method (default %s): " "Input method: " ) - default t) + (progn + (read-input-method-name + (if default "Input method (default %s): " "Input method: " ) + default t)) default)) (or default-input-method (setq default-input-method current-input-method))))) (defun describe-input-method (input-method) - "Describe input method INPUT-METHOD." + "Describe input method INPUT-METHOD." (interactive (list (read-input-method-name "Describe input method (default, current choice): "))) @@ -486,12 +898,11 @@ When there's no input method to turn on, turn on what read from minibuffer." (fboundp describe-current-input-method-function)) (funcall describe-current-input-method-function) (message "No way to describe the current input method `%s'" - (cdr current-input-method)) + current-input-method) (ding)) (error "No input method is activated now"))) -(defun read-multilingual-string (prompt &optional initial-input - input-method) +(defun read-multilingual-string (prompt &optional initial-input input-method) "Read a multilingual string from minibuffer, prompting with string PROMPT. The input method selected last time is activated in minibuffer. If optional second arg INITIAL-INPUT is non-nil, insert it in the minibuffer @@ -501,37 +912,51 @@ to be activated instead of the one selected last time. It is a symbol or a string." (setq input-method (or input-method + current-input-method default-input-method (read-input-method-name "Input method: " nil t))) (if (and input-method (symbolp input-method)) (setq input-method (symbol-name input-method))) - (let ((current-input-method input-method)) - ;; FSFmacs - ;; (read-string prompt initial-input nil nil t))) - (read-string prompt initial-input nil))) + (let ((prev-input-method current-input-method)) + (unwind-protect + (progn + (activate-input-method input-method) + ;; FSF Emacs + ;; (read-string prompt initial-input nil nil t) + (read-string prompt initial-input nil)) + (activate-input-method prev-input-method)))) ;; Variables to control behavior of input methods. All input methods ;; should react to these variables. -(defcustom input-method-verbose-flag t - "*If this flag is non-nil, input methods give extra guidance. +(defcustom input-method-verbose-flag 'default + "*A flag to control extra guidance given by input methods. +The value should be nil, t, `complex-only', or `default'. The extra guidance is done by showing list of available keys in echo -area. +area. When you use the input method in the minibuffer, the guidance +is shown at the bottom short window (split from the existing window). -For complex input methods such as `chinese-py' and `japanese', -when you use the input method in the minibuffer, the guidance is -shown at the bottom short window (split from the existing window). -For simple input methods, guidance is not shown -when you are in the minibuffer." - :type 'boolean +If the value is t, extra guidance is always given, if the value is +nil, extra guidance is always suppressed. + +If the value is `complex-only', only complex input methods such as +`chinese-py' and `japanese' give extra guidance. + +If the value is `default', complex input methods always give extra +guidance, but simple input methods give it only when you are not in +the minibuffer. + +See also the variable `input-method-highlight-flag'." + :type '(choice (const t) (const nil) (const complex-only) (const default)) :group 'mule) (defcustom input-method-highlight-flag t "*If this flag is non-nil, input methods highlight partially-entered text. For instance, while you are in the middle of a Quail input method sequence, the text inserted so far is temporarily underlined. -The underlining goes away when you finish or abort the input method sequence." +The underlining goes away when you finish or abort the input method sequence. +See also the variable `input-method-verbose-flag'." :type 'boolean :group 'mule) @@ -545,22 +970,53 @@ just activated.") "Normal hook run just after an input method is inactivated. The variable `current-input-method' still keeps the input method name -just inacitvated.") +just inactivated.") (defvar input-method-after-insert-chunk-hook nil "Normal hook run just after an input method insert some chunk of text.") +(defvar input-method-exit-on-first-char nil + "This flag controls a timing when an input method returns. +Usually, the input method does not return while there's a possibility +that it may find a different translation if a user types another key. +But, it this flag is non-nil, the input method returns as soon as +the current key sequence gets long enough to have some valid translation.") + +(defvar input-method-use-echo-area nil + "This flag controls how an input method shows an intermediate key sequence. +Usually, the input method inserts the intermediate key sequence, +or candidate translations corresponding to the sequence, +at point in the current buffer. +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. 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 temporalily. After the key is handled, the input method is -back on. +input method temporarily. After that key, the input method is re-enabled. But, if this flag is non-nil, the input method is never back on.") +(defvar set-language-environment-hook nil + "Normal hook run after some language environment is set. + +When you set some hook function here, that effect usually should not +be inherited to another language environment. So, you had better set +another function in `exit-language-environment-hook' (which see) to +cancel the effect.") + +(defvar exit-language-environment-hook nil + "Normal hook run after exiting from some language environment. +When this hook is run, the variable `current-language-environment' +is still bound to the language environment being exited. + +This hook is mainly used for canceling the effect of +`set-language-environment-hook' (which-see).") + +(put 'setup-specified-language-environment 'apropos-inhibit t) + (defun setup-specified-language-environment () - "Set up multi-lingual environment convenient for the specified language." + "Switch to a specified language environment." (interactive) (let (language-name) (if (and (symbolp last-command-event) @@ -570,30 +1026,261 @@ But, if this flag is non-nil, the input method is never back on.") (set-language-environment language-name) (error "Bogus calling sequence")))) -(defvar current-language-environment "English" - "The last language environment specified with `set-language-environment'.") +(defcustom current-language-environment "English" + "The last language environment specified with `set-language-environment'. +This variable should be set only with \\[customize], which is equivalent +to using the function `set-language-environment'." + :link '(custom-manual "(emacs)Language Environments") + :set (lambda (symbol value) (set-language-environment value)) + :get (lambda (x) + (or (car-safe (assoc-ignore-case + (if (symbolp current-language-environment) + (symbol-name current-language-environment) + current-language-environment) + language-info-alist)) + "English")) + :type (cons 'choice (mapcar (lambda (lang) + (list 'const (car lang))) + language-info-alist)) + :initialize 'custom-initialize-default + :group 'mule + :type 'string) + +(defun reset-language-environment () + "Reset multilingual environment of Emacs to the default status. + +The default status is as follows: + + The default value of buffer-file-coding-system is nil. + The default coding system for process I/O is nil. + The default value for the command `set-terminal-coding-system' is nil. + The default value for the command `set-keyboard-coding-system' is nil. + + The order of priorities of coding categories and the coding system + bound to each category are as follows + coding category coding system + -------------------------------------------------- + iso-8-2 iso-8859-1 + iso-8-1 iso-8859-1 + iso-7 iso-2022-7bit + iso-lock-shift iso-2022-lock + iso-8-designate iso-2022-8bit-ss2 + no-conversion raw-text + shift-jis shift_jis + big5 big5 + ucs-4 ---- + utf-8 ---- +" + (interactive) + ;; This function formerly set default-enable-multibyte-characters to t, + ;; but that is incorrect. It should not alter the unibyte/multibyte choice. + + (set-coding-category-system 'iso-7 'iso-2022-7bit) + (set-coding-category-system 'iso-8-1 'iso-8859-1) + (set-coding-category-system 'iso-8-2 'iso-8859-1) + (set-coding-category-system 'iso-lock-shift 'iso-2022-lock) + (set-coding-category-system 'iso-8-designate 'iso-2022-8bit-ss2) + (set-coding-category-system 'no-conversion 'raw-text) + (set-coding-category-system 'shift-jis 'shift_jis) + (set-coding-category-system 'big5 'big5) + (cond ((eq (coding-system-type (coding-category-system 'utf-8)) 'utf-8) + (set-coding-category-system 'utf-8 'utf-8) + (cond ((eq (coding-system-type (coding-category-system 'ucs-4)) + 'iso-10646-ucs-4) + (set-coding-category-system 'ucs-4 'iso-10646-ucs-4) + (set-coding-priority-list + '(iso-8-1 + iso-8-2 + iso-7 + iso-lock-shift + iso-8-designate + utf-8 + ucs-4 + no-conversion + shift-jis + big5)) + ) + (t + (set-coding-priority-list + '(iso-8-1 + iso-8-2 + iso-7 + iso-lock-shift + iso-8-designate + utf-8 + no-conversion + shift-jis + big5)) + )) + ) + (t + (set-coding-priority-list + '(iso-8-1 + iso-8-2 + iso-7 + iso-lock-shift + iso-8-designate + no-conversion + shift-jis + big5)) + )) + + ;; (update-coding-systems-internal) + + (set-default-coding-systems nil) + ;; Don't alter the terminal and keyboard coding systems here. + ;; The terminal still supports the same coding system + ;; that it supported a minute ago. +;;; (set-terminal-coding-system-internal nil) +;;; (set-keyboard-coding-system-internal nil) + + ;; (setq nonascii-translation-table nil + ;; nonascii-insert-offset 0) + ) (defun set-language-environment (language-name) "Set up multi-lingual environment for using LANGUAGE-NAME. This sets the coding system priority and the default input method -and sometimes other things." - (interactive (list (read-language-name 'setup-function - "Set language environment: "))) +and sometimes other things. LANGUAGE-NAME should be a string +which is the name of a language environment. For example, \"Latin-1\" +specifies the character set for the major languages of Western Europe." + (interactive (list (read-language-name + nil + "Set language environment (default, English): "))) (if language-name (if (symbolp language-name) (setq language-name (symbol-name language-name))) (setq language-name "English")) - (if (null (get-language-info language-name 'setup-function)) + (or (assoc-ignore-case language-name language-info-alist) (error "Language environment not defined: %S" language-name)) - (funcall (get-language-info language-name 'setup-function)) - (setq current-language-environment language-name) + (if current-language-environment + (let ((func (get-language-info current-language-environment + 'exit-function))) + (run-hooks 'exit-language-environment-hook) + (if (fboundp func) (funcall func)))) + (let ((default-eol-type (coding-system-eol-type + default-buffer-file-coding-system))) + (reset-language-environment) + + (setq current-language-environment language-name) + (set-language-environment-coding-systems language-name default-eol-type)) + (let ((input-method (get-language-info language-name 'input-method))) + (when input-method + (setq default-input-method input-method) + (if input-method-history + (setq input-method-history + (cons input-method + (delete input-method input-method-history)))))) + ;; (let ((nonascii (get-language-info language-name 'nonascii-translation)) + ;; (dos-table + ;; (if (eq window-system 'pc) + ;; (intern + ;; (concat "cp" dos-codepage "-nonascii-translation-table"))))) + ;; (cond + ;; ((char-table-p nonascii) + ;; (setq nonascii-translation-table nonascii)) + ;; ((and (eq window-system 'pc) (boundp dos-table)) + ;; ;; DOS terminals' default is to use a special non-ASCII translation + ;; ;; table as appropriate for the installed codepage. + ;; (setq nonascii-translation-table (symbol-value dos-table))) + ;; ((charsetp nonascii) + ;; (setq nonascii-insert-offset (- (make-char nonascii) 128))))) + + ;; (setq charset-origin-alist + ;; (get-language-info language-name 'charset-origin-alist)) + + ;; Unibyte setups if necessary. + ;; (unless default-enable-multibyte-characters + ;; ;; Syntax and case table. + ;; (let ((syntax (get-language-info language-name 'unibyte-syntax))) + ;; (if syntax + ;; (let ((set-case-syntax-set-multibyte nil)) + ;; (load syntax nil t)) + ;; ;; No information for syntax and case. Reset to the defaults. + ;; (let ((syntax-table (standard-syntax-table)) + ;; (case-table (standard-case-table)) + ;; (ch (if (eq window-system 'pc) 128 160))) + ;; (while (< ch 256) + ;; (modify-syntax-entry ch " " syntax-table) + ;; (aset case-table ch ch) + ;; (setq ch (1+ ch))) + ;; (set-char-table-extra-slot case-table 0 nil) + ;; (set-char-table-extra-slot case-table 1 nil) + ;; (set-char-table-extra-slot case-table 2 nil)) + ;; (set-standard-case-table (standard-case-table)) + ;; (let ((list (buffer-list))) + ;; (while list + ;; (with-current-buffer (car list) + ;; (set-case-table (standard-case-table))) + ;; (setq list (cdr list)))))) + ;; ;; Display table and coding system for terminal. + ;; (let ((coding (get-language-info language-name 'unibyte-display))) + ;; (if coding + ;; (standard-display-european-internal) + ;; (standard-display-default (if (eq window-system 'pc) 128 160) 255) + ;; (aset standard-display-table 146 nil)) + ;; (or (eq window-system 'pc) + ;; (set-terminal-coding-system coding)))) + + (let ((required-features (get-language-info language-name 'features))) + (while required-features + (require (car required-features)) + (setq required-features (cdr required-features)))) + (let ((func (get-language-info language-name 'setup-function))) + (if (fboundp func) + (funcall func))) + (run-hooks 'set-language-environment-hook) (force-mode-line-update t)) +;; (defun standard-display-european-internal () +;; ;; Actually set up direct output of non-ASCII characters. +;; (standard-display-8bit (if (eq window-system 'pc) 128 160) 255) +;; ;; Unibyte Emacs on MS-DOS wants to display all 8-bit characters with +;; ;; the native font, and codes 160 and 146 stand for something very +;; ;; different there. +;; (or (and (eq window-system 'pc) (not default-enable-multibyte-characters)) +;; (progn +;; ;; Make non-line-break space display as a plain space. +;; ;; Most X fonts do the wrong thing for code 160. +;; (aset standard-display-table 160 [32]) +;; ;; Most Windows programs send out apostrophe's as \222. Most X fonts +;; ;; don't contain a character at that position. Map it to the ASCII +;; ;; apostrophe. +;; (aset standard-display-table 146 [39])))) + +(defun set-language-environment-coding-systems (language-name + &optional eol-type) + "Do various coding system setups for language environment LANGUAGE-NAME. + +The optional arg EOL-TYPE specifies the eol-type of the default value +of buffer-file-coding-system set by this function." + (let* ((priority (get-language-info language-name 'coding-priority)) + (default-coding (car priority))) + (if priority + (let ((categories (mapcar 'coding-system-category priority)) + category checked-categories) + (set-default-coding-systems + (if (memq eol-type '(lf crlf cr unix dos mac)) + (coding-system-change-eol-conversion default-coding eol-type) + default-coding)) + ;; (setq default-sendmail-coding-system default-coding) + (while priority + (unless (memq (setq category (car categories)) checked-categories) + (set-coding-category-system category (car priority)) + (setq checked-categories (cons category checked-categories))) + (setq priority (cdr priority) + categories (cdr categories))) + (set-coding-priority-list (nreverse checked-categories)) + ;; (update-coding-systems-internal) + )))) + ;; Print all arguments with `princ', then print "\n". (defsubst princ-list (&rest args) (while args (princ (car args)) (setq args (cdr args))) (princ "\n")) +(put 'describe-specified-language-support 'apropos-inhibit t) + ;; Print a language specific information such as input methods, ;; charsets, and coding systems. This function is intended to be ;; called from the menu: @@ -613,7 +1300,7 @@ and sometimes other things." (interactive (list (read-language-name 'documentation - "Describe language environment (default, current choise): "))) + "Describe language environment (default, current choice): "))) (if (null language-name) (setq language-name current-language-environment)) (if (or (null language-name) @@ -623,8 +1310,9 @@ and sometimes other things." (setq language-name (symbol-name language-name))) (let ((doc (get-language-info language-name 'documentation))) (with-output-to-temp-buffer "*Help*" + (princ-list language-name " language environment" "\n") (if (stringp doc) - (progn + (progn (princ-list doc) (terpri))) (let ((str (get-language-info language-name 'sample-text))) @@ -633,9 +1321,15 @@ and sometimes other things." (princ "Sample text:\n") (princ-list " " str) (terpri)))) - (princ "Input methods:\n") - (let ((l input-method-alist)) - (while l + (let ((input-method (get-language-info language-name 'input-method)) + (l (copy-sequence input-method-alist))) + (princ "Input methods") + (when input-method + (princ (format " (default, %s)" input-method)) + (setq input-method (assoc input-method input-method-alist)) + (setq l (cons input-method (delete input-method l)))) + (princ ":\n") + (while l (if (string= language-name (nth 1 (car l))) (princ-list " " (car (car l)) (format " (`%s' in mode line)" (nth 3 (car l))))) @@ -658,9 +1352,14 @@ and sometimes other things." (princ ; (format " %s (`%c' in mode line):\n\t%s\n" ;; In XEmacs, `coding-system-mnemonic' returns string. (format " %s (`%s' in mode line):\n\t%s\n" - (car l) - (coding-system-mnemonic (car l)) - (coding-system-doc-string (car l)))) + (car l) + (coding-system-mnemonic (car l)) + (coding-system-doc-string (car l)))) + ;; (let ((aliases (coding-system-get (car l) 'alias-coding-systems))) + ;; (when aliases + ;; (princ "\t") + ;; (princ (cons 'alias: (cdr aliases))) + ;; (terpri))) (setq l (cdr l)))))))) ;;; Charset property @@ -680,7 +1379,7 @@ and sometimes other things." (defvar char-code-property-table (make-char-table 'generic) "Char-table containing a property list of each character code. -;; + See also the documentation of `get-char-code-property' and `put-char-code-property'") ;; (let ((plist (aref char-code-property-table char))) @@ -701,8 +1400,70 @@ It can be retrieved with `(get-char-code-property CHAR PROPNAME)'." (nconc plist (list propname value)))) (put-char-table char (list propname value) char-code-property-table) ))) -;; (setcar (cdr slot) value) -;; (nconc plist (list propname value)))) -;; (aset char-code-property-table char (list propname value))))) + + +;; Pretty description of encoded string + +;; Alist of ISO 2022 control code vs the corresponding mnemonic string. +;; (defvar iso-2022-control-alist +;; '((?\x1b . "ESC") +;; (?\x0e . "SO") +;; (?\x0f . "SI") +;; (?\x8e . "SS2") +;; (?\x8f . "SS3") +;; (?\x9b . "CSI"))) + +;; (defun encoded-string-description (str coding-system) +;; "Return a pretty description of STR that is encoded by CODING-SYSTEM." +;; (setq str (string-as-unibyte str)) +;; (let ((char (aref str 0)) +;; desc) +;; (when (< char 128) +;; (setq desc (or (cdr (assq char iso-2022-control-alist)) +;; (char-to-string char))) +;; (let ((i 1) +;; (len (length str))) +;; (while (< i len) +;; (setq char (aref str i)) +;; (if (>= char 128) +;; (setq desc nil i len) +;; (setq desc (concat desc " " +;; (or (cdr (assq char iso-2022-control-alist)) +;; (char-to-string char))) +;; i (1+ i)))))) +;; (or desc +;; (mapconcat (function (lambda (x) (format "0x%02x" x))) str " ")))) + +;; (defun encode-coding-char (char coding-system) +;; "Encode CHAR by CODING-SYSTEM and return the resulting string. +;; If CODING-SYSTEM can't safely encode CHAR, return nil." +;; (if (cmpcharp char) +;; (setq char (car (decompose-composite-char char 'list)))) +;; (let ((str1 (char-to-string char)) +;; (str2 (make-string 2 char)) +;; (safe-charsets (and coding-system +;; (coding-system-get coding-system 'safe-charsets))) +;; enc1 enc2 i1 i2) +;; (when (or (eq safe-charsets t) +;; (memq (char-charset char) safe-charsets)) +;; ;; We must find the encoded string of CHAR. But, just encoding +;; ;; CHAR will put extra control sequences (usually to designate +;; ;; ASCII charaset) at the tail if type of CODING is ISO 2022. +;; ;; To exclude such tailing bytes, we at first encode one-char +;; ;; string and two-char string, then check how many bytes at the +;; ;; tail of both encoded strings are the same. +;; +;; (setq enc1 (string-as-unibyte (encode-coding-string str1 coding-system)) +;; i1 (length enc1) +;; enc2 (string-as-unibyte (encode-coding-string str2 coding-system)) +;; i2 (length enc2)) +;; (while (and (> i1 0) (= (aref enc1 (1- i1)) (aref enc2 (1- i2)))) +;; (setq i1 (1- i1) i2 (1- i2))) +;; +;; ;; Now (substring enc1 i1) and (substring enc2 i2) are the same, +;; ;; and they are the extra control sequences at the tail to +;; ;; exclude. +;; (substring enc2 0 i2)))) + ;;; mule-cmds.el ends here diff --git a/lisp/mule/mule-help.el b/lisp/mule/mule-help.el index a5442db..dd51dc7 100644 --- a/lisp/mule/mule-help.el +++ b/lisp/mule/mule-help.el @@ -57,7 +57,9 @@ With arg, you are asked to select which language." (setq buffer-file-name file) (setq default-directory (expand-file-name "~/")) (setq buffer-auto-save-file-name nil) - (insert-file-contents (locate-data-file filename)) + (let ((coding-system-for-read + (get-language-info lang 'tutorial-coding-system))) + (insert-file-contents (locate-data-file filename))) (goto-char (point-min)) ;; The 'didactic' blank lines: Possibly insert blank lines ;; around <>, and change << >> to [ ]. diff --git a/lisp/mule/mule-misc.el b/lisp/mule/mule-misc.el index fe9948f..9b4906e 100644 --- a/lisp/mule/mule-misc.el +++ b/lisp/mule/mule-misc.el @@ -64,7 +64,7 @@ using a window system." (len (length string)) (i 0)) (while (< i len) - (setq col (+ col (charset-columns (char-charset (aref string i))))) + (setq col (+ col (charset-width (char-charset (aref string i))))) (setq i (1+ i))) col)) @@ -170,7 +170,7 @@ It returns only 1 in XEmacs. It is for compatibility with MULE 2.3." (defun char-width (character) "Return number of columns a CHARACTER occupies when displayed." - (charset-columns (char-charset character))) + (charset-width (char-charset character))) (defalias 'char-columns 'char-width) (make-obsolete 'char-columns 'char-width) @@ -190,34 +190,47 @@ It might be available for compatibility with Mule 2.3, because its `find-charset-string' ignores ASCII charset." (delq 'ascii (charsets-in-region start end))) -(defun split-char (char) - "Return list of charset and one or two position-codes of CHAR." - (let ((charset (char-charset char))) - (if (eq charset 'ascii) - (list charset (char-int char)) - (let ((i 0) - (len (charset-dimension charset)) - (code (if (integerp char) - char - (char-int char))) - dest) - (while (< i len) - (setq dest (cons (logand code 127) dest) - code (lsh code -7) - i (1+ i))) - (cons charset dest) - )))) - -(defun split-char-or-char-int (char) - "Return list of charset and one or two position-codes of CHAR. -CHAR must be character or integer." - (if (characterp char) - (split-char char) - (let ((c (int-char char))) - (if c - (split-char c) - (list 'ascii c) - )))) +;(defun split-char (char) +; "Return list of charset and one or two position-codes of CHAR." +; (let ((charset (char-charset char))) +; (if (eq charset 'ascii) +; (list charset (char-int char)) +; (let ((i 0) +; (len (charset-dimension charset)) +; (code (if (integerp char) +; char +; (char-int char))) +; dest) +; (while (< i len) +; (setq dest (cons (logand code 127) dest) +; code (lsh code -7) +; i (1+ i))) +; (cons charset dest) +; )))) + +(defun char-octet (ch &optional n) + "Return the octet numbered N (should be 0 or 1) of char CH. +N defaults to 0 if omitted." + (let ((split (split-char ch))) + (setq n (or n 0)) + (cond ((eq n 0) + (nth 1 split)) + ((eq n 1) + (nth 2 split)) + (t (error "n must be 0 or 1"))))) +;; Made obsolete June 15, 1999. Delete ASAP. +(make-obsolete 'char-octet "Use split-char") + +;(defun split-char-or-char-int (char) +; "Return list of charset and one or two position-codes of CHAR. +;CHAR must be character or integer." +; (if (characterp char) +; (split-char char) +; (let ((c (int-char char))) +; (if c +; (split-char c) +; (list 'ascii c) +; )))) ;;; Commands @@ -301,4 +314,60 @@ when the language environment is made current." ;; (put env-sym 'quail-environ-doc-string doc-string) ;; (put env-sym 'set-quail-environ enable-function)) + +;;; @ coding-system category +;;; + +(defun coding-system-get (coding-system prop) + "Extract a value from CODING-SYSTEM's property list for property PROP." + (or (plist-get + (get (coding-system-name coding-system) 'coding-system-property) + prop) + (condition-case nil + (coding-system-property coding-system prop) + (error nil)))) + +(defun coding-system-put (coding-system prop val) + "Change value in CODING-SYSTEM's property list PROP to VAL." + (put (coding-system-name coding-system) + 'coding-system-property + (plist-put (get (coding-system-name coding-system) + 'coding-system-property) + prop val))) + +(defun coding-system-category (coding-system) + "Return the coding category of CODING-SYSTEM." + (or (coding-system-get coding-system 'category) + (let ((type (coding-system-type coding-system))) + (cond ((eq type 'no-conversion) + 'no-conversion) + ((eq type 'shift-jis) + 'shift-jis) + ((eq type 'ucs-4) + 'ucs-4) + ((eq type 'utf-8) + 'utf-8) + ((eq type 'big5) + 'big5) + ((eq type 'iso2022) + (cond ((coding-system-lock-shift coding-system) + 'iso-lock-shift) + ((coding-system-seven coding-system) + 'iso-7) + (t + (let ((dim 0) + ccs + (i 0)) + (while (< i 4) + (setq ccs (coding-system-charset coding-system i)) + (if (and ccs + (> (charset-dimension ccs) dim)) + (setq dim (charset-dimension ccs)) + ) + (setq i (1+ i))) + (cond ((= dim 1) 'iso-8-1) + ((= dim 2) 'iso-8-2) + (t 'iso-8-designate)) + )))))))) + ;;; mule-misc.el ends here diff --git a/lisp/mule/thai-xtis-chars.el b/lisp/mule/thai-xtis-chars.el new file mode 100644 index 0000000..27226b1 --- /dev/null +++ b/lisp/mule/thai-xtis-chars.el @@ -0,0 +1,45 @@ +;;; thai-xtis-chars.el --- definition of the Thai XTIS charset. + +;; Copyright (C) 1999 Electrotechnical Laboratory, JAPAN. +;; Licensed to the Free Software Foundation. + +;; Author: MORIOKA Tomohiko + +;; Keywords: mule, multilingual, Thai, XTIS + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Commentary: + +;; For Thai, the pre-composed character set proposed by +;; Virach Sornlertlamvanich is supported. + +;;; Code: + +(make-charset 'thai-xtis "Precomposed Thai (XTIS by Virach)." + '(registry "xtis-0" + dimension 2 + columns 1 + chars 94 + final ?? + graphic 0)) + +(define-category ?x "Precomposed Thai character.") +(modify-category-entry 'thai-xtis ?x) + +;; thai-xtis-chars.el ends here. diff --git a/lisp/mule/thai-xtis.el b/lisp/mule/thai-xtis.el index 2b16c2b..1092a05 100644 --- a/lisp/mule/thai-xtis.el +++ b/lisp/mule/thai-xtis.el @@ -1,4 +1,4 @@ -;;; thai-xtis.el --- Thai support for pre-composed font (for XTIS). +;;; thai-xtis.el --- Support for Thai (XTIS) -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1999 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -35,120 +35,180 @@ ;;; Code: (when (featurep 'xemacs) - (make-charset 'thai-xtis "Precomposed Thai (XTIS by Virach)." - '(registry "xtis-0" - dimension 2 - columns 1 - chars 94 - final ?? - graphic 0)) - - (modify-syntax-entry 'thai-xtis "w") - - (define-category ?T "Precomposed Thai character.") - (modify-category-entry 'thai-xtis ?T) + (let ((deflist '(;; chars syntax + ("$(?!0(B-$(?NxP0R0S0`0(B-$(?e0(B" "w") + ("$(?p0(B-$(?y0(B" "w") + ("$(?O0f0_0o0z0{0(B" "_") + )) + elm chars len syntax to ch i) + (while deflist + (setq elm (car deflist)) + (setq chars (car elm) + len (length chars) + syntax (nth 1 elm) + i 0) + (while (< i len) + (if (= (aref chars i) ?-) + (setq i (1+ i) + to (nth 1 (split-char (aref chars i)))) + (setq ch (nth 1 (split-char (aref chars i))) + to ch)) + (while (<= ch to) + (modify-syntax-entry (vector 'thai-xtis ch) syntax) + (setq ch (1+ ch))) + (setq i (1+ i))) + (setq deflist (cdr deflist)))) + + (put-charset-property 'thai-xtis 'preferred-coding-system 'tis-620) ) +;; This is the ccl-decode-thai-xtis automaton. +;; +;; "WRITE x y" == (insert (make-char 'thai-xtis x y)) +;; "write x" == (insert x) +;; rx' == (tis620-to-thai-xtis-second-byte-bitpattern rx) +;; r3 == "no vower nor tone" +;; r4 == (charset-id 'thai-xtis) +;; +;; | input (= r0) +;; state |-------------------------------------------- +;; | consonant | vowel | tone +;; ---------+-------------+-------------+---------------- +;; r1 == 0 | r1 = r0 | WRITE r0,r3 | WRITE r0,r3 +;; r2 == 0 | | | +;; ---------+-------------+-------------+---------------- +;; r1 == C | WRITE r1,r3 | r2 = r0' | WRITE r1,r3|r0' +;; r2 == 0 | r1 = r0 | | r1 = 0 +;; ---------+-------------+-------------+---------------- +;; r1 == C | WRITE r1,r2 | WRITE r1,r2 | WRITE r1,r2|r0' +;; r2 == V | r1 = r0 | WRITE r0,r3 | r1 = r2 = 0 +;; | r2 = 0 | r1 = r2 = 0 | +;; +;; +;; | input (= r0) +;; state |----------------------------------------- +;; | symbol | ASCII | EOF +;; ---------+-------------+-------------+------------- +;; r1 == 0 | WRITE r0,r3 | write r0 | +;; r2 == 0 | | | +;; ---------+-------------+-------------+------------- +;; r1 == C | WRITE r1,r3 | WRITE r1,r3 | WRITE r1,r3 +;; r2 == 0 | WRITE r0,r3 | write r0 | +;; | r1 = 0 | r1 = 0 | +;; ---------+-------------+-------------+------------- +;; r1 == C | WRITE r1,r2 | WRITE r1,r2 | WRITE r1,r2 +;; r2 == V | WRITE r0,r3 | write r0 | +;; | r1 = r2 = 0 | r1 = r2 = 0 | -(defvar leading-code-private-21 #x9F) -(defconst thai-xtis-leading-code - (concat (char-to-string leading-code-private-21) - (char-to-string (charset-id 'thai-xtis)))) +(eval-and-compile -(define-ccl-program ccl-thai-xtis-consonant - `(0 - (if (r1 == 0) - ((write ,thai-xtis-leading-code) - (write r0) - (r1 = r2)) - (if (r1 == r2) - ((write r1) - (write ,thai-xtis-leading-code) - (write r0)) - ((write r1) - (write ,thai-xtis-leading-code) - (write r0) - (r1 = r2)))))) +;; input : r5 = 1st byte, r6 = 2nd byte +;; Their values will be destroyed. +(define-ccl-program ccl-thai-xtis-write + '(0 + ((r5 = ((r5 & #x7F) << 7)) + (r6 = ((r6 & #x7F) | r5)) + (write-multibyte-character r4 r6)))) -(define-ccl-program ccl-thai-xtis-vowel-d1 - `(0 +(define-ccl-program ccl-thai-xtis-consonant + '(0 (if (r1 == 0) - ((write ,thai-xtis-leading-code) - (write r0 r2)) - (if (r1 == r2) - (r1 = ?\xb8) - ((write r1) - (write ,thai-xtis-leading-code) - (write r0 r2) - (r1 = 0)))))) + (r1 = r0) + (if (r2 == 0) + ((r5 = r1) (r6 = r3) (call ccl-thai-xtis-write) + (r1 = r0)) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write) + (r1 = r0) + (r2 = 0)))))) (define-ccl-program ccl-thai-xtis-vowel - `(0 - (if (r1 == 0) - ((write ,thai-xtis-leading-code) - (write r0 r2)) - (if (r1 == r2) - (r1 = ((r0 - 188) << 3)) - ((write r1) - (write ,thai-xtis-leading-code) - (write r0 r2) - (r1 = 0)))))) + '(0 + ((if (r1 == 0) + ((r5 = r0) (r6 = r3) (call ccl-thai-xtis-write)) + ((if (r2 == 0) + (r2 = ((r0 - 204) << 3)) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write) + (r5 = r0) (r6 = r3) (call ccl-thai-xtis-write) + (r1 = 0) + (r2 = 0)))))))) + +(define-ccl-program ccl-thai-xtis-vowel-d1 + '(0 + ((if (r1 == 0) + ((r5 = r0) (r6 = r3) (call ccl-thai-xtis-write)) + ((if (r2 == 0) + (r2 = #x38) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write) + (r5 = r0) (r6 = r3) (call ccl-thai-xtis-write) + (r1 = 0) + (r2 = 0)))))))) (define-ccl-program ccl-thai-xtis-vowel-ee - `(0 - (if (r1 == 0) - ((write ,thai-xtis-leading-code) - (write r0 r2)) - (if (r1 == r2) - (r1 = ?\xf8) - ((write r1) - (write ,thai-xtis-leading-code) - (write r0 r2) - (r1 = 0)))))) + '(0 + ((if (r1 == 0) + ((r5 = r0) (r6 = r3) (call ccl-thai-xtis-write)) + ((if (r2 == 0) + (r2 = #x78) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write) + (r5 = r0) (r6 = r3) (call ccl-thai-xtis-write) + (r1 = 0) + (r2 = 0)))))))) (define-ccl-program ccl-thai-xtis-tone - `(0 + '(0 (if (r1 == 0) - ((write ,thai-xtis-leading-code) - (write r0 r2)) - (if (r1 == r2) - ((r0 -= 54) - (write r0) + ((r5 = r0) (r6 = r3) (call ccl-thai-xtis-write)) + (if (r2 == 0) + ((r5 = r1) (r6 = ((r0 - #xE6) | r3)) (call ccl-thai-xtis-write) (r1 = 0)) - ((r1 += (r0 - ?\xe6)) - (write r1) - (r1 = 0)))))) + ((r5 = r1) (r6 = ((r0 - #xE6) | r2)) (call ccl-thai-xtis-write) + (r1 = 0) + (r2 = 0)))))) (define-ccl-program ccl-thai-xtis-symbol - `(0 + '(0 + (if (r1 == 0) + ((r5 = r0) (r6 = r3) (call ccl-thai-xtis-write)) + (if (r2 == 0) + ((r5 = r1) (r6 = r3) (call ccl-thai-xtis-write) + (r5 = r0) (r6 = r3) (call ccl-thai-xtis-write) + (r1 = 0)) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write) + (r5 = r0) (r6 = r3) (call ccl-thai-xtis-write) + (r1 = 0) + (r2 = 0)))))) + +(define-ccl-program ccl-thai-xtis-ascii + '(0 (if (r1 == 0) - ((write ,thai-xtis-leading-code) - (write r0 r2)) - (if (r1 == r2) - ((write r2) - (write ,thai-xtis-leading-code) - (write r0 r2) + (write r0) + (if (r2 == 0) + ((r5 = r1) (r6 = r3) (call ccl-thai-xtis-write) + (write r0) (r1 = 0)) - ((write r1) - (write ,thai-xtis-leading-code) - (write r0 r2) - (r1 = 0)))))) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write) + (write r0) + (r1 = 0) + (r2 = 0)))))) + +(define-ccl-program ccl-thai-xtis-eof + '(0 + (if (r1 != 0) + (if (r2 == 0) + ((r5 = r1) (r6 = r3) (call ccl-thai-xtis-write)) + ((r5 = r1) (r6 = r2) (call ccl-thai-xtis-write)))))) (define-ccl-program ccl-decode-thai-xtis `(4 ((read r0) (r1 = 0) - (r2 = ?\xb0) + (r2 = 0) + (r3 = #x30) + (r4 = ,(charset-id 'thai-xtis)) (loop (if (r0 < 161) - (if (r1 == 0) - (write r0) - (if (r1 == r2) - ((write r2 r0) - (r1 = 0)) - ((write r1 r0) - (r1 = 0)))) + (call ccl-thai-xtis-ascii) (branch (r0 - 161) (call ccl-thai-xtis-consonant) (call ccl-thai-xtis-consonant) @@ -247,9 +307,11 @@ (read r0) (repeat))) - (if (r1 != 0) - (write r1) - nil))) + (call ccl-thai-xtis-eof))) + +) + +(defconst leading-code-private-21 #x9F) (define-ccl-program ccl-encode-thai-xtis `(1 @@ -262,7 +324,7 @@ (write r0) (read r0) (r1 = (r0 & 7)) - (r0 = ((r0 - ?\xb0) >> 3)) + (r0 = ((r0 - #xB0) >> 3)) (if (r0 != 0) (write r0 [0 209 212 213 214 215 216 217 218 238])) (if (r1 != 0) @@ -275,12 +337,14 @@ (write-read-repeat r0)))))) (if (featurep 'xemacs) - (make-coding-system - 'tis-620 'ccl - "external=tis620, internal=thai-xtis" - `(mnemonic "TIS620" - decode ,ccl-decode-thai-xtis - encode ,ccl-encode-thai-xtis)) + (progn + (make-coding-system + 'tis-620 'ccl + "external=tis620, internal=thai-xtis" + `(mnemonic "TIS620" + decode ,ccl-decode-thai-xtis + encode ,ccl-encode-thai-xtis)) + (coding-system-put 'tis-620 'category 'iso-8-1)) (make-coding-system 'tis-620 4 ?T "external=tis620, internal=thai-xtis" '(ccl-decode-thai-xtis . ccl-encode-thai-xtis) @@ -290,10 +354,10 @@ (set-language-info-alist "Thai-XTIS" - '((setup-function . setup-thai-xtis-environment) - (exit-function . exit-thai-xtis-environment) - (charset thai-xtis) + '((charset thai-xtis) (coding-system tis-620 iso-2022-7bit) + (tutorial . "TUTORIAL.th") + (tutorial-coding-system . tis-620) (coding-priority tis-620 iso-2022-7bit) (sample-text . "$(?!:(B") (documentation . t))) diff --git a/lisp/mule/vietnamese.el b/lisp/mule/vietnamese.el index 2d2867f..00235eb 100644 --- a/lisp/mule/vietnamese.el +++ b/lisp/mule/vietnamese.el @@ -1,4 +1,4 @@ -;;; vietnamese.el --- Support for Vietnamese +;;; vietnamese.el --- Support for Vietnamese -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -33,22 +33,22 @@ (defvar viet-viscii-decode-table [;; VISCII is a full 8-bit code. - 0 1 ?.2NF 3 4 ?NG ?Ng 7 8 9 10 11 12 13 14 15 - 16 17 18 19 ?.2NV 21 22 23 24 ?N[ 26 27 28 29 ?N\ 31 + 0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15 + 16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?.2NU ?N! ?N" ?N# ?N$ ?N% ?N& ?N' ?N( ?N) ?N* ?N+ ?N, ?N- ?N. ?N/ - ?.2N0 ?N1 ?N2 ?N5 ?N~ ?N> ?N6 ?N7 ?N8 ?Nv ?Nw ?No ?N| ?N{ ?Nx ?NO - ?.2Nu ?.1N! ?N" ?N# ?N$ ?N% ?N& ?N' ?N( ?N) ?N* ?N+ ?N, ?N- ?N. ?N/ - ?.1N0 ?N1 ?N2 ?.2N^ ?N= ?.1N5 ?N6 ?N7 ?N8 ?.2Nq ?NQ ?NW ?NX ?.1N= ?N> ?.2N_ - ?.2N` ?Na ?Nb ?Nc ?Nd ?Ne ?.1NF ?NG ?.2Nh ?Ni ?Nj ?Nk ?Nl ?Nm ?Nn ?.1NO - ?.2Np ?.1NQ ?.2Nr ?Ns ?Nt ?.1NU ?NV ?NW ?NX ?.2Ny ?Nz ?.1N[ ?N\ ?.2N} ?.1N^ ?N_ - ?.1N` ?Na ?Nb ?Nc ?Nd ?Ne ?Nf ?Ng ?Nh ?Ni ?Nj ?Nk ?Nl ?Nm ?Nn ?No - ?.1Np ?Nq ?Nr ?Ns ?Nt ?Nu ?Nv ?Nw ?Nx ?Ny ?Nz ?N{ ?N| ?N} ?N~ ?.2Nf ] + ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,2.(B ?,2/(B + ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B + ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B + ?,10(B ?,11(B ?,12(B ?,2^(B ?,2=(B ?,15(B ?,16(B ?,17(B ?,18(B ?,2q(B ?,2Q(B ?,2W(B ?,2X(B ?,1=(B ?,1>(B ?,2_(B + ?,2`(B ?,2a(B ?,2b(B ?,2c(B ?,2d(B ?,2e(B ?,1F(B ?,1G(B ?,2h(B ?,2i(B ?,2j(B ?,2k(B ?,2l(B ?,2m(B ?,2n(B ?,1O(B + ?,2p(B ?,1Q(B ?,2r(B ?,2s(B ?,2t(B ?,1U(B ?,1V(B ?,1W(B ?,1X(B ?,2y(B ?,2z(B ?,1[(B ?,1\(B ?,2}(B ?,1^(B ?,1_(B + ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1e(B ?,1f(B ?,1g(B ?,1h(B ?,1i(B ?,1j(B ?,1k(B ?,1l(B ?,1m(B ?,1n(B ?,1o(B + ?,1p(B ?,1q(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B ?,1v(B ?,1w(B ?,1x(B ?,1y(B ?,1z(B ?,1{(B ?,1|(B ?,1}(B ?,1~(B ?,2f(B ] "Vietnamese VISCII decoding table.") (defvar viet-viscii-encode-table @@ -58,7 +58,7 @@ char-component) (while (< i 256) (setq char-component - (split-char-or-char-int (aref viet-viscii-decode-table i))) + (split-char (aref viet-viscii-decode-table i))) (cond ((eq (car char-component) 'vietnamese-viscii-lower) (aset table-lower (nth 1 char-component) i)) ((eq (car char-component) 'vietnamese-viscii-upper) @@ -71,22 +71,22 @@ Both tables are indexed by the position code of Vietnamese characters.") (defvar viet-vscii-decode-table [;; VSCII is a full 8-bit code. - 0 ?.2Nz ?Nx 3 ?NW ?NX ?Nf 7 8 9 10 11 12 13 14 15 - 16 ?.2NQ ?N_ ?NO ?NV ?N[ ?N} ?N\ 24 25 26 27 28 29 30 31 + 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15 + 16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?.2N` ?Nd ?Nc ?Na ?NU ?N# ?N' ?Nh ?Nk ?N( ?Ni ?N) ?N. ?Nl ?No ?Nn - ?.2Nm ?N8 ?Nr ?Nv ?Nu ?Ns ?Nw ?N5 ?N6 ?N7 ?N^ ?N> ?N~ ?Ny ?N| ?N{ - 160 ?.2Ne ?Nb ?Nj ?Nt ?N= ?N_ ?Np ?.1Ne ?Nb ?Nj ?Nt ?N> ?Ny ?Np ?.2N" - 192 193 194 195 196 ?.1N` ?Nd ?Nc ?Na ?NU ?.2NF ?.1N" ?NF ?NG ?N! ?.2NG - ?.2N! ?N% ?N& ?Ng ?N% ?N+ ?.1N# ?N% ?N& ?Ng ?N$ ?N' ?Nh ?.2N, ?.1Nk ?N( - ?.1Ni ?N) ?N+ ?N, ?N- ?N* ?N. ?Nl ?No ?.2N- ?N* ?N0 ?.1Nn ?Nm ?N8 ?Nr - ?.2N1 ?.1Nv ?Nu ?Ns ?Nw ?N0 ?N1 ?N2 ?N/ ?N5 ?N6 ?N7 ?N^ ?N> ?N~ ?Ny - ?.2N2 ?.1N| ?N{ ?Nz ?Nx ?NW ?NX ?Nf ?NQ ?Nq ?NO ?NV ?N[ ?N} ?N\ ?.2N/] + ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B + ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B + 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1>(B ?,1y(B ?,1p(B ?,2"(B + 192 193 194 195 196 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B + ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2%(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B + ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B + ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B + ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B] "Vietnamese VSCII decoding table.") (defvar viet-vscii-encode-table @@ -96,7 +96,7 @@ Both tables are indexed by the position code of Vietnamese characters.") char-component) (while (< i 256) (setq char-component - (split-char-or-char-int (aref viet-vscii-decode-table i))) + (split-char (aref viet-vscii-decode-table i))) (cond ((eq (car char-component) 'vietnamese-viscii-lower) (aset table-lower (nth 1 char-component) i)) ((eq (car char-component) 'vietnamese-viscii-upper) @@ -186,7 +186,7 @@ Both tables are indexed by the position code of Vietnamese characters.") (;; Vietnamese upper (read r0) (r0 -= 128) - (write-read-repeat r0 ,(cdr viet-viscii-encode-table))) + (write-read-repeat r0 ,(cdr viet-vscii-encode-table))) ;; not Vietnamese (write-read-repeat r0)))))))) "CCL program to encode VSCII-1.") @@ -210,10 +210,16 @@ Both tables are indexed by the position code of Vietnamese characters.") decode ,ccl-decode-viscii encode ,ccl-encode-viscii)) +;; it is not correct, but XEmacs doesn't have `ccl' category... +(coding-system-put 'viscii 'category 'iso-8-1) + ;; (make-coding-system ;; 'vietnamese-viscii 4 ?V ;; "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)" -;; (cons ccl-decode-viscii ccl-encode-viscii)) +;; '(ccl-decode-viscii . ccl-encode-viscii) +;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) +;; (mime-charset . viscii) +;; (valid-codes (0 . 255)))) ;; (define-coding-system-alias 'viscii 'vietnamese-viscii) @@ -227,7 +233,9 @@ Both tables are indexed by the position code of Vietnamese characters.") ;; (make-coding-system ;; 'vietnamese-vscii 4 ?v ;; "8-bit encoding for Vietnamese VSCII-1" -;; (cons ccl-decode-vscii ccl-encode-vscii)) +;; '(ccl-decode-vscii . ccl-encode-vscii) +;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) +;; (valid-codes (0 . 255)))) ;; (define-coding-system-alias 'vscii 'vietnamese-vscii) @@ -242,9 +250,13 @@ Both tables are indexed by the position code of Vietnamese characters.") ;; (make-coding-system ;; 'vietnamese-viqr 0 ?q ;; "Vietnamese latin transcription (VIQR)" -;; nil) -;; (put 'vietnamese-viqr 'post-read-conversion 'viqr-post-read-conversion) -;; (put 'vietnamese-viqr 'pre-write-conversion 'viqr-pre-write-conversion) +;; nil +;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) +;; (post-read-conversion . viqr-post-read-conversion) +;; (pre-write-conversion . viqr-pre-write-conversion) +;; (charset-origin-alist +;; (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char) +;; (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char)))) ;; (define-coding-system-alias 'viqr 'vietnamese-viqr) @@ -263,15 +275,22 @@ Both tables are indexed by the position code of Vietnamese characters.") ;; (setq font-ccl-encoder-alist ;; (cons (cons "vscii" ccl-encode-vscii-font) font-ccl-encoder-alist)) +;; (defvar viet-viscii-nonascii-translation-table +;; (make-translation-table-from-vector viet-viscii-decode-table) +;; "Value of `nonascii-translation-table' in Vietnamese language environment.") + (set-language-info-alist - "Vietnamese" '((setup-function . setup-vietnamese-environment) - (charset . (vietnamese-viscii-lower - vietnamese-viscii-upper)) - (coding-system . (viscii vscii viqr)) - (sample-text . "Vietnamese (Ti.1N*ng ViN.t) ChN`o bNUn") + "Vietnamese" '((charset vietnamese-viscii-lower vietnamese-viscii-upper) + (coding-system viscii vscii viqr) + (coding-priority viscii) + (input-method . "vietnamese-viqr") + (features viet-util) + (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn") (documentation . "\ For Vietnamese, Emacs uses special charasets internally. -They can be decoded from and encoded to VISCC, VSCII, and VIQR.") +They can be decoded from and encoded to VISCC, VSCII, and VIQR. +Current setting put higher priority to the coding system VISCII than VSCII. +If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)") )) ;;; vietnamese.el ends here diff --git a/lisp/packages.el b/lisp/packages.el index eb3b4a7..03d001b 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -55,7 +55,7 @@ ;;; Package versioning (defvar packages-package-list nil - "database of loaded packages and version numbers") + "Database of loaded packages and version numbers") (defvar packages-hierarchy-depth 1 "Depth of package hierarchies.") @@ -86,13 +86,14 @@ (defvar package-locations (list - (list (paths-construct-path '("~" ".xemacs")) + (list (paths-construct-path '("~" ".xemacs" "mule-packages")) + 'early #'(lambda () (featurep 'mule))) + (list (paths-construct-path '("~" ".xemacs" "xemacs-packages")) 'early #'(lambda () t)) (list "site-packages" 'late #'(lambda () t)) (list "infodock-packages" 'late #'(lambda () (featurep 'infodock))) (list "mule-packages" 'late #'(lambda () (featurep 'mule))) - (list "xemacs-packages" 'late #'(lambda () t)) - (list "packages" 'late #'(lambda () t))) + (list "xemacs-packages" 'late #'(lambda () t))) "Locations of the various package directories. This is a list each of whose elements describes one directory. A directory description is a three-element list. @@ -122,9 +123,8 @@ the directory to be ignored.") (let ((info (if (and attributes (floatp (car attributes))) (list :version (car attributes)) attributes))) - (remassq name packages-package-list) (setq packages-package-list - (cons (cons name info) packages-package-list)))) + (cons (cons name info) (remassq name packages-package-list))))) (defun package-require (name version) (let ((pkg (assq name packages-package-list))) @@ -452,7 +452,7 @@ PACKAGES is a list of package directories. SUFFIXES is a list of names of package subdirectories to look for." (let ((directories (apply - #'append + #'nconc (mapcar #'(lambda (package) (mapcar #'(lambda (suffix) (file-name-as-directory (concat package suffix))) diff --git a/lisp/rect.el b/lisp/rect.el index 5b78d6b..737e1d3 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -1,8 +1,8 @@ ;;; rect.el --- rectangle functions for XEmacs. -;; Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1993, 1994, 1999 Free Software Foundation, Inc. -;; Maintainer: FSF +;; Maintainer: Didier Verna ;; Keywords: internal ;; This file is part of XEmacs. @@ -22,15 +22,25 @@ ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;; 02111-1307, USA. -;;; Synched up with: FSF 19.34. +;;; Synched up with: to be incorporated in a forthcoming GNU Emacs ;;; Commentary: ;; This package provides the operations on rectangles that are ocumented ;; in the XEmacs Reference Manual. +;; ### NOTE: this file has been almost completely rewritten by Didier Verna +;; , Jul 99. The purpose of this rewrite is to be less +;; intrusive and fill lines with whitespaces only when needed. A few functions +;; are untouched though, as noted above their definition. + + ;;; Code: +;; ### NOTE: this function is untouched, but not used anymore. +;; `apply-on-rectangle' is used instead. It's still there because it's +;; documented so people might use it in their code, so I've decided not to +;; touch it. --dv ;; XEmacs: extra-args (defun operate-on-rectangle (function start end coerce-tabs &rest extra-args) "Call FUNCTION for each line of rectangle with corners at START, END. @@ -44,15 +54,15 @@ FUNCTION is called with three arguments: Point is at the end of the segment of this line within the rectangle." (let (startcol startlinepos endcol endlinepos) (save-excursion - (goto-char start) - (setq startcol (current-column)) - (beginning-of-line) - (setq startlinepos (point))) + (goto-char start) + (setq startcol (current-column)) + (beginning-of-line) + (setq startlinepos (point))) (save-excursion - (goto-char end) - (setq endcol (current-column)) - (forward-line 1) - (setq endlinepos (point-marker))) + (goto-char end) + (setq endcol (current-column)) + (forward-line 1) + (setq endlinepos (point-marker))) (if (< endcol startcol) ;; XEmacs (let ((tem startcol)) @@ -74,36 +84,46 @@ Point is at the end of the segment of this line within the rectangle." (forward-line 1))) (- endcol startcol))) -(defun delete-rectangle-line (startdelpos ignore ignore) - (delete-region startdelpos (point))) - -;; XEmacs: added lines arg -(defun delete-extract-rectangle-line (startdelpos begextra endextra lines) - (save-excursion - (extract-rectangle-line startdelpos begextra endextra lines)) - (delete-region startdelpos (point))) +;; The replacement for `operate-on-rectangle' -- dv +(defun apply-on-rectangle (function start end &rest args) + "Call FUNCTION for each line of rectangle with corners at START, END. +FUNCTION is called with two arguments: the start and end columns of the +rectangle, plus ARGS extra arguments. Point is at the beginning of line when +the function is called." + (let (startcol startpt endcol endpt) + (save-excursion + (goto-char start) + (setq startcol (current-column)) + (beginning-of-line) + (setq startpt (point)) + (goto-char end) + (setq endcol (current-column)) + (forward-line 1) + (setq endpt (point-marker)) + ;; ensure the start column is the left one. + (if (< endcol startcol) + (let ((col startcol)) + (setq startcol endcol endcol col))) + ;; start looping over lines + (goto-char startpt) + (while (< (point) endpt) + (apply function startcol endcol args) + (forward-line 1))) + )) -;; XEmacs: added lines arg -(defun extract-rectangle-line (startdelpos begextra endextra lines) - (let ((line (buffer-substring startdelpos (point))) - (end (point))) - (goto-char startdelpos) - (while (search-forward "\t" end t) - (let ((width (- (current-column) - (save-excursion (forward-char -1) - (current-column))))) - (setq line (concat (substring line 0 (- (point) end 1)) - (spaces-string width) - (substring line (+ (length line) (- (point) end))))))) - (if (or (> begextra 0) (> endextra 0)) - (setq line (concat (spaces-string begextra) - line - (spaces-string endextra)))) - (setcdr lines (cons line (cdr lines))))) ; XEmacs +;; I love ascii art ;-) +(defconst spaces-strings '["" + " " + " " + " " + " " + " " + " " + " " + " "]) -(defconst spaces-strings - (purecopy '["" " " " " " " " " " " " " " " " "])) +;; This function is untouched --dv (defun spaces-string (n) (if (<= n 8) (aref spaces-strings n) (let ((val "")) @@ -111,55 +131,119 @@ Point is at the end of the segment of this line within the rectangle." (setq val (concat " " val) n (- n 8))) (concat val (aref spaces-strings n))))) - + ;;;###autoload -(defun delete-rectangle (start end) - "Delete (don't save) text in rectangle with point and mark as corners. -The same range of columns is deleted in each line starting with the line -where the region begins and ending with the line where the region ends." - (interactive "r") - (operate-on-rectangle 'delete-rectangle-line start end t)) +(defvar killed-rectangle nil + "Rectangle for yank-rectangle to insert.") ;;;###autoload -(defun delete-extract-rectangle (start end) - "Delete contents of rectangle and return it as a list of strings. -Arguments START and END are the corners of the rectangle. -The value is list of strings, one for each line of the rectangle." - (let ((lines (list nil))) ; XEmacs change - (operate-on-rectangle 'delete-extract-rectangle-line - start end t lines) - (nreverse (cdr lines)))) +(defun kill-rectangle (start end &optional fill) + "Delete the rectangle with corners at point and mark (START and END when +called from a program) and save it as the last killed one. You might prefer to +use `delete-extract-rectangle' from a program. + +With a prefix (or a FILL) argument, also fill lines where nothing has to be +deleted." + (interactive "r\nP") + (when buffer-read-only + (setq killed-rectangle (extract-rectangle start end)) + (barf-if-buffer-read-only)) + (setq killed-rectangle (delete-extract-rectangle start end fill))) ;;;###autoload -(defun extract-rectangle (start end) - "Return contents of rectangle with corners at START and END. -Value is list of strings, one for each line of the rectangle." - (let ((lines (list nil))) ; XEmacs change - (operate-on-rectangle 'extract-rectangle-line start end nil lines) - (nreverse (cdr lines)))) +(defun delete-rectangle (start end &optional fill) + "Delete (don't save) text in rectangle with corners at point and mark (START +and END when called from a program). The same range of columns is deleted in +each line starting with the line where the region begins and ending with the +line where the region ends. + +With a prefix (or a FILL) argument, also fill lines where nothing has to be +deleted." + (interactive "r\nP") + (apply-on-rectangle 'delete-rectangle-line start end fill)) + +(defun delete-rectangle-line (startcol endcol fill) + (let ((pt (point-at-eol))) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (if (and (not fill) (<= pt endcol)) + (delete-region (point) pt) + ;; else + (setq pt (point)) + (move-to-column endcol t) + (delete-region pt (point)))) + )) ;;;###autoload -(defvar killed-rectangle nil - "Rectangle for yank-rectangle to insert.") +(defun delete-extract-rectangle (start end &optional fill) + "Delete the contents of the rectangle with corners at START and END, and +return it as a list of strings, one for each line of the rectangle. + +With an optional FILL argument, also fill lines where nothing has to be +deleted." + (let ((lines (list nil))) + (apply-on-rectangle 'delete-extract-rectangle-line start end lines fill) + (nreverse (cdr lines)))) + +(defun delete-extract-rectangle-line (startcol endcol lines fill) + (let ((pt (point-at-eol))) + (if (< (move-to-column startcol (or fill 'coerce)) startcol) + (setcdr lines (cons (spaces-string (- endcol startcol)) + (cdr lines))) + ;; else + (setq pt (point)) + (move-to-column endcol t) + (setcdr lines (cons (buffer-substring pt (point)) (cdr lines))) + (delete-region pt (point))) + )) ;;;###autoload -(defun kill-rectangle (start end) - "Delete rectangle with corners at point and mark; save as last killed one. -Calling from program, supply two args START and END, buffer positions. -But in programs you might prefer to use `delete-extract-rectangle'." - (interactive "r") - (if buffer-read-only - (progn - (setq killed-rectangle (extract-rectangle start end)) - (barf-if-buffer-read-only))) - (setq killed-rectangle (delete-extract-rectangle start end))) +(defun extract-rectangle (start end) + "Return the contents of the rectangle with corners at START and END, +as a list of strings, one for each line of the rectangle." + (let ((lines (list nil))) + (apply-on-rectangle 'extract-rectangle-line start end lines) + (nreverse (cdr lines)))) + +;; ### NOTE: this is actually the only function that needs to do complicated +;; stuff like what's happening in `operate-on-rectangle', because the buffer +;; might be read-only. --dv +(defun extract-rectangle-line (startcol endcol lines) + (let (start end begextra endextra line) + (move-to-column startcol) + (setq start (point) + begextra (- (current-column) startcol)) + (move-to-column endcol) + (setq end (point) + endextra (- endcol (current-column))) + (setq line (buffer-substring start (point))) + (if (< begextra 0) + (setq endextra (+ endextra begextra) + begextra 0)) + (if (< endextra 0) + (setq endextra 0)) + (goto-char start) + (while (search-forward "\t" end t) + (let ((width (- (current-column) + (save-excursion (forward-char -1) + (current-column))))) + (setq line (concat (substring line 0 (- (point) end 1)) + (spaces-string width) + (substring line (+ (length line) + (- (point) end))))))) + (if (or (> begextra 0) (> endextra 0)) + (setq line (concat (spaces-string begextra) + line + (spaces-string endextra)))) + (setcdr lines (cons line (cdr lines))))) +;; This function is untouched --dv ;;;###autoload (defun yank-rectangle () "Yank the last killed rectangle with upper left corner at point." (interactive) (insert-rectangle killed-rectangle)) +;; This function is untouched --dv ;;;###autoload (defun insert-rectangle (rectangle) "Insert text of RECTANGLE with upper left corner at point. @@ -175,81 +259,72 @@ and point is at the lower right corner." (while lines (or first (progn - (forward-line 1) - (or (bolp) (insert ?\n)) - (move-to-column insertcolumn t))) + (forward-line 1) + (or (bolp) (insert ?\n)) + (move-to-column insertcolumn t))) (setq first nil) (insert (car lines)) (setq lines (cdr lines))))) ;;;###autoload -(defun open-rectangle (start end) - "Blank out rectangle with corners at point and mark, shifting text right. -The text previously in the region is not overwritten by the blanks, -but instead winds up to the right of the rectangle." - (interactive "r") - (operate-on-rectangle 'open-rectangle-line start end nil) +(defun open-rectangle (start end &optional fill) + "Blank out rectangle with corners at point and mark (START and END when +called from a program), shifting text right. The text previously in the region +is not overwritten by the blanks, but instead winds up to the right of the +rectangle. + +With a prefix (or a FILL) argument, fill with blanks even if there is no text +on the right side of the rectangle." + (interactive "r\nP") + (apply-on-rectangle 'open-rectangle-line start end fill) (goto-char start)) -(defun open-rectangle-line (startpos begextra endextra) - ;; Column where rectangle ends. - (let ((endcol (+ (current-column) endextra)) - whitewidth) - (goto-char startpos) - ;; Column where rectangle begins. - (let ((begcol (- (current-column) begextra))) - (skip-chars-forward " \t") - ;; Width of whitespace to be deleted and recreated. - (setq whitewidth (- (current-column) begcol))) - ;; Delete the whitespace following the start column. - (delete-region startpos (point)) - ;; Open the desired width, plus same amount of whitespace we just deleted. - (indent-to (+ endcol whitewidth)))) +(defun open-rectangle-line (startcol endcol fill) + (let (spaces) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (unless (and (not fill) + (= (point) (point-at-eol))) + (indent-to endcol))) + )) ;;;###autoload (defun string-rectangle (start end string) - "Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. -This command does not delete or overwrite any existing text. - -Called from a program, takes three args; START, END and STRING." + "Insert STRING on each line of the rectangle with corners at point and mark +(START and END when called from a program), shifting text right. The left edge +of the rectangle specifies the column for insertion. This command does not +delete or overwrite any existing text." (interactive "r\nsString rectangle: ") - (operate-on-rectangle 'string-rectangle-line start end t string)) ; XEmacs - -;; XEmacs: add string arg -(defun string-rectangle-line (startpos begextra endextra string) - (let (whitespace) - (goto-char startpos) - ;; Compute horizontal width of following whitespace. - (let ((ocol (current-column))) - (skip-chars-forward " \t") - (setq whitespace (- (current-column) ocol))) - ;; Delete the following whitespace. - (delete-region startpos (point)) - ;; Insert the desired string. - (insert string) - ;; Insert the same width of whitespace that we had before. - (indent-to (+ (current-column) whitespace)))) + (apply-on-rectangle 'string-rectangle-line start end string)) + +(defun string-rectangle-line (startcol endcol string) + (move-to-column startcol t) + (insert string)) ;;;###autoload -(defun clear-rectangle (start end) - "Blank out rectangle with corners at point and mark. -The text previously in the region is overwritten by the blanks. -When called from a program, requires two args which specify the corners." - (interactive "r") - (operate-on-rectangle 'clear-rectangle-line start end t)) - -(defun clear-rectangle-line (startpos begextra endextra) - ;; Find end of whitespace after the rectangle. - (skip-chars-forward " \t") - (let ((column (+ (current-column) endextra))) - ;; Delete the text in the rectangle, and following whitespace. - (delete-region (point) - (progn (goto-char startpos) - (skip-chars-backward " \t") - (point))) - ;; Reindent out to same column that we were at. - (indent-to column))) +(defun clear-rectangle (start end &optional fill) + "Blank out the rectangle with corners at point and mark (START and END when +called from a program). The text previously in the region is overwritten with +blanks. + +With a prefix (or a FILL) argument, also fill with blanks the parts of the +rectangle which were empty." + (interactive "r\nP") + (apply-on-rectangle 'clear-rectangle-line start end fill)) + +(defun clear-rectangle-line (startcol endcol fill) + (let ((pt (point-at-eol)) + spaces) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (if (and (not fill) + (<= (save-excursion (goto-char pt) (current-column)) endcol)) + (delete-region (point) pt) + ;; else + (setq pt (point)) + (move-to-column endcol t) + (setq spaces (- (point) pt)) + (delete-region pt (point)) + (indent-to (+ (current-column) spaces)))) + )) (provide 'rect) diff --git a/lisp/select.el b/lisp/select.el index 338ea0c..f21d440 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -40,7 +40,7 @@ COMPOUND_TEXT and STRING are the most commonly used data types. If a list is provided, the types are tried in sequence until there is a successful conversion.") -(defvar selection-is-clipboard-p nil +(defvar selection-sets-clipboard nil "Controls the selection's relationship to the clipboard. When non-nil, any operation that sets the primary selection will also set the clipboard.") @@ -75,21 +75,18 @@ set the clipboard.") "Return the value of one of the cut buffers. This will do nothing under anything other than X.") -(defun get-selection (&optional type data-type) +(defun get-selection-no-error (&optional type data-type) "Return the value of a Windows selection. 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. If there is no selection an error is signalled." - (let ((text (get-selection-no-error type data-type))) - (when (not (stringp text)) - (error "Selection is not a string: %S" text)) - text)) +says how to convert the data. Returns NIL if there is no selection" + (condition-case err (get-selection type data-type) (t nil))) -(defun get-selection-no-error (&optional type data-type) +(defun get-selection (&optional type data-type) "Return the value of a Windows selection. 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" +says how to convert the data. If there is no selection an error is signalled." (or type (setq type 'PRIMARY)) (or data-type (setq data-type selected-text-type)) (let ((text @@ -103,6 +100,8 @@ says how to convert the data. Returns NIL if there is no selection" (get-selection-internal type data-type)))) (when (and (consp text) (symbolp (car text))) (setq text (cdr text))) + (when (not (stringp text)) + (error "Selection is not a string: %S" text)) text)) ;; FSFmacs calls this `x-set-selection', and reverses the @@ -144,7 +143,7 @@ Interactively, the text of the region is used as the selection value." (disown-selection-internal type) (own-selection-internal type data) (when (and (eq type 'PRIMARY) - selection-is-clipboard-p) + selection-sets-clipboard) (own-selection-internal 'CLIPBOARD data))) (cond ((eq type 'PRIMARY) (setq primary-selection-extent diff --git a/lisp/simple.el b/lisp/simple.el index 74daf55..cbba11c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2592,7 +2592,8 @@ indicating whether soft newlines should be inserted.") bounce ;; 97/3/14 jhod: Kinsoku (re-break-point (if (featurep 'mule) - (concat "[ \t\n]\\|" word-across-newline) + (concat "[ \t\n]\\|" word-across-newline + ".\\|." word-across-newline) "[ \t\n]")) ;; end patch (first t)) @@ -2889,6 +2890,7 @@ unless optional argument SOFT is non-nil." (if (and comcol (not fill-prefix)) ; XEmacs - (ENE) from fa-extras. (let ((comment-column comcol) (comment-start comstart) + (block-comment-start comstart) (comment-end comment-end)) (and comment-end (not (equal comment-end "")) ; (if (not comment-multi-line) diff --git a/lisp/subr.el b/lisp/subr.el index 94a6071..4c3977a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -334,7 +334,7 @@ it as a string." (erase-buffer)))) (defmacro with-current-buffer (buffer &rest body) - "Execute the forms in BODY with BUFFER as the current buffer. + "Temporarily make BUFFER the current buffer and execute the forms in BODY. The value returned is the value of the last form in BODY. See also `with-temp-buffer'." `(save-current-buffer @@ -682,16 +682,6 @@ FILE should be the name of a library, with no directory name." (eval-after-load file (read))) (make-compatible 'eval-next-after-load "") -(unless (featurep 'mule) - (defun make-char (charset &optional arg1 arg2) - "Make a character from CHARSET and octets ARG1 and ARG2. -This function is available for compatibility with Mule-enabled XEmacsen. -When CHARSET is `ascii', return (int-char ARG1). Otherwise, return -that value with the high bit set. ARG2 is always ignored." - (int-char (if (eq charset 'ascii) - arg1 - (logior arg1 #x80))))) - ; alternate names (not obsolete) (if (not (fboundp 'mod)) (define-function 'mod '%)) (define-function 'move-marker 'set-marker) diff --git a/lisp/toolbar.el b/lisp/toolbar.el index 18a0e44..5c80dda 100644 --- a/lisp/toolbar.el +++ b/lisp/toolbar.el @@ -54,7 +54,7 @@ customized through the options menu." (defcustom default-toolbar-position ;; added for the options menu - dverna (default-toolbar-position) - "The location of the default toolbar. It can be 'top, 'bootom, 'left or + "The location of the default toolbar. It can be 'top, 'bottom, 'left or 'right. This option can be customized through the options menu." :group 'display :type '(choice (const :tag "top" 'top) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index c01d457..a21f19c 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -49,7 +49,7 @@ :group 'hypermedia) (defgroup widget-documentation nil - "Options controling the display of documentation strings." + "Options controlling the display of documentation strings." :group 'widgets) (defgroup widget-faces nil diff --git a/lisp/x-win-sun.el b/lisp/x-win-sun.el index b59dd82..273a862 100644 --- a/lisp/x-win-sun.el +++ b/lisp/x-win-sun.el @@ -246,8 +246,10 @@ to more mnemonic ones,like `kp-3'." ;;; themselves are in x-win.el in case someone wants to use them when ;;; not running on a Sun display.) - (define-key global-map 'find 'ow-find) - (define-key global-map '(shift find) 'ow-find-backward) + (or (lookup-key global-map 'find) + (define-key global-map 'find 'ow-find)) + (or (lookup-key global-map '(shift find)) + (define-key global-map '(shift find) 'ow-find-backward)) ) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 9542e54..9761ceb 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,42 @@ +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-05 Didier Verna + + * lwlib-Xm.c (xm_update_one_widget): add missing #ifdefs around + call to xm_update_label. + +1999-06-28 Andy Piper + + * lwlib-Xm.c: unconditionally enable text field & list code. + (make_progress): new function. creates a slider. + (make_text_field): new function. creates an edit field. + (make_combo_box): new function. creates a combo box. + (xm_creation_table): add new widget functions. + +1999-06-25 Andy Piper + + * lwlib.h (_widget_value): add arglist slots. + declare new functions. + + * lwlib.c (free_widget_value_contents): handle arglists when + freeing. + (lw_add_value_args_to_args): new function. add arglist entries + from a widget_value structure. + + * lwlib-Xm.c (make_button): new function, create a motif button + for display in a buffer as a glyph. + (xm_creation_table): add make_button. + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 80c7b13..48bb2de 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -4,13 +4,13 @@ This file is part of the Lucid Widget Library. -The Lucid Widget Library is free software; you can redistribute it and/or +The Lucid Widget Library 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. The Lucid Widget Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +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. @@ -60,15 +60,17 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include +#if XmVERSION > 1 +#include +#endif #ifdef LWLIB_MENUBARS_MOTIF static void xm_pull_down_callback (Widget, XtPointer, XtPointer); -#if 0 -static void xm_pop_down_callback (Widget, XtPointer, XtPointer); -#endif /* 0 */ #endif static void xm_internal_update_other_instances (Widget, XtPointer, XtPointer); +static void xm_pop_down_callback (Widget, XtPointer, XtPointer); static void xm_generic_callback (Widget, XtPointer, XtPointer); #ifdef LWLIB_DIALOGS_MOTIF static void xm_nosel_callback (Widget, XtPointer, XtPointer); @@ -84,7 +86,7 @@ xm_update_menu (widget_instance* instance, Widget widget, widget_value* val, #endif /* Structures to keep destroyed instances */ -typedef struct _destroyed_instance +typedef struct _destroyed_instance { char* name; char* type; @@ -124,7 +126,7 @@ make_destroyed_instance (char* name, char* type, Widget widget, Widget parent, instance->next = NULL; return instance; } - + static void free_destroyed_instance (destroyed_instance* instance) { @@ -143,7 +145,7 @@ first_child (Widget widget) Boolean lw_motif_widget_p (Widget widget) { - return + return #ifdef LWLIB_DIALOGS_MOTIF XtClass (widget) == xmDialogShellWidgetClass || #endif @@ -155,7 +157,7 @@ resource_string (Widget widget, char *name) { XtResource resource; char *result = NULL; - + resource.resource_name = "labelString"; resource.resource_class = "LabelString"; /* #### should be Xmsomething... */ resource.resource_type = XtRString; @@ -181,7 +183,7 @@ destroy_all_children (Widget widget) children = XtCompositeChildren (widget, &number); if (children) { - /* Unmanage all children and destroy them. They will only be + /* Unmanage all children and destroy them. They will only be * really destroyed when we get out of DispatchEvent. */ for (i = 0; i < number; i++) { @@ -283,7 +285,7 @@ xm_update_label (widget_instance* instance, Widget widget, widget_value* val) XtSetArg (al [ac], XmNlabelString, built_string); ac++; XtSetArg (al [ac], XmNlabelType, XmSTRING); ac++; } - + if (val->key) { key_string = XmStringCreateLtoR (val->key, XmSTRING_DEFAULT_CHARSET); @@ -363,7 +365,7 @@ xm_update_cascadebutton (widget_instance* instance, Widget widget, XtRemoveAllCallbacks (widget, XmNcascadingCallback); XtAddCallback (widget, XmNcascadingCallback, xm_pull_down_callback, instance); - } + } } #endif /* LWLIB_MENUBARS_MOTIF */ @@ -459,7 +461,7 @@ make_menu_in_widget (widget_instance* instance, Widget widget, num_children = 0; for (child_index = 0, cur = val; cur; child_index++, cur = cur->next) - { + { ac = 0; button = 0; XtSetArg (al [ac], XmNsensitive, cur->enabled); ac++; @@ -577,7 +579,7 @@ update_one_menu_entry (widget_instance* instance, Widget widget, menu = NULL; XtSetArg (al [0], XmNsubMenuId, &menu); XtGetValues (widget, al, 1); - + contents = val->contents; if (!menu) @@ -658,8 +660,6 @@ xm_update_menu (widget_instance* instance, Widget widget, widget_value* val, #endif /* LWLIB_MENUBARS_MOTIF */ -#ifdef LWLIB_DIALOGS_MOTIF - /* update text widgets */ static void @@ -685,7 +685,6 @@ xm_update_text_field (widget_instance* instance, Widget widget, xm_internal_update_other_instances, instance); } -#endif /* LWLIB_DIALOGS_MOTIF */ #ifdef LWLIB_SCROLLBARS_MOTIF @@ -769,7 +768,7 @@ xm_update_one_widget (widget_instance* instance, Widget widget, { WidgetClass class; Arg al [2]; - + /* Mark as not edited */ val->edited = False; @@ -782,8 +781,8 @@ xm_update_one_widget (widget_instance* instance, Widget widget, /* Common to all label like widgets */ if (XtIsSubclass (widget, xmLabelWidgetClass)) xm_update_label (instance, widget, val); -#endif - +#endif /* defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) */ + class = XtClass (widget); /* Class specific things */ if (class == xmPushButtonWidgetClass || @@ -808,7 +807,7 @@ xm_update_one_widget (widget_instance* instance, Widget widget, XtSetArg (al [0], XmNradioBehavior, &radiobox); XtGetValues (widget, al, 1); - + if (radiobox) xm_update_radiobox (instance, widget, val); #ifdef LWLIB_MENUBARS_MOTIF @@ -816,7 +815,6 @@ xm_update_one_widget (widget_instance* instance, Widget widget, xm_update_menu (instance, widget, val, deep_p); #endif } -#ifdef LWLIB_DIALOGS_MOTIF else if (class == xmTextWidgetClass) { xm_update_text (instance, widget, val); @@ -825,7 +823,6 @@ xm_update_one_widget (widget_instance* instance, Widget widget, { xm_update_text_field (instance, widget, val); } -#endif else if (class == xmListWidgetClass) { xm_update_list (instance, widget, val); @@ -853,7 +850,7 @@ xm_update_one_value (widget_instance* instance, Widget widget, val->call_data = old_wv->call_data; break; } - + if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass) { Arg al [1]; @@ -861,7 +858,6 @@ xm_update_one_value (widget_instance* instance, Widget widget, XtGetValues (widget, al, 1); val->edited = True; } -#ifdef LWLIB_DIALOGS_MOTIF else if (class == xmTextWidgetClass) { if (val->value) @@ -876,7 +872,6 @@ xm_update_one_value (widget_instance* instance, Widget widget, val->value = XmTextFieldGetString (widget); val->edited = True; } -#endif else if (class == xmRowColumnWidgetClass) { Boolean radiobox = 0; @@ -946,7 +941,7 @@ xm_update_one_value (widget_instance* instance, Widget widget, /* This function is for activating a button from a program. It's wrong because we pass a NULL argument in the call_data which is not Motif compatible. This is used from the XmNdefaultAction callback of the List widgets to - have a dble-click put down a dialog box like the button woudl do. + have a double-click put down a dialog box like the button would do. I could not find a way to do that with accelerators. */ static void @@ -996,7 +991,7 @@ Ctrlm: ArmAndActivate()\n"; /* This is a kludge to disable drag-and-drop in dialog boxes. The symptom was a segv down in libXm somewhere if you used the middle button on a dialog box to begin a drag; when you released the button to make a drop - things would lose if you were not over the button where you started the + things would lose if you were not over the button where you started the drag (canceling the operation). This was probably due to the fact that the dialog boxes were not set up to handle a drag but were trying to do so anyway for some reason. @@ -1029,7 +1024,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, Arg al[64]; /* Arg List */ int ac; /* Arg Count */ int i; - + #ifdef DND_KLUDGE XtTranslations dnd_override = XtParseTranslationTable (disable_dnd_trans); # define DO_DND_KLUDGE(widget) XtOverrideTranslations ((widget), dnd_override) @@ -1077,7 +1072,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; row = XmCreateRowColumn (form, "row", al, ac); - + n_children = 0; for (i = 0; i < left_buttons; i++) { @@ -1119,7 +1114,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, al, ac); DO_DND_KLUDGE (children [n_children]); n_children++; - + for (i = 0; i < right_buttons; i++) { char button_name [16]; @@ -1131,9 +1126,9 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, if (! button) button = children [n_children]; n_children++; } - + XtManageChildren (children, n_children); - + ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++; @@ -1232,7 +1227,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, list activate the default button */ XtAddCallback (value, XmNdefaultActionCallback, activate_button, button); } - + ac = 0; XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; @@ -1248,7 +1243,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, XtSetArg(al[ac], XmNrightOffset, 13); ac++; message = XmCreateLabel (form, "message", al, ac); DO_DND_KLUDGE (message); - + if (list) XtManageChild (value); @@ -1263,7 +1258,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, children [i] = icon; i++; children [i] = icon_separator; i++; XtManageChildren (children, i); - + if (text_input_slot || list) { XtInstallAccelerators (value, button); @@ -1274,7 +1269,7 @@ make_dialog (char* name, Widget parent, Boolean pop_up_p, XtInstallAccelerators (form, button); XmProcessTraversal(value, XmTRAVERSE_CURRENT); } - + #ifdef DND_KLUDGE XtFree ((char *) dnd_override); #endif @@ -1353,7 +1348,7 @@ recenter_widget (Widget widget) x = (Position) ((parent_width - child_width) / 2); y = (Position) ((parent_height - child_height) / 2); - + XtTranslateCoords (parent, x, y, &x, &y); if ((Dimension) (x + child_width) > screen_width) @@ -1466,7 +1461,7 @@ xm_create_dialog (widget_instance* instance) shell_name = "Question"; break; } - + total_buttons = name [1] - '0'; if (name [3] == 'T' || name [3] == 't') @@ -1476,9 +1471,9 @@ xm_create_dialog (widget_instance* instance) } else if (name [3]) right_buttons = name [4] - '0'; - + left_buttons = total_buttons - right_buttons; - + widget = make_dialog (name, parent, pop_up_p, shell_name, icon_name, text_input_slot, radio_box, list, left_buttons, right_buttons); @@ -1537,7 +1532,7 @@ make_scrollbar (widget_instance *instance, int vertical) { {xm_scrollbar_callback, NULL}, {NULL, NULL} }; callbacks[0].closure = (XtPointer) instance; - + XtSetArg (al[ac], XmNminimum, 1); ac++; XtSetArg (al[ac], XmNmaximum, INT_MAX); ac++; XtSetArg (al[ac], XmNincrement, 1); ac++; @@ -1571,10 +1566,154 @@ make_horizontal_scrollbar (widget_instance *instance) #endif /* LWLIB_SCROLLBARS_MOTIF */ - /* Table of functions to create widgets */ +/* glyph widgets */ +static Widget +make_button (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget button = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + XtSetArg (al [ac], XmNuserData, val->call_data); ac++; + XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++; + /* The highlight doesn't appear to be dynamically set which makes it + look ugly. I think this may be a LessTif bug but for now we just + get rid of it. */ + XtSetArg (al [ac], XmNhighlightThickness, (Dimension)0);ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + if (!val->call_data) + button = XmCreateLabel (instance->parent, val->name, al, ac); + + else if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE) + { + XtSetArg (al [ac], XmNset, val->selected); ac++; + XtSetArg (al [ac], XmNindicatorType, + (val->type == TOGGLE_TYPE ? + XmN_OF_MANY : XmONE_OF_MANY)); ac++; + XtSetArg (al [ac], XmNvisibleWhenOff, True); ac++; + button = XmCreateToggleButton (instance->parent, val->name, al, ac); + XtRemoveAllCallbacks (button, XmNvalueChangedCallback); + XtAddCallback (button, XmNvalueChangedCallback, xm_generic_callback, + (XtPointer)instance); + } + else + { + button = XmCreatePushButton (instance->parent, val->name, al, ac); + XtAddCallback (button, XmNactivateCallback, xm_generic_callback, + (XtPointer)instance); + } + + XtManageChild (button); + + return button; +} + +static Widget +make_progress (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget scale = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + XtSetArg (al [ac], XmNuserData, val->call_data); ac++; + XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XmNorientation, XmHORIZONTAL); ac++; + /* The highlight doesn't appear to be dynamically set which makes it + look ugly. I think this may be a LessTif bug but for now we just + get rid of it. */ + XtSetArg (al [ac], XmNhighlightThickness, (Dimension)0);ac++; + if (!val->call_data) + XtSetArg (al [ac], XmNsensitive, False); ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + scale = XmCreateScale (instance->parent, val->name, al, ac); + if (val->call_data) + XtAddCallback (scale, XmNvalueChangedCallback, xm_generic_callback, + (XtPointer)instance); + + XtManageChild (scale); + + return scale; +} + +static Widget +make_text_field (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget text = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XmNsensitive, val->enabled && val->call_data); ac++; + XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + XtSetArg (al [ac], XmNuserData, val->call_data); ac++; + XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++; + /* The highlight doesn't appear to be dynamically set which makes it + look ugly. I think this may be a LessTif bug but for now we just + get rid of it. */ + XtSetArg (al [ac], XmNhighlightThickness, (Dimension)0);ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + text = XmCreateTextField (instance->parent, val->name, al, ac); + if (val->call_data) + XtAddCallback (text, XmNvalueChangedCallback, xm_generic_callback, + (XtPointer)instance); + + XtManageChild (text); + + return text; +} + +#if XmVERSION > 1 +static Widget +make_combo_box (widget_instance *instance) +{ + Arg al[20]; + int ac = 0; + Widget combo = 0; + widget_value* val = instance->info->val; + + XtSetArg (al [ac], XmNsensitive, val->enabled); ac++; + XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; + XtSetArg (al [ac], XmNuserData, val->call_data); ac++; + XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++; + /* The highlight doesn't appear to be dynamically set which makes it + look ugly. I think this may be a LessTif bug but for now we just + get rid of it. */ + XtSetArg (al [ac], XmNhighlightThickness, (Dimension)0);ac++; + + /* add any args the user supplied for creation time */ + lw_add_value_args_to_args (val, al, &ac); + + combo = XmCreateComboBox (instance->parent, val->name, al, ac); + if (val->call_data) + XtAddCallback (combo, XmNselectionCallback, xm_generic_callback, + (XtPointer)instance); + + XtManageChild (combo); + + return combo; +} +#endif + + +/* Table of functions to create widgets */ widget_creation_entry -xm_creation_table [] = +xm_creation_table [] = { #ifdef LWLIB_MENUBARS_MOTIF {"menubar", make_menubar}, @@ -1584,6 +1723,12 @@ xm_creation_table [] = {"vertical-scrollbar", make_vertical_scrollbar}, {"horizontal-scrollbar", make_horizontal_scrollbar}, #endif + {"button", make_button}, + {"progress", make_progress}, + {"text-field", make_text_field}, +#if XmVERSION > 1 + {"combo-box", make_combo_box}, +#endif {NULL, NULL} }; @@ -1700,12 +1845,12 @@ xm_pop_instance (widget_instance* instance, Boolean up) if (up) XtManageChild (widget); else - XtUnmanageChild (widget); + XtUnmanageChild (widget); } } -/* motif callback */ +/* motif callback */ enum do_call_type { pre_activate, selection, no_selection, post_activate }; @@ -1755,7 +1900,7 @@ do_call (Widget widget, XtPointer closure, enum do_call_type type) } /* Like lw_internal_update_other_instances except that it does not do - anything if its shell parent is not managed. This is to protect + anything if its shell parent is not managed. This is to protect lw_internal_update_other_instances to dereference freed memory if the widget was ``destroyed'' by caching it in the all_destroyed_instances list */ @@ -1790,11 +1935,17 @@ xm_generic_callback (Widget widget, XtPointer closure, XtPointer call_data) XtSetArg (al [0], XmNset, !check); XtSetValues (widget, al, 1); } -#endif +#endif lw_internal_update_other_instances (widget, closure, call_data); do_call (widget, closure, selection); } +static void +xm_pop_down_callback (Widget widget, XtPointer closure, XtPointer call_data) +{ + do_call (widget, closure, post_activate); +} + #ifdef LWLIB_DIALOGS_MOTIF static void @@ -1823,21 +1974,13 @@ xm_pull_down_callback (Widget widget, XtPointer closure, XtPointer call_data) if (call_data) { /* new behavior for incremental menu construction */ - + } else -#endif +#endif do_call (widget, closure, pre_activate); } -#if 0 -static void -xm_pop_down_callback (Widget widget, XtPointer closure, XtPointer call_data) -{ - do_call (widget, closure, post_activate); -} -#endif /* 0 */ - #endif /* LWLIB_MENUBARS_MOTIF */ #ifdef LWLIB_SCROLLBARS_MOTIF diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 20c160f..dcbc0b2 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -155,6 +155,12 @@ free_widget_value_contents (widget_value *wv) free_widget_value_tree (wv->contents); wv->contents = (widget_value *) 0xDEADBEEF; } + if (wv->args && wv->free_args) + { + free (wv->args); + wv->args = (void *) 0xDEADBEEF; + wv->nargs = 0; + } if (wv->next) { free_widget_value_tree (wv->next); @@ -263,6 +269,13 @@ copy_widget_value_tree (widget_value *val, change_type change) copy->next = copy_widget_value_tree (val->next, change); copy->toolkit_data = NULL; copy->free_toolkit_data = False; + if (val->nargs) + { + copy->args = (ArgList)malloc (sizeof (Arg) * val->nargs); + memcpy (copy->args, val->args, sizeof(Arg) * val->nargs); + copy->nargs = val->nargs; + copy->free_args = True; + } #ifdef NEED_SCROLLBARS copy_scrollbar_values (val, copy); #endif @@ -1300,3 +1313,16 @@ lw_show_busy (Widget w, Boolean busy) } } } + +void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset) +{ + int i; + if (wv->nargs && wv->args) + { + for (i = 0; inargs; i++) + { + addto[i + *offset] = wv->args[i]; + } + *offset += wv->nargs; + } +} diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h index b770831..96dfa56 100644 --- a/lwlib/lwlib.h +++ b/lwlib/lwlib.h @@ -148,9 +148,14 @@ typedef struct _widget_value scrollbar_values *scrollbar_data; /* we resource the widget_value structures; this points to the next - one on the free list if this one has been deallocated. - */ + one on the free list if this one has been deallocated. */ struct _widget_value *free_list; + + /* some things are only possible at creation time. args are applied + to widgets at creation time. */ + ArgList args; + int nargs; + Boolean free_args; } widget_value; @@ -201,6 +206,7 @@ widget_value* lw_get_all_values (LWLIB_ID id); Boolean lw_get_some_values (LWLIB_ID id, widget_value* val); void lw_pop_up_all_widgets (LWLIB_ID id); void lw_pop_down_all_widgets (LWLIB_ID id); +void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset); widget_value *malloc_widget_value (void); void free_widget_value (widget_value *); diff --git a/man/ChangeLog b/man/ChangeLog index b1e0f36..b0157a5 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,30 @@ +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-10 Adrian Aichner + + * emodules.texi: Use @set emacs and @value{emacs} instead of + @macro (unsupported by texinfo package). Remove stray @code. + * custom.texi: Add info extension to @setfilename. + * texinfo.texi: Ditto. + * widget.texi: Ditto. + * packages.texi: Reword a sentence, fixing @item Decide where to + install ... + +1999-07-19 Didier Verna + + * custom.texi (Wishlist): removed the Custom Comments wishlist + entry. They are implemented. + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released @@ -213,7 +240,7 @@ 1998-09-03 Darryl Okahata * xemacs/packages.texi: Correct and update package documentation. - Updated the package installation section to mention the visual + Updated the package installation section to mention the visual package browser/installer. 1998-08-31 Hrvoje Niksic @@ -235,7 +262,7 @@ * xemacs/startup.texi: Small fixes, suggested by Hrvoje. - * xemacs/xemacs.texi: + * xemacs/xemacs.texi: * xemacs/packages.texi: More packages documentation. 1998-07-19 SL Baur @@ -302,15 +329,15 @@ 1998-06-20 Michael Sperber [Mr. Preprocessor] - * xemacs/abbrevs.texi: - * xemacs/basic.texi: - * xemacs/buildings.texi: - * xemacs/cmdargs.texi: - * xemacs/files.texi: + * xemacs/abbrevs.texi: + * xemacs/basic.texi: + * xemacs/buildings.texi: + * xemacs/cmdargs.texi: + * xemacs/files.texi: * xemacs/adjustments.texi: Adjustments to integrate startup.texi and packages.texi stuff. - * xemacs/startup.texi: + * xemacs/startup.texi: * xemacs/packages.texi: Created. 1998-06-10 Adrian Aichner @@ -326,12 +353,12 @@ 1998-06-13 Greg Klanderman - * lispref/windows.texi (Resizing Windows): document third optional + * lispref/windows.texi (Resizing Windows): document third optional WINDOW argument to enlarge-window and shrink-window. (Selecting Windows): document select-window optional norecord - argument. + argument. (Size of Window): document window-text-area-pixel-height and - window-text-area-pixel-width. + window-text-area-pixel-width. (Size of Window): document window-displayed-text-pixel-height. (Position of Window): document window-text-area-pixel-edges. @@ -422,7 +449,7 @@ 1998-05-13 Greg Klanderman * lispref/frames.texi (Input Focus): cleanup select-frame - documentation. + documentation. 1998-05-10 Oliver Graf @@ -438,7 +465,7 @@ 1998-05-04 Martin Buchholz - * internals.texi (Techniques for XEmacs Developers): Add some more + * internals.texi (Techniques for XEmacs Developers): Add some more comments on adding new files, inspired by Olivier Galibert. 1998-05-02 Hrvoje Niksic @@ -446,7 +473,7 @@ * lispref/windows.texi (Vertical Scrolling): Fixup docstring for scroll-conservatively. - * lispref/loading.texi (Named Features): Document advanced args to + * lispref/loading.texi (Named Features): Document advanced args to `feature'. * lispref/files.texi (File Name Expansion): Document that @@ -462,7 +489,7 @@ * lispref/os.texi (Time Conversion): Document that TIME may be omitted from format-time-string. - * lispref/strings.texi (String Conversion): Document BASE argument + * lispref/strings.texi (String Conversion): Document BASE argument to `string-to-number'. * lispref/searching.texi (Syntax of Regexps): Fix up Perl @@ -478,7 +505,7 @@ stuff, including `display-message', `lmessage', `clear-message', (Warnings): Document warning stuff. - * lispref/commands.texi (Working With Events): Update `make-event' + * lispref/commands.texi (Working With Events): Update `make-event' for misc-user events. (Using Interactive): Document `function-interactive'. @@ -492,7 +519,7 @@ 1998-05-02 Hrvoje Niksic - * lispref/numbers.texi (Comparison of Numbers): Document multi-arg + * lispref/numbers.texi (Comparison of Numbers): Document multi-arg comparison functions. 1998-04-30 Greg Klanderman @@ -538,7 +565,7 @@ setting of x-emacs-application-class. * lispref/x-windows.texi (Resources): update doc for - x-emacs-application-class. + x-emacs-application-class. 1998-02-20 Karl M. Hegbloom @@ -907,4 +934,3 @@ Mon May 23 10:41:35 1988 Robert J. Chassell (bob at frosted-flakes.ai.mit.edu) * emacs.tex: Update information for obtaining TeX distribution from the University of Washington. - diff --git a/man/custom.texi b/man/custom.texi index 6f468a3..7990383 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -1,7 +1,7 @@ \input texinfo.tex @c %**start of header -@setfilename ../info/custom +@setfilename ../info/custom.info @settitle The Customization Library @iftex @afourpaper @@ -25,13 +25,13 @@ and faces. It doesn't contain any examples, but please look at the file @file{cus-edit.el} which contains many declarations you can learn from. @menu -* Declaring Groups:: -* Declaring Variables:: -* Declaring Faces:: -* Usage for Package Authors:: -* Utilities:: -* The Init File:: -* Wishlist:: +* Declaring Groups:: +* Declaring Variables:: +* Declaring Faces:: +* Usage for Package Authors:: +* Utilities:: +* The Init File:: +* Wishlist:: @end menu All the customization declarations can be changes by keyword arguments. @@ -39,19 +39,19 @@ Groups, variables, and faces all share these common keywords: @table @code @item :group -@var{value} should be a customization group. -Add @var{symbol} to that group. +@var{value} should be a customization group. +Add @var{symbol} to that group. @item :link -@var{value} should be a widget type. +@var{value} should be a widget type. Add @var{value} to the external links for this customization option. Useful widget types include @code{custom-manual}, @code{info-link}, and -@code{url-link}. +@code{url-link}. @item :load Add @var{value} to the files that should be loaded before displaying this customization option. The value should be either a string, which should be a string which will be loaded with @code{load-library} unless present in @code{load-history}, or a symbol which will be loaded with -@code{require}. +@code{require}. @item :tag @var{Value} should be a short string used for identifying the option in customization menus and buffers. By default the tag will be @@ -62,10 +62,10 @@ automatically created from the options name. @comment node-name, next, previous, up @section Declaring Groups -Use @code{defgroup} to declare new customization groups. +Use @code{defgroup} to declare new customization groups. @defun defgroup symbol members doc [keyword value]... -Declare @var{symbol} as a customization group containing @var{members}. +Declare @var{symbol} as a customization group containing @var{members}. @var{symbol} does not need to be quoted. @var{doc} is the group documentation. @@ -78,7 +78,7 @@ editing faces, and @code{custom-group} for editing groups.@refill Internally, custom uses the symbol property @code{custom-group} to keep track of the group members, and @code{group-documentation} for the -documentation string. +documentation string. The following additional @var{keyword}'s are defined: @@ -106,7 +106,7 @@ If @var{symbol} is not already bound, initialize it to @var{value}. The following additional @var{keyword}'s are defined: @table @code -@item :type +@item :type @var{value} should be a widget type. @item :options @@ -122,7 +122,7 @@ Some predefined functions are: @item custom-initialize-set Use the @code{:set} method to initialize the variable. Do not initialize it if already bound. This is the default @code{:initialize} -method. +method. @item custom-initialize-default Always use @code{set-default} to initialize the variable, even if a @@ -135,10 +135,10 @@ method with the value returned by the @code{:get} method. @item custom-initialize-changed Like @code{custom-initialize-reset}, but use @code{set-default} to initialize the variable if it is not bound and has not been set -already. +already. @end table -@item :set +@item :set @var{value} should be a function to set the value of the symbol. It takes two arguments, the symbol to set and the value to give it. The default is @code{set-default}. @@ -151,7 +151,7 @@ value for that symbol. The default is @code{default-value}. @item :require @var{value} should be a feature symbol. Each feature will be required when the `defcustom' is evaluated, or when Emacs is started if the user -has saved this option. +has saved this option. @end table @@ -180,7 +180,7 @@ member. For other types variables, the effect is undefined." Faces are declared with @code{defface}. -@defun defface face spec doc [keyword value]... +@defun defface face spec doc [keyword value]... Declare @var{face} as a customizable face that defaults to @var{spec}. @var{face} does not need to be quoted. @@ -218,7 +218,7 @@ Should be one of @code{color}, @code{grayscale}, or @code{mono}. (what color is used for the background text)@* Should be one of @code{light} or @code{dark}. @end table - + Internally, custom uses the symbol property @code{face-defface-spec} for the program specified default face properties, @code{saved-face} for properties saved by the user, and @code{face-documentation} for the @@ -240,13 +240,13 @@ The top level group for the package should itself be member of one or more of the standard customization groups. There exists a group for each @emph{finder} keyword. Press @kbd{C-h p} to see a list of finder keywords, and add you group to each of them, using the @code{:group} -keyword. +keyword. @node Utilities, The Init File, Usage for Package Authors, Top @comment node-name, next, previous, up @section Utilities -These utilities can come in handy when adding customization support. +These utilities can come in handy when adding customization support. @deffn Widget custom-manual Widget type for specifying the info manual entry for a customization @@ -269,7 +269,7 @@ To the custom option @var{symbol} add the dependency @var{load}. @defun customize-menu-create symbol &optional name Create menu for customization group @var{symbol}. -If optional @var{name} is given, use that as the name of the menu. +If optional @var{name} is given, use that as the name of the menu. Otherwise the menu will be named `Customize'. The menu is in a format applicable to @code{easy-menu-define}. @end defun @@ -290,7 +290,7 @@ specified. @section Wishlist @itemize @bullet -@item +@item Better support for keyboard operations in the customize buffer. @item @@ -301,7 +301,7 @@ convincing example. @item Add an `examples' section, with explained examples of custom type -definitions. +definitions. @item Support selectable color themes. I.e., change many faces by setting one @@ -316,13 +316,13 @@ Make it possible to append to `choice', `radio', and `set' options. @item Ask whether set or modified variables should be saved in -@code{kill-buffer-hook}. +@code{kill-buffer-hook}. Ditto for @code{kill-emacs-query-functions}. @item Command to check if there are any customization options that -does not belong to an existing group. +does not belong to an existing group. @item Optionally disable the point-cursor and instead highlight the selected @@ -335,13 +335,9 @@ Explain why it is necessary that all choices have different default values. @item -Make it possible to include a comment/remark/annotation when saving an -option. - -@item Add some direct support for meta variables, i.e. make it possible to specify that this variable should be reset when that variable is -changed. +changed. @item Add tutorial. @@ -382,7 +378,7 @@ Add an easy way to display the standard settings when an item is modified. @item See if it is feasible to scan files for customization information -instead of loading them, +instead of loading them, @item Add hint message when user push a non-pushable tag. @@ -396,11 +392,11 @@ Use checkboxes and radio buttons in the state menus. @item Add option to hide @samp{[hide]} for short options. Default, on. -@item +@item Add option to hide @samp{[state]} for options with their standard settings. -@item +@item There should be a way to specify site defaults for user options. @item diff --git a/man/emodules.texi b/man/emodules.texi index d20ccfb..f6afa99 100644 --- a/man/emodules.texi +++ b/man/emodules.texi @@ -11,30 +11,24 @@ @c @ifset XEMACS -@macro emacs -XEmacs -@end macro +@set emacs XEmacs @clear EMACS @set HAVE_EMACS @end ifset @ifset EMACS -@macro emacs -Emacs -@end macro +@set emacs Emacs @clear XEMACS @set HAVE_EMACS @end ifset @ifclear HAVE_EMACS @set XEMACS -@macro emacs -XEmacs -@end macro +@set emacs XEmacs @end ifclear @ifinfo -This file documents the module loading technology of @emacs{}. +This file documents the module loading technology of @value{emacs}. Copyright @copyright{} 1998 J. Kean Johnston. @@ -84,7 +78,7 @@ instead of in the original English. @finalout @titlepage -@title Extending @emacs{} using C and C++ +@title Extending @value{emacs} using C and C++ @subtitle Version 1.0, September 1998 @author J. Kean Johnston @@ -119,7 +113,7 @@ instead of in the original English. @ifinfo @node Top, Introduction, (dir), (dir) -This Info file contains v1.0 of the @emacs{} dynamic loadable module +This Info file contains v1.0 of the @value{emacs} dynamic loadable module support documentation. @menu * Introduction:: Introducing Emacs Modules @@ -157,10 +151,10 @@ Defining Functions @node Introduction, Annatomy of a Module, Top, Top @chapter Introduction - @emacs{} is a powerful, extensible editor. The traditional way of -extending the functionality of @emacs{} is to use its built-in Lisp + @value{emacs} is a powerful, extensible editor. The traditional way of +extending the functionality of @value{emacs} is to use its built-in Lisp language (called Emacs Lisp, or Elisp for short). However, while Elisp -is a full programming language and capable of extending @emacs{} in more +is a full programming language and capable of extending @value{emacs} in more ways than you can imagine, it does have its short-comings. Firstly, Elisp is an interpreted language, and this has serious speed @@ -180,16 +174,16 @@ access to a system or need to be as quick as possible. @cindex DLL @cindex DSO @cindex shared object - This manual describes a new way of extending @emacs{}, by using dynamic + 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 -be written in C or C++ and loaded into @emacs{} at any time. I sometimes +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}. - @emacs{} modules are configured into and installed with @emacs{} by + @value{emacs} modules are configured into and installed with @value{emacs} by default on all systems that support loading of shared objects. From a -users perspective, the internals of @emacs{} modules are irrelevant. +users perspective, the internals of @value{emacs} modules are irrelevant. All a user will ever need to know about shared objects is the name of the shared object when they want to load a given module. From a developers perspective though, a lot more is provided. @@ -206,28 +200,28 @@ 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 -the location of @emacs{} internal header files etc. The program will also +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 @emacs{}. +loaded into @value{emacs}. @item @cindex header files - CEmacs also makes all of the relevant @emacs{} internal 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 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 @emacs{} are exposed. -@xref{Top,,,internals,@emacs{} Internals Manual}, for a -more complete discussion on how to extend and understand @emacs{}. All of +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 the rules for C modules are discussed there. @item @cindex samples - Part of the @emacs{} distribution is a set of sample modules. These are -not installed when @emacs{} is, but remain in the @emacs{} source tree. + Part of the @value{emacs} distribution is a set of sample modules. These are +not installed when @value{emacs} is, but remain in the @value{emacs} source tree. These modules live in the directory @file{modules}, which is a -sub-directory of the main @emacs{} source code directory. Please look at +sub-directory of the main @value{emacs} source code directory. Please look at the samples carefully, and maybe even use them as a basis for making your own modules. Most of the concepts required for writing extension modules are covered in the samples. @@ -236,19 +230,19 @@ modules are covered in the samples. @cindex documentation @cindex help Last, but not least is this manual. This can be viewed from within -@emacs{}, and it can be printed out as well. It is the intention of this +@value{emacs}, and it can be printed out as well. It is the intention of this document that it will describe everything you need to know about -extending @emacs{} in C. If you do not find this to be the case, please +extending @value{emacs} in C. If you do not find this to be the case, please contact the author(s). @end itemize The rest of this document will discuss the actual mechanics of -@emacs{} modules and work through several of the samples. Please be -sure that you have read the @emacs{} Internals Manual and understand +@value{emacs} modules and work through several of the samples. Please be +sure that you have read the @value{emacs} Internals Manual and understand everything in it. The concepts there apply to all modules. This document may have some overlap, but it is the internals manual which should be considered the final authority. It will also help a great -deal to look at the actual @emacs{} source code to see how things are +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 @@ -259,12 +253,12 @@ done. @cindex module format @cindex format, module - Each dynamically loadable @emacs{} extension (hereafter refered to as a + 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 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 @emacs{} source code tree. +@file{modules/simple/sample.c} in the main @value{emacs} source code tree. @menu * Required Header File:: Always include @@ -281,7 +275,7 @@ sample. The source for this sample can be found in the file @cindex emodules.h @cindex config.h Every module must include the file @file{}. This -will include several other @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 @@ -290,9 +284,9 @@ 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 -need to include one or more of the @emacs{} internal header files. When +need to include one or more of the @value{emacs} internal header files. When you @code{#include }, you will get a few of the most important -@emacs{} header files included automatically for you. The files included +@value{emacs} header files included automatically for you. The files included are: @table @file @@ -308,7 +302,7 @@ should use the abstraction macros provided in this header file. @item window.h This header file defines the window structures and Lisp types, and -provides functions and macros for manipulating multiple @emacs{} windows. +provides functions and macros for manipulating multiple @value{emacs} windows. @item buffer.h All macros and function declarations for manipulating internal and user @@ -320,7 +314,7 @@ insertion and deletion. @item frame.h Provides the required structure, macro and function definitions for -manipulating @emacs{} frames. +manipulating @value{emacs} frames. @end table @node Required Functions, Required Variables, Required Header File, Annatomy of a Module @@ -332,8 +326,8 @@ manipulating @emacs{} frames. 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 -@emacs{} Lisp reader. Each of these functions performs a very specific -task, and they are executed in the correct order by @emacs{}. All of +@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. Here, briefly, are the required module functions. Note that the actual function names do not end with the string @code{_module}, but rather @@ -356,12 +350,12 @@ This required function contains calls to macros such as @code{DEFVAR_LISP()}, @code{DEFVAR_BOOL()} etc, and its purpose is to declare and initialize all and any variables that your module defines. They syntax for declaring variables is identical to the syntax used for -all internal @emacs{} source code. +all internal @value{emacs} source code. @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 @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. @@ -391,14 +385,14 @@ discussed here simply for the sake of completeness. @table @code @item emodules_compiler This is a variable of type @code{long}, and is used to indicate the -version of the @emacs{} loading technology that was used to produce the +version of the @value{emacs} loading technology that was used to produce the module being loaded. This version number is completely unrelated to -the @emacs{} version number, as a given module may quite well work -regardless of the version of @emacs{} that was installed at the time the +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 module was created. -The @emacs{} modules version is used to differentiate between major -changes in the module loading technology, not versions of @emacs{}. +The @value{emacs} modules version is used to differentiate between major +changes in the module loading technology, not versions of @value{emacs}. @item emodules_name This is a short (typically 10 characters or less) name for the module, @@ -442,7 +436,7 @@ modules, then this function can be left empty or even undeclared. However, if it does have dependnacies, it must call @code{emodules_load}: -@example @code +@example @cartouche int emodules_load (CONST char *module, CONST char *modname, @@ -484,12 +478,12 @@ previous successful calls to @code{emodules_load} at the top level. Before discussing the anatomy of a module in greater detail, you should be aware of the steps required in order to correctly compile and link a -module for use within @emacs{}. There is little difference between +module for use within @value{emacs}. There is little difference between compiling normal C code and compiling a module. In fact, all that changes is the command used to compile the module, and a few extra arguments to the compiler. -@emacs{} now ships with a new user utility, called @code{ellcc}. This +@value{emacs} now ships with a new user utility, called @code{ellcc}. This is the @dfn{Emacs Loadable Library C Compiler}. This is a wrapper program that will invoke the real C compiler with the correct arguments to compile and link your module. With the exception of a few command @@ -525,7 +519,7 @@ can force compile mode by specifying the @code{--mode=compile} argument to @code{ellcc}. In this mode, @code{ellcc} is simply a front-end to the same C compiler -that was used to create the @emacs{} binary itself. All @code{ellcc} +that was used to create the @value{emacs} binary itself. All @code{ellcc} does in this mode is insert a few extra command line arguments before the arguments you specify to @code{ellcc} itself. @code{ellcc} will then invoke the C compiler to compile your module, and will return the @@ -535,7 +529,7 @@ 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 some appropriate place something similar to: -@example @code +@example @cartouche CC=ellcc --mode=compile @@ -555,18 +549,18 @@ below for details). @cindex initialization @cindex documentation -@emacs{} uses a rather bizarre way of documenting variables and +@value{emacs} uses a rather bizarre way of documenting variables and functions. Rather than have the documentation for compiled functions 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 @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 @emacs{} has been @dfn{dumped} is +compiled module, at any time after @value{emacs} has been @dfn{dumped} is 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 @@ -613,7 +607,7 @@ 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. -@example @code +@example @cartouche CC=ellcc --mode=compile LD=ellcc --mode=link @@ -651,11 +645,11 @@ sample_init.c: $(SRCS) The above @file{Makefile} is, in fact, complete, and would compile the sample module, and optionally install it. The @code{--mod-location} argument to @code{ellcc} will produce, on the standard output, the base -location of the @emacs{} module directory. Each sub-directory of that +location of the @value{emacs} module directory. Each sub-directory of that directory is automatically searched for for modules when they are loaded with @code{load-module}. An alternative location would be @file{/usr/local/lib/xemacs/site-modules}. That path can change -depending on the options the person who compiled @emacs{} chose, so you +depending on the options the person who compiled @value{emacs} chose, so you can always determine the correct site location using the @code{--mod-site-location} option. This directory is treated the same way as the main module directory. Each sub-directory within it is @@ -678,7 +672,7 @@ or linker, along with any other required arguments to create the loadable module. The module has complete access to all symbols that were present in the -dumped @emacs{}, so you do not need to link against libraries that were +dumped @value{emacs}, so you do not need to link against libraries that were linked in with the main executable. If your library uses some other extra libraries, you will need to link with those. There is nothing particularly complicated about link mode. All you need to do is make @@ -744,10 +738,10 @@ 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 -@emacs{} searches for architecture-dependant files. +@value{emacs} searches for architecture-dependant files. @item --mod-config -Prints the name of the configuration for which @emacs{} and @code{ellcc} +Prints the name of the configuration for which @value{emacs} and @code{ellcc} were compiled. @end table @@ -756,7 +750,7 @@ were compiled. @cindex environment variables During its normal operation, @code{ellcc} uses the compiler and linker -flags that were determined at the time @emacs{} was configured. In +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 the compiler or linker, and you can do so using environment variables. The table below lists all of the environment variables that @code{ellcc} @@ -798,8 +792,8 @@ PIC mode, or the moral equivalent thereof on the target system. @cindex @code{ELLMAKEDOC} Sets the name of the @file{make-docfile} program to use. Usually @code{ellcc} will use the version that was compiled and installed with -@emacs{}, but this option allows you to specify an alternative path. -Used during the compile phase of @emacs{} itself. +@value{emacs}, but this option allows you to specify an alternative path. +Used during the compile phase of @value{emacs} itself. @end table @node Defining Functions, Defining Variables, Using ellcc, Top @@ -813,7 +807,7 @@ The term 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,@emacs{} Internals Manual}, for details on how to +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 in modules. @@ -822,14 +816,14 @@ in modules. 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 -pointers to the start of each documentation entry in the dumped @emacs{}. +pointers to the start of each documentation entry in the dumped @value{emacs}. This, of course, will not work for dynamic modules, as they are loaded -long after @emacs{} has been dumped. For this reason, we require a +long after @value{emacs} has been dumped. For this reason, we require a special means for adding documentation for new subrs. This is what the macro @code{CDOCSUBR} is used for, and this is used extensively during @code{ellcc} initialization mode. - When using @code{DEFUN} in normal @emacs{} C code, the sixth + 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 @@ -850,12 +844,12 @@ for this to happen. It is all taken care of in the @cindex functions, defining Although the full syntax of a function declaration is discussed in the -@emacs{} internals manual in greater depth, what follows is a brief +@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 example: -@example @code +@example @cartouche DEFUN ("my-function", Fmy_function, 1, 1, "FFile name: ", /* Sample Emacs primitive function. @@ -886,7 +880,7 @@ respectively. This is used to ensure that the correct number of arguments are passed to the function. Next is the @code{interactive} definition. If this function is meant to be run by a user interactively, then you need to specify the argument types and prompts -in this string. Please consult the @emacs{} Lisp manual for more +in this string. Please consult the @value{emacs} Lisp manual for more details. Next comes a C comment that is the documentation for this function. This comment @strong{must} exist. Last comes the list of function argument names, if any. @@ -908,13 +902,13 @@ function, which is the same as the second argument to the call to @code{DEFUN}. Using the example function above, you would insert the following code in the @code{syms_of_module} function: -@example @code +@example @cartouche DEFSUBR(Fmy_function); @end cartouche @end example -This call will instruct @emacs{} to make the function visible to the Lisp +This call will instruct @value{emacs} to make the function visible to the Lisp reader and will prepare for the insertion of the documentation into the right place. Once this is done, the user can call the Lisp function @code{my-function}, if it was defined as an interactive @@ -922,7 +916,7 @@ function (which in this case it was). Thats all there is to defining and announcing new functions. The rules for what goes inside the functions, and how to write good modules, is -beyond the scope of this document. Please consult the @emacs{} +beyond the scope of this document. Please consult the @value{emacs} internals manual for more details. @node Defining Variables, Index, Defining Functions, Top @@ -941,7 +935,7 @@ internals manual for more details. common to also provide variables which can be used to control the behaviour of the function, or store the results of the function being executed. The actual C variable types are the same for modules -and internal @emacs{} primitives, and the declaration of the variables +and internal @value{emacs} primitives, and the declaration of the variables is identical. @xref{Adding Global Lisp Variables,,,internals,XEmacs Internals Manual}, @@ -949,27 +943,27 @@ 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 @emacs{} +@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 source code, or read the internals manual. - One @emph{very} important difference between @emacs{} variables and + 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 @emacs{} modules. The pure space +@strong{never} use pure space in @value{emacs} modules. The pure space storage is of a limited size, and is initialized propperly during the -dumping of @emacs{}. Because variables are being added dynamically to -an already running @emacs{} when you load a module, you cannot use pure +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 not use pure space in modules.} Once again, to remove all doubts: @strong{DO NOT USE PURE SPACE IN MODULES!!!} Below is a small example which declares and initializes two variables. You will note that this code takes into account the fact -that this module may very well be compiled into @emacs{} itself. This +that this module may very well be compiled into @value{emacs} itself. This is a prudent thing to do. -@example @code +@example @cartouche Lisp_Object Vsample_string; int sample_boolean; diff --git a/man/texinfo.texi b/man/texinfo.texi index 0bc09a7..4690a34 100644 --- a/man/texinfo.texi +++ b/man/texinfo.texi @@ -3,7 +3,7 @@ @c %**start of header @c All text is ignored before the setfilename. -@setfilename ../info/texinfo +@setfilename ../info/texinfo.info @settitle Texinfo @value{edition} @c Edition number is now the same as the Texinfo distribution version number. diff --git a/man/widget.texi b/man/widget.texi index 66159e5..46f2771 100644 --- a/man/widget.texi +++ b/man/widget.texi @@ -1,7 +1,7 @@ \input texinfo.tex @c %**start of header -@setfilename ../info/widget +@setfilename ../info/widget.info @settitle The Emacs Widget Library @iftex @afourpaper diff --git a/man/xemacs/packages.texi b/man/xemacs/packages.texi index 91ac7fb..fd4ac70 100644 --- a/man/xemacs/packages.texi +++ b/man/xemacs/packages.texi @@ -6,8 +6,8 @@ The XEmacs 21 distribution comes only with a very basic set of built-in modes and packages. Most of the packages that were part of -the distribution of earlier versions of XEmacs are now separately -available. The installer as well as the user can choose which +the distribution of earlier versions of XEmacs are now available +separately. The installer as well as the user can choose which packages to install; the actual installation process is easy. This gives an installer the ability to tailor an XEmacs installation for local needs with safe removal of unnecessary code. @@ -258,13 +258,18 @@ it depends upon. @subsection Manual Binary Package Installation Pre-compiled, binary packages can be installed in either a system -package directory (this is determined when XEmacs is compiled), or in a -subdirectory of your @file{$HOME} directory: +package directory (this is determined when XEmacs is compiled), or in +one of the following +subdirectories of your @file{$HOME} directory: @example -~/.xemacs/packages +~/.xemacs/mule-packages +~/.xemacs/xemacs-packages @end example +Packages in the former directory will only be found by a Mule-enabled +XEmacs. + XEmacs does not have to be running to install binary packages, although XEmacs will not know about any newly-installed packages until you restart XEmacs. Note, however, that installing a newer version of a @@ -279,11 +284,13 @@ Download the package(s) that you want to install. Each binary package will typically be a gzip'd tarball. @item -Decide where to install the packages: in the system package directory, -or in @file{~/.xemacs/packages}. If you want to install the -packages in the system package directory, make sure you can write into -that directory. If you want to install in your @file{$HOME} directory, -create the directory, @file{~/.xemacs/packages}. +Decide where to install the packages: in the system package +directory, or in @file{~/.xemacs/mule-packages} or +@file{~/.xemacs/xemacs-packages}, respectively. If you want to install +the packages in the system package directory, make sure you can write +into that directory. If you want to install in your @file{$HOME} +directory, create the directory, @file{~/.xemacs/mule-packages} or +@file{~/.xemacs/xemacs-packages}, respectively. @item Next, @code{cd} to the directory under which you want to install the diff --git a/nt/ChangeLog b/nt/ChangeLog index 44c5788..9d66963 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,37 @@ +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-10 Adrian Aichner + + * xemacs.mak (.SUFFIXES): Add .texi. + (check): Improve automated test section. + (info): Generate info files using XEmacs (no makeinfo.exe needed). + +1999-07-19 Andy Piper + + * xemacs.mak (DOC_SRC3): add gutter.c + (TEMACS_OBJS): add gutter.obj. + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + +1999-06-13 Adrian Aichner + + * xemacs.mak (DOC_SRC8): Remove mule-coding.c. + (TEMACS_MULE_OBJS): Remove mule-coding.obj + (check): Implement according to src/Makefile. + (check-temacs): ditto. + +1999-06-05 Norbert Koch + + * xemacs.mak (mule): remove dependencies from mule-coding.c + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released diff --git a/nt/xemacs.mak b/nt/xemacs.mak index 79d9a53..31733b5 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -553,6 +553,7 @@ DOC_SRC3=\ $(XEMACS)\src\glyphs-widget.c \ $(XEMACS)\src\gmalloc.c \ $(XEMACS)\src\gui.c \ + $(XEMACS)\src\gutter.c \ $(XEMACS)\src\hash.c \ $(XEMACS)\src\imgproc.c \ $(XEMACS)\src\indent.c \ @@ -650,8 +651,7 @@ DOC_SRC7=\ DOC_SRC8=\ $(XEMACS)\src\mule.c \ $(XEMACS)\src\mule-charset.c \ - $(XEMACS)\src\mule-ccl.c \ - $(XEMACS)\src\mule-coding.c + $(XEMACS)\src\mule-ccl.c ! if $(HAVE_X) DOC_SRC8=$(DOC_SRC8) $(XEMACS)\src\input-method-xlib.c ! endif @@ -739,8 +739,7 @@ TEMACS_MSW_OBJS=\ TEMACS_MULE_OBJS=\ $(OUTDIR)\mule.obj \ $(OUTDIR)\mule-charset.obj \ - $(OUTDIR)\mule-ccl.obj \ - $(OUTDIR)\mule-coding.obj + $(OUTDIR)\mule-ccl.obj ! if $(HAVE_X) TEMACS_MULE_OBJS=\ $(TEMACS_MULE_OBJS) $(OUTDIR)\input-method-xlib.obj @@ -802,6 +801,7 @@ TEMACS_OBJS= \ $(OUTDIR)\glyphs-widget.obj \ $(OUTDIR)\gmalloc.obj \ $(OUTDIR)\gui.obj \ + $(OUTDIR)\gutter.obj \ $(OUTDIR)\hash.obj \ $(OUTDIR)\indent.obj \ $(OUTDIR)\imgproc.obj \ @@ -852,7 +852,7 @@ TEMACS_OBJS= \ # Rules .SUFFIXES: -.SUFFIXES: .c +.SUFFIXES: .c .texi # nmake rule !if $(DEBUG_XEMACS) @@ -890,6 +890,202 @@ $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(OUTDIR)\xemacs.res: xemacs.rc rc -Fo$@ xemacs.rc +# Section handling automated tests starts here + +SRCDIR=..\src +PROGNAME=$(SRCDIR)\xemacs.exe +blddir=$(MAKEDIR:\=\\)\\.. +temacs_loadup=$(TEMACS) -batch -l $(SRCDIR)/../lisp/loadup.el +dump_temacs = $(temacs_loadup) dump +run_temacs = $(temacs_loadup) run-temacs +## We have automated tests!! +testdir=../tests/automated +batch_test_emacs=-batch -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) + +# .PHONY: check check-temacs + +check: + cd $(SRCDIR) + $(PROGNAME) $(batch_test_emacs) + +check-temacs: + cd $(SRCDIR) + set EMACSBOOTSTRAPLOADPATH=$(LISP) + set EMACSBOOTSTRAPMODULEPATH=$(MODULES) + $(run_temacs) $(batch_test_emacs) + +# Section handling automated tests ends here + +# Section handling info starts here +MAKEINFO=$(PROGNAME) -no-site-file -no-init-file -batch -l texinfmt -f batch-texinfo-format + +MANDIR = $(XEMACS)\man +INFODIR = $(XEMACS)\info +INFO_FILES= \ + $(INFODIR)\cl.info \ + $(INFODIR)\custom.info \ + $(INFODIR)\emodules.info \ + $(INFODIR)\external-widget.info \ + $(INFODIR)\info.info \ + $(INFODIR)\standards.info \ + $(INFODIR)\term.info \ + $(INFODIR)\termcap.info \ + $(INFODIR)\texinfo.info \ + $(INFODIR)\widget.info \ + $(INFODIR)\xemacs-faq.info \ + $(INFODIR)\xemacs.info \ + $(INFODIR)\lispref.info \ + $(INFODIR)\new-users-guide.info \ + $(INFODIR)\internals.info + +{$(MANDIR)}.texi{$(INFODIR)}.info: + $(MAKEINFO) $** + +$(INFODIR)\xemacs.info: $(MANDIR)\xemacs\xemacs.texi + $(MAKEINFO) $** + +$(MANDIR)\xemacs\xemacs.texi: \ + $(MANDIR)\xemacs\abbrevs.texi \ + $(MANDIR)\xemacs\basic.texi \ + $(MANDIR)\xemacs\buffers.texi \ + $(MANDIR)\xemacs\building.texi \ + $(MANDIR)\xemacs\calendar.texi \ + $(MANDIR)\xemacs\cmdargs.texi \ + $(MANDIR)\xemacs\custom.texi \ + $(MANDIR)\xemacs\display.texi \ + $(MANDIR)\xemacs\entering.texi \ + $(MANDIR)\xemacs\files.texi \ + $(MANDIR)\xemacs\fixit.texi \ + $(MANDIR)\xemacs\glossary.texi \ + $(MANDIR)\xemacs\gnu.texi \ + $(MANDIR)\xemacs\help.texi \ + $(MANDIR)\xemacs\indent.texi \ + $(MANDIR)\xemacs\keystrokes.texi \ + $(MANDIR)\xemacs\killing.texi \ + $(MANDIR)\xemacs\\xemacs.texi \ + $(MANDIR)\xemacs\m-x.texi \ + $(MANDIR)\xemacs\major.texi \ + $(MANDIR)\xemacs\mark.texi \ + $(MANDIR)\xemacs\menus.texi \ + $(MANDIR)\xemacs\mini.texi \ + $(MANDIR)\xemacs\misc.texi \ + $(MANDIR)\xemacs\mouse.texi \ + $(MANDIR)\xemacs\new.texi \ + $(MANDIR)\xemacs\picture.texi \ + $(MANDIR)\xemacs\programs.texi \ + $(MANDIR)\xemacs\reading.texi \ + $(MANDIR)\xemacs\regs.texi \ + $(MANDIR)\xemacs\frame.texi \ + $(MANDIR)\xemacs\search.texi \ + $(MANDIR)\xemacs\sending.texi \ + $(MANDIR)\xemacs\text.texi \ + $(MANDIR)\xemacs\trouble.texi \ + $(MANDIR)\xemacs\undo.texi \ + $(MANDIR)\xemacs\windows.texi \ + + +$(INFODIR)\lispref.info: $(MANDIR)\lispref\lispref.texi + copy $(MANDIR)\lispref\index.perm $(MANDIR)\lispref\index.texi + $(MAKEINFO) $** + +$(MANDIR)\lispref\lispref.texi: \ + $(MANDIR)\lispref\abbrevs.texi \ + $(MANDIR)\lispref\annotations.texi \ + $(MANDIR)\lispref\back.texi \ + $(MANDIR)\lispref\backups.texi \ + $(MANDIR)\lispref\buffers.texi \ + $(MANDIR)\lispref\building.texi \ + $(MANDIR)\lispref\commands.texi \ + $(MANDIR)\lispref\compile.texi \ + $(MANDIR)\lispref\consoles-devices.texi \ + $(MANDIR)\lispref\control.texi \ + $(MANDIR)\lispref\databases.texi \ + $(MANDIR)\lispref\debugging.texi \ + $(MANDIR)\lispref\dialog.texi \ + $(MANDIR)\lispref\display.texi \ + $(MANDIR)\lispref\edebug-inc.texi \ + $(MANDIR)\lispref\edebug.texi \ + $(MANDIR)\lispref\errors.texi \ + $(MANDIR)\lispref\eval.texi \ + $(MANDIR)\lispref\extents.texi \ + $(MANDIR)\lispref\faces.texi \ + $(MANDIR)\lispref\files.texi \ + $(MANDIR)\lispref\frames.texi \ + $(MANDIR)\lispref\functions.texi \ + $(MANDIR)\lispref\glyphs.texi \ + $(MANDIR)\lispref\hash-tables.texi \ + $(MANDIR)\lispref\help.texi \ + $(MANDIR)\lispref\hooks.texi \ + $(MANDIR)\lispref\index.texi \ + $(MANDIR)\lispref\internationalization.texi \ + $(MANDIR)\lispref\intro.texi \ + $(MANDIR)\lispref\keymaps.texi \ + $(MANDIR)\lispref\ldap.texi \ + $(MANDIR)\lispref\lists.texi \ + $(MANDIR)\lispref\loading.texi \ + $(MANDIR)\lispref\locals.texi \ + $(MANDIR)\lispref\macros.texi \ + $(MANDIR)\lispref\maps.texi \ + $(MANDIR)\lispref\markers.texi \ + $(MANDIR)\lispref\menus.texi \ + $(MANDIR)\lispref\minibuf.texi \ + $(MANDIR)\lispref\modes.texi \ + $(MANDIR)\lispref\mouse.texi \ + $(MANDIR)\lispref\mule.texi \ + $(MANDIR)\lispref\numbers.texi \ + $(MANDIR)\lispref\objects.texi \ + $(MANDIR)\lispref\os.texi \ + $(MANDIR)\lispref\positions.texi \ + $(MANDIR)\lispref\processes.texi \ + $(MANDIR)\lispref\range-tables.texi \ + $(MANDIR)\lispref\scrollbars.texi \ + $(MANDIR)\lispref\searching.texi \ + $(MANDIR)\lispref\sequences.texi \ + $(MANDIR)\lispref\specifiers.texi \ + $(MANDIR)\lispref\streams.texi \ + $(MANDIR)\lispref\strings.texi \ + $(MANDIR)\lispref\symbols.texi \ + $(MANDIR)\lispref\syntax.texi \ + $(MANDIR)\lispref\text.texi \ + $(MANDIR)\lispref\tips.texi \ + $(MANDIR)\lispref\toolbar.texi \ + $(MANDIR)\lispref\tooltalk.texi \ + $(MANDIR)\lispref\variables.texi \ + $(MANDIR)\lispref\windows.texi \ + $(MANDIR)\lispref\x-windows.texi \ + $(MANDIR)\lispref\index.unperm \ + $(MANDIR)\lispref\index.perm \ + + +$(INFODIR)\new-users-guide.info: $(MANDIR)\new-users-guide\new-users-guide.texi + $(MAKEINFO) $** + +$(MANDIR)\new-users-guide\new-users-guide.texi: \ + $(MANDIR)\new-users-guide\custom1.texi \ + $(MANDIR)\new-users-guide\files.texi \ + $(MANDIR)\new-users-guide\region.texi \ + $(MANDIR)\new-users-guide\custom2.texi \ + $(MANDIR)\new-users-guide\help.texi \ + $(MANDIR)\new-users-guide\search.texi \ + $(MANDIR)\new-users-guide\edit.texi \ + $(MANDIR)\new-users-guide\modes.texi \ + $(MANDIR)\new-users-guide\xmenu.texi \ + $(MANDIR)\new-users-guide\enter.texi \ + + +$(INFODIR)\internals.info: $(MANDIR)\internals\internals.texi + copy $(MANDIR)\internals\index.perm $(MANDIR)\internals\index.texi + $(MAKEINFO) $** + +$(MANDIR)\internals\internals.texi: \ + $(MANDIR)\internals\index.unperm \ + $(MANDIR)\internals\index.perm \ + + +info: $(INFO_FILES) + +# Section handling info ends here + #------------------------------------------------------------------------------ # LISP bits 'n bobs @@ -928,7 +1124,7 @@ dump-xemacs: $(TEMACS) # use this rule to build the complete system all: $(XEMACS)\Installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) $(LIB_SRC_TOOLS) $(RUNEMACS) \ - $(TEMACS) update-elc $(DOC) dump-xemacs + $(TEMACS) update-elc $(DOC) dump-xemacs info temacs: $(TEMACS) @@ -991,6 +1187,8 @@ distclean: del $(CONFIG_VALUES) cd $(LISP) -del /s /q *.bak *.elc *.orig *.rej + cd $(INFODIR) + del *.info* $(MANDIR)\internals\index.texi $(MANDIR)\lispref\index.texi depend: mkdepend -f xemacs.mak -p$(OUTDIR)\ -o.obj -w9999 -- $(TEMACS_CPP_FLAGS) -- $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(DOC_SRC8) $(DOC_SRC9) $(LASTFILE_SRC)\lastfile.c $(LIB_SRC)\make-docfile.c $(LIB_SRC)\run.c diff --git a/src/ChangeLog b/src/ChangeLog index 99ffb74..67fe552 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -165,6 +165,698 @@ (Vcharset_thai_tis620): Likewise. (Vcharset_katakana_jisx0201): Likewise. +1999-08-17 MORIOKA Tomohiko + + * file-coding.c (determine_real_coding_system): Treat `coding:' + cookie. + +1999-08-16 MORIOKA Tomohiko + + * file-coding.c (struct decoding_stream): New member `counter'. + (reset_decoding_stream): Initialize `counter'. + (decode_coding_ucs4): Use `counter'. + (decode_coding_utf8): Likewise. + +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-27 Jeff Miller + + * add a "#ifdef HAVE_MENUBARS" wrapper to gui.c around + menubar_show_keybindings. + +1999-07-23 SL Baur + + * mule-charset.c (syms_of_mule_charset): Delete duplicated + definition of Qccl_program. + + * mule-ccl.h: Make a global declaration of it here. + +1999-07-20 Bob Weiner + + * s/sco7.h: Added from rr@sco.com. + +1999-06-25 MORIOKA Tomohiko + + * mule-ccl.c (ccl_driver): Fix `CCL_WriteMultibyteChar2'. + +1999-06-24 MORIOKA Tomohiko + + * file-coding.c (mule_decode): Setup `str->ccl.last_block'. + (mule_encode): Likewise. + + * mule-ccl.c (Qccl_program): New variable. + (CCL_SUSPEND): New macro. + (CCL_INVALID_CMD): New macro. + (CCL_READ_CHAR): Don't regard as invalid command while processing + the last block even if input is empty; use + `CCL_STAT_SUSPEND_BY_SRC' instead of `CCL_STAT_SUSPEND'. + (vars_of_mule_ccl): Setup `Qccl_program' and `Qccl_program_idx'. + + * mule-ccl.h (CCL_STAT_SUCCESS): Moved from mule-ccl.c. + (CCL_STAT_SUSPEND_BY_SRC): Imported from Emacs 20.3.10. + (CCL_STAT_SUSPEND_BY_DST): Likewise. + (CCL_STAT_INVALID_CMD): Moved from mule-ccl.c; change value from 2. + (CCL_STAT_QUIT): Moved from mule-ccl.c; change value from 3. + +1999-05-04 Ken'ichi Handa + + * mule-ccl.h (struct ccl_program): New member stack_idx. + + * mule-ccl.c (ccl_prog_stack_struct): Declare it as static. + (ccl_driver): Setup stack_idx and ccl_prog correctly. Update them + before returing. + (setup_ccl_program): Initialize ccl->stack_idx to 0. + +1998-10-12 Kenichi Handa + + * mule-ccl.c (CCL_DECODE_SJIS, CCL_ENCODE_SJIS): Swap the + definitions. + +1998-08-18 Kenichi Handa + + * mule-ccl.c (CCL_READ_CHAR): If eof is encounterd while + processing the last block, don't just finish but processes eol + block of the current CCL program. + (ccl_driver): Add a new jump label ccl_repeat for the above + change. + +1998-04-15 Kenichi Handa + + * mule-ccl.c: Typo in comments fixed. + (Qccl_program_idx): New variables. + (CCL_ReadMultibyteChar2): Macro name changed from + CCL_ReadMultibyteCharacter. + (CCL_WriteMultibyteChar2): Macro name changed from + CCL_WriteMultibyteChar2. + (ccl_driver): Adjusted for the above changes. + (resolve_symbol_ccl_program): New function. + (Fccl_execute): The arg CCL-PROGRAM can be a symbol of CCL + program. If CCL-PRGRAM is a vector, convert symbols in it to ID + numbers by resolve_symbol_ccl_program. + (Fccl_execute_on_string): Likewise. + (Fregister_ccl_program): If the arg CCL-PRGRAM is a vector, + convert symbols in it to ID numbers by resolve_symbol_ccl_program. + +1998-01-21 Kenichi Handa + + * mule-ccl.h: (struct ccl_program): New member private_state. + + * mule-ccl.c + (CCL_Call): Fix the comment. + (CCL_ReadMultibyteCharacter, CCL_WriteMultibyteCharacter): New + macros for CCL Commands. + (EXCMD): New macro. + (ccl_driver): New case lable `CCL_Extention'. + (setup_ccl_program): Initialize the member `private_state' of CCL. + +1999-07-08 Katsumi Yamaoka + + * keymap.c (copy_keymap_internal): Inherit the default binding. + +1999-07-14 Kazuyuki IENAGA + + * event-Xt.c (handle_focus_event_1): Re-enable Motif/XIM to get + focus the event (XIM_focus_event). + (emacs_Xt_handle_magic_event): No side effect on Motif/XIM because + XIM_SetGeometry does nothing in input_method_motif.c, but re-unify + the interface for future use (XIM_SetGeometry). + * redisplay-x.c (x_output_string): Re-enable Motif/XIM to set spot + location (XIM_SetSpotLocation). + (x_output_eol_cursor): Ditto. + +1999-07-17 Gunnar Evermann + + * gdbinit (pobj): change lrecord_foo to &lrecord_foo to match + Olivier's change to lrecord.h of 1999-04-22 + +1999-07-20 Robert Pluim + + * gutter.c (redraw_exposed_gutter): Change type of pos from + enum toolbar_pos -> enum gutter_pos, since former is only defined + if toolbar support is. + +1999-07-19 Andy Piper + + * glyphs-x.c (x_resize_subwindow): cope with widgets as well as + subwindows. + + * gutter.c (gutter_validate): new function for the gutter specifier. + (specifier_type_create_gutter): declare specifier validator. + + * buffer.h (INC_CHARBYTIND): add for no error checking version. + +1999-07-18 Andy Piper + + * redisplay.c (add_emchar_rune): use XSTRING_DATA not string_data. + + * glyphs-msw.c (console_type_create_glyphs_mswindows): add + resize_subwindow. + (mswindows_resize_subwindow): new function. + + * gutter.c (redraw_exposed_gutter): only reset the + current_display_lines if non-zero. + (Fgutter_pixel_height): new function. + (Fgutter_pixel_width): new function. + + * event-msw.c (mswindows_wnd_proc): set the mask of the parameter + we want to retrive from the tab control. + +1999-07-17 Andy Piper + + * window.c (change_window_height): mark gutters changed when we're + done. + + * gutter.c (specifier_vars_of_gutter): make defaults more + sensible. + + * gutter.h (WINDOW_REAL_GUTTER_BORDER_WIDTH): adjust to be 0 for 0 + height gutter. + (DEFAULT_GUTTER_WIDTH): change. + (DEFAULT_GUTTER_BORDER_WIDTH): change. + +1999-07-18 Andy Piper + + * redisplay.c (add_emchar_rune): use XSTRING_DATA not string_data. + +1999-07-16 Andy Piper + + * frame.c (Fmake_frame): call init_frame_gutters(). + + * redisplay.c (add_emchar_rune): use string functions if we are + working with a string. + (position_redisplay_data_type): add string element. + +1999-07-15 Andy Piper + + * winslots.h: add real_gutter_size slots to hold the actual gutter + size. This is important for autodetected sizes. + + * gutter.c (calculate_gutter_size): calculate size for gutters + that have 'autodetect size. + + * redisplay-msw.c (mswindows_output_vertical_divider): adjust + extent of divider for gutters. + + * redisplay-x.c (x_output_vertical_divider): adjust extent of + divider for gutters. + + * scrollbar.c (update_scrollbar_instance): adjust scrollbar + position to take into account the gutters. + + * redisplay.c (generate_modeline): adjust modeline position to + take into account the gutters. + +1999-07-14 Andy Piper + + * gutter.c (frame_topmost_window): new function. + (frame_bottommost_window): ditto. + (frame_leftmost_window): ditto. + (frame_rightmost_window): ditto. + +1999-07-13 Andy Piper + + * redisplay.c (calculate_display_line_boundaries): use text + boundaries so that gutters get handled properly. + +1999-07-12 Andy Piper + + * glyphs-x.c (x_widget_instantiate): set the font Motif-style if + we're using Motif. + + * redisplay-output.c (redisplay_clear_to_window_end): generalised + from redisplay-x.c + + * redisplay-x.c (redisplay_clear_to_window_end): moved to + redisplay.c + + * redisplay-msw.c (redisplay_clear_to_window_end): deleted. + + * gutter.c: new file - implements gutters. All new functions are + semantically equivalent to the toolbar functions. + (gutter_was_visible): new function. + (get_gutter_coords): ditto. + (output_gutter): ditto. + (clear_gutter): ditto. + (update_frame_gutters): ditto. + (redraw_exposed_gutter): ditto. + (redraw_exposed_gutters): ditto. + (free_frame_gutters): ditto. + (init_frame_gutters): ditto. + (decode_gutter_position): ditto. + (Fset_default_gutter_position): ditto. + (Fset_default_gutter_position): ditto. + (Fdefault_gutter_position): ditto. + (gutter_after_change): ditto. + (Fgutter_specifier_p): ditto. + (recompute_overlaying_specifier): ditto. + (gutter_specs_changed): ditto. + (default_gutter_specs_changed): ditto. + (gutter_geometry_changed_in_window): ditto. + (default_gutter_size_changed_in_window): ditto. + (default_gutter_border_width_changed_in_window): ditto. + (default_gutter_visible_p_changed_in_window): ditto. + (syms_of_gutter): ditto. + (vars_of_gutter): ditto. + (specifier_type_create_gutter): ditto. + (specifier_vars_of_gutter): ditto. + + * gutter.h: new file. Contains gutter constants and sizing macros + similar to those for the toolbar. + + * winslots.h: add gutter variables. + + * window.h: declare window_is_* functions. + + * window.c (window_is_lowest): make non-static. + (window_is_highest): ditto. + (window_top_toolbar_height): deleted. + (window_bottom_toolbar_height): deleted. + (window_left_toolbar_width): deleted. + (window_right_toolbar_width): deleted. + (window_top_gutter_height): add gutter sizing. + (window_bottom_gutter_height): ditto. + (window_left_gutter_width): ditto. + (window_right_gutter_width): ditto. + + * symsinit.h: declarations for gutters vars etc. + + * search.c (bi_find_next_emchar_in_string): new function. + + * scrollbar.c (update_scrollbar_instance): remove reference to + window_bottom_toolbar_height which did nothing. + + * redisplay.h (struct display_line): add face indices for + overriding defaults in output_display_line. + Add gutter_changed flags and declarations. + + * redisplay.c (create_string_text_block): new function, similar to + create_text_block but for strings. Display tables etc are used + from the currently selected window. + (generate_string_display_line): ditto. Similar to + generate_display_line. + (generate_displayable_area): generate display lines for a given + area on a frame. Input is the string, with associated extents, to + display. + (redisplay_frame): add gutter_changed check. + (redisplay_device): ditto. + (redisplay_without_hooks): ditto. + + * redisplay-x.c (bevel_modeline): moved to redisplay.c. + (x_redraw_exposed_area): redraw exposed gutters. + (x_bevel_area): new redisplay device method. + (x_type_create_redisplay_mswindows): add bevel_area device method. + (x_output_display_block): fiddly Martin-style cleanup. + (x_output_vertical_divider): use bevel_area. + + * redisplay-output.c (output_display_line): check display_lines + for face information before using defaults. + (bevel_modeline): new function, calls bevel_area with appropriate + values. + + * redisplay-msw.c (bevel_modeline): moved to redisplay.c. + (mswindows_redraw_exposed_area): redraw exposed gutters. + (mswindows_bevel_area): new redisplay device method. + (console_type_create_redisplay_mswindows): add bevel_area device + method. + + * indent.c (string_column_at_point): add column_at_point but for + strings. + + * glyphs-x.c (image_instantiator_format_create_glyphs_x): only + instantiate widgets that we have a toolkit for. + + * general.c: add Qgutter. + + * frame.h (struct frame): add display lines for gutters and + visibility flags. + + * frame.c (set_frame_selected_window): mark gutters changed. + + * emacs.c (main_1): add gutter initialisation. + + * device.h (struct device): add gutter_changed flag and macros to + manipulate it. + + * console.h (struct console_methods): new bevel area redisplay + method. + + * buffer.h (REAL_INC_CHARBYTIND): new macro for strings as + REAL_INC_BYTIND is for buffers. + (INC_CHARPTR): ditto. + + * Makefile.in.in (objs): add gutter.o + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-07-08 SL Baur + + * event-Xt.c (handle_focus_event_1): Guard FRAME_X_XIC with + XIM_XLIB. + (emacs_Xt_handle_magic_event): Ditto. + * redisplay-x.c (x_output_string): Ditto. + (x_output_eol_cursor): Ditto. + +1999-06-30 Kazuyuki IENAGA + + * event-Xt.c, input-method-xlib.c, redisplay-x.c: Avoid the + problem that when XIM is destroyed or missed with some reason, + xemacs will die. Now xim=xlib waits the XIM will be ready and + endures the case of XIM end up. + +1999-07-03 Gunnar Evermann + + * tooltalk.c (init_tooltalk): save signal actions for SIGQUIT, + SIGINT and SIGCHLD before calling tt_open and restore the + afterwards. This fixes e.g. the zombie subprocesses on Solaris + +1999-07-06 SL Baur + + * s/linux.h: gcc-2.8 changes for powerpc + From Justin Vallon + +1999-07-05 Didier Verna + + * indent.c: new symbol Qcoerce. + (Fmove_to_column): use it + doc string update. + +1999-07-04 Andy Piper + + * console.c: undo earlier Fprovide changes. + * fns.c: ditto. + * console.h: ditto. + + * console-tty.c (image_instantiator_format_create_glyphs_tty): new + function. validate appropriate image formats for tty. + + * glyphs.h (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM): + initialize consoles parameter. + (struct image_instantiator_methods): add consoles parameter. + (IIFORMAT_VALID_CONSOLE): new function. validate the format on the + console. + (INITIALIZE_DEVICE_IIFORMAT): validate the format on the given + console. + + * glyphs-msw.c: declare instantiators for later use. + (image_instantiator_format_create_glyphs_mswindows): validate xpm + and friends on the mswindows console. + * glyphs-x.c: ditto. + + * glyphs.c (valid_image_instantiator_format_p): disallow glyphs + that have not been registered on the supplied device. + (Fvalid_image_instantiator_format_p): add locale argument. + (instantiate_image_instantiator): valid image instantiator on the + device. + + * symsinit.h: add image_instantiator_format_create_glyphs_tty() + declaration. + + * emacs.c (main_1): add call to + image_instantiator_format_create_glyphs_tty(). + +1999-06-29 Olivier Galibert + + * lisp.h: Add #include . + + * sysdep.c: Remove #include . + * symbols.c: Remove #include . + * sheap.c: Remove #include . + * opaque.c: Remove #include . + * nt.c: Remove #include . + * mule-charset.c: Remove #include . + * marker.c: Remove #include . + * file-coding.c: Remove #include . + * extents.c: Remove #include . + * elhash.c: Remove #include . + * data.c: Remove #include . + * chartab.c: Remove #include . + * bytecode.c: Remove #include . + * alloc.c: Remove #include . Fix vector description + +1999-06-30 SL Baur + + * editfns.c: Document "%s" format spec. + Suggested by Bob Weiner + +1999-06-29 Andy Piper + + * event-msw.c: fix definition booboo. + +1999-06-28 Andy Piper + + * glyphs-x.c: change tree -> tree-view, progress -> + progress_gauge, edit -> edit-field, tab -> tab-control, combo -> + combo-box. + (complex_vars_of_glyphs_x): provide-on-console the implemented + widget types. + + * glyphs-msw.c: ditto. + (complex_vars_of_glyphs_mswindows): ditto. + + * lisp.h: add Fprovide_on_console. + + * fns.c (Ffeaturep): add extra optional console argument. + (Fprovide_on_console): like Fprovide but provides only on the + specified console-type. + (Frequire): check console-features as well as global features. + + * console.c (Fconsole_features): new function. return features for + this console. + (syms_of_console): add Fconsole_features. + + * console.h (CONMETH_FEATURES): new function for accessing features. + (CONSOLE_FEATURES): ditto. + (struct console_methods): add features slot. + (INITIALIZE_CONSOLE_TYPE): initialize features slot. + +1999-06-28 Andy Piper + + * event-Xt.c (handle_focus_event_1): conditionally compile for + X11R5. + + * s/cygwin32.h: fix me website address. + + * event-msw.c: add NMHDR for pre b20 cygwin builds. + + * gui-x.c (button_item_to_widget_value): only add callback if it + is non-nil. + + * glyphs-x.c: add progress, edit and combo instantiators. + (x_widget_set_property): new function. uses lwlib to set widget + values. + (x_widget_property): new function. uses lwlib to get widget + values. + (x_button_instantiate): support images in buttons. + (x_button_property): new function. use lwlib to get the selected + state. + (x_progress_instantiate): new function for instantiating progress + gauges. + (x_progress_set_property): new function. sets the progress gauge + position. + (x_edit_instantiate): new function. for instantiating edit fields. + (x_combo_instantiate): new function. for instantiating combo + boxes. + (image_instantiator_format_create_glyphs_x): add new device ii + formats. + + * glyphs-msw.c (mswindows_tab_instantiate): remove redundant var. + + * console.h (CONSOLE_FEATURES): new features accesor. + + * conslots.h (MARKED_SLOT): add features entry. + +1999-06-25 Andy Piper + + * menubar-x.c (menu_item_descriptor_to_widget_value_1): use new + gui functions. + + * menubar-msw.c: move MAX_MENUITEM_LENGTH to gui.h + + * gui.h (struct Lisp_Gui_Item): add accelerator. + + * gui.c (gui_item_add_keyval_pair): deal with accelerators. + (gui_item_init): ditto. + (gui_add_item_keywords_to_plist): ditto. + (mark_gui_item): ditto. + (gui_item_hash): ditto. + (gui_item_accelerator): new function. + (gui_name_accelerator): new function stolen from gui-x.c + + * gui-x.c (popup_selection_callback): always define. mark + subwindows changed after calling a callback. + (menu_name_to_accelerator): deleted. + (button_item_to_widget_value): forward gui_item things to gui_item + functions. + + * glyphs-x.h (struct x_subwindow_data): add data for widgets. add + appropriate accesors. + + * glyphs-x.c: declare new glyph formats. + (x_finalize_image_instance): unmanage and destroy widgets if they + exist. + (x_unmap_subwindow): handle widgets specially. + (x_map_subwindow): ditto. offset display of widgets by offset of + text widget within container. + (x_update_subwindow): new function. call lw_modify_all_widgets + when we are a widget. + (x_widget_instantiate): new function for generically creating + widgets-glyphs. toolkit specifics forwarded to lwlib. + (x_button_instantiate): new function for instantiating + widgets-glyph buttons. + (console_type_create_glyphs_x): register update_subwindow. + (image_instantiator_format_create_glyphs_x): register widget and + button types. + + * event-msw.c (mswindows_wnd_proc): remove redundant variable. + + * event-Xt.c (x_event_to_emacs_event): call handle_focus_event_1 + when we get a button press in case we do not have the focus. + (handle_focus_event_1): set the keyboard focus to the text widget + if we do not have it. + + * dialog-x.c (dbox_descriptor_to_widget_value): use new gui_item + functions. + +1999-06-24 SL Baur + + * syntax.c (scan_words): Restore non-Mule code. + (word_constituent_p): Restore. + +1999-06-23 Olivier Galibert + + * config.h.in: Add missing #undef *_USER_DEFINED. + +1999-06-23 SL Baur + + * lisp.h (set_bit_vector_bit): Force promotion to unsigned long + int (fixes a 64-bit problem). + + * chartab.c (word_boundary_p): Use EQ not == for lisp_object + comparison. + +1999-03-23 Michael Sperber [Mr. Preprocessor] + + * paths.h.in (PATH_DOC): Made doc-directory configurable. + +1999-06-22 Olivier Galibert + + * lrecord.h: Added basic external description system. + + * symbols.c: Added symbol, symbol-value-buffer-local, + symbol-value-lisp-magic and symbol-value-varalias description. + * mule-charset.c: Added charset description. + * marker.c: Added marker description. + * keymap.c: Added keymap description. + * glyphs.c: Added glyph description. + * floatfns.c: Added float description. + * file-coding.c: Added coding-system description. + * extents.c: Added extent description. + * elhash.c: Added hash-table description. + * data.c: Added weak-list desciption. + * chartab.c: Added char-table-entry and char-table description. + * bytecode.c: Added compiled-function description. + * alloc.c: Added cons, vector and string description. + +1999-06-22 Olivier Galibert + + * lrecord.h (struct lrecord_header): Reduced size to 4 bytes. + Updated everything to the removal of the "flags" substructure. + + * lisp.h (subr_lheader_initializer): Updated. + * symeval.h (symbol_value_forward_lheader_initializer): Updated. + +1999-06-20 MORIOKA Tomohiko + + * syntax.c (word_constituent_p): Deleted. + (scan_words): Use `WORD_BOUNDARY_P'. + + * chartab.c (Vword_combining_categories): New variable. + (Vword_separating_categories): Likewise. + (CATEGORYP): New macro. + (CATEGORY_SET): Likewise. + (CATEGORY_MEMBER): Likewise. + (word_boundary_p): New function. + (complex_vars_of_chartab): Set up new variable + `word-combining-categories' and `word-separating-categories'. + +1999-06-18 Olivier Galibert + + * lrecord.h: Added description as a placehold in the lrecord + implementation structures. Added the parameter to all constructor + defines. + + * alloc.c: Added placeholders. + * buffer.c: Ditto. + * bytecode.c: Ditto. + * chartab.c: Ditto. + * console.c: Ditto. + * data.c: Ditto. + * database.c: Ditto. + * device.c: Ditto. + * eldap.c: Ditto. + * elhash.c: Ditto. + * eval.c: Ditto. + * event-stream.c: Ditto. + * events.c: Ditto. + * extents.c: Ditto. + * faces.c: Ditto. + * file-coding.c: Ditto. + * floatfns.c: Ditto. + * fns.c: Ditto. + * frame.c: Ditto. + * glyphs.c: Ditto. + * gui-x.c: Ditto. + * keymap.c: Ditto. + * lstream.c: Ditto. + * marker.c: Ditto. + * mule-charset.c: Ditto. + * objects.c: Ditto. + * opaque.c: Ditto. + * process.c: Ditto. + * rangetab.c: Ditto. + * specifier.c: Ditto. + * symbols.c: Ditto. + * toolbar.c: Ditto. + * tooltalk.c: Ditto. + * window.c: Ditto. + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + +1999-06-13 Oscar Figueiredo + + * config.h.in (HAVE_LDAP_SET_OPTION): New define + (HAVE_LDAP_GET_LDERRNO): Ditto + (HAVE_LDAP_RESULT2ERROR): Ditto + (HAVE_LDAP_PARSE_RESULT): Ditto + (HAVE_UMICH_LDAP): Removed + (HAVE_NS_LDAP): Removed + + * eldap.h (struct Lisp_LDAP): Removed the `livep' member as + suggested by Olivier Galibert + (CHECK_LIVE_LDAP): Test on `ld' instead of `livep' + + * eldap.c: Take the removal of `livep' into account in all the + necessary functions + (signal_ldap_error): Take two additional parameters + Added new finer compilation conditions in order to use + ldap_parse_result or ldap_result2error if available + (Fldap_open): Conform to this new API + (Fldap_search_internal): Ditto + +1999-06-17 SL Baur + + * data.c (struct int_or_double): Should use EMACS_INT not int. + +1999-06-16 Norbert Koch + + * redisplay-msw.c: Run 'ccl_driver' with 'CCL_MODE_ENCODING' as in + redisplay-x.c + 1999-06-12 MORIOKA Tomohiko * redisplay-x.c (separate_textual_runs): Run `ccl_driver' with @@ -184,6 +876,97 @@ (CCL_MODE_DECODING): New macro. (ccl_driver): Add new argument `conversion_mode'. +1999-06-15 SL Baur + + * mule-charset.c (Fsplit_char): New subr. + (Fchar_octet): delete. + (syms_of_mule_charset): DEFSUBR it. + +1999-06-13 Andy Piper + + * menubar.h: update declarations involving gui_items. + + * lisp.h: declare Lisp_Gui_Item. + + * glyphs.h (struct Lisp_Image_Instance): update type of gui_item. + + * glyphs.c (mark_image_instance): modify for new lisp-based gui_items. + (print_image_instance): ditto. + (image_instance_equal): ditto. + (image_instance_hash): ditto. + + * event-msw.c (mswindows_need_event): assert badly_p status. + (mswindows_wnd_proc): modify WM_NOTIFY handling to cope with + callbacks in tree-view and tab-control widgets. + (emacs_mswindows_next_event): modify use of + mswindows_dequeue_dispatch_event. + + * dialog-msw.c (mswindows_popup_dialog_box): modify for new + lisp-based gui_items. + + * glyphs-msw.c (mswindows_update_subwindow): update use of + gui_items. + (mswindows_register_gui_item): new function. + (mswindows_register_gui_item): fix to use lisp gui_items. + (mswindows_widget_instantiate): ditto. + (mswindows_button_instantiate): ditto. + (add_tree_item): new function to recursively add tree view + elements. + (add_tree_item_list): ditto. + (mswindows_tree_instantiate): new function. instantiate tree view + controls. + (add_tab_item): new function to add tabs to a tab control. + (mswindows_tab_instantiate): new function. instantiate tab + controls. + (image_instantiator_format_create_glyphs_mswindows): add tree view + and tab controls. + (vars_of_glyphs_mswindows): ditto. + + * glyphs-widget.c (check_valid_item_list_1): allow nested lists in + item lists. + (check_valid_item_list): ditto. + (initialize_widget_image_instance): fix to use new lisp gui_item. + (widget_instantiate_1): allow the setting of default textwidth in + characters. + (widget_instantiate): change to use new widget_instantiate_1 + signature. + (combo_instantiate): ditto. + (static_instantiate): ditto. + (tab_instantiate): new function for tab widgets. + (image_instantiator_format_create_glyphs_widget): add tab and tree + view widgets. + + * menubar-msw.c (displayable_menu_item): convert to use lisp + gui_items. + (populate_menu_add_item): ditto. + (populate_or_checksum_helper): ditto. + + * menubar.c (menu_parse_submenu_keywords): convert to use lisp + gui_items. + (Fmenu_find_real_submenu): ditto. + + * gui.h (struct Lisp_Gui_Item): make gui_item a lisp oebjct. + + * gui.c (gui_item_add_keyval_pair): gui_items are now lisp + objects, convert functions that use them accordingly. + (gui_item_init): ditto. + (gui_item_active_p): ditto. + (gui_item_selected_p): ditto. + (gui_item_included_p): ditto. + (gui_item_display_flush_left): ditto. + (gui_item_display_flush_right): ditto. + (mark_gui_item): ditto. + (allocate_gui_item): new function to create a gui_item. + (make_gui_item_from_keywords_internal): ditto. create and return a + gui_item as well as setting keywords. + (gui_parse_item_keywords): ditto. + (gui_parse_item_keywords_no_errors): ditto. + (gui_add_item_keywords_to_plist): new function, not yet used. + (gui_item_hash): new function. + (gui_item_id_hash): use gui_item_hash. + (gui_item_equal): new function. + (print_gui_item): new function. + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released @@ -213,12 +996,6 @@ * file-coding.h (Qraw_text): New variable. -1999-05-20 MORIOKA Tomohiko - - * mule-charset.c (complex_vars_of_mule_charset): Registry of - japanese-jisx0208-1978 should not match with "jisx0208.1983" nor - "jisc6226.1983". - 1999-06-08 SL Baur * s/decosf4-0.h: Explicitly #undef SYSTEM_MALLOC. @@ -355,9 +1132,9 @@ ARG2. 1999-05-21 Andy Piper - + * xselect.c: deleted. - + * symsinit.h: declare select initialisation. * select.h: new file. declare commonly used select functions and @@ -490,7 +1267,7 @@ is interned in the main obarray. 1999-04-23 Gunnar Evermann - + * menubar-x.c (pre_activate_callback): set accelerator field in "No menu" entries to nil. Avoid crash in command_builder_operate_menu_accelerator @@ -512,13 +1289,13 @@ * m/intel386.h: remove redundant definitions. * s/mingw32.h: new header for mingw32. - + * unexnt.c: (open_input_file): function moved to nt.c. (close_file_data): ditto. (rva_to_section): function moved to ntproc. * symsinit.h: declare syms_of_ntproc(); - + * objects-msw.c (mswindows_font_instance_truename): new function. * ntproc.c: remove many warnings. @@ -530,7 +1307,7 @@ (sys_spawnve): fix bad MULE/GCPRO bug in filename handling. * ntheap.h: remove declarations of functions that are now static. - + * ntheap.c: support static heap. * nt.h: conditionalise X_OK definition. @@ -541,7 +1318,7 @@ (_sys_read_ahead): moved to ntproc.c * emacs.c: make sure syms_of_ntptroc gets called under windows. - + * console-msw.h: support mingw32. * getloadavg.c: ditto. * ntplay.c: ditto. @@ -552,14 +1329,14 @@ * config.h.in: dont turn on DEBUG_ENCAPSULATION by default because some systems don't have all of the encapsulated system calls. - + * callproc.c: warning elimination. * dired-msw.c: ditto. * process-nt.c: ditto. * realpath.c: ditto. - + * Makefile.in.in: tweak : and ; for building under mswindows. - + 1999-04-26 Michael Harnois * eldap.c (allocate_ldap): Adapt to the new semantics of @@ -675,7 +1452,7 @@ * symbols.c: Make gung-ho mandatory. make_pure_pname -> make_string or make_string_nocopy. Fix various alloc_lcrecord_type. - + * lread.c: Remove everything purespace related. (Flocate_file_clear_hashing): purified -> c_readonly. (locate_file): Ditto. @@ -844,7 +1621,7 @@ * fns.c (base64_decode_1): Remove COUNTER. (base64_decode_1): Accept CRLF in addition to CR. - (base64_decode_1): Disallow a stray character after final EOF; the + (base64_decode_1): Disallow a stray character after final EOF; the check was probably a remnant of buggy recode code. 1998-12-05 Hrvoje Niksic @@ -1013,8 +1790,8 @@ (composite_char_string): (make-composite-char): (composite-char-string): - (syms_of_mule_charset): - (complex_vars_of_mule_charset): + (syms_of_mule_charset): + (complex_vars_of_mule_charset): * mule-charset.h (LEADING_BYTE_COMPOSITE): (CHAR_LEADING_BYTE): (MAKE_CHAR): @@ -1027,8 +1804,8 @@ (reset_iso2022): (parse_iso2022_esc): (encode_coding_iso2022): - #ifdef out all composite character support using - #ifdef ENABLE_COMPOSITE_CHARS + #ifdef out all composite character support using + #ifdef ENABLE_COMPOSITE_CHARS * alloc.c: Define lrecord_coding_system only if ! FILE_CODING @@ -5312,4 +6089,3 @@ Wed May 27, 1998 Darryl Okahata 1998-05-10 Hrvoje Niksic * frame.c (Ffocus_frame): New function. - diff --git a/src/Makefile.in.in b/src/Makefile.in.in index 7c28cb1..8a02b11 100644 --- a/src/Makefile.in.in +++ b/src/Makefile.in.in @@ -176,7 +176,7 @@ objs=\ event-stream.o extents.o faces.o\ fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\ frame.o general.o glyphs.o glyphs-eimage.o glyphs-widget.o\ - gui.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\ + gui.o gutter.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\ keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\ macros.o marker.o md5.o minibuf.o objects.o opaque.o\ print.o process.o profile.o\ diff --git a/src/alloc.c b/src/alloc.c index a5a3857..b01489c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -58,8 +58,6 @@ Boston, MA 02111-1307, USA. */ #include "sysfile.h" #include "window.h" -#include - #ifdef DOUG_LEA_MALLOC #include #endif @@ -967,6 +965,11 @@ cons_equal (Lisp_Object ob1, Lisp_Object ob2, int depth) return 0; } +static const struct lrecord_description cons_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Cons, car), 2 }, + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons, mark_cons, print_cons, 0, cons_equal, @@ -976,6 +979,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons, * handle conses. */ 0, + cons_description, struct Lisp_Cons); DEFUN ("cons", Fcons, 2, 2, 0, /* @@ -1166,6 +1170,11 @@ vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) return 1; } +static const struct lrecord_description vector_description[] = { + { XD_LONG, offsetof(struct Lisp_Vector, size) }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Vector, contents), XD_INDIRECT(0) } +}; + DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector, mark_vector, print_vector, 0, vector_equal, @@ -1175,6 +1184,7 @@ DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector, * knows how to handle vectors. */ 0, + vector_description, size_vector, Lisp_Vector); /* #### should allocate `small' vectors from a frob-block */ @@ -1743,6 +1753,12 @@ string_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) !memcmp (XSTRING_DATA (obj1), XSTRING_DATA (obj2), len)); } +static const struct lrecord_description string_description[] = { + { XD_STRING_DATA, offsetof(Lisp_String, data) }, + { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("string", string, mark_string, print_string, /* @@ -1756,6 +1772,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("string", string, * SWEEP_FIXED_TYPE_BLOCK(). */ 0, string_equal, 0, + string_description, struct Lisp_String); /* String blocks contain this many useful bytes. */ @@ -2247,7 +2264,7 @@ mark_lcrecord_list (Lisp_Object obj, void (*markobj) (Lisp_Object)) DEFINE_LRECORD_IMPLEMENTATION ("lcrecord-list", lcrecord_list, mark_lcrecord_list, internal_object_printer, - 0, 0, 0, struct lcrecord_list); + 0, 0, 0, 0, struct lcrecord_list); Lisp_Object make_lcrecord_list (size_t size, CONST struct lrecord_implementation *implementation) diff --git a/src/buffer.c b/src/buffer.c index 703f0ce..0c59b8e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -276,7 +276,7 @@ print_buffer (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) because all buffers have `kill-buffer' applied to them before they disappear, and the children removal happens then. */ DEFINE_LRECORD_IMPLEMENTATION ("buffer", buffer, - mark_buffer, print_buffer, 0, 0, 0, + mark_buffer, print_buffer, 0, 0, 0, 0, struct buffer); DEFUN ("bufferp", Fbufferp, 1, 1, 0, /* diff --git a/src/buffer.h b/src/buffer.h index 142901e..38a1d87 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -413,6 +413,9 @@ for (mps_bufcons = Qunbound, \ #define REAL_INC_CHARPTR(ptr) \ ((void) ((ptr) += REP_BYTES_BY_FIRST_BYTE (* (unsigned char *) (ptr)))) +#define REAL_INC_CHARBYTIND(ptr,pos) \ + (pos += REP_BYTES_BY_FIRST_BYTE (* (unsigned char *) (ptr))) + #define REAL_DEC_CHARPTR(ptr) do { \ (ptr)--; \ } while (!VALID_CHARPTR_P (ptr)) @@ -423,6 +426,11 @@ for (mps_bufcons = Qunbound, \ REAL_INC_CHARPTR (ptr); \ } while (0) +#define INC_CHARBYTIND(ptr,pos) do { \ + ASSERT_VALID_CHARPTR (ptr); \ + REAL_INC_CHARBYTIND (ptr,pos); \ +} while (0) + #define DEC_CHARPTR(ptr) do { \ CONST Bufbyte *dc_ptr1 = (ptr); \ CONST Bufbyte *dc_ptr2 = dc_ptr1; \ @@ -433,6 +441,7 @@ for (mps_bufcons = Qunbound, \ } while (0) #else /* ! ERROR_CHECK_BUFPOS */ +#define INC_CHARBYTIND(ptr,pos) REAL_INC_CHARBYTIND (ptr,pos) #define INC_CHARPTR(ptr) REAL_INC_CHARPTR (ptr) #define DEC_CHARPTR(ptr) REAL_DEC_CHARPTR (ptr) #endif /* ! ERROR_CHECK_BUFPOS */ diff --git a/src/bytecode.c b/src/bytecode.c index de2b646..af9d3f4 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -56,7 +56,6 @@ by Hallvard: #include "opaque.h" #include "syntax.h" -#include #include EXFUN (Ffetch_bytecode, 1); @@ -2024,11 +2023,20 @@ compiled_function_hash (Lisp_Object obj, int depth) internal_hash (f->constants, depth + 1)); } +static const struct lrecord_description compiled_function_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Compiled_Function, instructions), 4 }, +#ifdef COMPILED_FUNCTION_ANNOTATION_HACK + { XD_LISP_OBJECT, offsetof(struct Lisp_Compiled_Function, annotated), 1 }, +#endif + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("compiled-function", compiled_function, mark_compiled_function, print_compiled_function, 0, compiled_function_equal, compiled_function_hash, + compiled_function_description, Lisp_Compiled_Function); DEFUN ("compiled-function-p", Fcompiled_function_p, 1, 1, 0, /* diff --git a/src/chartab.c b/src/chartab.c index a6292b4..4e7480d 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -2,6 +2,8 @@ Copyright (C) 1992, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN. + Licensed to the Free Software Foundation. This file is part of XEmacs. @@ -50,6 +52,9 @@ Lisp_Object Qcategory_designator_p; Lisp_Object Qcategory_table_value_p; Lisp_Object Vstandard_category_table; + +/* Variables to determine word boundary. */ +Lisp_Object Vword_combining_categories, Vword_separating_categories; #endif /* MULE */ @@ -124,10 +129,16 @@ char_table_entry_hash (Lisp_Object obj, int depth) return internal_array_hash (cte->level2, 96, depth); } +static const struct lrecord_description char_table_entry_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table_Entry, level2), 96 }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry, mark_char_table_entry, internal_object_printer, 0, char_table_entry_equal, char_table_entry_hash, + char_table_entry_description, struct Lisp_Char_Table_Entry); #endif /* MULE */ @@ -415,9 +426,18 @@ char_table_hash (Lisp_Object obj, int depth) return hashval; } +static const struct lrecord_description char_table_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, ascii), NUM_ASCII_CHARS }, +#ifdef MULE + { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, level1), NUM_LEADING_BYTES }, +#endif + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("char-table", char_table, mark_char_table, print_char_table, 0, char_table_equal, char_table_hash, + char_table_description, struct Lisp_Char_Table); DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /* @@ -1709,6 +1729,68 @@ Valid values are nil or a bit vector of size 95. return CATEGORY_TABLE_VALUEP (obj) ? Qt : Qnil; } + +#define CATEGORYP(x) \ + (CHARP ((x)) && XCHAR ((x)) >= 0x20 && XCHAR ((x)) <= 0x7E) + +#define CATEGORY_SET(c) \ + (get_char_table(c, XCHAR_TABLE(current_buffer->category_table))) + +/* Return 1 if CATEGORY_SET contains CATEGORY, else return 0. + The faster version of `!NILP (Faref (category_set, category))'. */ +#define CATEGORY_MEMBER(category, category_set) \ + (bit_vector_bit(XBIT_VECTOR (category_set), category - 32)) + +/* Return 1 if there is a word boundary between two word-constituent + characters C1 and C2 if they appear in this order, else return 0. + Use the macro WORD_BOUNDARY_P instead of calling this function + directly. */ + +int +word_boundary_p (Emchar c1, Emchar c2) +{ + Lisp_Object category_set1, category_set2; + Lisp_Object tail; + int default_result; + +#if 0 + if (COMPOSITE_CHAR_P (c1)) + c1 = cmpchar_component (c1, 0, 1); + if (COMPOSITE_CHAR_P (c2)) + c2 = cmpchar_component (c2, 0, 1); +#endif + + if (EQ (CHAR_CHARSET (c1), CHAR_CHARSET (c2))) + { + tail = Vword_separating_categories; + default_result = 0; + } + else + { + tail = Vword_combining_categories; + default_result = 1; + } + + category_set1 = CATEGORY_SET (c1); + if (NILP (category_set1)) + return default_result; + category_set2 = CATEGORY_SET (c2); + if (NILP (category_set2)) + return default_result; + + for (; CONSP (tail); tail = XCONS (tail)->cdr) + { + Lisp_Object elt = XCONS(tail)->car; + + if (CONSP (elt) + && CATEGORYP (XCONS (elt)->car) + && CATEGORYP (XCONS (elt)->cdr) + && CATEGORY_MEMBER (XCHAR (XCONS (elt)->car), category_set1) + && CATEGORY_MEMBER (XCHAR (XCONS (elt)->cdr), category_set2)) + return !default_result; + } + return default_result; +} #endif /* MULE */ @@ -1780,5 +1862,50 @@ complex_vars_of_chartab (void) Vstandard_category_table = Qnil; Vstandard_category_table = Fcopy_category_table (Qnil); staticpro (&Vstandard_category_table); + + DEFVAR_LISP ("word-combining-categories", &Vword_combining_categories /* +List of pair (cons) of categories to determine word boundary. + +Emacs treats a sequence of word constituent characters as a single +word (i.e. finds no word boundary between them) iff they belongs to +the same charset. But, exceptions are allowed in the following cases. + +(1) The case that characters are in different charsets is controlled +by the variable `word-combining-categories'. + +Emacs finds no word boundary between characters of different charsets +if they have categories matching some element of this list. + +More precisely, if an element of this list is a cons of category CAT1 +and CAT2, and a multibyte character C1 which has CAT1 is followed by +C2 which has CAT2, there's no word boundary between C1 and C2. + +For instance, to tell that ASCII characters and Latin-1 characters can +form a single word, the element `(?l . ?l)' should be in this list +because both characters have the category `l' (Latin characters). + +(2) The case that character are in the same charset is controlled by +the variable `word-separating-categories'. + +Emacs find a word boundary between characters of the same charset +if they have categories matching some element of this list. + +More precisely, if an element of this list is a cons of category CAT1 +and CAT2, and a multibyte character C1 which has CAT1 is followed by +C2 which has CAT2, there's a word boundary between C1 and C2. + +For instance, to tell that there's a word boundary between Japanese +Hiragana and Japanese Kanji (both are in the same charset), the +element `(?H . ?C) should be in this list. +*/ ); + + Vword_combining_categories = Qnil; + + DEFVAR_LISP ("word-separating-categories", &Vword_separating_categories /* +List of pair (cons) of categories to determine word boundary. +See the documentation of the variable `word-combining-categories'. +*/ ); + + Vword_separating_categories = Qnil; #endif /* MULE */ } diff --git a/src/config.h.in b/src/config.h.in index caa5c68..48757e2 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -357,10 +357,14 @@ char *alloca(); /* Do we have LDAP support? */ #undef HAVE_LDAP -/* Do we have the LDAP library of the University of Michigan ? */ -#undef HAVE_UMICH_LDAP -/* Do we have Netscape LDAP SDK library */ -#undef HAVE_NS_LDAP +/* Does the library define ldap_set_option () ? */ +#undef HAVE_LDAP_SET_OPTION +/* Does the library define ldap_get_lderrno () ? */ +#undef HAVE_LDAP_GET_LDERRNO +/* Does the library define ldap_result2error () ? */ +#undef HAVE_LDAP_RESULT2ERROR +/* Does the library define ldap_parse_result () ? */ +#undef HAVE_LDAP_PARSE_RESULT /* Do you have the Xauth library present? This will add some extra functionality to gnuserv. */ @@ -798,6 +802,11 @@ on various systems. */ #define MAIL_USE_LOCKF #endif +#undef PREFIX_USER_DEFINED +#undef EXEC_PREFIX_USER_DEFINED +#undef MODULEDIR_USER_DEFINED +#undef SITEMODULEDIR_USER_DEFINED +#undef DOCDIR_USER_DEFINED #undef LISPDIR_USER_DEFINED #undef PACKAGE_PATH_USER_DEFINED #undef SITELISPDIR_USER_DEFINED diff --git a/src/console-tty.c b/src/console-tty.c index ec63358..c57c0f7 100644 --- a/src/console-tty.c +++ b/src/console-tty.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "faces.h" #include "frame.h" #include "lstream.h" +#include "glyphs.h" #include "sysdep.h" #include "sysfile.h" #ifdef FILE_CODING @@ -42,6 +43,10 @@ Boston, MA 02111-1307, USA. */ #endif DEFINE_CONSOLE_TYPE (tty); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); Lisp_Object Qterminal_type; Lisp_Object Qcontrolling_process; @@ -367,6 +372,15 @@ console_type_create_tty (void) } void +image_instantiator_format_create_glyphs_tty (void) +{ + IIFORMAT_VALID_CONSOLE (tty, nothing); + IIFORMAT_VALID_CONSOLE (tty, string); + IIFORMAT_VALID_CONSOLE (tty, formatted_string); + IIFORMAT_VALID_CONSOLE (tty, inherit); +} + +void vars_of_console_tty (void) { Fprovide (Qtty); diff --git a/src/console.c b/src/console.c index 40c8607..7e27f86 100644 --- a/src/console.c +++ b/src/console.c @@ -137,7 +137,7 @@ print_console (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) } DEFINE_LRECORD_IMPLEMENTATION ("console", console, - mark_console, print_console, 0, 0, 0, + mark_console, print_console, 0, 0, 0, 0, struct console); static struct console * diff --git a/src/console.h b/src/console.h index d551141..e19c15a 100644 --- a/src/console.h +++ b/src/console.h @@ -155,6 +155,7 @@ struct console_methods int duration); void (*frame_redraw_cursor_method) (struct frame *f); void (*set_final_cursor_coords_method) (struct frame *, int, int); + void (*bevel_area_method) (struct window *, face_index, int, int, int, int, int); /* color methods */ int (*initialize_color_instance_method) (struct Lisp_Color_Instance *, diff --git a/src/data.c b/src/data.c index f3829d0..20100db 100644 --- a/src/data.c +++ b/src/data.c @@ -799,7 +799,7 @@ typedef struct int int_p; union { - int ival; + EMACS_INT ival; double dval; } c; } int_or_double; @@ -1623,9 +1623,16 @@ make_weak_list (enum weak_list_type type) return result; } +static const struct lrecord_description weak_list_description[] = { + { XD_LISP_OBJECT, offsetof(struct weak_list, list), 1 }, + { XD_LISP_OBJECT, offsetof(struct weak_list, next_weak), 1 }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("weak-list", weak_list, mark_weak_list, print_weak_list, 0, weak_list_equal, weak_list_hash, + weak_list_description, struct weak_list); /* -- we do not mark the list elements (either the elements themselves diff --git a/src/database.c b/src/database.c index 0493d0e..c17c827 100644 --- a/src/database.c +++ b/src/database.c @@ -195,7 +195,7 @@ finalize_database (void *header, int for_disksave) DEFINE_LRECORD_IMPLEMENTATION ("database", database, mark_database, print_database, - finalize_database, 0, 0, + finalize_database, 0, 0, 0, Lisp_Database); DEFUN ("close-database", Fclose_database, 1, 1, 0, /* diff --git a/src/depend b/src/depend index a4757d2..f442b62 100644 --- a/src/depend +++ b/src/depend @@ -8,8 +8,8 @@ LISP_UNION_H=lisp-disunion.h 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 character.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 scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h -dialog-msw.o: $(LISP_H) buffer.h bufslots.h character.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 scrollbar.h specifier.h symeval.h symsinit.h toolbar.h +device-msw.o: $(LISP_H) buffer.h bufslots.h character.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 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 character.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 character.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 character.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 mule-charset.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.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 frame-msw.o: $(LISP_H) buffer.h bufslots.h character.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 @@ -17,7 +17,7 @@ glyphs-msw.o: $(LISP_H) buffer.h bufslots.h character.h conslots.h console-msw.h gui-msw.o: $(LISP_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 redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h menubar-msw.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.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 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 +redisplay-msw.o: $(LISP_H) buffer.h bufslots.h character.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 lisp-disunion.h lisp-union.h lrecord.h select.h symeval.h symsinit.h toolbar-msw.o: $(LISP_H) buffer.h bufslots.h character.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 @@ -28,15 +28,15 @@ console-x.o: $(LISP_H) conslots.h console-x.h console.h lisp-disunion.h lisp-uni device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h character.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 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 character.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 character.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 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 character.h conslots.h console-x.h console.h device.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.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 character.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 scrollbar.h specifier.h symeval.h symsinit.h toolbar.h xintrinsic.h +glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h character.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 character.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 character.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 character.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 character.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 objects-x.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 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 +redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h character.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 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 character.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 scrollbar.h select.h specifier.h symeval.h symsinit.h systime.h toolbar.h xintrinsic.h +select-x.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 #endif #ifdef HAVE_DATABASE @@ -45,7 +45,7 @@ database.o: $(LISP_H) buffer.h bufslots.h character.h database.h lisp-disunion.h #ifdef MULE mule-canna.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.h chartab.h conslots.h console.h device.h elhash.h faces.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h +mule-charset.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.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 @@ -77,14 +77,14 @@ cm.o: $(LISP_H) character.h conslots.h console-tty.h console.h device.h frame.h cmdloop.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gpmevent.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systty.h toolbar.h +console-tty.o: $(LISP_H) buffer.h bufslots.h character.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gpmevent.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 character.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 character.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 character.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 character.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 scrollbar.h specifier.h symeval.h symsinit.h toolbar.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 character.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 character.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 character.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h @@ -99,7 +99,7 @@ emodules.o: $(LISP_H) buffer.h bufslots.h character.h conslots.h console.h devic eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h character.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 EmacsFrame.h blocktype.h buffer.h bufslots.h character.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) $(LWLIB_SRCDIR)/lwlib.h blocktype.h buffer.h bufslots.h character.h commands.h conslots.h console-x.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui-x.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h macros.h mule-charset.h opaque.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 xintrinsic.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 scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.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) character.h conslots.h console-stream.h console-tty.h console.h device.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 sysfile.h sysproc.h syssignal.h systime.h systty.h events.o: $(LISP_H) buffer.h bufslots.h character.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 character.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.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 @@ -109,27 +109,28 @@ fileio.o: $(LISP_H) buffer.h bufslots.h character.h conslots.h console.h device. filelock.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h +fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h character.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 character.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 scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h -frame.o: $(LISP_H) buffer.h bufslots.h character.h conslots.h console.h device.h events.h extents.h faces.h frame.h frameslots.h glyphs.h gui.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 +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 character.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 -glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h character.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 scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h +glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h character.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 character.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) buffer.h bufslots.h character.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 gmalloc.o: config.h getpagesize.h gpmevent.o: $(LISP_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 symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h gui.o: $(LISP_H) bytecode.h elhash.h gui.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h +gutter.o: $(LISP_H) buffer.h bufslots.h character.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 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 character.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 character.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 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 scrollbar.h specifier.h symeval.h symsinit.h toolbar.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 character.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 character.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 @@ -153,7 +154,7 @@ objects-tty.o: $(LISP_H) character.h conslots.h console-tty.h console.h device.h objects.o: $(LISP_H) buffer.h bufslots.h character.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 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 -print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h character.h conslots.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 scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syssignal.h systty.h toolbar.h +print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h character.h conslots.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) character.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 character.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 character.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 @@ -163,14 +164,14 @@ rangetab.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h rangetab.h symeval. realpath.o: config.h redisplay-output.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.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 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 +redisplay.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.h commands.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 +scrollbar.o: $(LISP_H) buffer.h bufslots.h character.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 character.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 character.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 scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h +select.o: $(LISP_H) buffer.h bufslots.h character.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 scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h toolbar.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 character.h conslots.h console-x.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h symeval.h symsinit.h sysdep.h xintrinsic.h specifier.o: $(LISP_H) buffer.h bufslots.h character.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 strcat.o: config.h @@ -207,6 +208,6 @@ unexnt.o: config.h ntheap.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 character.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h -window.o: $(LISP_H) buffer.h bufslots.h character.h commands.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 +window.o: $(LISP_H) buffer.h bufslots.h character.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 xmu.o: config.h diff --git a/src/device.c b/src/device.c index a6b751f..dd98407 100644 --- a/src/device.c +++ b/src/device.c @@ -136,7 +136,7 @@ print_device (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) } DEFINE_LRECORD_IMPLEMENTATION ("device", device, - mark_device, print_device, 0, 0, 0, + mark_device, print_device, 0, 0, 0, 0, struct device); int diff --git a/src/device.h b/src/device.h index aad12fd..1e8f0b5 100644 --- a/src/device.h +++ b/src/device.h @@ -173,6 +173,7 @@ struct device unsigned int modeline_changed :1; unsigned int point_changed :1; unsigned int size_changed :1; + unsigned int gutter_changed :1; unsigned int toolbar_changed :1; unsigned int windows_changed :1; unsigned int windows_structure_changed :1; @@ -350,6 +351,9 @@ int valid_device_class_p (Lisp_Object class); #define MARK_DEVICE_TOOLBARS_CHANGED(d) \ ((void) (toolbar_changed = (d)->toolbar_changed = 1)) +#define MARK_DEVICE_GUTTERS_CHANGED(d) \ + ((void) (gutter_changed = (d)->gutter_changed = 1)) + #define MARK_DEVICE_SIZE_CHANGED(d) \ ((void) (size_changed = (d)->size_changed = 1)) diff --git a/src/dialog-msw.c b/src/dialog-msw.c index 24c272c..b5dea45 100644 --- a/src/dialog-msw.c +++ b/src/dialog-msw.c @@ -110,12 +110,6 @@ static Lisp_Object Vdialog_data_list; #define ID_ITEM_BIAS 32 -typedef struct gui_item struct_gui_item; -typedef struct -{ - Dynarr_declare (struct gui_item); -} struct_gui_item_dynarr; - /* Dialog procedure */ static BOOL CALLBACK dialog_proc (HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param) @@ -200,7 +194,7 @@ free_dynarr_opaque_ptr (Lisp_Object arg) static void mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) { - struct_gui_item_dynarr *dialog_items = Dynarr_new (struct_gui_item); + 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; @@ -223,11 +217,10 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) { if (!NILP (XCAR (item_cons))) { - struct gui_item gitem; - gui_item_init (&gitem); - gui_parse_item_keywords (XCAR (item_cons), &gitem); + Lisp_Object gitem = gui_parse_item_keywords (XCAR (item_cons)); Dynarr_add (dialog_items, gitem); - button_row_width += button_width (gitem.name) + X_BUTTON_MARGIN; + button_row_width += button_width (XGUI_ITEM (gitem)->name) + + X_BUTTON_MARGIN; } } if (Dynarr_length (dialog_items) == 0) @@ -350,10 +343,11 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) for (i = 0; i < Dynarr_length (dialog_items); ++i) { - struct gui_item *pgui_item = Dynarr_atp (dialog_items, i); + Lisp_Object* gui_item = Dynarr_atp (dialog_items, i); + struct Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item); item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON - | (gui_item_active_p (pgui_item) ? 0 : WS_DISABLED)); + | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED)); item_tem.cx = button_width (pgui_item->name); /* Item ids are indices into dialog_items plus offset, to avoid having items by reserved ids (IDOK, IDCANCEL) */ @@ -390,7 +384,7 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) vector = make_vector (Dynarr_length (dialog_items), Qunbound); dialog_data = Fcons (frame, vector); for (i = 0; i < Dynarr_length (dialog_items); i++) - XVECTOR_DATA (vector) [i] = Dynarr_atp (dialog_items, i)->callback; + XVECTOR_DATA (vector) [i] = XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback; /* Woof! Everything is ready. Pop pop pop in now! */ if (!CreateDialogIndirectParam (NULL, diff --git a/src/dialog-x.c b/src/dialog-x.c index 918b632..a61eee8 100644 --- a/src/dialog-x.c +++ b/src/dialog-x.c @@ -120,7 +120,7 @@ dbox_descriptor_to_widget_value (Lisp_Object desc) widget_value *prev = 0, *kids = 0; int n = 0; int count = specpdl_depth (); - Lisp_Object wv_closure; + Lisp_Object wv_closure, gui_item; CHECK_CONS (desc); CHECK_STRING (XCAR (desc)); @@ -163,7 +163,8 @@ dbox_descriptor_to_widget_value (Lisp_Object desc) CHECK_VECTOR (button); wv = xmalloc_widget_value (); - if (!button_item_to_widget_value (button, wv, allow_text_p, 1)) + gui_item = gui_parse_item_keywords (button); + if (!button_item_to_widget_value (gui_item, wv, allow_text_p, 1)) { free_widget_value (wv); continue; diff --git a/src/editfns.c b/src/editfns.c index ce1f101..b914b4a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1040,6 +1040,8 @@ FORMAT-STRING may contain %-sequences to substitute parts of the time. %p is replaced by AM or PM, as appropriate. %r is a synonym for "%I:%M:%S %p". %R is a synonym for "%H:%M". +%s is replaced by the time in seconds since 00:00:00, Jan 1, 1970 (a + nonstandard extension) %S is replaced by the second (00-60). %t is a synonym for "\\t". %T is a synonym for "%H:%M:%S". diff --git a/src/eldap.c b/src/eldap.c index caea909..8dd06bd 100644 --- a/src/eldap.c +++ b/src/eldap.c @@ -26,8 +26,8 @@ Boston, MA 02111-1307, USA. */ conforming to the API defined in RFC 1823. It has been tested with: - UMich LDAP 3.3 (http://www.umich.edu/~dirsvcs/ldap/) - - OpenLDAP 1.0.3 (http://www.openldap.org/) - - Netscape's LDAP SDK 1.0 (http://developer.netscape.com/) */ + - OpenLDAP 1.2 (http://www.openldap.org/) + - Netscape's LDAP SDK (http://developer.netscape.com/) */ #include @@ -40,14 +40,6 @@ Boston, MA 02111-1307, USA. */ #include "eldap.h" -#ifdef HAVE_NS_LDAP -# define HAVE_LDAP_SET_OPTION 1 -# define HAVE_LDAP_GET_ERRNO 1 -#else -# undef HAVE_LDAP_SET_OPTION -# undef HAVE_LDAP_GET_ERRNO -#endif - static int ldap_default_port; static Lisp_Object Vldap_default_base; @@ -69,16 +61,27 @@ extern Lisp_Object Qnever, Qalways, Qfind; /************************************************************************/ static void -signal_ldap_error (LDAP *ld) +signal_ldap_error (LDAP *ld, LDAPMessage *res, int ldap_err) { -#ifdef HAVE_LDAP_GET_ERRNO - signal_simple_error - ("LDAP error", - build_string (ldap_err2string (ldap_get_lderrno (ld, NULL, NULL)))); + if (ldap_err <= 0) + { +#if defined HAVE_LDAP_PARSE_RESULT + int err; + ldap_err = ldap_parse_result (ld, res, + &err, + NULL, NULL, NULL, NULL, 0); + if (ldap_err == LDAP_SUCCESS) + ldap_err = err; +#elif defined HAVE_LDAP_GET_LDERRNO + ldap_err = ldap_get_lderrno (ld, NULL, NULL); +#elif defined HAVE_LDAP_RESULT2ERROR + ldap_err = ldap_result2error (ld, res, 0); #else - signal_simple_error ("LDAP error", - build_string (ldap_err2string (ld->ld_errno))); + ldap_err = ld->ld_errno; #endif + } + signal_simple_error ("LDAP error", + build_string (ldap_err2string (ldap_err))); } @@ -113,7 +116,7 @@ print_ldap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string ("#host, printcharfun, 1); - if (!ldap->livep) + if (!ldap->ld) write_c_string ("(dead) ",printcharfun); sprintf (buf, " 0x%x>", (unsigned int)ldap); write_c_string (buf, printcharfun); @@ -127,7 +130,6 @@ allocate_ldap (void) ldap->ld = NULL; ldap->host = Qnil; - ldap->livep = 0; return ldap; } @@ -140,13 +142,14 @@ finalize_ldap (void *header, int for_disksave) signal_simple_error ("Can't dump an emacs containing LDAP objects", make_ldap (ldap)); - if (ldap->livep) + if (ldap->ld) ldap_unbind (ldap->ld); + ldap->ld = NULL; } DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap, mark_ldap, print_ldap, finalize_ldap, - NULL, NULL, struct Lisp_LDAP); + NULL, NULL, 0, struct Lisp_LDAP); @@ -178,7 +181,7 @@ Return t if LDAP is an active LDAP connection. (ldap)) { CHECK_LDAP (ldap); - return (XLDAP (ldap))->livep ? Qt : Qnil; + return (XLDAP (ldap))->ld ? Qt : Qnil; } /************************************************************************/ @@ -299,16 +302,18 @@ the LDAP library XEmacs was compiled with: `simple', `krbv41' and `krbv42'. #ifdef HAVE_LDAP_SET_OPTION - if (ldap_set_option (ld, LDAP_OPT_DEREF, (void *)&ldap_deref) != LDAP_SUCCESS) - signal_ldap_error (ld); - if (ldap_set_option (ld, LDAP_OPT_TIMELIMIT, - (void *)&ldap_timelimit) != LDAP_SUCCESS) - signal_ldap_error (ld); - if (ldap_set_option (ld, LDAP_OPT_SIZELIMIT, - (void *)&ldap_sizelimit) != LDAP_SUCCESS) - signal_ldap_error (ld); - if (ldap_set_option (ld, LDAP_OPT_REFERRALS, LDAP_OPT_ON) != LDAP_SUCCESS) - signal_ldap_error (ld); + if ((err = ldap_set_option (ld, LDAP_OPT_DEREF, + (void *)&ldap_deref)) != LDAP_SUCCESS) + signal_ldap_error (ld, NULL, err); + if ((err = ldap_set_option (ld, LDAP_OPT_TIMELIMIT, + (void *)&ldap_timelimit)) != LDAP_SUCCESS) + signal_ldap_error (ld, NULL, err); + if ((err = ldap_set_option (ld, LDAP_OPT_SIZELIMIT, + (void *)&ldap_sizelimit)) != LDAP_SUCCESS) + signal_ldap_error (ld, NULL, err); + if ((err = ldap_set_option (ld, LDAP_OPT_REFERRALS, + LDAP_OPT_ON)) != LDAP_SUCCESS) + signal_ldap_error (ld, NULL, err); #else /* not HAVE_LDAP_SET_OPTION */ ld->ld_deref = ldap_deref; ld->ld_timelimit = ldap_timelimit; @@ -331,7 +336,6 @@ the LDAP library XEmacs was compiled with: `simple', `krbv41' and `krbv42'. ldap = allocate_ldap (); ldap->ld = ld; ldap->host = host; - ldap->livep = 1; return make_ldap (ldap); } @@ -347,7 +351,7 @@ Close an LDAP connection. CHECK_LIVE_LDAP (ldap); lldap = XLDAP (ldap); ldap_unbind (lldap->ld); - lldap->livep = 0; + lldap->ld = NULL; return Qnil; } @@ -401,7 +405,7 @@ entry according to the value of WITHDN. LDAPMessage *e; BerElement *ptr; char *a, *dn; - int i, rc; + int i, rc, rc2; int matches; struct ldap_unwind_struct unwind; @@ -476,9 +480,9 @@ entry according to the value of WITHDN. NILP (filter) ? "" : (char *) XSTRING_DATA (filter), ldap_attributes, NILP (attrsonly) ? 0 : 1) - == -1) + == -1) { - signal_ldap_error (ld); + signal_ldap_error (ld, NULL, 0); } /* Ensure we don't exit without cleaning up */ @@ -508,9 +512,7 @@ entry according to the value of WITHDN. { dn = ldap_get_dn (ld, e); if (dn == NULL) - { - signal_ldap_error (ld); - } + signal_ldap_error (ld, e, 0); entry = Fcons (build_ext_string (dn, FORMAT_OS), Qnil); } for (a= ldap_first_attribute (ld, e, &ptr); @@ -545,15 +547,22 @@ entry according to the value of WITHDN. } if (rc == -1) - { - signal_ldap_error (ld); - } + signal_ldap_error (ld, unwind.res, 0); + + if (rc == 0) + signal_ldap_error (ld, NULL, LDAP_TIMELIMIT_EXCEEDED); + +#if defined HAVE_LDAP_PARSE_RESULT + rc2 = ldap_parse_result (ld, unwind.res, + &rc, + NULL, NULL, NULL, NULL, 0); + if (rc2 != LDAP_SUCCESS) + rc = rc2; +#elif defined HAVE_LDAP_RESULT2ERROR rc = ldap_result2error (ld, unwind.res, 0); - if ((rc != LDAP_SUCCESS) && - (rc != LDAP_SIZELIMIT_EXCEEDED)) - { - signal_ldap_error (ld); - } +#endif + if ((rc != LDAP_SUCCESS) && (rc != LDAP_SIZELIMIT_EXCEEDED)) + signal_ldap_error (ld, NULL, rc); ldap_msgfree (unwind.res); unwind.res = (LDAPMessage *)NULL; diff --git a/src/eldap.h b/src/eldap.h index e60c8a8..29f9aa9 100644 --- a/src/eldap.h +++ b/src/eldap.h @@ -37,8 +37,6 @@ struct Lisp_LDAP LDAP *ld; /* Name of the host we connected to */ Lisp_Object host; - /* Status of the LDAP connection. */ - int livep; }; @@ -52,7 +50,7 @@ DECLARE_LRECORD (ldap, struct Lisp_LDAP); #define CHECK_LIVE_LDAP(ldap) do { \ CHECK_LDAP (ldap); \ - if (!XLDAP (ldap)->livep) \ + if (!XLDAP (ldap)->ld) \ signal_simple_error ("Attempting to access closed LDAP connection", \ ldap); \ } while (0) diff --git a/src/elhash.c b/src/elhash.c index a802123..b53f7a0 100644 --- a/src/elhash.c +++ b/src/elhash.c @@ -364,11 +364,28 @@ finalize_hash_table (void *header, int for_disksave) } } +static const struct lrecord_description hentry_description_1[] = { + { XD_LISP_OBJECT, offsetof(hentry, key), 2 }, + { XD_END } +}; + +static const struct struct_description hentry_description = { + sizeof(hentry), + hentry_description_1 +}; + +static const struct lrecord_description hash_table_description[] = { + { XD_SIZE_T, offsetof(Lisp_Hash_Table, size) }, + { XD_STRUCT_PTR, offsetof(Lisp_Hash_Table, hentries), XD_INDIRECT(0), &hentry_description }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table, mark_hash_table, print_hash_table, finalize_hash_table, /* #### Implement hash_table_hash()! */ hash_table_equal, 0, + hash_table_description, Lisp_Hash_Table); static Lisp_Hash_Table * diff --git a/src/emacs.c b/src/emacs.c index 05e8ed4..a60922f 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -943,6 +943,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) syms_of_gui (); #endif + syms_of_gutter (); syms_of_indent (); syms_of_intl (); syms_of_keymap (); @@ -1165,6 +1166,7 @@ main_1 (int argc, char **argv, char **envp, int restart) specifier_type_create (); specifier_type_create_image (); + specifier_type_create_gutter (); specifier_type_create_objects (); #ifdef HAVE_TOOLBARS specifier_type_create_toolbar (); @@ -1200,6 +1202,9 @@ main_1 (int argc, char **argv, char **envp, int restart) image_instantiator_format_create (); image_instantiator_format_create_glyphs_eimage (); image_instantiator_format_create_glyphs_widget (); +#ifdef HAVE_TTY + image_instantiator_format_create_glyphs_tty (); +#endif #ifdef HAVE_X_WINDOWS image_instantiator_format_create_glyphs_x (); #endif /* HAVE_X_WINDOWS */ @@ -1335,6 +1340,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) vars_of_gui (); #endif + vars_of_gutter (); vars_of_indent (); vars_of_insdel (); vars_of_intl (); @@ -1487,6 +1493,7 @@ main_1 (int argc, char **argv, char **envp, int restart) */ specifier_vars_of_glyphs (); + specifier_vars_of_gutter (); #ifdef HAVE_MENUBARS specifier_vars_of_menubar (); #endif diff --git a/src/eval.c b/src/eval.c index 0f07512..22310ec 100644 --- a/src/eval.c +++ b/src/eval.c @@ -296,7 +296,7 @@ print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) } DEFINE_LRECORD_IMPLEMENTATION ("subr", subr, - this_one_is_unmarkable, print_subr, 0, 0, 0, + this_one_is_unmarkable, print_subr, 0, 0, 0, 0, Lisp_Subr); /************************************************************************/ diff --git a/src/event-Xt.c b/src/event-Xt.c index b729cfa..38b1781 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -78,6 +78,7 @@ Boston, MA 02111-1307, USA. */ #include "events-mod.h" static void enqueue_Xt_dispatch_event (Lisp_Object event); +static void handle_focus_event_1 (struct frame *f, int in_p); static struct event_stream *Xt_event_stream; @@ -807,7 +808,8 @@ x_to_emacs_keysym (XKeyPressedEvent *event, int simple_p) len = XmImMbLookupString (XtWindowToWidget (event->display, event->window), event, bufptr, bufsiz, &keysym, &status); #else /* XIM_XLIB */ - len = XmbLookupString (xic, event, bufptr, bufsiz, &keysym, &status); + if (xic) + len = XmbLookupString (xic, event, bufptr, bufsiz, &keysym, &status); #endif /* HAVE_XIM */ #ifdef DEBUG_XEMACS @@ -1046,6 +1048,7 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event) { XButtonEvent *ev = &x_event->xbutton; struct frame *frame = x_window_to_frame (d, ev->window); + if (! frame) return 0; /* not for us */ XSETFRAME (emacs_event->channel, frame); @@ -1058,7 +1061,11 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event) emacs_event->event.button.button = ev->button; emacs_event->event.button.x = ev->x; emacs_event->event.button.y = ev->y; - + /* because we don't seem to get a FocusIn event for button clicks + when a widget-glyph is selected we will assume that we want the + focus if a button gets pressed. */ + if (x_event->type == ButtonPress) + handle_focus_event_1 (frame, 1); } } break; @@ -1304,6 +1311,9 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event) static void handle_focus_event_1 (struct frame *f, int in_p) { +#if XtSpecificationRelease > 5 + Widget focus_widget = XtGetKeyboardFocusWidget (FRAME_X_TEXT_WIDGET (f)); +#endif #ifdef HAVE_XIM XIM_focus_event (f, in_p); #endif /* HAVE_XIM */ @@ -1319,7 +1329,26 @@ handle_focus_event_1 (struct frame *f, int in_p) Actually, we half handle it: we handle it as far as changing the box cursor for redisplay, but we don't call any hooks or do any select-frame stuff until after the sit-for. - */ + + Unfortunately native widgets break the model because they grab + the keyboard focus and nothing sets it back again. I cannot find + any reasonable way to do this elsewhere so we assert here that + the keyboard focus is on the emacs text widget. Menus and dialogs + 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 + click in the frame. Why is this? */ + if (in_p +#if XtSpecificationRelease > 5 + && FRAME_X_TEXT_WIDGET (f) != focus_widget +#endif + ) + { + lw_set_keyboard_focus (FRAME_X_SHELL_WIDGET (f), + FRAME_X_TEXT_WIDGET (f)); + } + /* do the generic event-stream stuff. */ { Lisp_Object frm; Lisp_Object conser; @@ -1404,7 +1433,7 @@ handle_map_event (struct frame *f, XEvent *event) /* Bleagh!!!!!! Apparently some window managers (e.g. MWM) send synthetic MapNotify events when a window is first - created, EVENT IF IT'S CREATED ICONIFIED OR INVISIBLE. + created, EVEN IF IT'S CREATED ICONIFIED OR INVISIBLE. Or something like that. We initially tried a different solution below, but that ran into a different window- manager bug. @@ -1579,6 +1608,7 @@ emacs_Xt_handle_magic_event (struct Lisp_Event *emacs_event) case FocusIn: case FocusOut: + #ifdef EXTERNAL_WIDGET /* External widget lossage: Ben said: YUCK. The only way to make focus changes work properly is to diff --git a/src/event-msw.c b/src/event-msw.c index 4042366..45e77ee 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -72,6 +72,10 @@ typedef unsigned int SOCKET; #include #include +#if defined (__CYGWIN32__) && !defined (CYGWIN_VERSION_DLL_MAJOR) +typedef NMHDR *LPNMHDR; +#endif + #ifdef HAVE_MENUBARS #define ADJR_MENUFLAG TRUE #else @@ -1327,6 +1331,7 @@ mswindows_need_event (int badly_p) if (active == 0) { + assert (!badly_p); return; /* timeout */ } else if (active > 0) @@ -1925,17 +1930,20 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) Qcancel_mode_internal, Qnil); break; -#ifdef HAVE_TOOLBARS case WM_NOTIFY: { - LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam; - Lisp_Object btext; - if (tttext->hdr.code == TTN_NEEDTEXT) + LPNMHDR nmhdr = (LPNMHDR)lParam; + + if (nmhdr->code == TTN_NEEDTEXT) { +#ifdef HAVE_TOOLBARS + LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam; + Lisp_Object btext; + /* find out which toolbar */ frame = XFRAME (mswindows_find_frame (hwnd)); btext = mswindows_get_toolbar_button_text ( frame, - tttext->hdr.idFrom ); + nmhdr->idFrom ); tttext->lpszText = NULL; tttext->hinst = NULL; @@ -1947,13 +1955,30 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS, tttext->lpszText); } -#if 0 - tttext->uFlags |= TTF_DI_SETITEM; #endif - } + } + /* handle tree view callbacks */ + else if (nmhdr->code == TVN_SELCHANGED) + { + NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam; + frame = XFRAME (mswindows_find_frame (hwnd)); + mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam); + } + /* handle tab control callbacks */ + else if (nmhdr->code == TCN_SELCHANGE) + { + TC_ITEM item; + int index = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0); + frame = XFRAME (mswindows_find_frame (hwnd)); + + item.mask = TCIF_PARAM; + SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)index, + (LPARAM)&item); + + mswindows_handle_gui_wm_command (frame, 0, item.lParam); + } } break; -#endif case WM_PAINT: { @@ -2552,7 +2577,7 @@ emacs_mswindows_next_event (struct Lisp_Event *emacs_event) mswindows_need_event (1); - event = mswindows_dequeue_dispatch_event (!NILP(mswindows_u_dispatch_event_queue)); + event = mswindows_dequeue_dispatch_event (); XSETEVENT (event2, emacs_event); Fcopy_event (event, event2); Fdeallocate_event (event); diff --git a/src/event-stream.c b/src/event-stream.c index e294ae6..f008935 100644 --- a/src/event-stream.c +++ b/src/event-stream.c @@ -413,7 +413,7 @@ finalize_command_builder (void *header, int for_disksave) DEFINE_LRECORD_IMPLEMENTATION ("command-builder", command_builder, mark_command_builder, internal_object_printer, - finalize_command_builder, 0, 0, + finalize_command_builder, 0, 0, 0, struct command_builder); static void diff --git a/src/events.c b/src/events.c index f484001..1a2db77 100644 --- a/src/events.c +++ b/src/events.c @@ -375,7 +375,7 @@ event_hash (Lisp_Object obj, int depth) DEFINE_BASIC_LRECORD_IMPLEMENTATION ("event", event, mark_event, print_event, 0, event_equal, - event_hash, struct Lisp_Event); + event_hash, 0, struct Lisp_Event); DEFUN ("make-event", Fmake_event, 0, 2, 0, /* diff --git a/src/extents.c b/src/extents.c index 6360a4d..e11eded 100644 --- a/src/extents.c +++ b/src/extents.c @@ -927,7 +927,7 @@ mark_extent_auxiliary (Lisp_Object obj, void (*markobj) (Lisp_Object)) DEFINE_LRECORD_IMPLEMENTATION ("extent-auxiliary", extent_auxiliary, mark_extent_auxiliary, internal_object_printer, - 0, 0, 0, struct extent_auxiliary); + 0, 0, 0, 0, struct extent_auxiliary); void allocate_extent_auxiliary (EXTENT ext) @@ -1025,7 +1025,7 @@ finalize_extent_info (void *header, int for_disksave) DEFINE_LRECORD_IMPLEMENTATION ("extent-info", extent_info, mark_extent_info, internal_object_printer, - finalize_extent_info, 0, 0, + finalize_extent_info, 0, 0, 0, struct extent_info); static Lisp_Object @@ -2924,6 +2924,12 @@ static int extent_putprop (Lisp_Object obj, Lisp_Object prop, static int extent_remprop (Lisp_Object obj, Lisp_Object prop); static Lisp_Object extent_plist (Lisp_Object obj); +static const struct lrecord_description extent_description[] = { + { XD_LISP_OBJECT, offsetof(struct extent, object), 2 }, + { XD_LISP_OBJECT, offsetof(struct extent, plist), 1 }, + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent, mark_extent, print_extent, @@ -2933,6 +2939,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent, Shaft city. */ 0, extent_equal, extent_hash, + extent_description, extent_getprop, extent_putprop, extent_remprop, extent_plist, struct extent); diff --git a/src/faces.c b/src/faces.c index 7ce8d10..732c018 100644 --- a/src/faces.c +++ b/src/faces.c @@ -266,7 +266,7 @@ face_plist (Lisp_Object obj) DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face, mark_face, print_face, 0, face_equal, - face_hash, face_getprop, + face_hash, 0, face_getprop, face_putprop, face_remprop, face_plist, struct Lisp_Face); diff --git a/src/file-coding.c b/src/file-coding.c index ab93ad9..bc1a874 100644 --- a/src/file-coding.c +++ b/src/file-coding.c @@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" + #include "buffer.h" #include "elhash.h" #include "insdel.h" @@ -244,10 +245,46 @@ static Lisp_Object mark_coding_system (Lisp_Object, void (*) (Lisp_Object)); static void print_coding_system (Lisp_Object, Lisp_Object, int); static void finalize_coding_system (void *header, int for_disksave); +#ifdef MULE +static const struct lrecord_description ccs_description_1[] = { + { XD_LISP_OBJECT, offsetof(charset_conversion_spec, from_charset), 2 }, + { XD_END } +}; + +static const struct struct_description ccs_description = { + sizeof(charset_conversion_spec), + ccs_description_1 +}; + +static const struct lrecord_description ccsd_description_1[] = { + XD_DYNARR_DESC(charset_conversion_spec_dynarr, &ccs_description), + { XD_END } +}; + +static const struct struct_description ccsd_description = { + sizeof(charset_conversion_spec_dynarr), + ccsd_description_1 +}; +#endif + +static const struct lrecord_description coding_system_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, name), 2 }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, mnemonic), 3 }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, eol_lf), 3 }, +#ifdef MULE + { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, iso2022.initial_charset), 4 }, + { XD_STRUCT_PTR, offsetof(struct Lisp_Coding_System, iso2022.input_conv), 1, &ccsd_description }, + { XD_STRUCT_PTR, offsetof(struct Lisp_Coding_System, iso2022.output_conv), 1, &ccsd_description }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, ccl.decode), 2 }, +#endif + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("coding-system", coding_system, mark_coding_system, print_coding_system, finalize_coding_system, - 0, 0, struct Lisp_Coding_System); + 0, 0, coding_system_description, + struct Lisp_Coding_System); static Lisp_Object mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) @@ -1587,26 +1624,65 @@ determine_real_coding_system (Lstream *stream, Lisp_Object *codesys_in_out, if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT || *eol_type_in_out == EOL_AUTODETECT) { + unsigned char random_buffer[4096]; + int nread; + Lisp_Object coding_system = Qnil; - while (1) + nread = Lstream_read (stream, random_buffer, sizeof (random_buffer)); + if (nread) { - unsigned char random_buffer[4096]; - int nread; + unsigned char *cp = random_buffer; - nread = Lstream_read (stream, random_buffer, sizeof (random_buffer)); - if (!nread) - break; - if (detect_coding_type (&decst, random_buffer, nread, - XCODING_SYSTEM_TYPE (*codesys_in_out) != - CODESYS_AUTODETECT)) - break; - } + while (cp < random_buffer + nread) + { + if ((*cp++ == 'c') && (cp < random_buffer + nread) && + (*cp++ == 'o') && (cp < random_buffer + nread) && + (*cp++ == 'd') && (cp < random_buffer + nread) && + (*cp++ == 'i') && (cp < random_buffer + nread) && + (*cp++ == 'n') && (cp < random_buffer + nread) && + (*cp++ == 'g') && (cp < random_buffer + nread) && + (*cp++ == ':') && (cp < random_buffer + nread)) + { + unsigned char coding_system_name[4096 - 6]; + unsigned char *np = coding_system_name; + while ( (cp < random_buffer + nread) + && ((*cp == ' ') || (*cp == '\t')) ) + { + cp++; + } + while ( (cp < random_buffer + nread) && + (*cp != ' ') && (*cp != '\t') && (*cp != ';') ) + { + *np++ = *cp++; + } + *np = 0; + coding_system + = Ffind_coding_system (intern (coding_system_name)); + break; + } + } + if (EQ(coding_system, Qnil)) + do{ + if (detect_coding_type (&decst, random_buffer, nread, + XCODING_SYSTEM_TYPE (*codesys_in_out) + != CODESYS_AUTODETECT)) + break; + nread = Lstream_read (stream, + random_buffer, sizeof (random_buffer)); + if (!nread) + break; + } while(1); + } *eol_type_in_out = decst.eol_type; if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT) - *codesys_in_out = coding_system_from_mask (decst.mask); + { + if (EQ(coding_system, Qnil)) + *codesys_in_out = coding_system_from_mask (decst.mask); + else + *codesys_in_out = coding_system; + } } - /* If we absolutely can't determine the EOL type, just assume LF. */ if (*eol_type_in_out == EOL_AUTODETECT) *eol_type_in_out = EOL_LF; @@ -1860,6 +1936,9 @@ struct decoding_stream /* Additional information (the state of the running CCL program) used by the CCL decoder. */ struct ccl_program ccl; + + /* counter for UTF-8 or UCS-4 */ + unsigned char counter; #endif struct detection_state decst; }; @@ -1994,6 +2073,7 @@ reset_decoding_stream (struct decoding_stream *str) { setup_ccl_program (&str->ccl, CODING_SYSTEM_CCL_DECODE (str->codesys)); } + str->counter = 0; #endif /* MULE */ str->flags = str->ch = 0; } @@ -2177,6 +2257,7 @@ mule_decode (Lstream *decoding, CONST unsigned char *src, decode_coding_utf8 (decoding, src, dst, n); break; case CODESYS_CCL: + str->ccl.last_block = str->flags & CODING_STATE_END; ccl_driver (&str->ccl, src, dst, n, 0, CCL_MODE_DECODING); break; case CODESYS_ISO2022: @@ -2593,6 +2674,7 @@ mule_encode (Lstream *encoding, CONST unsigned char *src, encode_coding_utf8 (encoding, src, dst, n); break; case CODESYS_CCL: + str->ccl.last_block = str->flags & CODING_STATE_END; ccl_driver (&str->ccl, src, dst, n, 0, CCL_MODE_ENCODING); break; case CODESYS_ISO2022: @@ -3373,31 +3455,33 @@ decode_coding_ucs4 (Lstream *decoding, CONST unsigned char *src, struct decoding_stream *str = DECODING_STREAM_DATA (decoding); unsigned int flags = str->flags; unsigned int ch = str->ch; + unsigned char counter = str->counter; while (n--) { unsigned char c = *src++; - switch (flags) + switch (counter) { case 0: ch = c; - flags = 3; + counter = 3; break; case 1: decode_ucs4 ( ( ch << 8 ) | c, dst); ch = 0; - flags = 0; + counter = 0; break; default: ch = ( ch << 8 ) | c; - flags--; + counter--; } } - if (flags & CODING_STATE_END) + if (counter & CODING_STATE_END) DECODE_OUTPUT_PARTIAL_CHAR (ch); str->flags = flags; str->ch = ch; + str->counter = counter; } static void @@ -3582,37 +3666,38 @@ decode_coding_utf8 (Lstream *decoding, CONST unsigned char *src, unsigned int flags = str->flags; unsigned int ch = str->ch; eol_type_t eol_type = str->eol_type; + unsigned char counter = str->counter; while (n--) { unsigned char c = *src++; - switch (flags) + switch (counter) { case 0: if ( c >= 0xfc ) { ch = c & 0x01; - flags = 5; + counter = 5; } else if ( c >= 0xf8 ) { ch = c & 0x03; - flags = 4; + counter = 4; } else if ( c >= 0xf0 ) { ch = c & 0x07; - flags = 3; + counter = 3; } else if ( c >= 0xe0 ) { ch = c & 0x0f; - flags = 2; + counter = 2; } else if ( c >= 0xc0 ) { ch = c & 0x1f; - flags = 1; + counter = 1; } else { @@ -3624,11 +3709,11 @@ decode_coding_utf8 (Lstream *decoding, CONST unsigned char *src, ch = ( ch << 6 ) | ( c & 0x3f ); decode_ucs4 (ch, dst); ch = 0; - flags = 0; + counter = 0; break; default: ch = ( ch << 6 ) | ( c & 0x3f ); - flags--; + counter--; } label_continue_loop:; } @@ -3638,6 +3723,7 @@ decode_coding_utf8 (Lstream *decoding, CONST unsigned char *src, str->flags = flags; str->ch = ch; + str->counter = counter; } #ifndef UTF2000 diff --git a/src/floatfns.c b/src/floatfns.c index 2965f52..a0fd427 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -179,9 +179,14 @@ float_hash (Lisp_Object obj, int depth) return (unsigned long) fmod (extract_float (obj), 4e9); } +static const struct lrecord_description float_description[] = { + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float, mark_float, print_float, 0, float_equal, - float_hash, struct Lisp_Float); + float_hash, float_description, + struct Lisp_Float); /* Extract a Lisp number as a `double', or signal an error. */ diff --git a/src/fns.c b/src/fns.c index 4beda3a..55d5e2f 100644 --- a/src/fns.c +++ b/src/fns.c @@ -113,7 +113,7 @@ bit_vector_hash (Lisp_Object obj, int depth) DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bit-vector", bit_vector, mark_bit_vector, print_bit_vector, 0, - bit_vector_equal, bit_vector_hash, + bit_vector_equal, bit_vector_hash, 0, struct Lisp_Bit_Vector); DEFUN ("identity", Fidentity, 1, 1, 0, /* diff --git a/src/frame.c b/src/frame.c index bd85ae4..5caeece 100644 --- a/src/frame.c +++ b/src/frame.c @@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */ #include "faces.h" #include "frame.h" #include "glyphs.h" +#include "gutter.h" #include "menubar.h" #include "redisplay.h" #include "scrollbar.h" @@ -155,7 +156,7 @@ print_frame (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) } DEFINE_LRECORD_IMPLEMENTATION ("frame", frame, - mark_frame, print_frame, 0, 0, 0, + mark_frame, print_frame, 0, 0, 0, 0, struct frame); static void @@ -460,12 +461,18 @@ See `set-frame-properties', `default-x-frame-plist', and reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); reset_subwindow_cachels (f); change_frame_size (f, f->height, f->width, 0); + } MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); Fset_frame_properties (frame, props); MAYBE_FRAMEMETH (f, init_frame_3, (f)); + /* now initialise the gutters, this won't change the frame size + so is ok here. */ + if (!DEVICE_STREAM_P (d)) + init_frame_gutters (f); + /* Hallelujah, praise the lord. */ f->init_finished = 1; @@ -893,7 +900,10 @@ set_frame_selected_window (struct frame *f, Lisp_Object window) { #ifdef HAVE_TOOLBARS if (!EQ (f->last_nonminibuf_window, window)) - MARK_TOOLBAR_CHANGED; + { + MARK_TOOLBAR_CHANGED; + MARK_GUTTER_CHANGED; + } #endif f->last_nonminibuf_window = window; } @@ -1526,6 +1536,7 @@ delete_frame_internal (struct frame *f, int force, #ifdef HAVE_TOOLBARS free_frame_toolbars (f); #endif + free_frame_gutters (f); /* This must be done before the window and window_mirror structures are freed. The scrollbar information is attached to them. */ diff --git a/src/frame.h b/src/frame.h index ff5b332..be75ff9 100644 --- a/src/frame.h +++ b/src/frame.h @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "device.h" #include "glyphs.h" +#include "redisplay.h" #define FRAME_TYPE_NAME(f) ((f)->framemeths->name) #define FRAME_TYPE(f) ((f)->framemeths->symbol) @@ -109,6 +110,10 @@ struct frame unsigned int current_toolbar_size[4]; #endif + /* Dynamic array of display lines for gutters */ + display_line_dynarr *current_display_lines; + display_line_dynarr *desired_display_lines; + /* A structure of auxiliary data specific to the device type. struct x_frame is used for X window frames; defined in console-x.h */ void *frame_data; @@ -160,6 +165,11 @@ Value : Emacs meaning :f-v-p : X meaning unsigned int bottom_toolbar_was_visible :1; unsigned int left_toolbar_was_visible :1; unsigned int right_toolbar_was_visible :1; + /* gutter visibility */ + unsigned int top_gutter_was_visible :1; + unsigned int bottom_gutter_was_visible :1; + unsigned int left_gutter_was_visible :1; + unsigned int right_gutter_was_visible :1; /* redisplay flags */ unsigned int buffers_changed :1; @@ -175,6 +185,7 @@ Value : Emacs meaning :f-v-p : X meaning unsigned int point_changed :1; unsigned int size_changed :1; unsigned int toolbar_changed :1; + unsigned int gutter_changed :1; unsigned int windows_changed :1; unsigned int windows_structure_changed :1; unsigned int window_face_cache_reset :1; /* used by expose handler */ @@ -342,6 +353,19 @@ extern int frame_changed; toolbar_changed = 1; \ } while (0) +#define MARK_FRAME_GUTTERS_CHANGED(f) do { \ + struct frame *mftc_f = (f); \ + mftc_f->gutter_changed = 1; \ + mftc_f->modiff++; \ + if (!NILP (mftc_f->device)) \ + { \ + struct device *mftc_d = XDEVICE (mftc_f->device); \ + MARK_DEVICE_GUTTERS_CHANGED (mftc_d); \ + } \ + else \ + gutter_changed = 1; \ +} while (0) + #define MARK_FRAME_SIZE_CHANGED(f) do { \ struct frame *mfsc_f = (f); \ mfsc_f->size_changed = 1; \ diff --git a/src/gdbinit b/src/gdbinit index f9a8c7e..b7d238d 100644 --- a/src/gdbinit +++ b/src/gdbinit @@ -228,151 +228,151 @@ define pobj printf "Char: %d\n", $val end else - if $type == Lisp_Type_String || $imp == lrecord_string + if $type == Lisp_Type_String || $imp == &lrecord_string pstruct Lisp_String else - if $type == Lisp_Type_Cons || $imp == lrecord_cons + if $type == Lisp_Type_Cons || $imp == &lrecord_cons pstruct Lisp_Cons else - if $type == Lisp_Type_Symbol || $imp == lrecord_symbol + if $type == Lisp_Type_Symbol || $imp == &lrecord_symbol pstruct Lisp_Symbol printf "Symbol name: %s\n", $xstruct->name->data else - if $type == Lisp_Type_Vector || $imp == lrecord_vector + if $type == Lisp_Type_Vector || $imp == &lrecord_vector pstruct Lisp_Vector printf "Vector of length %d\n", $xstruct->size #print *($xstruct->data) @ $xstruct->size else - if $imp == lrecord_bit_vector + if $imp == &lrecord_bit_vector pstruct Lisp_Bit_Vector else - if $imp == lrecord_buffer + if $imp == &lrecord_buffer pstruct buffer else - if $imp == lrecord_char_table + if $imp == &lrecord_char_table pstruct Lisp_Char_Table else - if $imp == lrecord_char_table_entry + if $imp == &lrecord_char_table_entry pstruct Lisp_Char_Table_Entry else - if $imp == lrecord_charset + if $imp == &lrecord_charset pstruct Lisp_Charset else - if $imp == lrecord_coding_system + if $imp == &lrecord_coding_system pstruct Lisp_Coding_System else - if $imp == lrecord_color_instance + if $imp == &lrecord_color_instance pstruct Lisp_Color_Instance else - if $imp == lrecord_command_builder + if $imp == &lrecord_command_builder pstruct command_builder else - if $imp == lrecord_compiled_function + if $imp == &lrecord_compiled_function pstruct Lisp_Compiled_Function else - if $imp == lrecord_console + if $imp == &lrecord_console pstruct console else - if $imp == lrecord_database + if $imp == &lrecord_database pstruct Lisp_Database else - if $imp == lrecord_device + if $imp == &lrecord_device pstruct device else - if $imp == lrecord_event + if $imp == &lrecord_event pstruct Lisp_Event else - if $imp == lrecord_extent + if $imp == &lrecord_extent pstruct extent else - if $imp == lrecord_extent_auxiliary + if $imp == &lrecord_extent_auxiliary pstruct extent_auxiliary else - if $imp == lrecord_extent_info + if $imp == &lrecord_extent_info pstruct extent_info else - if $imp == lrecord_face + if $imp == &lrecord_face pstruct Lisp_Face else - if $imp == lrecord_float + if $imp == &lrecord_float pstruct Lisp_Float else - if $imp == lrecord_font_instance + if $imp == &lrecord_font_instance pstruct Lisp_Font_Instance else - if $imp == lrecord_frame + if $imp == &lrecord_frame pstruct frame else - if $imp == lrecord_glyph + if $imp == &lrecord_glyph pstruct Lisp_Glyph else - if $imp == lrecord_hash_table + if $imp == &lrecord_hash_table pstruct Lisp_Hash_Table else - if $imp == lrecord_image_instance + if $imp == &lrecord_image_instance pstruct Lisp_Image_Instance else - if $imp == lrecord_keymap + if $imp == &lrecord_keymap pstruct Lisp_Keymap else - if $imp == lrecord_lcrecord_list + if $imp == &lrecord_lcrecord_list pstruct lcrecord_list else - if $imp == lrecord_lstream + if $imp == &lrecord_lstream pstruct lstream else - if $imp == lrecord_marker + if $imp == &lrecord_marker pstruct Lisp_Marker else - if $imp == lrecord_opaque + if $imp == &lrecord_opaque pstruct Lisp_Opaque else - if $imp == lrecord_opaque_list + if $imp == &lrecord_opaque_list pstruct Lisp_Opaque_List else - if $imp == lrecord_popup_data + if $imp == &lrecord_popup_data pstruct popup_data else - if $imp == lrecord_process + if $imp == &lrecord_process pstruct Lisp_Process else - if $imp == lrecord_range_table + if $imp == &lrecord_range_table pstruct Lisp_Range_Table else - if $imp == lrecord_specifier + if $imp == &lrecord_specifier pstruct Lisp_Specifier else - if $imp == lrecord_subr + if $imp == &lrecord_subr pstruct Lisp_Subr else - if $imp == lrecord_symbol_value_buffer_local + if $imp == &lrecord_symbol_value_buffer_local pstruct symbol_value_buffer_local else - if $imp == lrecord_symbol_value_forward + if $imp == &lrecord_symbol_value_forward pstruct symbol_value_forward else - if $imp == lrecord_symbol_value_lisp_magic + if $imp == &lrecord_symbol_value_lisp_magic pstruct symbol_value_lisp_magic else - if $imp == lrecord_symbol_value_varalias + if $imp == &lrecord_symbol_value_varalias pstruct symbol_value_varalias else - if $imp == lrecord_toolbar_button + if $imp == &lrecord_toolbar_button pstruct toolbar_button else - if $imp == lrecord_tooltalk_message + if $imp == &lrecord_tooltalk_message pstruct Lisp_Tooltalk_Message else - if $imp == lrecord_tooltalk_pattern + if $imp == &lrecord_tooltalk_pattern pstruct Lisp_Tooltalk_Pattern else - if $imp == lrecord_weak_list + if $imp == &lrecord_weak_list pstruct weak_list else - if $imp == lrecord_window + if $imp == &lrecord_window pstruct window else - if $imp == lrecord_window_configuration + if $imp == &lrecord_window_configuration pstruct window_config else echo Unknown Lisp Object type\n diff --git a/src/general.c b/src/general.c index 973d1e4..06c4db1 100644 --- a/src/general.c +++ b/src/general.c @@ -89,6 +89,7 @@ Lisp_Object Qgap_overhead; Lisp_Object Qgeneric; Lisp_Object Qgeometry; Lisp_Object Qglobal; +Lisp_Object Qgutter; Lisp_Object Qheight; Lisp_Object Qhighlight; Lisp_Object Qicon; @@ -245,6 +246,7 @@ syms_of_general (void) defsymbol (&Qgeneric, "generic"); defsymbol (&Qgeometry, "geometry"); defsymbol (&Qglobal, "global"); + defsymbol (&Qgutter, "gutter"); defsymbol (&Qheight, "height"); defsymbol (&Qhighlight, "highlight"); defsymbol (&Qicon, "icon"); diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 646cb54..7a9f8d3 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -1,5 +1,5 @@ /* mswindows-specific glyph objects. - Copyright (C) 1998 Andy Piper. + Copyright (C) 1998, 99 Andy Piper. This file is part of XEmacs. @@ -53,6 +53,22 @@ Boston, MA 02111-1307, USA. */ #define WIDGET_GLYPH_SLOT 0 +DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); +#ifdef HAVE_JPEG +DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg); +#endif +#ifdef HAVE_TIFF +DECLARE_IMAGE_INSTANTIATOR_FORMAT (tiff); +#endif +#ifdef HAVE_PNG +DECLARE_IMAGE_INSTANTIATOR_FORMAT (png); +#endif +#ifdef HAVE_GIF +DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif); +#endif #ifdef HAVE_XPM DEFINE_DEVICE_IIFORMAT (mswindows, xpm); #endif @@ -61,7 +77,7 @@ DEFINE_DEVICE_IIFORMAT (mswindows, xbm); DEFINE_DEVICE_IIFORMAT (mswindows, xface); #endif DEFINE_DEVICE_IIFORMAT (mswindows, button); -DEFINE_DEVICE_IIFORMAT (mswindows, edit); +DEFINE_DEVICE_IIFORMAT (mswindows, edit_field); #if 0 DEFINE_DEVICE_IIFORMAT (mswindows, group); #endif @@ -69,8 +85,10 @@ DEFINE_DEVICE_IIFORMAT (mswindows, subwindow); DEFINE_DEVICE_IIFORMAT (mswindows, widget); DEFINE_DEVICE_IIFORMAT (mswindows, label); DEFINE_DEVICE_IIFORMAT (mswindows, scrollbar); -DEFINE_DEVICE_IIFORMAT (mswindows, combo); -DEFINE_DEVICE_IIFORMAT (mswindows, progress); +DEFINE_DEVICE_IIFORMAT (mswindows, combo_box); +DEFINE_DEVICE_IIFORMAT (mswindows, progress_gauge); +DEFINE_DEVICE_IIFORMAT (mswindows, tree_view); +DEFINE_DEVICE_IIFORMAT (mswindows, tab_control); DEFINE_IMAGE_INSTANTIATOR_FORMAT (bmp); Lisp_Object Qbmp; @@ -89,6 +107,7 @@ mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image, struct frame* f); COLORREF mswindows_string_to_color (CONST char *name); +void check_valid_item_list_1 (Lisp_Object items); #define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3))) @@ -282,7 +301,7 @@ init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii, struct device *d = XDEVICE (device); struct frame *f; void* bmp_buf=0; - int type; + int type = 0; HBITMAP bitmap; HDC hdc; @@ -2031,6 +2050,17 @@ mswindows_map_subwindow (struct Lisp_Image_Instance *p, int x, int y) | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); } +/* resize the subwindow instance */ +static void +mswindows_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h) +{ + SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), + NULL, + 0, 0, w, h, + SWP_NOZORDER | SWP_NOMOVE + | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); +} + /* when you click on a widget you may activate another widget this needs to be checked and all appropriate widgets updated */ static void @@ -2041,7 +2071,7 @@ mswindows_update_subwindow (struct Lisp_Image_Instance *p) /* buttons checked or otherwise */ if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton)) { - if (gui_item_selected_p (&IMAGE_INSTANCE_WIDGET_ITEM (p))) + if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (p))) SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), BM_SETCHECK, (WPARAM)BST_CHECKED, 0); else @@ -2055,19 +2085,26 @@ mswindows_update_subwindow (struct Lisp_Image_Instance *p) callbacks. The hashtable is weak so deregistration is handled automatically */ static int -mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain) +mswindows_register_gui_item (Lisp_Object gui, Lisp_Object domain) { Lisp_Object frame = FW_FRAME (domain); struct frame* f = XFRAME (frame); - int id = gui_item_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), - &XIMAGE_INSTANCE_WIDGET_ITEM (instance), - WIDGET_GLYPH_SLOT); + int id = gui_item_id_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), + gui, + WIDGET_GLYPH_SLOT); Fputhash (make_int (id), - XIMAGE_INSTANCE_WIDGET_CALLBACK (instance), + XGUI_ITEM (gui)->callback, FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f)); return id; } +static int +mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain) +{ + return mswindows_register_gui_item (XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM (instance), + domain); +} + static void mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, @@ -2164,7 +2201,6 @@ mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii, /************************************************************************/ /* widgets */ /************************************************************************/ - static void mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, @@ -2182,7 +2218,8 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat Extbyte* nm=0; HWND wnd; int id = 0xffff; - struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii); + Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); + struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui); if (!DEVICE_MSWINDOWS_P (d)) signal_simple_error ("Not an mswindows device", device); @@ -2197,7 +2234,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat groupii = XIMAGE_INSTANCE (group); } #endif - if (!gui_item_active_p (pgui)) + if (!gui_item_active_p (gui)) flags |= WS_DISABLED; style = pgui->style; @@ -2256,10 +2293,11 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat HWND wnd; int flags = BS_NOTIFY; Lisp_Object style; - struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii); + Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); + struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui); Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image); - if (!gui_item_active_p (pgui)) + if (!gui_item_active_p (gui)) flags |= WS_DISABLED; if (!NILP (glyph)) @@ -2291,7 +2329,7 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* set the checked state */ - if (gui_item_selected_p (pgui)) + if (gui_item_selected_p (gui)) SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); else SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); @@ -2309,7 +2347,7 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat /* instantiate an edit control */ static void -mswindows_edit_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, +mswindows_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { @@ -2320,9 +2358,9 @@ mswindows_edit_instantiate (Lisp_Object image_instance, Lisp_Object instantiator WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT); } -/* instantiate an edit control */ +/* instantiate a progress gauge */ static void -mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, +mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { @@ -2352,6 +2390,206 @@ mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instanti #endif } +/* instantiate a tree view widget */ +static HTREEITEM add_tree_item (Lisp_Object image_instance, + HWND wnd, HTREEITEM parent, Lisp_Object entry, + int children, Lisp_Object domain) +{ + TV_INSERTSTRUCT tvitem; + HTREEITEM ret; + + tvitem.hParent = parent; + tvitem.hInsertAfter = TVI_LAST; + tvitem.item.mask = TVIF_TEXT | TVIF_CHILDREN; + tvitem.item.cChildren = children; + + if (VECTORP (entry)) + { + /* we always maintain the real gui item at the head of the + list. We have to put them in the list in the first place + because the whole model assumes that the glyph instances have + references to all the associated data. If we didn't do this + GC would bite us badly. */ + Lisp_Object gui = gui_parse_item_keywords_no_errors (entry); + if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))) + { + Lisp_Object rest = + Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))); + Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest); + } + else + { + XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = + Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui); + } + + tvitem.item.lParam = mswindows_register_gui_item (gui, domain); + tvitem.item.mask |= TVIF_PARAM; + GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, + tvitem.item.pszText); + } + else + GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.item.pszText); + + tvitem.item.cchTextMax = strlen (tvitem.item.pszText); + + if ((ret = (HTREEITEM)SendMessage (wnd, TVM_INSERTITEM, + 0, (LPARAM)&tvitem)) == 0) + signal_simple_error ("error adding tree view entry", entry); + + return ret; +} + +static void add_tree_item_list (Lisp_Object image_instance, + HWND wnd, HTREEITEM parent, Lisp_Object list, + Lisp_Object domain) +{ + Lisp_Object rest; + + /* get the first item */ + parent = add_tree_item (image_instance, wnd, parent, XCAR (list), TRUE, domain); + /* recursively add items to the tree view */ + LIST_LOOP (rest, XCDR (list)) + { + if (LISTP (XCAR (rest))) + add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain); + else + add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain); + } +} + +static void +mswindows_tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + Lisp_Object rest; + HWND wnd; + HTREEITEM parent; + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, WC_TREEVIEW, + WS_TABSTOP | WS_BORDER | PBS_SMOOTH + | TVS_HASLINES | TVS_HASBUTTONS, + WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT); + + wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); + + /* define a root */ + parent = add_tree_item (image_instance, + wnd, NULL, IMAGE_INSTANCE_WIDGET_TEXT (ii), TRUE, + domain); + + /* recursively add items to the tree view */ + LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil)) + { + if (LISTP (XCAR (rest))) + add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain); + else + add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain); + } +} + +/* instantiate a tab control */ +static TC_ITEM* add_tab_item (Lisp_Object image_instance, + HWND wnd, Lisp_Object entry, + Lisp_Object domain, int index) +{ + TC_ITEM tvitem, *ret; + + tvitem.mask = TCIF_TEXT; + + if (VECTORP (entry)) + { + /* we always maintain the real gui item at the head of the + list. We have to put them in the list in the first place + because the whole model assumes that the glyph instances have + references to all the associated data. If we didn't do this + GC would bite us badly. */ + Lisp_Object gui = gui_parse_item_keywords_no_errors (entry); + if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))) + { + Lisp_Object rest = + Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance))); + Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest); + } + else + { + XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = + Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui); + } + + tvitem.lParam = mswindows_register_gui_item (gui, domain); + tvitem.mask |= TCIF_PARAM; + GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, + tvitem.pszText); + } + else + GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.pszText); + + tvitem.cchTextMax = strlen (tvitem.pszText); + + if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM, + index, (LPARAM)&tvitem)) < 0) + signal_simple_error ("error adding tab entry", entry); + + return ret; +} + +static void +mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + Lisp_Object rest; + HWND wnd; + int index = 0; + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, WC_TABCONTROL, + /* borders don't suit tabs so well */ + WS_TABSTOP, + WS_EX_CONTROLPARENT); + + wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); + /* add items to the tab */ + LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil)) + { + add_tab_item (image_instance, wnd, XCAR (rest), domain, index); + index++; + } +} + +/* set the properties of a tab control */ +static Lisp_Object +mswindows_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop, + Lisp_Object val) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + if (EQ (prop, Q_items)) + { + HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); + int index = 0; + Lisp_Object rest; + check_valid_item_list_1 (val); + + /* delete the pre-existing items */ + SendMessage (wnd, TCM_DELETEALLITEMS, 0, 0); + + /* add items to the tab */ + LIST_LOOP (rest, val) + { + add_tab_item (image_instance, wnd, XCAR (rest), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii), index); + index++; + } + + return Qt; + } + return Qunbound; +} + /* instantiate a static control possible for putting other things in */ static void mswindows_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, @@ -2391,7 +2629,7 @@ mswindows_scrollbar_instantiate (Lisp_Object image_instance, Lisp_Object instant /* instantiate a combo control */ static void -mswindows_combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, +mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { @@ -2464,7 +2702,7 @@ mswindows_button_property (Lisp_Object image_instance, Lisp_Object prop) /* get properties of a combo box */ static Lisp_Object -mswindows_combo_property (Lisp_Object image_instance, Lisp_Object prop) +mswindows_combo_box_property (Lisp_Object image_instance, Lisp_Object prop) { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); @@ -2501,7 +2739,7 @@ mswindows_widget_set_property (Lisp_Object image_instance, Lisp_Object prop, /* set the properties of a progres guage */ static Lisp_Object -mswindows_progress_set_property (Lisp_Object image_instance, Lisp_Object prop, +mswindows_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop, Lisp_Object val) { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); @@ -2542,11 +2780,16 @@ console_type_create_glyphs_mswindows (void) CONSOLE_HAS_METHOD (mswindows, image_instance_hash); CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage); CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file); + CONSOLE_HAS_METHOD (mswindows, resize_subwindow); } void image_instantiator_format_create_glyphs_mswindows (void) { + IIFORMAT_VALID_CONSOLE (mswindows, nothing); + IIFORMAT_VALID_CONSOLE (mswindows, string); + IIFORMAT_VALID_CONSOLE (mswindows, formatted_string); + IIFORMAT_VALID_CONSOLE (mswindows, inherit); /* image-instantiator types */ #ifdef HAVE_XPM INITIALIZE_DEVICE_IIFORMAT (mswindows, xpm); @@ -2558,12 +2801,25 @@ image_instantiator_format_create_glyphs_mswindows (void) INITIALIZE_DEVICE_IIFORMAT (mswindows, xface); IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate); #endif +#ifdef HAVE_JPEG + IIFORMAT_VALID_CONSOLE (mswindows, jpeg); +#endif +#ifdef HAVE_TIFF + IIFORMAT_VALID_CONSOLE (mswindows, tiff); +#endif +#ifdef HAVE_PNG + IIFORMAT_VALID_CONSOLE (mswindows, png); +#endif +#ifdef HAVE_GIF + IIFORMAT_VALID_CONSOLE (mswindows, gif); +#endif + /* button widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, button); IIFORMAT_HAS_DEVMETHOD (mswindows, button, property); IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate); - INITIALIZE_DEVICE_IIFORMAT (mswindows, edit); - IIFORMAT_HAS_DEVMETHOD (mswindows, edit, instantiate); + INITIALIZE_DEVICE_IIFORMAT (mswindows, edit_field); + IIFORMAT_HAS_DEVMETHOD (mswindows, edit_field, instantiate); INITIALIZE_DEVICE_IIFORMAT (mswindows, subwindow); IIFORMAT_HAS_DEVMETHOD (mswindows, subwindow, instantiate); @@ -2575,22 +2831,36 @@ image_instantiator_format_create_glyphs_mswindows (void) INITIALIZE_DEVICE_IIFORMAT (mswindows, group); IIFORMAT_HAS_DEVMETHOD (mswindows, group, instantiate); #endif + /* label */ INITIALIZE_DEVICE_IIFORMAT (mswindows, label); IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate); - INITIALIZE_DEVICE_IIFORMAT (mswindows, combo); - IIFORMAT_HAS_DEVMETHOD (mswindows, combo, property); - IIFORMAT_HAS_DEVMETHOD (mswindows, combo, instantiate); + /* combo box */ + INITIALIZE_DEVICE_IIFORMAT (mswindows, combo_box); + IIFORMAT_HAS_DEVMETHOD (mswindows, combo_box, property); + IIFORMAT_HAS_DEVMETHOD (mswindows, combo_box, instantiate); + /* scrollbar */ INITIALIZE_DEVICE_IIFORMAT (mswindows, scrollbar); IIFORMAT_HAS_DEVMETHOD (mswindows, scrollbar, instantiate); - INITIALIZE_DEVICE_IIFORMAT (mswindows, progress); - IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property); - IIFORMAT_HAS_DEVMETHOD (mswindows, progress, instantiate); + /* progress gauge */ + INITIALIZE_DEVICE_IIFORMAT (mswindows, progress_gauge); + IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, set_property); + IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, instantiate); - INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp"); + /* tree view widget */ + INITIALIZE_DEVICE_IIFORMAT (mswindows, tree_view); + /* IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);*/ + IIFORMAT_HAS_DEVMETHOD (mswindows, tree_view, instantiate); + /* tab control widget */ + INITIALIZE_DEVICE_IIFORMAT (mswindows, tab_control); + IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, instantiate); + IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, set_property); + + /* windows bitmap format */ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp"); IIFORMAT_HAS_METHOD (bmp, validate); IIFORMAT_HAS_METHOD (bmp, normalize); IIFORMAT_HAS_METHOD (bmp, possible_dest_types); @@ -2598,7 +2868,9 @@ image_instantiator_format_create_glyphs_mswindows (void) IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string); IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string); + IIFORMAT_VALID_CONSOLE (mswindows, bmp); + /* mswindows resources */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource, "mswindows-resource"); @@ -2611,25 +2883,17 @@ image_instantiator_format_create_glyphs_mswindows (void) check_valid_resource_symbol); IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_id, check_valid_resource_id); IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_file, check_valid_string); + IIFORMAT_VALID_CONSOLE (mswindows, mswindows_resource); } void vars_of_glyphs_mswindows (void) { - Fprovide (Qbmp); - Fprovide (Qmswindows_resource); DEFVAR_LISP ("mswindows-bitmap-file-path", &Vmswindows_bitmap_file_path /* A list of the directories in which mswindows bitmap files may be found. This is used by the `make-image-instance' function. */ ); Vmswindows_bitmap_file_path = Qnil; - - Fprovide (Qbutton); - Fprovide (Qedit); - Fprovide (Qcombo); - Fprovide (Qscrollbar); - Fprovide (Qlabel); - Fprovide (Qprogress); } void diff --git a/src/glyphs-widget.c b/src/glyphs-widget.c index 3e2162b..917739d 100644 --- a/src/glyphs-widget.c +++ b/src/glyphs-widget.c @@ -38,10 +38,10 @@ Boston, MA 02111-1307, USA. */ #include "opaque.h" DEFINE_IMAGE_INSTANTIATOR_FORMAT (button); -DEFINE_IMAGE_INSTANTIATOR_FORMAT (combo); -Lisp_Object Qcombo; -DEFINE_IMAGE_INSTANTIATOR_FORMAT (edit); -Lisp_Object Qedit; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (combo_box); +Lisp_Object Qcombo_box; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (edit_field); +Lisp_Object Qedit_field; DEFINE_IMAGE_INSTANTIATOR_FORMAT (scrollbar); Lisp_Object Qscrollbar; DEFINE_IMAGE_INSTANTIATOR_FORMAT (widget); @@ -51,8 +51,12 @@ Lisp_Object Qgroup; #endif DEFINE_IMAGE_INSTANTIATOR_FORMAT (label); Lisp_Object Qlabel; -DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress); -Lisp_Object Qprogress; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge); +Lisp_Object Qprogress_gauge; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (tree_view); +Lisp_Object Qtree_view; +DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab_control); +Lisp_Object Qtab_control; Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items; Lisp_Object Q_image, Q_text, Q_percent; @@ -145,22 +149,36 @@ check_valid_string_or_vector (Lisp_Object data) signal_simple_error (":descriptor must be a string or a vector", data); } -static void -check_valid_item_list (Lisp_Object data) +void +check_valid_item_list_1 (Lisp_Object items) { Lisp_Object rest; - Lisp_Object items; - Fcheck_valid_plist (data); - - items = Fplist_get (data, Q_items, Qnil); CHECK_LIST (items); EXTERNAL_LIST_LOOP (rest, items) { - CHECK_STRING (XCAR (rest)); + if (STRINGP (XCAR (rest))) + CHECK_STRING (XCAR (rest)); + else if (VECTORP (XCAR (rest))) + gui_parse_item_keywords (XCAR (rest)); + else if (LISTP (XCAR (rest))) + check_valid_item_list_1 (XCAR (rest)); + else + signal_simple_error ("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); +} + /* wire widget property invocations to specific widgets ... The problem we are solving here is that when instantiators get converted to instances they lose some type information (they just become @@ -169,7 +187,7 @@ check_valid_item_list (Lisp_Object data) the instances. This is encoded in the widget type field. widget_property gets invoked by decoding the primary type (Qwidget), widget property then invokes based on the secondary type - (Qedit for example). It is debatable that we should wire things in this + (Qedit_field for example). It is debatable that we should wire things in this generalised way rather than treating widgets specially in image_instance_property. */ static Lisp_Object @@ -235,15 +253,15 @@ static void widget_validate (Lisp_Object instantiator) { Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor); - struct gui_item gui; + if (NILP (desc)) signal_simple_error ("Must supply :descriptor", instantiator); if (VECTORP (desc)) - gui_parse_item_keywords (desc, &gui); + gui_parse_item_keywords (desc); if (!NILP (find_keyword_in_vector (instantiator, Q_width)) - && !NILP (find_keyword_in_vector (instantiator, Q_pixel_width))) + && !NILP (find_keyword_in_vector (instantiator, Q_pixel_width))) signal_simple_error ("Must supply only one of :width and :pixel-width", instantiator); if (!NILP (find_keyword_in_vector (instantiator, Q_height)) @@ -252,7 +270,7 @@ widget_validate (Lisp_Object instantiator) } static void -combo_validate (Lisp_Object instantiator) +combo_box_validate (Lisp_Object instantiator) { widget_validate (instantiator); if (NILP (find_keyword_in_vector (instantiator, Q_properties))) @@ -300,23 +318,22 @@ initialize_widget_image_instance (struct Lisp_Image_Instance *ii, Lisp_Object ty IMAGE_INSTANCE_WIDGET_TYPE (ii) = type; IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil; IMAGE_INSTANCE_WIDGET_FACE (ii) = Vwidget_face; - gui_item_init (&IMAGE_INSTANCE_WIDGET_ITEM (ii)); + IMAGE_INSTANCE_WIDGET_ITEM (ii) = allocate_gui_item (); } /* Instantiate a button widget. Unfortunately instantiated widgets are particular to a frame since they need to have a parent. It's not like images where you just select the image into the context you - want to display it in and BitBlt it. So images instances can have a + want to display it in and BitBlt it. So image instances can have a many-to-one relationship with things you see, whereas widgets can only be one-to-one (i.e. per frame) */ static void widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain, int default_textheight, - int default_pixheight) + int default_pixheight, int default_textwidth) { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii); Lisp_Object face = find_keyword_in_vector (instantiator, Q_face); Lisp_Object height = find_keyword_in_vector (instantiator, Q_height); Lisp_Object width = find_keyword_in_vector (instantiator, Q_width); @@ -349,11 +366,13 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, if (STRINGP (desc) || NILP (desc)) { /* big cheat - we rely on the fact that a gui item looks like an instantiator */ - gui_parse_item_keywords_no_errors (instantiator, pgui); + IMAGE_INSTANCE_WIDGET_ITEM (ii) = + gui_parse_item_keywords_no_errors (instantiator); IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc; } else - gui_parse_item_keywords_no_errors (desc, pgui); + IMAGE_INSTANCE_WIDGET_ITEM (ii) = + gui_parse_item_keywords_no_errors (desc); /* normalize size information */ if (!NILP (width)) @@ -377,8 +396,14 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, } /* if we still don' t have sizes, guess from text size */ - if (!tw && !pw && !NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii))) - tw = XSTRING_LENGTH (IMAGE_INSTANCE_WIDGET_TEXT (ii)); + if (!tw && !pw) + { + if (default_textwidth) + tw = default_textwidth; + else if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii))) + tw = XSTRING_LENGTH (IMAGE_INSTANCE_WIDGET_TEXT (ii)); + } + if (!th && !ph) { if (default_textheight) @@ -404,11 +429,12 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, int dest_mask, Lisp_Object domain) { widget_instantiate_1 (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, 1, 0); + pointer_bg, dest_mask, domain, 1, 0, 0); } +/* combo-box generic instantiation - get he heigh right */ static void -combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, +combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { @@ -417,7 +443,33 @@ combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, int len; GET_LIST_LENGTH (data, len); widget_instantiate_1 (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, len + 1, 0); + pointer_bg, dest_mask, domain, len + 1, 0, 0); +} + +static void +tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties), + Q_items, Qnil); + Lisp_Object rest; + int len = 0; + + LIST_LOOP (rest, data) + { + len += 3; /* some bias */ + if (STRINGP (XCAR (rest))) + len += XSTRING_LENGTH (XCAR (rest)); + else if (VECTORP (XCAR (rest))) + { + Lisp_Object gui = gui_parse_item_keywords (XCAR (rest)); + len += XSTRING_LENGTH (XGUI_ITEM (gui)->name); + } + } + + widget_instantiate_1 (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, 0, 0, len); } /* Instantiate a static control */ @@ -427,7 +479,7 @@ static_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, int dest_mask, Lisp_Object domain) { widget_instantiate_1 (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, 0, 4); + pointer_bg, dest_mask, domain, 0, 4, 0); } @@ -445,7 +497,7 @@ syms_of_glyphs_widget (void) defkeyword (&Q_items, ":items"); defkeyword (&Q_image, ":image"); defkeyword (&Q_percent, ":percent"); - defkeyword (&Q_text, "text"); + defkeyword (&Q_text, ":text"); } void @@ -489,25 +541,25 @@ image_instantiator_format_create_glyphs_widget (void) VALID_GUI_KEYWORDS (button); /* edit fields */ - INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (edit, "edit"); - IIFORMAT_HAS_SHARED_METHOD (edit, validate, widget); - IIFORMAT_HAS_SHARED_METHOD (edit, possible_dest_types, widget); - IIFORMAT_HAS_SHARED_METHOD (edit, instantiate, widget); - VALID_WIDGET_KEYWORDS (edit); - VALID_GUI_KEYWORDS (edit); + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (edit_field, "edit-field"); + IIFORMAT_HAS_SHARED_METHOD (edit_field, validate, widget); + IIFORMAT_HAS_SHARED_METHOD (edit_field, possible_dest_types, widget); + IIFORMAT_HAS_SHARED_METHOD (edit_field, instantiate, widget); + VALID_WIDGET_KEYWORDS (edit_field); + VALID_GUI_KEYWORDS (edit_field); /* combo box */ - INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo, "combo"); - IIFORMAT_HAS_METHOD (combo, validate); - IIFORMAT_HAS_SHARED_METHOD (combo, possible_dest_types, widget); - IIFORMAT_HAS_METHOD (combo, instantiate); - VALID_GUI_KEYWORDS (combo); - - IIFORMAT_VALID_KEYWORD (combo, Q_width, check_valid_int); - IIFORMAT_VALID_KEYWORD (combo, Q_height, check_valid_int); - IIFORMAT_VALID_KEYWORD (combo, Q_pixel_width, check_valid_int); - IIFORMAT_VALID_KEYWORD (combo, Q_face, check_valid_face); - IIFORMAT_VALID_KEYWORD (combo, Q_properties, check_valid_item_list); + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo_box, "combo-box"); + IIFORMAT_HAS_METHOD (combo_box, validate); + IIFORMAT_HAS_SHARED_METHOD (combo_box, possible_dest_types, widget); + IIFORMAT_HAS_METHOD (combo_box, instantiate); + VALID_GUI_KEYWORDS (combo_box); + + 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); + IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face); + IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list); /* scrollbar */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (scrollbar, "scrollbar"); @@ -521,12 +573,30 @@ image_instantiator_format_create_glyphs_widget (void) IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face); /* progress guage */ - INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress, "progress"); - IIFORMAT_HAS_SHARED_METHOD (progress, validate, widget); - IIFORMAT_HAS_SHARED_METHOD (progress, possible_dest_types, widget); - IIFORMAT_HAS_SHARED_METHOD (progress, instantiate, widget); - VALID_WIDGET_KEYWORDS (progress); - VALID_GUI_KEYWORDS (progress); + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge"); + IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget); + IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget); + IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, combo_box); + VALID_WIDGET_KEYWORDS (progress_gauge); + VALID_GUI_KEYWORDS (progress_gauge); + + /* tree view */ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree_view, "tree-view"); + IIFORMAT_HAS_SHARED_METHOD (tree_view, validate, combo_box); + IIFORMAT_HAS_SHARED_METHOD (tree_view, possible_dest_types, widget); + IIFORMAT_HAS_SHARED_METHOD (tree_view, instantiate, combo_box); + VALID_WIDGET_KEYWORDS (tree_view); + VALID_GUI_KEYWORDS (tree_view); + IIFORMAT_VALID_KEYWORD (tree_view, Q_properties, check_valid_item_list); + + /* tab control */ + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab_control, "tab-control"); + IIFORMAT_HAS_SHARED_METHOD (tab_control, validate, combo_box); + IIFORMAT_HAS_SHARED_METHOD (tab_control, possible_dest_types, widget); + IIFORMAT_HAS_METHOD (tab_control, instantiate); + VALID_WIDGET_KEYWORDS (tab_control); + VALID_GUI_KEYWORDS (tab_control); + IIFORMAT_VALID_KEYWORD (tab_control, Q_properties, check_valid_item_list); /* labels */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label"); diff --git a/src/glyphs-x.c b/src/glyphs-x.c index bbe3cf1..a1f0051 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -4,6 +4,7 @@ Copyright (C) 1995 Tinker Systems Copyright (C) 1995, 1996 Ben Wing Copyright (C) 1995 Sun Microsystems + Copyright (C) 1999 Andy Piper This file is part of XEmacs. @@ -51,6 +52,7 @@ Boston, MA 02111-1307, USA. */ #include "console-x.h" #include "glyphs-x.h" #include "objects-x.h" +#include "gui-x.h" #include "xmu.h" #include "buffer.h" @@ -58,6 +60,8 @@ Boston, MA 02111-1307, USA. */ #include "frame.h" #include "insdel.h" #include "opaque.h" +#include "gui.h" +#include "faces.h" #include "imgproc.h" @@ -69,6 +73,11 @@ Boston, MA 02111-1307, USA. */ #include "file-coding.h" #endif +#ifdef LWLIB_USES_MOTIF +#include +#endif +#include + #if INTBITS == 32 # define FOUR_BYTE_TYPE unsigned int #elif LONGBITS == 32 @@ -81,6 +90,22 @@ Boston, MA 02111-1307, USA. */ #define LISP_DEVICE_TO_X_SCREEN(dev) XDefaultScreenOfDisplay (DEVICE_X_DISPLAY (XDEVICE (dev))) +DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (string); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); +DECLARE_IMAGE_INSTANTIATOR_FORMAT (inherit); +#ifdef HAVE_JPEG +DECLARE_IMAGE_INSTANTIATOR_FORMAT (jpeg); +#endif +#ifdef HAVE_TIFF +DECLARE_IMAGE_INSTANTIATOR_FORMAT (tiff); +#endif +#ifdef HAVE_PNG +DECLARE_IMAGE_INSTANTIATOR_FORMAT (png); +#endif +#ifdef HAVE_GIF +DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif); +#endif #ifdef HAVE_XPM DEFINE_DEVICE_IIFORMAT (x, xpm); #endif @@ -97,6 +122,12 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (font); DEFINE_IMAGE_INSTANTIATOR_FORMAT (autodetect); +DEFINE_DEVICE_IIFORMAT (x, widget); +DEFINE_DEVICE_IIFORMAT (x, button); +DEFINE_DEVICE_IIFORMAT (x, progress_gauge); +DEFINE_DEVICE_IIFORMAT (x, edit_field); +DEFINE_DEVICE_IIFORMAT (x, combo_box); + static void cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, @@ -336,9 +367,16 @@ x_finalize_image_instance (struct Lisp_Image_Instance *p) { Display *dpy = DEVICE_X_DISPLAY (XDEVICE (p->device)); - if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET - || - IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) + if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET) + { + if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) + { + XtUnmanageChild (IMAGE_INSTANCE_X_WIDGET_ID (p)); + XtDestroyWidget (IMAGE_INSTANCE_X_WIDGET_ID (p)); + IMAGE_INSTANCE_SUBWINDOW_ID (p) = 0; + } + } + else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) XDestroyWindow (dpy, IMAGE_INSTANCE_X_SUBWINDOW_ID (p)); @@ -1967,8 +2005,16 @@ x_colorize_image_instance (Lisp_Object image_instance, static void x_unmap_subwindow (struct Lisp_Image_Instance *p) { - XUnmapWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)), - IMAGE_INSTANCE_X_SUBWINDOW_ID (p)); + if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) + { + XUnmapWindow + (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)), + IMAGE_INSTANCE_X_SUBWINDOW_ID (p)); + } + else /* must be a widget */ + { + XtUnmapWidget (IMAGE_INSTANCE_X_WIDGET_ID (p)); + } } /* map the subwindow. This is used by redisplay via @@ -1976,10 +2022,35 @@ x_unmap_subwindow (struct Lisp_Image_Instance *p) static void x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y) { - XMapWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)), - IMAGE_INSTANCE_X_SUBWINDOW_ID (p)); - XMoveWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)), - IMAGE_INSTANCE_X_SUBWINDOW_ID (p), x, y); + if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) + { + Window subwindow = IMAGE_INSTANCE_X_SUBWINDOW_ID (p); + Screen* screen = IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p); + XMapWindow (DisplayOfScreen (screen), subwindow); + XMoveWindow (DisplayOfScreen (screen), subwindow, x, y); + } + else /* must be a widget */ + { + XtMoveWidget (IMAGE_INSTANCE_X_WIDGET_ID (p), + x + IMAGE_INSTANCE_X_WIDGET_XOFFSET (p), + y + IMAGE_INSTANCE_X_WIDGET_YOFFSET (p)); + XtMapWidget (IMAGE_INSTANCE_X_WIDGET_ID (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 (struct Lisp_Image_Instance *p) +{ + if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET) + { + widget_value* wv = xmalloc_widget_value (); + button_item_to_widget_value (IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (p), + wv, 1, 1); + lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p), + wv, 1); + } } /* instantiate and x type subwindow */ @@ -2007,11 +2078,7 @@ x_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, dpy = DEVICE_X_DISPLAY (XDEVICE (device)); xs = DefaultScreenOfDisplay (dpy); - if (dest_mask & IMAGE_SUBWINDOW_MASK) - IMAGE_INSTANCE_TYPE (ii) = IMAGE_SUBWINDOW; - else - incompatible_image_types (instantiator, dest_mask, - IMAGE_SUBWINDOW_MASK); + IMAGE_INSTANCE_TYPE (ii) = IMAGE_SUBWINDOW; pw = XtWindow (FRAME_X_TEXT_WIDGET (f)); @@ -2065,9 +2132,290 @@ Subwindows are not currently implemented. static void x_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h) { - XResizeWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (ii)), - IMAGE_INSTANCE_X_SUBWINDOW_ID (ii), - w, h); + if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW) + { + XResizeWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (ii)), + IMAGE_INSTANCE_X_SUBWINDOW_ID (ii), + w, h); + } + else /* must be a widget */ + { + Arg al[2]; + XtSetArg (al [0], XtNwidth, (Dimension)w); + XtSetArg (al [1], XtNheight, (Dimension)h); + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 2); + } +} + +/************************************************************************/ +/* widgets */ +/************************************************************************/ + +static void +x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain, + CONST char* type, widget_value* wv) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), pixel; + struct device* d = XDEVICE (device); + Lisp_Object frame = FW_FRAME (domain); + struct frame* f = XFRAME (frame); + XColor fcolor, bcolor; + Extbyte* nm=0; + Widget wid; + Arg al [32]; + int ac = 0; + int id = new_lwlib_id (); +#ifdef LWLIB_USES_MOTIF + XmFontList fontList; +#endif + + if (!DEVICE_X_P (d)) + signal_simple_error ("Not an mswindows device", device); + + /* have to set the type this late in case there is no device + instantiation for a widget. But we can go ahead and do it without + checking because there is always a generic instantiator. */ + IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET; + + if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii))) + GET_C_STRING_OS_DATA_ALLOCA (IMAGE_INSTANCE_WIDGET_TEXT (ii), nm); + + ii->data = xnew_and_zero (struct x_subwindow_data); + + /* copy any args we were given */ + if (wv->nargs) + lw_add_value_args_to_args (wv, al, &ac); + + /* add our own arguments */ + pixel = FACE_FOREGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + pixel = FACE_BACKGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + + XtSetArg (al [ac], XtNbackground, bcolor.pixel); ac++; + XtSetArg (al [ac], XtNforeground, fcolor.pixel); ac++; +#ifdef LWLIB_USES_MOTIF + fontList = XmFontListCreate + ((void*)FONT_INSTANCE_X_FONT + (XFONT_INSTANCE (widget_face_font_info + (domain, IMAGE_INSTANCE_WIDGET_FACE (ii), + 0, 0))), XmSTRING_DEFAULT_CHARSET); + XtSetArg (al [ac], XmNfontList, fontList ); ac++; +#else + XtSetArg (al [ac], XtNfont, (void*)FONT_INSTANCE_X_FONT + (XFONT_INSTANCE (widget_face_font_info + (domain, + IMAGE_INSTANCE_WIDGET_FACE (ii), + 0, 0)))); ac++; +#endif + + wv->nargs = ac; + wv->args = al; + + wid = lw_create_widget (type, wv->name, id, wv, FRAME_X_CONTAINER_WIDGET (f), + False, 0, popup_selection_callback, 0); + + IMAGE_INSTANCE_X_WIDGET_LWID (ii) = id; +#ifdef LWLIB_USES_MOTIF + XmFontListFree (fontList); +#endif + /* because the EmacsManager is the widgets parent we have to + offset the redisplay of the widget by the amount the text + widget is inside the manager. */ + ac = 0; + XtSetArg (al [ac], XtNwidth, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); ac++; + XtSetArg (al [ac], XtNheight, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); ac++; + XtSetValues (wid, al, ac); + /* finally get offsets in the frame */ + ac = 0; + XtSetArg (al [ac], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (ii)); ac++; + XtSetArg (al [ac], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (ii)); ac++; + XtGetValues (FRAME_X_TEXT_WIDGET (f), al, ac); + + IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)wid; + + free_widget_value (wv); +} + +static Lisp_Object +x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop, + Lisp_Object val) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + if (EQ (prop, Q_text)) + { + Extbyte* str=0; + widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); + CHECK_STRING (val); + GET_C_STRING_OS_DATA_ALLOCA (val, str); + wv->value = str; + lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False); + return Qt; + } + return Qunbound; +} + +/* get properties of a control */ +static Lisp_Object +x_widget_property (Lisp_Object image_instance, Lisp_Object prop) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + /* get the text from a control */ + if (EQ (prop, Q_text)) + { + widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); + return build_ext_string (wv->value, FORMAT_OS); + } + return Qunbound; +} + +/* Instantiate a button widget. Unfortunately instantiated widgets are + particular to a frame since they need to have a parent. It's not + like images where you just select the image into the context you + want to display it in and BitBlt it. So images instances can have a + many-to-one relationship with things you see, whereas widgets can + only be one-to-one (i.e. per frame) */ +static void +x_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct 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 = xmalloc_widget_value (); + + button_item_to_widget_value (gui, wv, 1, 1); + + if (!NILP (glyph)) + { + if (!IMAGE_INSTANCEP (glyph)) + glyph = glyph_image_instance (glyph, domain, ERROR_ME, 1); + } + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "button", wv); + + /* add the image if one was given */ + if (!NILP (glyph) && IMAGE_INSTANCEP (glyph)) + { + Arg al [2]; + int ac =0; +#ifdef LWLIB_USES_MOTIF + XtSetArg (al [ac], XmNlabelType, XmPIXMAP); ac++; + XtSetArg (al [ac], XmNlabelPixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph));ac++; +#else + XtSetArg (al [ac], XtNpixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph)); ac++; +#endif + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, ac); + } +} + +/* get properties of a button */ +static Lisp_Object +x_button_property (Lisp_Object image_instance, Lisp_Object prop) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + /* check the state of a button */ + if (EQ (prop, Q_selected)) + { + widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); + + if (wv->selected) + return Qt; + else + return Qnil; + } + return Qunbound; +} + +/* instantiate a progress gauge */ +static void +x_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); + widget_value* wv = xmalloc_widget_value (); + + button_item_to_widget_value (gui, wv, 1, 1); + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "progress", wv); +} + +/* set the properties of a progres guage */ +static Lisp_Object +x_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop, + Lisp_Object val) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + + if (EQ (prop, Q_percent)) + { + Arg al [1]; + CHECK_INT (val); + XtSetArg (al[0], XtNvalue, XINT (val)); + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1); + return Qt; + } + return Qunbound; +} + +/* instantiate an edit control */ +static void +x_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); + widget_value* wv = xmalloc_widget_value (); + + button_item_to_widget_value (gui, wv, 1, 1); + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "text-field", wv); +} + +/* instantiate a combo control */ +static void +x_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + Lisp_Object rest; + Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); + widget_value* wv = xmalloc_widget_value (); + + button_item_to_widget_value (gui, wv, 1, 1); + + x_widget_instantiate (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain, "combo-box", wv); + /* add items to the combo box */ + LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil)) + { +#if 0 + Extbyte* str; + XmString xmstr; + GET_C_STRING_OS_DATA_ALLOCA (XCAR (rest), str); + xmstr = XmStringCreate (str, XmSTRING_DEFAULT_CHARSET); + XmListAddItem (IMAGE_INSTANCE_X_WIDGET_ID (ii), xmstr, 0); + XmStringFree (xmstr); +#endif + } } @@ -2098,22 +2446,61 @@ console_type_create_glyphs_x (void) CONSOLE_HAS_METHOD (x, unmap_subwindow); CONSOLE_HAS_METHOD (x, map_subwindow); CONSOLE_HAS_METHOD (x, resize_subwindow); + CONSOLE_HAS_METHOD (x, update_subwindow); } void image_instantiator_format_create_glyphs_x (void) { + IIFORMAT_VALID_CONSOLE (x, nothing); + IIFORMAT_VALID_CONSOLE (x, string); + IIFORMAT_VALID_CONSOLE (x, formatted_string); + IIFORMAT_VALID_CONSOLE (x, inherit); #ifdef HAVE_XPM INITIALIZE_DEVICE_IIFORMAT (x, xpm); IIFORMAT_HAS_DEVMETHOD (x, xpm, instantiate); #endif +#ifdef HAVE_JPEG + IIFORMAT_VALID_CONSOLE (x, jpeg); +#endif +#ifdef HAVE_TIFF + IIFORMAT_VALID_CONSOLE (x, tiff); +#endif +#ifdef HAVE_PNG + IIFORMAT_VALID_CONSOLE (x, png); +#endif +#ifdef HAVE_GIF + IIFORMAT_VALID_CONSOLE (x, gif); +#endif INITIALIZE_DEVICE_IIFORMAT (x, xbm); IIFORMAT_HAS_DEVMETHOD (x, xbm, instantiate); INITIALIZE_DEVICE_IIFORMAT (x, subwindow); IIFORMAT_HAS_DEVMETHOD (x, subwindow, instantiate); - +#ifdef LWLIB_USES_MOTIF + /* button widget */ + INITIALIZE_DEVICE_IIFORMAT (x, button); + IIFORMAT_HAS_DEVMETHOD (x, button, property); + IIFORMAT_HAS_DEVMETHOD (x, button, instantiate); + + INITIALIZE_DEVICE_IIFORMAT (x, widget); + IIFORMAT_HAS_DEVMETHOD (x, widget, property); + IIFORMAT_HAS_DEVMETHOD (x, widget, set_property); + /* progress gauge */ + INITIALIZE_DEVICE_IIFORMAT (x, progress_gauge); + IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, set_property); + IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, instantiate); + /* text field */ + INITIALIZE_DEVICE_IIFORMAT (x, edit_field); + IIFORMAT_HAS_DEVMETHOD (x, edit_field, instantiate); +#if 0 /* XmVERSION > 1*/ + /* combo box */ + INITIALIZE_DEVICE_IIFORMAT (x, combo_box); + IIFORMAT_HAS_DEVMETHOD (x, combo_box, instantiate); +#endif +#endif INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font"); + IIFORMAT_VALID_CONSOLE (x, cursor_font); IIFORMAT_HAS_METHOD (cursor_font, validate); IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types); @@ -2128,6 +2515,7 @@ image_instantiator_format_create_glyphs_x (void) IIFORMAT_HAS_METHOD (font, validate); IIFORMAT_HAS_METHOD (font, possible_dest_types); IIFORMAT_HAS_METHOD (font, instantiate); + IIFORMAT_VALID_CONSOLE (x, font); IIFORMAT_VALID_KEYWORD (font, Q_data, check_valid_string); IIFORMAT_VALID_KEYWORD (font, Q_foreground, check_valid_string); @@ -2145,6 +2533,7 @@ image_instantiator_format_create_glyphs_x (void) IIFORMAT_HAS_METHOD (autodetect, normalize); IIFORMAT_HAS_METHOD (autodetect, possible_dest_types); IIFORMAT_HAS_METHOD (autodetect, instantiate); + IIFORMAT_VALID_CONSOLE (x, autodetect); IIFORMAT_VALID_KEYWORD (autodetect, Q_data, check_valid_string); } diff --git a/src/glyphs-x.h b/src/glyphs-x.h index ed77321..a2bc03f 100644 --- a/src/glyphs-x.h +++ b/src/glyphs-x.h @@ -80,22 +80,48 @@ struct x_image_instance_data struct x_subwindow_data { - Screen *xscreen; - Window parent_window; + union + { + struct + { + Screen *xscreen; + Window parent_window; + } sub; + struct + { + Position x_offset; + Position y_offset; + LWLIB_ID id; + } wid; + } data; }; #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) #define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ - (X_SUBWINDOW_INSTANCE_DATA (i)->xscreen) + (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.xscreen) #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ - (X_SUBWINDOW_INSTANCE_DATA (i)->parent_window) + (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window) +#define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset) +#define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset) +#define IMAGE_INSTANCE_X_WIDGET_LWID(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ + IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ + IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \ + IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i)) #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i)) +#define IMAGE_INSTANCE_X_WIDGET_ID(i) \ + ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i)) #endif /* HAVE_X_WINDOWS */ #endif /* _XEMACS_GLYPHS_X_H_ */ diff --git a/src/glyphs.c b/src/glyphs.c index d92508e..0db3c08 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -174,21 +174,38 @@ decode_image_instantiator_format (Lisp_Object format, Error_behavior errb) } static int -valid_image_instantiator_format_p (Lisp_Object format) +valid_image_instantiator_format_p (Lisp_Object format, Lisp_Object locale) { - return (decode_image_instantiator_format (format, ERROR_ME_NOT) != 0); + int i; + struct image_instantiator_methods* meths = + decode_image_instantiator_format (format, ERROR_ME_NOT); + struct console* console = decode_console (locale); + Lisp_Object contype = console ? CONSOLE_TYPE (console) : locale; + /* nothing is valid in all locales */ + if (EQ (format, Qnothing)) + return 1; + /* reject unknown formats */ + else if (!console || !meths) + return 0; + + for (i = 0; i < Dynarr_length (meths->consoles); i++) + if (EQ (contype, Dynarr_at (meths->consoles, i).symbol)) + return 1; + return 0; } DEFUN ("valid-image-instantiator-format-p", Fvalid_image_instantiator_format_p, - 1, 1, 0, /* + 1, 2, 0, /* Given an IMAGE-INSTANTIATOR-FORMAT, return non-nil if it is valid. +If LOCALE is non-nil then the format is checked in that domain. +If LOCALE is nil the current console is used. Valid formats are some subset of 'nothing, 'string, 'formatted-string, 'xpm, 'xbm, 'xface, 'gif, 'jpeg, 'png, 'tiff, 'cursor-font, 'font, 'autodetect, 'widget and 'subwindow, depending on how XEmacs was compiled. */ - (image_instantiator_format)) + (image_instantiator_format, locale)) { - return valid_image_instantiator_format_p (image_instantiator_format) ? + return valid_image_instantiator_format_p (image_instantiator_format, locale) ? Qt : Qnil; } @@ -547,6 +564,11 @@ instantiate_image_instantiator (Lisp_Object device, Lisp_Object domain, int methp = 0; GCPRO1 (ii); + if (!valid_image_instantiator_format_p (XVECTOR_DATA (instantiator)[0], device)) + signal_simple_error + ("Image instantiator format is invalid in this locale.", + instantiator); + meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0], ERROR_ME); methp = (int)HAS_IIFORMAT_METH_P (meths, instantiate); @@ -600,7 +622,7 @@ mark_image_instance (Lisp_Object obj, void (*markobj) (Lisp_Object)) markobj (IMAGE_INSTANCE_WIDGET_TYPE (i)); markobj (IMAGE_INSTANCE_WIDGET_PROPS (i)); markobj (IMAGE_INSTANCE_WIDGET_FACE (i)); - mark_gui_item (&IMAGE_INSTANCE_WIDGET_ITEM (i), markobj); + markobj (IMAGE_INSTANCE_WIDGET_ITEM (i)); case IMAGE_SUBWINDOW: markobj (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)); break; @@ -707,11 +729,13 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun, break; case IMAGE_WIDGET: + /* if (!NILP (IMAGE_INSTANCE_WIDGET_CALLBACK (ii))) { print_internal (IMAGE_INSTANCE_WIDGET_CALLBACK (ii), printcharfun, 0); write_c_string (", ", printcharfun); } + */ if (!NILP (IMAGE_INSTANCE_WIDGET_FACE (ii))) { write_c_string (" (", printcharfun); @@ -834,15 +858,14 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) case IMAGE_WIDGET: if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1), - IMAGE_INSTANCE_WIDGET_TYPE (i2)) && - EQ (IMAGE_INSTANCE_WIDGET_CALLBACK (i1), - IMAGE_INSTANCE_WIDGET_CALLBACK (i2)) + IMAGE_INSTANCE_WIDGET_TYPE (i2)) + && internal_equal (IMAGE_INSTANCE_WIDGET_ITEM (i1), + IMAGE_INSTANCE_WIDGET_ITEM (i2), + depth + 1) && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1), IMAGE_INSTANCE_WIDGET_PROPS (i2), depth + 1) - && internal_equal (IMAGE_INSTANCE_WIDGET_TEXT (i1), - IMAGE_INSTANCE_WIDGET_TEXT (i2), - depth + 1))) + )) return 0; case IMAGE_SUBWINDOW: if (!(IMAGE_INSTANCE_SUBWINDOW_WIDTH (i1) == @@ -892,7 +915,7 @@ image_instance_hash (Lisp_Object obj, int depth) hash = HASH4 (hash, internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1), internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1), - internal_hash (IMAGE_INSTANCE_WIDGET_CALLBACK (i), depth + 1)); + internal_hash (IMAGE_INSTANCE_WIDGET_ITEM (i), depth + 1)); case IMAGE_SUBWINDOW: hash = HASH4 (hash, IMAGE_INSTANCE_SUBWINDOW_WIDTH (i), IMAGE_INSTANCE_SUBWINDOW_HEIGHT (i), @@ -910,7 +933,7 @@ image_instance_hash (Lisp_Object obj, int depth) DEFINE_LRECORD_IMPLEMENTATION ("image-instance", image_instance, mark_image_instance, print_image_instance, finalize_image_instance, image_instance_equal, - image_instance_hash, + image_instance_hash, 0, struct Lisp_Image_Instance); static Lisp_Object @@ -2925,9 +2948,14 @@ glyph_plist (Lisp_Object obj) return result; } +static const struct lrecord_description glyph_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Glyph, image), 5 }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("glyph", glyph, mark_glyph, print_glyph, 0, - glyph_equal, glyph_hash, + glyph_equal, glyph_hash, glyph_description, glyph_getprop, glyph_putprop, glyph_remprop, glyph_plist, struct Lisp_Glyph); @@ -4101,7 +4129,6 @@ image_instantiator_format_create (void) IIFORMAT_HAS_METHOD (formatted_string, validate); IIFORMAT_HAS_METHOD (formatted_string, possible_dest_types); IIFORMAT_HAS_METHOD (formatted_string, instantiate); - IIFORMAT_VALID_KEYWORD (formatted_string, Q_data, check_valid_string); /* subwindows */ diff --git a/src/glyphs.h b/src/glyphs.h index 12f6098..2780192 100644 --- a/src/glyphs.h +++ b/src/glyphs.h @@ -85,6 +85,8 @@ struct image_instantiator_methods Lisp_Object device; /* sometimes used */ ii_keyword_entry_dynarr *keywords; + /* consoles this ii is supported on */ + console_type_entry_dynarr *consoles; /* Implementation specific methods: */ /* Validate method: Given an instantiator vector, signal an error if @@ -170,6 +172,8 @@ do { \ format##_image_instantiator_methods->device = Qnil; \ format##_image_instantiator_methods->keywords = \ Dynarr_new (ii_keyword_entry); \ + format##_image_instantiator_methods->consoles = \ + Dynarr_new (console_type_entry); \ add_entry_to_image_instantiator_format_list \ (Q##format, format##_image_instantiator_methods); \ } while (0) @@ -215,7 +219,20 @@ do { \ entry); \ } while (0) +/* Declare that image-instantiator format FORMAT is supported on + CONSOLE type. */ +#define IIFORMAT_VALID_CONSOLE(console, format) \ + do { \ + struct console_type_entry entry; \ + \ + entry.symbol = Q##console; \ + entry.meths = console##_console_methods; \ + Dynarr_add (format##_image_instantiator_methods->consoles, \ + entry); \ + } while (0) + #define DEFINE_DEVICE_IIFORMAT(type, format)\ +DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ struct image_instantiator_methods *type##_##format##_image_instantiator_methods #define INITIALIZE_DEVICE_IIFORMAT(type, format) \ @@ -228,6 +245,7 @@ do { \ Dynarr_new (ii_keyword_entry); \ add_entry_to_device_ii_format_list \ (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ + IIFORMAT_VALID_CONSOLE(type,format); \ } while (0) /* Declare that image-instantiator format FORMAT has method M; used in @@ -432,7 +450,7 @@ struct Lisp_Image_Instance Lisp_Object face; /* foreground and background colors */ Lisp_Object type; Lisp_Object props; /* properties */ - struct gui_item gui_item; + Lisp_Object gui_item; /* a list of gui_items */ } widget; /* widgets are subwindows */ } subwindow; } u; @@ -472,13 +490,15 @@ struct Lisp_Image_Instance IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) -#define IMAGE_INSTANCE_WIDGET_CALLBACK(i) \ - ((i)->u.subwindow.widget.gui_item.callback) #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.widget.type) #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.widget.props) #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.widget.face) -#define IMAGE_INSTANCE_WIDGET_TEXT(i) ((i)->u.subwindow.widget.gui_item.name) #define IMAGE_INSTANCE_WIDGET_ITEM(i) ((i)->u.subwindow.widget.gui_item) +#define IMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \ +(CONSP (IMAGE_INSTANCE_WIDGET_ITEM (i)) ? \ +XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \ + IMAGE_INSTANCE_WIDGET_ITEM (i)) +#define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name #define XIMAGE_INSTANCE_DEVICE(i) \ IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) @@ -513,18 +533,18 @@ struct Lisp_Image_Instance IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \ IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_WIDGET_CALLBACK(i) \ - IMAGE_INSTANCE_WIDGET_CALLBACK (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \ IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \ IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_FACE(i) \ IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) -#define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ - IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \ IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \ + IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ + IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i)) @@ -622,7 +642,8 @@ DECLARE_LRECORD (glyph, struct Lisp_Glyph); extern Lisp_Object Qxpm, Qxface; extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable; -extern Lisp_Object Qxbm, Qedit, Qgroup, Qlabel, Qcombo, Qscrollbar, Qprogress; +extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar; +extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge; extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; diff --git a/src/gui-x.c b/src/gui-x.c index 3fb2e85..e35e65e 100644 --- a/src/gui-x.c +++ b/src/gui-x.c @@ -35,11 +35,10 @@ Boston, MA 02111-1307, USA. */ #include "device.h" #include "frame.h" #include "gui.h" +#include "redisplay.h" #include "opaque.h" -#ifdef HAVE_POPUPS Lisp_Object Qmenu_no_selection_hook; -#endif /* we need a unique id for each popup menu, dialog box, and scrollbar */ static unsigned int lwlib_id_tick; @@ -59,8 +58,6 @@ xmalloc_widget_value (void) } -#ifdef HAVE_POPUPS - struct mark_widget_value_closure { void (*markobj) (Lisp_Object); @@ -108,7 +105,7 @@ mark_popup_data (Lisp_Object obj, void (*markobj) (Lisp_Object)) DEFINE_LRECORD_IMPLEMENTATION ("popup-data", popup_data, mark_popup_data, internal_object_printer, - 0, 0, 0, struct popup_data); + 0, 0, 0, 0, struct popup_data); /* This is like FRAME_MENUBAR_DATA (f), but contains an alist of (id . popup-data) for GCPRO'ing the callbacks of the popup menus @@ -259,7 +256,10 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, arg = Qmenu_no_selection_hook; } else - get_gui_callback (data, &fn, &arg); + { + MARK_SUBWINDOWS_CHANGED; + get_gui_callback (data, &fn, &arg); + } /* This is the timestamp used for asserting focus so we need to get an up-to-date value event if no events has been dispatched to emacs @@ -315,139 +315,44 @@ menu_separator_style (CONST char *s) return NULL; } -/* set menu accelerator key to first underlined character in menu name */ - -Lisp_Object -menu_name_to_accelerator (char *name) -{ - while (*name) { - if (*name=='%') { - ++name; - if (!(*name)) - return Qnil; - if (*name=='_' && *(name+1)) - { - int accelerator = (int) (unsigned char) (*(name+1)); - return make_char (tolower (accelerator)); - } - } - ++name; - } - return Qnil; -} /* This does the dirty work. gc_currently_forbidden is 1 when this is called. */ - int -button_item_to_widget_value (Lisp_Object desc, widget_value *wv, +button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, int allow_text_field_p, int no_keys_p) { /* !!#### This function has not been Mule-ized */ /* This function cannot GC because gc_currently_forbidden is set when it's called */ - Lisp_Object name = Qnil; - Lisp_Object callback = Qnil; - Lisp_Object suffix = Qnil; - Lisp_Object active_p = Qt; - Lisp_Object include_p = Qt; - Lisp_Object selected_p = Qnil; - Lisp_Object keys = Qnil; - Lisp_Object style = Qnil; - Lisp_Object config_tag = Qnil; - Lisp_Object accel = Qnil; - int length = XVECTOR_LENGTH (desc); - Lisp_Object *contents = XVECTOR_DATA (desc); - int plist_p; - int selected_spec = 0, included_spec = 0; - - if (length < 2) - signal_simple_error ("Button descriptors must be at least 2 long", desc); - - /* length 2: [ "name" callback ] - length 3: [ "name" callback active-p ] - length 4: [ "name" callback active-p suffix ] - or [ "name" callback keyword value ] - length 5+: [ "name" callback [ keyword value ]+ ] - */ - plist_p = (length >= 5 || (length > 2 && KEYWORDP (contents [2]))); - - if (!plist_p && length > 2) - /* the old way */ - { - name = contents [0]; - callback = contents [1]; - active_p = contents [2]; - if (length == 4) - suffix = contents [3]; - } - else - { - /* the new way */ - int i; - if (length & 1) - signal_simple_error ( - "Button descriptor has an odd number of keywords and values", - desc); - - name = contents [0]; - callback = contents [1]; - for (i = 2; i < length;) - { - Lisp_Object key = contents [i++]; - Lisp_Object val = contents [i++]; - if (!KEYWORDP (key)) - signal_simple_error_2 ("Not a keyword", key, desc); - - if (EQ (key, Q_active)) active_p = val; - else if (EQ (key, Q_suffix)) suffix = val; - else if (EQ (key, Q_keys)) keys = val; - else if (EQ (key, Q_style)) style = val; - else if (EQ (key, Q_selected)) selected_p = val, selected_spec = 1; - else if (EQ (key, Q_included)) include_p = val, included_spec = 1; - else if (EQ (key, Q_config)) config_tag = val; - else if (EQ (key, Q_accelerator)) - { - if ( SYMBOLP (val) - || CHARP (val)) - accel = val; - else - signal_simple_error ("Bad keyboard accelerator", val); - } - else if (EQ (key, Q_filter)) - signal_simple_error(":filter keyword not permitted on leaf nodes", desc); - else - signal_simple_error_2 ("Unknown menu item keyword", key, desc); - } - } + struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item); + + if (!NILP (pgui->filter)) + signal_simple_error(":filter keyword not permitted on leaf nodes", gui_item); #ifdef HAVE_MENUBARS - if ((!NILP (config_tag) && NILP (Fmemq (config_tag, Vmenubar_configuration))) - || (included_spec && NILP (Feval (include_p)))) + if (!gui_item_included_p (gui_item, Vmenubar_configuration)) { /* the include specification says to ignore this item. */ return 0; } #endif /* HAVE_MENUBARS */ - CHECK_STRING (name); - wv->name = (char *) XSTRING_DATA (name); - - if (NILP (accel)) - accel = menu_name_to_accelerator (wv->name); - wv->accel = LISP_TO_VOID (accel); + CHECK_STRING (pgui->name); + wv->name = (char *) XSTRING_DATA (pgui->name); + wv->accel = LISP_TO_VOID (gui_item_accelerator (gui_item)); - if (!NILP (suffix)) + if (!NILP (pgui->suffix)) { CONST char *const_bogosity; Lisp_Object suffix2; /* Shortcut to avoid evaluating suffix each time */ - if (STRINGP (suffix)) - suffix2 = suffix; + if (STRINGP (pgui->suffix)) + suffix2 = pgui->suffix; else { - suffix2 = Feval (suffix); + suffix2 = Feval (pgui->suffix); CHECK_STRING (suffix2); } @@ -456,10 +361,11 @@ button_item_to_widget_value (Lisp_Object desc, widget_value *wv, wv->value = xstrdup (wv->value); } - wv_set_evalable_slot (wv->enabled, active_p); - wv_set_evalable_slot (wv->selected, selected_p); + wv_set_evalable_slot (wv->enabled, pgui->active); + wv_set_evalable_slot (wv->selected, pgui->selected); - wv->call_data = LISP_TO_VOID (callback); + if (!NILP (pgui->callback)) + wv->call_data = LISP_TO_VOID (pgui->callback); if (no_keys_p #ifdef HAVE_MENUBARS @@ -467,28 +373,28 @@ button_item_to_widget_value (Lisp_Object desc, widget_value *wv, #endif ) wv->key = 0; - else if (!NILP (keys)) /* Use this string to generate key bindings */ + else if (!NILP (pgui->keys)) /* Use this string to generate key bindings */ { - CHECK_STRING (keys); - keys = Fsubstitute_command_keys (keys); - if (XSTRING_LENGTH (keys) > 0) - wv->key = xstrdup ((char *) XSTRING_DATA (keys)); + 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)); else wv->key = 0; } - else if (SYMBOLP (callback)) /* Show the binding of this command. */ + else if (SYMBOLP (pgui->callback)) /* Show the binding of this command. */ { char buf [1024]; /* #### Warning, dependency here on current_buffer and point */ - where_is_to_char (callback, buf); + where_is_to_char (pgui->callback, buf); if (buf [0]) wv->key = xstrdup (buf); else wv->key = 0; } - CHECK_SYMBOL (style); - if (NILP (style)) + CHECK_SYMBOL (pgui->style); + if (NILP (pgui->style)) { /* If the callback is nil, treat this item like unselectable text. This way, dashes will show up as a separator. */ @@ -515,13 +421,13 @@ button_item_to_widget_value (Lisp_Object desc, widget_value *wv, wv->type = BUTTON_TYPE; } } - else if (EQ (style, Qbutton)) + else if (EQ (pgui->style, Qbutton)) wv->type = BUTTON_TYPE; - else if (EQ (style, Qtoggle)) + else if (EQ (pgui->style, Qtoggle)) wv->type = TOGGLE_TYPE; - else if (EQ (style, Qradio)) + else if (EQ (pgui->style, Qradio)) wv->type = RADIO_TYPE; - else if (EQ (style, Qtext)) + else if (EQ (pgui->style, Qtext)) { wv->type = TEXT_TYPE; #if 0 @@ -530,19 +436,18 @@ button_item_to_widget_value (Lisp_Object desc, widget_value *wv, #endif } else - signal_simple_error_2 ("Unknown style", style, desc); + signal_simple_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", desc); + signal_simple_error ("Text field not allowed in this context", gui_item); - if (selected_spec && EQ (style, Qtext)) + if (!NILP (pgui->selected) && EQ (pgui->style, Qtext)) signal_simple_error ( - ":selected only makes sense with :style toggle, radio or button", - desc); + ":selected only makes sense with :style toggle, radio or button", + gui_item); return 1; } -#endif /* HAVE_POPUPS */ /* This is a kludge to make sure emacs can only link against a version of lwlib that was compiled in the right way. Emacs references symbols which @@ -600,9 +505,7 @@ sanity_check_lwlib (void) void syms_of_gui_x (void) { -#ifdef HAVE_POPUPS defsymbol (&Qmenu_no_selection_hook, "menu-no-selection-hook"); -#endif } void @@ -610,7 +513,6 @@ vars_of_gui_x (void) { lwlib_id_tick = (1<<16); /* start big, to not conflict with Energize */ -#ifdef HAVE_POPUPS popup_up_p = 0; Vpopup_callbacks = Qnil; @@ -625,7 +527,6 @@ without a selection having been made. */ ); #endif Fset (Qmenu_no_selection_hook, Qnil); -#endif /* HAVE_POPUPS */ /* this makes only safe calls as in emacs.c */ sanity_check_lwlib (); diff --git a/src/gui.c b/src/gui.c index 8c3bf42..4824420 100644 --- a/src/gui.c +++ b/src/gui.c @@ -97,35 +97,17 @@ get_gui_callback (Lisp_Object data, Lisp_Object *fn, Lisp_Object *arg) } /* - * Initialize the gui_item structure by setting all (GC-protected) - * fields to their default values. The defaults are t for :active and - * :included values, and nil for others. - */ -void -gui_item_init (struct gui_item *pgui_item) -{ - pgui_item->name = Qnil; - pgui_item->callback = Qnil; - pgui_item->suffix = Qnil; - pgui_item->active = Qt; - pgui_item->included = Qt; - pgui_item->config = Qnil; - pgui_item->filter = Qnil; - pgui_item->style = Qnil; - pgui_item->selected = Qnil; - pgui_item->keys = Qnil; -} - -/* * Add a value VAL associated with keyword KEY into PGUI_ITEM * structure. If KEY is not a keyword, or is an unknown keyword, then * error is signaled. */ void -gui_item_add_keyval_pair (struct gui_item *pgui_item, +gui_item_add_keyval_pair (Lisp_Object gui_item, Lisp_Object key, Lisp_Object val, Error_behavior errb) { + struct 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); @@ -140,21 +122,63 @@ gui_item_add_keyval_pair (struct gui_item *pgui_item, else if (EQ (key, Q_callback)) pgui_item->callback = val; else if (EQ (key, Q_key_sequence)) ; /* ignored for FSF compatability */ else if (EQ (key, Q_label)) ; /* ignored for 21.0 implement in 21.2 */ + else if (EQ (key, Q_accelerator)) + { + if (SYMBOLP (val) || CHARP (val)) + pgui_item->accelerator = val; + else if (ERRB_EQ (errb, ERROR_ME)) + signal_simple_error ("Bad keyboard accelerator", val); + } else if (ERRB_EQ (errb, ERROR_ME)) signal_simple_error_2 ("Unknown keyword in gui item", key, pgui_item->name); } +void +gui_item_init (Lisp_Object gui_item) +{ + struct Lisp_Gui_Item *lp = XGUI_ITEM (gui_item); + + lp->name = Qnil; + lp->callback = Qnil; + lp->suffix = Qnil; + lp->active = Qt; + lp->included = Qt; + lp->config = Qnil; + lp->filter = Qnil; + lp->style = Qnil; + lp->selected = Qnil; + lp->keys = Qnil; + lp->accelerator = Qnil; +} + +Lisp_Object +allocate_gui_item () +{ + struct Lisp_Gui_Item *lp = + alloc_lcrecord_type (struct Lisp_Gui_Item, &lrecord_gui_item); + Lisp_Object val; + + zero_lcrecord (lp); + XSETGUI_ITEM (val, lp); + + gui_item_init (val); + + return val; +} + /* * ITEM is a lisp vector, describing a menu item or a button. The * function extracts the description of the item into the PGUI_ITEM * structure. */ -static void -gui_parse_item_keywords_internal (Lisp_Object item, struct gui_item *pgui_item, - Error_behavior errb) +static Lisp_Object +make_gui_item_from_keywords_internal (Lisp_Object item, + Error_behavior errb) { int length, plist_p, start; Lisp_Object *contents; + Lisp_Object gui_item = allocate_gui_item (); + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); CHECK_VECTOR (item); length = XVECTOR_LENGTH (item); @@ -204,21 +228,50 @@ gui_parse_item_keywords_internal (Lisp_Object item, struct gui_item *pgui_item, { Lisp_Object key = contents [i++]; Lisp_Object val = contents [i++]; - gui_item_add_keyval_pair (pgui_item, key, val, errb); + gui_item_add_keyval_pair (gui_item, key, val, errb); } } + return gui_item; } -void -gui_parse_item_keywords (Lisp_Object item, struct gui_item *pgui_item) +Lisp_Object +gui_parse_item_keywords (Lisp_Object item) { - gui_parse_item_keywords_internal (item, pgui_item, ERROR_ME); + return make_gui_item_from_keywords_internal (item, ERROR_ME); } +Lisp_Object +gui_parse_item_keywords_no_errors (Lisp_Object item) +{ + return make_gui_item_from_keywords_internal (item, ERROR_ME_NOT); +} + +/* convert a gui item into plist properties */ void -gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item) +gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item) { - gui_parse_item_keywords_internal (item, pgui_item, ERROR_ME_NOT); + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + + if (!NILP (pgui_item->callback)) + Fplist_put (plist, Q_callback, pgui_item->callback); + if (!NILP (pgui_item->suffix)) + Fplist_put (plist, Q_suffix, pgui_item->suffix); + if (!NILP (pgui_item->active)) + Fplist_put (plist, Q_active, pgui_item->active); + if (!NILP (pgui_item->included)) + Fplist_put (plist, Q_included, pgui_item->included); + if (!NILP (pgui_item->config)) + Fplist_put (plist, Q_config, pgui_item->config); + if (!NILP (pgui_item->filter)) + Fplist_put (plist, Q_filter, pgui_item->filter); + if (!NILP (pgui_item->style)) + Fplist_put (plist, Q_style, pgui_item->style); + if (!NILP (pgui_item->selected)) + Fplist_put (plist, Q_selected, pgui_item->selected); + if (!NILP (pgui_item->keys)) + Fplist_put (plist, Q_keys, pgui_item->keys); + if (!NILP (pgui_item->accelerator)) + Fplist_put (plist, Q_accelerator, pgui_item->accelerator); } /* @@ -226,13 +279,48 @@ gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item) * if any */ int -gui_item_active_p (CONST struct gui_item *pgui_item) +gui_item_active_p (Lisp_Object gui_item) { /* This function can call lisp */ /* Shortcut to avoid evaluating Qt each time */ - return (EQ (pgui_item->active, Qt) - || !NILP (Feval (pgui_item->active))); + return (EQ (XGUI_ITEM (gui_item)->active, Qt) + || !NILP (Feval (XGUI_ITEM (gui_item)->active))); +} + +/* set menu accelerator key to first underlined character in menu name */ +Lisp_Object +gui_item_accelerator (Lisp_Object gui_item) +{ + struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item); + + if (!NILP (pgui->accelerator)) + return pgui->accelerator; + + else + return pgui->name; +} + +Lisp_Object +gui_name_accelerator (Lisp_Object nm) +{ + /* !!#### This function has not been Mule-ized */ + char* name = (char*)XSTRING_DATA (nm); + + while (*name) { + if (*name=='%') { + ++name; + if (!(*name)) + return Qnil; + if (*name=='_' && *(name+1)) + { + int accelerator = (int) (unsigned char) (*(name+1)); + return make_char (tolower (accelerator)); + } + } + ++name; + } + return Qnil; } /* @@ -240,13 +328,13 @@ gui_item_active_p (CONST struct gui_item *pgui_item) * if any */ int -gui_item_selected_p (CONST struct gui_item *pgui_item) +gui_item_selected_p (Lisp_Object gui_item) { /* This function can call lisp */ /* Shortcut to avoid evaluating Qt each time */ - return (EQ (pgui_item->selected, Qt) - || !NILP (Feval (pgui_item->selected))); + return (EQ (XGUI_ITEM (gui_item)->selected, Qt) + || !NILP (Feval (XGUI_ITEM (gui_item)->selected))); } /* @@ -255,9 +343,10 @@ gui_item_selected_p (CONST struct gui_item *pgui_item) * configuration variable */ int -gui_item_included_p (CONST struct gui_item *pgui_item, Lisp_Object conflist) +gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist) { /* This function can call lisp */ + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */ if (!EQ (pgui_item->included, Qt) @@ -289,11 +378,12 @@ signal_too_long_error (Lisp_Object name) * buffer. */ unsigned int -gui_item_display_flush_left (CONST struct gui_item *pgui_item, +gui_item_display_flush_left (Lisp_Object gui_item, char* buf, Bytecount buf_len) { char *p = buf; Bytecount len; + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); /* Copy item name first */ CHECK_STRING (pgui_item->name); @@ -336,14 +426,17 @@ gui_item_display_flush_left (CONST struct gui_item *pgui_item, * buffer. */ unsigned int -gui_item_display_flush_right (CONST struct gui_item *pgui_item, +gui_item_display_flush_right (Lisp_Object gui_item, char* buf, Bytecount buf_len) { + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); *buf = 0; +#ifdef HAVE_MENUBARS /* Have keys? */ if (!menubar_show_keybindings) return 0; +#endif /* Try :keys first */ if (!NILP (pgui_item->keys)) @@ -374,11 +467,14 @@ gui_item_display_flush_right (CONST struct gui_item *pgui_item, } #endif /* HAVE_WINDOW_SYSTEM */ -Lisp_Object -mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object)) +static Lisp_Object +mark_gui_item (Lisp_Object obj, void (*markobj) (Lisp_Object)) { + struct Lisp_Gui_Item *p = XGUI_ITEM (obj); + markobj (p->name); markobj (p->callback); + markobj (p->config); markobj (p->suffix); markobj (p->active); markobj (p->included); @@ -387,14 +483,32 @@ mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object)) markobj (p->style); markobj (p->selected); markobj (p->keys); + markobj (p->accelerator); return Qnil; } +static unsigned long +gui_item_hash (Lisp_Object obj, int depth) +{ + struct Lisp_Gui_Item *p = XGUI_ITEM (obj); + + return HASH2 (HASH5 (internal_hash (p->name, depth + 1), + internal_hash (p->callback, depth + 1), + internal_hash (p->suffix, depth + 1), + internal_hash (p->active, depth + 1), + internal_hash (p->included, depth + 1)), + HASH5 (internal_hash (p->config, depth + 1), + internal_hash (p->filter, depth + 1), + internal_hash (p->style, depth + 1), + internal_hash (p->selected, depth + 1), + internal_hash (p->keys, depth + 1))); +} + int -gui_item_hash (Lisp_Object hashtable, struct gui_item* g, int slot) +gui_item_id_hash (Lisp_Object hashtable, Lisp_Object gitem, int slot) { - int hashid = HASH2 (internal_hash (g->callback, 0), internal_hash (g->name, 0)); + int hashid = gui_item_hash (gitem, 0); int id = GUI_ITEM_ID_BITS (hashid, slot); while (!NILP (Fgethash (make_int (id), hashtable, Qnil))) @@ -404,6 +518,58 @@ gui_item_hash (Lisp_Object hashtable, struct gui_item* g, int slot) return id; } +static int +gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) +{ + struct Lisp_Gui_Item *p1 = XGUI_ITEM (obj1); + struct Lisp_Gui_Item *p2 = XGUI_ITEM (obj2); + + if (!(internal_equal (p1->name, p2->name, depth + 1) + && + internal_equal (p1->callback, p2->callback, depth + 1) + && + EQ (p1->suffix, p2->suffix) + && + EQ (p1->active, p2->active) + && + EQ (p1->included, p2->included) + && + EQ (p1->config, p2->config) + && + EQ (p1->filter, p2->filter) + && + EQ (p1->style, p2->style) + && + EQ (p1->selected, p2->selected) + && + EQ (p1->accelerator, p2->accelerator) + && + EQ (p1->keys, p2->keys))) + return 0; + return 1; +} + +static void +print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) +{ + struct Lisp_Gui_Item *g = XGUI_ITEM (obj); + char buf[20]; + + if (print_readably) + error ("printing unreadable object #", g->header.uid); + + write_c_string ("#", g->header.uid); + write_c_string (buf, printcharfun); +} + +DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item, + mark_gui_item, print_gui_item, + 0, gui_item_equal, + gui_item_hash, + 0, + struct Lisp_Gui_Item); + void syms_of_gui (void) { diff --git a/src/gui.h b/src/gui.h index 010b41f..904bd96 100644 --- a/src/gui.h +++ b/src/gui.h @@ -32,10 +32,24 @@ void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *); extern int popup_up_p; +/************************************************************************/ +/* Image Instance Object */ +/************************************************************************/ + +DECLARE_LRECORD (gui_item, struct Lisp_Gui_Item); +#define XGUI_ITEM(x) \ + XRECORD (x, gui_item, struct Lisp_Gui_Item) +#define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item) +#define GUI_ITEMP(x) RECORDP (x, gui_item) +#define GC_GUI_ITEMP(x) GC_RECORDP (x, gui_item) +#define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item) +#define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item) + /* This structure describes gui button, menu item or submenu properties */ -struct gui_item +struct Lisp_Gui_Item { + struct lcrecord_header header; Lisp_Object name; /* String */ Lisp_Object callback; /* Symbol or form */ Lisp_Object suffix; /* String */ @@ -46,50 +60,38 @@ struct gui_item Lisp_Object style; /* Symbol */ Lisp_Object selected; /* Form */ Lisp_Object keys; /* String */ + Lisp_Object accelerator; /* Char or Symbol */ }; -#define GUI_ITEM_LAST_GCPROED keys -#define GUI_ITEM_GCPRO_COUNT \ - (slot_offset(struct gui_item, GUI_ITEM_LAST_GCPROED) / sizeof(Lisp_Object) + 1) - -/* - * gui_item is a struct containing a bunch of Lisp_Object - * members. We need to GC-protect all the member slots. - * Rather than build a long chain of individual gcpro structs - * that protect the slots individually, we protect all the - * member slots by pretending the struct is an array. ANSI C - * requires this hack to work, ugly though it is. - */ -#define GCPRO_GUI_ITEM(pgui_item) \ - do { \ - Lisp_Object *gui_item_array = (Lisp_Object *) pgui_item; \ - GCPRO1 (gui_item_array[0]); \ - gcpro1.nvars = GUI_ITEM_GCPRO_COUNT; \ - } while (0); 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; -void gui_item_init (struct gui_item *pgui_item); -void gui_item_add_keyval_pair (struct gui_item *pgui_item, +void gui_item_add_keyval_pair (Lisp_Object, Lisp_Object key, Lisp_Object val, Error_behavior errb); -void gui_parse_item_keywords (Lisp_Object item, struct gui_item *pgui_item); -void gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item); -int gui_item_active_p (CONST struct gui_item *pgui_item); -int gui_item_selected_p (CONST struct gui_item *pgui_item); -int gui_item_included_p (CONST struct gui_item *pgui_item, Lisp_Object into); -int gui_item_hash (Lisp_Object, struct gui_item*, int); -Lisp_Object mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object)); -unsigned int gui_item_display_flush_left (CONST struct gui_item *pgui_item, +Lisp_Object gui_parse_item_keywords (Lisp_Object item); +Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item); +int gui_item_active_p (Lisp_Object); +int gui_item_selected_p (Lisp_Object); +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); +int gui_item_id_hash (Lisp_Object, Lisp_Object gui_item, int); +unsigned int gui_item_display_flush_left (Lisp_Object pgui_item, char* buf, Bytecount buf_len); -unsigned int gui_item_display_flush_right (CONST struct gui_item *pgui_item, +unsigned int gui_item_display_flush_right (Lisp_Object gui_item, char* buf, Bytecount buf_len); +Lisp_Object allocate_gui_item (); +void gui_item_init (Lisp_Object gui_item); + /* this is mswindows biased but reasonably safe I think */ #define GUI_ITEM_ID_SLOTS 8 #define GUI_ITEM_ID_MIN(s) (s * 0x2000) #define GUI_ITEM_ID_MAX(s) (0x1FFF + GUI_ITEM_ID_MIN (s)) #define GUI_ITEM_ID_BITS(x,s) (((x) & 0x1FFF) + GUI_ITEM_ID_MIN (s)) +#define MAX_MENUITEM_LENGTH 128 + #endif /* _XEMACS_GUI_H_ */ diff --git a/src/indent.c b/src/indent.c index 5d97e4d..8de057e 100644 --- a/src/indent.c +++ b/src/indent.c @@ -40,6 +40,8 @@ Boston, MA 02111-1307, USA. */ #endif #include "window.h" +Lisp_Object Qcoerce; + /* Indentation can insert tabs if this is non-zero; otherwise always uses spaces */ int indent_tabs_mode; @@ -193,6 +195,53 @@ column_at_point (struct buffer *buf, Bufpos init_pos, int cur_col) } int +string_column_at_point (struct Lisp_String* s, Bufpos init_pos, int tab_width) +{ + int col; + int tab_seen; + int post_tab; + Bufpos pos = init_pos; + Emchar c; + + if (tab_width <= 0 || tab_width > 1000) tab_width = 8; + col = tab_seen = post_tab = 0; + + while (1) + { + if (pos <= 0) + break; + + pos--; + c = string_char (s, pos); + if (c == '\t') + { + if (tab_seen) + col = ((col + tab_width) / tab_width) * tab_width; + + post_tab += col; + col = 0; + tab_seen = 1; + } + else if (c == '\n') + break; + else +#ifdef MULE + col += XCHARSET_COLUMNS (CHAR_CHARSET (c)); +#else + col ++; +#endif /* MULE */ + } + + if (tab_seen) + { + col = ((col + tab_width) / tab_width) * tab_width; + col += post_tab; + } + + return col; +} + +int current_column (struct buffer *buf) { if (buf == last_known_column_buffer @@ -342,9 +391,11 @@ and horizontal scrolling has no effect. If specified column is within a character, point goes after that character. If it's past end of line, point goes to end of line. -A non-nil second (optional) argument FORCE means, if the line -is too short to reach column COLUMN then add spaces/tabs to get there, -and if COLUMN is in the middle of a tab character, change it to spaces. +A value of 'coerce for the second (optional) argument FORCE means if +COLUMN is in the middle of a tab character, change it to spaces. +Any other non-nil value means the same, plus if the line is too short to +reach column COLUMN, then add spaces/tabs to get there. + Returns the actual column that it moved to. */ (column, force, buffer)) @@ -428,7 +479,7 @@ Returns the actual column that it moved to. } /* If line ends prematurely, add space to the end. */ - if (col < goal && !NILP (force)) + if (col < goal && !NILP (force) && !EQ (force, Qcoerce)) { col = goal; Findent_to (make_int (col), Qzero, buffer); @@ -541,7 +592,7 @@ vpix_motion (line_start_cache_dynarr *cache, int start, int end) assert (start <= end); assert (start >= 0); assert (end < Dynarr_length (cache)); - + vpix = 0; for (i = start; i <= end; i++) vpix += Dynarr_atp (cache, i)->height; @@ -681,7 +732,7 @@ Lisp_Object vertical_motion_1 (Lisp_Object lines, Lisp_Object window, bufpos = vmotion_1 (w, orig, XINT (lines), vpos, vpix); /* Note that the buffer's point is set, not the window's point. */ - if (selected) + if (selected) BUF_SET_PT (XBUFFER (w->buffer), bufpos); else set_marker_restricted (w->pointm[CURRENT_DISP], @@ -856,7 +907,7 @@ that the motion should be as close as possible to PIXELS. bufpos = vmotion_pixels (window, orig, XINT (pixels), howto, &motion); - if (selected) + if (selected) BUF_SET_PT (XBUFFER (w->buffer), bufpos); else set_marker_restricted (w->pointm[CURRENT_DISP], @@ -879,6 +930,8 @@ syms_of_indent (void) #endif DEFSUBR (Fvertical_motion); DEFSUBR (Fvertical_motion_pixels); + + defsymbol (&Qcoerce, "coerce"); } void diff --git a/src/input-method-xlib.c b/src/input-method-xlib.c index cb8a9b0..08e0135 100644 --- a/src/input-method-xlib.c +++ b/src/input-method-xlib.c @@ -38,6 +38,9 @@ Boston, MA 02111-1307, USA. */ #include "EmacsFrame.h" #include "events.h" +#include +#include + #ifndef XIM_XLIB #error XIM_XLIB is not defined?? #endif @@ -72,6 +75,8 @@ static char DefaultXIMStyles[] = "XIMPreeditNone|XIMStatusNothing\n" "XIMPreeditNone|XIMStatusNone"; +static Boolean xim_initted = False; + static XIMStyle best_style (XIMStyles *user, XIMStyles *xim); void @@ -125,60 +130,73 @@ Initialize_Locale (void) } } -/* Create X input method for device */ -void -XIM_init_device (struct device *d) -{ - Display *dpy = DEVICE_X_DISPLAY (d); - char *name, *class; - XIM xim; +/******************************************************************/ +/* Input method using xlib */ +/******************************************************************/ - XtGetApplicationNameAndClass (dpy, &name, &class); - - DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); +/* + * called from when XIM is destroying + */ +static void +IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data) +{ + struct frame *f = (struct frame *)client_data; + struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + Lisp_Object frame_list = DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f))); + Lisp_Object tail; + struct frame *target_frame = NULL; - if (xim == NULL) + LIST_LOOP (tail, frame_list) { - stderr_out ("Warning: XOpenIM() failed...no input server available\n"); - return; + if (target_frame = XFRAME (XCAR (tail))) + { + if ( FRAME_X_XIC(target_frame) ) + { + XDestroyIC (FRAME_X_XIC(target_frame)); + FRAME_X_XIC (target_frame) = NULL; + } + } } - else + +#if 0 + if ( DEVICE_X_XIM (d) ) { - /* Get supported styles */ - XGetIMValues (xim, XNQueryInputStyle, &DEVICE_X_XIM_STYLES (d), NULL); -#ifdef DEBUG_XIM - describe_XIM (xim); -#endif + stderr_out ("NULLing d->xim...\n"); + /* DEVICE_X_XIM (d) = NULL; */ } +#endif + + xim_initted = False; + return; } -/* Create an X input context for this frame. */ -void -XIM_init_frame (struct frame *f) +/* + * called from when FRAME is initializing + */ +static void +IMInstantiateCallback (Display *dpy, XPointer client_data, XPointer call_data) { - struct device *d = XDEVICE (FRAME_DEVICE (f)); - XIM xim = DEVICE_X_XIM (d); - XIC xic; - Widget w = FRAME_X_TEXT_WIDGET (f); + struct frame *f = (struct frame *)client_data; + struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + XIM xim; + Widget w = FRAME_X_TEXT_WIDGET ((struct frame *)client_data); Window win = XtWindow (w); - XRectangle p_area = {0,0,1,1}, s_area={0,0,1,1}; + XRectangle p_area = {0,0,1,1}, s_area = {0,0,1,1}; XPoint spot = {0,0}; XIMStyle style; XVaNestedList p_list, s_list; - + char *name, *class; typedef struct { XIMStyles styles; XFontSet fontset; Pixel fg; Pixel bg; + char *inputmethod; } xic_vars_t; - xic_vars_t xic_vars; - - /* mrb: #### Fix so that background and foreground is set from - default face, rather than foreground and background resources, or - that the user can use set-frame-parameters to set xic attributes */ + XIMCallback ximcallback; + XIC xic; #define res(name, class, representation, field, default_value) \ { name, class, representation, sizeof(xic_vars.field), \ @@ -190,21 +208,40 @@ XIM_init_frame (struct frame *f) res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, (XtPointer) DefaultXIMStyles), res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, (XtPointer) XtDefaultFontSet), res(XtNximForeground, XtCForeground, XtRPixel, fg, (XtPointer) XtDefaultForeground), - res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground) + res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground), + res(XtNinputMethod, XtCInputMethod, XtRString, inputmethod, (XtPointer) NULL) }; - assert (win != 0 && w != NULL && d != NULL); + /* ---------- beginning of the action ---------- */ - if (!xim) - { /* No input method? */ - FRAME_X_XIC (f) = NULL; - return; + /* + * if no xim is presented, initialize xim ... + */ + if ( xim_initted == False ) + { + xim_initted = True; + XtGetApplicationNameAndClass (dpy, &name, &class); + DEVICE_X_XIM (d) = xim = XOpenIM (dpy, XtDatabase (dpy), name, class); + + /* destroy callback for im */ + ximcallback.callback = IMDestroyCallback; + ximcallback.client_data = (XPointer)f; + XSetIMValues (xim, XNDestroyCallback, &ximcallback, NULL); + } + else + { + xim = DEVICE_X_XIM (d); } + w = FRAME_X_TEXT_WIDGET (f); + + /* + * initialize XIC + */ + if ( FRAME_X_XIC (f) ) return; XtGetApplicationResources (w, &xic_vars, resources, XtNumber (resources), NULL, 0); - if (!xic_vars.fontset) { stderr_out ("Can't get fontset resource for Input Method\n"); @@ -212,45 +249,46 @@ XIM_init_frame (struct frame *f) return; } + /* construct xic */ + XGetIMValues (xim, XNQueryInputStyle, &DEVICE_X_XIM_STYLES(d), NULL); FRAME_X_XIC_STYLE (f) = style = - best_style (&xic_vars.styles, DEVICE_X_XIM_STYLES (d)); + best_style (&xic_vars.styles, (XIMStyles *)DEVICE_X_XIM_STYLES(d)); - /* Hopefully we don't have to conditionalize the following based on - style; the IM should ignore values it doesn't use */ p_list = XVaCreateNestedList (0, - XNArea, &p_area, - XNSpotLocation, &spot, - XNForeground, xic_vars.fg, - XNBackground, xic_vars.bg, - XNFontSet, xic_vars.fontset, - NULL); + XNArea, &p_area, + XNSpotLocation, &spot, + XNForeground, xic_vars.fg, + XNBackground, xic_vars.bg, + XNFontSet, xic_vars.fontset, + NULL); s_list = XVaCreateNestedList (0, - XNArea, &s_area, - XNForeground, xic_vars.fg, - XNBackground, xic_vars.bg, - XNFontSet, xic_vars.fontset, - NULL); + XNArea, &s_area, + XNForeground, xic_vars.fg, + XNBackground, xic_vars.bg, + XNFontSet, xic_vars.fontset, + NULL); + FRAME_X_XIC (f) = xic = XCreateIC (xim, - XNInputStyle, style, - XNClientWindow, win, - XNFocusWindow, win, - XNPreeditAttributes, p_list, - XNStatusAttributes, s_list, - NULL); + XNInputStyle, style, + XNClientWindow, win, + XNFocusWindow, win, + XNPreeditAttributes, p_list, + XNStatusAttributes, s_list, + NULL); XFree (p_list); XFree (s_list); if (!xic) { - stderr_out ("Warning: XCreateIC failed\n"); + stderr_out ("Warning: XCreateIC failed.\n"); return; } if (style & XIMPreeditPosition) - { /* Init spot to invalid values */ - XPoint *frame_spot = &(FRAME_X_XIC_SPOT (f)); + { + XPoint *frame_spot = &(FRAME_X_XIC_SPOT(f)); frame_spot->x = frame_spot->y = -1; } @@ -258,11 +296,63 @@ XIM_init_frame (struct frame *f) XSetICFocus (xic); -#ifdef DEBUG_XIM - describe_XIC (xic); + return; +} + +/* Create X input method for device */ +void +XIM_init_device (struct device *d) +{ + /* do nothing here */ + return; +} + +/* Callback for when the frame was deleted (closed) */ +static void +XIM_delete_frame (Widget w, XtPointer client_data, XtPointer call_data) +{ + struct frame *f = (struct frame *)client_data; + struct device *d = XDEVICE (FRAME_DEVICE ((struct frame *)client_data)); + Display *dpy = DEVICE_X_DISPLAY (d); + + XUnregisterIMInstantiateCallback (dpy, NULL, NULL, NULL, + IMInstantiateCallback, (XtPointer)f); + + if ( FRAME_X_XIC (f) ) + { + XDestroyIC (FRAME_X_XIC(f)); + FRAME_X_XIC (f) = NULL; + } + return; +} + +/* Create an X input context for this frame. + - Register the IM to be initiated later using XRegisterIMInstantiateCallback + */ +void +XIM_init_frame (struct frame *f) +{ + struct device *d = XDEVICE (FRAME_DEVICE (f)); + + XRegisterIMInstantiateCallback (DEVICE_X_DISPLAY (d), NULL, NULL, NULL, + IMInstantiateCallback, (XtPointer)f); + +#if 0 + if ( FRAME_X_XIC (f) ) + return; #endif + if ( ! DEVICE_X_XIM (d) ) + { + stderr_out ("X Input Method open failed. Waiting IM to be enabled.\n"); + } + + /* when frame is going to be destroyed (closed) */ + XtAddCallback (FRAME_X_TEXT_WIDGET(f), XNDestroyCallback, + XIM_delete_frame, (XtPointer)f); + return; } + void XIM_SetGeometry (struct frame *f) { @@ -346,7 +436,7 @@ XIM_SetSpotLocation (struct frame *f, int x, int y) void XIM_focus_event (struct frame *f, int in_p) { - if (FRAME_X_XIC (f)) + if (FRAME_X_XIC (f) /* && FRAME_X_XIM_REGISTERED(f) */) (in_p ? XSetICFocus : XUnsetICFocus) (FRAME_X_XIC (f)); } diff --git a/src/keymap.c b/src/keymap.c index 9f62801..430acdc 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -285,9 +285,16 @@ print_keymap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (buf, printcharfun); } +static const struct lrecord_description keymap_description[] = { + { XD_LISP_OBJECT, offsetof(Lisp_Keymap, parents), 6 }, + { XD_LISP_OBJECT, offsetof(Lisp_Keymap, name), 1 }, + { XD_END } +}; + /* No need for keymap_equal #### Why not? */ DEFINE_LRECORD_IMPLEMENTATION ("keymap", keymap, mark_keymap, print_keymap, 0, 0, 0, + keymap_description, Lisp_Keymap); /************************************************************************/ @@ -1134,6 +1141,7 @@ copy_keymap_internal (Lisp_Keymap *keymap) new_keymap->sub_maps_cache = Qnil; /* No submaps */ new_keymap->table = Fcopy_hash_table (keymap->table); new_keymap->inverse_table = Fcopy_hash_table (keymap->inverse_table); + new_keymap->default_binding = keymap->default_binding; /* After copying the inverse map, we need to copy the conses which are its values, lest they be shared by the copy, and mangled. */ diff --git a/src/lisp.h b/src/lisp.h index c127723..d7951b1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */ #include /* NULL, etc. */ #include #include +#include /* offsetof */ #ifdef __lucid # include @@ -336,6 +337,8 @@ struct Lisp_Font_Instance; typedef struct Lisp_Font_Instance Lisp_Font_Instance; struct Lisp_Image_Instance; typedef struct Lisp_Image_Instance Lisp_Image_Instance; +struct Lisp_Gui_Item; +typedef struct Lisp_Gui_Item Lisp_Gui_Item; struct display_line; struct redisplay_info; struct window_mirror; @@ -1111,9 +1114,9 @@ set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value) { unsigned int ui = (unsigned int) i; if (value) - (v)->bits[ui >> LONGBITS_LOG2] |= (1U << (ui & (LONGBITS_POWER_OF_2 - 1))); + (v)->bits[ui >> LONGBITS_LOG2] |= (1UL << (ui & (LONGBITS_POWER_OF_2 - 1))); else - (v)->bits[ui >> LONGBITS_LOG2] &= ~(1U << (ui & (LONGBITS_POWER_OF_2 - 1))); + (v)->bits[ui >> LONGBITS_LOG2] &= ~(1UL << (ui & (LONGBITS_POWER_OF_2 - 1))); } /* Number of longs required to hold LEN bits */ @@ -1549,7 +1552,7 @@ Lisp_Object,Lisp_Object,Lisp_Object /* Can't be const, because then subr->doc is read-only and Snarf_documentation chokes */ -#define subr_lheader_initializer { 0, { 0, 0, 0 } } +#define subr_lheader_initializer { 0, 0, 0, 0 } #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ Lisp_Object Fname (EXFUN_##max_args); \ diff --git a/src/lrecord.h b/src/lrecord.h index 5173df6..1858552 100644 --- a/src/lrecord.h +++ b/src/lrecord.h @@ -60,15 +60,13 @@ Boston, MA 02111-1307, USA. */ struct lrecord_header { /* index into lrecord_implementations_table[] */ - unsigned char type; - struct { - /* 1 if the object is marked during GC. */ - unsigned mark :1; - /* 1 if the object resides in read-only space */ - unsigned c_readonly : 1; - /* 1 if the object is readonly from lisp */ - unsigned lisp_readonly : 1; - } flags; + unsigned type :8; + /* 1 if the object is marked during GC. */ + unsigned mark :1; + /* 1 if the object resides in read-only space */ + unsigned c_readonly : 1; + /* 1 if the object is readonly from lisp */ + unsigned lisp_readonly : 1; }; struct lrecord_implementation; @@ -77,9 +75,9 @@ int lrecord_type_index (CONST struct lrecord_implementation *implementation); # define set_lheader_implementation(header,imp) do { \ struct lrecord_header* SLI_header = (header); \ (SLI_header)->type = lrecord_type_index (imp); \ - (SLI_header)->flags.mark = 0; \ - (SLI_header)->flags.c_readonly = 0; \ - (SLI_header)->flags.lisp_readonly = 0; \ + (SLI_header)->mark = 0; \ + (SLI_header)->c_readonly = 0; \ + (SLI_header)->lisp_readonly = 0; \ } while (0) struct lcrecord_header @@ -156,6 +154,10 @@ struct lrecord_implementation `equal', they *must* hash to the same value or the hashing won't work). */ unsigned long (*hash) (Lisp_Object, int); + + /* External data layout description */ + const struct lrecord_description *description; + Lisp_Object (*getprop) (Lisp_Object obj, Lisp_Object prop); int (*putprop) (Lisp_Object obj, Lisp_Object prop, Lisp_Object val); int (*remprop) (Lisp_Object obj, Lisp_Object prop); @@ -184,20 +186,117 @@ extern CONST struct lrecord_implementation *lrecord_implementations_table[]; extern int gc_in_progress; -#define MARKED_RECORD_P(obj) (gc_in_progress && XRECORD_LHEADER (obj)->flags.mark) -#define MARKED_RECORD_HEADER_P(lheader) ((lheader)->flags.mark) -#define MARK_RECORD_HEADER(lheader) ((void) ((lheader)->flags.mark = 1)) -#define UNMARK_RECORD_HEADER(lheader) ((void) ((lheader)->flags.mark = 0)) +#define MARKED_RECORD_P(obj) (gc_in_progress && XRECORD_LHEADER (obj)->mark) +#define MARKED_RECORD_HEADER_P(lheader) ((lheader)->mark) +#define MARK_RECORD_HEADER(lheader) ((void) ((lheader)->mark = 1)) +#define UNMARK_RECORD_HEADER(lheader) ((void) ((lheader)->mark = 0)) #define UNMARKABLE_RECORD_HEADER_P(lheader) \ (LHEADER_IMPLEMENTATION (lheader)->marker == this_one_is_unmarkable) -#define C_READONLY_RECORD_HEADER_P(lheader) ((lheader)->flags.c_readonly) -#define LISP_READONLY_RECORD_HEADER_P(lheader) ((lheader)->flags.lisp_readonly) +#define C_READONLY_RECORD_HEADER_P(lheader) ((lheader)->c_readonly) +#define LISP_READONLY_RECORD_HEADER_P(lheader) ((lheader)->lisp_readonly) #define SET_C_READONLY_RECORD_HEADER(lheader) \ - ((void) ((lheader)->flags.c_readonly = (lheader)->flags.lisp_readonly = 1)) + ((void) ((lheader)->c_readonly = (lheader)->lisp_readonly = 1)) #define SET_LISP_READONLY_RECORD_HEADER(lheader) \ - ((void) ((lheader)->flags.lisp_readonly = 1)) + ((void) ((lheader)->lisp_readonly = 1)) + +/* External description stuff + + 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. + + The description ends with a "XD_END" record. + + Some example descriptions : + static const struct lrecord_description cons_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Cons, car), 2 }, + { XD_END } + }; + + Which means "two lisp objects starting at the 'car' element" + + static const struct lrecord_description string_description[] = { + { XD_STRING_DATA, offsetof(Lisp_String, data) }, + { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, + { XD_END } + }; + "A string data pointer at 'data', one lisp object at 'plist'" + + The existing types : + XD_LISP_OBJECT + Lisp objects. The third element is the count. This is also the type to use + for pointers to other lrecords. + + XD_STRING_DATA + Pointer to string data. + + XD_OPAQUE_PTR + Pointer to undumpable data. Must be NULL when dumping. + + XD_STRUCT_PTR + Pointer to described struct. Parameters are number of structures and + struct_description. + + XD_OPAQUE_DATA_PTR + Pointer to dumpable opaque data. Parameter is the size of the data. + Pointed data must be relocatable without changes. + + XD_SIZE_T + size_t value. Used for counts. + + XD_INT + int value. Used for counts. + + XD_LONG + long value. Used for counts. + + XD_END + Special type indicating the end of the array. + + + Special macros: + XD_INDIRECT(line) + Usable where a "count" or "size" is requested. Gives the value of the element + which is at line number 'line' in the description (count starts at zero). + + XD_PARENT_INDIRECT(line) + Same as XD_INDIRECT but the element number refers to the parent structure. + Usable only in struct descriptions. +*/ + +enum lrecord_description_type { + XD_LISP_OBJECT, + XD_STRING_DATA, + XD_OPAQUE_PTR, + XD_STRUCT_PTR, + XD_OPAQUE_DATA_PTR, + XD_SIZE_T, + XD_INT, + XD_LONG, + XD_END +}; + +struct lrecord_description { + enum lrecord_description_type type; + int offset; + EMACS_INT data1; + const struct struct_description *data2; +}; + +struct struct_description { + size_t size; + const struct lrecord_description *description; +}; + +#define XD_INDIRECT(count) (-1-(count)) +#define XD_PARENT_INDIRECT(count) (-1000-(count)) + +#define XD_DYNARR_DESC(base_type, sub_desc) \ + { XD_STRUCT_PTR, offsetof(base_type, base), XD_INDIRECT(1), sub_desc }, \ + { XD_INT, offsetof(base_type, max) } /* Declaring the following structures as const puts them in the text (read-only) segment, which makes debugging inconvenient @@ -220,29 +319,29 @@ extern int gc_in_progress; # define DECLARE_ERROR_CHECK_TYPECHECK(c_name, structtype) #endif -#define DEFINE_BASIC_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,structtype) \ -DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,0,0,0,0,structtype) +#define DEFINE_BASIC_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \ +DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype) -#define DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,structtype) \ -MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,sizeof(structtype),0,1,structtype) +#define DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,structtype) \ +MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,sizeof(structtype),0,1,structtype) -#define DEFINE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,structtype) \ -DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,0,0,0,0,structtype) +#define DEFINE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \ +DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype) -#define DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,structtype) \ -MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,sizeof (structtype),0,0,structtype) +#define DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,structtype) \ +MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,sizeof (structtype),0,0,structtype) -#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,sizer,structtype) \ -DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,0,0,0,0,sizer,structtype) +#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \ +DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype) -#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,sizer,structtype) \ -MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,0,sizer,0,structtype) \ +#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,sizer,structtype) \ +MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,0,sizer,0,structtype) \ -#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,getprop,putprop,remprop,props,size,sizer,basic_p,structtype) \ +#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,size,sizer,basic_p,structtype) \ DECLARE_ERROR_CHECK_TYPECHECK(c_name, structtype) \ static int lrecord_##c_name##_lrecord_type_index; \ CONST_IF_NOT_DEBUG struct lrecord_implementation lrecord_##c_name = \ - { name, marker, printer, nuker, equal, hash, \ + { name, marker, printer, nuker, equal, hash, desc, \ getprop, putprop, remprop, props, size, sizer, \ &(lrecord_##c_name##_lrecord_type_index), basic_p } \ diff --git a/src/lstream.c b/src/lstream.c index 5a797fb..42eb940 100644 --- a/src/lstream.c +++ b/src/lstream.c @@ -188,7 +188,7 @@ sizeof_lstream (CONST void *header) DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("stream", lstream, mark_lstream, print_lstream, - finalize_lstream, 0, 0, + finalize_lstream, 0, 0, 0, sizeof_lstream, Lstream); void diff --git a/src/marker.c b/src/marker.c index 59a81aa..5ed6c4d 100644 --- a/src/marker.c +++ b/src/marker.c @@ -95,9 +95,14 @@ marker_hash (Lisp_Object obj, int depth) return hash; } +static const struct lrecord_description marker_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Marker, next), 3 }, + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("marker", marker, mark_marker, print_marker, 0, - marker_equal, marker_hash, + marker_equal, marker_hash, marker_description, struct Lisp_Marker); /* Operations on markers. */ diff --git a/src/menubar-msw.c b/src/menubar-msw.c index c56dc36..2681f0f 100644 --- a/src/menubar-msw.c +++ b/src/menubar-msw.c @@ -116,14 +116,12 @@ static Lisp_Object current_hash_table; #define MENU_ITEM_ID_BITS(x) (((x) & 0x7FFF) | 0x8000) static HMENU top_level_menu; -#define MAX_MENUITEM_LENGTH 128 - /* * This returns Windows-style menu item string: * "Left Flush\tRight Flush" */ static char* -displayable_menu_item (struct gui_item* pgui_item, int bar_p) +displayable_menu_item (Lisp_Object gui_item, int bar_p) { /* We construct the name in a static buffer. That's fine, because menu items longer than 128 chars are probably programming errors, @@ -134,7 +132,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p) unsigned int ll, lr; /* Left flush part of the string */ - ll = gui_item_display_flush_left (pgui_item, buf, MAX_MENUITEM_LENGTH); + ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH); /* Escape '&' as '&&' */ ptr = buf; @@ -142,7 +140,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p) { if (ll+2 >= MAX_MENUITEM_LENGTH) signal_simple_error ("Menu item produces too long displayable string", - pgui_item->name); + XGUI_ITEM (gui_item)->name); memmove (ptr+1, ptr, (ll-(ptr-buf))+1); ll++; ptr+=2; @@ -165,7 +163,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p) if (!bar_p) { assert (MAX_MENUITEM_LENGTH > ll + 1); - lr = gui_item_display_flush_right (pgui_item, buf + ll + 1, + lr = gui_item_display_flush_right (gui_item, buf + ll + 1, MAX_MENUITEM_LENGTH - ll - 1); if (lr) buf [ll] = '\t'; @@ -279,21 +277,21 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, { /* Submenu */ HMENU submenu; - struct gui_item gui_item; + Lisp_Object gui_item = allocate_gui_item (); + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); struct gcpro gcpro1; - gui_item_init (&gui_item); - GCPRO_GUI_ITEM (&gui_item); + GCPRO1 (gui_item); - menu_parse_submenu_keywords (item, &gui_item); + menu_parse_submenu_keywords (item, gui_item); - if (!STRINGP (gui_item.name)) + if (!STRINGP (pgui_item->name)) signal_simple_error ("Menu name (first element) must be a string", item); - if (!gui_item_included_p (&gui_item, Vmenubar_configuration)) + if (!gui_item_included_p (gui_item, Vmenubar_configuration)) return; - if (!gui_item_active_p (&gui_item)) + if (!gui_item_active_p (gui_item)) item_info.fState = MFS_GRAYED; /* Temptation is to put 'else' right here. Although, the displayed item won't have an arrow indicating that it is a @@ -301,7 +299,7 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, submenu = create_empty_popup_menu(); item_info.fMask |= MIIM_SUBMENU; - item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p); + item_info.dwTypeData = displayable_menu_item (gui_item, bar_p); item_info.hSubMenu = submenu; if (!(item_info.fState & MFS_GRAYED)) @@ -310,12 +308,12 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, keyed by menu handle */ if (NILP(path)) /* list1 cannot GC */ - path = list1 (gui_item.name); + path = list1 (pgui_item->name); else { Lisp_Object arg[2]; arg[0] = path; - arg[1] = list1 (gui_item.name); + arg[1] = list1 (pgui_item->name); /* Fappend gcpro'es its arg */ path = Fappend (2, arg); } @@ -329,22 +327,20 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, { /* An ordinary item */ Lisp_Object style, id; - struct gui_item gui_item; + Lisp_Object gui_item = gui_parse_item_keywords (item); + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); struct gcpro gcpro1; - gui_item_init (&gui_item); - GCPRO_GUI_ITEM (&gui_item); - - gui_parse_item_keywords (item, &gui_item); + GCPRO1 (gui_item); - if (!gui_item_included_p (&gui_item, Vmenubar_configuration)) + if (!gui_item_included_p (gui_item, Vmenubar_configuration)) return; - if (!gui_item_active_p (&gui_item)) + if (!gui_item_active_p (gui_item)) item_info.fState = MFS_GRAYED; - style = (NILP (gui_item.selected) || NILP (Feval (gui_item.selected)) - ? Qnil : gui_item.style); + style = (NILP (pgui_item->selected) || NILP (Feval (pgui_item->selected)) + ? Qnil : pgui_item->style); if (EQ (style, Qradio)) { @@ -356,13 +352,13 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, item_info.fState |= MFS_CHECKED; } - id = allocate_menu_item_id (path, gui_item.name, - gui_item.suffix); - Fputhash (id, gui_item.callback, hash_tab); + id = allocate_menu_item_id (path, pgui_item->name, + pgui_item->suffix); + Fputhash (id, pgui_item->callback, hash_tab); item_info.wID = (UINT) XINT(id); item_info.fType |= MFT_STRING; - item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p); + item_info.dwTypeData = displayable_menu_item (gui_item, bar_p); UNGCPRO; /* gui_item */ } @@ -396,10 +392,9 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, int deep_p, flush_right; struct gcpro gcpro1; unsigned long checksum; - struct gui_item gui_item; - - gui_item_init (&gui_item); - GCPRO_GUI_ITEM (&gui_item); + Lisp_Object gui_item = allocate_gui_item (); + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + GCPRO1 (gui_item); /* We are sometimes called with the menubar unchanged, and with changed right flush. We have to update the menubar in this case, @@ -414,15 +409,15 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, deep_p = !NILP (path); /* Fetch keywords prepending the item list */ - desc = menu_parse_submenu_keywords (desc, &gui_item); + desc = menu_parse_submenu_keywords (desc, gui_item); /* Check that menu name is specified when expected */ - if (NILP (gui_item.name) && deep_p) + if (NILP (pgui_item->name) && deep_p) signal_simple_error ("Menu must have a name", desc); /* Apply filter if specified */ - if (!NILP (gui_item.filter)) - desc = call1 (gui_item.filter, desc); + if (!NILP (pgui_item->filter)) + desc = call1 (pgui_item->filter, desc); /* Loop thru the desc's CDR and add items for each entry */ flush_right = 0; @@ -453,11 +448,11 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, /* Add the header to the popup, if told so. The same as in X - an insensitive item, and a separator (Seems to me, there were two separators in X... In Windows this looks ugly, anyways. */ - if (!bar_p && !deep_p && popup_menu_titles && !NILP(gui_item.name)) + if (!bar_p && !deep_p && popup_menu_titles && !NILP(pgui_item->name)) { - CHECK_STRING (gui_item.name); + CHECK_STRING (pgui_item->name); InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED, - 0, XSTRING_DATA(gui_item.name)); + 0, XSTRING_DATA(pgui_item->name)); InsertMenu (menu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); SetMenuDefaultItem (menu, 0, MF_BYPOSITION); } diff --git a/src/menubar-x.c b/src/menubar-x.c index 61258db..6212281 100644 --- a/src/menubar-x.c +++ b/src/menubar-x.c @@ -131,7 +131,8 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, } else if (VECTORP (desc)) { - if (!button_item_to_widget_value (desc, wv, 1, + Lisp_Object gui_item = gui_parse_item_keywords (desc); + if (!button_item_to_widget_value (gui_item, wv, 1, (menu_type == MENUBAR_TYPE && depth <= 1))) { @@ -157,7 +158,7 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, wv->enabled = 1; wv->name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc))); - accel = menu_name_to_accelerator (wv->name); + accel = gui_name_accelerator (LISP_GETTEXT (XCAR (desc))); wv->accel = LISP_TO_VOID (accel); desc = Fcdr (desc); diff --git a/src/menubar.c b/src/menubar.c index bd03ead..8eab6af 100644 --- a/src/menubar.c +++ b/src/menubar.c @@ -102,8 +102,10 @@ current_frame_menubar (CONST struct frame* f) } Lisp_Object -menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item) +menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item) { + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + /* Menu descriptor should be a list */ CHECK_CONS (desc); @@ -130,7 +132,7 @@ menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item) desc = XCDR (desc); if (!NILP (desc)) CHECK_CONS (desc); - gui_item_add_keyval_pair (pgui_item, key, val, ERROR_ME); + gui_item_add_keyval_pair (gui_item, key, val, ERROR_ME); } /* Return the rest - supposed to be a list of items */ @@ -152,10 +154,10 @@ See also 'find-menu-item'. { Lisp_Object path_entry, submenu_desc, submenu; struct gcpro gcpro1; - struct gui_item gui_item; + Lisp_Object gui_item = allocate_gui_item (); + struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); - gui_item_init (&gui_item); - GCPRO_GUI_ITEM (&gui_item); + GCPRO1 (gui_item); EXTERNAL_LIST_LOOP (path_entry, path) { @@ -164,15 +166,15 @@ See also 'find-menu-item'. RETURN_UNGCPRO (Qnil); /* Parse this menu */ - desc = menu_parse_submenu_keywords (desc, &gui_item); + desc = menu_parse_submenu_keywords (desc, gui_item); /* Check that this (sub)menu is active */ - if (!gui_item_active_p (&gui_item)) + if (!gui_item_active_p (gui_item)) RETURN_UNGCPRO (Qnil); /* Apply :filter */ - if (!NILP (gui_item.filter)) - desc = call1 (gui_item.filter, desc); + if (!NILP (pgui_item->filter)) + desc = call1 (pgui_item->filter, desc); /* Find the next menu on the path inside this one */ EXTERNAL_LIST_LOOP (submenu_desc, desc) @@ -191,7 +193,7 @@ See also 'find-menu-item'. descend: /* Prepare for the next iteration */ - gui_item_init (&gui_item); + gui_item_init (gui_item); } /* We have successfully descended down the end of the path */ diff --git a/src/menubar.h b/src/menubar.h index 25fac94..2507d8b 100644 --- a/src/menubar.h +++ b/src/menubar.h @@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */ void update_frame_menubars (struct frame *f); void free_frame_menubars (struct frame *f); Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc, - struct gui_item* pgui_item); + Lisp_Object gui_item); Lisp_Object current_frame_menubar (CONST struct frame* f); EXFUN (Fmenu_find_real_submenu, 2); diff --git a/src/mule-ccl.c b/src/mule-ccl.c index 15dab0e..cc54369 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -1,5 +1,5 @@ /* CCL (Code Conversion Language) interpreter. - Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. + Copyright (C) 1995, 1997, 1998, 1999 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. This file is part of XEmacs. @@ -19,11 +19,19 @@ along with GNU Emacs; 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 : FSF Emacs 20.2 */ +/* Synched up with : FSF Emacs 20.3.10 without ExCCL + * (including {Read|Write}MultibyteChar) */ #ifdef emacs #include + +#if 0 +#ifdef STDC_HEADERS +#include +#endif +#endif + #include "lisp.h" #include "buffer.h" #include "character.h" @@ -37,9 +45,29 @@ Boston, MA 02111-1307, USA. */ #endif /* not emacs */ +/* This contains all code conversion map available to CCL. */ +/* +Lisp_Object Vcode_conversion_map_vector; +*/ + /* Alist of fontname patterns vs corresponding CCL program. */ Lisp_Object Vfont_ccl_encoder_alist; +/* This symbol is a property which assocates with ccl program vector. + Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */ +Lisp_Object Qccl_program; + +/* These symbols are properties which associate with code conversion + map and their ID respectively. */ +/* +Lisp_Object Qcode_conversion_map; +Lisp_Object Qcode_conversion_map_id; +*/ + +/* Symbols of ccl program have this property, a value of the property + is an index for Vccl_protram_table. */ +Lisp_Object Qccl_program_idx; + /* Vector of CCL program names vs corresponding program data. */ Lisp_Object Vccl_program_table; @@ -271,7 +299,8 @@ Lisp_Object Vccl_program_table; write (reg[RRR] OPERATION reg[Rrr]); */ -#define CCL_Call 0x13 /* Write a constant: +#define CCL_Call 0x13 /* Call the CCL program whose ID is + (CC..C). 1:CCCCCCCCCCCCCCCCCCCC000XXXXX ------------------------------ call (CC..C) @@ -401,6 +430,192 @@ Lisp_Object Vccl_program_table; 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). + */ + +/* Read a multibyte characeter. + A code point is stored into reg[rrr]. A charset ID is stored into + reg[RRR]. */ + +#define CCL_ReadMultibyteChar2 0x00 /* Read Multibyte Character + 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ + +/* Write a multibyte character. + Write a character whose code point is reg[rrr] and the charset ID + is reg[RRR]. */ + +#define CCL_WriteMultibyteChar2 0x01 /* Write Multibyte Character + 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ + +#if 0 +/* Translate a character whose code point is reg[rrr] and the charset + ID is reg[RRR] by a translation table whose ID is reg[Rrr]. + + A translated character is set in reg[rrr] (code point) and reg[RRR] + (charset ID). */ + +#define CCL_TranslateCharacter 0x02 /* Translate a multibyte character + 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ + +/* Translate a character whose code point is reg[rrr] and the charset + ID is reg[RRR] by a translation table whose ID is ARGUMENT. + + A translated character is set in reg[rrr] (code point) and reg[RRR] + (charset ID). */ + +#define CCL_TranslateCharacterConstTbl 0x03 /* Translate a multibyte character + 1:ExtendedCOMMNDRrrRRRrrrXXXXX + 2:ARGUMENT(Translation Table ID) + */ + +/* Iterate looking up MAPs for reg[rrr] starting from the Nth (N = + reg[RRR]) MAP until some value is found. + + Each MAP is a Lisp vector whose element is number, nil, t, or + lambda. + If the element is nil, ignore the map and proceed to the next map. + If the element is t or lambda, finish without changing reg[rrr]. + If the element is a number, set reg[rrr] to the number and finish. + + Detail of the map structure is descibed in the comment for + CCL_MapMultiple below. */ + +#define CCL_IterateMultipleMap 0x10 /* Iterate multiple maps + 1:ExtendedCOMMNDXXXRRRrrrXXXXX + 2:NUMBER of MAPs + 3:MAP-ID1 + 4:MAP-ID2 + ... + */ + +/* Map the code in reg[rrr] by MAPs starting from the Nth (N = + reg[RRR]) map. + + MAPs are supplied in the succeeding CCL codes as follows: + + When CCL program gives this nested structure of map to this command: + ((MAP-ID11 + MAP-ID12 + (MAP-ID121 MAP-ID122 MAP-ID123) + MAP-ID13) + (MAP-ID21 + (MAP-ID211 (MAP-ID2111) MAP-ID212) + MAP-ID22)), + the compiled CCL codes has this sequence: + CCL_MapMultiple (CCL code of this command) + 16 (total number of MAPs and SEPARATORs) + -7 (1st SEPARATOR) + MAP-ID11 + MAP-ID12 + -3 (2nd SEPARATOR) + MAP-ID121 + MAP-ID122 + MAP-ID123 + MAP-ID13 + -7 (3rd SEPARATOR) + MAP-ID21 + -4 (4th SEPARATOR) + MAP-ID211 + -1 (5th SEPARATOR) + MAP_ID2111 + MAP-ID212 + MAP-ID22 + + A value of each SEPARATOR follows this rule: + MAP-SET := SEPARATOR [(MAP-ID | MAP-SET)]+ + SEPARATOR := -(number of MAP-IDs and SEPARATORs in the MAP-SET) + + (*)....Nest level of MAP-SET must not be over than MAX_MAP_SET_LEVEL. + + When some map fails to map (i.e. it doesn't have a value for + reg[rrr]), the mapping is treated as identity. + + The mapping is iterated for all maps in each map set (set of maps + separated by SEPARATOR) except in the case that lambda is + encountered. More precisely, the mapping proceeds as below: + + At first, VAL0 is set to reg[rrr], and it is translated by the + first map to VAL1. Then, VAL1 is translated by the next map to + VAL2. This mapping is iterated until the last map is used. The + result of the mapping is the last value of VAL?. + + But, when VALm is mapped to VALn and VALn is not a number, the + mapping proceed as below: + + If VALn is nil, the lastest map is ignored and the mapping of VALm + proceed to the next map. + + In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm + proceed to the next map. + + If VALn is lambda, the whole mapping process terminates, and VALm + is the result of this mapping. + + Each map is a Lisp vector of the following format (a) or (b): + (a)......[STARTPOINT VAL1 VAL2 ...] + (b)......[t VAL STARTPOINT ENDPOINT], + 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. + + Valid index range of a map of type (a) is: + STARTPOINT <= index < STARTPOINT + map_size - 1 + Valid index range of a map of type (b) is: + STARTPOINT <= index < ENDPOINT */ + +#define CCL_MapMultiple 0x11 /* Mapping by multiple code conversion maps + 1:ExtendedCOMMNDXXXRRRrrrXXXXX + 2:N-2 + 3:SEPARATOR_1 (< 0) + 4:MAP-ID_1 + 5:MAP-ID_2 + ... + M:SEPARATOR_x (< 0) + M+1:MAP-ID_y + ... + N:SEPARATOR_z (< 0) + */ + +#define MAX_MAP_SET_LEVEL 20 + +typedef struct +{ + int rest_length; + int orig_val; +} tr_stack; + +static tr_stack mapping_stack[MAX_MAP_SET_LEVEL]; +static tr_stack *mapping_stack_pointer; +#endif + +#define PUSH_MAPPING_STACK(restlen, orig) \ +{ \ + mapping_stack_pointer->rest_length = (restlen); \ + mapping_stack_pointer->orig_val = (orig); \ + mapping_stack_pointer++; \ +} + +#define POP_MAPPING_STACK(restlen, orig) \ +{ \ + mapping_stack_pointer--; \ + (restlen) = mapping_stack_pointer->rest_length; \ + (orig) = mapping_stack_pointer->orig_val; \ +} \ + +#define CCL_MapSingle 0x12 /* Map by single code conversion map + 1:ExtendedCOMMNDXXXRRRrrrXXXXX + 2:MAP-ID + ------------------------------ + Map reg[rrr] by MAP-ID. + If some valid mapping is found, + set reg[rrr] to the result, + else + set reg[RRR] to -1. + */ /* CCL arithmetic/logical operators. */ #define CCL_PLUS 0x00 /* X = Y + Z */ @@ -423,18 +638,28 @@ Lisp_Object Vccl_program_table; #define CCL_GE 0x14 /* X = (X >= Y) */ #define CCL_NE 0x15 /* X = (X != Y) */ -#define CCL_ENCODE_SJIS 0x16 /* X = HIGHER_BYTE (SJIS (Y, Z)) - r[7] = LOWER_BYTE (SJIS (Y, Z) */ -#define CCL_DECODE_SJIS 0x17 /* X = HIGHER_BYTE (DE-SJIS (Y, Z)) +#define CCL_DECODE_SJIS 0x16 /* X = HIGHER_BYTE (DE-SJIS (Y, Z)) r[7] = LOWER_BYTE (DE-SJIS (Y, Z)) */ +#define CCL_ENCODE_SJIS 0x17 /* X = HIGHER_BYTE (SJIS (Y, Z)) + r[7] = LOWER_BYTE (SJIS (Y, Z) */ -/* Macros for exit status of CCL program. */ -#define CCL_STAT_SUCCESS 0 /* Terminated successfully. */ -#define CCL_STAT_SUSPEND 1 /* Terminated because of empty input - buffer or full output buffer. */ -#define CCL_STAT_INVALID_CMD 2 /* Terminated because of invalid - command. */ -#define CCL_STAT_QUIT 3 /* Terminated because of quit. */ +/* Suspend CCL program because of reading from empty input buffer or + writing to full output buffer. When this program is resumed, the + same I/O command is executed. */ +#define CCL_SUSPEND(stat) \ + do { \ + ic--; \ + ccl->status = stat; \ + goto ccl_finish; \ + } while (0) + +/* Terminate CCL program because of invalid command. Should not occur + in the normal case. */ +#define CCL_INVALID_CMD \ + do { \ + ccl->status = CCL_STAT_INVALID_CMD; \ + goto ccl_error_handler; \ + } while (0) /* Encode one character CH to multibyte form and write to the current output buffer. If CH is less than 256, CH is written as is. */ @@ -472,7 +697,7 @@ Lisp_Object Vccl_program_table; /* Read one byte from the current input buffer into Rth register. */ #define CCL_READ_CHAR(r) do { \ - if (!src) \ + if (!src && !ccl->last_block) \ { \ ccl->status = CCL_STAT_INVALID_CMD; \ goto ccl_error_handler; \ @@ -482,7 +707,7 @@ Lisp_Object Vccl_program_table; else if (ccl->last_block) \ { \ ic = ccl->eof_ic; \ - goto ccl_finish; \ + goto ccl_repeat; \ } \ else \ /* Suspend CCL program because of \ @@ -492,7 +717,7 @@ Lisp_Object Vccl_program_table; same I/O command is executed. */ \ { \ ic--; \ - ccl->status = CCL_STAT_SUSPEND; \ + ccl->status = CCL_STAT_SUSPEND_BY_SRC; \ goto ccl_finish; \ } \ } while (0) @@ -517,8 +742,13 @@ struct ccl_prog_stack int ic; /* Instruction Counter. */ }; +/* For the moment, we only support depth 256 of stack. */ +static struct ccl_prog_stack ccl_prog_stack_struct[256]; + int -ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed, int conversion_mode) +ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, + unsigned_char_dynarr *destination, int src_bytes, + int *consumed, int conversion_mode) { int *reg = ccl->reg; int ic = ccl->ic; @@ -527,21 +757,26 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ Lisp_Object *ccl_prog = ccl->prog; CONST unsigned char *src = source, *src_end = src + src_bytes; int jump_address = 0; /* shut up the compiler */ - int i, j, op; - int stack_idx = 0; - /* For the moment, we only support depth 256 of stack. */ - struct ccl_prog_stack ccl_prog_stack_struct[256]; + int stack_idx = ccl->stack_idx; + /* Instruction counter of the current CCL code. */ + int this_ic; if (ic >= ccl->eof_ic) ic = CCL_HEADER_MAIN; +#if 0 /* not for XEmacs ? */ + if (ccl->buf_magnification ==0) /* We can't produce any bytes. */ + dst = NULL; +#endif + #ifdef CCL_DEBUG ccl_backtrace_idx = 0; #endif for (;;) { + ccl_repeat: #ifdef CCL_DEBUG ccl_backtrace_table[ccl_backtrace_idx++] = ic; if (ccl_backtrace_idx >= CCL_DEBUG_BACKTRACE_LEN) @@ -560,6 +795,7 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ break; } + this_ic = ic; code = XINT (ccl_prog[ic]); ic++; field1 = code >> 8; field2 = (code & 0xFF) >> 5; @@ -568,6 +804,7 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ #define RRR (field1 & 7) #define Rrr ((field1 >> 3) & 7) #define ADDR field1 +#define EXCMD (field1 >> 6) switch (code & 0x1F) { @@ -757,9 +994,13 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ ic = ccl_prog_stack_struct[stack_idx].ic; break; } + if (src) + src = src_end; + /* ccl->ic should points to this command code again to + suppress further processing. */ + ic--; /* Terminate CCL program successfully. */ ccl->status = CCL_STAT_SUCCESS; - ccl->ic = CCL_HEADER_MAIN; goto ccl_finish; case CCL_ExprSelfConst: /* 00000OPERATION000000rrrXXXXX */ @@ -857,8 +1098,8 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ case CCL_LE: reg[rrr] = i <= j; break; case CCL_GE: reg[rrr] = i >= j; break; case CCL_NE: reg[rrr] = i != j; break; - case CCL_ENCODE_SJIS: ENCODE_SJIS (i, j, reg[rrr], reg[7]); break; case CCL_DECODE_SJIS: DECODE_SJIS (i, j, reg[rrr], reg[7]); break; + case CCL_ENCODE_SJIS: ENCODE_SJIS (i, j, reg[rrr], reg[7]); break; default: ccl->status = CCL_STAT_INVALID_CMD; goto ccl_error_handler; @@ -873,6 +1114,463 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ ic = jump_address; break; + case CCL_Extention: + switch (EXCMD) + { + case CCL_ReadMultibyteChar2: + if (!src) + CCL_INVALID_CMD; + + do { + if (src >= src_end) + { + src++; + goto ccl_read_multibyte_character_suspend; + } + + i = *src++; +#if 0 + if (i == LEADING_CODE_COMPOSITION) + { + if (src >= src_end) + goto ccl_read_multibyte_character_suspend; + if (*src == 0xFF) + { + ccl->private_state = COMPOSING_WITH_RULE_HEAD; + src++; + } + else + ccl->private_state = COMPOSING_NO_RULE_HEAD; + + continue; + } + if (ccl->private_state != COMPOSING_NO) + { + /* composite character */ + if (i < 0xA0) + ccl->private_state = COMPOSING_NO; + else + { + if (COMPOSING_WITH_RULE_RULE == ccl->private_state) + { + ccl->private_state = COMPOSING_WITH_RULE_HEAD; + continue; + } + else if (COMPOSING_WITH_RULE_HEAD == ccl->private_state) + ccl->private_state = COMPOSING_WITH_RULE_RULE; + + if (i == 0xA0) + { + if (src >= src_end) + goto ccl_read_multibyte_character_suspend; + i = *src++ & 0x7F; + } + else + i -= 0x20; + } + } +#endif + + if (i < 0x80) + { + /* ASCII */ + reg[rrr] = i; + reg[RRR] = LEADING_BYTE_ASCII; + } + else if (i <= MAX_LEADING_BYTE_OFFICIAL_1) + { + if (src >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = i; + reg[rrr] = (*src++ & 0x7F); + } + else if (i <= MAX_LEADING_BYTE_OFFICIAL_2) + { + if ((src + 1) >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = i; + i = (*src++ & 0x7F); + reg[rrr] = ((i << 7) | (*src & 0x7F)); + src++; + } + else if (i == PRE_LEADING_BYTE_PRIVATE_1) + { + if ((src + 1) >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = *src++; + reg[rrr] = (*src++ & 0x7F); + } + else if (i == PRE_LEADING_BYTE_PRIVATE_2) + { + if ((src + 2) >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = *src++; + i = (*src++ & 0x7F); + reg[rrr] = ((i << 7) | (*src & 0x7F)); + src++; + } + else + { + /* INVALID CODE. Return a single byte character. */ + reg[RRR] = LEADING_BYTE_ASCII; + reg[rrr] = i; + } + break; + } while (1); + break; + + ccl_read_multibyte_character_suspend: + src--; + if (ccl->last_block) + { + ic = ccl->eof_ic; + goto ccl_repeat; + } + else + CCL_SUSPEND (CCL_STAT_SUSPEND_BY_SRC); + + break; + + case CCL_WriteMultibyteChar2: + i = reg[RRR]; /* charset */ + if (i == LEADING_BYTE_ASCII) + i = reg[rrr] & 0xFF; +#if 0 + else if (i == CHARSET_COMPOSITION) + i = MAKE_COMPOSITE_CHAR (reg[rrr]); +#endif + else if (XCHARSET_DIMENSION (CHARSET_BY_LEADING_BYTE (i)) == 1) + i = ((i - FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7) + | (reg[rrr] & 0x7F); + else if (i < MIN_LEADING_BYTE_OFFICIAL_2) + i = ((i - FIELD1_TO_OFFICIAL_LEADING_BYTE) << 14) | reg[rrr]; + else + i = ((i - FIELD1_TO_PRIVATE_LEADING_BYTE) << 14) | reg[rrr]; + + CCL_WRITE_CHAR (i); + + break; + +#if 0 + case CCL_TranslateCharacter: + i = reg[RRR]; /* charset */ + if (i == LEADING_BYTE_ASCII) + i = reg[rrr]; + else if (i == CHARSET_COMPOSITION) + { + reg[RRR] = -1; + break; + } + else if (CHARSET_DIMENSION (i) == 1) + i = ((i - 0x70) << 7) | (reg[rrr] & 0x7F); + else if (i < MIN_LEADING_BYTE_OFFICIAL_2) + i = ((i - 0x8F) << 14) | (reg[rrr] & 0x3FFF); + else + i = ((i - 0xE0) << 14) | (reg[rrr] & 0x3FFF); + + op = translate_char (GET_TRANSLATION_TABLE (reg[Rrr]), + i, -1, 0, 0); + SPLIT_CHAR (op, reg[RRR], i, j); + if (j != -1) + i = (i << 7) | j; + + reg[rrr] = i; + break; + + case CCL_TranslateCharacterConstTbl: + op = XINT (ccl_prog[ic]); /* table */ + ic++; + i = reg[RRR]; /* charset */ + if (i == LEADING_BYTE_ASCII) + i = reg[rrr]; + else if (i == CHARSET_COMPOSITION) + { + reg[RRR] = -1; + break; + } + else if (CHARSET_DIMENSION (i) == 1) + i = ((i - 0x70) << 7) | (reg[rrr] & 0x7F); + else if (i < MIN_LEADING_BYTE_OFFICIAL_2) + i = ((i - 0x8F) << 14) | (reg[rrr] & 0x3FFF); + else + i = ((i - 0xE0) << 14) | (reg[rrr] & 0x3FFF); + + op = translate_char (GET_TRANSLATION_TABLE (op), i, -1, 0, 0); + SPLIT_CHAR (op, reg[RRR], i, j); + if (j != -1) + i = (i << 7) | j; + + reg[rrr] = i; + break; + + case CCL_IterateMultipleMap: + { + Lisp_Object map, content, attrib, value; + int point, size, fin_ic; + + j = XINT (ccl_prog[ic++]); /* number of maps. */ + fin_ic = ic + j; + op = reg[rrr]; + if ((j > reg[RRR]) && (j >= 0)) + { + ic += reg[RRR]; + i = reg[RRR]; + } + else + { + reg[RRR] = -1; + ic = fin_ic; + break; + } + + for (;i < j;i++) + { + + size = XVECTOR (Vcode_conversion_map_vector)->size; + point = XINT (ccl_prog[ic++]); + if (point >= size) continue; + map = + XVECTOR (Vcode_conversion_map_vector)->contents[point]; + + /* Check map varidity. */ + if (!CONSP (map)) continue; + map = XCONS(map)->cdr; + if (!VECTORP (map)) continue; + size = XVECTOR (map)->size; + if (size <= 1) continue; + + content = XVECTOR (map)->contents[0]; + + /* check map type, + [STARTPOINT VAL1 VAL2 ...] or + [t ELELMENT STARTPOINT ENDPOINT] */ + if (NUMBERP (content)) + { + point = XUINT (content); + point = op - point + 1; + if (!((point >= 1) && (point < size))) continue; + content = XVECTOR (map)->contents[point]; + } + else if (EQ (content, Qt)) + { + if (size != 4) continue; + if ((op >= XUINT (XVECTOR (map)->contents[2])) + && (op < XUINT (XVECTOR (map)->contents[3]))) + content = XVECTOR (map)->contents[1]; + else + continue; + } + else + continue; + + if (NILP (content)) + continue; + else if (NUMBERP (content)) + { + reg[RRR] = i; + reg[rrr] = XINT(content); + break; + } + else if (EQ (content, Qt) || EQ (content, Qlambda)) + { + reg[RRR] = i; + break; + } + else if (CONSP (content)) + { + attrib = XCONS (content)->car; + value = XCONS (content)->cdr; + if (!NUMBERP (attrib) || !NUMBERP (value)) + continue; + reg[RRR] = i; + reg[rrr] = XUINT (value); + break; + } + } + if (i == j) + reg[RRR] = -1; + ic = fin_ic; + } + break; + + case CCL_MapMultiple: + { + Lisp_Object map, content, attrib, value; + int point, size, map_vector_size; + int map_set_rest_length, fin_ic; + + map_set_rest_length = + XINT (ccl_prog[ic++]); /* number of maps and separators. */ + fin_ic = ic + map_set_rest_length; + if ((map_set_rest_length > reg[RRR]) && (reg[RRR] >= 0)) + { + ic += reg[RRR]; + i = reg[RRR]; + map_set_rest_length -= i; + } + else + { + ic = fin_ic; + reg[RRR] = -1; + break; + } + mapping_stack_pointer = mapping_stack; + op = reg[rrr]; + PUSH_MAPPING_STACK (0, op); + reg[RRR] = -1; + map_vector_size = XVECTOR (Vcode_conversion_map_vector)->size; + for (;map_set_rest_length > 0;i++, map_set_rest_length--) + { + point = XINT(ccl_prog[ic++]); + if (point < 0) + { + point = -point; + if (mapping_stack_pointer + >= &mapping_stack[MAX_MAP_SET_LEVEL]) + { + CCL_INVALID_CMD; + } + PUSH_MAPPING_STACK (map_set_rest_length - point, + reg[rrr]); + map_set_rest_length = point + 1; + reg[rrr] = op; + continue; + } + + if (point >= map_vector_size) continue; + map = (XVECTOR (Vcode_conversion_map_vector) + ->contents[point]); + + /* Check map varidity. */ + if (!CONSP (map)) continue; + map = XCONS (map)->cdr; + if (!VECTORP (map)) continue; + size = XVECTOR (map)->size; + if (size <= 1) continue; + + content = XVECTOR (map)->contents[0]; + + /* check map type, + [STARTPOINT VAL1 VAL2 ...] or + [t ELEMENT STARTPOINT ENDPOINT] */ + if (NUMBERP (content)) + { + point = XUINT (content); + point = op - point + 1; + if (!((point >= 1) && (point < size))) continue; + content = XVECTOR (map)->contents[point]; + } + else if (EQ (content, Qt)) + { + if (size != 4) continue; + if ((op >= XUINT (XVECTOR (map)->contents[2])) && + (op < XUINT (XVECTOR (map)->contents[3]))) + content = XVECTOR (map)->contents[1]; + else + continue; + } + else + continue; + + if (NILP (content)) + continue; + else if (NUMBERP (content)) + { + op = XINT (content); + reg[RRR] = i; + i += map_set_rest_length; + POP_MAPPING_STACK (map_set_rest_length, reg[rrr]); + } + else if (CONSP (content)) + { + attrib = XCONS (content)->car; + value = XCONS (content)->cdr; + if (!NUMBERP (attrib) || !NUMBERP (value)) + continue; + reg[RRR] = i; + op = XUINT (value); + i += map_set_rest_length; + POP_MAPPING_STACK (map_set_rest_length, reg[rrr]); + } + else if (EQ (content, Qt)) + { + reg[RRR] = i; + op = reg[rrr]; + i += map_set_rest_length; + POP_MAPPING_STACK (map_set_rest_length, reg[rrr]); + } + else if (EQ (content, Qlambda)) + { + break; + } + else + CCL_INVALID_CMD; + } + ic = fin_ic; + } + reg[rrr] = op; + break; + + case CCL_MapSingle: + { + Lisp_Object map, attrib, value, content; + int size, point; + j = XINT (ccl_prog[ic++]); /* map_id */ + op = reg[rrr]; + if (j >= XVECTOR (Vcode_conversion_map_vector)->size) + { + reg[RRR] = -1; + break; + } + map = XVECTOR (Vcode_conversion_map_vector)->contents[j]; + if (!CONSP (map)) + { + reg[RRR] = -1; + break; + } + map = XCONS(map)->cdr; + if (!VECTORP (map)) + { + reg[RRR] = -1; + break; + } + size = XVECTOR (map)->size; + point = XUINT (XVECTOR (map)->contents[0]); + point = op - point + 1; + reg[RRR] = 0; + if ((size <= 1) || + (!((point >= 1) && (point < size)))) + reg[RRR] = -1; + else + { + content = XVECTOR (map)->contents[point]; + if (NILP (content)) + reg[RRR] = -1; + else if (NUMBERP (content)) + reg[rrr] = XINT (content); + else if (EQ (content, Qt)) + reg[RRR] = i; + else if (CONSP (content)) + { + attrib = XCONS (content)->car; + value = XCONS (content)->cdr; + if (!NUMBERP (attrib) || !NUMBERP (value)) + continue; + reg[rrr] = XUINT(value); + break; + } + else + reg[RRR] = -1; + } + } + break; +#endif + + default: + CCL_INVALID_CMD; + } + break; + default: ccl->status = CCL_STAT_INVALID_CMD; goto ccl_error_handler; @@ -887,13 +1585,18 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ there. */ char msg[256]; +#if 0 /* not for XEmacs ? */ + if (!dst) + dst = destination; +#endif + switch (ccl->status) { /* Terminate CCL program because of invalid command. Should not occur in the normal case. */ case CCL_STAT_INVALID_CMD: sprintf(msg, "\nCCL: Invalid command %x (ccl_code = %x) at %d.", - code & 0x1F, code, ic); + code & 0x1F, code, this_ic); #ifdef CCL_DEBUG { int i = ccl_backtrace_idx - 1; @@ -909,9 +1612,10 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ sprintf(msg, " %d", ccl_backtrace_table[i]); Dynarr_add_many (destination, (unsigned char *) msg, strlen (msg)); } + goto ccl_finish; } #endif - goto ccl_finish; + break; case CCL_STAT_QUIT: sprintf(msg, "\nCCL: Quited."); @@ -926,6 +1630,8 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ ccl_finish: ccl->ic = ic; + ccl->stack_idx = stack_idx; + ccl->prog = ccl_prog; if (consumed) *consumed = src - source; if (destination) return Dynarr_length (destination); @@ -934,31 +1640,91 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ } /* Setup fields of the structure pointed by CCL appropriately for the - execution of compiled CCL code in VEC (vector of integer). */ + execution of compiled CCL code in VEC (vector of integer). + If VEC is nil, we skip setting ups based on VEC. */ void setup_ccl_program (struct ccl_program *ccl, Lisp_Object vec) { int i; - ccl->size = XVECTOR_LENGTH (vec); - ccl->prog = XVECTOR_DATA (vec); + if (VECTORP (vec)) + { + ccl->size = XVECTOR_LENGTH (vec); + ccl->prog = XVECTOR_DATA (vec); + ccl->eof_ic = XINT (XVECTOR_DATA (vec)[CCL_HEADER_EOF]); + ccl->buf_magnification = XINT (XVECTOR_DATA (vec)[CCL_HEADER_BUF_MAG]); + } ccl->ic = CCL_HEADER_MAIN; - ccl->eof_ic = XINT (XVECTOR_DATA (vec)[CCL_HEADER_EOF]); - ccl->buf_magnification = XINT (XVECTOR_DATA (vec)[CCL_HEADER_BUF_MAG]); for (i = 0; i < 8; i++) ccl->reg[i] = 0; ccl->last_block = 0; + ccl->private_state = 0; ccl->status = 0; + ccl->stack_idx = 0; } +/* Resolve symbols in the specified CCL code (Lisp vector). This + function converts symbols of code conversion maps and character + translation tables embeded in the CCL code into their ID numbers. */ + +Lisp_Object +resolve_symbol_ccl_program (Lisp_Object ccl) +{ + int i, veclen; + Lisp_Object result, contents /*, prop */; + + result = ccl; + veclen = XVECTOR_LENGTH (result); + + /* Set CCL program's table ID */ + for (i = 0; i < veclen; i++) + { + contents = XVECTOR_DATA (result)[i]; + if (SYMBOLP (contents)) + { + if (EQ(result, ccl)) + result = Fcopy_sequence (ccl); + +#if 0 + prop = Fget (contents, Qtranslation_table_id); + if (NUMBERP (prop)) + { + XVECTOR_DATA (result)[i] = prop; + continue; + } + prop = Fget (contents, Qcode_conversion_map_id); + if (NUMBERP (prop)) + { + XVECTOR_DATA (result)[i] = prop; + continue; + } + prop = Fget (contents, Qccl_program_idx); + if (NUMBERP (prop)) + { + XVECTOR_DATA (result)[i] = prop; + continue; + } +#endif + } + } + + return result; +} + + #ifdef emacs DEFUN ("ccl-execute", Fccl_execute, 2, 2, 0, /* Execute CCL-PROGRAM with registers initialized by REGISTERS. -CCL-PROGRAM is a compiled code generated by `ccl-compile', - no I/O commands should appear in the CCL program. + +CCL-PROGRAM is a symbol registered by register-ccl-program, +or a compiled code generated by `ccl-compile' (for backward compatibility, +in this case, the execution is slower). +No I/O commands should appear in CCL-PROGRAM. + REGISTERS is a vector of [R0 R1 ... R7] where RN is an initial value of Nth register. + As side effect, each element of REGISTER holds the value of corresponding register after the execution. */ @@ -966,11 +1732,25 @@ As side effect, each element of REGISTER holds the value of { struct ccl_program ccl; int i; + Lisp_Object ccl_id; + + if ((SYMBOLP (ccl_prog)) && + (!NILP (ccl_id = Fget (ccl_prog, Qccl_program_idx, Qnil)))) + { + ccl_prog = XVECTOR_DATA (Vccl_program_table)[XUINT (ccl_id)]; + CHECK_LIST (ccl_prog); + ccl_prog = XCDR (ccl_prog); + CHECK_VECTOR (ccl_prog); + } + else + { + CHECK_VECTOR (ccl_prog); + ccl_prog = resolve_symbol_ccl_program (ccl_prog); + } - CHECK_VECTOR (ccl_prog); CHECK_VECTOR (reg); if (XVECTOR_LENGTH (reg) != 8) - signal_simple_error ("Vector should be of length 8", reg); + error ("Invalid length of vector REGISTERS"); setup_ccl_program (&ccl, ccl_prog); for (i = 0; i < 8; i++) @@ -991,18 +1771,26 @@ As side effect, each element of REGISTER holds the value of DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, 3, 4, 0, /* Execute CCL-PROGRAM with initial STATUS on STRING. -CCL-PROGRAM is a compiled code generated by `ccl-compile'. + +CCL-PROGRAM is a symbol registered by register-ccl-program, +or a compiled code generated by `ccl-compile' (for backward compatibility, +in this case, the execution is slower). + Read buffer is set to STRING, and write buffer is allocated automatically. + +If IC is nil, it is initialized to head of the CCL program.\n\ STATUS is a vector of [R0 R1 ... R7 IC], where R0..R7 are initial values of corresponding registers, IC is the instruction counter specifying from where to start the program. If R0..R7 are nil, they are initialized to 0. If IC is nil, it is initialized to head of the CCL program. -Returns the contents of write buffer as a string, - and as side effect, STATUS is updated. + If optional 4th arg CONTINUE is non-nil, keep IC on read operation when read buffer is exausted, else, IC is always set to the end of CCL-PROGRAM on exit. + +It returns the contents of write buffer as a string, + and as side effect, STATUS is updated. */ (ccl_prog, status, str, contin)) { @@ -1011,8 +1799,22 @@ CCL-PROGRAM on exit. int i, produced; unsigned_char_dynarr *outbuf; struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object ccl_id; + + if ((SYMBOLP (ccl_prog)) && + (!NILP (ccl_id = Fget (ccl_prog, Qccl_program_idx, Qnil)))) + { + ccl_prog = XVECTOR (Vccl_program_table)->contents[XUINT (ccl_id)]; + CHECK_LIST (ccl_prog); + ccl_prog = XCDR (ccl_prog); + CHECK_VECTOR (ccl_prog); + } + else + { + CHECK_VECTOR (ccl_prog); + ccl_prog = resolve_symbol_ccl_program (ccl_prog); + } - CHECK_VECTOR (ccl_prog); CHECK_VECTOR (status); if (XVECTOR_LENGTH (status) != 9) signal_simple_error ("Vector should be of length 9", status); @@ -1046,7 +1848,8 @@ CCL-PROGRAM on exit. Dynarr_free (outbuf); QUIT; if (ccl.status != CCL_STAT_SUCCESS - && ccl.status != CCL_STAT_SUSPEND) + && ccl.status != CCL_STAT_SUSPEND_BY_SRC + && ccl.status != CCL_STAT_SUSPEND_BY_DST) error ("Error in CCL program at %dth code", ccl.ic); return val; @@ -1064,7 +1867,10 @@ Return index number of the registered CCL program. CHECK_SYMBOL (name); if (!NILP (ccl_prog)) - CHECK_VECTOR (ccl_prog); + { + CHECK_VECTOR (ccl_prog); + ccl_prog = resolve_symbol_ccl_program (ccl_prog); + } for (i = 0; i < len; i++) { @@ -1092,15 +1898,81 @@ Return index number of the registered CCL program. } XVECTOR_DATA (Vccl_program_table)[i] = Fcons (name, ccl_prog); + Fput (name, Qccl_program_idx, make_int (i)); return make_int (i); } +#if 0 +/* Register code conversion map. + A code conversion map consists of numbers, Qt, Qnil, and Qlambda. + The first element is start code point. + 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. +*/ + +DEFUN ("register-code-conversion-map", Fregister_code_conversion_map, + Sregister_code_conversion_map, + 2, 2, 0, + "Register SYMBOL as code conversion map MAP.\n\ +Return index number of the registered map.") + (symbol, map) + Lisp_Object symbol, map; +{ + int len = XVECTOR (Vcode_conversion_map_vector)->size; + int i; + Lisp_Object index; + + CHECK_SYMBOL (symbol, 0); + CHECK_VECTOR (map, 1); + + for (i = 0; i < len; i++) + { + Lisp_Object slot = XVECTOR (Vcode_conversion_map_vector)->contents[i]; + + if (!CONSP (slot)) + break; + + if (EQ (symbol, XCONS (slot)->car)) + { + index = make_int (i); + XCONS (slot)->cdr = map; + Fput (symbol, Qcode_conversion_map, map); + Fput (symbol, Qcode_conversion_map_id, index); + return index; + } + } + + if (i == len) + { + Lisp_Object new_vector = Fmake_vector (make_int (len * 2), Qnil); + int j; + + for (j = 0; j < len; j++) + XVECTOR (new_vector)->contents[j] + = XVECTOR (Vcode_conversion_map_vector)->contents[j]; + Vcode_conversion_map_vector = new_vector; + } + + index = make_int (i); + Fput (symbol, Qcode_conversion_map, map); + Fput (symbol, Qcode_conversion_map_id, index); + XVECTOR (Vcode_conversion_map_vector)->contents[i] = Fcons (symbol, map); + return index; +} +#endif + + void syms_of_mule_ccl (void) { DEFSUBR (Fccl_execute); DEFSUBR (Fccl_execute_on_string); DEFSUBR (Fregister_ccl_program); +#if 0 + DEFSUBR (&Fregister_code_conversion_map); +#endif } void @@ -1109,6 +1981,24 @@ vars_of_mule_ccl (void) staticpro (&Vccl_program_table); Vccl_program_table = Fmake_vector (make_int (32), Qnil); + Qccl_program = intern ("ccl-program"); + staticpro (&Qccl_program); + + Qccl_program_idx = intern ("ccl-program-idx"); + staticpro (&Qccl_program_idx); + +#if 0 + Qcode_conversion_map = intern ("code-conversion-map"); + staticpro (&Qcode_conversion_map); + + Qcode_conversion_map_id = intern ("code-conversion-map-id"); + staticpro (&Qcode_conversion_map_id); + + DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector /* +Vector of code conversion maps.*/ ); + Vcode_conversion_map_vector = Fmake_vector (make_int (16), Qnil); +#endif + DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist /* Alist of fontname patterns vs corresponding CCL program. Each element looks like (REGEXP . CCL-CODE), diff --git a/src/mule-ccl.h b/src/mule-ccl.h index 68cbb76..e2e5c97 100644 --- a/src/mule-ccl.h +++ b/src/mule-ccl.h @@ -1,5 +1,5 @@ /* Header for CCL (Code Conversion Language) interpreter. - Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. + Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. This file is part of XEmacs. @@ -19,11 +19,19 @@ along with GNU Emacs; 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: FSF Emacs 20.2 */ +/* Synched up with: FSF Emacs 20.3.10 */ #ifndef _CCL_H #define _CCL_H +/* Macros for exit status of CCL program. */ +#define CCL_STAT_SUCCESS 0 /* Terminated successfully. */ +#define CCL_STAT_SUSPEND_BY_SRC 1 /* Terminated by empty input. */ +#define CCL_STAT_SUSPEND_BY_DST 2 /* Terminated by output buffer full. */ +#define CCL_STAT_INVALID_CMD 3 /* Terminated because of invalid + command. */ +#define CCL_STAT_QUIT 4 /* Terminated because of quit. */ + /* Structure to hold information about running CCL code. Read comments in the file ccl.c for the detail of each field. */ struct ccl_program { @@ -35,12 +43,18 @@ struct ccl_program { int reg[8]; /* CCL registers, reg[7] is used for condition flag of relational operations. */ + int private_state; /* CCL instruction may use this + for private use, mainly for preservation + internal states for suspending. + This variable is set to 0 when ccl is + set up. */ int last_block; /* Set to 1 while processing the last block. */ int status; /* Exit status of the CCL program. */ int buf_magnification; /* Output buffer magnification. How many times bigger the output buffer should be than the input buffer. */ + int stack_idx; /* How deep the call of CCL_Call is nested. */ }; @@ -54,5 +68,6 @@ void setup_ccl_program (struct ccl_program *ccl, Lisp_Object val); /* Alist of fontname patterns vs corresponding CCL program. */ extern Lisp_Object Vfont_ccl_encoder_alist; +extern Lisp_Object Qccl_program; #endif /* _CCL_H */ diff --git a/src/mule-charset.c b/src/mule-charset.c index a6bed73..1929996 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "lstream.h" #include "device.h" #include "faces.h" +#include "mule-ccl.h" /* The various pre-defined charsets. */ @@ -121,7 +122,6 @@ Lisp_Object Qcharsetp; Lisp_Object Qregistry, Qfinal, Qgraphic; Lisp_Object Qdirection; Lisp_Object Qreverse_direction_charset; -Lisp_Object Qccl_program; Lisp_Object Qleading_byte; Lisp_Object Qshort_name, Qlong_name; @@ -554,8 +554,13 @@ print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (buf, printcharfun); } +static const struct lrecord_description charset_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Charset, name), 7 }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("charset", charset, - mark_charset, print_charset, 0, 0, 0, + mark_charset, print_charset, 0, 0, 0, charset_description, struct Lisp_Charset); /* Make a new charset. */ @@ -1220,27 +1225,33 @@ Return the character set of char CH. (CHAR_LEADING_BYTE (XCHAR (ch)))); } -DEFUN ("char-octet", Fchar_octet, 1, 2, 0, /* -Return the octet numbered N (should be 0 or 1) of char CH. -N defaults to 0 if omitted. +DEFUN ("split-char", Fsplit_char, 1, 1, 0, /* +Return list of charset and one or two position-codes of CHAR. */ - (ch, n)) + (character)) { - Lisp_Object charset; - int c1, c2, int_n; + /* This function can GC */ + struct gcpro gcpro1, gcpro2; + Lisp_Object charset = Qnil; + Lisp_Object rc = Qnil; + int c1, c2; - CHECK_CHAR_COERCE_INT (ch); - if (NILP (n)) - int_n = 0; + GCPRO2 (charset, rc); + CHECK_CHAR_COERCE_INT (character); + + BREAKUP_CHAR (XCHAR (character), charset, c1, c2); + + if (XCHARSET_DIMENSION (Fget_charset (charset)) == 2) + { + rc = list3 (XCHARSET_NAME (charset), make_int (c1), make_int (c2)); + } else { - CHECK_INT (n); - int_n = XINT (n); - if (int_n != 0 && int_n != 1) - signal_simple_error ("Octet number must be 0 or 1", n); + rc = list2 (XCHARSET_NAME (charset), make_int (c1)); } - BREAKUP_CHAR (XCHAR (ch), charset, c1, c2); - return make_int (int_n == 0 ? c1 : c2); + UNGCPRO; + + return rc; } @@ -1345,7 +1356,7 @@ syms_of_mule_charset (void) DEFSUBR (Fmake_char); DEFSUBR (Fchar_charset); - DEFSUBR (Fchar_octet); + DEFSUBR (Fsplit_char); #ifdef ENABLE_COMPOSITE_CHARS DEFSUBR (Fmake_composite_char); @@ -1358,7 +1369,6 @@ syms_of_mule_charset (void) defsymbol (&Qgraphic, "graphic"); defsymbol (&Qdirection, "direction"); defsymbol (&Qreverse_direction_charset, "reverse-direction-charset"); - defsymbol (&Qccl_program, "ccl-program"); defsymbol (&Qshort_name, "short-name"); defsymbol (&Qlong_name, "long-name"); diff --git a/src/nt.c b/src/nt.c index 793cc81..54e06e1 100644 --- a/src/nt.c +++ b/src/nt.c @@ -43,7 +43,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include #include #include -#include /* for offsetof */ #include #include #include diff --git a/src/objects.c b/src/objects.c index a876815..69fcab6 100644 --- a/src/objects.c +++ b/src/objects.c @@ -127,7 +127,7 @@ color_instance_hash (Lisp_Object obj, int depth) DEFINE_LRECORD_IMPLEMENTATION ("color-instance", color_instance, mark_color_instance, print_color_instance, finalize_color_instance, color_instance_equal, - color_instance_hash, + color_instance_hash, 0, struct Lisp_Color_Instance); DEFUN ("make-color-instance", Fmake_color_instance, 1, 3, 0, /* @@ -301,7 +301,7 @@ font_instance_hash (Lisp_Object obj, int depth) DEFINE_LRECORD_IMPLEMENTATION ("font-instance", font_instance, mark_font_instance, print_font_instance, finalize_font_instance, font_instance_equal, - font_instance_hash, struct Lisp_Font_Instance); + font_instance_hash, 0, struct Lisp_Font_Instance); DEFUN ("make-font-instance", Fmake_font_instance, 1, 3, 0, /* Return a new `font-instance' object named NAME. diff --git a/src/opaque.c b/src/opaque.c index 830dd1d..70d29b9 100644 --- a/src/opaque.c +++ b/src/opaque.c @@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" #include "opaque.h" -#include Lisp_Object Qopaquep; @@ -176,7 +175,7 @@ hash_opaque (Lisp_Object obj, int depth) DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("opaque", opaque, mark_opaque, print_opaque, 0, - equal_opaque, hash_opaque, + equal_opaque, hash_opaque, 0, sizeof_opaque, Lisp_Opaque); static Lisp_Object @@ -206,7 +205,7 @@ make_opaque_list (size_t size, DEFINE_LRECORD_IMPLEMENTATION ("opaque-list", opaque_list, mark_opaque_list, internal_object_printer, - 0, 0, 0, Lisp_Opaque_List); + 0, 0, 0, 0, Lisp_Opaque_List); Lisp_Object allocate_managed_opaque (Lisp_Object opaque_list, CONST void *data) diff --git a/src/paths.h.in b/src/paths.h.in index 579fb58..1a6b627 100644 --- a/src/paths.h.in +++ b/src/paths.h.in @@ -65,9 +65,13 @@ #define PATH_VERSION "@version@" +#ifdef EXEC_PREFIX_USER_DEFINED #define PATH_EXEC_PREFIX "@EXEC_PREFIX@" +#endif +#ifdef PREFIX_USER_DEFINED #define PATH_PREFIX "@PREFIX@" +#endif #ifdef LISPDIR_USER_DEFINED #define PATH_LOADSEARCH "@LISPDIR@" @@ -101,6 +105,10 @@ #define PATH_LOCK "@LOCKDIR@" #endif +#ifdef DOCDIR_USER_DEFINED +#define PATH_DOC "@DOCDIR@" +#endif + #ifdef INFODIR_USER_DEFINED #define PATH_INFO "@INFODIR@" #endif diff --git a/src/process.c b/src/process.c index e181db2..c3b493a 100644 --- a/src/process.c +++ b/src/process.c @@ -186,7 +186,7 @@ finalize_process (void *header, int for_disksave) DEFINE_LRECORD_IMPLEMENTATION ("process", process, mark_process, print_process, finalize_process, - 0, 0, struct Lisp_Process); + 0, 0, 0, struct Lisp_Process); /************************************************************************/ /* basic process accessors */ diff --git a/src/rangetab.c b/src/rangetab.c index c580a47..b7d9983 100644 --- a/src/rangetab.c +++ b/src/rangetab.c @@ -134,7 +134,7 @@ range_table_hash (Lisp_Object obj, int depth) DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table, mark_range_table, print_range_table, 0, - range_table_equal, range_table_hash, + range_table_equal, range_table_hash, 0, struct Lisp_Range_Table); /************************************************************************/ diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index a64877c..5d3f815 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA. */ #include "faces.h" #include "frame.h" #include "glyphs-msw.h" +#include "gutter.h" #include "redisplay.h" #include "sysdep.h" #include "window.h" @@ -75,6 +76,7 @@ static void mswindows_output_pixmap (struct window *w, struct display_line *dl, face_index findex, int cursor_start, int cursor_width, int cursor_height, int offset_bitmap); +void bevel_modeline (struct window *w, struct display_line *dl); typedef struct textual_run { @@ -165,7 +167,7 @@ separate_textual_runs (unsigned char *text_storage, char_converter.reg[1] = byte1; char_converter.reg[2] = byte2; char_converter.ic = 0; /* start at beginning each time */ - ccl_driver (&char_converter, 0, 0, 0, 0); + ccl_driver (&char_converter, 0, 0, 0, 0, CCL_MODE_ENCODING); byte1 = char_converter.reg[1]; byte2 = char_converter.reg[2]; } @@ -965,6 +967,7 @@ mswindows_redraw_exposed_area (struct frame *f, int x, int y, int width, int hei redraw anyhow. */ MAYBE_FRAMEMETH (f, redraw_exposed_toolbars, (f, x, y, width, height)); #endif + redraw_exposed_gutters (f, x, y, width, height); if (!f->window_face_cache_reset) { @@ -977,38 +980,36 @@ mswindows_redraw_exposed_area (struct frame *f, int x, int y, int width, int hei /***************************************************************************** - mswindows_bevel_modeline + mswindows_bevel_area - Draw a 3d border around the modeline on window W. + Draw a 3d border around the specified area on window W. ****************************************************************************/ static void -mswindows_bevel_modeline (struct window *w, struct display_line *dl) +mswindows_bevel_area (struct window *w, face_index findex, int x, int y, + int width, int height, int shadow_thickness) { struct frame *f = XFRAME (w->frame); - Lisp_Object color; - int shadow_width = MODELINE_SHADOW_THICKNESS (w); - RECT rect = { WINDOW_MODELINE_LEFT (w), - dl->ypos - dl->ascent - shadow_width, - WINDOW_MODELINE_RIGHT (w), - dl->ypos + dl->descent + shadow_width}; UINT edge; - color = WINDOW_FACE_CACHEL_BACKGROUND (w, MODELINE_INDEX); - mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, color, Qnil); - - if (XINT (w->modeline_shadow_thickness) < 0) - shadow_width = -shadow_width; - - if (shadow_width < -1) + if (shadow_thickness < -1) edge = EDGE_SUNKEN; - else if (shadow_width < 0) + else if (shadow_thickness < 0) edge = BDR_SUNKENINNER; - else if (shadow_width == 1) + else if (shadow_thickness == 1) edge = BDR_RAISEDINNER; else edge = EDGE_RAISED; - - DrawEdge (FRAME_MSWINDOWS_DC (f), &rect, edge, BF_RECT); + + if (shadow_thickness < 0) + shadow_thickness = -shadow_thickness; + + { + RECT rect = { x, y, x + width, y + height }; + Lisp_Object color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); + mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, color, Qnil); + + DrawEdge (FRAME_MSWINDOWS_DC (f), &rect, edge, BF_RECT); + } } @@ -1110,18 +1111,14 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b rb = Dynarr_atp (rba, start); if (!rb) - { /* Nothing to do so don't do anything. */ return; - } - else - { - findex = rb->findex; - xpos = rb->xpos; - width = 0; - if (rb->type == RUNE_CHAR) - charset = CHAR_CHARSET (rb->object.chr.ch); - } + + findex = rb->findex; + xpos = rb->xpos; + width = 0; + if (rb->type == RUNE_CHAR) + charset = CHAR_CHARSET (rb->object.chr.ch); if (end < 0) end = Dynarr_length (rba); @@ -1295,7 +1292,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b && (f->clear || f->windows_structure_changed || w->shadow_thickness_changed)) - mswindows_bevel_modeline (w, dl); + bevel_modeline (w, dl); Dynarr_free (buf); } @@ -1316,12 +1313,14 @@ mswindows_output_vertical_divider (struct window *w, int clear_unused) int abs_shadow = abs (shadow); int line_width = XINT (w->vertical_divider_line_width); int div_left = WINDOW_RIGHT (w) - window_divider_width (w); + int y1 = WINDOW_TOP (w) + FRAME_TOP_GUTTER_BOUNDS (f); + int y2 = WINDOW_BOTTOM (w) + FRAME_BOTTOM_GUTTER_BOUNDS (f); /* Clear left and right spacing areas */ if (spacing) { - rect.top = WINDOW_TOP (w); - rect.bottom = WINDOW_BOTTOM (w); + rect.top = y1; + rect.bottom = y2; mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, WINDOW_FACE_CACHEL_BACKGROUND (w, DEFAULT_INDEX), Qnil); rect.right = WINDOW_RIGHT (w); @@ -1335,8 +1334,8 @@ mswindows_output_vertical_divider (struct window *w, int clear_unused) } /* Clear divider face */ - rect.top = WINDOW_TOP (w) + abs_shadow; - rect.bottom = WINDOW_BOTTOM (w) - abs_shadow; + rect.top = y1 + abs_shadow; + rect.bottom = y2 - abs_shadow; rect.left = div_left + spacing + abs_shadow; rect.right = rect.left + line_width; if (rect.left < rect.right) @@ -1421,56 +1420,6 @@ mswindows_clear_region (Lisp_Object locale, struct device* d, struct frame* f, #endif } -/***************************************************************************** - mswindows_clear_to_window_end - - Clear the area between ypos1 and ypos2. Each margin area and the - text area is handled separately since they may each have their own - background color. - ****************************************************************************/ -static void -mswindows_clear_to_window_end (struct window *w, int ypos1, int ypos2) -{ - int height = ypos2 - ypos1; - - if (height) - { - struct frame *f = XFRAME (w->frame); - Lisp_Object window; - int bflag = (window_needs_vertical_divider (w) ? 0 : 1); - layout_bounds bounds; - - bounds = calculate_display_line_boundaries (w, bflag); - XSETWINDOW (window, w); - - if (window_is_leftmost (w)) - redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), - ypos1, FRAME_BORDER_WIDTH (f), height); - - if (bounds.left_in - bounds.left_out > 0) - redisplay_clear_region (window, - get_builtin_face_cache_index (w, Vleft_margin_face), - bounds.left_out, ypos1, - bounds.left_in - bounds.left_out, height); - - if (bounds.right_in - bounds.left_in > 0) - redisplay_clear_region (window, DEFAULT_INDEX, bounds.left_in, ypos1, - bounds.right_in - bounds.left_in, height); - - if (bounds.right_out - bounds.right_in > 0) - redisplay_clear_region (window, - get_builtin_face_cache_index (w, Vright_margin_face), - bounds.right_in, ypos1, - bounds.right_out - bounds.right_in, height); - - if (window_is_rightmost (w)) - redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), - ypos1, FRAME_BORDER_WIDTH (f), height); - } - -} - - /* XXX Implement me! */ static void mswindows_clear_frame (struct frame *f) @@ -1493,11 +1442,11 @@ console_type_create_redisplay_mswindows (void) CONSOLE_HAS_METHOD (mswindows, divider_height); CONSOLE_HAS_METHOD (mswindows, eol_cursor_width); CONSOLE_HAS_METHOD (mswindows, output_vertical_divider); - CONSOLE_HAS_METHOD (mswindows, clear_to_window_end); CONSOLE_HAS_METHOD (mswindows, clear_region); CONSOLE_HAS_METHOD (mswindows, clear_frame); CONSOLE_HAS_METHOD (mswindows, output_begin); CONSOLE_HAS_METHOD (mswindows, output_end); CONSOLE_HAS_METHOD (mswindows, flash); CONSOLE_HAS_METHOD (mswindows, ring_bell); + CONSOLE_HAS_METHOD (mswindows, bevel_area); } diff --git a/src/redisplay-output.c b/src/redisplay-output.c index 4a6ce5a..ae041e9 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -592,7 +592,7 @@ output_display_line (struct window *w, display_line_dynarr *cdla, cdl->clip != ddl->clip))) { int x, y, width, height; - Lisp_Object face; + face_index findex; must_sync = 1; x = start_pixpos; @@ -601,23 +601,33 @@ output_display_line (struct window *w, display_line_dynarr *cdla, height = ddl->ascent + ddl->descent - ddl->clip; if (x < ddl->bounds.left_in) - face = Vleft_margin_face; + { + findex = ddl->left_margin_findex ? + ddl->left_margin_findex + : get_builtin_face_cache_index (w, Vleft_margin_face); + } else if (x < ddl->bounds.right_in) - face = Vdefault_face; + { + /* no check here because DEFAULT_INDEX == 0 anyway */ + findex = ddl->default_findex; + } else if (x < ddl->bounds.right_out) - face = Vright_margin_face; + { + findex = ddl->right_margin_findex ? + ddl->right_margin_findex + : get_builtin_face_cache_index (w, Vright_margin_face); + } else - face = Qnil; + findex = (face_index) -1; - if (!NILP (face)) + if (findex != (face_index) -1) { Lisp_Object window; XSETWINDOW (window, w); /* Clear the empty area. */ - redisplay_clear_region (window, get_builtin_face_cache_index (w, face), - x, y, width, height); + redisplay_clear_region (window, findex, x, y, width, height); /* Mark that we should clear the border. This is necessary because italic fonts may leave @@ -1253,6 +1263,64 @@ redisplay_clear_top_of_window (struct window *w) } /***************************************************************************** + redisplay_clear_to_window_end + + Clear the area between ypos1 and ypos2. Each margin area and the + text area is handled separately since they may each have their own + background color. + ****************************************************************************/ +void +redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2) +{ + struct frame *f = XFRAME (w->frame); + struct device *d = XDEVICE (f->device); + + if (HAS_DEVMETH_P (d, clear_to_window_end)) + DEVMETH (d, clear_to_window_end, (w, ypos1, ypos2)); + else + { + int height = ypos2 - ypos1; + + if (height) + { + struct frame *f = XFRAME (w->frame); + Lisp_Object window; + int bflag = 0 ; /* (window_needs_vertical_divider (w) ? 0 : 1);*/ + layout_bounds bounds; + + bounds = calculate_display_line_boundaries (w, bflag); + XSETWINDOW (window, w); + + if (window_is_leftmost (w)) + redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), + ypos1, FRAME_BORDER_WIDTH (f), height); + + if (bounds.left_in - bounds.left_out > 0) + redisplay_clear_region (window, + get_builtin_face_cache_index (w, Vleft_margin_face), + bounds.left_out, ypos1, + bounds.left_in - bounds.left_out, height); + + if (bounds.right_in - bounds.left_in > 0) + redisplay_clear_region (window, + DEFAULT_INDEX, + bounds.left_in, ypos1, + bounds.right_in - bounds.left_in, height); + + if (bounds.right_out - bounds.right_in > 0) + redisplay_clear_region (window, + get_builtin_face_cache_index (w, Vright_margin_face), + bounds.right_in, ypos1, + bounds.right_out - bounds.right_in, height); + + if (window_is_rightmost (w)) + redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), + ypos1, FRAME_BORDER_WIDTH (f), height); + } + } +} + +/***************************************************************************** redisplay_clear_bottom_of_window Clear window from right below the last display line to right above @@ -1308,7 +1376,7 @@ redisplay_clear_bottom_of_window (struct window *w, display_line_dynarr *ddla, if (ypos2 <= ypos1) return; - DEVMETH (d, clear_to_window_end, (w, ypos1, ypos2)); + redisplay_clear_to_window_end (w, ypos1, ypos2); } /***************************************************************************** @@ -1603,3 +1671,28 @@ redisplay_output_window (struct window *w) update_window_scrollbars (w, NULL, !MINI_WINDOW_P (w), 0); #endif } + +/***************************************************************************** + bevel_modeline + + Draw a 3d border around the modeline on window W. + ****************************************************************************/ +void +bevel_modeline (struct window *w, struct display_line *dl) +{ + struct frame *f = XFRAME (w->frame); + struct device *d = XDEVICE (f->device); + int x, y, width, height; + int shadow_thickness = MODELINE_SHADOW_THICKNESS (w); + + x = WINDOW_MODELINE_LEFT (w); + width = WINDOW_MODELINE_RIGHT (w) - x; + y = dl->ypos - dl->ascent - shadow_thickness; + height = dl->ascent + dl->descent + 2 * shadow_thickness; + + if (XINT (w->modeline_shadow_thickness) < 0) + shadow_thickness = - shadow_thickness; + + MAYBE_DEVMETH (d, bevel_area, + (w, MODELINE_INDEX, x, y, width, height, shadow_thickness)); +} diff --git a/src/redisplay-x.c b/src/redisplay-x.c index 6555163..cf1766e 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA. */ #include "debug.h" #include "faces.h" #include "frame.h" +#include "gutter.h" #include "redisplay.h" #include "sysdep.h" #include "window.h" @@ -78,7 +79,7 @@ static void x_output_eol_cursor (struct window *w, struct display_line *dl, int xpos, face_index findex); static void x_clear_frame (struct frame *f); static void x_clear_frame_windows (Lisp_Object window); -static void x_bevel_modeline (struct window *w, struct display_line *dl); +void bevel_modeline (struct window *w, struct display_line *dl); /* Note: We do not use the Xmb*() functions and XFontSets. @@ -334,7 +335,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, int elt = start; face_index findex; - int xpos, width; + int xpos, width = 0; Lisp_Object charset = Qunbound; /* Qnil is a valid charset when MULE is not defined */ @@ -342,18 +343,13 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, rb = Dynarr_atp (rba, start); if (!rb) - { - /* Nothing to do so don't do anything. */ - return; - } - else - { - findex = rb->findex; - xpos = rb->xpos; - width = 0; - if (rb->type == RUNE_CHAR) - charset = CHAR_CHARSET (rb->object.chr.ch); - } + /* Nothing to do so don't do anything. */ + return; + + findex = rb->findex; + xpos = rb->xpos; + if (rb->type == RUNE_CHAR) + charset = CHAR_CHARSET (rb->object.chr.ch); if (end < 0) end = Dynarr_length (rba); @@ -522,38 +518,40 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, && (f->clear || f->windows_structure_changed || w->shadow_thickness_changed)) - x_bevel_modeline (w, dl); + bevel_modeline (w, dl); Dynarr_free (buf); } /***************************************************************************** - x_bevel_modeline + x_bevel_area - Draw a 3d border around the modeline on window W. + Draw a shadows for the given area in the given face. ****************************************************************************/ static void -x_bevel_modeline (struct window *w, struct display_line *dl) +x_bevel_area (struct window *w, face_index findex, + int x, int y, int width, int height, + int shadow_thickness) { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); + + EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); Display *dpy = DEVICE_X_DISPLAY (d); Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f)); - EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); - GC top_shadow_gc, bottom_shadow_gc, background_gc; Pixel top_shadow_pixel, bottom_shadow_pixel, background_pixel; - XColor tmp_color; Lisp_Object tmp_pixel; - int x, y, width, height; + XColor tmp_color; XGCValues gcv; - unsigned long mask; + GC top_shadow_gc, bottom_shadow_gc, background_gc; + int use_pixmap = 0; int flip_gcs = 0; - int shadow_thickness; + unsigned long mask; memset (&gcv, ~0, sizeof (XGCValues)); - tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, MODELINE_INDEX); + tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); /* First, get the GC's. */ @@ -564,12 +562,14 @@ x_bevel_modeline (struct window *w, struct display_line *dl) x_generate_shadow_pixels (f, &top_shadow_pixel, &bottom_shadow_pixel, background_pixel, ef->core.background_pixel); - tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, MODELINE_INDEX); + tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, findex); tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); gcv.background = tmp_color.pixel; gcv.graphics_exposures = False; mask = GCForeground | GCBackground | GCGraphicsExposures; + /* If we can't distinguish one of the shadows (the color is the same as the + background), it's better to use a pixmap to generate a dithered gray. */ if (top_shadow_pixel == background_pixel || bottom_shadow_pixel == background_pixel) use_pixmap = 1; @@ -583,15 +583,16 @@ x_bevel_modeline (struct window *w, struct display_line *dl) gray_width, gray_height, 1, 0, 1); } - tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, MODELINE_INDEX); + tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); gcv.foreground = tmp_color.pixel; + /* this is needed because the GC draws with a pixmap here */ gcv.fill_style = FillOpaqueStippled; gcv.stipple = DEVICE_X_GRAY_PIXMAP (d); top_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, (mask | GCStipple | GCFillStyle)); - tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, MODELINE_INDEX); + tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, findex); tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); bottom_shadow_pixel = tmp_color.pixel; @@ -617,23 +618,23 @@ x_bevel_modeline (struct window *w, struct display_line *dl) gcv.foreground = background_pixel; background_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask); - if (XINT (w->modeline_shadow_thickness) < 0) + /* possibly revert the GC's in case the shadow thickness is < 0. + This will give a depressed look to the divider */ + if (shadow_thickness < 0) { GC temp; temp = top_shadow_gc; top_shadow_gc = bottom_shadow_gc; bottom_shadow_gc = temp; - } - - shadow_thickness = MODELINE_SHADOW_THICKNESS (w); - x = WINDOW_MODELINE_LEFT (w); - width = WINDOW_MODELINE_RIGHT (w) - x; - y = dl->ypos - dl->ascent - shadow_thickness; - height = dl->ascent + dl->descent + 2 * shadow_thickness; + /* better avoid a Bad Address XLib error ;-) */ + shadow_thickness = - shadow_thickness; + } - x_output_shadows (f, x, y, width, height, top_shadow_gc, bottom_shadow_gc, + /* Draw the shadows around the divider line */ + x_output_shadows (f, x, y, width, height, + top_shadow_gc, bottom_shadow_gc, background_gc, shadow_thickness); } @@ -1397,17 +1398,13 @@ x_output_vertical_divider (struct window *w, int clear) struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); - EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); Display *dpy = DEVICE_X_DISPLAY (d); Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f)); - Pixel top_shadow_pixel, bottom_shadow_pixel, background_pixel; Lisp_Object tmp_pixel; XColor tmp_color; XGCValues gcv; - GC top_shadow_gc, bottom_shadow_gc, background_gc; + GC background_gc; - int use_pixmap = 0; - int flip_gcs = 0; unsigned long mask; int x, y1, y2, width, shadow_thickness, spacing, line_width; face_index div_face = get_builtin_face_cache_index (w, Vvertical_divider_face); @@ -1417,8 +1414,8 @@ x_output_vertical_divider (struct window *w, int clear) spacing = XINT (w->vertical_divider_spacing); line_width = XINT (w->vertical_divider_line_width); x = WINDOW_RIGHT (w) - width; - y1 = WINDOW_TOP (w); - y2 = WINDOW_BOTTOM (w); + y1 = WINDOW_TOP (w) + FRAME_TOP_GUTTER_BOUNDS (f); + y2 = WINDOW_BOTTOM (w) + FRAME_BOTTOM_GUTTER_BOUNDS (f); memset (&gcv, ~0, sizeof (XGCValues)); @@ -1426,83 +1423,12 @@ x_output_vertical_divider (struct window *w, int clear) tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); /* First, get the GC's. */ - top_shadow_pixel = tmp_color.pixel; - bottom_shadow_pixel = tmp_color.pixel; - background_pixel = tmp_color.pixel; - - x_generate_shadow_pixels (f, &top_shadow_pixel, &bottom_shadow_pixel, - background_pixel, ef->core.background_pixel); - - tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, div_face); - tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); gcv.background = tmp_color.pixel; + gcv.foreground = tmp_color.pixel; gcv.graphics_exposures = False; mask = GCForeground | GCBackground | GCGraphicsExposures; - - /* If we can't distinguish one of the shadows (the color is the same as the - background), it's better to use a pixmap to generate a dithered gray. */ - if (top_shadow_pixel == background_pixel || - bottom_shadow_pixel == background_pixel) - use_pixmap = 1; - - if (use_pixmap) - { - if (DEVICE_X_GRAY_PIXMAP (d) == None) - { - DEVICE_X_GRAY_PIXMAP (d) = - XCreatePixmapFromBitmapData (dpy, x_win, (char *) gray_bits, - gray_width, gray_height, 1, 0, 1); - } - - tmp_pixel = WINDOW_FACE_CACHEL_BACKGROUND (w, div_face); - tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); - gcv.foreground = tmp_color.pixel; - /* this is needed because the GC draws with a pixmap here */ - gcv.fill_style = FillOpaqueStippled; - gcv.stipple = DEVICE_X_GRAY_PIXMAP (d); - top_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, - (mask | GCStipple | GCFillStyle)); - - tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, div_face); - tmp_color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (tmp_pixel)); - bottom_shadow_pixel = tmp_color.pixel; - - flip_gcs = (bottom_shadow_pixel == - WhitePixelOfScreen (DefaultScreenOfDisplay (dpy))); - } - else - { - gcv.foreground = top_shadow_pixel; - top_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask); - } - - gcv.foreground = bottom_shadow_pixel; - bottom_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask); - - if (use_pixmap && flip_gcs) - { - GC tmp_gc = bottom_shadow_gc; - bottom_shadow_gc = top_shadow_gc; - top_shadow_gc = tmp_gc; - } - - gcv.foreground = background_pixel; background_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask); - /* possibly revert the GC's in case the shadow thickness is < 0. - This will give a depressed look to the divider */ - if (shadow_thickness < 0) - { - GC temp; - - temp = top_shadow_gc; - top_shadow_gc = bottom_shadow_gc; - bottom_shadow_gc = temp; - - /* better avoid a Bad Address XLib error ;-) */ - shadow_thickness = - shadow_thickness; - } - /* Clear the divider area first. This needs to be done when a window split occurs. */ if (clear) @@ -1514,10 +1440,9 @@ x_output_vertical_divider (struct window *w, int clear) line_width, y2 - y1); /* Draw the shadows around the divider line */ - x_output_shadows (f, x + spacing, y1, - width - 2 * spacing, y2 - y1, - top_shadow_gc, bottom_shadow_gc, - background_gc, shadow_thickness); + x_bevel_area (w, div_face, x + spacing, y1, + width - 2 * spacing, y2 - y1, + shadow_thickness); } /***************************************************************************** @@ -1815,54 +1740,6 @@ x_generate_shadow_pixels (struct frame *f, unsigned long *top_shadow, } /***************************************************************************** - x_clear_to_window_end - - Clear the area between ypos1 and ypos2. Each margin area and the - text area is handled separately since they may each have their own - background color. - ****************************************************************************/ -static void -x_clear_to_window_end (struct window *w, int ypos1, int ypos2) -{ - int height = ypos2 - ypos1; - - if (height) - { - struct frame *f = XFRAME (w->frame); - Lisp_Object window; - int bflag = (window_needs_vertical_divider (w) ? 0 : 1); - layout_bounds bounds; - - bounds = calculate_display_line_boundaries (w, bflag); - XSETWINDOW (window, w); - - if (window_is_leftmost (w)) - redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), - ypos1, FRAME_BORDER_WIDTH (f), height); - - if (bounds.left_in - bounds.left_out > 0) - redisplay_clear_region (window, - get_builtin_face_cache_index (w, Vleft_margin_face), - bounds.left_out, ypos1, - bounds.left_in - bounds.left_out, height); - - if (bounds.right_in - bounds.left_in > 0) - redisplay_clear_region (window, DEFAULT_INDEX, bounds.left_in, ypos1, - bounds.right_in - bounds.left_in, height); - - if (bounds.right_out - bounds.right_in > 0) - redisplay_clear_region (window, - get_builtin_face_cache_index (w, Vright_margin_face), - bounds.right_in, ypos1, - bounds.right_out - bounds.right_in, height); - - if (window_is_rightmost (w)) - redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), - ypos1, FRAME_BORDER_WIDTH (f), height); - } -} - -/***************************************************************************** x_redraw_exposed_window Given a bounding box for an area that needs to be redrawn, determine @@ -1979,6 +1856,7 @@ x_redraw_exposed_area (struct frame *f, int x, int y, int width, int height) redraw anyhow. */ MAYBE_FRAMEMETH (f, redraw_exposed_toolbars, (f, x, y, width, height)); #endif + redraw_exposed_gutters (f, x, y, width, height); if (!f->window_face_cache_reset) { @@ -2110,7 +1988,8 @@ x_clear_frame_window (Lisp_Object window) return; } - x_clear_to_window_end (w, WINDOW_TEXT_TOP (w), WINDOW_TEXT_BOTTOM (w)); + redisplay_clear_to_window_end (w, WINDOW_TEXT_TOP (w), + WINDOW_TEXT_BOTTOM (w)); } static void @@ -2267,11 +2146,11 @@ console_type_create_redisplay_x (void) CONSOLE_HAS_METHOD (x, divider_height); CONSOLE_HAS_METHOD (x, eol_cursor_width); CONSOLE_HAS_METHOD (x, output_vertical_divider); - CONSOLE_HAS_METHOD (x, clear_to_window_end); CONSOLE_HAS_METHOD (x, clear_region); CONSOLE_HAS_METHOD (x, clear_frame); CONSOLE_HAS_METHOD (x, output_begin); CONSOLE_HAS_METHOD (x, output_end); CONSOLE_HAS_METHOD (x, flash); CONSOLE_HAS_METHOD (x, ring_bell); + CONSOLE_HAS_METHOD (x, bevel_area); } diff --git a/src/redisplay.c b/src/redisplay.c index 6936acf..e2c0511 100644 --- a/src/redisplay.c +++ b/src/redisplay.c @@ -51,6 +51,7 @@ Boston, MA 02111-1307, USA. */ #include "faces.h" #include "frame.h" #include "glyphs.h" +#include "gutter.h" #include "insdel.h" #include "menubar.h" #include "objects.h" @@ -107,6 +108,9 @@ typedef struct position_redisplay_data_type /* This information is normally filled in by the create_*_block routines and is used by the add_*_rune routines. */ Lisp_Object window; + /* if we are working with strings rather than buffers we need a + handle to the string */ + Lisp_Object string; struct device *d; struct display_block *db; struct display_line *dl; @@ -271,6 +275,9 @@ static void free_display_line (struct display_line *dl); static void update_line_start_cache (struct window *w, Bufpos from, Bufpos to, Bufpos point, int no_regen); static int point_visible (struct window *w, Bufpos point, int type); +extern Bytind bi_find_next_emchar_in_string (struct Lisp_String* str, Emchar target, + Bytind st, EMACS_INT count); +extern int string_column_at_point (struct Lisp_String* s, Bufpos init_pos, int tab_width); /* This used to be 10 but 30 seems to give much better performance. */ #define INIT_MAX_PREEMPTS 30 @@ -401,6 +408,10 @@ int asynch_device_change_pending; int toolbar_changed; int toolbar_changed_set; +/* non-nil if any gutter has changed */ +int gutter_changed; +int gutter_changed_set; + /* non-nil if any window has changed since the last time redisplay completed */ int windows_changed; @@ -902,9 +913,15 @@ add_emchar_rune (pos_data *data) crb->xpos = data->pixpos; crb->width = width; if (data->bi_bufpos) - crb->bufpos = - bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))), - data->bi_bufpos); + { + if (NILP (data->string)) + crb->bufpos = + bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))), + data->bi_bufpos); + else + crb->bufpos = + bytecount_to_charcount (XSTRING_DATA (data->string), data->bi_bufpos); + } else if (data->is_modeline) crb->bufpos = data->modeline_charpos; else @@ -1866,6 +1883,7 @@ create_text_block (struct window *w, struct display_line *dl, them to this structure for ease of passing. */ data.d = d; XSETWINDOW (data.window, w); + data.string = Qnil; data.db = db; data.dl = dl; @@ -2643,6 +2661,7 @@ create_overlay_glyph_block (struct window *w, struct display_line *dl) data.last_charset = Qunbound; data.last_findex = DEFAULT_INDEX; data.result_str = Qnil; + data.string = Qnil; Dynarr_reset (data.db->runes); @@ -3493,6 +3512,10 @@ generate_modeline (struct window *w, struct display_line *dl, int type) /* The modeline is at the bottom of the gutters. */ dl->ypos = WINDOW_BOTTOM (w); + /* adjust for the bottom gutter */ + if (window_is_lowest (w)) + dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f); + rb.findex = MODELINE_INDEX; rb.xpos = dl->bounds.left_out; rb.width = dl->bounds.right_out - dl->bounds.left_out; @@ -3546,6 +3569,9 @@ generate_modeline (struct window *w, struct display_line *dl, int type) set this until we've generated the modeline in order to account for any embedded faces. */ dl->ypos = WINDOW_BOTTOM (w) - dl->descent - ypos_adj; + /* adjust for the bottom gutter */ + if (window_is_lowest (w)) + dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f); } static void @@ -3572,6 +3598,7 @@ generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str, data.last_findex = DEFAULT_INDEX; data.result_str = result_str; data.is_modeline = 1; + data.string = Qnil; XSETWINDOW (data.window, w); Dynarr_reset (formatted_string_extent_dynarr); @@ -4178,90 +4205,934 @@ real_current_modeline_height (struct window *w) /***************************************************************************/ -/* */ -/* window-regeneration routines */ -/* */ +/* */ +/* displayable string routines */ +/* */ /***************************************************************************/ -/* For a given window and starting position in the buffer it contains, - ensure that the TYPE display lines accurately represent the - presentation of the window. We pass the buffer instead of getting - it from the window since redisplay_window may have temporarily - changed it to the echo area buffer. */ +/* Given a position for a string in a window, ensure that the given + display line DL accurately represents the text on a line starting + at the given position. -static void -regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) + Yes, this is duplicating the code of create_text_block, but it + looked just too hard to change create_text_block to handle strings + *and* buffers. We already make a distinction between the two + elsewhere in the code so I think unifying them would require a + complete MULE rewrite. Besides, the other distinction is that these + functions cover text that the user *cannot edit* so we can remove + everything to do with cursors, minibuffers etc. Eventually the + modeline routines should be modified to use this code as it copes + with many more types of display situation. */ + +static Bufpos +create_string_text_block (struct window *w, Lisp_Object disp_string, + struct display_line *dl, + Bufpos start_pos, + prop_block_dynarr **prop, + face_index default_face) { struct frame *f = XFRAME (w->frame); + /* Note that a lot of the buffer controlled stuff has been left in + because you might well want to make use of it (selective display + etc), its just the buffer text that we do not use. */ struct buffer *b = XBUFFER (w->buffer); - int ypos = WINDOW_TEXT_TOP (w); - int yend; /* set farther down */ + struct device *d = XDEVICE (f->device); + struct Lisp_String* s = XSTRING (disp_string); - prop_block_dynarr *prop; - layout_bounds bounds; - display_line_dynarr *dla; - int need_modeline; + /* we're working with these a lot so precalculate them */ + Bytecount slen = XSTRING_LENGTH (disp_string); + Bytecount bi_string_zv = slen; + Bytind bi_start_pos = charcount_to_bytecount (string_data (s), start_pos); - /* The lines had better exist by this point. */ - if (!(dla = window_display_lines (w, type))) - abort (); - Dynarr_reset (dla); - w->max_line_len = 0; + pos_data data; - /* Normally these get updated in redisplay_window but it is possible - for this function to get called from some other points where that - update may not have occurred. This acts as a safety check. */ - if (!Dynarr_length (w->face_cachels)) - reset_face_cachels (w); - if (!Dynarr_length (w->glyph_cachels)) - reset_glyph_cachels (w); + int truncate_win = window_truncation_on (w); + int end_glyph_width = 0; - Fset_marker (w->start[type], make_int (start_pos), w->buffer); - Fset_marker (w->pointm[type], make_int (point), w->buffer); - w->last_point_x[type] = -1; - w->last_point_y[type] = -1; + /* 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 + functions that we don't have the luxury of being able to use + here. */ - /* Make sure a modeline is in the structs if needed. */ - need_modeline = ensure_modeline_generated (w, type); + /* The variable ctl-arrow allows the user to specify what characters + can actually be displayed and which octal should be used for. + #### This variable should probably have some rethought done to + it. - /* Wait until here to set this so that the structs have a modeline - generated in the case where one didn't exist. */ - yend = WINDOW_TEXT_BOTTOM (w); + #### It would also be really nice if you could specify that + the characters come out in hex instead of in octal. Mule + does that by adding a ctl-hexa variable similar to ctl-arrow, + but that's bogus -- we need a more general solution. I + think you need to extend the concept of display tables + into a more general conversion mechanism. Ideally you + could specify a Lisp function that converts characters, + but this violates the Second Golden Rule and besides would + make things way way way way slow. - bounds = calculate_display_line_boundaries (w, 0); + So instead, we extend the display-table concept, which was + historically limited to 256-byte vectors, to one of the + following: - /* 97/3/14 jhod: stuff added here to support pre-prompts (used for input systems) */ - if (MINI_WINDOW_P (w) - && (!NILP (Vminibuf_prompt) || !NILP (Vminibuf_preprompt)) - && !echo_area_active (f) - && start_pos == BUF_BEGV (b)) - { - struct prop_block pb; - Lisp_Object string; - prop = Dynarr_new (prop_block); + a) A 256-entry vector, for backward compatibility; + b) char-table, mapping characters to values; + c) range-table, mapping ranges of characters to values; + d) a list of the above. - string = concat2(Vminibuf_preprompt, Vminibuf_prompt); - pb.type = PROP_MINIBUF_PROMPT; - pb.data.p_string.str = XSTRING_DATA(string); - pb.data.p_string.len = XSTRING_LENGTH(string); - Dynarr_add (prop, pb); + The (d) option allows you to specify multiple display tables + instead of just one. Each display table can specify conversions + for some characters and leave others unchanged. The way the + character gets displayed is determined by the first display table + with a binding for that character. This way, you could call a + function `enable-hex-display' that adds a hex display-table to + the list of display tables for the current buffer. + + #### ...not yet implemented... Also, we extend the concept of + "mapping" to include a printf-like spec. Thus you can make all + extended characters show up as hex with a display table like + this: + + #s(range-table data ((256 524288) (format "%x"))) + + Since more than one display table is possible, you have + great flexibility in mapping ranges of characters. */ + Emchar printable_min = (CHAR_OR_CHAR_INTP (b->ctl_arrow) + ? XCHAR_OR_CHAR_INT (b->ctl_arrow) + : ((EQ (b->ctl_arrow, Qt) || EQ (b->ctl_arrow, Qnil)) + ? 255 : 160)); + + Lisp_Object face_dt, window_dt; + + /* The text display block for this display line. */ + struct display_block *db = get_display_block_from_line (dl, TEXT); + + /* The first time through the main loop we need to force the glyph + data to be updated. */ + int initial = 1; + + /* Apparently the new extent_fragment_update returns an end position + equal to the position passed in if there are no more runs to be + displayed. */ + int no_more_frags = 0; + + dl->used_prop_data = 0; + dl->num_chars = 0; + + /* set up faces to use for clearing areas, used by + output_display_line */ + dl->default_findex = default_face; + if (default_face) + { + dl->left_margin_findex = default_face; + dl->right_margin_findex = default_face; } else - prop = 0; + { + dl->left_margin_findex = + get_builtin_face_cache_index (w, Vleft_margin_face); + dl->right_margin_findex = + get_builtin_face_cache_index (w, Vright_margin_face); + } - while (ypos < yend) + xzero (data); + data.ef = extent_fragment_new (disp_string, f); + + /* These values are used by all of the rune addition routines. We add + them to this structure for ease of passing. */ + data.d = d; + XSETWINDOW (data.window, w); + data.db = db; + data.dl = dl; + + data.bi_bufpos = bi_start_pos; + data.pixpos = dl->bounds.left_in; + data.last_charset = Qunbound; + data.last_findex = default_face; + data.result_str = Qnil; + data.string = disp_string; + + /* Set the right boundary adjusting it to take into account any end + glyph. Save the width of the end glyph for later use. */ + data.max_pixpos = dl->bounds.right_in; +#if 0 + if (truncate_win) + end_glyph_width = GLYPH_CACHEL_WIDTH (w, TRUN_GLYPH_INDEX); + else + end_glyph_width = GLYPH_CACHEL_WIDTH (w, CONT_GLYPH_INDEX); +#endif + data.max_pixpos -= end_glyph_width; + + data.cursor_type = NO_CURSOR; + data.cursor_x = -1; + + data.start_col = 0; + /* I don't think we want this, string areas should not scroll with + the window + data.start_col = w->hscroll; + data.bi_start_col_enabled = (w->hscroll ? bi_start_pos : 0); + */ + data.bi_start_col_enabled = 0; + data.hscroll_glyph_width_adjust = 0; + + /* We regenerate the line from the very beginning. */ + Dynarr_reset (db->runes); + + /* Why is this less than or equal and not just less than? If the + starting position is already equal to the maximum we can't add + anything else, right? Wrong. We might still have a newline to + add. A newline can use the room allocated for an end glyph since + if we add it we know we aren't going to be adding any end + glyph. */ + + /* #### Chuck -- I think this condition should be while (1). + Otherwise if (e.g.) there is one begin-glyph and one end-glyph + and the begin-glyph ends exactly at the end of the window, the + end-glyph and text might not be displayed. while (1) ensures + that the loop terminates only when either (a) there is + propagation data or (b) the end-of-line or end-of-buffer is hit. + + #### Also I think you need to ensure that the operation + "add begin glyphs; add end glyphs; add text" is atomic and + can't get interrupted in the middle. If you run off the end + of the line during that operation, then you keep accumulating + propagation data until you're done. Otherwise, if the (e.g.) + there's a begin glyph at a particular position and attempting + to display that glyph results in window-end being hit and + propagation data being generated, then the character at that + position won't be displayed. + + #### See also the comment after the end of this loop, below. + */ + while (data.pixpos <= data.max_pixpos) { - struct display_line dl; - struct display_line *dlp; - int local; + /* #### This check probably should not be necessary. */ + if (data.bi_bufpos > bi_string_zv) + { + /* #### urk! More of this lossage! */ + data.bi_bufpos--; + goto done; + } - if (Dynarr_length (dla) < Dynarr_largest (dla)) + /* Check for face changes. */ + if (initial || (!no_more_frags && data.bi_bufpos == data.ef->end)) { - dlp = Dynarr_atp (dla, Dynarr_length (dla)); - local = 0; + /* Now compute the face and begin/end-glyph information. */ + data.findex = + /* Remember that the extent-fragment routines deal in Bytind's. */ + extent_fragment_update (w, data.ef, data.bi_bufpos); + /* This is somewhat cheesy but the alternative is to + propagate default_face into extent_fragment_update. */ + if (data.findex == DEFAULT_INDEX) + data.findex = default_face; + + get_display_tables (w, data.findex, &face_dt, &window_dt); + + if (data.bi_bufpos == data.ef->end) + no_more_frags = 1; } - else + initial = 0; + + /* Determine what is next to be displayed. We first handle any + glyphs returned by glyphs_at_bufpos. If there are no glyphs to + display then we determine what to do based on the character at the + current buffer position. */ + + /* If the current position is covered by an invisible extent, do + nothing (except maybe add some ellipses). + + #### The behavior of begin and end-glyphs at the edge of an + invisible extent should be investigated further. This is + fairly low priority though. */ + if (data.ef->invisible) { + /* #### Chuck, perhaps you could look at this code? I don't + really know what I'm doing. */ + if (*prop) + { + Dynarr_free (*prop); + *prop = 0; + } + + /* The extent fragment code only sets this when we should + really display the ellipses. It makes sure the ellipses + don't get displayed more than once in a row. */ + if (data.ef->invisible_ellipses) + { + struct glyph_block gb; + + data.ef->invisible_ellipses_already_displayed = 1; + data.ef->invisible_ellipses = 0; + gb.extent = Qnil; + gb.glyph = Vinvisible_text_glyph; + *prop = add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 0, + GLYPH_CACHEL (w, INVIS_GLYPH_INDEX)); + /* Perhaps they shouldn't propagate if the very next thing + is to display a newline (for compatibility with + selective-display-ellipses)? Maybe that's too + abstruse. */ + if (*prop) + goto done; + } + + /* #### What if we we're dealing with a display table? */ + if (data.start_col) + data.start_col--; + + if (data.bi_bufpos == bi_string_zv) + goto done; + else + INC_CHARBYTIND (string_data (s), data.bi_bufpos); + } + + /* If there is propagation data, then it represents the current + buffer position being displayed. Add them and advance the + position counter. This might also add the minibuffer + prompt. */ + else if (*prop) + { + dl->used_prop_data = 1; + *prop = add_propagation_runes (prop, &data); + + if (*prop) + goto done; /* gee, a really narrow window */ + else if (data.bi_bufpos == bi_string_zv) + goto done; + else if (data.bi_bufpos < 0) + /* #### urk urk urk! Aborts are not very fun! Fix this please! */ + data.bi_bufpos = 0; + else + INC_CHARBYTIND (string_data (s), data.bi_bufpos); + } + + /* If there are end glyphs, add them to the line. These are + the end glyphs for the previous run of text. We add them + here rather than doing them at the end of handling the + previous run so that glyphs at the beginning and end of + a line are handled correctly. */ + else if (Dynarr_length (data.ef->end_glyphs) > 0) + { + *prop = add_glyph_runes (&data, END_GLYPHS); + if (*prop) + goto done; + } + + /* If there are begin glyphs, add them to the line. */ + else if (Dynarr_length (data.ef->begin_glyphs) > 0) + { + *prop = add_glyph_runes (&data, BEGIN_GLYPHS); + if (*prop) + goto done; + } + + /* If at end-of-buffer, we've already processed begin and + end-glyphs at this point and there's no text to process, + so we're done. */ + else if (data.bi_bufpos == bi_string_zv) + goto done; + + else + { + Lisp_Object entry = Qnil; + /* Get the character at the current buffer position. */ + data.ch = string_char (s, data.bi_bufpos); + if (!NILP (face_dt) || !NILP (window_dt)) + entry = display_table_entry (data.ch, face_dt, window_dt); + + /* If there is a display table entry for it, hand it off to + add_disp_table_entry_runes and let it worry about it. */ + if (!NILP (entry) && !EQ (entry, make_char (data.ch))) + { + *prop = add_disp_table_entry_runes (&data, entry); + + if (*prop) + goto done; + } + + /* Check if we have hit a newline character. If so, add a marker + to the line and end this loop. */ + else if (data.ch == '\n') + { + /* We aren't going to be adding an end glyph so give its + space back in order to make sure that the cursor can + fit. */ + data.max_pixpos += end_glyph_width; + goto done; + } + + /* If the current character is considered to be printable, then + just add it. */ + else if (data.ch >= printable_min) + { + *prop = add_emchar_rune (&data); + if (*prop) + goto done; + } + + /* If the current character is a tab, determine the next tab + starting position and add a blank rune which extends from the + current pixel position to that starting position. */ + else if (data.ch == '\t') + { + int tab_start_pixpos = data.pixpos; + int next_tab_start; + int char_tab_width; + int prop_width = 0; + + if (data.start_col > 1) + tab_start_pixpos -= (space_width (w) * (data.start_col - 1)); + + next_tab_start = + next_tab_position (w, tab_start_pixpos, + dl->bounds.left_in + + data.hscroll_glyph_width_adjust); + if (next_tab_start > data.max_pixpos) + { + prop_width = next_tab_start - data.max_pixpos; + next_tab_start = data.max_pixpos; + } + data.blank_width = next_tab_start - data.pixpos; + char_tab_width = + (next_tab_start - tab_start_pixpos) / space_width (w); + + *prop = add_blank_rune (&data, w, char_tab_width); + + /* add_blank_rune is only supposed to be called with + sizes guaranteed to fit in the available space. */ + assert (!(*prop)); + + if (prop_width) + { + struct prop_block pb; + *prop = Dynarr_new (prop_block); + + pb.type = PROP_BLANK; + pb.data.p_blank.width = prop_width; + pb.data.p_blank.findex = data.findex; + Dynarr_add (*prop, pb); + + goto done; + } + } + + /* If character is a control character, pass it off to + add_control_char_runes. + + The is_*() routines have undefined results on + arguments outside of the range [-1, 255]. (This + often bites people who carelessly use `char' instead + of `unsigned char'.) + */ + else if (data.ch < 0x100 && iscntrl ((Bufbyte) data.ch)) + { + *prop = add_control_char_runes (&data, b); + + if (*prop) + goto done; + } + + /* If the character is above the ASCII range and we have not + already handled it, then print it as an octal number. */ + else if (data.ch >= 0200) + { + *prop = add_octal_runes (&data); + + if (*prop) + goto done; + } + + /* Assume the current character is considered to be printable, + then just add it. */ + else + { + *prop = add_emchar_rune (&data); + if (*prop) + goto done; + } + + INC_CHARBYTIND (string_data (s), data.bi_bufpos); + } + } + +done: + + /* Determine the starting point of the next line if we did not hit the + end of the buffer. */ + if (data.bi_bufpos < bi_string_zv) + { + /* #### This check is not correct. If the line terminated + due to a begin-glyph or end-glyph hitting window-end, then + data.ch will not point to the character at data.bi_bufpos. If + you make the two changes mentioned at the top of this loop, + you should be able to say '(if (*prop))'. That should also + make it possible to eliminate the data.bi_bufpos < BI_BUF_ZV (b) + check. */ + + /* The common case is that the line ended because we hit a newline. + In that case, the next character is just the next buffer + position. */ + if (data.ch == '\n') + { + INC_CHARBYTIND (string_data (s), data.bi_bufpos); + } + + /* Otherwise we have a buffer line which cannot fit on one display + line. */ + else + { + struct glyph_block gb; + struct glyph_cachel *cachel; + + /* If the line is to be truncated then we actually have to look + for the next newline. We also add the end-of-line glyph which + we know will fit because we adjusted the right border before + we starting laying out the line. */ + data.max_pixpos += end_glyph_width; + data.findex = default_face; + gb.extent = Qnil; + + if (truncate_win) + { + Bytind bi_pos; + + /* Now find the start of the next line. */ + bi_pos = bi_find_next_emchar_in_string (s, '\n', data.bi_bufpos, 1); + + data.cursor_type = NO_CURSOR; + data.bi_bufpos = bi_pos; + gb.glyph = Vtruncation_glyph; + cachel = GLYPH_CACHEL (w, TRUN_GLYPH_INDEX); + } + else + { + /* The cursor can never be on the continuation glyph. */ + data.cursor_type = NO_CURSOR; + + /* data.bi_bufpos is already at the start of the next line. */ + + gb.glyph = Vcontinuation_glyph; + cachel = GLYPH_CACHEL (w, CONT_GLYPH_INDEX); + } + + if (end_glyph_width) + add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 0, cachel); + + if (truncate_win && data.bi_bufpos == bi_string_zv) + { + CONST Bufbyte* endb = charptr_n_addr (string_data (s), bi_string_zv); + DEC_CHARPTR (endb); + if (charptr_emchar (endb) != '\n') + { + /* #### Damn this losing shit. */ + data.bi_bufpos++; + } + } + } + } + else if (data.bi_bufpos == bi_string_zv) + { + /* We need to add a marker to the end of the line since there is no + newline character in order for the cursor to get drawn. We label + it as a newline so that it gets handled correctly by the + whitespace routines below. */ + + data.ch = '\n'; + data.blank_width = DEVMETH (d, eol_cursor_width, ()); + data.findex = default_face; + data.start_col = 0; + data.bi_start_col_enabled = 0; + + data.max_pixpos += data.blank_width; + add_emchar_rune (&data); + data.max_pixpos -= data.blank_width; + + /* #### urk! Chuck, this shit is bad news. Going around + manipulating invalid positions is guaranteed to result in + trouble sooner or later. */ + data.bi_bufpos = bi_string_zv + 1; + } + + /* Calculate left whitespace boundary. */ + { + int elt = 0; + + /* Whitespace past a newline is considered right whitespace. */ + while (elt < Dynarr_length (db->runes)) + { + struct rune *rb = Dynarr_atp (db->runes, elt); + + if ((rb->type == RUNE_CHAR && rb->object.chr.ch == ' ') + || rb->type == RUNE_BLANK) + { + dl->bounds.left_white += rb->width; + elt++; + } + else + elt = Dynarr_length (db->runes); + } + } + + /* Calculate right whitespace boundary. */ + { + int elt = Dynarr_length (db->runes) - 1; + int done = 0; + + while (!done && elt >= 0) + { + struct rune *rb = Dynarr_atp (db->runes, elt); + + if (!(rb->type == RUNE_CHAR && rb->object.chr.ch < 0x100 + && isspace (rb->object.chr.ch)) + && !rb->type == RUNE_BLANK) + { + dl->bounds.right_white = rb->xpos + rb->width; + done = 1; + } + + elt--; + + } + + /* The line is blank so everything is considered to be right + whitespace. */ + if (!done) + dl->bounds.right_white = dl->bounds.left_in; + } + + /* Set the display blocks bounds. */ + db->start_pos = dl->bounds.left_in; + if (Dynarr_length (db->runes)) + { + struct rune *rb = Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1); + + db->end_pos = rb->xpos + rb->width; + } + else + db->end_pos = dl->bounds.right_white; + + /* update line height parameters */ + if (!data.new_ascent && !data.new_descent) + { + /* We've got a blank line so initialize these values from the default + face. */ + default_face_font_info (data.window, &data.new_ascent, + &data.new_descent, 0, 0, 0); + } + + if (data.max_pixmap_height) + { + int height = data.new_ascent + data.new_descent; + int pix_ascent, pix_descent; + + pix_descent = data.max_pixmap_height * data.new_descent / height; + pix_ascent = data.max_pixmap_height - pix_descent; + + data.new_ascent = max (data.new_ascent, pix_ascent); + data.new_descent = max (data.new_descent, pix_descent); + } + + dl->ascent = data.new_ascent; + dl->descent = data.new_descent; + + { + unsigned short ascent = (unsigned short) XINT (w->minimum_line_ascent); + + if (dl->ascent < ascent) + dl->ascent = ascent; + } + { + unsigned short descent = (unsigned short) XINT (w->minimum_line_descent); + + if (dl->descent < descent) + dl->descent = descent; + } + + dl->cursor_elt = data.cursor_x; + /* #### lossage lossage lossage! Fix this shit! */ + if (data.bi_bufpos > bi_string_zv) + dl->end_bufpos = buffer_or_string_bytind_to_bufpos (disp_string, bi_string_zv); + else + dl->end_bufpos = buffer_or_string_bytind_to_bufpos (disp_string, data.bi_bufpos) - 1; + if (truncate_win) + data.dl->num_chars = + string_column_at_point (s, dl->end_bufpos, XINT (b->tab_width)); + else + /* This doesn't correctly take into account tabs and control + characters but if the window isn't being truncated then this + value isn't going to end up being used anyhow. */ + data.dl->num_chars = dl->end_bufpos - dl->bufpos; + + /* #### handle horizontally scrolled line with text none of which + was actually laid out. */ + + /* #### handle any remainder of overlay arrow */ + + if (*prop == ADD_FAILED) + *prop = NULL; + + if (truncate_win && *prop) + { + Dynarr_free (*prop); + *prop = NULL; + } + + extent_fragment_delete (data.ef); + + /* #### If we started at EOB, then make sure we return a value past + it so that regenerate_window will exit properly. This is bogus. + The main loop should get fixed so that it isn't necessary to call + this function if we are already at EOB. */ + + if (data.bi_bufpos == bi_string_zv && bi_start_pos == bi_string_zv) + return bytecount_to_charcount (string_data (s), data.bi_bufpos) + 1; /* Yuck! */ + else + return bytecount_to_charcount (string_data (s), data.bi_bufpos); +} + +/* Given a display line and a starting position, ensure that the + contents of the display line accurately represent the visual + representation of the buffer contents starting from the given + position when displayed in the given window. The display line ends + when the contents of the line reach the right boundary of the given + window. + + This is very similar to generate_display_line but with the same + limitations as create_string_text_block. I have taken the liberty + of fixing the bytind stuff though.*/ + +static Bufpos +generate_string_display_line (struct window *w, Lisp_Object disp_string, + struct display_line *dl, + Bufpos start_pos, + prop_block_dynarr **prop, + face_index default_face) +{ + Bufpos ret_bufpos; + + /* you must set bounds before calling this. */ + + /* Reset what this line is using. */ + if (dl->display_blocks) + Dynarr_reset (dl->display_blocks); + if (dl->left_glyphs) + { + Dynarr_free (dl->left_glyphs); + dl->left_glyphs = 0; + } + if (dl->right_glyphs) + { + Dynarr_free (dl->right_glyphs); + dl->right_glyphs = 0; + } + + /* We aren't generating a modeline at the moment. */ + dl->modeline = 0; + + /* Create a display block for the text region of the line. */ + ret_bufpos = create_string_text_block (w, disp_string, dl, start_pos, + prop, default_face); + dl->bufpos = start_pos; + if (dl->end_bufpos < dl->bufpos) + dl->end_bufpos = dl->bufpos; + + /* If there are left glyphs associated with any character in the + text block, then create a display block to handle them. */ + if (dl->left_glyphs != NULL && Dynarr_length (dl->left_glyphs)) + create_left_glyph_block (w, dl, 0); + + /* If there are right glyphs associated with any character in the + text block, then create a display block to handle them. */ + if (dl->right_glyphs != NULL && Dynarr_length (dl->right_glyphs)) + create_right_glyph_block (w, dl); + + return ret_bufpos; +} + +/* This is ripped off from regenerate_window. All we want to do is + loop through elements in the string creating display lines until we + have covered the provided area. Simple really. */ +void +generate_displayable_area (struct window *w, Lisp_Object disp_string, + int xpos, int ypos, int width, int height, + display_line_dynarr* dla, + Bufpos start_pos, + face_index default_face) +{ + int yend = ypos + height; + Charcount s_zv; + + prop_block_dynarr *prop = 0; + layout_bounds bounds; + assert (dla); + + Dynarr_reset (dla); + /* if there's nothing to do then do nothing. code after this assumes + there is something to do. */ + if (NILP (disp_string)) + return; + + s_zv = XSTRING_CHAR_LENGTH (disp_string) - 1; + + bounds.left_out = xpos; + bounds.right_out = xpos + width; + /* The inner boundaries mark where the glyph margins are located. */ + bounds.left_in = bounds.left_out + window_left_margin_width (w); + bounds.right_in = bounds.right_out - window_right_margin_width (w); + /* We cannot fully calculate the whitespace boundaries as they + depend on the contents of the line being displayed. */ + bounds.left_white = bounds.left_in; + bounds.right_white = bounds.right_in; + + while (ypos < yend) + { + struct display_line dl; + struct display_line *dlp; + Bufpos next_pos; + int local; + + if (Dynarr_length (dla) < Dynarr_largest (dla)) + { + dlp = Dynarr_atp (dla, Dynarr_length (dla)); + local = 0; + } + else + { + + xzero (dl); + dlp = &dl; + local = 1; + } + + dlp->bounds = bounds; + dlp->offset = 0; + next_pos = generate_string_display_line (w, disp_string, dlp, start_pos, + &prop, default_face); + /* we need to make sure that we continue along the line if there + is more left to display otherwise we just end up redisplaying + the same chunk over and over again. */ + if (next_pos == start_pos && next_pos < s_zv) + start_pos++; + else + start_pos = next_pos; + + dlp->ypos = ypos + dlp->ascent; + ypos = dlp->ypos + dlp->descent; + + if (ypos > yend) + { + int visible_height = dlp->ascent + dlp->descent; + + dlp->clip = (ypos - yend); + visible_height -= dlp->clip; + + if (visible_height < VERTICAL_CLIP (w, 1)) + { + if (local) + free_display_line (dlp); + break; + } + } + else + dlp->clip = 0; + + Dynarr_add (dla, *dlp); + + /* #### This type of check needs to be done down in the + generate_display_line call. */ + if (start_pos >= s_zv) + break; + } + + if (prop) + Dynarr_free (prop); +} + + +/***************************************************************************/ +/* */ +/* window-regeneration routines */ +/* */ +/***************************************************************************/ + +/* For a given window and starting position in the buffer it contains, + ensure that the TYPE display lines accurately represent the + presentation of the window. We pass the buffer instead of getting + it from the window since redisplay_window may have temporarily + changed it to the echo area buffer. */ + +static void +regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) +{ + struct frame *f = XFRAME (w->frame); + struct buffer *b = XBUFFER (w->buffer); + int ypos = WINDOW_TEXT_TOP (w); + int yend; /* set farther down */ + + prop_block_dynarr *prop; + layout_bounds bounds; + display_line_dynarr *dla; + int need_modeline; + + /* The lines had better exist by this point. */ + if (!(dla = window_display_lines (w, type))) + abort (); + Dynarr_reset (dla); + w->max_line_len = 0; + + /* Normally these get updated in redisplay_window but it is possible + for this function to get called from some other points where that + update may not have occurred. This acts as a safety check. */ + if (!Dynarr_length (w->face_cachels)) + reset_face_cachels (w); + if (!Dynarr_length (w->glyph_cachels)) + reset_glyph_cachels (w); + + Fset_marker (w->start[type], make_int (start_pos), w->buffer); + Fset_marker (w->pointm[type], make_int (point), w->buffer); + w->last_point_x[type] = -1; + w->last_point_y[type] = -1; + + /* Make sure a modeline is in the structs if needed. */ + need_modeline = ensure_modeline_generated (w, type); + + /* Wait until here to set this so that the structs have a modeline + generated in the case where one didn't exist. */ + yend = WINDOW_TEXT_BOTTOM (w); + + bounds = calculate_display_line_boundaries (w, 0); + + /* 97/3/14 jhod: stuff added here to support pre-prompts (used for input systems) */ + if (MINI_WINDOW_P (w) + && (!NILP (Vminibuf_prompt) || !NILP (Vminibuf_preprompt)) + && !echo_area_active (f) + && start_pos == BUF_BEGV (b)) + { + struct prop_block pb; + Lisp_Object string; + prop = Dynarr_new (prop_block); + + string = concat2(Vminibuf_preprompt, Vminibuf_prompt); + pb.type = PROP_MINIBUF_PROMPT; + pb.data.p_string.str = XSTRING_DATA(string); + pb.data.p_string.len = XSTRING_LENGTH(string); + Dynarr_add (prop, pb); + } + else + prop = 0; + + while (ypos < yend) + { + struct display_line dl; + struct display_line *dlp; + int local; + + if (Dynarr_length (dla) < Dynarr_largest (dla)) + { + dlp = Dynarr_atp (dla, Dynarr_length (dla)); + local = 0; + } + else + { + xzero (dl); dlp = &dl; local = 1; @@ -4997,7 +5868,7 @@ redisplay_window (Lisp_Object window, int skip_selected) } Fset_marker (w->pointm[DESIRED_DISP], make_int (pointm), the_buffer); - /* If the buffer has changed we have to invalid all of our face + /* If the buffer has changed we have to invalidate all of our face cache elements. */ if ((!echo_active && b != window_display_buffer (w)) || !Dynarr_length (w->face_cachels) @@ -5391,6 +6262,7 @@ redisplay_frame (struct frame *f, int preemption_check) being handled. */ update_frame_menubars (f); #endif /* HAVE_MENUBARS */ + update_frame_gutters (f); /* widgets are similar to menus in that they can call lisp to determine activation etc. Therefore update them before we get into redisplay. This is primarily for connected widgets such as @@ -5474,6 +6346,7 @@ redisplay_frame (struct frame *f, int preemption_check) f->modeline_changed = 0; f->point_changed = 0; f->toolbar_changed = 0; + f->gutter_changed = 0; f->windows_changed = 0; f->windows_structure_changed = 0; f->window_face_cache_reset = 0; @@ -5532,7 +6405,8 @@ redisplay_device (struct device *d) f->faces_changed || f->frame_changed || f->menubar_changed || f->modeline_changed || f->point_changed || f->size_changed || f->toolbar_changed || f->windows_changed || f->size_slipped || - f->windows_structure_changed || f->glyphs_changed || f->subwindows_changed) + f->windows_structure_changed || f->glyphs_changed || + f->subwindows_changed || f->gutter_changed) { preempted = redisplay_frame (f, 0); } @@ -5566,7 +6440,7 @@ redisplay_device (struct device *d) f->faces_changed || f->frame_changed || f->menubar_changed || f->modeline_changed || f->point_changed || f->size_changed || f->toolbar_changed || f->windows_changed || - f->windows_structure_changed || + f->windows_structure_changed || f->gutter_changed || f->glyphs_changed || f->subwindows_changed) { preempted = redisplay_frame (f, 0); @@ -5594,6 +6468,7 @@ redisplay_device (struct device *d) d->modeline_changed = 0; d->point_changed = 0; d->toolbar_changed = 0; + d->gutter_changed = 0; d->windows_changed = 0; d->windows_structure_changed = 0; @@ -5635,8 +6510,8 @@ redisplay_without_hooks (void) !menubar_changed && !modeline_changed && !point_changed && !size_changed && !toolbar_changed && !windows_changed && !glyphs_changed && !subwindows_changed && - !windows_structure_changed && !disable_preemption && - preemption_count < max_preempts) + !gutter_changed && !windows_structure_changed && + !disable_preemption && preemption_count < max_preempts) goto done; DEVICE_LOOP_NO_BREAK (devcons, concons) @@ -5648,7 +6523,7 @@ redisplay_without_hooks (void) d->faces_changed || d->frame_changed || d->icon_changed || d->menubar_changed || d->modeline_changed || d->point_changed || d->size_changed || d->toolbar_changed || d->windows_changed || - d->windows_structure_changed || + d->windows_structure_changed || d->gutter_changed || d->glyphs_changed || d->subwindows_changed) { preempted = redisplay_device (d); @@ -5679,6 +6554,7 @@ redisplay_without_hooks (void) modeline_changed = 0; point_changed = 0; toolbar_changed = 0; + gutter_changed = 0; windows_changed = 0; windows_structure_changed = 0; RESET_CHANGED_SET_FLAGS; diff --git a/src/redisplay.h b/src/redisplay.h index aa6f742..57c0004 100644 --- a/src/redisplay.h +++ b/src/redisplay.h @@ -233,6 +233,32 @@ typedef struct Dynarr_declare (glyph_block); } glyph_block_dynarr; +/*************************************************************************/ +/* display lines */ +/*************************************************************************/ + +/* Modeline commentary: IMO the modeline is handled very badly, we + special case virtually *everything* in the redisplay routines for + the modeline. The fact that dl->bufpos can be either a buffer + position or a char count highlights this. There is no abstraction at + all that I can find and it means that the code is made very ugly as + a result. Either we should treat the modeline *entirely* separately, + or we should abstract to something that applies equally well to the + modeline and to buffer text, the things are not enormously different + after all and handling them identically at some level would + eliminate some bugs that still exist (mainly to do with modeline + handling). This problem doesn't help trying to implement gutters + which are somewhere in between buffer text and modeline text. + + Redisplay commentary: Everything in redisplay is tied very tightly + 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 + be functions that know how to display strings with extents and + faces, regardless of buffer etc. After all the window system does + not care. */ + typedef struct display_line display_line; struct display_line { @@ -268,6 +294,10 @@ struct display_line /* Dynamic arrays of left and right glyph blocks */ glyph_block_dynarr *left_glyphs; glyph_block_dynarr *right_glyphs; + + face_index left_margin_findex; + face_index right_margin_findex; + face_index default_findex; }; #define DISPLAY_LINE_HEIGHT(dl) \ @@ -387,6 +417,10 @@ extern int asynch_device_change_pending; extern int toolbar_changed; extern int toolbar_changed_set; +/* non-nil if any gutter has changed */ +extern int gutter_changed; +extern int gutter_changed_set; + /* non-nil if any window has changed since the last time redisplay completed */ extern int windows_changed; @@ -426,6 +460,7 @@ extern int windows_structure_changed; #define MARK_MODELINE_CHANGED MARK_TYPE_CHANGED (modeline) #define MARK_POINT_CHANGED MARK_TYPE_CHANGED (point) #define MARK_TOOLBAR_CHANGED MARK_TYPE_CHANGED (toolbar) +#define MARK_GUTTER_CHANGED MARK_TYPE_CHANGED (gutter) #define MARK_GLYPHS_CHANGED MARK_TYPE_CHANGED (glyphs) #define MARK_SUBWINDOWS_CHANGED MARK_TYPE_CHANGED (subwindows) @@ -441,6 +476,7 @@ extern int windows_structure_changed; modeline_changed_set = 0; \ point_changed_set = 0; \ toolbar_changed_set = 0; \ + gutter_changed_set = 0; \ glyphs_changed_set = 0; \ subwindows_changed_set = 0; \ } while (0) @@ -522,6 +558,10 @@ void free_display_structs (struct window_mirror *mir); Bufbyte *generate_formatted_string (struct window *w, Lisp_Object format_str, Lisp_Object result_str, face_index findex, int type); +void generate_displayable_area (struct window *w, Lisp_Object disp_string, + int xpos, int ypos, int width, int height, + display_line_dynarr* dl, + Bufpos start_pos, face_index default_face); int real_current_modeline_height (struct window *w); int pixel_to_glyph_translation (struct frame *f, int x_coord, int y_coord, int *col, int *row, @@ -565,6 +605,7 @@ void redisplay_output_subwindow (struct window *w, struct display_line *dl, face_index findex, int cursor_start, int cursor_width, int cursor_height); void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, int width, int height); +void redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2); void redisplay_clear_region (Lisp_Object window, face_index findex, int x, int y, int width, int height); void redisplay_clear_bottom_of_window (struct window *w, diff --git a/src/s/cygwin32.h b/src/s/cygwin32.h index 2e2148c..65ee42d 100644 --- a/src/s/cygwin32.h +++ b/src/s/cygwin32.h @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ * YMMV. I build with NT4 SP3. * * Andy Piper 8/1/98 - * http://www.parallax.co.uk/~andyp */ + * http://www.xemacs.freeserve.co.uk/ */ /* cheesy way to determine cygwin version */ #ifndef NOT_C_CODE diff --git a/src/s/linux.h b/src/s/linux.h index 906bab4..8d8d138 100644 --- a/src/s/linux.h +++ b/src/s/linux.h @@ -26,6 +26,12 @@ Boston, MA 02111-1307, USA. */ #define USG #define LINUX +/* powerpc gcc 2.8.0 doesn't define __ELF__, but it is */ + +#if defined(__ELF__) || defined(powerpc) +#define LINUX_ELF +#endif + /* SYSTEM_TYPE should indicate the kind of system you are using. It sets the Lisp variable system-type. */ @@ -81,7 +87,7 @@ Boston, MA 02111-1307, USA. */ /* Ask GCC where to find libgcc.a. */ #define LIB_GCC "`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`" -#ifndef __ELF__ +#ifndef LINUX_ELF /* Linux has crt0.o in a non-standard place */ #define START_FILES "pre-crt0.o /usr/lib/crt0.o" #else @@ -106,7 +112,7 @@ Boston, MA 02111-1307, USA. */ /* Best not to include -lg, unless it is last on the command line */ #define LIBS_DEBUG #define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/ -#ifndef __ELF__ +#ifndef LINUX_ELF #define LIB_STANDARD "-lc" /* avoid -lPW */ #else /*#undef LIB_GCC @@ -124,7 +130,7 @@ Boston, MA 02111-1307, USA. */ #define LIBS_SYSTEM #endif -#ifdef __ELF__ +#ifdef LINUX_ELF #define UNEXEC "unexelf.o" #define UNEXEC_USE_MAP_PRIVATE #if 0 @@ -142,7 +148,7 @@ Boston, MA 02111-1307, USA. */ #undef START_FILES #undef LIB_GCC #endif -#endif /* __ELF__ */ +#endif /* LINUX_ELF */ #ifdef LINUX_QMAGIC diff --git a/src/scrollbar.c b/src/scrollbar.c index 7717903..39855c8 100644 --- a/src/scrollbar.c +++ b/src/scrollbar.c @@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */ #include "device.h" #include "frame.h" #include "glyphs.h" +#include "gutter.h" #include "window.h" Lisp_Object Qinit_scrollbar_from_resources; @@ -452,23 +453,41 @@ update_scrollbar_instance (struct window *w, int vertical, { int x_offset, y_offset; - /* Scrollbars are always the farthest from the text area. */ + /* Scrollbars are always the farthest from the text area, barring + gutters. */ if (vertical) { - x_offset = (!NILP (w->scrollbar_on_left_p) - ? WINDOW_LEFT (w) - : (WINDOW_RIGHT (w) - scrollbar_width - - (window_needs_vertical_divider (w) - ? window_divider_width (w) : 0))); + if (!NILP (w->scrollbar_on_left_p)) + { + x_offset = WINDOW_LEFT (w); + if (window_is_leftmost (w)) + x_offset += FRAME_LEFT_GUTTER_BOUNDS (f); + } + else + { + x_offset = WINDOW_RIGHT (w) - scrollbar_width; + if (window_is_rightmost (w)) + x_offset -= FRAME_RIGHT_GUTTER_BOUNDS (f); + if (window_needs_vertical_divider (w)) + x_offset -= window_divider_width (w); + } y_offset = WINDOW_TEXT_TOP (w) + f->scrollbar_y_offset; } else { x_offset = WINDOW_TEXT_LEFT (w); - y_offset = f->scrollbar_y_offset + - (!NILP (w->scrollbar_on_top_p) - ? WINDOW_TOP (w) - : WINDOW_TEXT_BOTTOM (w) + window_bottom_toolbar_height (w)); + y_offset = f->scrollbar_y_offset; + + if (!NILP (w->scrollbar_on_top_p)) + { + y_offset += WINDOW_TOP (w); + if (window_is_highest (w)) + y_offset += FRAME_TOP_GUTTER_BOUNDS (f); + } + else + { + y_offset += WINDOW_TEXT_BOTTOM (w); + } } new_x = x_offset; diff --git a/src/search.c b/src/search.c index 051fded..445bd87 100644 --- a/src/search.c +++ b/src/search.c @@ -700,6 +700,50 @@ find_next_newline (struct buffer *buf, Bufpos from, int count) return scan_buffer (buf, '\n', from, 0, count, 0, 1); } +Bytind +bi_find_next_emchar_in_string (struct Lisp_String* str, Emchar target, Bytind st, + EMACS_INT count) +{ + /* This function has been Mule-ized. */ + Bytind lim = string_length (str) -1; + Bufbyte* s = string_data (str); + + assert (count >= 0); + +#ifdef MULE + /* Due to the Mule representation of characters in a buffer, + we can simply search for characters in the range 0 - 127 + directly. For other characters, we do it the "hard" way. + Note that this way works for all characters but the other + way is faster. */ + if (target >= 0200) + { + while (st < lim && count > 0) + { + if (string_char (str, st) == target) + count--; + INC_CHARBYTIND (s, st); + } + } + else +#endif + { + while (st < lim && count > 0) + { + Bufbyte *bufptr = (Bufbyte *) memchr (charptr_n_addr (s, st), + (int) target, lim - st); + if (bufptr) + { + count--; + st = (Bytind)(bufptr - s) + 1; + } + else + st = lim; + } + } + return st; +} + /* Like find_next_newline, but returns position before the newline, not after, and only search up to TO. This isn't just find_next_newline (...)-1, because you might hit TO. */ diff --git a/src/sheap.c b/src/sheap.c index 977addc..e2c848c 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -21,7 +21,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include #include #include "lisp.h" -#include #include #include diff --git a/src/specifier.c b/src/specifier.c index d1da5f5..6c5942a 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -347,7 +347,7 @@ sizeof_specifier (CONST void *header) DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier, mark_specifier, print_specifier, finalize_specifier, - specifier_equal, specifier_hash, + specifier_equal, specifier_hash, 0, sizeof_specifier, struct Lisp_Specifier); diff --git a/src/symbols.c b/src/symbols.c index 01bf684..9b3192d 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -108,9 +108,13 @@ mark_symbol (Lisp_Object obj, void (*markobj) (Lisp_Object)) } } +static const struct lrecord_description symbol_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Symbol, next), 5 } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("symbol", symbol, mark_symbol, print_symbol, 0, 0, 0, - struct Lisp_Symbol); + symbol_description, struct Lisp_Symbol); /**********************************************************************/ @@ -952,28 +956,46 @@ print_symbol_value_magic (Lisp_Object obj, write_c_string (buf, printcharfun); } +static const struct lrecord_description symbol_value_buffer_local_description[] = { + { XD_LISP_OBJECT, offsetof(struct symbol_value_buffer_local, default_value), 4 }, + { XD_END } +}; + +static const struct lrecord_description symbol_value_lisp_magic_description[] = { + { XD_LISP_OBJECT, offsetof(struct symbol_value_lisp_magic, handler), 2*MAGIC_HANDLER_MAX+1 }, + { XD_END } +}; + +static const struct lrecord_description symbol_value_varalias_description[] = { + { XD_LISP_OBJECT, offsetof(struct symbol_value_varalias, aliasee), 2 }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-forward", symbol_value_forward, this_one_is_unmarkable, - print_symbol_value_magic, 0, 0, 0, + print_symbol_value_magic, 0, 0, 0, 0, struct symbol_value_forward); DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-buffer-local", symbol_value_buffer_local, mark_symbol_value_buffer_local, print_symbol_value_magic, 0, 0, 0, + symbol_value_buffer_local_description, struct symbol_value_buffer_local); DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-lisp-magic", symbol_value_lisp_magic, mark_symbol_value_lisp_magic, print_symbol_value_magic, 0, 0, 0, + symbol_value_lisp_magic_description, struct symbol_value_lisp_magic); DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-varalias", symbol_value_varalias, mark_symbol_value_varalias, print_symbol_value_magic, 0, 0, 0, + symbol_value_varalias_description, struct symbol_value_varalias); diff --git a/src/symeval.h b/src/symeval.h index 8aff8d2..7aa5c48 100644 --- a/src/symeval.h +++ b/src/symeval.h @@ -293,7 +293,7 @@ void deferror (Lisp_Object *symbol, CONST char *name, void defvar_magic (CONST char *symbol_name, CONST struct symbol_value_forward *magic); -#define symbol_value_forward_lheader_initializer { 1, { 0, 0, 0 } } +#define symbol_value_forward_lheader_initializer { 1, 0, 0, 0 } #define DEFVAR_SYMVAL_FWD(lname, c_location, forward_type, magicfun) do { \ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ diff --git a/src/symsinit.h b/src/symsinit.h index 542980f..1e0136a 100644 --- a/src/symsinit.h +++ b/src/symsinit.h @@ -97,6 +97,7 @@ void syms_of_glyphs_mswindows (void); void syms_of_glyphs (void); void syms_of_gui_x (void); void syms_of_gui (void); +void syms_of_gutter (void); void syms_of_indent (void); void syms_of_intl (void); void syms_of_keymap (void); @@ -182,6 +183,7 @@ void console_type_create_select_mswindows (void); void specifier_type_create (void); void specifier_type_create_image (void); +void specifier_type_create_gutter (void); void specifier_type_create_objects (void); void specifier_type_create_toolbar (void); @@ -200,6 +202,7 @@ void image_instantiator_format_create_glyphs_eimage (void); void image_instantiator_format_create_glyphs_widget (void); void image_instantiator_format_create_glyphs_x (void); void image_instantiator_format_create_glyphs_mswindows (void); +void image_instantiator_format_create_glyphs_tty (void); /* Initialize the lstream types (dump-time only). */ @@ -272,6 +275,7 @@ void vars_of_glyphs_mswindows (void); void vars_of_glyphs (void); void vars_of_gui_x (void); void vars_of_gui (void); +void vars_of_gutter (void); void vars_of_input_method_motif (void); void vars_of_input_method_xlib (void); void vars_of_indent (void); @@ -326,6 +330,7 @@ void vars_of_eldap (void); /* Initialize specifier variables (dump-time only). */ void specifier_vars_of_glyphs (void); +void specifier_vars_of_gutter (void); void specifier_vars_of_menubar (void); void specifier_vars_of_redisplay (void); void specifier_vars_of_scrollbar (void); diff --git a/src/syntax.c b/src/syntax.c index 82a8034..4fdc4be 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -53,6 +53,7 @@ Sextword is a word-constituent but a word boundary may exist between two such characters. */ /* Mule 2.4 doesn't seem to have Sextword - I'm removing it -- mrb */ +/* Recovered by tomo */ Lisp_Object Qsyntax_table_p; @@ -326,7 +327,17 @@ syntax table. } - +#ifdef MULE +/* Return 1 if there is a word boundary between two word-constituent + characters C1 and C2 if they appear in this order, else return 0. + There is no word boundary between two word-constituent ASCII + characters. */ +#define WORD_BOUNDARY_P(c1, c2) \ + (!(CHAR_ASCII_P (c1) && CHAR_ASCII_P (c2)) \ + && word_boundary_p (c1, c2)) + +extern int word_boundary_p (Emchar c1, Emchar c2); +#else static int word_constituent_p (struct buffer *buf, Bufpos pos, struct Lisp_Char_Table *tab) @@ -336,6 +347,7 @@ word_constituent_p (struct buffer *buf, Bufpos pos, (code == Sescape || code == Scharquote)) || (code == Sword)); } +#endif /* Return the position across COUNT words from FROM. If that many words cannot be found before the end of the buffer, return 0. @@ -346,6 +358,11 @@ scan_words (struct buffer *buf, Bufpos from, int count) { Bufpos limit = count > 0 ? BUF_ZV (buf) : BUF_BEGV (buf); struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table); +#ifdef MULE + Emchar ch0, ch1; + enum syntaxcode code; +#endif + while (count > 0) { QUIT; @@ -354,15 +371,40 @@ scan_words (struct buffer *buf, Bufpos from, int count) { if (from == limit) return 0; +#ifdef MULE + ch0 = BUF_FETCH_CHAR (buf, from); + code = SYNTAX_UNSAFE (mirrortab, ch0); +#else if (word_constituent_p (buf, from, mirrortab)) break; +#endif from++; +#ifdef MULE + if (words_include_escapes + && (code == Sescape || code == Scharquote)) + break; + if (code == Sword) + break; +#endif } QUIT; - while ((from != limit) && word_constituent_p (buf, from, mirrortab)) + while ((from != limit) +#ifndef MULE + && word_constituent_p (buf, from, mirrortab) +#endif + ) { +#ifdef MULE + ch1 = BUF_FETCH_CHAR (buf, from); + code = SYNTAX_UNSAFE (mirrortab, ch1); + if (!(words_include_escapes + && (code == Sescape || code == Scharquote))) + if (code != Sword || WORD_BOUNDARY_P (ch0, ch1)) + break; + ch0 = ch1; +#endif from++; } count--; @@ -376,15 +418,39 @@ scan_words (struct buffer *buf, Bufpos from, int count) { if (from == limit) return 0; +#ifndef MULE if (word_constituent_p (buf, from - 1, mirrortab)) break; +#endif from--; +#ifdef MULE + ch1 = BUF_FETCH_CHAR (buf, from - 1); + code = SYNTAX_UNSAFE (mirrortab, ch1); + if (words_include_escapes + && (code == Sescape || code == Scharquote)) + break; + if (code == Sword) + break; +#endif } QUIT; - while ((from != limit) && word_constituent_p (buf, from - 1, mirrortab)) + while ((from != limit) +#ifndef MULE + && word_constituent_p (buf, from - 1, mirrortab) +#endif + ) { +#ifdef MULE + ch0 = BUF_FETCH_CHAR (buf, from - 1); + code = SYNTAX_UNSAFE (mirrortab, ch0); + if (!(words_include_escapes + && (code == Sescape || code == Scharquote))) + if (code != Sword || WORD_BOUNDARY_P (ch0, ch1)) + break; + ch1 = ch0; +#endif from--; } count++; diff --git a/src/sysdep.c b/src/sysdep.c index 0dc66fa..398eaca 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -50,7 +50,6 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" -#include #include /* ------------------------------- */ diff --git a/src/toolbar.c b/src/toolbar.c index 64ff6ed..db2c69e 100644 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -90,7 +90,7 @@ print_toolbar_button (Lisp_Object obj, Lisp_Object printcharfun, DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button, mark_toolbar_button, print_toolbar_button, - 0, 0, 0, + 0, 0, 0, 0, struct toolbar_button); DEFUN ("toolbar-button-p", Ftoolbar_button_p, 1, 1, 0, /* diff --git a/src/tooltalk.c b/src/tooltalk.c index a7e0ed9..3f24b2e 100644 --- a/src/tooltalk.c +++ b/src/tooltalk.c @@ -175,7 +175,7 @@ print_tooltalk_message (Lisp_Object obj, Lisp_Object printcharfun, DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message, mark_tooltalk_message, print_tooltalk_message, - 0, 0, 0, + 0, 0, 0, 0, struct Lisp_Tooltalk_Message); static Lisp_Object @@ -249,7 +249,7 @@ print_tooltalk_pattern (Lisp_Object obj, Lisp_Object printcharfun, DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern, mark_tooltalk_pattern, print_tooltalk_pattern, - 0, 0, 0, + 0, 0, 0, 0, struct Lisp_Tooltalk_Pattern); static Lisp_Object @@ -1256,7 +1256,28 @@ init_tooltalk (void) Lisp_Object lp; Lisp_Object fil; + + /* tt_open() messes with our signal handler flags (at least when no + ttsessions is running on the machine), therefore we save the + actions and restore them after the call */ +#ifdef HAVE_SIGPROCMASK + { + struct sigaction ActSIGQUIT; + struct sigaction ActSIGINT; + struct sigaction ActSIGCHLD; + sigaction (SIGQUIT, NULL, &ActSIGQUIT); + sigaction (SIGINT, NULL, &ActSIGINT); + sigaction (SIGCHLD, NULL, &ActSIGCHLD); +#endif retval = tt_open (); +#ifdef HAVE_SIGPROCMASK + sigaction (SIGQUIT, &ActSIGQUIT, NULL); + sigaction (SIGINT, &ActSIGINT, NULL); + sigaction (SIGCHLD, &ActSIGCHLD, NULL); + } +#endif + + if (tt_ptr_error (retval) != TT_OK) return; diff --git a/src/window.c b/src/window.c index 53de996..85a196b 100644 --- a/src/window.c +++ b/src/window.c @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ #include "window.h" #include "elhash.h" #include "commands.h" +#include "gutter.h" Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configurationp; Lisp_Object Qscroll_up, Qscroll_down, Qdisplay_buffer; @@ -231,7 +232,7 @@ finalize_window (void *header, int for_disksave) DEFINE_LRECORD_IMPLEMENTATION ("window", window, mark_window, print_window, finalize_window, - 0, 0, struct window); + 0, 0, 0, struct window); #define INIT_DISP_VARIABLE(field, initialization) \ @@ -641,7 +642,7 @@ window_full_width_p (struct window *w) return window_is_leftmost (w) && window_is_rightmost (w); } -static int +int window_is_highest (struct window *w) { Lisp_Object parent, current_ancestor, window; @@ -669,7 +670,7 @@ window_is_highest (struct window *w) return 0; } -static int +int window_is_lowest (struct window *w) { Lisp_Object parent, current_ancestor, window; @@ -972,32 +973,6 @@ window_right_margin_width (struct window *w) return margin_width_internal (w, 0); } -static int -window_top_toolbar_height (struct window *w) -{ - /* #### implement this shit. */ - return 0; -} - -/* #### Currently used in scrollbar.c. Does it actually need to be? */ -int -window_bottom_toolbar_height (struct window *w) -{ - return 0; -} - -static int -window_left_toolbar_width (struct window *w) -{ - return 0; -} - -static int -window_right_toolbar_width (struct window *w) -{ - return 0; -} - /***************************************************************************** Window Gutters @@ -1019,47 +994,45 @@ window_right_toolbar_width (struct window *w) int window_top_gutter_height (struct window *w) { - int toolbar_height = window_top_toolbar_height (w); + int gutter = WINDOW_REAL_TOP_GUTTER_BOUNDS (w); if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; #ifdef HAVE_SCROLLBARS if (!NILP (w->scrollbar_on_top_p)) - return window_scrollbar_height (w) + toolbar_height; + return window_scrollbar_height (w) + gutter; else #endif - return toolbar_height; + return gutter; } int window_bottom_gutter_height (struct window *w) { - int other_height; + int gutter = WINDOW_REAL_BOTTOM_GUTTER_BOUNDS (w); if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; - else - other_height = - window_modeline_height (w) + window_bottom_toolbar_height (w); + + gutter += window_modeline_height (w); #ifdef HAVE_SCROLLBARS if (NILP (w->scrollbar_on_top_p)) - return window_scrollbar_height (w) + other_height; + return window_scrollbar_height (w) + gutter; else #endif - return other_height; + return gutter; } int window_left_gutter_width (struct window *w, int modeline) { - int gutter = window_left_toolbar_width (w); + int gutter = WINDOW_REAL_LEFT_GUTTER_BOUNDS (w); if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; - #ifdef HAVE_SCROLLBARS if (!modeline && !NILP (w->scrollbar_on_left_p)) gutter += window_scrollbar_width (w); @@ -1071,7 +1044,7 @@ window_left_gutter_width (struct window *w, int modeline) int window_right_gutter_width (struct window *w, int modeline) { - int gutter = window_right_toolbar_width (w); + int gutter = WINDOW_REAL_RIGHT_GUTTER_BOUNDS (w); if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; @@ -3926,6 +3899,8 @@ change_window_height (struct window *win, int delta, int widthflag, SET_LAST_MODIFIED (w, 0); SET_LAST_FACECHANGE (w); MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); + /* overkill maybe, but better to be correct */ + MARK_FRAME_GUTTERS_CHANGED (f); } #undef MINSIZE #undef CURBEG @@ -4711,7 +4686,7 @@ DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("window-configuration", window_configuration, mark_window_config, print_window_config, - 0, 0, 0, sizeof_window_config, + 0, 0, 0, 0, sizeof_window_config, struct window_config); diff --git a/src/window.h b/src/window.h index 5bcfea6..342ad44 100644 --- a/src/window.h +++ b/src/window.h @@ -329,6 +329,8 @@ int window_char_height (struct window *, int include_gutters_p); int window_displayed_height (struct window *); int window_is_leftmost (struct window *w); int window_is_rightmost (struct window *w); +int window_is_lowest (struct window *w); +int window_is_highest (struct window *w); int window_truncation_on (struct window *w); int window_needs_vertical_divider (struct window *); int window_scrollbar_width (struct window *w); @@ -340,7 +342,6 @@ int window_top_gutter_height (struct window *w); int window_bottom_gutter_height (struct window *w); int window_left_gutter_width (struct window *w, int modeline); int window_right_gutter_width (struct window *w, int modeline); -int window_bottom_toolbar_height (struct window *w); void delete_all_subwindows (struct window *w); void set_window_pixheight (Lisp_Object window, int pixheight, diff --git a/src/winslots.h b/src/winslots.h index b09aef3..95d74b5 100644 --- a/src/winslots.h +++ b/src/winslots.h @@ -97,6 +97,29 @@ Boston, MA 02111-1307, USA. */ WINDOW_SLOT (default_toolbar_visible_p, EQ); WINDOW_SLOT (default_toolbar_border_width, EQ); #endif /* HAVE_TOOLBARS */ + + /* Gutter specification for each of the four positions. + This is not a size hog because the value here is not copied, + and will be shared with the specs in the specifier. */ + WINDOW_SLOT_ARRAY (gutter, 4, EQUAL_WRAPPED); + /* Gutter size for each of the four positions. */ + WINDOW_SLOT_ARRAY (gutter_size, 4, EQUAL_WRAPPED); + /* Real (pre-calculated) gutter size for each of the four positions. + This is not a specifier, it is calculated by the specifier change + functions. */ + WINDOW_SLOT_ARRAY (real_gutter_size, 4, EQUAL_WRAPPED); + /* Gutter border width for each of the four positions. */ + WINDOW_SLOT_ARRAY (gutter_border_width, 4, EQUAL_WRAPPED); + /* Gutter visibility status for each of the four positions. */ + WINDOW_SLOT_ARRAY (gutter_visible_p, 4, EQUAL_WRAPPED); + /* The following five don't really need to be cached except + that we need to know when they've changed. */ + WINDOW_SLOT (default_gutter, EQUAL_WRAPPED); + WINDOW_SLOT (default_gutter_width, EQ); + WINDOW_SLOT (default_gutter_height, EQ); + WINDOW_SLOT (default_gutter_visible_p, EQ); + WINDOW_SLOT (default_gutter_border_width, EQ); +/* margins */ WINDOW_SLOT (left_margin_width, EQ); WINDOW_SLOT (right_margin_width, EQ); WINDOW_SLOT (minimum_line_ascent, EQ); diff --git a/tests/ChangeLog b/tests/ChangeLog index 080e89a..e055147 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,15 @@ +1999-07-30 XEmacs Build Bot + + * XEmacs 21.2.19 is released + +1999-07-13 XEmacs Build Bot + + * XEmacs 21.2.18 is released + +1999-06-22 XEmacs Build Bot + + * XEmacs 21.2.17 is released + 1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released diff --git a/tests/automated/base64-tests.el b/tests/automated/base64-tests.el deleted file mode 100644 index 3c11ec2..0000000 --- a/tests/automated/base64-tests.el +++ /dev/null @@ -1,248 +0,0 @@ -;; Copyright (C) 1999 Free Software Foundation, Inc. - -;; Author: Hrvoje Niksic -;; Maintainer: Hrvoje Niksic -;; Created: 1999 -;; Keywords: tests - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: Not in FSF. - -;;; Commentary: - -;; Test base64 functions. -;; See test-harness.el for instructions on how to run these tests. - -(eval-when-compile - (condition-case nil - (require 'test-harness) - (file-error - (push "." load-path) - (when (and (boundp 'load-file-name) (stringp load-file-name)) - (push (file-name-directory load-file-name) load-path)) - (require 'test-harness)))) - -;; We need to test the buffer and string functions. We do it by -;; testing them in various circumstances, asserting the same result, -;; and returning that result. - -(defvar bt-test-buffer (get-buffer-create " *base64-workhorse*")) - -(defun bt-base64-encode-string (string &optional no-line-break) - (let ((string-result (base64-encode-string string no-line-break)) - length) - (with-current-buffer bt-test-buffer - ;; the whole buffer - (erase-buffer) - (insert string) - (setq length (base64-encode-region (point-min) (point-max) no-line-break)) - (Assert (eq length (- (point-max) (point-min)))) - (Assert (equal (buffer-string) string-result)) - ;; partial - (erase-buffer) - (insert "random junk........\0\0';'eqwrkw[erpqf") - (let ((p1 (point)) p2) - (insert string) - (setq p2 (point-marker)) - (insert "...more random junk.q,f3/.qrm314.r,m2typ' 2436T@W$^@$#^T@") - (setq length (base64-encode-region p1 p2 no-line-break)) - (Assert (eq length (- p2 p1))) - (Assert (equal (buffer-substring p1 p2) string-result)))) - string-result)) - -(defun bt-base64-decode-string (string) - (let ((string-result (base64-decode-string string)) - length) - (with-current-buffer bt-test-buffer - ;; the whole buffer - (erase-buffer) - (insert string) - (setq length (base64-decode-region (point-min) (point-max))) - (cond (string-result - (Assert (eq length (- (point-max) (point-min)))) - (Assert (equal (buffer-string) string-result))) - (t - (Assert (null length)) - ;; The buffer should not have been modified. - (Assert (equal (buffer-string) string)))) - ;; partial - (erase-buffer) - (insert "random junk........\0\0';'eqwrkw[erpqf") - (let ((p1 (point)) p2) - (insert string) - (setq p2 (point-marker)) - (insert "...more random junk.q,f3/.qrm314.\0\0r,m2typ' 2436T@W$^@$#T@") - (setq length (base64-decode-region p1 p2)) - (cond (string-result - (Assert (eq length (- p2 p1))) - (Assert (equal (buffer-substring p1 p2) string-result))) - (t - (Assert (null length)) - ;; The buffer should not have been modified. - (Assert (equal (buffer-substring p1 p2) string)))))) - string-result)) - -(defun bt-remove-newlines (str) - (apply #'string (delete ?\n (mapcar #'identity str)))) - -(defconst bt-allchars - (let ((str (make-string 256 ?\0))) - (dotimes (i 256) - (aset str i (int-char i))) - str)) - -(defconst bt-test-strings - `(("" "") - ("foo" "Zm9v") - ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" - "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAx -MjM0NTY3ODk=") - (,bt-allchars - "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1 -Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWpr -bG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6Ch -oqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX -2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==") - )) - -;;----------------------------------------------------- -;; Encoding base64 -;;----------------------------------------------------- - -(loop for (raw encoded) in bt-test-strings do - (Assert (equal (bt-base64-encode-string raw) encoded)) - ;; test the NO-LINE-BREAK flag - (Assert (equal (bt-base64-encode-string raw t) (bt-remove-newlines encoded)))) - -;; When Mule is around, Lisp programmers should make sure that the -;; buffer contains only characters whose `char-int' is in the [0, 256) -;; range. If this condition is not satisfied for any character, an -;; error is signaled. -(when (featurep 'mule) - ;; #### remove subtraction of 128 -- no longer needed with make-char - ;; patch! - (let* ((mule-string (format "Hrvoje Nik%ci%c" - ;; scaron == 185 in Latin 2 - (make-char 'latin-iso8859-2 (- 185 128)) - ;; cacute == 230 in Latin 2 - (make-char 'latin-iso8859-2 (- 230 128))))) - (Check-Error-Message error "Non-ascii character in base64 input" - (bt-base64-encode-string mule-string)))) - -;;----------------------------------------------------- -;; Decoding base64 -;;----------------------------------------------------- - -(loop for (raw encoded) in bt-test-strings do - (Assert (equal (bt-base64-decode-string encoded) raw)) - (Assert (equal (bt-base64-decode-string (bt-remove-newlines encoded)) raw))) - -;; Test errors -(dolist (str `("foo" "AAC" "foo\0bar" "====" "Zm=9v" ,bt-allchars)) - (Check-Error error (base64-decode-string str))) - -;; base64-decode-string should ignore non-base64 characters anywhere -;; in the string. We test this in the cheesiest manner possible, by -;; inserting non-base64 chars at the beginning, at the end, and in the -;; middle of the string. - -(defconst bt-base64-chars '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J - ;; sometimes I hate Emacs indentation. - ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T - ?U ?V ?W ?X ?Y ?Z ?a ?b ?c ?d - ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n - ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x - ?y ?z ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 - ?8 ?9 ?+ ?/ ?=)) - -(defconst bt-nonbase64-chars (set-difference (mapcar #'identity bt-allchars) - bt-base64-chars)) - -(when nil - ;; This code crashes XEmacs! This requires further investigation. - ;; I'm running Linux, and for me, XEmacs crashes in - ;; Fmapconcat()->mapcar1(), after a GC that thrashes the stack. - ;; Raymond Toy reports a similar crash under Solaris. - (loop for (raw encoded) in bt-test-strings do - (unless (equal raw "") - (let* ((middlepos (/ (1+ (length encoded)) 2)) - (left (substring encoded 0 middlepos)) - (right (substring encoded middlepos))) - ;; Whitespace at the beginning, end, and middle. - (let ((mangled (concat bt-nonbase64-chars left bt-nonbase64-chars right - bt-nonbase64-chars))) - (Assert (equal (bt-base64-decode-string mangled) raw))) - - ;; Whitespace between every char. - (let ((mangled (concat bt-nonbase64-chars - ;; ENCODED with bt-nonbase64-chars - ;; between every character. - (mapconcat #'char-to-string encoded - (apply #'string bt-nonbase64-chars)) - bt-nonbase64-chars))) - (Assert (equal (bt-base64-decode-string mangled) raw)))))) - ) - -;;----------------------------------------------------- -;; Mixed... -;;----------------------------------------------------- - -;; The whole point of base64 is to ensure that an arbitrary sequence -;; of bytes passes through gateway hellfire unscathed, protected by -;; the asbestos suit of base64. Here we test that -;; (base64-decode-string (base64-decode-string FOO)) equals FOO for -;; any FOO we can think of. The following stunts stress-test -;; practically all aspects of the encoding and decoding process. - -(loop for (raw ignored) in bt-test-strings do - (Assert (equal (bt-base64-decode-string - (bt-base64-encode-string raw)) - raw)) - (Assert (equal (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-encode-string - (bt-base64-encode-string raw)))) - raw)) - (Assert (equal (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-encode-string - (bt-base64-encode-string - (bt-base64-encode-string raw)))))) - raw)) - (Assert (equal (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-encode-string - (bt-base64-encode-string - (bt-base64-encode-string - (bt-base64-encode-string raw)))))))) - raw)) - (Assert (equal (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-decode-string - (bt-base64-encode-string - (bt-base64-encode-string - (bt-base64-encode-string - (bt-base64-encode-string - (bt-base64-encode-string raw)))))))))) - raw))) diff --git a/tests/glyph-test.el b/tests/glyph-test.el index d0aaf9a..511bbc8 100644 --- a/tests/glyph-test.el +++ b/tests/glyph-test.el @@ -1,10 +1,12 @@ +(setq str "Hello There") (set-extent-begin-glyph - (make-extent (point) (point)) - (setq icon (make-glyph [xpm :file "../etc/xemacs-icon.xpm"]))) + (make-extent 0 0 str) + (make-glyph [xpm :file "../etc/xemacs-icon.xpm"])) (defun foo () (interactive) - (setq ok-select (not ok-select))) + (ding)) +; (setq ok-select (not ok-select))) ;; button in a group (setq ok-select nil) @@ -17,20 +19,56 @@ (make-extent (point) (point)) (make-glyph [button :descriptor ["ok" (setq ok-select nil) :style radio :selected (not ok-select)]])) +;; toggle button +(set-extent-begin-glyph + (make-extent (point) (point)) + (setq tbutton + (make-glyph [button :descriptor ["ok" (setq ok-select nil) + :style toggle + :selected (not ok-select)]]))) +(set-extent-begin-glyph + (make-extent (point) (point)) + (make-glyph [button :descriptor ["ok" :style toggle + :callback + (setq ok-select (not ok-select)) + :selected ok-select]])) + ;; normal pushbutton (set-extent-begin-glyph (make-extent (point) (point)) (setq pbutton (make-glyph - [button :width 10 :height 2 + [button :width 10 :height 2 :face modeline-mousable :descriptor "ok" :callback foo :selected t]))) +;; tree view +(set-extent-begin-glyph + (make-extent (point) (point)) + (setq tree (make-glyph + [tree-view :width 10 + :descriptor "My Tree" + :properties (:items (["One" foo] + (["Two" foo] + ["Four" foo] + "Six") + "Three"))]))) + +;; tab control +(set-extent-begin-glyph + (make-extent (point) (point)) + (setq tab (make-glyph + [tab-control :descriptor "My Tab" + :face default + :properties (:items (["One" foo] + ["Two" foo] + ["Three" foo]))]))) + ;; progress gauge (set-extent-begin-glyph (make-extent (point) (point)) (setq pgauge (make-glyph - [progress :width 10 :height 2 - :descriptor "ok"]))) + [progress-gauge :width 10 :height 2 + :descriptor "ok"]))) ;; progress the progress ... (let ((x 0)) (while (<= x 100) @@ -42,8 +80,8 @@ (setq global-mode-string (cons (make-extent nil nil) (setq pg (make-glyph - [progress :width 5 :pixel-height 16 - :descriptor "ok"])))) + [progress-gauge :width 5 :pixel-height 16 + :descriptor "ok"])))) ;; progress the progress ... (let ((x 0)) (while (<= x 100) @@ -63,18 +101,19 @@ (set-extent-begin-glyph (make-extent (point) (point)) (make-glyph [button :descriptor ["A Big Button" foo ]])) + ;; edit box (set-extent-begin-glyph (make-extent (point) (point)) - (setq hedit (make-glyph [edit :pixel-width 50 :pixel-height 30 - :face bold-italic - :descriptor ["Hello"]]))) + (setq hedit (make-glyph [edit-field :pixel-width 50 :pixel-height 30 + :face bold-italic + :descriptor ["Hello"]]))) ;; combo box (set-extent-begin-glyph (make-extent (point) (point)) (setq hcombo (make-glyph - [combo :width 10 :height 3 :descriptor ["Hello"] - :properties (:items ("One" "Two" "Three"))]))) + [combo-box :width 10 :height 3 :descriptor ["Hello"] + :properties (:items ("One" "Two" "Three"))]))) ;; line (set-extent-begin-glyph @@ -87,6 +126,6 @@ ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]])) ;; generic subwindow -(setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 50])) +(setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70])) (set-extent-begin-glyph (make-extent (point) (point)) sw) diff --git a/version.sh b/version.sh index 6c03494..761f565 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=16 -xemacs_codename="Sumida" +emacs_beta_version=19 +xemacs_codename="Shinjuku" infodock_major_version=4 infodock_minor_version=0 -infodock_build_version=7 +infodock_build_version=8 -- 1.7.10.4