From 096307f5ab2ee53e50d94562e1eadb6966fcaa40 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 4 Jun 2008 16:08:23 +0000 Subject: [PATCH] Sync up with r21-4-21. --- ChangeLog | 161 +- PROBLEMS | 10 + configure | 1947 ++++--- configure.in | 183 +- etc/ETAGS.ChangeLog | 849 +++ etc/ETAGS.EBNF | 114 + etc/ETAGS.README | 49 + etc/NEWS | 44 +- etc/OXYMORONS | 22 +- etc/PACKAGES | 11 +- etc/TUTORIAL.cs | 1043 ++++ etc/TUTORIAL.sl | 1031 ++++ etc/package-index.LATEST.gpg | 1254 +++-- lib-src/ChangeLog | 40 + lib-src/etags.c | 5175 ++++++++++------- lib-src/gnuclient.c | 23 +- lib-src/gnuslib.c | 12 +- lib-src/installexe.sh | 11 +- lib-src/pop.c | 283 +- lib-src/pop.h | 12 +- lisp/ChangeLog | 222 + lisp/about.el | 105 +- lisp/auto-autoloads.el | 4 +- lisp/buffer.el | 7 +- lisp/cmdloop.el | 3 +- lisp/code-process.el | 12 +- lisp/derived.el | 20 +- lisp/easymenu.el | 79 +- lisp/find-paths.el | 28 +- lisp/finder.el | 2 +- lisp/font-lock.el | 220 +- lisp/font.el | 10 +- lisp/gutter-items.el | 6 +- lisp/help.el | 2 +- lisp/info.el | 14 +- lisp/minibuf.el | 5 +- lisp/obsolete.el | 3 + lisp/package-get.el | 117 +- lisp/package-ui.el | 23 +- lisp/simple.el | 5 +- lisp/startup.el | 59 +- lisp/window-xemacs.el | 4 + lwlib/ChangeLog | 47 + lwlib/lwlib-Xaw.c | 13 +- lwlib/lwlib-Xlw.c | 30 +- lwlib/xlwgauge.c | 13 +- lwlib/xlwgauge.h | 12 +- lwlib/xlwmenu.c | 4 +- man/ChangeLog | 84 +- man/custom.texi | 4 +- man/lispref/extents.texi | 2 +- man/lispref/faces.texi | 12 +- man/lispref/glyphs.texi | 2814 ++++++---- man/lispref/lispref.texi | 64 +- man/lispref/mule.texi | 306 +- man/lispref/os.texi | 4 +- man/lispref/searching.texi | 13 + man/new-users-guide/edit.texi | 22 +- man/xemacs-faq.texi |11836 ++++++++++++++++++++++----------------- modules/ldap/eldap.c | 7 + netinstall/ChangeLog | 16 + nt/ChangeLog | 60 + nt/XEmacs.iss | 420 ++ nt/config.inc.samp | 3 +- nt/xemacs.mak | 43 +- src/ChangeLog | 294 + src/EmacsShell-sub.c | 17 +- src/buffer.c | 13 +- src/bytecode.c | 3 +- src/callproc.c | 18 +- src/chartab.c | 38 +- src/config.h.in | 10 + src/console-tty.h | 5 + src/console.c | 4 +- src/database.c | 10 +- src/depend | 3 +- src/device-x.c | 6 +- src/dgif_lib.c | 6 +- src/dialog-msw.c | 4 +- src/dialog-x.c | 2 +- src/dumper.c | 7 +- src/editfns.c | 11 +- src/emacs.c | 2 +- src/event-Xt.c | 9 +- src/extents.c | 7 +- src/fileio.c | 82 + src/fns.c | 124 +- src/glyphs-eimage.c | 42 +- src/glyphs-gtk.c | 6 +- src/glyphs-msw.c | 6 +- src/glyphs-widget.c | 8 +- src/input-method-xlib.c | 11 +- src/keymap.c | 2 + src/linuxplay.c | 9 +- src/md5.c | 2 +- src/mule-ccl.c | 51 +- src/nas.c | 2 +- src/nt.c | 18 +- src/objects-gtk.c | 4 +- src/objects-x.c | 2 +- src/postgresql.c | 4 +- src/postgresql.h | 4 +- src/process-unix.c | 44 +- src/redisplay-gtk.c | 4 +- src/redisplay-msw.c | 4 +- src/redisplay-output.c | 4 +- src/redisplay-tty.c | 17 +- src/redisplay-x.c | 4 +- src/regex.c | 6 +- src/s/sol2.h | 2 +- src/scrollbar-gtk.c | 14 +- src/scrollbar-msw.c | 6 +- src/scrollbar-x.c | 22 +- src/select-x.c | 33 +- src/sound.c | 4 +- src/sysdir.h | 6 +- src/sysdll.c | 16 +- src/sysfile.h | 14 +- src/unexelf.c | 2 +- tests/ChangeLog | 42 + tests/automated/mule-tests.el | 53 +- tests/automated/syntax-tests.el | 39 + tests/automated/tag-tests.el | 9 +- tests/automated/test-harness.el | 62 +- version.sh | 4 +- 125 files changed, 19853 insertions(+), 10457 deletions(-) create mode 100644 etc/ETAGS.ChangeLog create mode 100644 etc/ETAGS.EBNF create mode 100644 etc/ETAGS.README create mode 100644 etc/TUTORIAL.cs create mode 100644 etc/TUTORIAL.sl create mode 100644 nt/XEmacs.iss diff --git a/ChangeLog b/ChangeLog index 68a9cbf..94a38b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -106,6 +106,129 @@ * configure.in: Add new option `--with-utf-2000'; define `UTF2000' if it is specified. +2007-10-07 Vin Shelton + + * XEmacs 21.4.21 is released + +2007-08-18 Vin Shelton + + * modules/ldap/eldap.c: Declare that we use deprecated API. + Thanks to Mats Lidell for the report & patch: + <871wgnqunm.fsf@spencer.lidell.homelinux.net>. + +2006-12-09 Vin Shelton + + * XEmacs 21.4.20 is released + +2006-12-07 Vin Shelton + + * configure.in: Find relocated xpm library under cygwin. + Patch lifted from Rick Rankin's 21.5 version of the patch. + +2006-05-17 Stephen J. Turnbull + + * PROBLEMS: X11R7 loses x11/bitmaps/gray. + +2006-01-28 Vin Shelton + + * configure.in: Simplify cygwin include and nox/Xpm handling. + As of cygwin-1.5.19, 'gcc -print-file-name=libc.a' (effectively) + returns '/lib' instead of '/usr/lib', so we'll use + 'gcc -print-search-dirs' instead. + +2006-01-28 Vin Shelton + + * XEmacs 21.4.19 is released + +2006-01-28 Vin Shelton + + * etc/package-index.LATEST.gpg: Updated with latest package data. + +2005-12-18 Ilya N. Golubev + + Merge from 21.5. + * configure.in: Fixed `LDAP_OPT_ON' libraries configuration + introduced in local 2005-03-13 change of `configure.in'. However, + do not check for internal `-lber' `ber_pvt_opt_on' symbol as done + in upstream. This symbol is not part of any published interface, + it may exist or not exist, depending on openldap version. Cryptic + comment before using it in upstream 21.5 source did not state + precisely under which circumstances checking for it was useful, + which sort of user code tried to link the symbol. So in local + 21.5 dismissed both the code and the comment without writing a + cleaner equivalent. + * etc/NEWS: Document. + +2005-12-13 Vin Shelton + + * etc/package-index.LATEST.gpg: Updated with latest package data. + +2005-12-04 Vin Shelton + + * etc/OXYMORONS: insert 'Social Property' for 21.4.18. + * etc/NEWS: document motif deprecation and defaulting + --with-widgets to off. + +2005-12-04 Ville Skyttä + * etc/PACKAGES: Fix description of xetla. + +2005-12-03 Vin Shelton + + * XEmacs 21.4.18 is released + +2005-12-01 Vin Shelton + + * etc/TUTORIAL.cs: copied from 21.5. + * etc/TUTORIAL.sl: copied from 21.5. + +2005-11-29 Ilya Golubev + + * configure.in: Merge revision 1.19 change: fix ldap libraries + configuration lossage when `-lldap -llber' links and but `-lldap' + does not; allow `ldap_libs' to be empty or overridden by builder. + The lossage was introduced in upstream revision 1.151.2.31 + (2005/01/31 02:54:47 vins) by (extremely hasty and unwise) merge + of revision 1.232 change. + * etc/NEWS: Document it. + +2005-03-12 Aidan Kehoe + + * configure.in (XE_COMPUTE_RUNPATH): Check XtRegisterDrawable + availability. + +2005-04-11 Norbert Koch + + * etc/PACKAGES: etc/PACKAGES: Announce re-builder, xetla. + +2005-11-15 Dr. Volker Zell + + * configure.in: Avoid using Motif also for cygwin + +2005-11-15 Dr. Volker Zell + + * configure.in: Check for u_int*_t typedefs and use them in + Berkeley DB detection. + +2005-04-11 Norbert Koch + + * etc/PACKAGES: etc/PACKAGES: Announce re-builder, xetla. + +2005-03-23 Vin Shelton + + * configure.in: Remove -fno-gnu-linker option from Solaris + dynodump builds; it doesn't do anything. + + Don't use 'head -1' - it's deprecated by coreutils-5.3.0 on some + platforms. + +2005-02-19 Norbert Koch + + * etc/PACKAGES: Announce latin-euro-standards, update mule-base. + +2005-02-12 Vin Shelton + + * etc/OXYMORONS: New list. + 2005-02-06 Vin Shelton * XEmacs 21.4.17 is released @@ -227,10 +350,10 @@ 2004-01-25 Steve Youngs * etc/package-index.LATEST.gpg: New, replaces - `package-index.LATEST.pgp'. + `package-index.LATEST.pgp'. * etc/package-index.LATEST.pgp: Removed, replaced with - `package-index.LATEST.gpg'. + `package-index.LATEST.gpg'. 2004-01-20 Jerry James @@ -326,7 +449,7 @@ 2003-07-03 Stephen J. Turnbull - * etc/README.HYPERBOLE: + * etc/README.HYPERBOLE: * etc/README.OO-BROWSER: Update. @@ -358,7 +481,7 @@ 2003-03-20 Stephen J. Turnbull - * configure.in (INTPTR_T_IN_CYGWIN_TYPES_H): + * configure.in (INTPTR_T_IN_CYGWIN_TYPES_H): Cygwin defines these types in . Detect and don't duplicate the definition. @@ -397,7 +520,7 @@ gcc changed the name of the `-mthreads' option to `-pthread' on 2000-06-12. - Be more careful when appending "_r" to various names of xlc, + Be more careful when appending "_r" to various names of xlc, so that users can specify --compiler=/absolute/path/to/xlc 2003-01-27 Martin Buchholz @@ -407,7 +530,7 @@ 2003-01-27 Martin Buchholz - * configure.in (athena_3d): + * configure.in (athena_3d): AC_CHECK_LIB must always take a function as argument, never a global variable. Some linkers can tell the difference. So change: @@ -446,7 +569,7 @@ 2003-01-05 Rick Rankin - * configure.in: Add -lkernel32 to the list of system libraries + * configure.in: Add -lkernel32 to the list of system libraries linked under Cygwin. Needed for IsBadReadPtr(). 2003-01-03 Stephen J. Turnbull @@ -455,8 +578,8 @@ 2003-01-02 Stephen J. Turnbull - * configure.in (Generate Installation): - * configure.usage (--use-union-type): + * configure.in (Generate Installation): + * configure.usage (--use-union-type): * PROBLEMS (XEmacs crashes mysteriously): Deprecate --use-union-type for production builds. @@ -491,7 +614,7 @@ 2002-10-31 John Paul Wallington - * info/dir (File): button1 on a highlighted word doesn't + * info/dir (File): button1 on a highlighted word doesn't follow that cross-reference. 2002-11-11 Stephen J. Turnbull @@ -522,7 +645,7 @@ 2002-10-23 Stephen J. Turnbull * Makefile.in.in (lisp/auto-autoloads.el): - (lisp/custom-load.el): + (lisp/custom-load.el): Use -no-autoloads for these targets; can't load 'em if they ain't. 2002-10-18 Stephen J. Turnbull @@ -559,7 +682,7 @@ * configure.in (Check for POSIX functions): New section head. getaddrinfo is detected on HP-UX 11.XX, but appears to be non-functional. Disable it. Based on work by Darryl Okahata. - + 2002-09-27 Stephen J. Turnbull * PROBLEMS (Running, General): Missing charset in FontSet warnings. @@ -680,7 +803,7 @@ * configure.in: Detect MacOS/X "Darwin". Thanks to Greg Parker . - + 2002-03-30 Steve Youngs * etc/package-index.LATEST.pgp: Update to current reality. @@ -701,7 +824,7 @@ 2001-12-13 William M. Perry * configure.in (GTK): add -Wno-shadow. - + 2002-02-04 Stephen J. Turnbull * etc/BETA: Synch to 21.5. @@ -787,8 +910,8 @@ * configure.usage (--with-dragndrop): added GTK to list of protocols * configure.usage (--mail-locking): added `locking' or `mmdf'. to list of options - - + + 2001-09-25 Didier Verna * configure.ac: new. Autoconf 2.5x guard. @@ -882,7 +1005,7 @@ 2001-05-04 Martin Buchholz - * configure.in (opsys): + * configure.in (opsys): Use lower-case `uname -s` as the default value for opsys. The previous code effectively did the non-sensical opsys=$canonical because [] magically disappear in configure.in. @@ -988,14 +1111,14 @@ * etc/OXYMORONS: Add 2 oxymorons, clean up numbering, close RFC. * etc/NEWS: Fix typo. - + * configure.in: * configure: Fix typo, add -Wsign-compare if GCC, run autoconf. 2001-03-23 Stephen J. Turnbull - * etc/gnuserv.1 (UNIX_DOMAIN_SOCKETS: + * etc/gnuserv.1 (UNIX_DOMAIN_SOCKETS: * PROBLEMS (Problems with running XEmacs): Document TMPDIR lossage in gnuserv/gnuclient. diff --git a/PROBLEMS b/PROBLEMS index 93f8825..7abb978 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -44,6 +44,16 @@ General advice: Much general information is in INSTALL. If it's covered in INSTALL, we don't repeat it here. +*** X11/bitmaps/gray (or other X11-related file) not found. + +The X11R6 distribution was monolithic, but the X11R7 distribution is +much more modular. Many OS distributions omit these bitmaps (assuming +nobody uses them, evidently). Your OS distribution should have a +developer's package containing these files, probably with a name +containing the string "bitmap". Known package names (you may need to +add an extension such as .deb or .rpm) include x11/xbitmaps (Ubuntu) +and xorg-x11-xbitmaps (Fedora Core 5). + *** How do I configure to get the buffer tabs/progress bars? These features depend on support for "native widgets". Use the diff --git a/configure b/configure index 8ea7848..ba3a32f 100755 --- a/configure +++ b/configure @@ -2735,9 +2735,9 @@ test "$extra_verbose" = "yes" && \ for var in libs_machine libs_system libs_termcap libs_standard objects_machine objects_system c_switch_machine c_switch_system ld_switch_machine ld_switch_system unexec ld_switch_shared ld lib_gcc ld_text_start_addr start_files ordinary_link have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo "" case "$opsys" in mingw* | cygwin*) - cygwin_include=`eval "gcc -print-file-name=libc.a"` ; - cygwin_include=`eval "dirname $cygwin_include"` ; - cygwin_include="-I$cygwin_include/../include" ; + cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'` + cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"` + cygwin_include="-I$cygwin_include/include" ; extra_includes="$cygwin_include/mingw $cygwin_include" ; case "$opsys" in mingw*) c_switch_system="$c_switch_system $extra_includes" && if test "$extra_verbose" = "yes"; then echo " Appending \"$extra_includes\" to \$c_switch_system"; fi ;; @@ -2990,7 +2990,6 @@ EOF *86* ) dynodump_arch=i386 ;; powerpc ) dynodump_arch=ppc ;; esac - test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" && if test "$extra_verbose" = "yes"; then echo " Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi fi @@ -3007,12 +3006,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:3011: checking for terminateAndUnload in -lC" >&5 +echo "configure:3010: 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:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3131,7 +3130,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:3135: checking "for runtime libraries flag"" >&5 +echo "configure:3134: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -3153,14 +3152,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:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -3261,10 +3260,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:3265: checking for malloc_set_state" >&5 +echo "configure:3264: 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:3290: \"$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 @@ -3307,16 +3306,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:3311: checking whether __after_morecore_hook exists" >&5 +echo "configure:3310: 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:3319: \"$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 @@ -3372,7 +3371,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:3376: checking for $ac_word" >&5 +echo "configure:3375: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3427,7 +3426,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:3431: checking for a BSD compatible install" >&5 +echo "configure:3430: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3481,7 +3480,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:3485: checking for $ac_word" >&5 +echo "configure:3484: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3513,15 +3512,15 @@ for ac_hdr in a.out.h elf.h cygwin/version.h fcntl.h inttypes.h libg do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3517: checking for $ac_hdr" >&5 +echo "configure:3516: 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:3525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3551,10 +3550,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3555: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3554: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3570,7 +3569,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3594,10 +3593,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3598: checking for ANSI C header files" >&5 +echo "configure:3597: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3605,7 +3604,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3608: \"$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* @@ -3622,7 +3621,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 @@ -3640,7 +3639,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 @@ -3658,7 +3657,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') @@ -3669,7 +3668,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3695,10 +3694,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3699: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3698: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3707,7 +3706,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3731,10 +3730,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3735: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3734: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3746,7 +3745,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3772,9 +3771,9 @@ fi echo $ac_n "checking for utime""... $ac_c" 1>&6 -echo "configure:3776: checking for utime" >&5 +echo "configure:3775: checking for utime" >&5 cat > conftest.$ac_ext < #include @@ -3782,7 +3781,7 @@ int main() { struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x); ; return 0; } EOF -if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3785: \"$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 @@ -3801,10 +3800,10 @@ else for ac_func in utimes do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3805: checking for $ac_func" >&5 +echo "configure:3804: 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:3830: \"$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 @@ -3859,10 +3858,10 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3863: checking return type of signal handlers" >&5 +echo "configure:3862: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3879,7 +3878,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3901,10 +3900,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3905: checking for size_t" >&5 +echo "configure:3904: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3935,10 +3934,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3939: checking for pid_t" >&5 +echo "configure:3938: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3969,10 +3968,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3973: checking for uid_t in sys/types.h" >&5 +echo "configure:3972: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -4008,10 +4007,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4012: checking for mode_t" >&5 +echo "configure:4011: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4042,10 +4041,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4046: checking for off_t" >&5 +echo "configure:4045: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4076,10 +4075,10 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:4080: checking for ssize_t" >&5 +echo "configure:4079: checking for ssize_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4111,9 +4110,9 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:4115: checking for socklen_t" >&5 +echo "configure:4114: checking for socklen_t" >&5 cat > conftest.$ac_ext < #include @@ -4123,7 +4122,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -4132,7 +4131,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < #include @@ -4142,7 +4141,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""size_t" 1>&6 @@ -4174,9 +4173,9 @@ fi rm -f conftest* echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:4178: checking for struct timeval" >&5 +echo "configure:4177: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -4192,7 +4191,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:4196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -4214,10 +4213,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:4218: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4217: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -4225,7 +4224,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4249,10 +4248,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:4253: checking for tm_zone in struct tm" >&5 +echo "configure:4252: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -4260,7 +4259,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -4283,10 +4282,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:4287: checking for tzname" >&5 +echo "configure:4286: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -4296,7 +4295,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4322,10 +4321,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4326: checking for working const" >&5 +echo "configure:4325: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4399,7 +4398,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4403: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4402: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4424,12 +4423,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4428: checking whether byte ordering is bigendian" >&5 +echo "configure:4427: 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 @@ -4440,11 +4439,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4443: \"$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 @@ -4455,7 +4454,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4472,7 +4471,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:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4512,12 +4511,13 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4516: checking size of short" >&5 +echo "configure:4515: checking size of short" >&5 cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -4560,6 +4560,7 @@ cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -4568,7 +4569,7 @@ main() exit(0); } EOF -if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4590,12 +4591,13 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4594: checking size of long" >&5 +echo "configure:4595: checking size of long" >&5 cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -4604,7 +4606,7 @@ main() exit(0); } EOF -if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4626,12 +4628,13 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4630: checking size of long long" >&5 +echo "configure:4632: checking size of long long" >&5 cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -4640,7 +4643,7 @@ main() exit(0); } EOF -if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4647: \"$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 @@ -4662,12 +4665,13 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4666: checking size of void *" >&5 +echo "configure:4669: checking size of void *" >&5 cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -4676,7 +4680,7 @@ main() exit(0); } EOF -if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4684: \"$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 @@ -4700,7 +4704,7 @@ EOF case $opsys in cygwin* ) cat > conftest.$ac_ext < EOF @@ -4725,7 +4729,7 @@ rm -f conftest* esac echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4729: checking for long file names" >&5 +echo "configure:4733: 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: @@ -4771,10 +4775,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4775: checking for sin" >&5 +echo "configure:4779: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4805: \"$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 @@ -4815,12 +4819,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4819: checking for sin in -lm" >&5 +echo "configure:4823: 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:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4875,14 +4879,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:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4890: \"$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 @@ -4899,14 +4903,14 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4903: checking type of mail spool file locking" >&5 +echo "configure:4907: checking type of mail spool file locking" >&5 for ac_func in lockf flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4907: checking for $ac_func" >&5 +echo "configure:4911: 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:4937: \"$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 @@ -5011,12 +5015,12 @@ test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:5015: checking for cma_open in -lpthreads" >&5 +echo "configure:5019: 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:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5064,7 +5068,7 @@ esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:5068: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:5072: 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; @@ -5076,7 +5080,7 @@ fi if test "$opsys" = "sol2"; then if test "$os_release" -ge 506; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:5080: checking for \"-z ignore\" linker flag" >&5 +echo "configure:5084: 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 ;; @@ -5087,7 +5091,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:5091: checking "for specified window system"" >&5 +echo "configure:5095: checking "for specified window system"" >&5 GNOME_CONFIG=no @@ -5095,7 +5099,7 @@ GTK_CONFIG=no if test "$with_gnome" != "no"; then echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6 -echo "configure:5099: checking for GNOME configuration script" >&5 +echo "configure:5103: checking for GNOME configuration script" >&5 for possible in gnome-config do possible_version=`${possible} --version 2> /dev/null` @@ -5126,7 +5130,7 @@ fi if test "$with_gtk" != "no";then echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6 -echo "configure:5130: checking for GTK configuration script" >&5 +echo "configure:5134: checking for GTK configuration script" >&5 for possible in gtk12-config gtk14-config gtk-config do possible_version=`${possible} --version 2> /dev/null` @@ -5148,18 +5152,18 @@ fi if test "${GTK_CONFIG}" != "no"; then echo $ac_n "checking gtk version""... $ac_c" 1>&6 -echo "configure:5152: checking gtk version" >&5 +echo "configure:5156: checking gtk version" >&5 GTK_VERSION=`${GTK_CONFIG} --version` echo "$ac_t""${GTK_VERSION}" 1>&6 echo $ac_n "checking gtk libs""... $ac_c" 1>&6 -echo "configure:5157: checking gtk libs" >&5 +echo "configure:5161: checking gtk libs" >&5 GTK_LIBS=`${GTK_CONFIG} --libs` libs_gtk="$libs_gtk ${GTK_LIBS}" && if test "$extra_verbose" = "yes"; then echo " Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi echo "$ac_t""${GTK_LIBS}" 1>&6 echo $ac_n "checking gtk cflags""... $ac_c" 1>&6 -echo "configure:5163: checking gtk cflags" >&5 +echo "configure:5167: checking gtk cflags" >&5 GTK_CFLAGS=`${GTK_CONFIG} --cflags` if test "$GCC" = "yes"; then GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow" @@ -5169,19 +5173,19 @@ echo "configure:5163: checking gtk cflags" >&5 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6 -echo "configure:5173: checking for main in -lgdk_imlib" >&5 +echo "configure:5177: checking for main in -lgdk_imlib" >&5 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdk_imlib " 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 @@ -5203,12 +5207,12 @@ fi echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6 -echo "configure:5207: checking for Imlib_init in -lImlib" >&5 +echo "configure:5211: checking for Imlib_init in -lImlib" >&5 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'` xe_check_libs=" -lImlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5242,10 +5246,10 @@ fi for ac_func in gdk_imlib_init do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5246: checking for $ac_func" >&5 +echo "configure:5250: 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:5276: \"$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 @@ -5347,15 +5351,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5351: checking for $ac_hdr" >&5 +echo "configure:5355: 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:5359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5363: \"$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* @@ -5386,19 +5390,19 @@ done echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6 -echo "configure:5390: checking for main in -lxml" >&5 +echo "configure:5394: checking for main in -lxml" >&5 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lxml " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5420,19 +5424,19 @@ fi echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6 -echo "configure:5424: checking for main in -lglade" >&5 +echo "configure:5428: checking for main in -lglade" >&5 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lglade " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5454,19 +5458,19 @@ fi echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6 -echo "configure:5458: checking for main in -lglade-gnome" >&5 +echo "configure:5462: checking for main in -lglade-gnome" >&5 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lglade-gnome " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5487,7 +5491,7 @@ fi cat > conftest.$ac_ext < EOF @@ -5546,7 +5550,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:5550: checking for X" >&5 +echo "configure:5554: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5606,12 +5610,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:5615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5619: \"$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* @@ -5680,14 +5684,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:5695: \"$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. @@ -5796,17 +5800,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:5800: checking whether -R must be followed by a space" >&5 +echo "configure:5804: 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:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -5822,14 +5826,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:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -5865,12 +5869,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5869: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5873: 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:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5905,12 +5909,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:5909: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5913: 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:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5950,10 +5954,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:5954: checking for gethostbyname" >&5 +echo "configure:5958: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5984: \"$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 @@ -5997,12 +6001,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:6001: checking for gethostbyname in -lnsl" >&5 +echo "configure:6005: 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:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6043,10 +6047,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:6047: checking for connect" >&5 +echo "configure:6051: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6077: \"$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 @@ -6092,12 +6096,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:6096: checking "$xe_msg_checking"" >&5 +echo "configure:6100: 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:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6132,10 +6136,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:6136: checking for remove" >&5 +echo "configure:6140: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6166: \"$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 @@ -6179,12 +6183,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:6183: checking for remove in -lposix" >&5 +echo "configure:6187: 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:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6219,10 +6223,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:6223: checking for shmat" >&5 +echo "configure:6227: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6253: \"$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 @@ -6266,12 +6270,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:6270: checking for shmat in -lipc" >&5 +echo "configure:6274: 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:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6318,12 +6322,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:6322: checking "$xe_msg_checking"" >&5 +echo "configure:6326: 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:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6380,15 +6384,15 @@ EOF ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:6384: checking for Xm/Xm.h" >&5 +echo "configure:6388: 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:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6396: \"$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* @@ -6405,12 +6409,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:6409: checking for XmStringFree in -lXm" >&5 +echo "configure:6413: 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:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6573,7 +6577,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:6577: checking for X defines extracted by xmkmf" >&5 +echo "configure:6581: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -6622,15 +6626,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:6626: checking for X11/Intrinsic.h" >&5 +echo "configure:6630: 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:6634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6638: \"$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* @@ -6654,12 +6658,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:6658: checking for XOpenDisplay in -lX11" >&5 +echo "configure:6662: 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:6678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6695,12 +6699,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:6699: checking "$xe_msg_checking"" >&5 +echo "configure:6703: 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:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6738,12 +6742,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:6742: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:6746: 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:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6777,12 +6781,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:6781: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:6785: 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:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6816,14 +6820,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:6820: checking the version of X11 being used" >&5 +echo "configure:6824: 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:6827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -6851,13 +6855,13 @@ EOF esac fi - for ac_func in XConvertCase + for ac_func in XConvertCase XtRegisterDrawable do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6858: checking for $ac_func" >&5 +echo "configure:6862: 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:6888: \"$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 @@ -6912,15 +6916,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6916: checking for $ac_hdr" >&5 +echo "configure:6920: 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:6924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6928: \"$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* @@ -6953,10 +6957,10 @@ done for ac_func in XRegisterIMInstantiateCallback do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6957: checking for $ac_func" >&5 +echo "configure:6961: 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:6987: \"$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 @@ -7007,9 +7011,9 @@ fi done echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6 -echo "configure:7011: checking for standard XRegisterIMInstantiateCallback prototype" >&5 +echo "configure:7015: checking for standard XRegisterIMInstantiateCallback prototype" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -7042,12 +7046,12 @@ rm -f conftest* test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:7046: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:7050: 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:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7097,19 +7101,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:7101: checking for main in -lXbsd" >&5 +echo "configure:7105: 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:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7133,7 +7137,7 @@ fi if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then if test "$GCC" = "yes"; then echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6 -echo "configure:7137: checking for name of AIX gcc threads option" >&5 +echo "configure:7141: checking for name of AIX gcc threads option" >&5 case `$CC -v --help 2>&1` in *-mthreads*) aix_threads=-mthreads ;; *) aix_threads=-pthread ;; @@ -7147,12 +7151,13 @@ echo "configure:7137: checking for name of AIX gcc threads option" >&5 xe_save_CC="$CC" CC="${CC}_r" echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:7151: checking size of short" >&5 +echo "configure:7155: checking size of short" >&5 cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -7161,7 +7166,7 @@ main() exit(0); } EOF -if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -7190,22 +7195,22 @@ EOF fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:7194: checking for MS-Windows" >&5 +echo "configure:7199: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:7197: checking for main in -lgdi32" >&5 +echo "configure:7202: 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:7214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7278,12 +7283,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:7287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MSG_SELECT @@ -7347,15 +7352,15 @@ fi if test "$with_x11" = "yes"; then ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6 -echo "configure:7351: checking for X11/extensions/shape.h" >&5 +echo "configure:7356: checking for X11/extensions/shape.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7364: \"$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* @@ -7407,7 +7412,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:7411: checking for WM_COMMAND option" >&5; +echo "configure:7416: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -7422,15 +7427,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:7426: checking for X11/Xauth.h" >&5 +echo "configure:7431: 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:7434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7439: \"$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* @@ -7453,12 +7458,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:7457: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:7462: 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:7478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7514,15 +7519,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:7518: checking for ${dir}tt_c.h" >&5 +echo "configure:7523: 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:7526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7531: \"$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* @@ -7558,12 +7563,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:7562: checking "$xe_msg_checking"" >&5 +echo "configure:7567: 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:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7631,15 +7636,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:7635: checking for Dt/Dt.h" >&5 +echo "configure:7640: 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:7643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7648: \"$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* @@ -7662,12 +7667,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:7666: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:7671: 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:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7751,7 +7756,7 @@ fi if test "$with_dragndrop" != "no" ; then echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:7755: checking if drag and drop API is needed" >&5 +echo "configure:7760: checking if drag and drop API is needed" >&5 if test -n "$dragndrop_proto" ; then with_dragndrop=yes echo "$ac_t""yes (${dragndrop_proto} )" 1>&6 @@ -7771,18 +7776,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:7775: checking for LDAP" >&5 +echo "configure:7780: 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:7778: checking for ldap.h" >&5 +echo "configure:7783: 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:7786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7791: \"$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* @@ -7805,15 +7810,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:7809: checking for lber.h" >&5 +echo "configure:7814: 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:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7822: \"$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* @@ -7834,26 +7839,73 @@ else with_ldap=no fi } -if test "$with_ldap" != "no"; then - -echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:7841: checking for ldap_search in -lldap" >&5 -ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` +if test no != "$with_ldap";then + if test . != "${ldap_libs+.}";then + ldap_libs= + echo $ac_n "checking for ldap_open""... $ac_c" 1>&6 +echo "configure:7847: checking for ldap_open" >&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 ldap_open(); + +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_ldap_open) || defined (__stub___ldap_open) +choke me +#else +ldap_open(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_ldap_open=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_ldap_open=no" +fi +rm -f conftest* + +if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then + echo "$ac_t""yes" 1>&6 + with_ldap=yes + test yes = "$extra_verbose" && + echo "Setting ldap_libs to $ldap_libs" +else + echo "$ac_t""no" 1>&6 + +echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6 +echo "configure:7893: checking for ldap_open in -lldap" >&5 +ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7870,19 +7922,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then with_ldap=yes else echo "$ac_t""no" 1>&6 -fi - - - test "$with_ldap" != "yes" && { +ldap_needs_lber=yes ldap_other_libs=-llber + xe_msg_checking="for ldap_open in -lldap" -test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" +test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7881: checking "$xe_msg_checking"" >&5 +echo "configure:7931: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` -xe_check_libs=" -lldap -llber" +xe_check_libs=" -lldap $ldap_other_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7907,22 +7957,20 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_ldap=yes with_ldap_lber=yes + with_ldap=yes else echo "$ac_t""no" 1>&6 -fi - - } - test "$with_ldap" != "yes" && { +ldap_needs_krb=yes ldap_other_libs="$ldap_other_libs -lkrb" + xe_msg_checking="for ldap_open in -lldap" -test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" +test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7921: checking "$xe_msg_checking"" >&5 +echo "configure:7969: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` -xe_check_libs=" -lldap -llber -lkrb" +xe_check_libs=" -lldap $ldap_other_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7947,22 +7995,20 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes + with_ldap=yes else echo "$ac_t""no" 1>&6 -fi - - } - test "$with_ldap" != "yes" && { +ldap_needs_des=yes ldap_other_libs="$ldap_other_libs -ldes" + 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" +test -n "$ldap_other_libs" && xe_msg_checking="$xe_msg_checking using extra libs $ldap_other_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7961: checking "$xe_msg_checking"" >&5 +echo "configure:8007: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` -xe_check_libs=" -lldap -llber -lkrb -ldes" +xe_check_libs=" -lldap $ldap_other_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7987,50 +8033,184 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes with_ldap_des=yes + with_ldap=yes else echo "$ac_t""no" 1>&6 +with_ldap=no fi - } - test "$with_ldap_lber" != "yes" && { -echo $ac_n "checking for ber_pvt_opt_on in -llber""... $ac_c" 1>&6 -echo "configure:7999: checking for ber_pvt_opt_on in -llber" >&5 -ac_lib_var=`echo lber'_'ber_pvt_opt_on | sed 'y%./+-%__p_%'` -xe_check_libs=" -llber " +fi + + +fi + + +fi + + + if test yes = "$with_ldap" -a yes != "$ldap_needs_lber";then + echo $ac_n "checking for LDAP_OPT_ON definition""... $ac_c" 1>&6 +echo "configure:8055: checking for LDAP_OPT_ON definition" >&5 + cat > conftest.$ac_ext < +#include +#ifdef LDAP_OPT_ON +/* Relying on const defined by ac_c_const (upper case). */ +const void *const v = LDAP_OPT_ON; +#else /* !defined (LDAP_OPT_ON) */ +choke me +#endif /* !defined (LDAP_OPT_ON) */ +int main() { + +; return 0; } +EOF +if { (eval echo configure:8072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + xe_cv_have_LDAP_OPT_ON=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + xe_cv_have_LDAP_OPT_ON=no +fi +rm -f conftest* + +echo "$ac_t""$xe_cv_have_LDAP_OPT_ON" 1>&6 + if test yes = "$xe_cv_have_LDAP_OPT_ON";then + echo $ac_n "checking LDAP_OPT_ON linking""... $ac_c" 1>&6 +echo "configure:8086: checking LDAP_OPT_ON linking" >&5 + +xe_save_LIBS="$LIBS" + LIBS="-lldap $LIBS" +cat > conftest.$ac_ext < +#include +const void *const v = LDAP_OPT_ON; +int main() { + +; return 0; } +EOF +if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + xe_cv_LDAP_OPT_ON_links=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + xe_cv_LDAP_OPT_ON_links=no +fi +rm -f conftest* + LIBS="$xe_save_LIBS" + +echo "$ac_t""$xe_cv_LDAP_OPT_ON_links" 1>&6 + if test yes != "$xe_cv_LDAP_OPT_ON_links";then + ldap_needs_lber=yes ldap_other_libs=-llber + echo $ac_n "checking LDAP_OPT_ON linking with -llber""... $ac_c" 1>&6 +echo "configure:8116: checking LDAP_OPT_ON linking with -llber" >&5 + +xe_save_LIBS="$LIBS" + LIBS="-lldap $ldap_other_libs $LIBS" +cat > conftest.$ac_ext < +#include +const void *const v = LDAP_OPT_ON; +int main() { + +; return 0; } +EOF +if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + xe_cv_LDAP_OPT_ON_links_w_lber=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + xe_cv_LDAP_OPT_ON_links_w_lber=no +fi +rm -f conftest* + LIBS="$xe_save_LIBS" + +echo "$ac_t""$xe_cv_LDAP_OPT_ON_links_w_lber" 1>&6 + if test yes != "$xe_cv_LDAP_OPT_ON_links_w_lber";then + with_ldap=no + fi + fi + fi + fi + if test yes = "$with_ldap";then + if test yes = "$ldap_needs_des";then + ldap_libs="-ldes $ldap_libs" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldes\" to \$ldap_libs"; fi + fi + if test yes = "$ldap_needs_krb";then + ldap_libs="-lkrb $ldap_libs" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$ldap_libs"; fi + fi + if test yes = "$ldap_needs_lber";then + ldap_libs="-llber $ldap_libs" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$ldap_libs"; fi + fi + ldap_libs="-lldap $ldap_libs" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$ldap_libs"; fi + fi +fi + + else + save_LIBS="$LIBS" LIBS="$ldap_libs $LIBS" + echo $ac_n "checking for ldap_open""... $ac_c" 1>&6 +echo "configure:8166: checking for ldap_open" >&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 ber_pvt_opt_on(); +char ldap_open(); int main() { -ber_pvt_opt_on() + +/* 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_ldap_open) || defined (__stub___ldap_open) +choke me +#else +ldap_open(); +#endif + ; return 0; } EOF -if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_func_ldap_open=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_func_ldap_open=no" fi rm -f conftest* -xe_check_libs="" -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then +if eval "test \"`echo '$ac_cv_func_'ldap_open`\" = yes"; then echo "$ac_t""yes" 1>&6 - with_ldap_lber=yes + with_ldap=yes + test yes = "$extra_verbose" && + echo "Setting ldap_libs to $ldap_libs" else echo "$ac_t""no" 1>&6 + with_ldap=no fi - } + LIBS="$save_LIBS" + fi fi if test "$with_ldap" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -8044,23 +8224,14 @@ 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_ldap_des" = "yes" ; then - LIBS="-ldes $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldes\" to \$LIBS"; fi - fi - 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_lber" = "yes" ; then - LIBS="-llber $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$LIBS"; fi - fi - LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi + LIBS="$ldap_libs $LIBS" 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:8061: checking for $ac_func" >&5 +echo "configure:8232: 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:8258: \"$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 @@ -8114,20 +8285,20 @@ fi if test "$with_postgresql" != "no"; then echo "checking for PostgreSQL" 1>&6 -echo "configure:8118: checking for PostgreSQL" >&5 +echo "configure:8289: checking for PostgreSQL" >&5 for header_dir in "" "pgsql/" "postgresql/"; do ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6 -echo "configure:8123: checking for ${header_dir}libpq-fe.h" >&5 +echo "configure:8294: checking for ${header_dir}libpq-fe.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8302: \"$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* @@ -8151,12 +8322,12 @@ fi test -n "$libpq_fe_h_file" && { echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6 -echo "configure:8155: checking for PQconnectdb in -lpq" >&5 +echo "configure:8326: checking for PQconnectdb in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8200,12 +8371,12 @@ EOF echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6 -echo "configure:8204: checking for PQconnectStart in -lpq" >&5 +echo "configure:8375: checking for PQconnectStart in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure: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 @@ -8264,19 +8435,20 @@ fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:8268: checking for graphics libraries" >&5 +echo "configure:8439: checking for graphics libraries" >&5 libpath_xpm= incpath_xpm= + libname_xpm="-lXpm" case "$opsys" in cygwin*) - cygwin_top=`eval "gcc -print-file-name=libc.a"` ; - cygwin_top=`eval "dirname ${cygwin_top}"`; - cygwin_top="${cygwin_top}/.."; + cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'` + cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"` case "$window_system" in x11) ;; msw) libpath_xpm="-L${cygwin_top}/lib/noX" incpath_xpm="-I${cygwin_top}/include/noX" + libname_xpm="-lXpm-noX" ;; gtk) ;; none) ;; @@ -8290,10 +8462,10 @@ echo "configure:8268: checking for graphics libraries" >&5 CFLAGS=""$incpath_xpm" $CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:8294: checking for Xpm - no older than 3.4f" >&5 - xe_check_libs=-lXpm +echo "configure:8466: checking for Xpm - no older than 3.4f" >&5 + xe_check_libs="$libname_xpm" cat > conftest.$ac_ext < @@ -8302,7 +8474,7 @@ echo "configure:8294: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:8478: \"$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 @@ -8343,20 +8515,20 @@ EOF } LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi - libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi + libs_x=""$libname_xpm" $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$libname_xpm"\" to \$libs_x"; fi CFLAGS=""$incpath_xpm" $CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:8350: checking for \"FOR_MSW\" xpm" >&5 - xe_check_libs=-lXpm +echo "configure:8522: checking for \"FOR_MSW\" xpm" >&5 + xe_check_libs="$libname_xpm" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -8382,15 +8554,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:8386: checking for compface.h" >&5 +echo "configure:8558: 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:8394: \"$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* @@ -8413,12 +8585,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:8417: checking for UnGenFace in -lcompface" >&5 +echo "configure:8589: 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:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8481,12 +8653,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:8485: checking for inflate in -lc" >&5 +echo "configure:8657: 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:8673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8516,12 +8688,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:8520: checking for inflate in -lz" >&5 +echo "configure:8692: 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:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8551,12 +8723,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:8555: checking for inflate in -lgz" >&5 +echo "configure:8727: 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:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8597,15 +8769,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:8601: checking for jpeglib.h" >&5 +echo "configure:8773: 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:8609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8781: \"$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* @@ -8628,12 +8800,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:8632: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:8804: 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:8820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8680,10 +8852,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:8684: checking for pow" >&5 +echo "configure:8856: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8882: \"$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 @@ -8727,15 +8899,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:8731: checking for png.h" >&5 +echo "configure:8903: 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:8739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8911: \"$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* @@ -8758,12 +8930,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:8762: checking for png_read_image in -lpng" >&5 +echo "configure:8934: 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:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8797,10 +8969,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:8801: checking for workable png version information" >&5 +echo "configure:8973: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -8808,7 +8980,7 @@ echo "configure:8801: 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:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:8984: \"$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 @@ -8851,15 +9023,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:8855: checking for tiffio.h" >&5 +echo "configure:9027: 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:8863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9035: \"$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* @@ -8882,12 +9054,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:8886: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:9058: 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:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8937,15 +9109,15 @@ fi if test "$with_gtk" = "yes"; then 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:8941: checking for compface.h" >&5 +echo "configure:9113: 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:8949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9121: \"$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* @@ -8968,12 +9140,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:8972: checking for UnGenFace in -lcompface" >&5 +echo "configure:9144: 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:9160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9023,12 +9195,12 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:9027: checking for X11 graphics libraries" >&5 +echo "configure:9199: checking for X11 graphics libraries" >&5 fi if test "$with_x11" = "yes"; then echo "checking for the Athena widgets" 1>&6 -echo "configure:9032: checking for the Athena widgets" >&5 +echo "configure:9204: checking for the Athena widgets" >&5 case "$with_athena" in "xaw" | "") athena_variant=Xaw athena_3d=no ;; @@ -9044,12 +9216,12 @@ echo "configure:9032: checking for the Athena widgets" >&5 if test "$athena_3d" = "no"; then echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:9048: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 +echo "configure:9220: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9076,12 +9248,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:9080: checking for $athena_3d_function in -l$athena_variant" >&5 +echo "configure:9252: checking for $athena_3d_function in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9123,12 +9295,12 @@ fi else echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:9127: checking for $athena_3d_function in -l$athena_variant" >&5 +echo "configure:9299: checking for $athena_3d_function in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9157,12 +9329,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 $athena_3d_function in -lXaw""... $ac_c" 1>&6 -echo "configure:9161: checking for $athena_3d_function in -lXaw" >&5 +echo "configure:9333: checking for $athena_3d_function in -lXaw" >&5 ac_lib_var=`echo Xaw'_'$athena_3d_function | 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:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9204,15 +9376,15 @@ fi if test "$athena_3d" = "no"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9208: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:9380: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9388: \"$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* @@ -9232,15 +9404,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6 -echo "configure:9236: checking for X11/Xaw/XawInit.h" >&5 +echo "configure:9408: checking for X11/Xaw/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9416: \"$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* @@ -9266,15 +9438,15 @@ fi else ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:9270: checking for X11/$athena_variant/XawInit.h" >&5 +echo "configure:9442: checking for X11/$athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9450: \"$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* @@ -9291,15 +9463,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9295: checking for X11/$athena_variant/ThreeD.h" >&5 +echo "configure:9467: checking for X11/$athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9475: \"$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* @@ -9327,15 +9499,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:9331: checking for $athena_variant/XawInit.h" >&5 +echo "configure:9503: checking for $athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9511: \"$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* @@ -9352,15 +9524,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9356: checking for $athena_variant/ThreeD.h" >&5 +echo "configure:9528: checking for $athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9536: \"$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* @@ -9389,15 +9561,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:9393: checking for X11/Xaw3d/XawInit.h" >&5 +echo "configure:9565: checking for X11/Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9573: \"$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* @@ -9414,15 +9586,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9418: checking for X11/Xaw3d/ThreeD.h" >&5 +echo "configure:9590: checking for X11/Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9598: \"$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* @@ -9454,15 +9626,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:9458: checking for Xaw3d/XawInit.h" >&5 +echo "configure:9630: checking for Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9466: \"$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* @@ -9479,15 +9651,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9483: checking for Xaw3d/ThreeD.h" >&5 +echo "configure:9655: checking for Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9663: \"$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* @@ -9519,15 +9691,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9523: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:9695: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9703: \"$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* @@ -9566,15 +9738,15 @@ fi if test "$with_x11" = "yes"; then ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:9570: checking for Xm/Xm.h" >&5 +echo "configure:9742: 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:9578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9750: \"$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* @@ -9591,12 +9763,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:9595: checking for XmStringFree in -lXm" >&5 +echo "configure:9767: 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:9783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9636,9 +9808,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:9640: checking for Lesstif" >&5 +echo "configure:9812: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -9662,7 +9834,7 @@ rm -f conftest* fi case "$opsys" in - *linux* ) lucid_prefers_motif="no" ;; + *linux* | cygwin* ) lucid_prefers_motif="no" ;; * ) lucid_prefers_motif="yes" ;; esac @@ -10086,15 +10258,15 @@ concord_includes_found=no if test "$with_concord" != "no"; then ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for concord.h""... $ac_c" 1>&6 -echo "configure:10090: checking for concord.h" >&5 +echo "configure:10262: checking for concord.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10270: \"$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* @@ -10122,15 +10294,15 @@ if test "$concord_includes_found" = "no" -a "$with_concord" != "no" -a \ c_switch_site="$c_switch_site -I/usr/local/concord/include" ac_safe=`echo "concord.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for concord.h""... $ac_c" 1>&6 -echo "configure:10126: checking for concord.h" >&5 +echo "configure:10298: checking for concord.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10306: \"$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* @@ -10181,7 +10353,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:10185: checking for Mule-related features" >&5 +echo "configure:10357: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -10195,15 +10367,15 @@ EOF if test "$with_chise" != "no"; then ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for chise.h""... $ac_c" 1>&6 -echo "configure:10199: checking for chise.h" >&5 +echo "configure:10371: checking for chise.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10207: \"$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* @@ -10231,15 +10403,15 @@ fi c_switch_site="$c_switch_site -I/usr/local/chise/include" ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for chise.h""... $ac_c" 1>&6 -echo "configure:10235: checking for chise.h" >&5 +echo "configure:10407: checking for chise.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10415: \"$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* @@ -10318,15 +10490,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10322: checking for $ac_hdr" >&5 +echo "configure:10494: 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:10330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10502: \"$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* @@ -10357,12 +10529,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:10361: checking for strerror in -lintl" >&5 +echo "configure:10533: 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:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10427,18 +10599,18 @@ EOF fi echo "checking for Mule input methods" 1>&6 -echo "configure:10431: checking for Mule input methods" >&5 +echo "configure:10603: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:10434: checking for XIM" >&5 +echo "configure:10606: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:10437: checking for XOpenIM in -lX11" >&5 +echo "configure:10609: 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:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10473,12 +10645,12 @@ fi if test "$need_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:10477: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:10649: 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:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10512,12 +10684,12 @@ fi elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:10516: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:10688: 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:10704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10593,15 +10765,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:10597: checking for XFontSet" >&5 +echo "configure:10769: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:10600: checking for XmbDrawString in -lX11" >&5 +echo "configure:10772: 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:10788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10652,15 +10824,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:10656: checking for wnn/jllib.h" >&5 +echo "configure:10828: 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:10664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10836: \"$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* @@ -10683,15 +10855,15 @@ fi } test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6 -echo "configure:10687: checking for wnn/commonhd.h" >&5 +echo "configure:10859: checking for wnn/commonhd.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10867: \"$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* @@ -10716,10 +10888,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10720: checking for $ac_func" >&5 +echo "configure:10892: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10771,12 +10943,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:10775: checking for crypt in -lcrypt" >&5 +echo "configure:10947: 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:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10822,12 +10994,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:10826: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:10998: 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:11014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10856,12 +11028,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:10860: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:11032: 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:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10890,12 +11062,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:10894: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:11066: 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:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10924,12 +11096,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:10928: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:11100: 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:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10988,12 +11160,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:10992: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:11164: 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:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11039,15 +11211,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:11043: checking for canna/jrkanji.h" >&5 +echo "configure:11215: 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:11051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11223: \"$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* @@ -11074,15 +11246,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:11078: checking for canna/jrkanji.h" >&5 +echo "configure:11250: 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:11086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11258: \"$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* @@ -11110,15 +11282,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:11114: checking for canna/RK.h" >&5 +echo "configure:11286: 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:11122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11294: \"$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* @@ -11141,12 +11313,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:11145: checking for RkBgnBun in -lRKC" >&5 +echo "configure:11317: 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:11333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11180,12 +11352,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:11184: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:11356: 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:11372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11245,12 +11417,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:11249: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:11421: 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:11437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11348,10 +11520,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11352: checking for $ac_func" >&5 +echo "configure:11524: 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:11550: \"$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 @@ -11415,10 +11587,10 @@ fi for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11419: checking for $ac_func" >&5 +echo "configure:11591: 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:11617: \"$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 @@ -11470,10 +11642,10 @@ done echo $ac_n "checking for openpty""... $ac_c" 1>&6 -echo "configure:11474: checking for openpty" >&5 +echo "configure:11646: checking for openpty" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_openpty=yes" else @@ -11515,12 +11687,12 @@ else echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 -echo "configure:11519: checking for openpty in -lutil" >&5 +echo "configure:11691: checking for openpty in -lutil" >&5 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` xe_check_libs=" -lutil " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11566,15 +11738,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11570: checking for $ac_hdr" >&5 +echo "configure:11742: 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:11578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11750: \"$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* @@ -11610,15 +11782,15 @@ for ac_hdr in stropts.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11614: checking for $ac_hdr" >&5 +echo "configure:11786: 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:11622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11651,10 +11823,10 @@ if test "$ac_cv_header_stropts_h" = "yes"; then for ac_func in isastream do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11655: checking for $ac_func" >&5 +echo "configure:11827: 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:11853: \"$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 @@ -11708,15 +11880,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11712: checking for $ac_hdr" >&5 +echo "configure:11884: 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:11720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11892: \"$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* @@ -11753,10 +11925,10 @@ extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11757: checking for $ac_func" >&5 +echo "configure:11929: 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:11955: \"$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 @@ -11812,15 +11984,15 @@ if test "$ac_cv_func_getloadavg" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11816: checking for $ac_hdr" >&5 +echo "configure:11988: 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:11824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11996: \"$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* @@ -11856,12 +12028,12 @@ else echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:11860: checking for kstat_open in -lkstat" >&5 +echo "configure:12032: 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:12048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11907,15 +12079,15 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11911: checking for $ac_hdr" >&5 +echo "configure:12083: 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:11919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12091: \"$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* @@ -11947,12 +12119,12 @@ done echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:11951: checking for kvm_read in -lkvm" >&5 +echo "configure:12123: 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:12139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11997,16 +12169,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:12001: checking whether netdb declares h_errno" >&5 +echo "configure:12173: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:12010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12182: \"$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 @@ -12026,16 +12198,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:12030: checking for sigsetjmp" >&5 +echo "configure:12202: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:12039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12211: \"$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 @@ -12055,11 +12227,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:12059: checking whether localtime caches TZ" >&5 +echo "configure:12231: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -12094,7 +12266,7 @@ main() exit (0); } EOF -if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -12124,9 +12296,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:12128: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:12300: 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:12323: \"$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 @@ -12169,19 +12341,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:12173: checking for inline" >&5 +echo "configure:12345: 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:12357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -12222,17 +12394,17 @@ if test "$__DECC" != "yes"; then # 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:12226: checking for working alloca.h" >&5 +echo "configure:12398: 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:12236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12408: \"$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 @@ -12256,10 +12428,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:12260: checking for alloca" >&5 +echo "configure:12432: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12463: \"$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 @@ -12326,10 +12498,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:12330: checking whether alloca needs Cray hooks" >&5 +echo "configure:12502: 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:12357: checking for $ac_func" >&5 +echo "configure:12529: 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:12555: \"$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 @@ -12409,10 +12581,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:12413: checking stack direction for C alloca" >&5 +echo "configure:12585: 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:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -12461,15 +12633,15 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:12465: checking for vfork.h" >&5 +echo "configure:12637: 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:12473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12645: \"$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* @@ -12497,10 +12669,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:12501: checking for working vfork" >&5 +echo "configure:12673: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -12595,7 +12767,7 @@ main() { } } EOF -if { (eval echo configure:12599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -12621,10 +12793,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:12625: checking for working strcoll" >&5 +echo "configure:12797: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -12634,7 +12806,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -12662,10 +12834,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12666: checking for $ac_func" >&5 +echo "configure:12838: 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:12864: \"$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 @@ -12716,10 +12888,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:12720: checking whether getpgrp takes no argument" >&5 +echo "configure:12892: 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:12950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -12801,10 +12973,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:12805: checking for working mmap" >&5 +echo "configure:12977: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -12837,7 +13009,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:12841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:13013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -12866,9 +13038,9 @@ test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no if test "$rel_alloc $have_mmap" = "default yes"; then if test "$doug_lea_malloc" = "yes"; then echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6 -echo "configure:12870: checking for M_MMAP_THRESHOLD" >&5 +echo "configure:13042: checking for M_MMAP_THRESHOLD" >&5 cat > conftest.$ac_ext < int main() { @@ -12880,7 +13052,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rel_alloc=no; echo "$ac_t""yes" 1>&6; else @@ -12905,15 +13077,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:12909: checking for termios.h" >&5 +echo "configure:13081: 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:12917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13089: \"$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* @@ -12956,15 +13128,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:12960: checking for termio.h" >&5 +echo "configure:13132: 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:12968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13140: \"$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* @@ -12996,10 +13168,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:13000: checking for socket" >&5 +echo "configure:13172: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13198: \"$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 @@ -13037,15 +13209,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:13041: checking for netinet/in.h" >&5 +echo "configure:13213: 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:13049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13221: \"$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* @@ -13062,15 +13234,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:13066: checking for arpa/inet.h" >&5 +echo "configure:13238: 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:13074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13246: \"$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* @@ -13095,9 +13267,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:13099: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:13271: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -13108,7 +13280,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:13112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13284: \"$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 @@ -13126,9 +13298,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:13130: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:13302: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -13138,7 +13310,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:13142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13314: \"$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 @@ -13169,10 +13341,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:13173: checking for msgget" >&5 +echo "configure:13345: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13371: \"$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 @@ -13210,15 +13382,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:13214: checking for sys/ipc.h" >&5 +echo "configure:13386: 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:13222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13394: \"$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* @@ -13235,15 +13407,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:13239: checking for sys/msg.h" >&5 +echo "configure:13411: 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:13247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13419: \"$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* @@ -13281,15 +13453,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:13285: checking for dirent.h" >&5 +echo "configure:13457: 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:13293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13465: \"$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* @@ -13316,15 +13488,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:13320: checking for sys/dir.h" >&5 +echo "configure:13492: 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:13328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13500: \"$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* @@ -13357,15 +13529,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:13361: checking for nlist.h" >&5 +echo "configure:13533: 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:13369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13541: \"$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* @@ -13395,22 +13567,22 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:13399: checking "for sound support"" >&5 +echo "configure:13571: checking "for sound support"" >&5 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:13406: checking for multimedia/audio_device.h" >&5 +echo "configure:13578: 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:13414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13586: \"$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* @@ -13466,12 +13638,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:13470: checking for ALopenport in -laudio" >&5 +echo "configure:13642: 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:13658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13513,12 +13685,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:13517: checking for AOpenAudio in -lAlib" >&5 +echo "configure:13689: 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:13705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13574,15 +13746,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:13578: checking for ${dir}/soundcard.h" >&5 +echo "configure:13750: 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:13586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13758: \"$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* @@ -13636,15 +13808,15 @@ fi if test "$with_nas_sound" != "no"; then ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6 -echo "configure:13640: checking for audio/audiolib.h" >&5 +echo "configure:13812: checking for audio/audiolib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13820: \"$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* @@ -13662,12 +13834,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 -echo "configure:13666: checking for AuOpenServer in -laudio" >&5 +echo "configure:13838: checking for AuOpenServer in -laudio" >&5 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13717,7 +13889,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 @@ -13748,7 +13920,7 @@ if test "$with_esd_sound" != "no"; then # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13752: checking for $ac_word" >&5 +echo "configure:13924: checking for $ac_word" >&5 if test -n "$have_esd_config"; then ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test. @@ -13777,10 +13949,10 @@ fi c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6 -echo "configure:13781: checking for esd_play_stream" >&5 +echo "configure:13953: checking for esd_play_stream" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_esd_play_stream=yes" else @@ -13854,7 +14026,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:13858: checking for TTY-related features" >&5 +echo "configure:14030: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -13870,12 +14042,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:13874: checking for tgetent in -lncurses" >&5 +echo "configure:14046: 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:14062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13919,15 +14091,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:13923: checking for ncurses/curses.h" >&5 +echo "configure:14095: 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:13931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14103: \"$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* @@ -13949,15 +14121,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:13953: checking for ncurses/term.h" >&5 +echo "configure:14125: 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:13961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14133: \"$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* @@ -13987,15 +14159,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:13991: checking for ncurses/curses.h" >&5 +echo "configure:14163: 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:13999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14171: \"$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* @@ -14030,12 +14202,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:14034: checking for tgetent in -l$lib" >&5 +echo "configure:14206: 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:14222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14071,12 +14243,12 @@ fi else if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:14075: checking for tgoto in -ltermcap" >&5 +echo "configure:14247: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | 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:14263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14132,12 +14304,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:14136: checking for tgetent in -lcurses" >&5 +echo "configure:14308: 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:14324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14166,12 +14338,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:14170: checking for tgetent in -ltermcap" >&5 +echo "configure:14342: 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:14358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14231,15 +14403,15 @@ EOF if test "$with_gpm" != "no"; then ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:14235: checking for gpm.h" >&5 +echo "configure:14407: 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:14243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14415: \"$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* @@ -14257,12 +14429,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:14261: checking for Gpm_Open in -lgpm" >&5 +echo "configure:14433: 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:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14332,20 +14504,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:14336: checking for database support" >&5 +echo "configure:14508: checking for database support" >&5 if test "$with_database_gdbm $with_database_dbm" != "no no"; then ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 -echo "configure:14341: checking for ndbm.h" >&5 +echo "configure:14513: 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:14349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14521: \"$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* @@ -14375,12 +14547,12 @@ fi if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:14379: checking for dbm_open in -lgdbm" >&5 +echo "configure:14551: 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:14567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14419,10 +14591,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:14423: checking for dbm_open" >&5 +echo "configure:14595: 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:14621: \"$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 @@ -14464,12 +14636,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:14468: checking for dbm_open in -ldbm" >&5 +echo "configure:14640: 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:14656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14519,14 +14691,191 @@ EOF } +echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6 +echo "configure:14696: checking for u_int8_t" >&5 + +cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_int8_t=yes +else + rm -rf conftest* + ac_cv_type_u_int8_t=no +fi +rm -f conftest* + +echo "$ac_t""$ac_cv_type_u_int8_t" 1>&6 +if test $ac_cv_type_u_int8_t = no; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining u_int8_t = uint8_t +EOF +cat >> confdefs.h <<\EOF +#define u_int8_t uint8_t +EOF +} + +fi + +if test $ac_cv_type_u_int8_t = yes; then +{ test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_U_INT8_T = 1 +EOF +cat >> confdefs.h <<\EOF +#define HAVE_U_INT8_T 1 +EOF +} + +fi +echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6 +echo "configure:14740: checking for u_int16_t" >&5 + +cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_int16_t=yes +else + rm -rf conftest* + ac_cv_type_u_int16_t=no +fi +rm -f conftest* + +echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6 +if test $ac_cv_type_u_int16_t = no; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining u_int16_t = uint16_t +EOF +cat >> confdefs.h <<\EOF +#define u_int16_t uint16_t +EOF +} + +fi + +if test $ac_cv_type_u_int16_t = yes; then +{ test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_U_INT16_T = 1 +EOF +cat >> confdefs.h <<\EOF +#define HAVE_U_INT16_T 1 +EOF +} + +fi +echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6 +echo "configure:14784: checking for u_int32_t" >&5 + +cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_int32_t=yes +else + rm -rf conftest* + ac_cv_type_u_int32_t=no +fi +rm -f conftest* + +echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6 +if test $ac_cv_type_u_int32_t = no; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining u_int32_t = uint32_t +EOF +cat >> confdefs.h <<\EOF +#define u_int32_t uint32_t +EOF +} + +fi + +if test $ac_cv_type_u_int32_t = yes; then +{ test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_U_INT32_T = 1 +EOF +cat >> confdefs.h <<\EOF +#define HAVE_U_INT32_T 1 +EOF +} + +fi +echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6 +echo "configure:14828: checking for u_int64_t" >&5 + +cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_int64_t=yes +else + rm -rf conftest* + ac_cv_type_u_int64_t=no +fi +rm -f conftest* + +echo "$ac_t""$ac_cv_type_u_int64_t" 1>&6 +if test $ac_cv_type_u_int64_t = no; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining u_int64_t = uint64_t +EOF +cat >> confdefs.h <<\EOF +#define u_int64_t uint64_t +EOF +} + +fi + +if test $ac_cv_type_u_int64_t = yes; then +{ test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_U_INT64_T = 1 +EOF +cat >> confdefs.h <<\EOF +#define HAVE_U_INT64_T 1 +EOF +} + +fi + if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:14525: checking for Berkeley db.h" >&5 +echo "configure:14874: checking for Berkeley db.h" >&5 for header in "db/db.h" "db.h"; do case "$opsys" in *freebsd*) cat > conftest.$ac_ext < @@ -14542,7 +14891,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_file="$header"; break else @@ -14553,7 +14902,7 @@ rm -f conftest* ;; *) cat > conftest.$ac_ext < @@ -14561,21 +14910,29 @@ rm -f conftest* #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ #include +#if !HAVE_U_INT8_T typedef uint8_t u_int8_t; +#endif +#if !HAVE_U_INT16_T typedef uint16_t u_int16_t; +#endif +#if !HAVE_U_INT32_T typedef uint32_t u_int32_t; +#endif #ifdef WE_DONT_NEED_QUADS +#if !HAVE_U_INT64_T typedef uint64_t u_int64_t; #endif #endif #endif +#endif #include <$header> int main() { ; return 0; } EOF -if { (eval echo configure:14579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_file="$header"; break else @@ -14593,9 +14950,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:14597: checking for Berkeley DB version" >&5 +echo "configure:14954: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -14607,7 +14964,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 2 @@ -14634,10 +14991,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:14638: checking for $dbfunc" >&5 +echo "configure:14995: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15021: \"$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 @@ -14679,12 +15036,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:14683: checking for $dbfunc in -ldb" >&5 +echo "configure:15040: 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:15056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14769,12 +15126,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:14773: checking for SOCKSinit in -lsocks" >&5 +echo "configure:15130: 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:15146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14840,7 +15197,7 @@ fi if test "$with_modules" != "no"; then echo "checking for module support" 1>&6 -echo "configure:14844: checking for module support" >&5 +echo "configure:15201: checking for module support" >&5 if test "$with_msw" = "yes"; then have_dl=yes; @@ -14856,15 +15213,15 @@ EOF ;; *) ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:14860: checking for dlfcn.h" >&5 +echo "configure:15217: checking for dlfcn.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15225: \"$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* @@ -14881,16 +15238,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:14885: checking for dlopen in -lc" >&5 +echo "configure:15242: checking for dlopen in -lc" >&5 cat > conftest.$ac_ext < int main() { dlopen ("", 0); ; return 0; } EOF -if { (eval echo configure:14894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* have_dl=yes else @@ -14899,18 +15256,18 @@ else rm -rf conftest* echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:14903: checking for dlopen in -ldl" >&5 +echo "configure:15260: checking for dlopen in -ldl" >&5 ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext < int main() { dlopen ("", 0); ; return 0; } EOF -if { (eval echo configure:14914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* have_dl=yes else @@ -14939,12 +15296,12 @@ EOF else echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:14943: checking for shl_load in -ldld" >&5 +echo "configure:15300: 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:15316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14982,12 +15339,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:14986: checking for dld_init in -ldld" >&5 +echo "configure:15343: 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:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15045,7 +15402,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:15049: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:15406: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -15073,9 +15430,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:15077: checking checking whether we are using GNU C" >&5 +echo "configure:15434: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:15101: checking how to produce PIC code" >&5 +echo "configure:15458: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -15198,18 +15555,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:15202: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:15559: 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:15570: \"$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 @@ -15240,7 +15597,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:15244: checking if C compiler can produce shared libraries" >&5 +echo "configure:15601: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes -o "$__ICC" = yes; then xcldf="-shared" xldf="-shared" @@ -15291,14 +15648,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:15659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -15323,7 +15680,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:15327: checking for ld used by GCC" >&5 +echo "configure:15684: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -15349,7 +15706,7 @@ echo "configure:15327: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:15353: checking for GNU ld" >&5 +echo "configure:15710: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -15387,7 +15744,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:15391: checking if the linker is GNU ld" >&5 +echo "configure:15748: 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 @@ -15415,7 +15772,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:15419: checking whether the linker supports shared libraries" >&5 +echo "configure:15776: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -15626,10 +15983,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15630: checking for $ac_func" >&5 +echo "configure:15987: 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:16013: \"$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 @@ -15691,11 +16048,11 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:16056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -16336,8 +16693,8 @@ fi echo " Compiler: $CC $CFLAGS" case "$CC" in - gcc*) echo " Compiler version: `$CC --version | head -1`" - echo " Compiler specs file: `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | head -1`" + gcc*) echo " Compiler version: `$CC --version | sed 1q`" + echo " Compiler specs file: `$CC -v 2>&1 | sed 's/.* \([^ ]\)/\1/' | sed 1q`" ;; *) case "$canonical" in *-*-aix* ) @@ -16364,7 +16721,7 @@ case "$CC" in ;; *-*-solaris*) - ccvers=`$CC -V 2>&1 | head -1` + ccvers=`$CC -V 2>&1 | sed 1q` if test ! -z "$ccvers" ; then echo " Compiler version: $ccvers" fi diff --git a/configure.in b/configure.in index 32fc373..1ff5fbe 100644 --- a/configure.in +++ b/configure.in @@ -1899,9 +1899,9 @@ dnl We only cope with headers in mingw, not mingw32: no previous version of dnl XEmacs supported mingw and cygnus have made this incompatible change dnl so we just go with the flow. case "$opsys" in mingw* | cygwin*) - cygwin_include=`eval "gcc -print-file-name=libc.a"` ; - cygwin_include=`eval "dirname $cygwin_include"` ; - cygwin_include="-I$cygwin_include/../include" ; + cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'` + cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"` + cygwin_include="-I$cygwin_include/include" ; extra_includes="$cygwin_include/mingw $cygwin_include" ; case "$opsys" in mingw*) XE_APPEND($extra_includes, c_switch_system) ;; @@ -2094,8 +2094,6 @@ else *86* ) dynodump_arch=i386 ;; powerpc ) dynodump_arch=ppc ;; esac - dnl Dynodump requires the system linker - test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site) fi dnl Feed s&m crud to src/Makefile @@ -2917,7 +2915,7 @@ dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above. esac fi - AC_CHECK_FUNCS(XConvertCase) + AC_CHECK_FUNCS(XConvertCase XtRegisterDrawable) AC_CHECK_HEADERS(X11/Xlocale.h) @@ -3212,33 +3210,113 @@ dnl Autodetect LDAP 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 - AC_CHECK_LIB(ldap, ldap_search, with_ldap=yes) - dnl Check for other libraries we need to link with to get the main routines. - test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes], , -llber) } - test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes], , -llber -lkrb) } - test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes with_ldap_des=yes], , -llber -lkrb -ldes) } - dnl Recently, we need -lber even though the main routines are elsewhere, - dnl because otherwise be get link errors w.r.t. ber_pvt_opt_on. So just - dnl check for that (it's a variable not a fun but that doesn't seem to - dnl matter in these checks) and stick in -lber if so. Can't hurt (even to - dnl stick it in always shouldn't hurt, I don't think) ... #### Someone who - dnl #### understands LDAP needs to fix this properly. - test "$with_ldap_lber" != "yes" && { AC_CHECK_LIB(lber, ber_pvt_opt_on, with_ldap_lber=yes) } +if test no != "$with_ldap";then + if test . != "${ldap_libs+.}";then + ldap_libs= + AC_CHECK_FUNC(ldap_open,dnl Allow it to be in generic "$LIBS" + [with_ldap=yes + test yes = "$extra_verbose" && + echo "Setting ldap_libs to $ldap_libs"],dnl + [AC_CHECK_LIB(ldap, ldap_open,dnl + [with_ldap=yes],dnl +dnl If logic of setting these vars change, change it the same way below. + [ldap_needs_lber=yes ldap_other_libs=-llber +dnl This requires `AC_CACHE_VAL' (which is called by `AC_CHECK_LIB') +dnl to be redefined to ignore cached (shell variable) value, as it is +dnl done above, because the same variable is used in all +dnl `AC_CHECK_LIB' expansions in macro invocation below. Worse, if it +dnl is not done, there is no portable way to compensate for this +dnl locally since `unset' command is not supported by all shells. The +dnl other solution would be changing `AC_CHECK_LIB' so that cache +dnl variable name depends on the macro OTHER-LIBRARIES argument. + AC_CHECK_LIB(ldap, ldap_open,dnl + [with_ldap=yes],dnl + [ldap_needs_krb=yes ldap_other_libs="$ldap_other_libs -lkrb" + AC_CHECK_LIB(ldap, ldap_open,dnl + [with_ldap=yes],dnl + [ldap_needs_des=yes ldap_other_libs="$ldap_other_libs -ldes" + AC_CHECK_LIB(ldap, ldap_open,dnl + [with_ldap=yes],dnl + [with_ldap=no],dnl + $ldap_other_libs)],dnl + $ldap_other_libs)],dnl + $ldap_other_libs)]) + if test yes = "$with_ldap" -a yes != "$ldap_needs_lber";then +dnl Need this check since `LDAP_OPT_ON' is (currently) used only with +dnl `ldap_set_option', and the latter may not exist at all, for which +dnl is testing later. So `LDAP_OPT_ON' is not necessarily defined. + AC_CACHE_CHECK([for LDAP_OPT_ON definition],xe_cv_have_LDAP_OPT_ON, + [AC_TRY_COMPILE( +[#include +#include +#ifdef LDAP_OPT_ON +/* Relying on const defined by ac_c_const (upper case). */ +const void *const v = LDAP_OPT_ON; +#else /* !defined (LDAP_OPT_ON) */ +choke me +#endif /* !defined (LDAP_OPT_ON) */],[], + [xe_cv_have_LDAP_OPT_ON=yes], + [xe_cv_have_LDAP_OPT_ON=no])]) + if test yes = "$xe_cv_have_LDAP_OPT_ON";then + AC_CACHE_CHECK([LDAP_OPT_ON linking], + xe_cv_LDAP_OPT_ON_links, + [xe_save_LIBS="$LIBS" + LIBS="-lldap $LIBS" +AC_TRY_LINK( +[#include +#include +const void *const v = LDAP_OPT_ON;],[], + xe_cv_LDAP_OPT_ON_links=yes, + xe_cv_LDAP_OPT_ON_links=no) + LIBS="$xe_save_LIBS"]) +dnl In some openldap installations other `ldap_*' functions link with +dnl `-lldap' alone, but `LDAP_OPT_ON' requires `-llber'. + if test yes != "$xe_cv_LDAP_OPT_ON_links";then + ldap_needs_lber=yes ldap_other_libs=-llber + AC_CACHE_CHECK([LDAP_OPT_ON linking with -llber], + xe_cv_LDAP_OPT_ON_links_w_lber, + [xe_save_LIBS="$LIBS" + LIBS="-lldap $ldap_other_libs $LIBS" +AC_TRY_LINK( +[#include +#include +const void *const v = LDAP_OPT_ON;],[], + xe_cv_LDAP_OPT_ON_links_w_lber=yes, + xe_cv_LDAP_OPT_ON_links_w_lber=no) + LIBS="$xe_save_LIBS"]) + if test yes != "$xe_cv_LDAP_OPT_ON_links_w_lber";then + with_ldap=no + fi + fi + fi + fi + if test yes = "$with_ldap";then + if test yes = "$ldap_needs_des";then + XE_PREPEND(-ldes, ldap_libs) + fi + if test yes = "$ldap_needs_krb";then + XE_PREPEND(-lkrb, ldap_libs) + fi + if test yes = "$ldap_needs_lber";then + XE_PREPEND(-llber, ldap_libs) + fi + XE_PREPEND(-lldap, ldap_libs) + fi]) + else +dnl Allow builder to override "$ldap_libs". + save_LIBS="$LIBS" LIBS="$ldap_libs $LIBS" + AC_CHECK_FUNC(ldap_open,dnl + [with_ldap=yes + test yes = "$extra_verbose" && + echo "Setting ldap_libs to $ldap_libs"],dnl + [with_ldap=no]) + LIBS="$save_LIBS" + fi fi if test "$with_ldap" = "yes"; then AC_DEFINE(HAVE_LDAP) XE_ADD_OBJS(eldap.o) - if test "$with_ldap_des" = "yes" ; then - XE_PREPEND(-ldes, LIBS) - fi - if test "$with_ldap_krb" = "yes" ; then - XE_PREPEND(-lkrb, LIBS) - fi - if test "$with_ldap_lber" = "yes" ; then - XE_PREPEND(-llber, LIBS) - fi - XE_PREPEND(-lldap, LIBS) + LIBS="$ldap_libs $LIBS" AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) fi @@ -3285,17 +3363,18 @@ if test "$window_system" != "none"; then dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X libpath_xpm= incpath_xpm= + libname_xpm="-lXpm" case "$opsys" in cygwin*) - cygwin_top=`eval "gcc -print-file-name=libc.a"` ; - cygwin_top=`eval "dirname ${cygwin_top}"`; - cygwin_top="${cygwin_top}/.."; + cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'` + cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"` case "$window_system" in dnl use "standard" search pattern x11) ;; dnl hardcode "standard" non-X11 xpm lib/inc dirs msw) libpath_xpm="-L${cygwin_top}/lib/noX" incpath_xpm="-I${cygwin_top}/include/noX" + libname_xpm="-lXpm-noX" ;; dnl not supported on cygwin (yet?) gtk) ;; @@ -3314,7 +3393,7 @@ if test "$window_system" != "none"; then XE_PREPEND("$incpath_xpm", CFLAGS) XE_PREPEND("$libpath_xpm", LDFLAGS) AC_MSG_CHECKING(for Xpm - no older than 3.4f) - xe_check_libs=-lXpm + xe_check_libs="$libname_xpm" AC_TRY_RUN([#define XPM_NUMBERS #include int main(int c, char **v) { @@ -3349,10 +3428,10 @@ if test "$window_system" != "none"; then dnl #### but doesn't actually verify this assumption. AC_DEFINE(HAVE_XPM) XE_PREPEND("$libpath_xpm", LDFLAGS) - XE_PREPEND(-lXpm, libs_x) + XE_PREPEND("$libname_xpm", libs_x) XE_PREPEND("$incpath_xpm", CFLAGS) AC_MSG_CHECKING(for \"FOR_MSW\" xpm) - xe_check_libs=-lXpm + xe_check_libs="$libname_xpm" AC_TRY_LINK(, [XpmCreatePixmapFromData()], [xpm_for_msw=no], [xpm_for_msw=yes]) @@ -3598,7 +3677,7 @@ dnl Not all toolkits support all widgets dnl Avoid using Motif :-( case "$opsys" in - *linux* ) lucid_prefers_motif="no" ;; + *linux* | cygwin* ) lucid_prefers_motif="no" ;; * ) lucid_prefers_motif="yes" ;; esac @@ -4526,6 +4605,24 @@ test "$with_database_gdbm" = "yes" -o \ "$with_database_dbm" = "yes" && \ AC_DEFINE(HAVE_DBM) +dnl Check for u_int*_t typedefs. +AC_CHECK_TYPE(u_int8_t, uint8_t) +if test $ac_cv_type_u_int8_t = yes; then +AC_DEFINE(HAVE_U_INT8_T,1) +fi +AC_CHECK_TYPE(u_int16_t, uint16_t) +if test $ac_cv_type_u_int16_t = yes; then +AC_DEFINE(HAVE_U_INT16_T,1) +fi +AC_CHECK_TYPE(u_int32_t, uint32_t) +if test $ac_cv_type_u_int32_t = yes; then +AC_DEFINE(HAVE_U_INT32_T,1) +fi +AC_CHECK_TYPE(u_int64_t, uint64_t) +if test $ac_cv_type_u_int64_t = yes; then +AC_DEFINE(HAVE_U_INT64_T,1) +fi + dnl Check for Berkeley DB. if test "$with_database_berkdb" != "no"; then AC_MSG_CHECKING(for Berkeley db.h) @@ -4550,14 +4647,22 @@ if test "$with_database_berkdb" != "no"; then #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ #include +#if !HAVE_U_INT8_T typedef uint8_t u_int8_t; +#endif +#if !HAVE_U_INT16_T typedef uint16_t u_int16_t; +#endif +#if !HAVE_U_INT32_T typedef uint32_t u_int32_t; +#endif #ifdef WE_DONT_NEED_QUADS +#if !HAVE_U_INT64_T typedef uint64_t u_int64_t; #endif #endif #endif +#endif #include <$header> ],[], db_h_file="$header"; break) ;; @@ -5104,8 +5209,8 @@ echo " Compiler: $CC $CFLAGS" dnl Let's save some helpful-for-debugging info like compiler and libc versions.. dnl First, see if it's gcc - the same check works everyplace... case "$CC" in - gcc*) echo " Compiler version: `$CC --version | head -1`" - echo " Compiler specs file: `$CC -v 2>&1 | sed 's/.* \([[^ ]]\)/\1/' | head -1`" + gcc*) echo " Compiler version: `$CC --version | sed 1q`" + echo " Compiler specs file: `$CC -v 2>&1 | sed 's/.* \([[^ ]]\)/\1/' | sed 1q`" ;; dnl non-gcc machine-specific magic - contributions welcome *) case "$canonical" in @@ -5136,7 +5241,7 @@ dnl non-gcc machine-specific magic - contributions welcome ;; *-*-solaris*) - ccvers=`$CC -V 2>&1 | head -1` + ccvers=`$CC -V 2>&1 | sed 1q` if test ! -z "$ccvers" ; then echo " Compiler version: $ccvers" fi diff --git a/etc/ETAGS.ChangeLog b/etc/ETAGS.ChangeLog new file mode 100644 index 0000000..8db17a1 --- /dev/null +++ b/etc/ETAGS.ChangeLog @@ -0,0 +1,849 @@ +2007-05-18 Francesco Potortì + + * etags.c: Extern definitions of some more pointer functions for + standalone compilation, especially important for 64bit platforms. + (main, print_help): --members is now the default for etags. + (C_entries): Parse start of C comment as a space == end of token. + This is not necessary for C++ comment, already parsed as newline. + +2007-02-05 Francesco Potortì + + * etags.c (default_C_help, Cplusplus_help, PHP_help, print_help) + (main): Now --members is the default for etags, not for ctags yet. + +2007-01-02 Francesco Potortì + + * etags.c (longopts): New undocumented option --no-duplicates. + (no_duplicates): Static variables for the above option. + (print_help): Do not print help for --no-warn, now undocumented. + (add_node): Allow duplicate tags in ctags mode unless --no-duplicates. + (main): Pass the -u option to sort in ctags mode. + +2006-12-28 Francesco Potortì + + * etags.c (readline): When creating a relative file name from a + #line directive, leave the file name alone. The previous + behaviour was to make it relative to the tags file directory, + under the hypothesis that the #line directive file name was + relative to the directory of the tagged file. That hypothesis is + wrong with Cpp and Lex. + +2006-12-20 Francesco Potortì + + * etags.c (C_entries): DEFUN names were longer by one: corrected. + (Makefile_targets): Do not include spaces in tag names. + +2006-08-12 Kevin Ryde + + * etags.c (readline): Check for double quote after #line. + +2006-08-12 Jan Djärv + + * etags.c (readline): sscanf could in principle return 2. + +2006-08-12 Francesco Potortì + + * etags.c (readline): lno is unsigned. + (TeX_commands): Use p++ (rather than *p++) to increment p. + (Lua_functions): Explicitely discard LOOKING_AT's return value. + +2006-08-07 Masatake YAMATO + + * etags.c (TEX_mode): Check getc retruns EOF. + File ended without newline causes infinite loop. + +2002-07-14 Adrian Aichner (tiny change) + + * etags.c: It's XEmacs, not Xemacs: change all the occurences. + +2006-07-10 Francesco Potortì + + * etags.c [ETAGS_REGEXPS]: #ifdef's deleted, define unconditionally. + [LONG_OPTIONS]: Changed to NO_LONG_OPTIONS, now normally undefined. + (Objc_suffixes): Suggest using --lang=c for full help. + (C_entries): Initialise savetoken to 0 to shut up the compiler. + +2006-07-10 Francesco Potortì + + * etags.c (absolute_filename): Free unused space (cosmetic change). + (in_word_set): In C, also tag #undef symbols. + +2006-05-02 Francesco Potortì + + * etags.c (Perl_functions): Free space allocated for var package. + (Erlang_functions): Possibly free space allocated for var last. + (Prolog_functions): Possibly free space allocated for var last. + +2005-11-18 Hideki IWAMOTO (tiny change) + + * etags.c (main): Cxref mode writes to stdout: do not close tagf, + which was never opened. + +2005-09-27 Francesco Potortì + + * etags.c: Preliminary Forth support. + (prolog_pr): Cast strlen to int before comparison. + (LOOKING_AT, LOOKING_AT_NOCASE): Let the preprocessor check that + the second argument is indeed a literal string. + (main): In append mode, sort the tags file after writing it. + +2005-09-27 Emanuele Giaquinta (tiny change) + + * etags.c (longopts, print_help, main): The -a (--append) option + can be used in ctags also; for one, the Linux make file uses it. + +2004-09-13 Francesco Potortì + + * etags.c (main): When relative file names are given as argument, + make them relative to the current working dir, rather than + relative to the output tags file, if the latter is in /dev. + +2004-09-13 David A. Capello (tiny change) + + * etags.c: (Lua_suffixes, Lua_help, lang_names, Lua_functions): + Support the Lua scripting language . + +2004-09-13 Francesco Potortì + + * etags.c [EXIT_SUCCESS, EXIT_FAILURE]: Define them when no + is available. + (enum sym_type): New st_C_attribute value for parsing + gcc's __attribute__. Deleted st_C_typespec value. + (gperf, in_word_set): Use gperf 3, options changed. Added the + __attribute__ keyword, removed all the st_C_typespec keywords, + changed attribute for Java to (C_JAVA & !C_PLPL). + (inattribute): New global bool, part of the C state machine. + (cblev): Identifier renamed to bracelev throughout. + (consider_token, C_entries): Numerous changes for making the + parser more robust and adding support for __attribute__. + +2004-09-08 Francesco Potortì + + * etags.c: Add arch taglines + [LONG_OPTIONS]: make it TRUE (ifdef) or FALSE for ease of use. + [GOOD, BAD]: renamed to EXIT_SUCCESS, EXIT_FAILURE. + (suggest_asking_for_help): Fix having macros in a printf statement. + (consider_token): check C++ `operator' only when the token len is + long enough. + +2003-01-09 Francesco Potortì + + * etags.c: changes for language-sepcific help by Philippe + Waroquiers applied and largely revised. + (language): Added a `help' member. + (arg_type): Added an at_end constant. + (plain_C_suffixes): Some items removed from here. + (Objc_suffixes): And put here (new constant). + (Ada_help, Asm_help, default_C_help, Cplusplus_help, Cjava_help, + Cobol_help, Erlang_help, Fortran_help, HTML_help, Lisp_help, + Makefile_help, Objc_help, Pascal_help, Perl_help, PHP_help, + PS_help, Prolog_help, Python_help, Scheme_help, TeX_help, + Texinfo_help, Yacc_help, auto_help, none-help, no_lang_help): New + constants. + (PS_functions, PS_suffixes): Renamed from Postscript_functions and + Postscript_suffixes. + (lang_names): Adapted to the new language structure, new language + "objc" added (was previously merged with "proc"). + (print_language_names): Some help strings corrected. + (print_help): Now takes an argument and possibly prints lang help. + (print_help): Some help strings corrected. Documents + language-specific help. + (main): Only print help after having parsed all the arguments. + +2002-09-03 Francesco Potorti` + + * etags.c (regex_tag_multiline, readline): Never pass pfnote a + string that cannot be freed. + +2002-08-30 Francesco Potorti` + + * etags.c (consider_token, C_entries): Switch to C++ parsing when + auto-detection is enabled and the `::' qualifier is met. + (consider_token, C_entries): Several bugs corrected that tagged + some declarations even though --declarations was not used. + (plainc): New macro. + (C_entries): Use it. + (C_entries): Several cosmetic changes. + (C_entries): Invalidate the token is some cases. + +2002-08-29 Francesco Potorti` + + * etags.c (C_entries): Corrected a problem with const C++ funcs. + (ignoreindent): Renamed from noindentypedefs. + (cjava, cplpl): They are now macros instead of local vars. + +2002-08-28 Francesco Potorti` + + * etags.c (HTML_labels): Tag ID= also. + +2002-08-27 Francesco Potorti` + + * etags.c (Ada_funcs): Do not tag "use type Xxxx;". + +2002-06-25 Francesco Potorti` + + * etags.c: New language HTML. + (make_tag): Never generate null length tag names. + (linebuffer_init): Renamed from initbuffer. All callers changed. + (pattern): Structure renamed to `regexp', member regex renamed to + pattern. + (node_st): Member pat renamed to regex. + (pattern); New member force_explicit_name, for future use. Now + always set to true, cannot be reset. + (add_regex, regex_tag_multiline, readline): Use it. + (main): Free some global structures. + +2002-06-21 Francesco Potorti` + + * etags.c (fdesc): New member `written'. + (readline, process_file): Initialise it. + (put_entries): Set it. + (main): Use it to create entries for files without tags. + (total_size_of_entries): Do not count invalid tags. + (etags_strcasecmp): Like BSD's, for compatibility. + (strcaseeq): Make it into a macro. + +2002-06-21 Francesco Potorti` + + * etags.c: (F_getit, Fortran_functions, Ada_getit, Asm_labels) + (Python_functions, PHP_functions, PHP_functions, PHP_functions) + (PHP_functions, PHP_functions, Cobol_paragraphs) + (Makefile_targets, Postscript_functions, Texinfo_nodes) + (prolog_pr, erlang_func, erlang_attribute) + (Perl_functions, Perl_functions, Pascal_functions) + (TeX_commands, get_tag): Use make_tag instead of pfnote. + (get_tag): Prototype changed, all callers changed. + +2002-06-20 Francesco Potorti` + + * etags.c: Use, together with etags.el, an optimised form of tags, + which are almost always unnamed. etags.el looks for an explicit + tag name, then for an implicit one. See make_tag for details. + The change is both forwards and backwards compatible. + (make_tag): New function (was the disabled function new_pfnote). + (make_C_tag): Use it. + +2002-06-19 Francesco Potorti` + + * etags.c (add_regex): Invalid regexp modifiers are ignored. + (Makefile_targets): Tag variables unless --no-globals. + (LOOP_ON_INPUT_LINES): Serious bug corrected. + +2002-06-13 Francesco Potorti` + + * etags.c (erlang_atom, erlang_attribute): Bugs corrected. + (invalidate_nodes): Bug corrected. + (print_help): Better help for regexps. + +2002-06-12 Francesco Potorti` + + * etags.c (arg_type): at_icregexp label removed (obsolete). + (pattern): New member multi_line for multi-line regexps. + (filebuf): A global buffer containing the whole file as a string + for multi-line regexp matching. + (need_filebuf): Global flag raised if multi-line regexps used. + (print_help): Document new regexp modifiers, remove references to + obsolete option --ignore-case-regexp. + (main): Do not set regexp syntax and translation table here. + (main): Treat -c option as a backward compatibility hack. + (main, find_entries): Init and free filebuf. + (find_entries): Call regex_tag_multiline after the regular parser. + (scan_separators): Check for untermintaed regexp and return NULL. + (analyse_regex, add_regex): Remove the ignore_case argument, which + is now a modifier to the regexp. All callers changed. + (add_regex): Manage the regexp modifiers. + (regex_tag_multiline): New function. Reads from filebuf. + (readline_internal): If necessary, copy the whole file into filebuf. + (readline): Skip multi-line regexps, leave them to regex_tag_multiline. + +2002-06-11 Francesco Potorti` + + * etags.c (add_regex): Better check for null regexps. + (readline): Check for regex matching null string. + +2002-06-07 Francesco Potorti` + + * etags.c (find_entries): Reorganisation. + +2002-06-07 Francesco Potorti` + + * etags.c (scan_separators): Support all character escape + sequences supported by gcc. + (find_entries): rewind unconditionally. + (find_entries): Do not call language functions directly, now calls + itself. + (find_entries): Do general initialisations here. + (CNL_SAVE_DEFINEDEF, C_entries, LOOP_ON_INPUT_LINES, F_getit) + (Ada_getit, Pascal_functions, Pascal_functions) + (prolog_skip_comment): Do not do them here. + (readline_internal): Increment lineno here. + (readline): Conditionally undo readline_internal increment. + (readline): Do not return a value. + +2002-06-06 Francesco Potorti` + + * etags.c (enum arg_type): New label at_stdin. + (STDIN): New constant. + (parsing_stdin): New flag. + (longopts): New option --parse-stdin=NAME. + (print_help): Document it. + (main): Handle it. + (process_file): Split into process_file and process_file_name. + (process_file_name): New function. + +2002-06-06 Francesco Potorti` + + * etags.c (main): Avoid a buffer overrun with sprintf. + (TEX_cmt): Make it a static char and move it before TeX_commands. + (TeX_commands): Skip comments. + (TEX_defenv): Now contains more contructs. + (TeX_commands): Shorten the tag to the brace after the name. + (TeX_commands): Allow for names with embedded spaces. + (TeX_commands): Names now include the initial backslash. + (TeX_commands): Names do not include numeric args #n. + (TeX_commands): Correct line char number in tags. + (TEX_tabent, TEX_token): Deleted. + (TeX_commands, TEX_decode_env): Streamlined. + +2002-05-31 Paul Eggert + + * etags.c (main): Use `sort -o TAGFILE TAGFILE' instead of + `sort TAGFILE -o TAGFILE', as POSIX 1003.1-2001 disallows + the latter usage. + +2002-04-22 Francesco Potorti` + + * etags.c: (last_node): Make it a global variable. + (process_file): Print the tags from the nodes as soon as + possible, and delete the nodes. This brings down the memory + occupancy as etags to almost the same level as when the #line + directives were not parsed. + (free_fdesc): New function. + (find_entries): Use it. + (invalidate_nodes): In etags mode, do not just mark the nodes as + invalid, do delete them. + +2002-04-16 Francesco Potorti` + + * etags.c (find_entries): Bug fix in list management. + +2002-04-15 Francesco Potorti` + + * etags.c (get_language_from_filename): Add one argument. + (strcaseeq): New function. + (get_language_from_filename): Use it to do a case insenstitive + comparison if called with appropriate args. + (find_entries): Try with case insensitive match. + (process_file): Bug fixed. + +2002-04-13 Francesco Potorti` + + * etags.c (find_entries): Delete tags previously obtained from + file xxx.c's #line directives when parsing file xxx.y. This is + generally done for automatically generated files containing + #line directives. This handles the case when xxx.y is tagged + before xxx.c, and the entries of xxx.c pointing to xxx.y should + be discarded. + (language): Added the metasource member. Initializers changed. + (invalidate_nodes): New function. + +2002-03-21 Francesco Potorti` + + * etags.c (readline): Discard lines after having found a #line + directive pointing to an already tagged file. This handles the + case when xxx.y is tagged before xxx.c, and the entries of + xxx.c pointing to xxx.y should be discarded. + +2002-03-15 Francesco Potorti` + + * etags.c (fdesc): New structure for keeping track of input files. + (fdesc): Remove `file' member (a string) and use instead a pointer + to a file description structure. + (curfile, curfiledir, curtagfname, curlang, nocharno, + forced_lang): Global variables removed in favor of fdhead and + curfdp, pointers to file description strucures. + (longopts, main, print_help): Use the CTAGS conditional to include + or exclude options that work on etags or ctags only. + (process_file, find_entries, pfnote, add_node, put_entries, + readline): Use fdhead and curfdp. + (process_file, find_entries): Do not take an arg string, all + callers changed. + +2002-03-13 Francesco Potorti` + + * etags.c (longopts, print_help, main): Test CTAGS to disallow + options that are not right for either etags or ctags. + +2002-03-12 Francesco Potorti` + + * etags.c (number_len, total_size_of_entries): Define them also + in CTAGS mode, because gcc does not compile all refs away. + (Python_functions, PHP_functions): Name tags, for ctags' sake. + (TeX_commands): Name tags. Correction of old disabled code. + +2002-03-06 Francesco Potorti` + + * etags.c (Python_functions): Consider indented "def" and "class". + +2002-03-05 Francesco Potorti` + + * etags.c (curfiledir, curtagfname): New global variables. + (process_file): Initialise them. + (readline): Canonicalize the name found in #line directive. + +2002-03-05 Francesco Potorti` + + * etags.c: Honour #line directives. + (no_line_directive): New global var; set it for old behaviour. + (main): Remove some #ifdef in the getopt switch. + (add_node, put_entries): Code added to merge different chunks of + nodes referring to the same file. Currently the tags are just + appended, without any check for duplicates. + (Perl_functions): Do not special case ctags. + (readline): Identify #line directives and do the right thing. + (nocharno, invalidcharno): New global vars. + (process_file): Reset nocharno. + (readline): Set nocharno. + (pfnote): Read nocharno and maybe put invalidcharno in node. + (total_size_of_entries, put_entries): Use invalidcharno. + +2002-03-04 Francesco Potorti` + + * etags.c: Keep the whole tag table in memory, even in etags mode. + (main): Call put_entries here even in CTAGS mode. + (main, process_file): Check the return values of fclose and pclose. + (process_file): Do not call put_entries after parsing each file. + (process_file): Canonicalise file names even for ctags. + (process_file): Set curfile here... + (find_entries): ... not here any more. + (add_node): In etags mode, build a linked list of entries (on + right pointer) for each file, and link the first entry of each + file on left nodes. + (put_entries): Print here the name of the file. + (put_entries): Print the entries starting from the first file. + (number_len, total_size_of_entries): Define these only iin etags + mode, make the second work only on the right nodes. + +2002-01-03 Francesco Potorti` + + * etags.c: Make all global variables static. + +2001-12-21 Francesco Potorti` + + * etags.c (Perl_functions): Tag packages and use them in sub tags. + (get_tag): Return a pointer to the tag that is found. + +2001-12-21 Francesco Potorti` + + * etags.c (LOOKING_AT): Use !intoken instead of iswhite. + (F_takeprec): Renamed from takeprec. All callers changed. + (F_getit): Renamed from getit. All callers changed. + (nocase_tail): Renamed from tail. All callers changed. + (Ada_getit): Renamed from adagetit. All callers changed. + (L_getit): Simplified by using get_tag. + (Perl_functions, Postscript_functions, erlang_attribute): Use the + modified LOOKING_AT. + (notinname): Removed '[' and added ')' to the recognised chars. + (LOOKING_AT, get_tag, PHP_functions): Use notinname. + (Ada_getit, Ada_funcs, Python_functions, Scheme_functions): + Clarified, using strneq or notinname. + (L_isdef, L_isquote): Removed. + (Lisp_functions, L_getit): Clarified. + +2001-12-17 Francesco Potorti` + + * etags.c: [P_]: Renamed to __P for consistency with config.h. + [HAVE_CONFIG_H]: Let config.h deal with __P. + [__STDC__] [!HAVE_CONFIG_H]: Define PTR as in config.h. + [!__STDC__] [!HAVE_CONFIG_H]: Do not undefine static, because + gperf code needs it. + [HAVE_CONFIG_H] [!PTR]: Define PTR (for use with Xemacs). + [HAVE_CONFIG_H] [!__P]: Define __P (for use with Xemacs). + (xmalloc, xrealloc): Use PTR instead of long *. + (bool): Make it a define, not a typedef, for C++ compilers. + (pattern): Members renamed to avoid name clash in some C++ compilers. + (get_language_from_langname): Use const argument. + +2001-12-12 Francesco Potorti` + + * etags.c (PHP_functions): New function by Diez B. Roggisch, + heavily adapted by me, for parsing PHP. + (LOOKING_AT): New macro. + (Perl_functions, Python_functions, PHP_functions) + (Scheme_functions, Texinfo_nodes): Use it. + (Perl_functions): Use strneq. + (prolog_pred): Renamed to prolog_pr. + (prolog_pr): Recognise Prolog rules (thanks to Geert Kloosterman) + in addition to predicates. + [ETAGS_REGEXPS] [!HAVE_CONFIG_H] [__CYGWIN__]: Prevent + unmodified compile, as Cygwin's regex.h is incompatible with us + (thanks to Markus Hoenicka). + [!HAVE_CONFIG_H] [!__STDC__]: #define const as the empty string. + +2001-05-11 Francesco Potorti` + + * etags.c (add_regex): Reset the whole newly allocated pattern + buffer instead of the individual members. It's safer and works + with Xemacs. + +2001-02-23 Francesco Potorti` + + * etags.c (enum sym_type): New label st_C_template. + (gperf input): Use it for switching to C++ from C. + (consider_token): Do it. + +2001-02-16 Francesco Potorti` + + * etags.c (C_entries): Initialise typdefcblev to quiet compilers. + +2001-02-06 Francesco Potorti` + + * etags.c [!HAVE_CONFIG_H] [!__STDC__]: #define static as nothing. + +2001-01-31 Francesco Potorti` + + * etags.c: [NDEBUG] #undef assert and #define it as ((void)0), for + the sake of some buggy assert.h (e.g. in MinGW and sunos4 pcc). + (C_entries): Tag token renamed to still_in_token because sunos4 + pcc wants to expand it as the token() macro even though it has no + arguments. + +2001-01-30 Francesco Potorti` + + * etags.c: [WIN32-NATIVE]: #undef MSDOS, #undef WINDOWSNT and + #define it for the sake of Xemacs. + [WINDOWSNT]: #undef HAVE_NTGUI even if built without + HAVE_CONFIG_H. This change only affects a standalone etags. + [WINDOWSNT]: #undef DOS_NT and #define it even if built with + HAVE_CONFIG_H. This change does nothing in Emacs, as DOS_NT is + always defined when HAVE_CONFIG_H and WINDOWS are both defined. + [!HAVE_UNISTD_H]: use defined(WINDOWSNT) instead of the bare + WINDOWSNT, as this is the correct way to use it. + +2001-01-28 Francesco Potorti` + + * etags.c: Be capable to parse nested struct-like structures. + (structdef, structtag): Struct state machine revisited. + (struct tok): Revisited. + (cstack, nestlev, instruct): New struct and macros. + (pushclass_above, popclass_above, write_classname): New functions + for dealing with nested class names, inspired by Mykola Dzyuba. + (consider_token, make_C_tag, C_entries): Many changes for dealing + with arbitrarily nested structures. + (etags_getcwd): #if MSDOS, not #ifdef MSDOS! + (C_entries): Consider templates in C++. + (sym_type): New constant st_C_class for detecting "class" also in + C mode. + (C_AUTO): New macro for automatic detection of C++. + (consider_token): Automatic set C++ mode. + (C_entries): New security check for yacc. + (print_language_names, print_help): Mention the autodetect + feature, do not show help for the -C option, now mostly useless. + (C_entries): Tag C++ forward declarations if --declarations. + (C_entries): Don't be fooled by things like XDEFUN. + (consider_token): Discard asm pseudo function. + +2001-01-25 Francesco Potorti` + + * etags.c (struct tok): Renamed from struct token. + (token): Renamed from tok. + (structtype): Make it a local variable. + [DEBUG]: Use assert. + (xrnew): Change the synopsis. + (typedefs_or_cplusplus): Renamed from typedefs_and_cplusplus. + (grow_linebuffer): Don't call xrnew when not needed. + (token): buffer renamed to line. + (C_entries): Three calls to inibuffer moved here from main. + (C_entries): Removed all references to var methodlen, delete it. + (linebuffer_setlen): Was grow_buffer, now also sets len. + (consider_token, C_entries, Pascal_functions): Use it. + (C_entries): Preventing problems relative to extern "C". + (C_entries): Can tag more than one variable or func separated by + comma when --declarations is used. + (C_entries): More accurate tagging of members and declarations. + (yacc_rules): Was global, made local to C_entries. + (next_token_is_func): Removed. + (fvdef): New constants fdefunkey, fdefunname. + (consider_token, C_entries): Use them. + (C_entries): Build proper lisp names for Emacs DEFUNs. + +2001-01-15 Francesco Potorti` + + * etags.c (print_language_names): Print filenames in addition to + suffixes. + +2001-01-12 Francesco Potorti` + + * etags.c (get_language_from_langname): Renamed from + get_language_from_name. + (get_language_from_filename): Renamed from + get_language_from_suffix. Now first looks for the complete file + name. + (language): New member char **filenames. + (Makefile_filenames): List of possible filenames for makefiles. + (lang_names): Added a NULL member for every entry, added an entry + for makefiles. + (Makefile_targets): New function, inspired by Assar Westerlund + . + +2000-11-07 Francesco Potortì + + * etags.c (Texinfo_nodes): Renamed from Texinfo_fuctions and made + it conformant to the style of the rest of the code. + +2000-02-10 Francesco Potorti` + + * etags.c (iswhite): Redefined not to consider '\0' as white + space, and use it throughout in place of isspace, thus preventing a + potential signed char to int conversion problem. + (MSDOS): #undefine befere redefining + +2000-02-04 Francesco Potorti` + + * etags.c (many functions): Add prototypes. + +2000-01-31 Francesco Potorti` + + * etags.c [MSDOS]: Set MSDOS to 1 if #defined, 0 otherwise. + (get_compressor_from_suffix, process_file): Use MSDOS in if clause. + (etags_strchr, etags_strrchr): Use const char * and int as arguments. + (getenv, getcwd): Only declare them if necessary. + (EMACS_NAME): New constant macro. + (print_version): Use it. + (P_) [__STDC__]: Macro for defining function prototypes. + +2000-01-18 Fabrice Popineau + + * etags.c [WINDOWSNT]: #include + +2000-01-18 Martin Buchholz + + * etags.c (all functions): Made them static. + (all functions): Write prototypes. + +1999-11-19 Francesco Potorti` + + * etags.c (_GNU_SOURCE): Define only if undefined. + (get_scheme): Declaration deleted. + (main): error was called with an integer as second arg, instead of + a char pointer. + (canonicalize_filename): Bug removed. + +1999-11-18 Dave Love + + * etags.c (C_entries): Rename label `intoken', avoiding K&R + lossage from name clash with macro. + +1999-09-14 Francesco Potorti` + + * etags.c: Add suffix psw for PSWrap. + (L_getit): Generalize a "cp!=' '" into "!isspace(*cp)". + (Postscript_functions): Add code for PSWrap. + (Scheme_functions): Use local pointer and new get_tag function. + (get_tag): New name for old get_scheme. + (process_file): Do not free NULL when file does not exist. + (typdef): ttypedefseen renamed to tkeyseen, new label ttypeseen. + (C_entries): Modifications that make --members tag even inside + typedefs and C nested structs (one level only). + (consider_token): Corrected a bug which prevented tagging of enum + constants. + (C_stab_entry): Added if, for, while, switch, return as + st_C_ignore. This makes it simpler to work when cblev!=0. + +1999-04-21 Francesco Potorti` + + * etags.c (C_entries): tag member function declarations when + --declarations is used. + +1999-04-20 Francesco Potorti` + + * etags.c (C_entries, consider_token): C++ `operator' now is + tagged in most cases. + As before, :: is not recognised if surrounded by spaces. + +1999-01-14 Francesco Potorti` + + * etags.c (relative_filename): Account for DOS file names such + that is impossible to make one relative to another. + +1998-10-09 Francesco Potorti` + + * etags.c (sym_type): New st_C_extern tag. + (gperf input): Use it for spotting external declarations. + (print_help): Document the new behaviour of --declarations. + (fvextern): New global variable. + (consider_token, C_entries): Use it. + +1998-06-19 Francesco Potorti` + + * etags.c (HAVE_GETCWD) [WINDOWSNT]: Define if undefined. + (etags_getcwd): Remove test for WINDOWSNT. + +1998-06-16 Eli Zaretskii + + * etags.c (process_file) [MSDOS]: If foo.c.gz is not found, try + foo.cgz, foo.cz, etc. + +1998-06-15 Francesco Potorti` + + * etags.c (declarations): New global switch. + (longopts): Describe it. + (print_help): Document it. + (C_entries): Use it. + (process_file): Don't process a file twice. + +1998-06-02 Francesco Potorti` + + * etags.c (Fortran_functions): No tags for "procedure". + +1998-05-29 Eli Zaretskii + + * etags.c (get_compressor_from_suffix): Second argument EXTPTR, if + non-zero, returns a pointer to where the extension begins; callers + changed. + [MSDOS]: Support DOS file names by handling e.g. foo.cgz as if it + were foo.c.gz. + +1998-05-18 Francesco Potorti` + + * etags.c (sym_type, C_stab_entry): New constant st_C_operator. + (fvdev): New constant foperator. + (consider_token): Use it to get "operator" in C++. + (C_entries): Extend length of operator@ function name. + (C_entries): Use foperator when necessary. + +1998-05-13 Francesco Potorti` + + * etags.c (main) [!ETAGS_REGEXPS]: Do not call free_patterns. + +1998-05-12 Francesco Potorti` + + * etags.c (compressor): New struct for compressed files. + (get_compressor_from_suffix): New function. + (get_language_from_suffix): Use it. Also, semantics changed. + (process_file): Consider compressed files, close file. + (find_entries): Use different call arg for get_language_from_suffix, + don't close file. + +1998-05-11 Francesco Potorti` + + * etags.c (main): Call free_tree. + (find_entries): Do not free curfile. + (pfnote): Cosmetic change: NULL and '\0' where appropriate. + (prolog_pred, erlang_func, substitute): Cast strlen to int when + comparing. + (canonicalize_filename): Shut up compiler warning. + (Perl_functions): Make tag significant. + +1997-11-27 Dave Love + + * etags.c (longopts, optstring): New option --ignore-case-regex (-c). + (argument_type): New member at_icregexp. + (lc_trans): New global. + (main): Fill lc_trans. Process -c args. + (add_regex): New arg determining whether to use translation table. + (analyse_regex): New arg. Use it for add_regex. + +1997-09-30 Francesco Potorti` + + * etags.c (init): Cosmetic change: NULL --> '\0'. + (erlang_attribute): Bug corrected (uninitialized variable). + (filename_is_absolute): New function replaces absolutefn macro and + corrects a bug. All callers changed. + (canonicalize_filename): New function. + (process_file, etags_getcwd, absolute_dirname): Use it. + (relative_filename, absolute_filename): Removed var shadowing. + (C_entries, Pascal_functions): Add fake initializations to keep + compilers quiet. + (TeX_functions, Prolog_functions, Erlang_functions): Cleanup. + +1997-09-20 Francesco Potorti` + + * etags.c (xrnew): New macro. All callers of xrealloc changed. + (language): New typedef (was struct lang_entry). + (curlang): New global variable. + (node): typedef renamed from NODE. + (linebuffer): New typedef (was struct linebuffer). + (pattern): New typedef (was struct pattern). Some members added. + Now used as element of a linked list. + (patterns, num_patterns): Global variables deleted. + (p_head): New global variable. + (forced_lang): New global variable (replaces lang_func). + (get_language_from_name, get_language_from_interpreter, + get_language_from_suffix): Semantics changed. All callers changed. + (last_node): New global variable. + (free_tree, add_node, put_entries, total_size_of_entries): Change + name of local vars to avoid clashes with typedef node. + (number_len): Rewritten for elegance. + (token): New typedef replaces TOKEN. + (analyse_regex, add_regex): Rewritten for new functionality. + (free_patterns): New function called from main and add_regex. + (initbuffer, readline_internal, readline, grow_linebuffer): + Change name of local vars to avoid clashes with typedef + linebuffer. + (readline): Rewritten for new functionality. + +1997-09-04 Francesco Potorti` + + * etags.c: (Scheme_suffixes): New suffix ".ss". + (print_help): --globals is now used for more than C-type languages. + (Perl_functions): Tag global variables ("my" and "local"). + +1997-08-22 Francesco Potorti` + + * etags.c (print_help): Some messages clarified. + (LOOP_ON_INPUT_LINES): New macro. + (just_read_file, Fortran_functions, Asm_labels, Perl_functions, + Python_functions, Cobol_paragraphs, Pascal_functions, + Lisp_functions, Postscript_functions, Scheme_functions, + TeX_functions, Prolog_functions, Erlang_functions): Use it. + (Cobol_paragraphs, Postscript_functions, TeX_functions, + Prolog_functions, Erlang_functions): Use a local variable instead + of the global variable dbp. + (Pascal_functions, L_isquote, Scheme_functions): Use GNU coding + standard indentation. + +1997-08-21 Francesco Potorti` + + * etags.c (Python_suffixes, lang_names, Python_functions): Python + support. + (skip_spaces, skip_non_spaces): Utility functions. + (find_entries, takeprec, getit, Fortran_functions, Perl_functions, + Python_functions, L_getit, Lisp_functions, Scheme_functions, + prolog_pred, erlanf_func, erlang_attribute): Use them. + (eat_white): Deleted. + +1997-08-20 Francesco Potorti` + + * etags.c (CHAR, init): Keep into account non US-ASCII + characters and compilers with default signed chars. + (L_getit): Tag "(defstruct (foo", "(defun (operator" and similar + constructs. + +1997-07-04 Francesco Potorti` + + * (C_stab_entry): "interface" in Java behaves like "class". + +1997-06-23 Francesco Potorti` + + * etags.c: (HAVE_NTGUI) [WINDOWSNT]: #undef if HAVE_CONFIG_H. + (main): Put interval syntax here. + (add_regex): And remove it from here. + +1997-06-17 Francesco Potorti` + + * etags.c (suggest_asking_for_help): Provide a + meaningful help message with and without LONG_OPTIONS. + +1997-06-09 Francesco Potorti` + + * etags.c: [MSDOS]: Include it, don't include string.h. + : Don't test MSDOS when including them. + (white, nonam, endtk): Like elsewhere, use \r instead of \013. + (put_entries): Correctly use %ld instead of %d in printf. + +1997-06-04 Francesco Potorti` + + * etags.c: [HAVE_UNISTD_H]: Include conditionally, else + declare getcwd if HAVE_GETCWD. + (consider_token): Dead break instruction removed. diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF new file mode 100644 index 0000000..1ac6689 --- /dev/null +++ b/etc/ETAGS.EBNF @@ -0,0 +1,114 @@ +-*- indented-text -*- + +See the end of this file for copyright information. + +This file contains two sections: + +1) An EBNF (Extended Backus-Naur Form) description of the format of + the tags file created by etags.c and interpreted by etags.el; +2) A discussion of tag names and implicit tag names. + +====================== 1) EBNF tag file description ===================== + +Productions created from current behaviour to aid extensions +Francesco Potorti` 2002 +---------------- + +FF ::= #x0c /* tag section starter */ + +LF ::= #x0a /* line terminator */ + +DEL ::= #x7f /* pattern terminator */ + +SOH ::= #x01 /* name terminator */ + +regchar ::= [^#x0a#x0c#x7f] /* regular character */ + +regstring ::= { regchar } /* regular string */ + +unsint ::= [0-9] { [0-9] } /* non-negative integer */ + + + +tagfile ::= { tagsection } /* a tags file */ + +tagsection ::= FF LF ( includesec | regularsec ) LF + +includesec ::= filename ",include" [ LF fileprop ] + +regularsec ::= filename "," [ unsint ] [ LF fileprop ] { LF tag } + +filename ::= regchar regstring /* a file name */ + +fileprop ::= "(" regstring ")" /* an elisp alist */ + +tag ::= directtag | patterntag + +directtag ::= DEL realposition /* no pattern */ + +patterntag ::= pattern DEL [ tagname SOH ] position + +pattern ::= regstring /* a tag pattern */ + +tagname ::= regchar regstring /* a tag name */ + +position ::= realposition | "," /* charpos,linepos */ + +realposition ::= "," unsint | unsint "," | unsint "," unsint + +==================== end of EBNF tag file description ==================== + + + +======================= 2) discussion of tag names ======================= + +- WHAT ARE TAG NAMES +Tag lines in a tags file are usually made from the above defined pattern +and by an optional tag name. The pattern is a string that is searched +in the source file to find the tagged line. + +- WHY TAG NAMES ARE GOOD +When a user looks for a tag, Emacs first compares the tag with the tag +names contained in the tags file. If no match is found, Emacs compares +the tag with the patterns. The tag name is then the preferred way to +look for tags in the tags file, because when the tag name is present +Emacs can find a tag faster and more accurately. These tag names are +part of tag lines in the tags file, so we call them "explicit". + +- WHY IMPLICIT TAG NAMES ARE EVEN BETTER +When a tag line has no name, but a name can be deduced from the pattern, +we say that the tag line has an implicit tag name. Often tag names are +redundant; this happens when the name of a tag is an easily guessable +substring of the tag pattern. We define a set of rules to decide +whether it is possible to deduce the tag name from the pattern, and make +an unnamed tag in those cases. The name deduced from the pattern of an +unnamed tag is the implicit name of that tag. + When the user looks for a tag, and Emacs finds no explicit tag names +that match it, Emacs then looks for an tag whose implicit tag name +matches the request. etags.c uses implicit tag names when possible, in +order to reduce the size of the tags file. + An implicit tag name is deduced from the pattern by discarding the +last character if it is one of ` \f\t\n\r()=,;', then taking all the +rightmost consecutive characters in the pattern which are not one of +those. + +===================== end of discussion of tag names ===================== + +Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 +Free Software Foundation, Inc. + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/etc/ETAGS.README b/etc/ETAGS.README new file mode 100644 index 0000000..aef3aa6 --- /dev/null +++ b/etc/ETAGS.README @@ -0,0 +1,49 @@ +etags is distributed under the following conditions: + + +Copyright (C) 1984 The Regents of the University of California + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. +3. Neither the name of the University nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Copyright (C) 1984, 1987, 1988, 1989, 1993, 1994, 1995, 1998, 1999, + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. + +This file is not considered part of GNU Emacs. + +This program 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 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/etc/NEWS b/etc/NEWS index 99800a4..d702208 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -33,7 +33,10 @@ consulted for a more detailed list of changes. ======================== ** Summary of user-visible changes: - + -- Motif is now deprecated on linux and cygwin. + -- On UNIX and linux, '--with-widgets=no' is now the default. If + you want buffer tabs or the progress bar, you must run configure + with the option '--with-widgets=lucid' or a different toolkit. -- PUI related changes (Package User Interface) - A minor rearrangement of the "Tools -> Packages" menu. - Only a single package download site can be selected. @@ -117,6 +120,8 @@ consulted for a more detailed list of changes. - In Perl, the --globals option tags global variables. - Python now supported. - New file extensions recognized: .ss, .pdb, .psw. + -- Fixed ldap libraries configuration. + -- Fixed `LDAP_OPT_ON' libraries configuration. ** The delete key now deletes forward by default. @@ -599,19 +604,33 @@ def and class at the beginning of a line are tags. .ss files are Scheme files, .pdb is Postscript with C syntax, .psw is for PSWrap. +** Fixed ldap libraries configuration. + +It used to fail when `-lldap' requires `-llber'. Introduced in +upstream `configure.in' revision 1.151.2.31 (2005/01/31 02:54:47 +0). + +*** Fixed `LDAP_OPT_ON' libraries configuration. + +The original fix of local `configure.in' revision 1.19 (2004/12/19 +21:10:02 +0) introduced lossage on another class of systems. In some +openldap versions `ldap_*' functions may link successfully without +`-lber', but compiling and linking program with `LDAP_OPT_ON' may +require `-lber'. When configuring ldap libraries, check for such +systems, and in a cleaner way than in upstream. + * Lisp and internal changes in XEmacs 21.4 ========================================== -** A new portable dumper is available for beta testing. +** A new portable dumper is available. Olivier Galibert has written a portable dumper for XEmacs, based on -initial work by Kyle Jones. To perform even the most basic editor, -XEmacs requires some amount of Lisp code to be loaded. To avoid -repeating the expensive loading process at every startup, XEmacs is -built in a special way. Its C sources link into an executable called -`temacs', which loads the bootstrap Lisp code and uses a special -"unexec" call to dump the resulting memory image into a proper +initial work by Kyle Jones. To perform even the most basic editor +functions, XEmacs requires some amount of Lisp code to be loaded. To +avoid repeating the expensive loading process at every startup, XEmacs +is built in a special way. Its C sources link into an executable +called `temacs', which loads the bootstrap Lisp code and uses a +special "unexec" call to dump the resulting memory image into a proper `xemacs' executable on disk. The unexec() process is hard to implement correctly and makes XEmacs very hard to port to new operating systems, or even to new releases of old systems. @@ -623,11 +642,10 @@ running XEmacs only needs to mmap that file and relocate a bit to get to the initialized data. In that scheme, there is no difference between `temacs' and `xemacs'. -Unfortunately, the portable dumper has not been completely finished -for this release, and will not be used by default. However, if you -wish to experiment with it, or if you need to compile XEmacs on a new -and unsupported platform, you can test it by configuring XEmacs with -`--pdump' flag. +The portable dumper will not be used by default in this release, +however, if you wish to experiment with it, or if you need to compile +XEmacs on a new and unsupported platform, you can test it by +configuring XEmacs using the `--pdump' flag. ** Much effort has been invested to make XEmacs Lisp faster: diff --git a/etc/OXYMORONS b/etc/OXYMORONS index 6005b5c..0c8dcc9 100644 --- a/etc/OXYMORONS +++ b/etc/OXYMORONS @@ -14,11 +14,6 @@ two months, and for the success of the GTK merge. Without the prospect of such a big win, I could not have justified trying to coordinate a release myself. -The rest of the codenames are in alphabetical order. - -N.B. I expect that the Stable Release Maintainer will choose a new -theme for the releases following the promotion of 21.4 from "gamma" to -"stable". So 15 or so should be enough.... 21.4.0: Solid Vapor 21.4.1: Copyleft @@ -39,13 +34,14 @@ theme for the releases following the promotion of 21.4 from "gamma" to 21.4.16: Corporate Culture 21.4.17: Jumbo Shrimp 21.4.18: Social Property -21.4.19: Stable Release Maintainer -21.4.20: Standard C -21.4.21: Successful IPO -21.4.22: Sufficiently Smart Compiler -21.4.23: The Gift Economy -21.4.24: Too Much Mozart -21.4.25: UTF-8 BOM +21.4.19: Constant Variable +21.4.20: Double Solitaire +21.4.21: Educational Television +21.4.22: Instant Classic +21.4.23: Moral Majority +21.4.24: Standard C +21.4.25: Too Much Mozart +21.4.26: Working Vacation + -N.B. Only incredibly redeeming suggestions can be accepted now. diff --git a/etc/PACKAGES b/etc/PACKAGES index e1720e1..330952d 100644 --- a/etc/PACKAGES +++ b/etc/PACKAGES @@ -234,6 +234,9 @@ Deprecated collection of DTDs for psgml. *** python-modes Python support. +*** re-builder +Interactive development tool for regular expressions. + *** reftex Emacs support for LaTeX cross-references, citations. @@ -341,6 +344,9 @@ XEmacs Lisp developer support. This package contains utilities for supporting Lisp development. It is a single-file package so it may be tailored. +*** xetla +Frontend to GNU/arch (tla). + *** xlib Emacs interface to X server. @@ -370,6 +376,9 @@ MULE: Lisp Interface to EDICT, Kanji Dictionary. *** egg-its MULE: Wnn (4.2 and 6) support. SJ3 support. +*** latin-euro-standards +MULE: Support for the Latin{7,8,9,10} character sets & coding systems. + *** latin-unity MULE: find single ISO 8859 character set to encode a buffer. @@ -383,7 +392,7 @@ MULE: Localized menubars and localized splash screens. MULE: Dictionary support. *** mule-base -MULE: Basic Mule support, required for building with Mule. +MULE: Basic Mule support. *** mule-ucs MULE: Extended coding systems (including Unicode) for XEmacs. diff --git a/etc/TUTORIAL.cs b/etc/TUTORIAL.cs new file mode 100644 index 0000000..163c3e5 --- /dev/null +++ b/etc/TUTORIAL.cs @@ -0,0 +1,1043 @@ +Copyright (c) 1985 Free Software Foundation, Inc; podmínky viz na konci. +Do èe¹tiny pøelo¾il Milan Zamazal . + +Máte pøed sebou tutoriál k Emacsu. + +Pøíkazy Emacsu obecnì vyu¾ívají klávesu CONTROL (obèas oznaèovanou CTRL nebo +CTL) nebo klávesu META (obèas oznaèovanou EDIT nebo ALT). Abychom tyto názvy +nemuseli stále psát v plném znìní, budeme pou¾ívat následující zkratky: + + C- znamená pøidr¾et klávesu CONTROL a stisknout znak . + Tedy C-f znamená: pøidr¾te klávesu CONTROL a stisknìte f. + M- znamená pøidr¾et klávesu META, EDIT nebo ALT a stisknout . + Pokud ¾ádnou z kláves META, EDIT ani ALT nemáte, tak místo toho + stisknìte a pus»te klávesu ESC a poté . Klávesu ESC budeme + znaèit . + +Dùle¾itá poznámka: práci s Emacsem ukonèíte stiskem C-x C-c (dva znaky). +Znaky ">>" na levém okraji znaèí místa, kde si máte vyzkou¹et pøíkaz. +Napøíklad: +<> +>> Nyní stisknìte C-v (view next screen) pro posun na dal¹í obrazovku. + (Smìle do toho, proveïte to pøidr¾ením klávesy CONTROL a stiskem v.) + Od této chvíle byste toto mìli provádìt kdykoliv doètete zobrazenou + obrazovku. + +V¹imnìte si, ¾e pøi posuvu obrazovek v¾dy zùstávají zobrazeny dva øádky +z pøedchozí obrazovky; to poskytuje urèitou návaznost pøi postupném +ètení textu. + +První vìc, kterou potøebujete vìdìt, je jak se v textu pohybovat +z jednoho místa na druhé. U¾ víte, jak se posunout o jednu obrazovku +vpøed, pomocí C-v. K pøechodu o obrazovku zpìt pou¾ijte M-v +(pøidr¾te klávesu META a stisknìte v nebo stisknìte v, jestli¾e +nemáte ¾ádnou z kláves META, EDIT nebo ALT). + +>> Zkuste stisknout M-v a pak C-v, nìkolikrát to zopakujte. + + +* SHRNUTÍ +--------- + +K prohlí¾ení obrazovkových stránek jsou u¾iteèné následující pøíkazy: + + C-v Posun o obrazovku vpøed + M-v Posun o obrazovku zpìt + C-l Smazání obrazovky a znovuzobrazení celého textu, + pøitom se text pod kurzorem pøesune ke støedu obrazovky. + (Jedná se o CONTROL-L a ne CONTROL-1.) + +>> Najdìte kurzor a zapamatujte si, jaký text je kolem nìj. + Pak stisknìte C-l. + Najdìte kurzor znovu a v¹imnìte si, ¾e je kolem nìj tentý¾ text. + + +* ZÁKLADNÍ OVLÁDÁNÍ KURZORU +--------------------------- + +Pohyb mezi obrazovkami je u¾iteèný, ale jak se pøemístíte na konkrétní +místo v textu na obrazovce? + +Je toho mo¾no dosáhnout nìkolika zpùsoby. Nejzákladnìj¹ím zpùsobem je +pou¾ití pøíkazù C-p, C-b, C-f a C-n. Ka¾dý z tìchto pøíkazù pøesune +kurzor na obrazovce o jeden øádek nebo sloupec v daném smìru. +Zde je tabulka znázoròující smìr posuvu kurzoru vyvolaný tìmito ètyømi +pøíkazy: + + Pøedchozí øádek, C-p + : + : + Dozadu, C-b .... Momentální pozice kurzoru .... Dopøedu, C-f + : + : + Následující øádek, C-n + +>> Pøesuòte kurzor na prostøední øádek tohoto diagramu pomocí + C-n nebo C-p. Potom stisknìte C-l, abyste na obrazovce vidìli celý + diagram vycentrován. + +Pravdìpodobnì se vám budou tyto pøíkazy snadno pamatovat podle +poèáteèních písmen anglických názvù: P jako previous (pøedchozí), +N jako next (následující), B jako backward (zpìt), F jako forward (vpøed). +Jsou to základní pøíkazy pro pohyb kurzoru a budete je pou¾ívat +neustále, tak¾e by bylo velmi vhodné, kdybyste se je teï nauèili. + +>> Proveïte nìkolikrát C-n, abyste kurzor pøesunuli na tento øádek. + +>> Posuòte kurzor dovnitø øádku pomocí nìkolika C-f a pak nahoru stiskem C-p. + Pozorujte, co C-p dìlá, kdy¾ je kurzor uprostøed øádku. + +Ka¾dý øádek textu konèí znakem nového øádku, který jej oddìluje od øádku +následujícího. Znakem nového øádku by mìl být ukonèen i poslední øádek +souboru (pøesto¾e to Emacs nevy¾aduje). + +>> Vyzkou¹ejte C-b na zaèátku øádku. Kurzor by se mìl pøesunout na konec + pøedchozího øádku, nebo» jej tím pøesunete pøes znak nového øádku. + +C-f funguje analogicky jako C-b, tj. na konci øádku dojde k pøesunu na +dal¹í øádek. + +>> Proveïte nìkolik C-b, tak¾e uvidíte, kde se nachází kurzor. + Pak provádìjte C-f, abyste se vrátili na konec øádku. + Pak proveïte je¹tì jednou C-f, abyste se pøesunuli na následující + øádek. + +Kdy¾ kurzorem pøejdete pøes horní nebo dolní okraj obrazovky, posune se +text za pøíslu¹ným okrajem na obrazovku. Tato vlastnost se nazývá +"scrollování". Umo¾òuje pøemístit kurzor na libovolné místo v textu, +ani¾ by kurzor opustil obrazovku. + +>> Zkuste posunout kurzor pod dolní okraj obrazovky pomocí C-n a pozorujte, + co se stane. + +Jestli¾e je posun po znacích pøíli¹ pomalý, mù¾ete se pohybovat po +slovech. M-f (META-f) provádí posun o slovo vpøed a M-b provádí posun +o slovo zpìt. + +>> Stisknìte nìkolikrát M-f a M-b. + +Pokud se kurzor nachází uprostøed slova, M-f provede pøesun na konec +tohoto slova. Nachází-li se kurzor v mezeøe mezi slovy, M-f provede +pøesun na konec následujícího slova. M-b pracuje analogicky v opaèném +smìru. + +>> Stisknìte nìkolikrát M-f a M-b prolo¾enì s C-f a C-b, abyste vidìli + výsledky pøíkazù M-f a M-b provádìných z rùzných míst uvnitø slov a + mezi nimi. + +V¹imnìte si analogie mezi C-f a C-b na jedné stranì a M-f a M-b na +stranì druhé. Znaky s klávesou META jsou velmi èasto vyu¾ívány pro operace +vztahující se k entitám definovaným jazykem (slova, vìty, odstavce), +zatímco znaky s klávesou CONTROL pracují na základních prvcích +nezávislých na tom, co zrovna editujete (znaky, øádky, apod.). + +Tato analogie platí také pro øádky a vìty: C-a a C-e provádí pøesun +na zaèátek a konec øádku, M-a a M-e provádí pøesun na zaèátek a konec +vìty. + +>> Zkuste nìkolikrát C-a a poté nìkolikrát C-e. + Zkuste nìkolikrát M-a a poté nìkolikrát M-e. + +V¹imnìte si, ¾e opakované C-a nedìlá nic, zatímco opakované M-a v¾dy +provádí posun o dal¹í vìtu. Principu analogie to sice pøíli¹ +neodpovídá, ale pøesto je toto chování mo¾no pova¾ovat za pøirozené. + +Pozice kurzoru v textu se také nazývá "bod" ("point"). Abychom to +parafrázovali, kurzor je vidìt na obrazovce v místì, kde je bod umístìn +v textu. + +Zde je pøehled jednoduchých operací pro pohyb kurzoru vèetnì pøíkazù pro +pohyb mezi slovy a vìtami: + + C-f Pøesun o znak vpøed + C-b Pøesun o znak zpìt + + M-f Pøesun o slovo vpøed + M-b Pøesun o slovo zpìt + + C-n Pøesun na následující øádek + C-p Pøesun na pøedchozí øádek + + C-a Pøesun na zaèátek øádku + C-e Pøesun na konec øádku + + M-a Pøesun zpìt na zaèátek vìty + M-e Pøesun vpøed na konec vìty + +>> Vyzkou¹ejte si teï nìkolikrát v¹echny tyto pøíkazy pro procvièení. + Jsou to nejpou¾ívanìj¹í pøíkazy. + +Dal¹í dva dùle¾ité pøíkazy pro pohyb kurzoru jsou M-< (META men¹í-ne¾), +který provede pøesun na zaèátek celého textu, a M-> (META vìt¹í-ne¾), +který provede pøesun na konec celého textu. + +Na vìt¹inì terminálù je "<" nad èárkou, tak¾e pro vyvolání tohoto znaku +musíte pou¾ít klávesu Shift. Na tìchto terminálech je tedy nutno pou¾ít +klávesu Shift i v pøípadì pøíkazu M-<; bez klávesy Shift byste provedli +M-èárka. + +>> Zkuste teï M-< pro pøesun na zaèátek tutoriálu. + Pou¾ijte pak opakovanì C-v, abyste se opìt vrátili sem. + +>> Zkuste teï M-> pro pøesun na konec tutoriálu. + Pou¾ijte pak opakovanì M-v, abyste se opìt vrátili sem. + +Kurzor mù¾ete pøesouvat také pomocí kurzorových kláves (klávesy +se ¹ipkami), pokud je vá¹ terminál má. My v¹ak doporuèujeme nauèit se +C-b, C-f, C-n a C-p, a to ze tøí dùvodù. Za prvé, tyto klávesy fungují +na v¹ech typech terminálù. Za druhé, jakmile jednou získáte cvik +v pou¾ívání Emacsu, zjistíte, ¾e pou¾ívání tìchto CTRL znakù je +rychlej¹í ne¾ pou¾ívání kurzorových kláves (proto¾e nemusíte pøesouvat +ruku z psací pozice). Za tøetí, zvyknete-li si pou¾ívat tyto CTRL-znak +pøíkazy, snadno se nauèíte pou¾ívat jiné pokroèilé pøíkazy pro pohyb +kurzoru. + +Vìt¹ina pøíkazù Emacsu akceptuje numerický argument; ten pro vìt¹inu +pøíkazù slou¾í jako opakovaè. Poèet opakování pøíkazu zadáte +prostøednictvím stisku C-u následovaného stiskem pøíslu¹ných èíslic pøed +vyvoláním pøíkazu. Máte-li META (nebo EDIT èi ALT) klávesu, existuje +alternativní mo¾nost zadání numerického argumentu: pøidr¾te klávesu META +a stisknìte pøíslu¹né èíslice. Doporuèujeme nauèit se C-u metodu, +proto¾e ta funguje na jakémkoliv terminálu. + +Napøíklad C-u 8 C-f provede pøesun o osm znakù vpøed. + +Vìt¹ina pøíkazù pou¾ívá numerický argument jako opakovaè. Jisté +výjimeèné pøíkazy jej pou¾ívají jiným zpùsobem. Mezi tyto výjimky patøí +C-v a M-v. Dostanou-li numerický argument, posunou obrazovku nahoru +nebo dolù o odpovídající poèet øádkù místo obrazovek. Napøíklad +C-u 4 C-v posune obrazovku o 4 øádky. + +>> Zkuste teï stisknout C-u 8 C-v. + +To by mìlo posunout obrazovku o 8 øádkù nahoru. Pokud byste ji chtìli +posunout zpìt dolù, mù¾ete dát argument pøíkazu M-v. + +Pou¾íváte-li X Window, mìli byste mít na levé stranì emacsového okna +vysokou obdélníkovou oblast, nazývanou scrollbar. Mù¾ete pak text +posouvat klikáním my¹í na scrollbar. + +>> Zkuste stisknout prostøední tlaèítko na vrcholu zvýraznìné oblasti + uvnitø scrollbaru. To by mìlo text posunout na pozici danou tím, jak + vysoko nebo nízko jste kliknuli. + +>> Zkuste pøi stisknutém prostøedním tlaèítku posouvat my¹í nahoru a + dolù. Uvidíte, jak se text posouvá nahoru a dolù podle toho, jak + posouváte my¹í. + + +* KDY® EMACS NEREAGUJE +---------------------- + +Jestli¾e Emacs pøestane reagovat na va¹e pøíkazy, mù¾ete probíhající +èinnost bezpeènì zastavit pomocí C-g. Pomocí C-g mù¾ete zastavit +pøíkaz, jeho¾ provádìní trvá pøíli¹ dlouho. + +C-g mù¾ete pou¾ít také pro odstranìní numerického argumentu pøíkazu, +který nechcete dokonèit. + +>> Stisknìte C-u 100 pro vytvoøení numerického argumentu 100 a pak + stisknìte C-g. Nyní stisknìte C-f. Mìl by být proveden posun + o právì jeden znak, proto¾e jste argument zru¹ili prostøednictvím + C-g. + +Pokud jste omylem stiskli , mù¾ete se jej zbavit pomocí C-g. + + +* DEAKTIVOVANÉ PØÍKAZY +---------------------- + +Nìkteré pøíkazy Emacsu jsou "deaktivované" ("disabled"), aby je +zaèínající u¾ivatelé nemohli vyvolat náhodnì. + +Pokud vyvoláte nìkterý z deaktivovaných pøíkazù, Emacs zobrazí hlá¹ení +oznamující, který pøíkaz to byl, s dotazem, zda chcete tento pøíkaz +provést. + +Pokud opravdu chcete pøíkaz vyzkou¹et, stisknìte mezerník jako odpovìï +na tuto otázku. Obyèejnì, jestli¾e nechcete deaktivovaný pøíkaz +provést, odpovìzte na tuto otázku pomocí "n". + +>> Stisknìte : (co¾ je deaktivovaný pøíkaz), + pak na otázku odpovìzte n. + + +* OKNA +------ + +Emacs mù¾e mít nìkolik oken (windows), z nich¾ ka¾dé zobrazuje svùj +vlastní text. Jak více oken pou¾ívat, objasníme pozdìji. Nyní chceme +objasnit, jak se zbavit nadbyteèných oken a vrátit se do základní +jednookenní editace. Je to jednoduché: + + C-x 1 Jedno okno (tj. zru¹ení v¹ech ostatních oken) + +Tedy vlo¾ení CONTROL-x následované èíslicí 1. C-x 1 roz¹íøí okno +obsahující kurzor pøes celou obrazovku. Zru¹í to v¹echna ostatní okna. + +>> Stisknìte C-h k C-f. + Pozorujte, jak se aktuální okno zmen¹í a objeví se nové okno za + úèelem zobrazení dokumentace k pøíkazu C-f. + +>> Stisknìte C-x 1 a pozorujte, jak okno s dokumentací zmizí. + + +* VKLÁDÁNÍ A MAZÁNÍ +------------------- + +Chcete-li vlo¾it text, prostì jej napi¹te. Znaky, které vidíte, +jako A, 7, *, atd., jsou Emacsem chápány jako text a vkládány okam¾itì. +Pro vlo¾ení znaku nového øádku stisknìte (klávesu Enter). + +Poslední znak, který jste napsali, mù¾ete smazat stiskem . + je klávesa, která mù¾e být na klávesnici oznaèena "Del". +V nìkterých pøípadech jako slou¾í klávesa "Backspace", av¹ak ne +v¾dy! + +Obecnìji, ma¾e znak bezprostøednì pøed momentální pozicí +kurzoru. + +>> Proveïte to teï -- napi¹te nìkolik znakù a pak je sma¾te nìkolika + stisky . Nebojte se zmìn v tomto souboru; originální + tutoriál se nezmìní. Toto je va¹e osobní kopie. + +Kdy¾ se øádek textu zvìt¹í natolik, ¾e pøesáhne jeden øádek obrazovky, +je zobrazen na více øádcích obrazovky. Øádek textu, který pokraèuje na +dal¹ím øádku obrazovky, je indikován zpìtným lomítkem ("\") na pravém +okraji obrazovky. + +>> Vkládejte text, a¾ dosáhnete pravého okraje, a pokraèujte ve vkládání. + Objeví se vám pokraèovací øádek. + +>> Pou¾ijte pro smazání textu, a¾ se øádek textu opìt vejde na + jeden øádek obrazovky. Pokraèovací øádek zmizí. + +Znak nového øádku mù¾ete smazat jako kterýkoliv jiný znak. Smazání +znaku nového øádku mezi dvìma øádky zpùsobí jejich spojení do jediného +øádku. Je-li výsledný øádek pøíli¹ dlouhý na to, aby se ve¹el na ¹íøku +obrazovky, bude zobrazen pokraèovacím øádkem. + +>> Pøesuòte kurzor na zaèátek øádku a stisknìte . To tento + øádek spojí s øádkem pøedchozím. + +>> Stisknìte pro znovuvlo¾ení smazaného znaku nového øádku. + +Vzpomeòte si, ¾e vìt¹ina pøíkazù Emacsu mù¾e dostat poèet opakování; +vèetnì textových znakù. Opakování textových znakù je vlo¾í nìkolikrát. + +>> Vyzkou¹ejte si to teï -- stisknìte C-u 8 * pro vlo¾ení ********. + +Teï u¾ znáte nejzákladnìj¹í zpùsoby, jak nìco v Emacsu napsat a jak +opravovat chyby. Mù¾ete ov¹em také mazat po slovech nebo po øádcích. +Zde je shrnutí operací pro mazání textu: + + Smazání znaku bezprostøednì pøed kurzorem + C-d Smazání znaku následujícího za kurzorem + + M- Zru¹ení slova bezprostøednì pøed kurzorem + M-d Zru¹ení slova následujícího za kurzorem + + C-k Zru¹ení textu od pozice kurzoru do konce øádku + M-k Zru¹ení textu do konce aktuální vìty + +V¹imnìte si, ¾e a C-d, resp. M- a M-d, roz¹iøují +paralelu zapoèatou C-f a M-f (pravda, opravdu není CONTROL +znak, ale netrapme se tím). C-k a M-k jsou jako C-e a M-e ve smyslu +vztahu øádkù k vìtám. + +Libovolnou èást bufferu mù¾ete té¾ zru¹it následující metodou. +Pøesuòte se na jeden konec této èásti a stisknìte C-@ nebo C-SPC +(libovolnou z tìchto kombinací). (SPC oznaèuje mezerník.) Pøesuòte +se na druhý konec této èásti a stisknìte C-w. Text mezi tìmito +pozicemi bude zru¹en. + +>> Pøesuòte kurzor na písmeno L na zaèátku pøedchozího odstavce. +>> Stisknìte C-SPC. Emacs by mìl ve spodním øádku obrazovky + zobrazit zprávu "Mark set". +>> Pøesuòte kurzor na písmeno c ve slovì "konec" na druhém øádku + odstavce. +>> Stisknìte C-w. Text zaèínající písmenem L a konèící pøed písmenem + c bude zru¹en. + +Uvìdomte si, ¾e rozdíl mezi "ru¹ením" ("killing") a "mazáním" +("deleting") je ten, ¾e "zru¹ené" vìci mohou být zpìt vhozeny, zatímco +"smazané" nikoliv. Obecnì pøíkazy, které mohou smazat vìt¹í mno¾ství +textu, ukládají text, zatímco pøíkazy, které ma¾ou jediný znak nebo +pouze prázdné øádky a mezery, mazaný text neukládají. + +>> Pøesuòte kurzor na zaèátek neprázdného øádku. + Pak stisknìte C-k pro zru¹ení textu na tomto øádku. +>> Stisknìte C-k podruhé. Uvidíte, ¾e to zru¹í znak nového øádku, který + je za tímto øádkem. + +V¹imnìte si, ¾e jedno C-k zru¹í obsah øádku a druhé C-k zru¹í øádek +samotný a posune v¹echny dal¹í øádky nahoru. C-k zpracovává numerický +argument speciálnì: zru¹í odpovídající poèet øádkù VÈETNÌ jejich +obsahu. To u¾ není opakování. C-u 2 C-k zru¹í dva øádky a jejich +obsah; dvojitý stisk C-k by toto obvykle neudìlal. + +Vracení textu zpìt se nazývá "vhazování" ("yanking"). (Pøedstavte +si opìtovné vhazování, vracení døíve odstranìného textu zpátky.) +Zru¹ený text mù¾ete vhodit buï na stejné místo, kde byl zru¹en, +nebo na jiné místo v bufferu, nebo dokonce i do jiného souboru. +Text mù¾ete vhodit i vícekrát, vytváøíte tak jeho dal¹í kopie. + +Pøíkazem pro vhazování je C-y. Tento pøíkaz vlo¾í poslední smazaný +text na pozici, na které se nachází kurzor. + +>> Zkuste to; stisknìte C-y pro vhození textu zpìt. + +Stisknete-li nìkolikrát C-k po sobì, v¹echen smazaný text je ulo¾en +spoleènì tak, aby bylo mo¾né vhodit zpìt v¹echny øádky najednou. + +>> Stisknìte nìkolikrát C-k. + +Nyní obnovte poslednì zru¹ený text: + +>> Stisknìte C-y. Pak posuòte kurzor o nìkolik øádkù ní¾e a stisknìte + C-y znova. Nyní vidíte, jak lze text kopírovat. + +Co kdy¾ máte nìjaký text, který byste rádi vhodili zpìt a pak zru¹íte +nìco jiného? C-y by vlo¾ilo poslední zru¹ený text. Av¹ak pøedchozí +text není ztracen. Mù¾ete jej získat zpìt pou¾itím pøíkazu M-y. Poté, +co provedete C-y pro získání posledního zru¹eného textu, stisk M-y +vymìní tento vhozený text za pøedchozí zru¹ený text. Dal¹ími a +dal¹ími stisky M-y dostáváte pøedcházející a pøedcházející zru¹ené +texty. Kdy¾ dosáhnete textu, který hledáte, nemusíte s ním pro jeho +uchování nic dal¹ího provádìt. Jednodu¹e vhozený text ponechejte, kde +je, a pokraèujte v editaci. + +Pokud opakujete M-y dostateènì dlouho, dostanete se zpátky k výchozímu +bodu (poslednì zru¹enému textu). + +>> Zru¹te øádek, pøesuòte kurzor nìkam jinam a zru¹te jiný øádek. + Pak proveïte C-y pro vrácení druhého zru¹eného øádku. + Pak proveïte M-y a vhozený øádek bude nahrazen prvním zru¹eným øádkem. + Opakujte M-y a pozorujte, co dostáváte. Pokraèujte v tom, dokud se + znovu neobjeví druhý zru¹ený øádek a pak nìkolik dal¹ích. + Chcete-li, mù¾ete zkusit pøedat M-y kladné a záporné argumenty. + + +* UNDO +------ + +Jestli¾e provedete v textu zmìnu a pak zjistíte, ¾e to byl omyl, mù¾ete +zmìnu vrátit pøíkazem undo, C-x u. + +C-x u obvykle vrátí zmìny provedené jedním pøíkazem; pokud C-x u +zopakujete nìkolikrát za sebou, ka¾dé opakování vrátí jeden dal¹í +pøíkaz. + +Jsou ale dvì výjimky: pøíkazy, které nemìní text, se nepoèítají (to +zahrnuje pøíkazy pro pohyb kurzoru a scrollování) a znaky vkládající +samy sebe jsou obvykle zpracovávány ve skupinách a¾ po 20. (To je kvùli +tomu, aby se zredukoval poèet C-x u nutných pro vrácení vkládaného +textu.) + +>> Zru¹te tento øádek pomocí C-k, stisknìte pak C-x u a øádek by se mìl + znovu objevit. + +Alternativní undo pøíkaz je C-_; pracuje stejnì jako C-x u, je v¹ak +ménì pracné jej aplikovat nìkolikrát za sebou. Nevýhodou C-_ je, ¾e +na nìkterých klávesnicích není zøejmé, jak jej vyvolat. To je dùvod, +proè nabízíme i C-x u. Na nìkterých terminálech mù¾ete C-_ vyvolat +stiskem / pøi stisknutém CTRL. + +Numerický argument pro C-_ a C-x u funguje jako poèet opakování. + +Pomocí pøíkazu undo mù¾ete vrátit zru¹ený stejnì jako smazaný text. +Rozdíl mezi mazáním a ru¹ením textu ovlivòuje mo¾nost vhození tohoto +textu pomocí C-y, neovlivòuje mo¾nosti pøíkazu undo. + + +* SOUBORY +--------- + +Aby text, který editujete, zùstal trvale uchován, musíte jej ulo¾it do +souboru. Jinak by byl po ukonèení Emacsu ztracen. Svoji editaci +spojíte se souborem "vyhledáním" ("finding") souboru. (Také se to +nazývá "nav¹tívení" ("visiting") souboru.) + +Vyhledání souboru znamená, ¾e vidíte jeho obsah v Emacsu. V mnoha +ohledech je to, jako byste editovali pøímo ten soubor. Nicménì zmìny, +které prostøednictvím Emacsu èiníte, se nestanou trvalými, dokud tyto +zmìny do souboru "neulo¾íte" ("save"). Tím se zamezí nechtìnému ponechání +èásteènì zmìnìného souboru v systému. Dokonce i kdy¾ soubor ulo¾íte, +Emacs uchová pùvodní soubor pod zmìnìným názvem pro pøípad, ¾e byste +zjistili, ¾e va¹e úpravy byly chybné. + +Kdy¾ se podíváte do dolní èásti obrazovky, uvidíte øádek, který zaèíná a +konèí pomlèkami a na zaèátku má "2J:-- TUTORIAL.cs" nebo nìco podobného. +Tato èást obrazovky obvykle obsahuje jméno souboru, který je právì +nav¹tíven. Zrovna teï máte nav¹tíven soubor nazvaný "TUTORIAL.cs", +který je va¹í osobní èmárací kopií tutoriálu Emacsu. Kdy¾ v Emacsu +vyhledáte soubor, jeho jméno se objeví pøesnì na tom místì. + +Pøíkazy pro vyhledávání a ukládání souborù se na rozdíl od ostatních +pøíkazù, které jste se zatím nauèili, skládají ze dvou znakù. Oba +zaèínají znakem CONTROL-x. Existuje celá øada pøíkazù zaèínajících na +CONTROL-x; mnoho z nich pracuje se soubory, buffery a podobnými vìcmi. +Tyto pøíkazy jsou dlouhé dva, tøi nebo ètyøi znaky. + +Dal¹í vìcí ohlednì pøíkazu pro vyhledání souboru je to, ¾e musíte øíct, +které jméno souboru chcete. Øíkáme, ¾e pøíkaz "ète argument +z terminálu" (v tomto pøípadì je argumentem jméno souboru). Poté co +vyvoláte pøíkaz + + C-x C-f Vyhledání souboru + +Emacs se vás zeptá na jméno souboru. Jméno souboru, které pí¹ete, se +objevuje ve spodním øádku obrazovky, který se v této situaci nazývá +minibuffer. Pro editaci jména souboru mù¾ete pou¾ívat obvyklé editaèní +pøíkazy Emacsu. + +Zadávání jména souboru (obecnì kterýkoliv vstup z minibufferu) mù¾ete +zru¹it pøíkazem C-g. + +>> Stisknìte C-x C-f a pak C-g. To minibuffer zru¹í a takté¾ to zru¹í + pøíkaz C-x C-f, který minibuffer pou¾il. Tak¾e nevyhledáte ¾ádný + soubor. + +Po napsání jména souboru stisknìte . +Pøíkaz C-x C-f pak zaène pracovat a vyhledá soubor, který jste zvolili. +Po skonèení pøíkazu C-x C-f minibuffer zmizí. + +Po malé chvilce se obsah souboru objeví na obrazovce a mù¾ete jej +editovat. Kdy¾ chcete zmìny trvale ulo¾it, pou¾ijte pøíkaz + + C-x C-s Ulo¾ení souboru + +To zkopíruje text z Emacsu do souboru. Kdy¾ to provedete poprvé, Emacs +pøejmenuje pùvodní soubor na soubor s novým jménem, aby nebyl ztracen. +Nové jméno je vytvoøeno pøidáním "~" na konec pùvodního jména souboru. + +Kdy¾ je ukládání dokonèeno, Emacs zobrazí jméno zapsaného souboru. +Mìli byste ukládat rozumnì èasto, abyste neztratili pøíli¹ mnoho práce +v pøípadì pádu systému. + +>> Stisknìte C-x C-s pro ulo¾ení va¹í kopie tutoriálu. + Mìlo by to zobrazit "Wrote ...TUTORIAL.cs" ve spodním øádku obrazovky. + +POZNÁMKA: Na nìkterých systémech zpùsobí stisk C-x C-s ztuhnutí +obrazovky a nevidíte ¾ádný dal¹í výstup z Emacsu. To znamená, ¾e +"vlastnost" operaèního systému zvaná "flow control" zachycuje C-s a +nepropustí jej k Emacsu. Pro odtuhnutí obrazovky stisknìte C-q. Pak +v sekci "Spontaneous Entry to Incremental Search" v manuálu Emacsu +vyhledejte radu, jak se vypoøádat s touto "vlastností". + +Existující soubor mù¾ete vyhledat, abyste jej mohli prohlí¾et nebo +editovat. Mù¾ete také vyhledat soubor, který je¹tì neexistuje. To je +zpùsob, jakým lze vytvoøit soubor v Emacsu: vyhledejte soubor, který +bude na zaèátku prázdný a pak zaènìte vkládat text urèený pro tento +soubor. Kdy¾ po¾ádáte o ulo¾ení, Emacs skuteènì vytvoøí soubor +s textem, který jste vlo¾ili. Od té chvíle se pak mù¾ete cítit, jako +kdybyste editovali ji¾ existující soubor. + + +* BUFFERY +--------- + +Jestli¾e vyhledáte pomocí C-x C-f druhý soubor, první soubor v Emacsu +zùstává. Mù¾ete se do nìj zpìt pøepnout jeho opìtovným vyhledáním +pomocí C-x C-f. Tímto zpùsobem mù¾ete do Emacsu dostat pomìrnì hodnì +souborù. + +>> Vytvoøte soubor pojmenovaný "foo" stiskem C-x C-f foo . + Potom vlo¾te nìjaký text, zeditujte jej a ulo¾te "foo" stiskem C-x C-s. + Nakonec stisknìte C-x C-f TUTORIAL.cs , èím¾ se vrátíte zpìt do + tutoriálu. + +Emacs ukládá text ka¾dého souboru do objektu nazývaného "buffer". +Vyhledání souboru vytvoøí v Emacsu nový buffer. Chcete-li vidìt seznam +bufferù, které momentálnì existují ve va¹em procesu Emacs, stisknìte: + + C-x C-b Seznam bufferù + +>> Zkuste teï C-x C-b. + +Podívejte se, ¾e ka¾dý buffer má v seznamu jméno a mù¾e tam mít také jméno +souboru, jeho¾ text obsahuje. Nìkteré buffery neodpovídají souborùm. +Napøíklad buffer pojmenovaný "*Buffer List*" nemá ¾ádný soubor. Je to +buffer, který obsahuje seznam bufferù vytvoøený pomocí C-x C-b. +JAKÝKOLIV text, který vidíte v emacsovém oknì, je v¾dy souèástí +nìjakého bufferu. + +>> Stisknìte C-x 1, abyste se zbavili seznamu bufferù. + +Pokud provedete zmìny textu jednoho souboru a pak vyhledáte jiný soubor, +nezpùsobí to ulo¾ení prvního souboru. Jeho zmìny zùstávají v Emacsu +uchovány v jemu odpovídajícím bufferu. Vytvoøení a editace druhého +souboru nemá ¾ádný vliv na buffer prvního souboru. To je velmi +u¾iteèné, ale také to znamená, ¾e potøebujete vhodný zpùsob, jak ulo¾it +buffer prvního souboru. Nutnost pøepnout se zpátky pomocí C-x C-f, aby +jej bylo mo¾no ulo¾it prostøednictvím C-x C-s, by byla nemístnì +obtì¾ující. Tak¾e máme + + C-x s Ulo¾ení nìkterých bufferù + +C-x s se vás zeptá na ka¾dý buffer, který obsahuje zmìny, které jste +neulo¾ili. Pro ka¾dý takový buffer se vás zeptá, zda jej má ulo¾it. + +>> Vlo¾te øádek textu a pak stisknìte C-x s. + Mìli byste být dotázáni, zda má být ulo¾en buffer nazvaný TUTORIAL.cs. + Odpovìzte na tuto otázku ano (yes) stiskem "y". + + +* ROZ©IØOVÁNÍ SADY PØÍKAZÙ +-------------------------- + +Existuje mnohem, mnohem více pøíkazù Emacsu, ne¾ které by vùbec mohly +být rozmístìny na v¹echny CONTROL a META znaky. Emacs tento problém +obchází prostøednictvím X (eXtend) pøíkazu. Ten vzniká dvìma zpùsoby: + + C-x Znakový eXtend. Následován jedním znakem. + M-x Pojmenovaný pøíkaz eXtend. Následován dlouhým názvem. + +To jsou pøíkazy, které jsou obecnì u¾iteèné, av¹ak ménì èasto pou¾ívané +ne¾ ty, které jste se ji¾ nauèili. U¾ jste vidìli dva z nich: souborové +pøíkazy C-x C-f pro vyhledání a C-x C-s pro ulo¾ení. Jiný pøíklad je +pøíkaz pro ukonèení Emacsu -- tj. pøíkaz C-x C-c. (Nemìjte obavy +o ztrátu zmìn, které jste provedli; C-x C-c nabídne ulo¾ení ka¾dého +zmìnìného souboru, ne¾ Emacs ukonèí.) + +C-z je pøíkaz na *doèasné* opu¹tìní Emacsu -- mù¾ete se po nìm do +spu¹tìného Emacsu vrátit. + +Na systémech, které to umo¾òují, C-z Emacs "pozastaví"; tzn. vrátí vás +do shellu, av¹ak Emacs neukonèí. V nejbì¾nìj¹ích shellech se mù¾ete do +Emacsu vrátit pøíkazem `fg' nebo pomocí `%emacs'. + +Na systémech, které pozastavování procesù nemají implementováno, C-z +vytvoøí subshell bì¾ící pod Emacsem, aby vám dal ¹anci spustit jiné +programy a pak se do Emacsu vrátit; neprovede tedy pravé opu¹tìní +Emacsu. V tom pøípadì je obvyklou cestou návratu ze subshellu do Emacsu +shellovský pøíkaz `exit'. + +Chvíle pro pou¾ití C-x C-c nastane, kdy¾ se chystáte odhlásit ze +systému. Správné je to také pøi ukonèování Emacsu vyvolaného po¹tovním +programem a rùznými jinými utilitami, proto¾e ty nemusí vìdìt, jak si +poradit s pozastavením Emacsu. Nicménì za normálních okolností, pokud +se nechystáte odlogovat, je lépe Emacs pozastavit pomocí C-z ne¾ jej +ukonèit. + +Existuje mnoho C-x pøíkazù. Zde je seznam tìch, které jste se ji¾ nauèili: + + C-x C-f Vyhledání souboru + C-x C-s Ulo¾ení soubor + C-x C-b Seznam bufferù + C-x C-c Ukonèení Emacsu + C-x u Undo + +Pojmenované eXtended pøíkazy jsou pøíkazy, které jsou pou¾ívány je¹tì +ménì, nebo pøíkazy, které jsou pou¾ívány jenom v jistých módech. +Pøíkladem je pøíkaz replace-string, který globálnì nahradí jeden øetìzec +jiným. Kdy¾ stisknete M-x, vypí¹e se na spodním øádku obrazovky prompt +M-x a vy byste mìli zadat jméno pøíkazu; v tomto pøípadì +"replace-string". Jednodu¹e napi¹te "repl s" a Emacs název doplní. +Dokonèete zadávání jména pøíkazu pomocí . + +Pøíkaz replace-string vy¾aduje dva argumenty -- øetìzec, který má být +nahrazen, a øetìzec, který jej má nahradit. Ka¾dý argument musíte +ukonèit pomocí . + +>> Pøesuòte kurzor na prázdný øádek dva øádky pod tímto. + Pak napi¹te M-x repl szmìnilmodifikoval. + + V¹imnìte si, jak se tento øádek zmìnil: nahradili jste slovo + z-m-ì-n-i-l slovem "modifikoval", kdekoliv se za aktuální pozicí + kurzoru vyskytlo. + + +* AUTOMATICKÉ UKLÁDÁNÍ +---------------------- + +Jestli¾e jste provedli zmìny v souboru, ale nemáte je je¹tì ulo¾eny, +mohou být v pøípadì pádu systému ztraceny. Aby vás Emacs od toho +uchránil, periodicky zapisuje "auto save" soubor pro ka¾dý soubor, který +editujete. Jméno auto save souboru má na zaèátku a na konci #; +napøíklad jestli¾e se vá¹ soubor jmenuje "hello.c", jeho auto save +soubor se jmenuje "#hello.c#". Kdy¾ soubor ulo¾íte normálním zpùsobem, +Emacs auto save soubor sma¾e. + +Jestli¾e dojde k pádu systému, mù¾ete svoji editaci obnovit z auto-save +souboru, a to normálním vyhledáním souboru (toho, který jste editovali, +ne auto save souboru) a následnou aplikací M-x recover file. +Na ¾ádost o potvrzení odpovìzte zadáním yes pro pokraèování a +obnovení auto-save dat. + + +* ECHO OBLAST +------------- + +Kdy¾ Emacs vidí, ¾e pí¹ete pøíkazy pomalu, ukazuje vám je ve spodní +èásti obrazovky v oblasti nazývané "echo oblast". Echo oblast obsahuje +dolní øádek obrazovky. + + +* STAVOVÝ ØÁDEK +--------------- + +Øádek bezprostøednì nad echo oblastí se nazývá "stavový øádek" ("mode line"). +Stavový øádek øíká nìco jako: + +2J:** TUTORIAL.cs (Fundamental)--L670--58%---------------- + +Tento øádek podává u¾iteènou informaci o stavu Emacsu a textu, který +editujete. + +U¾ víte, co znamená jméno souboru -- je to soubor, který jste vyhledali. +-NN%-- oznaèuje va¹i aktuální pozici v textu; øíká, ¾e NN procent textu +je nad horním okrajem obrazovky. Je-li zaèátek souboru na obrazovce, je +zde --Top-- a ne --00%--. Je-li konec textu na obrazovce, je zde +--Bot--. Jestli¾e se díváte na tak malý text, ¾e se celý vejde na +obrazovku, stavový øádek øíká --All--. + +Hvìzdièky poblí¾ zaèátku znamenají, ¾e jste text zmìnili. Tìsnì po +vyhledání nebo ulo¾ení souboru v této èásti stavového øádku nejsou ¾ádné +hvìzdièky, pouze pomlèky. + +Èást stavového øádku v závorkách øíká, v jakých editaèních módech se +nacházíte. Implicitní mód je Fundamental, co¾ je ten, který momentálnì +pou¾íváte. Je pøíkladem hlavního módu ("major mode"). + +Emacs má celou øadu hlavních módù. Nìkteré z nich jsou urèeny pro +editaci rùzných programovacích jazykù a/nebo textù jako tøeba Lisp mód, +Text mód, atd. V libovolném okam¾iku je aktivní právì jeden hlavní mód a +jeho jméno lze nalézt ve stavovém øádku na místì, kde je teï +"Fundamental". + +Ka¾dý hlavní mód mìní chování nìkterých pøíkazù. Napøíklad existují +pøíkazy pro vytváøení komentáøù v programu, a proto¾e ka¾dý programovací +programovací jazyk má jinou pøedstavu o tom, jak má komentáø vypadat, +musí ka¾dý hlavní mód vkládat komentáøe jinak. Ka¾dý hlavní mód je +vlastnì jméno extended pøíkazu, kterým se do tohoto módu mù¾ete +pøepnout. Napøíklad M-x fundamental-mode je pøíkaz pro pøepnutí se do +Fundamental módu. + +Chystáte-li se editovat èeský text, jako tøeba tento soubor, +pravdìpodobnì byste mìli pou¾ít Text mód. +>> Napi¹te M-x text-mode. + +Nebojte se, ¾ádný z pøíkazù, které jste se nauèili, chování Emacsu nijak +významnì nezmìní. Mù¾ete si ale v¹imnout, ¾e M-f a M-b nyní pracují +s apostrofy jako se souèástmi slov. Pøedtím, ve Fundamental módu, M-f a +M-b pracovaly s apostrofy coby oddìlovaèi slov. + +Hlavní módy obvykle dìlají men¹í zmìny, jako byla tato: pøíkazy vìt¹inou +dìlají "toté¾", ale v ka¾dém hlavním módu pracují tro¹ku jinak. + +Dokumentaci k aktuálnímu hlavnímu módu si mù¾ete zobrazit stiskem C-h m. + +>> Jednou nebo nìkolikrát pou¾ijte C-u C-v, abyste tento øádek dostali + k vrcholu obrazovky. +>> Stisknìte C-h m, abyste vidìli, jak se Text mód li¹í od Fundamental + módu. +>> Stisknìte C-x 1 pro odstranìní dokumentace z obrazovky. + +Hlavní módy se nazývají hlavní proto, ¾e také existují vedlej¹í módy +(minor modes). Vedlej¹í módy nejsou alternativou k hlavním módùm, nýbr¾ +jejich malé modifikace. Ka¾dý vedlej¹í mód mù¾e být zapnut nebo vypnut +sám o sobì nezávisle na v¹ech ostatních vedlej¹ích módech a nezávisle na +hlavním módu. Tak¾e nemusíte pou¾ívat ¾ádný vedlej¹í mód nebo mù¾ete +pou¾ívat jeden vedlej¹í mód nebo libovolnou kombinaci nìkolika +vedlej¹ích módù. + +Jedním z velmi u¾iteèných vedlej¹ích módù, zejména pro editaci èeských +textù, je Auto Fill mód. Kdy¾ je tento mód zapnut, Emacs zalomí øádek +mezi dvìma slovy, kdykoliv vkládáte text a øádek se stane pøíli¹ +dlouhým. + +Auto Fill mód mù¾ete zapnout provedením M-x auto-fill-mode. +Je-li tento mód zapnut, mù¾ete jej vypnout provedením M-x +auto-fill-mode. Je-li mód vypnut, tento pøíkaz jej zapíná, +a je-li mód zapnut, tak jej tento pøíkaz vypíná. Øíkáme, ¾e tento +pøíkaz pøepíná ("toggles") tento mód. + +>> Napi¹te teï M-x auto-fill-mode. Pak vkládejte "asdf " stále + dokola tak dlouho, a¾ uvidíte, jak se vkládaný øádek rozdìlí na dva + øádky. Do textu musíte vkládat mezery proto, ¾e Auto Fill mód + zalamuje øádky pouze v mezerách. + +Okraj je obvykle nastaven na 70 znakù, ale mù¾ete to zmìnit pøíkazem +C-x f. Hodnotu okraje, kterou si pøejete, byste mìli pøedat jako +numerický argument. + +>> Napi¹te C-x f s argumentem 20. (C-u 2 0 C-x f). + Pak pi¹te nìjaký text a pozorujte, jak Emacs vyplòuje øádky po + 20 znacích. Pak nastavte okraj zpátky na 70 opìtovným pou¾itím + C-x f. + +Jestli¾e provedete zmìny uprostøed odstavce, Auto Fill mód jej +nepøeformátuje. +Pro pøeformátování odstavce stisknìte M-q (META-q) s kurzorem uvnitø +odstavce. + +>> Pøesuòte kurzor do pøedchozího odstavce a stisknìte M-q. + + +* VYHLEDÁVÁNÍ +------------- + +Emacs umí v textu vyhledávat øetìzce (tj. skupiny spojených znakù nebo +slov) smìrem vpøed nebo vzad. Hledání øetìzce je pøíkaz pøesunující +kurzor; pøesune kurzor na nejbli¾¹í místo, kde se tento øetìzec nachází. + +Vyhledávací pøíkaz Emacsu se li¹í od vyhledávacích pøíkazù vìt¹iny +editorù v tom smyslu, ¾e je "inkrementální". To znamená, ¾e vyhledávání +se provádí u¾ v okam¾iku, kdy zadáváte vyhledávací øetìzec. + +Pøíkaz pro zahájení hledání vpøed je C-s a pro hledání vzad C-r. +ALE POZOR! Nezkou¹ejte to je¹tì. + +Kdy¾ stisknete C-s, uvidíte v echo oblasti prompt "I-search". To vám +øíká, ¾e Emacs se nachází ve stavu, který se nazývá inkrementální hledání, +a èeká, a¾ mu zadáte, co chcete hledat. hledání ukonèí. + +>> Nyní zahajte hledání stiskem C-s. POMALU, písmeno po písmenu, pi¹te + slovo 'kurzor'. Po ka¾dém písmenu si v¹imnìte, co se dìje s kurzorem. + Teï jste vyhledali "kurzor" poprvé. +>> Stisknìte C-s znovu, abyste nalezli dal¹í výskyt "kurzor". +>> Nyní ètyøikrát stisknìte a pozorujte, jak se kurzor + pøesunuje. +>> Stisknìte pro ukonèení hledání. + +Vidìli jste, co se stalo? Emacs se v inkrementálním hledání pokou¹í +pøejít na dal¹í výskyt øetìzce, který jste dosud napsali. Chcete-li +pøejít na dal¹í výskyt 'kurzor', jednodu¹e stisknìte C-s znovu. +Jestli¾e u¾ ¾ádný takový výskyt není, Emacs pípne a øekne vám, ¾e +hledání momentálnì "selhává", C-g hledání ukonèí. + +POZNÁMKA: Na nìkterých systémech stisk C-s zpùsobí ztuhnutí +obrazovky a nevidíte ¾ádný dal¹í výstup z Emacsu. To znamená, ¾e +"vlastnost" operaèního systému zvaná "flow control" zachycuje C-s a +nepropustí jej k Emacsu. Pro odtuhnutí obrazovky stisknìte C-q. Pak +v sekci "Spontaneous Entry to Incremental Search" v manuálu Emacsu +vyhledejte radu, jak se vypoøádat s touto "vlastností". + +Jestli¾e uprostøed inkrementálního hledání stisknete , uvidíte, +¾e poslední znak v hledaném øetìzci zmizí a hledání se vrací na poslední +místo hledání. Pøedpokládejme napøíklad, ¾e jste napsali "c", abyste +na¹li první výskyt "k". Jestli¾e nyní stisknete "u", kurzor se pøesune na +první výskyt "ku". Teï stisknìte . To vyma¾e "u" z hledaného +øetìzce a kurzor se pøesune zpìt na první výskyt "k". + +Jestli¾e uprostøed hledání stisknete CONTROL nebo META znak (s nìkolika +výjimkami -- znaky, které jsou speciální v hledání, jako C-s a C-r), +hledání se ukonèí. + +C-s zahajuje hledání, které hledá jakýkoliv výskyt hledaného øetìzce ZA +aktuální pozicí kurzoru. Chcete-li nìco hledat v pøedcházejícím textu, +stisknìte C-r místo C-s. V¹e, co jsme øekli o C-s, platí také o C-r +kromì toho, ¾e smìr hledání je opaèný. + + +* VÍCE OKEN +----------- + +Jednou z pìkných vlastností Emacsu je to, ¾e mù¾e na obrazovce zobrazit +více oken souèasnì. + +>> Pøesuòte kurzor na tento øádek a stisknìte C-u 0 C-l. + +>> Teï stisknìte C-x 2, co¾ rozdìlí obrazovku na dvì okna. + Obì okna zobrazují tento tutoriál. Kurzor zùstává navrchu okna. + +>> Tisknìte C-M-v pro scrollování spodního okna. + (Nemáte-li skuteènou klávesu META, stisknìte ESC C-v.) + +>> Stisknìte C-x o ("o" jako "other") pro pøesun kurzoru do dolního okna. + +>> Pou¾ijte C-v a M-v ve spodním oknì pro jeho scrollování. + Pokraèujte ve ètení tìchto instrukcí v horním oknì. + +>> Znovu stisknìte C-x o pro pøesun kurzoru zpìt do horního okna. + Kurzor v horním oknì je pøesnì na místì, kde byl pùvodnì. + +Mù¾ete dále pou¾ívat C-x o pro pøepínání mezi okny. Ka¾dé okno má svoji +vlastní pozici kurzoru, ale jenom jedno okno kurzor skuteènì zobrazuje. +V¹echny obvyklé editaèní pøíkazy platí pro okno, ve kterém se nachází +kurzor. Toto okno nazýváme "aktivní okno" ("selected window"). + +Pøíkaz C-M-v je velmi u¾iteèný, jestli¾e v jednom oknì editujete text a +druhé okno pou¾íváte pouze pro pøehled. Mù¾ete kurzor nechávat stále +v oknì, kde editujete, a postupovat po druhém oknì pomocí C-M-v. + +C-M-v je pøíkladem CONTROL-META znaku. Máte-li skuteènou META klávesu, +mù¾ete vyvolat C-M-v pøidr¾ením obou kláves CTRL a META pøi stisku v. +Nezále¾í na tom, zda je prvnì stisknuta CTRL nebo META, proto¾e obì tyto +klávesy fungují jako modifikátory kláves, které tisknete. + +Pokud nemáte skuteènou META klávesu, mù¾ete místo ní pou¾ít ESC, na +poøadí zále¾í: musíte stisknout ESC a následnì CTRL-v; CTRL-ESC v by +nefungovalo. To proto, ¾e ESC je samostatný znak, nikoliv modifikátor. + +>> Stisknìte C-x 1 (v horním oknì), abyste se zbavili dolního okna. + +(Kdybyste C-x 1 stiskli v dolním oknì, odstranilo by to horní okno. +Chápejte tento pøíkaz jako "ponechej právì jedno okno -- to, ve kterém +zrovna jsem".) + +Nemusíte v obou oknech zobrazovat tentý¾ buffer. Jestli¾e pou¾ijete +C-x C-f pro vyhledání souboru v jednom z oken, druhé okno se nezmìní. +Mù¾ete vyhledávat soubory v obou oknech nezávisle. + +Zde je dal¹í zpùsob, jak vyu¾ít dvì okna ke zobrazení dvou rùzných vìcí: + +>> Stisknìte C-x 4 C-f následované jménem nìkterého z va¹ich souborù. + Dokonèete to pomocí . Vidíte zadaný soubor v dolním oknì. + Pøesunul se tam i kurzor. + +>> Stisknìte C-x o pro pøesun zpìt do horního okna a C-x 1 pro smazání + dolního okna. + + +* REKURZIVNÍ EDITAÈNÍ ÚROVNÌ +---------------------------- + +Obèas se dostanete do nìèeho, co se nazývá "rekurzivní editaèní úroveò" +("recursive editing level"). To je indikováno hranatými závorkami ve +stavovém øádku obklopujícími závorky okolo jména hlavního módu. +Napøíklad mù¾ete vidìt [(Fundamental)] místo (Fundamental). + +Abyste se dostali z rekurzivní editaèní úrovnì, stisknìte ESC ESC ESC. +To je obecný "vyskakovací" pøíkaz. Mù¾ete jej pou¾ít té¾ pro odstranìní +nìkterých oken a vyskoèení z minibufferu. + +>> Stisknìte M-x, abyste se dostali do minibufferu; pak stisknìte + ESC ESC ESC, abyste se z nìj dostali ven. + +Z rekurzivní editaèní úrovnì nemù¾ete vyskoèit pomocí C-g. To proto, ¾e +C-g je vyu¾íváno pro ru¹ení pøíkazù a argumentù UVNITØ rekurzivní +editaèní vrstvy. + + +* ZÍSKÁNÍ DAL©Í NÁPOVÌDY +------------------------ + +V tomto tutoriálu jsme se pokusili poskytnout vám dostatek informací, +abyste mohli zaèít Emacs pou¾ívat. V Emacsu je toho tolik, ¾e by bylo +nemo¾né to zde v¹echno objasnit. Nicménì se o Emacsu mù¾ete nauèit +více, proto¾e má mnoho u¾iteèných vlastností. Emacs nabízí pøíkazy pro +ètení dokumentace svých pøíkazù. V¹echny tyto "help" pøíkazy +zaèínají znakem CONTROL-h, který se nazývá "help znak". + +Pro pou¾ití vlastností nápovìdy stisknìte znak C-h a pak znak øíkající, +jaký druh nápovìdy ¾ádáte. Jste-li OPRAVDU ztraceni, stisknìte C-h ? a +Emacs vám sdìlí, jaké druhy nápovìdy vám mù¾e poskytnout. Jestli¾e +jste stiskli C-h a pak jste se rozhodli, ¾e ¾ádnou nápovìdu nechcete, +jednodu¹e to zru¹te stiskem C-g. + +(Na nìkterých poèítaèích je význam znaku C-h zmìnìn. To by opravdu +nemìlo být obecným nastavením pro v¹echny u¾ivatele, tak¾e máte právo +stì¾ovat si systémovému administrátorovi. Do té doby, jestli¾e C-h +nezobrazuje hlá¹ení o nápovìdì v dolní èásti obrazovky, zkuste místo +toho pou¾ívat klávesu F1 nebo M-x help RET.) + +Nejzákladnìj¹í help pøíkaz je C-h c. Stisknìte C-h, znak c a klávesový +pøíkaz; Emacs pak zobrazí velmi struèný popis pøíkazu. + +>> Stisknìte C-h c C-p. + Hlá¹ení by mìlo vypadat asi takto + + C-p runs the command previous-line + +To vám sdìluje "jméno funkce". Jména funkcí jsou pou¾ívána zejména pro +konfiguraci a roz¹iøování Emacsu. Ale proto¾e jména funkcí jsou volena +tak, aby naznaèovala, co odpovídající pøíkaz dìlá, mohou slou¾it také +jako velmi struèná dokumentace -- dostateèná k tomu, aby vám pøipomenula +pøíkazy, které jste se ji¾ nauèili. + +Víceznakové pøíkazy jako C-x C-s a (pokud nemáte META, EDIT ani ALT +klávesu) v jsou po C-h c povoleny také. + +K získání více informací o pøíkazu místo C-h c pou¾ijte C-h k. + +>> Stisknìte C-h k C-p. + +To zobrazí dokumentaci k funkci a její jméno v emacsovém oknì. A¾ +výstup pøeètete, stisknìte C-x 1, abyste se textu nápovìdy zbavili. +Nemusíte to dìlat hned. Mù¾ete chvíli editovat a nahlí¾et do textu +nápovìdy a teprve pak stisknout C-x 1. + +Zde jsou dal¹í u¾iteèné C-h volby: + + C-h f Popis funkce. Zadáváte jméno funkce. + +>> Zkuste napsat C-h f previous-line. + To vypí¹e ve¹keré informace, které Emacs má o funkci implementující + pøíkaz C-p. + +Podobný pøíkaz C-h v zobrazí dokumentaci promìnné, její¾ hodnotu +mù¾ete nastavit a zmìnit tím chování Emacsu. Jméno promìnné zadáte, a¾ +se na nì Emacs zeptá. + + C-h a Pøíkazové apropos. Zadejte klíèové slovo a Emacs vypí¹e + v¹echny pøíkazy, jejich¾ jména obsahují toto klíèové + slovo. V¹echny tyto pøíkazy mohou být vyvolány pomocí + META-x. Pro nìkteré pøíkazy pøíkazové apropos vypí¹e + také jedno nebo dvouznakové sekvence, které provádìjí + tentý¾ pøíkaz. + +>> Napi¹te C-h a file. + +To zobrazí v druhém oknì seznam v¹ech M-x pøíkazù obsahujících "file" ve +svém názvu. Znakové pøíkazy jako C-x C-f uvidíte vypsané vedle +odpovídajících jmen pøíkazù jako find-file. + +>> Stisknìte C-M-v pro posun okna s nápovìdou. Proveïte to nìkolikrát. + +>> Stisknìte C-x 1 pro smazání okna s nápovìdou. + + C-h i Ètení on-line manuálù (té¾ Info). Tento pøíkaz + vás pøepne do speciálního bufferu s názvem `*info*', + ve kterém mù¾ete èíst on-line manuály pro balíky + nainstalované na va¹em systému. Pokud stisknete + m emacs mù¾ete si napøíklad pøeèíst manuál + k Emacsu. Pokud jste dosud nikdy nepou¾ívali Info, + stisknìte ? a Emacs vám pøedstaví hlavní mo¾nosti + módu pro Info. A¾ si tyto mo¾nosti prostudujete, + mìli byste pou¾ívat Info manuál Emacsu jako svoji + primární dokumentaci. + + +* ZÁVÌR +------- + +Nezapomeòte, Emacs ukonèíte provedením pøíkazu C-x C-c. Pro doèasný +odskok do shellu, ze kterého se do Emacsu mù¾ete opìt vrátit, +pou¾ijte C-z. + +Zámìrem tohoto tutoriálu je být srozumitelný v¹em novým u¾ivatelùm, tak¾e +narazíte-li na nìco nejasného, tak neusedejte a neklaïte to za vinu sobì +-- stì¾ujte si! + + +KOPÍROVÁNÍ +---------- + +Tento tutoriál vychází z dlouhé øady emacsových tutoriálù zahájené +tutoriálem napsaným Stuartem Cracraftem pro pùvodní Emacs. + +Tato verze tutoriálu je, podobnì jako GNU Emacs, chránìna copyrightem a +je ¹íøena se svolením distribuovat kopie za jistých podmínek: + +Copyright (c) 1985, 1996 Free Software Foundation + + Ka¾dému je zaruèeno právo vytváøet a distribuovat pøesné kopie tohoto + dokumentu tak, jak jej obdr¾el, na jakémkoliv médiu, s tím, ¾e bude + zachována tato poznámka o autorství a poznámka o svolení a ¾e + distributor zaruèuje pøíjemci právo na dal¹í redistribuci povolenou + touto poznámkou. + + Je zaruèeno právo distribuovat modifikované verze tohoto dokumentu + nebo jeho èástí pod vý¹e uvedenými podmínkami za pøedpokladu, ¾e + obsahuje jasné poznámky uvádìjící, kdo provedl poslední modifikace. + +Podmínky pro kopírování Emacsu samotného jsou slo¾itìj¹í, av¹ak ve +stejném duchu. Pøeètìte si prosím soubor COPYING a pak pøedávejte kopie +GNU Emacsu svým pøátelùm. Pomáhejte potírat softwarovou obstrukci +("vlastnictví") pou¾íváním, psaním a sdílením free softwaru! + +;;; Local Variables: +;;; coding: iso-latin-2 +;;; End: diff --git a/etc/TUTORIAL.sl b/etc/TUTORIAL.sl new file mode 100644 index 0000000..8d41225 --- /dev/null +++ b/etc/TUTORIAL.sl @@ -0,0 +1,1031 @@ +Copyright (c) 1985,96,97 Free Software Foundation, Inc; See end for conditions. +Emacs. Prvo berilo. + +Ukazi v Emacsu v splo¹nem vkljuèujejo tipki CONTROL (vèasih oznaèeni +CTRL ali CTL) in META (vèasih oznaèena EDIT ali ALT). Namesto, da bi ju +vedno izpisali s celim imenom, bomo uporabili naslednji okraj¹avi: + + C- pomeni, da moramo dr¾ati pritisnjeno tipko CONTROL, ko + vtipkamo znak . Oznaka C-f tako pomeni: dr¾imo + pritisnjeno tipko CONTROL in pritisnemo tipko f. + M- pomeni, da moramo dr¾ati pritisnjeno tipko META, EDIT ali ALT, + ko vtipkamo znak . Èe na tipkovnici ni tipk META, EDIT + ali ALT, pritisnemo tipko ESC, jo spustimo in zatem + pritisnemo tipko . Tipko ESC bomo oznaèevali z . + +Pomembno: Emacs zapustimo z ukazom C-x C-c (dva znaka). +V uèbeniku so vaje, s katerimi preskusite nove ukaze. Oznaèujeta jih +znaka ,>>` ob levem robu. Primer: +<> +>> Vtipkajte zdaj ukaz C-v (View next screen, Prika¾i naslednji zaslon), + da se premaknete na naslednji zaslon (kar poskusite, pritisnite + hkrati kontrolno tipko in V). Od zdaj naprej boste morali to + napraviti sami vsakiè, ko pridete do konca zaslona. + +Ste opazili, da sta se dve vrstici s prej¹njega zaslona ponovili? Ta +kontinuiteta olaj¹a branje pri skakanju s strani na stran. + +Prva stvar, ki si jo morate zapomniti, je, kako se premikate po +datoteki. Zdaj ¾e veste, da se premaknete za cel zaslon naprej z +ukazom C-v. Za cel zaslon nazaj pa se premaknete z ukazom M-v +(pritisnite tipko META in jo dr¾ite ter pritisnite tipko v, ali pa +pritisnite in spustite ter zatem pritisnite tipko v, èe tipke +META, EDIT ali ALT na va¹i tipkovnici ni). + +>> Nekajkrat pritisnite M-v in C-v, da vidite, kako ukaza delujeta. + + +* POVZETEK +---------- + +Za pregled celega zaslona besedila so uporabni naslednji ukazi: + + C-v Premik se za cel zaslon naprej + M-v Premik se za cel zaslon nazaj + C-l Cel zaslon premaknemo tako, da je zdaj po vertikali + centriran okoli besedila, kjer se nahaja kazalèek (znak v + C-l je èrka L, ne ¹tevka 1) + +>> Poi¹èite kazalèek na zaslonu in si zapomnite besedilo okoli njega. + Vtipkajte C-l. + Ponovno poi¹èite kazalèek. Besedilo okoli njega je ostalo isto. + + +* PREMIKANJE KAZALÈKA +--------------------- + +Premiki za celo stran naprej in nazaj so sicer uporabni, ampak kako pa +pridemo do izbranega mesta na zaslonu? + +Naèinov je veè. Najosnovnej¹i je uporaba ukazov C-p, C-b, C-f in +C-n. Ti po vrsti premaknejo kazalèek v prej¹njo vrstico, znak nazaj, +znak naprej, in v naslednjo vrstico. Grafièno prikazano: + + prej¹nja vrstica, C-p + : + : + nazaj, C-b .... trenutni polo¾aj kazalèka .... naprej, C-f + : + : + naslednja vrstica, C-n + +>> S pritiski na C-n ali C-p premaknite kazalèek v sredinsko vrstico + na diagramu zgoraj. Zatem pritisnite C-l. S tem diagram postavite na + sredino zaslona. + +V angle¹èini ima izbor tipk nazoren pomen. P kot ,previous` (prej¹nji), +N kot ,next` (naslednji), B kot ,backward` (nazaj) in F kot ,forward` +(naprej). To so osnovni ukazi za premikanje kazalèka in uporabljali jih +boste VES ÈAS. Èim prej se jih nauèite, tem bolje. + +>> Nekajkrat pritisnite C-n, da pride kazalèek do te vrstice. + +>> Z nekaj C-f se pomaknite na desno na sredo vrstice, nato pa nekajkrat + pritisnite C-p. Opazujte, kaj se dogaja s kazalèkom na sredini + vrstice. + +Vsaka vrstice v besedilu je zakljuèena z znakom za novo vrstico +(angl. Newline). Ta loèuje vrstico v besedilu od naslednje. Tudi +zadnja vrstica v datoteki mora biti zaljuèena z znakom za novo vrstico +(èeprav tega Emacs ne zahteva). + +>> Poskusite ukaz C-b, ko je kazalèek na zaèetku vrstice. Kazalèek se + mora premakniti na konec prej¹nje vrstice. To je zato, ker se je + ravnokar premaknil prek znaka za konec vrstice. + +Ukaz C-f premika kazalèek prek znaka za novo vrstico enako kot C-b. + +>> Poskusite ¹e nekajkrat pritisniti C-b, da dobite obèutek za + premikanje kazalèka. Potem nekajkrat poskusite C-f, da pridete do konca + vrstice. ©e enkrat pritisnite C-f, da skoèite v naslednjo vrstico. + +Ko s kazalèkom dose¾ete zgornji ali spodnji rob zaslona, se besedilo +toliko premakne, da kazalèek ostane na zaslonu. V angle¹èini se temu +pravi ,,scrolling``. To omogoèa, da lahko premaknemo kazalèek na +katerokoli mesto v besedilu, a vseeno ostanemo na zaslonu. + +>> Poskusite kazalèek pripeljati s C-n èisto do dna zaslona in si oglejte, + kaj se zgodi. + +Èe se vam zdi premikanje po en znak prepoèasno, se lahko premikate za +celo besedo. M-f (Meta-f) premakne kazalèek za eno besedo naprej, M-b +pa za besedo nazaj. + +>> Poskusite nekajkrat M-f in M-b. + +Èe je kazalèek sredi besede, ga M-f prestavi na konec besede. Èe je v +belini med besedami, ga M-f premakne na konec naslednje besede. M-b +deluje podobno, a v nasprotni smeri. + +>> Nekajkrat poskusite M-f in M-b, vmes pa ¹e nekaj C-f in + C-b. Opazujte uèinke M-f in M-b, ko je kazalèek sredi besede ali + med besedami. + +Ste opazili paralelo med C-f in C-b na eni strani ter M-f in M-b na +drugi? V Emacsu se dostikrat ukazi Meta nana¹ajo na operacije nad +enotami jezika (besede, stavki, odstavki), medtem ko se ukazi Control +nana¹ajo na operacije, neodvisne od zvrsti besedila (znaki, vrstice +ipd.). + +Podobna zveza je tudi med vrsticami in stavki: ukaza C-a in C-e +premakneta kazalèek na zaèetek oz. konec vrstice, M-a in M-e pa na +zaèetek oz. konec stavka. + +>> Poskusite nekaj ukazov C-a, potem pa nekaj ukazov C-e. + Poskusite nekaj ukazov M-a, potem pa nekaj ukazov M-e. + +Ste opazili, da ponovljeni C-a ne napravijo niè, ponovljeni M-a pa se +premikajo naprej? Èeprav se ne obna¹ata enako, pa je vendar obna¹anje +enega in drugega po svoje naravno. + +Polo¾aju kazalèka na zaslonu pravimo tudi ,,point``, toèka. +Parafrazirano: kazalèek ka¾e na zaslonu, kje je toèka v besedilu. + +Povzetek preprostih ukazov za premikanje kazalèka, vkljuèno s premiki +po besedo in stavek: + + C-f Premik za znak naprej + C-b Premik za znak nazaj + + M-f Premik za besedo naprej + M-b Premik za besedo nazaj + + C-n Premik v naslednjo vrstico + C-p Premik v prej¹njo vrstico + + C-a Premik na zaèetek vrstice + C-e Premik na konec vrstice + + M-a Premik na zaèetek stavka + M-e Premik na konec stavka + +>> Za vajo nekajkrat poskusite vsakega od teh ukazov. + To so najpogosteje uporabljani ukazi. + +©e dva pomembna ukaza za premikanje kazalèka sta M-< (Meta-manj¹i od), +ki ga premakne na zaèetek datoteke, in M-> (Meta-veèji od), ki ga +premakne na konec datoteke. + +Na ameri¹kih tipkovnicah najdete znak < nad vejico in morate +pritisniti tipko Shift, da pridete do njega. Z ukazom M-< je enako - +prav tako morate pritisniti tipko Shift, sicer moste izvedli drug +ukaz, Meta-vejica. Na na¹ih tipkovnicah sta oba znaka na isti tipko, +in za ukaz M-> morate pritisniti ¹e tipko Shift. + +>> Poskusite zdaj M-<, skok na zaèetek tega uèbenika. + Potem se vrnite nazaj z zaporednimi C-v. + +>> Poskusite zdaj M->, skok na konec tega uèbenika. + Potem se vrnite nazaj z zaporednimi M-v. + +Èe ima va¹a tipkovnica kurzorske tipke, lahko premikate kazalèek po +zaslonu tudi z njimi. Vseeno priporoèamo, da se privadite ukazov C-b, +C-f, C-n in C-p, in to iz treh razlogov. Prviè, delujejo na èisto vseh +terminalih. Drugiè, z nekaj prakse v Emacsu boste opazili, da je +tipkanje ukazov s Control hitrej¹e od tipkanja s kurzorskimi tipkami, ker +ni treba ves èas premikati desnice s tipkovnice na kurzorske tipke in +nazaj. In tretjiè, ko se enkrat navadite teh ukazov s Control, se boste +enostavneje nauèili tudi bolj zapletenih ukazov za premikanje kazalèka. + +Veèini ukazov v Emacsu lahko podamo ¹tevilèni argument; najveèkrat ta +pove, kolikokrat zapovrstjo naj se ukaz izvede. Veèkratno ponovitev +ukaza izvedemo tako, da najprej vtipkamo C-u, zatem ¹tevilo, +kolikokrat naj se ukaz ponovi, in nazadnje ¾eljeni ukaz. Èe ima va¹a +tipkovnica tipko META (ali EDIT ali ALT), lahko izpustite ukaz C-u in +namesto tega vtipkate ¹tevilo ponovitev, medtem ko dr¾ite pritisnjeno +tipko META. Druga metoda je sicer kraj¹a, priporoèamo pa prvo, ker +deluje na vseh terminalih. Tak¹en ¹tevilèni argument je ,,prefiksni`` +argument, ker vnesemo argument pred ukazom, na katerega se nana¹a. + +Primer: C-u 8 C-f premakne kazalèek za osem znakov naprej. + +>> Poskusite s primernim argumentom za ¹tevilo ponovitev ukaza + C-n ali C-p priti èim bli¾e tej vrstici v enem samem skoku. + +Veèina ukazov, ne pa vsi, uporablja ¹tevilèni argument kot ¹tevilo +ponovitev ukaza. Nekateri ukazi (nobeden od tistih, ki smo si jih +ogledali do zdaj) ga uporabljajo kot stikalo: s podanim prefiksnim +argumentom napravi ukaz nekaj drugega kot obièajno. + +Ukaza C-v in M-v sta tudi izjemi, a drugaèni. Èe jima podamo argument, +premakneta zaslon za navedeno ¹tevilo vrstic, ne pa zaslonov. Ukaz C-u +4 C-v, na primer, premakne zaslon navzgor za 4 vrstice. + +>> Poskusite zdaj C-u 8 C-v + +To bi moralo zaslon premakniti navzgor za osem vrstic. Èe bi ga radi +premaknili nazaj, poskusite M-v z istim argumentom. + +Èe uporabljate X Windows, imate verjetno ob levem robu Emacsovega +okna navpièno pravokotno ploskev, imenovano drsnik. Pogled na +besedilo lahko premikate tudi tako, da z mi¹ko kliknete na drsnik. + +>> Postavite kazalec na vrh oznaèenega obmoèja na drsniku in pritisnite + srednji gumb na mi¹ki. To bi moralo premakniti besedilo na mesto, + doloèeno s tem, kako visoko ali nizko na drsnik ste kliknili. + +>> Medtem ko dr¾ite srednji gumb pritisnjen, premikajte mi¹ko gor in + dol. Vidite, kako se premika besedilo v Emacsovem oknu, ko + premikate mi¹ko? + + +* ÈE SE EMACS OBESI +------------------- + +Èe se Emacs preneha odzivati na va¹e ukaze, ga lahko varno prekinete z +ukazom C-g. Z njim lahko prekinete ukaze, za katere bi trajalo +predolgo, da bi se izvedli. + +Isti ukaz, C-g, lahko uporabite tudi, da preklièete ¹tevilèni +argument, ali pa zaèetek ukaza, ki ga ne ¾elite izvesti. + +>> Vtipkajte C-u 100, s èimer ste izbrali ¹tevilèni argument 100, + zatem pa vtipkajte C-g. Vtipkajte zdaj C-f. Kazalèek se je + premaknil le za en znak, ker ste ¹tevilèni argument vmes preklicali + s C-g. + +Tudi èe ste po nesreèi vtipkali , se ga lahko znebite s C-g. + + +* ONEMOGOÈENI UKAZI +------------------- + +Nekaj ukazov v Emacsu je namenoma ,,onemogoèenih``, da bi jih +zaèetniki ne izvedli po nesreèi. + +Èe vtipkate tak onemogoèen ukaz, se bo na zaslonu pojavilo novo okno z +obvestilom, kateri ukaz ste sku¹ali izvesti, in vas vpra¹alo, èe ga +res ¾elite izvesti. + +Èe v resnici ¾elite poskusiti ukaz, pritisnite preslednico kot odgovor +na vpra¹anje. Normalno verjetno ukaza ne ¾elite izvesti, zato na +vpra¹anje odgovorite z ,n`. + +>> Vtipkajte : (ki je onemogoèen ukaz), zatem odgovorite n. + + +* OKNA +------ + +Emacs lahko prika¾e veè oken in v vsakem svoje besedilo. Kasneje bomo +razlo¾ili, kako uporabljamo veè oken hkrati. Zaenkrat bomo povedali +le, kako se znebite dodatnih oken, ki jih lahko odpre vgrajena pomoè ali +pa izpis kak¹nega drugega programa. Preprosto je: + + C-x 1 Eno okno (torej, zaprimo vsa ostala). + +To je Ctrl-x, ki mu sledi ¹tevka 1. Ukaz C-x 1 raztegne èez cel +zaslon okno, v katerem se nahaja kazalèek, ostala pa zapre. + +>> Premaknite kazalèek do te vrstice in vtipkajte C-u 0 C-l +>> Vtipkajte Ctrl-h k Ctrl-f. + Vidite, kako se je to okno skrèilo in odstopilo prostor oknu, + ki pojasnjuje ukaz Ctrl-f? + +>> Vtipkajte C-x 1 in spodnje okno se bo zaprlo. + +Za razliko od ukazov, ki smo se jih nauèili do zdaj, je ta ukaz +sestavljen iz dveh znakov. Zaène se z znakom Control-x. Cela vrsta +ukazov se zaène enako, in mnogi od njih zadevajo delo z datotekami, +delovnimi podroèji in podobnim. Vsem tem ukazom je skupno, da se +zaènejo s Control-x, ki mu sledi ¹e en, dva ali trije znaki. + + +* VRIVANJE IN BRISANJE +---------------------- + +Èe ¾elite v obstojeèe besedilo vriniti novo, preprosto premaknite +kazalèek na ¾eljeno mesto in zaènite tipkati. Znake, ki jih lahko +vidite, na primer A, 7, * in podobno, razume Emacs kot del besedila in +jih takoj vrine. S pritiskom na Return (ali Enter) vrinete znak za +skok v novo vrstico. + +Zadnji vtipkani znak lahko izbri¹ete s pritiskom na tipko . Na +nekaterih tipkovnicah je oznaèena z . Ponekod (ne pa povsod!) +slu¾i za brisanje tipka . + +Splo¹no pobri¹e znak neposredno pred trenutnim polo¾ajem +kazalèka. + +>> Vtipkajte zdaj nekaj znakov in jih zatem s tipko pobri¹ite. + Niè naj vas ne skrbi, èe se je ta vrstica spremenila. Izvirnika + tega uèbenika ne boste pokvarili -- tole je samo va¹a osebna kopija. + +Ko vrstica postane predolga za zaslon, se ,,nadaljuje`` v naslednji +vrstici na zaslonu. Obrnjena po¹evnica (znak ,\`) ob desnem robu +oznaèuje vrstico, ki se nadaljuje v naslednji zaslonski vrstici. + +>> Zdaj zaènite tipkati besedilo, dokler ne dose¾ete desnega roba, in + ¹e naprej. Opazili boste, da se pojavi znak za nadaljevanje. + +>> S tipko pobri¹ite toliko znakov, da vrstica ne sega + veè èez ¹irino zaslona. Znak za nadaljevanje v naslednji + vrstici je izginil. + +Znak za novo vrstico lahko pobri¹emo enako kot vsak drug znak. S tem, +ko pobri¹emo znak za novo vrstico, zdru¾imo vrstici v eno samo. Èe bo +nova vrstica predolga, da bi cela pri¹la na zaslon, bo razdeljena v +veè zaslonskih vrstic. + +>> Premaknite kazalèek na zaèetek vrstice in pritisnite . To + zdru¾i vrstico s prej¹njo. + +>> Pritisnite . S tem ste ponovno vrinili znak za skok v novo + vrstico, ki ste ga malo prej zbrisali. + +Spomnimo se, da lahko za veèino ukazov v Emacsu doloèimo, naj se +izvedejo veèkrat zaporedoma; to vkljuèuje tudi vnos teksta. Ponovitev +obièajnega znaka ga veèkrat vrine v besedilo. + +>> Poskusite zdaj tole: da vnesete osem zvezdic, vtipkajte C-u 8 * + +Zdaj ste se nauèili najpreprostej¹i naèin, da v Emacsu nekaj natipkate +in popravite. Bri¹ete lahko tudi besede ali vrstice. Tu je povzetek +ukazov za brisanje: + + pobri¹e znak tik pred kazalèkom (levo od + oznake za kazalèek) + C-d pobri¹e znak tik za kazalèkom (,pod` oznako + za kazalèek) + + M- pobri¹e besedo tik pred kazalèkom + M-d pobri¹e besedo tik za kazalèkom + + C-k zavr¾e besedilo desno od kazalèka do konca vrstice + M-k zavr¾e besedilo od polo¾aja kazalèka do konca stavka + +Èrka ,d` je iz angle¹ke besede ,delete` (pobrisati), èrka ,k` pa iz +besede ,kill` (pobiti). Ste opazili, da in C-d na eni, ter +M- in M-d na drugi strani nadaljujeta paralelo, ki sta jo zaèela +C-f in M-f ( pravzaprav ni kontrolni znak, kar pa naj nas ne +moti). C-k in M-k sta v enakem sorodu s C-e in M-e: prvi deluje na +vrstice, drugi na stavke. + +Kadarkoli pobri¹ete kaj veè kot en sam znak naenkrat, si Emacs za vsak +primer zapomni, kaj ste zavrgli, in lahko zavr¾eno vrnete (angl. +,,yank`` -- potegniti). Besedilo, ki smo ga zavrgli, lahko vrinemo +nazaj na isto mesto ali kam drugam. Lahko ga vrinemo tudi veèkrat, in +tako napravimo veè kopij. Ukaz za vraèanje zavr¾enega besedila je C-y. + +Razlika med tem, èe zavr¾ete cel odstavek besedila (angl. ,,kill``, +pobiti) ali pa èe pobri¹ete znak (angl. ,,delete``), je ta, da lahko +prvega vrnete nazaj z ukazom C-y, drugega pa ne. Na splo¹no ukazi, ki +lahko povzroèijo veliko ¹kode (pobri¹ejo veliko besedila), shranijo +pobrisano besedilo; tisti, ki pobri¹ejo samo posamezni znak, ali samo +prazne vrstice in presledke, pa ne. + +>> Postavite kazalèek na zaèetek neprazne vrstice. Pritisnite C-k, da + pobri¹ete vsebino vrstice. +>> ©e enkrat pritisnite C-k. To pobri¹e ¹e znak za novo vrstico. + +Ste opazili, da prvi C-k pobri¹e vsebino vrstice, naslednji C-k pa ¹e +vrstici samo, s èimer se vse besedilo pod biv¹o vrstico premakne za +eno vrstico navzgor? Ukaz C-k obravnava ¹tevilèni argument malo +drugaèe: pobri¹e toliko in toliko vrstic z vsebinami vred. To ni zgolj +ponovitev. C-u 2 C-k pobri¹e dve polni vrstici besedila, kar je nekaj +drugega, kot èe dvakrat vtipkate C-k. + +Besedilo, ki ste ga prej pobrisali, je shranjeno, in ga lahko povrnete +tja, kjer je trenutno kazalèek, z ukazom C-y. + +>> Poskusite z ukazom C-y povrniti pobrisano besedilo. + +Ukaz C-y si predstavljajte, kot da potegnete nazaj nekaj, kar vam je +nekdo odnesel. Èe ste uporabili veè zaporednih ukazov C-k, je vse +pobrisano besedilo shranjeno skupaj, in en sam C-y bo vrnil vse tako +pobrisane vrstice. + +>> Poskusite, nekajkrat vtipkajte C-k. + +Zdaj pa vrnimo pobrisano besedilo: + +>> Vtipkajte C-y. Zdaj pa premaknite kazalèek za nekaj vrstic navzdol + in ¹e enkrat vtipkajte C-y. Vidite zdaj, kako se kopira dele + besedila? + +Kaj pa, èe ste pobrisali nekaj besedila, ki bi ga radi vrnili, vendar +ste za iskanim odlomkom pobrisali ¹e nekaj? C-y vrne samo nazadnje +pobrisan odlomek. Vendar tudi prej¹nje besedilo ni izgubljeno. Do +njega lahko pridete z ukazom M-y. Ko ste vrnili nazadnje zbrisano +besedilo s C-y, pritisnite M-y, ki ga zamenja s predzanje pobrisanim +besedilom. Vsak naslednji M-y prika¾e ¹e eno prej. Ko ste konèno +pri¹li do iskanega besedila, ni treba napraviti niè posebnega, da bi +ga obdr¾ali. Preprosto nadaljujte z urejanjem, in vrnjeno besedilo bo +ostalo, kamor ste ga odlo¾ili. + +Èe pritisnete M-y dovolj velikokrat, se boste vrnili na zaèete, torej +spet na zadnje pobrisano besedilo. + +>> Pobri¹ite vrstico, premaknite se nekam drugam, in pobri¹ite ¹e + eno vrstico. + Z ukazom C-y dobite nazaj to drugo vrstico. + Z ukazom M-y pa jo zamenjate s prvo vrstico. + Ponovite ukaz M-y ¹e nekajkrat in si oglejte, kaj dobite na + zaslon. Ponavljajte ga, dokler se ne prika¾e ponovno nazadnje + pobrisana vrstica, in ¹e naprej. Èe ¾elite, lahko tudi ukazu + M-y podate pozitivno ali negativno ¹tevilo ponovitev. + + +* PREKLIC UKAZA (UNDO) +---------------------- + +Èe ste besedilo spremenili, a ste se kasneje premislili, lahko +besedilo vrnete v prvotno stanje z ukazom Undo, C-x u. Normalno vrne +C-x u zadnjo spremembo besedila; èe ukaz ponovimo, preklièemo ¹e +predzadnjo spremembo, in vsaka nadaljnja ponovitev se¾e ¹e eno +spremembo globlje v zgodovino. + +Emacs hrani bolj ali manj celotno zgodovino na¹ih ukazov, z dvema +izjemama: ukazov, ki niso napravili nobene spremembe v besedilu +(npr. premik kazalèka), ne shranjuje, in zaporedje do 20 vrinjenih +znakov shrani kot en sam ukaz. Slednje prihrani nekaj ukazov C-x u, ki +bi jih morali vtipkati. + +>> Pobri¹ite to vrstico z ukazom C-k, potem jo priklièite nazaj s C-x u. + +C-_ je alternativni ukaz za preklic zadnjega ukaza. Deluje enako kot +s C-x u, ga je pa la¾je odtipkati, èe morate ukaz ponoviti veèkrat +zaporedoma. Te¾ava z ukazom C-_ je, da na nekaterih tipkovnicah ni +povsem oèitno, kako ga vtipkati, zato je podvojen ¹e kot C-x u. Na +nekaterih terminalih moramo na primer vtipkati /, medtem ko dr¾imo +pritisnjeno tipko CONTROL. + +Èe podamo ukazu C-_ ali C-x u numerièni argument, je to enako, kot èe +bi ukaz roèno ponovili tolikokrat, kot pravi argument. + + +* DATOTEKE +---------- + +Da bi bile spremembe v besedilu trajne, morate besedilo shraniti v +datoteko. V nasprotnem primeru jih boste za vedno izgubili tisti hip, +ko boste zapustili Emacs. Besedilo postavimo v datoteko tako, da +na disku ,,poi¹èemo`` (angl. find) datoteko, preden zaènemo tipkati +(pravimo tudi, da ,,obi¹èemo`` datoteko). + +Poiskati datoteko pomeni, da v Emacsu vidimo vsebino datoteke. To je +bolj ali manj tako, kot da z Emacsom urejamo datoteko samo. Vendar pa +spremembe ne postanejo trajne, dokler datoteke ne shranimo +(angl. save) na disk. Tako imamo mo¾nost, da se izognemo temu, da bi +nam na pol spremenjene datoteke le¾ale po disku, kadar tega ne +¾elimo. Ker pa Emacs ohrani izvorno datoteko pod spremenjenim imenom, +lahko prvotno datoteko priklièemo nazaj celo ¹e potem, ko smo datoteko +¾e shranili na disk. + +V predzadnji vrstici na dnu zaslona vidite vrstico, ki se zaène in +konèa z vezaji, in vsebuje niz znakov ,,--:-- TUTORIAL``. Ta del +zaslona navadno vsebuje ime datoteke, ki smo jo obiskali. Zdajle je to +,,TUTORIAL``, va¹a delovna kopija uèbenika Emacsa. Ko boste poiskali +kak¹no drugo datoteko, bo na tem mestu pisalo njeno ime. + +Posebnost ukaza za iskanje datoteke je, da moramo povedati, katero +datoteko i¹èemo. Pravimo, da ukaz ,,prebere argument s terminala`` (v +tem primeru je argument ime datoteke). Ko vtipkate ukaz + + C-x C-f (poi¹èi datoteko) + +vas Emacs povpra¹a po imenu datoteke. Kar vtipkate, se sproti vidi v +vrstici na dnu zaslona. Temu delovnemu podroèju pravimo pogovorni +vmesnik (minibuffer), kadar se uporablja za tovrstni vnos. Znotraj +pogovornega vmesnika lahko uporabljate obièajne ukaze za urejanje, èe +ste se na primer pri tipkanju zmotili. + +Sredi tipkanja imena datoteke (ali katerega koli drugega opravila v +pogovornem vmesniku) lahko ukaz preklièete s C-g. + +>> Vtipkajte C-x C-f, zatem pa ¹e C-g. Zadnji ukaz od treh je + zaprl pogovorni vmesnik in tudi preklical ukaz C-x C-f, ki je + uporabljal pogovorni vmesnik. Konec z iskanjem datoteke. + +Ko ste dokonèali ime, ga vnesete s pritiskom na . S tem se +po¾ene ukaz C-x C-f in poi¹èe iskano datoteko. Pogovorni vmesnik +izgine, ko je ukaz izveden. + +Trenutek kasneje se vsebina datoteke pojavi na zaslonu. Zdaj lahko +dopolnjujete, urejate ali kako drugaèe spreminjate vsebino. Ko ¾elite, +da ostanejo spremembe trajne, izvedete ukaz: + + C-x C-s (shrani datoteko) + +Besedilo se s tem shrani iz pomnilnika raèunalnika na datoteko na +disk. Ko prviè izvedete ta ukaz, se izvorna datoteka preimenuje, tako +da ni izgubljena. Najdete jo pod novim imenom, ki se od starega +razlikuje po tem, da ima na koncu pripet znak ,,~``. + +Ko je Emacs shranil datoteko, izpi¹e njeno ime. Shranjujte raje +pogosteje kot ne, da v primeru, èe gre z raèunalnikom kaj narobe, ne +izgubite veliko. + +>> Vtipkajte C-x C-s, s èimer boste shranili svojo kopijo tega + uèbenika. Emacs bo v vrstici na dnu zaslona izpisal ,,Wrote + ...TUTORIAL``. + +Opozorilo: na nekaterih sistemih bo ukaz C-x C-s zamrznil zaslon, in +tako ne boste videli, da Emacs ¹e kaj izpi¹e. To je znak, da je +operacijski sistem prestregel znak C-s in ga interpretiral kot znak za +prekinitev toka podatkov, namesto da bi ga posredoval Emacsu. Zaslon +,,odmrznete`` z ukazom C-q. Èe je va¹ sistem eden takih, si za nasvet, +kako re¹iti to nev¹eènost, oglejte razdelek ,,Spontaneous Entry to +Incremental Search`` v priroèniku za Emacs. + +Poi¹èete lahko lahko ¾e obstojeèo datoteko, da si jo ogledate ali +popravite, ali pa tudi datoteko, ki ¹e ne obstaja. To je naèin, kako z +Emacsom ustvarimo novo datoteko: poi¹èite datoteko z izbranim imenom, +ki bo sprva prazna, in zaènite pisati. Ko jo boste prviè shranili, bo +Emacs ustvaril datoteko z vne¹enim besedilom. Od tod dalje delate na +¾e obstojeèi datoteki. + + +* DELOVNA PODROÈJA +------------------ + +Tudi èe ste z ukazom C-x C-f poiskali in odprli drugo datoteko, prva +ostane v Emacsu. Nanjo se vrnete tako, da jo ¹e enkrat ,,poi¹èete`` z +ukazom C-x C-f. Tako imate lahko v Emacsu hkrati kar precej datotek. + +>> Ustvarite datoteko z imenom ,,foo`` tako, da vtipkate C-x C-f + foo . Natipkajte nekaj besedila, ga po potrebi popravite, in + shranite v datoteko ,,foo`` z ukazom C-x C-s. Ko ste konèali, se + vrnite v uèbenik z ukazom C-x C-f TUTORIAL . + +Emacs hrani besedilo vsake datoteke v takoimenovanem ,,delovnem +podroèju`` (angl. buffer). Ko poi¹èemo datoteko, Emacs ustvari zanjo +novo delovno podroèje. Vsa obstojeèa delovna podroèja v Emacsu vidimo +z ukazom: + + C-x C-b Seznam delovnih podroèij. + +>> Poskusite C-x C-b zdaj. + +Vidite, da ima vsako delovno podroèje svoje ime, pri nekaterih pa pi¹e +tudi ime datoteke, katere vsebina se hrani v njem. Druga delovna +podroèja pa ne pripadajo nobeni datoteki. Podroèje ,,*Buffer List*``, +na primer, je ¾e eno takih. To delovno podroèje smo ustvarili +ravnokar, ko smo pognali ukaz C-x C-b. VSAKO besedilo, ki ga vidite v +katerem od Emacsovih oken, je vedno del kak¹nega delovnega podroèja. + +>> Z ukazom C-x 1 se znebite seznama delovnih podroèij. + +Èe ste spreminjali besedilo ene datoteke, potem pa poiskali drugo, to +ne shrani spremeb v prvo datoteko. Te ostanejo znotraj Emacsa, na +delovnem podroèju, ki pripada prvi datoteki. Ustvarjenje ali +spreminjanje delovnega podroèja druge datoteke nima nobenega vpliva na +podroèje prve. To je zelo uporabno, pomeni pa tudi, da potrebujemo +udobno pot, da shranimo delovno podroèje prve datoteke. Nerodno bi +bilo preklapljanje na prvo podroèje s C-x C-f, da bi shranili s C-x +C-s. Namesto tega imamo: + + C-x s Shrani nekatera delovna podroèja + +Ukaz C-x poi¹èe delovna podroèja, katerih vsebina je bila spremenjena, +odkar je bila zadnjiè shranjena na datoteko. Za vsako tako delovno +podroèje C-x s vpra¹a, èe ga ¾elite shraniti. + + +* RAZ©IRJEN NABOR UKAZOV +------------------------ + +©e mnogo, mnogo je ukazov Emacsa, ki bi zaslu¾ili, da jih obesimo na +razne kontrolne in meta znake. Emacs se temu izogne z ukazom X (iz angl. +eXtend - raz¹iriti), ki uvede ukaz iz raz¹irjenega nabora. Dveh vrst je: + + C-x Znakovna raz¹iritev (angl. Character eXtend). + Sledi mu en sam znak. + M-x Raz¹iritev s poimenovanim ukazom. Sledi mu dolgo ime + ukaza. + +Tudi ti ukazi so na splo¹no uporabni, ne uporabljamo pa jih tako +pogosto kot tiste, ki ste se jih ¾e nauèili. Dva ukaza iz raz¹irjenega +nabora ¾e poznamo: C-x C-f, s katerim poi¹èemo datoteko, in C-x C-s, s +katerim datoteko shranimo. ©e en primer je ukaz, s katerim Emacsu +povemo, da ¾elimo konèati z delom iz iziti iz Emacsa. Ta ukaz je C-x +C-c (ne skrbite: preden konèa, Emacs ponudi, da shrani vse spremenjene +datoteke). + +Z ukazom C-z Emacs zapustimo samo *zaèasno*, tako da lahko ob vrnitvi +nadaljujemo z delom, kjer smo ostali. + +Na sistemih, ki to dopu¹èajo, ukaz C-z izide iz Emacsa v ukazno +lupino, a ga ne konèa - èe uporabljate ukazno lupino C, se lahko +vrnete z ukazom ,fg` ali splo¹neje z ukazom ,,%emacs``. + +Drugod ukaz C-z po¾ene sekundarno ukazno lupino, tako da lahko +po¾enete kak¹en drug program in se kasneje vrnete v Emacs. V tem +primeru pravzaprav Emacsa ne zapustimo. Ukaz ,,exit`` v ukazni lupini +je navadno naèin, da zapremo sekundarno lupino in se vrnemo v Emacs. + +Ukaz C-x C-c uporabimo, èe se nameravamo odjaviti s sistema. To je +tudi pravilen naèin za izhod iz Emacsa, èe je tega pognal program za +delo s po¹to ali kak drug program, saj ta verjetno ne ve, kaj +napraviti z zaèasno prekinjenim Emacsom. V vseh ostalih primerih pa, +èe se ne nameravate odjaviti s sistema, uporabite C-z, in se vrnite v +Emacs, ko bi radi spet urejali besedilo. + +Ukazov C-x je veliko. Zaenkrat smo spoznali naslednje: + + C-x C-f Poi¹èi datoteko. + C-x C-s Shrani datoteko. + C-x C-b Seznam delovnih podroèij. + C-x C-c Konèaj Emacs. + C-x u Preklic zadnjega ukaza. + +Poimenovani raz¹irjeni ukazi so ukazi, ki se uporabljajo ¹e bolj +poredko, ali pa se uporabljajo samo v nekaterih naèinih dela. Eden +takih je na primer ukaz replace-string, ki po vsem besedilu zamenja en +niz znakov z drugim. Ko vtipkate M-x, se to izpi¹e v pogovornem +vmesniku na dnu zaslona, Emacs pa èaka, da vtipkate ime ukaza, ki ga +¾elite priklicati; v tem primeru je to ,,replace-string``. Vtipkajte +samo ,,repl s`` in Emacs bo dopolnil ime. Ukaz vnesete s +pritiskom na . + +Ukaz replace-string potrebuje dva argumenta -- niz, ki ga ¾elite +zamenjati, in niz, s katerim bi radi zamenjali prvega. Vsakega posebej +vnesete in zakljuèite s pritiskom na tipko Return. + +>> Premaknite kazalèek na prazno vrstico dve vrstici pod to, zatem + vtipkajte M-x repl szamenjalaspremenila. + + Opazite, kako se je ta vrstica zamenjala? Vse besede + z-a-m-e-n-j-a-l-a od tod do konca besedila ste nadomestili z besedo + ,,spremenila``. + + +* AVTOMATIÈNO SHRANJEVANJE +-------------------------- + +Spremembe v datoteki, ki jih ¹e niste shranili na disk, so izgubljene, +èe medtem denimo zmanjka elektrike. Da bi vas zavaroval pred tem, +Emacs periodièno avtomatièno shrani vse datoteke, ki jih +urejate. Avtomatièno shranjena datoteka se od izvorne razlikuje po +znaku ,#` na zaèetku in koncu imena: èe se je va¹a datoteka imenovala +,,hello.c``, se avtomatièno shranjena datoteka imenuje +,,#hello.c#``. Ko normalno shranite datoteko, avtomatièno shranjena +datoteka ni veè potrebna, in Emacs jo pobri¹e. + +Èe res pride do izgube podatkov v pomnilniku, lahko povrnete avtomatièno +shranjeno besedilo tako, da normalno poi¹èete datoteko (pravo ime +datoteke, ne ime avtomatièno shranjene datoteke), zatem pa vtipkate M-x +recover file. Ko vas vpra¹a za potrditev, vtipkajte yes +za nadaljevanje in povrnitev avtomatièno shranjenenih podatkov. + + +* ODZIVNO PODROÈJE +------------------ + +Kadar Emacs opazi, da poèasi vtipkavate ukaz, odpre v zadnji vrstici +na dnu zaslona odzivno podroèje in v njem sproti prikazuje natipkano. + + +* STATUSNA VRSTICA +------------------ + +Vrstica nad odzivnim podroèjem je statusna vrstica. Ta ka¾e verjetno +nekaj podobnega kot: + +--:** TUTORIAL (Fundamental)--58%---------------------- + +V njej so izpisani pomembni podatki o stanju Emacsa in besedilu, ki ga +urejate. + +Zdaj ¾e veste, kaj pomeni ime datoteke -- to je datoteka, ki ste jo +poiskali. Oznaka --NN%-- pomeni, da je nad vrhom zaslona ¹e NN +odstotkov celotne datoteke. Èe je zaèetek datoteke na zaslonu, bo +namesto --00%-- pisalo --Top--. Podobno bo pisalo --Bot--, èe je +zadnja vrstica datoteke na zaslonu. Èe je datoteka, ki jo ogledujete, +tako kratka, da gre vsa na en zaslon, pa bo pisalo --All--. + +Zvezdice na zaèetku vrstice pomenijo, da ste datoteko ¾e spreminjali. +Tik po tem, ko ste odprli ali shranili datoteko, ni nobenih zvezdic, +so samo èrtice. + +Del statusne vrstice znotraj oklepajev vam pove, v kak¹nem naèinu dela +Emacs. Privzeti naèin je osnovni naèin (Fundamental), v katerem ste +sedaj. Fundamental je eden od glavnih naèinov (angl. major +mode). Emacs pozna veliko razliènih glavnih naèinov. Nekateri od njih +so namenjeni pisanju programov, kot na primer Lisp, ali pisanju +besedil, kot npr. Text. Naenkrat je lahko aktiven le en glavni naèin, +njegovo ime pa je vedno izpisano v statusni vrstici, kjer zdaj pi¹e +Fundamental. + +Glavni naèini lahko spremenijo pomen nekaterim ukazom. Obstajajo, +denimo, ukazi za pisanje komentarjev v programu, in ker ima vsak +programski jezik svoje predstave o tem, kako mora komentar izgledati, +mora vsak glavni naèin vnesti komentarje drugaèe. Ker je vsak glavni +naèin ime raz¹irjenega ukaza, lahko tako tudi izbiramo glavni +naèin. Na primer, M-x fundamental-mode vas postavi v naèin +Fundamental. + +Èe nameravate popravljati slovensko (ali angle¹ko) besedilo, kot je na +primer tole, boste verjetno izbrali tekstovni naèin (Text). +>> Vtipkajte M-x text mode. + +Ne skrbite, noben od ukazov, ki ste se jih nauèili, se s tem ne +spremeni kaj dosti. Lahko pa opazite, da Emacs zdaj jemlje opu¹èaje za +dele besed, ko se premikate z M-f ali M-b. V osnovnem naèinu jih je +obravnaval kot meje med besedami. + +Glavni naèini navadno poèenjajo majhne spremembe, kot je ta: veèina +ukazov ,,opravi isti posel``, vendar pa to poènejo na razlièen naèin. + +Dokumentacijo o trenutno aktivnem glavnem naèinu dobite z ukazom C-h m. + +>> Uporabite C-u C-v enkrat ali veèkrat, toliko, da bo ta vrstica blizu + vrha zaslona. +>> Vtipkajte C-h m, da vidite, v èem se tekstovni naèin (Text) razlikuje + od osnovnega (Fundamental). +>> Vtipkajte C-x 1, da umaknete dokumentacijo z zaslona. + +Glavnim naèinom pravimo glavni naèini zato, ker obstajajo tudi +podnaèini (angl. minor modes). Podnaèini ne nadome¹èajo glavnih +naèinom, ampak le spreminjajo njihovo obna¹anje. Podnaèine lahko +aktiviramo ali deaktiviramo neodvisno od glavnega naèina in neodvisno +od ostalih podnaèinov. Tako lahko ne uporabljate nobenega podnaèina, +en podnaèin, ali kombinacijo veèih podnaèinov. + +Podnaèin, ki je zelo uporaben, posebno za pisanje besedil, je Auto +Fill. Ko je vklopljen, Emacs med pisanjem avtomatièno deli vrstice na +presledkih med besedami, tako da vrstice niso predolge. + +Vklopite ga lahko z ukazom M-x auto fill mode. Ko je +vklopljen, ga lahko izklopite z istim ukazom, M-x +auto fill mode. Z istim ukazom torej preklapljamo +(angl. toggle) med vklopljenim in izklopljenim stanjem. + +>> Vtipkajte zdaj M-x auto fill mode. Potem zaènite tipkati "asdf asdkl + sdjf sdjkf"... dokler ne opazite, da je Emacs razbil vrstico na dve. + Med tipkanjem mora biti dovolj presledkov, saj Auto Fill prelamlja + vrstice samo na presledkih. + +©irina besedila je navadno postavljena na 70 znakov, kar pa lahko +spremenite z ukazom C-x f. Novo ¹irino morate podati kot ¹tevilèni +argument. + +>> Vtipkajte C-x f in argument 20. (C-u 2 0 C-x f). Zatem vtipkajte + nekaj besedila in poglejte, èe bo Emacs res delil vrstice pri 20 + znakih. Potem z ukazom C-x f postavite mejo nazaj na 70. + +Auto Fill deluje le, kadar pi¹ete novo besedilo, ne pa, +kadar popravljate ¾e napisan odstavek. +Tak odstavek lahko poravnate tako, da kazalèek premaknete nekam +znotraj odstavka in uka¾ete M-q (Meta-q). + +>> Premaknite kazalèek v prej¹nji odstavek in izvedite M-q. + + +* ISKANJE +--------- + +Emacs lahko v besedilu poi¹èe niz znakov (zaporedje znakov ali besed), +naprej ali nazaj po besedilu. Iskanje spada v skupino ukazov za +premikanje kazalèka, saj premakne kazalèek na kraj v besedilu, kjer je +na¹el iskani niz. + +Iskanje v Emacsu je morda nekoliko drugaèno od tistega, ki ste ga +navajeni, in sicer je ,,inkrementalno``. To pomeni, da se iskanje +odvija hkrati s tem, ko tipkate iskani niz. + +Ukaza za iskanje sta C-s za iskanje naprej po datoteki in C-r za +iskanje nazaj po datoteki. POÈAKAJTE! Ne preizku¹ajte jih ¹e ta hip! + +Ko boste natipkali C-s, boste opazili niz ,,I-search`` kot pozivnik +v pogovornem vmesniku. To vam pove, da je Emacs v inkrementalnem iskanju +in vas èaka, da zaènete tipkati, kar i¹èete. zakljuèi iskanje. + +>> Pritisnite zdaj C-s. POÈASI, èrko za èrko, vtipkajte besedo + ,,kazalèek``. Za vsako vtipkano èrko se ustavite in si oglejte, kaj + se je zgodilo s kazalèkom. +>> ©e enkrat pritisnite C-s, da poi¹èete naslednji ,,kazalèek``. +>> ©estkrat pritisnite in opazujte, kako se premika kazalèek. +>> Konèajte iskanje s tipko . + +Ste videli, kaj se je zgodilo? Emacs pri inkrementalnem iskanju sku¹a +poiskati niz, ki ste ga natipkali do tistega hipa. Da poi¹èete +naslednje mesto, kjer se pojavi ,,kazalèek``, samo ¹e enkrat +pritisnete C-s. Èe takega mesta ni, Emacs èivkne in vam sporoèi, da +iskanje ni uspelo. Tudi C-g prekine iskanje. + +OPOZORILO: Na nekaterih sistemih bo s pritiskom na C-s ekran +zmrznil. To je znak, da je operacijski sistem prestregel znak C-s in +ga interpretiral kot znak za prekinitev toka podatkov, namesto da bi +ga posredoval programu Emacs. Ekran ,,odtajate`` s pritiskom na +C-q. Potem si oglejte razdelek ,,Spontaneous Entry to Incremental +Search`` v priroèniku za nasvet, kako se spopasti s to nev¹eènostjo. + +Èe sredi inkrementalnega iskanja pritisnete , boste opazili, +da to pobri¹e zadnji znak v iskanem nizu, kazalèek pa se premakne +nazaj na mesto v besedilu, kjer je na¹el kraj¹i niz. Na primer, +predpostavimo, da ste do zdaj natipkali ,,ka`` in je kazalèek na +mestu, kjer se prviè pojavi ,,ka``. Èe zdaj pritisnete , boste +s tem v pogovornem vmesniku izbrisali ,a`, hkrati pa se bo kazalèek +postavil na mesto, kjer je prviè na¹el ,k`, preden ste natipkali ¹e +,a`. + +Èe sredi iskanja vtipkate katerikoli kontrolni znaki ali metaznak +(razen tistih, ki imajo poseben pomen pri iskanju, to sta C-s in C-r), +se iskanje prekine. + +C-s zaène iskati na mestu v datoteki, kjer trenutno stoji kazalèek, in +i¹èe do konca datoteke. Èe bi radi iskali proti zaèetku datoteke, +namesto C-s vtipkamo C-r. Vse, kar smo povedali o ukazu C-s, velja +tudi za C-r, le smer iskanja je obrnjena. + + +* VEÈ OKEN NA ZASLONU +--------------------- + +Ena simpatiènih lastnosti Emacsa je, da zna hkrati prikazati veè oken +na ekranu, tudi èe ne delamo v grafiènem naèinu. + +>> Premaknite kazalèek v to vrstico in vtipkajte C-u 0 C-l. +>> Zdaj vtipkajte C-x 2, da razdelite zaslon na dve okni. + V obeh oknih imate odprt ta priroènik. Kazalèek je ostal v zgornjem + oknu. +>> Pritisnite C-M-v za listanje v spodnjem oknu. + (Èe nimate tipke Meta, tipkajte ESC C-v). +>> Vtipkajte C-x o (o kot ,,other``, drugi), da preselite kazalèek v + spodnje okno. +>> S C-v in M-v se v spodnjem oknu premikate po vsebini datoteke. + Zgornje okno ¹e vedno ka¾e ta navodila. +>> Ponovni C-x o vas vrne v zgornje okno. Kazalèek se je vrnil na + mesto, kjer je bil, preden smo skoèili v spodnje okno. + +Z ukazom C-x o lahko preklapljamo med okni. Vsako okno si zapomni, kje +v oknu je ostal kazalèek, samo trenutno aktivno okno pa kazalèek tudi +v resnici prika¾e. Vsi obièajni ukazi za urejanje, ki smo se jih +nauèili, veljajo za aktivno okno. + +Ukaz C-M-v je zelo uporaben, kadar urejamo besedilo v enem oknu, +drugega pa uporabljamo samo za pomoè. Kazalèek ostaja ves èas v oknu, +v katerem urejamo, po vsebini spodnjega okna pa se vseeno lahko +premikamo, ne da bi morali venomer skakati iz enega okna v drugega. + +C-M-v je primer znaka CONTROL-META. Èe imate v resnici tipko Meta (na +PC navadno levi Alt), lahko vtipkate C-M-v tako, da dr¾ite pritisnjeni +tako CONTROL kot META, medtem ko vtipkate v. Ni pomembno, katero od +tipk, CONTROL ali META, pritisnete prvo, saj obe delujeta ¹ele, ko +pritisnete znak, ki sledi (v zgornjem primeru ,v`). + +Nasprotno pa je vrstni red pritiskanja pomemben, èe nimate tipke META +in namesto nje uporabljate ESC. V tem primeru morate najprej +pritisniti ESC, potem pa Control-v. Obratna kombinacija, Control-ESC v ne +deluje. To je zato, ker je ESC znak sam po sebi, ne pa modifikator, +kot sta CONTROL in META. + +>> V zgornjem oknu vtipkajte C-x 1, da se znebite spodnjega okna. + +(Èe bi vtipkali C-x 1 v spodnjem oknu, bi se znebili +zgornjega. Razmi¹ljajte o tem ukazu kot ,,Obdr¾i samo eno okno, in +sicer tisto, v katerem sem zdaj.``) + +Seveda ni nujno, da obe okni ka¾eta isto delovno podroèje. Èe v enem +oknu izvedete C-x C-f in poi¹èete novo datoteko, se vsebina drugega +okna ne spremeni. V vsakem oknu lahko neodvisno obdelujete drugo +datoteko. + +Pa ¹e ena pot, kako v dveh oknih prika¾ete dve razlièni datoteki: + +>> Vtipkajte C-x 4 C-f, in na pozivnik vtipkajte ime ene va¹ih + datotek. Konèajte z . Odpre se ¹e eno okno in izbrana + datoteka se pojavi v drugem oknu. Tudi kazalèek se preseli v drugo + okno. + +>> Vtipkajte C-x o, da se vrnete nazaj v zgornje okno, in C-x 1, da + zaprete spodnje okno. + + +* REKURZIVNI NIVOJI UREJANJA +---------------------------- + +Vèasih boste pri¹li v nekaj, èemur se pravi ,,rekurzivni nivo +urejanja``. To se vidi po tem, da v statusni vrstici oglati oklepaji +oklepajo ime glavnega naèina. V osnovnem naèinu bi, na primer, videli +[(Fundamental)] namesto (Fundamental). + +Iz rekurzivnega nivoja urejanja se re¹ite, èe vtipkate ESC ESC ESC. To +zaporedje je vsenamenski ukaz ,,pojdi ven``. Uporabite ga lahko tudi +za ukinjanje odveènih oken, ali vrnitev iz pogovornega vmesnika. + +>> Pritisnite M-x, da odprete pogovorni vmesnik, zatem pa vtipkajte + ESC ESC ESC, da pridete ven iz njega. + +Z ukazom C-g ne morete iz rekurzivnega nivoja urejanja, ker C-g +preklièe ukaze ali argumente ZNOTRAJ rekurzivnega nivoja. + + +* DODATNA POMOÈ +--------------- + +V tem uvodu smo posku¹ali zbrati dovolj informacij, da lahko zaènete +Emacs uporabljati. Emacs ponuja toliko, da bi bilo nemogoèe vse to +zbrati tukaj. Verjetno pa bi se vseeno radi nauèili kaj o ¹tevilnih +koristnih mo¾nostih, ki jih ¹e ne poznate. Emacs ima ¾e vgrajene +veliko dokumentacije, do katere lahko pridete s pritiskom na CTRL-h (h +kot ,,help``, pomoè). + +Za pomoè pritisnete C-h, potem pa vtipkate znak, ki pove, kak¹no pomoè +¾elite. Èe ste poplnoma izgubljeni, vtipkajte C-h ? in Emacs vam bo +povedal, kak¹na pomoè je sploh na voljo. Èe ste vtipkali C-h, pa ste +si premislili, lahko ukaz preklièete s C-g. + +(Ponekod se znak C-h preslika v kaj drugega. To ni dobro, in v takem +primeru se prito¾ite sistemskemu vzdr¾evalcu. Medtem pa, èe C-h ne +prika¾e sporoèila o pomoèi na dnu zaslona, namesto tega poskusite +pritisniti tipko F1 ali pa vtipkajte M-x help .) + +Najosnovnej¹i tip pomoèi prika¾e C-h c. Pritisnite C-h, tipko c, zatem +pa ukazni znak ali zaporedje ukaznih znakov, in Emacs bo izpisal +kratek opis ukaza. + +>> Vtipkajte C-h c Control-p. + Izpi¹e se nekaj takega kot + + C-p runs the command previous-line + +Ukaz je izpisal ime funkcije, ki izvede ukaz. Imena funkcij +uporabljamo, kadar pi¹emo prilagoditve in raz¹iritve Emacsa. Ker pa so +navadno imena funkcij izbrana tako, da kaj povedo o tem, kaj funkcija +poène, bo verjetno to tudi dovolj za kratko osve¾itev, èe ste se z +ukazom ¾e kdaj sreèali. + +Ukazu C-h lahko sledi tudi zaporedje znakov, kot na primer C-x C-s, +ali, èe nimate tipke META, v. + +Za veè informacij o ukazu vtipkajte C-h k namesto C-h c. + +>> Vtipkajte C-h k Control-p. + +To odpre novo okno in v njem prika¾e dokumentacijo o funkciji, obenem +z njenim imenom. Ko ste opravili, vtipkajte C-x 1, da se znebite okna +z pomoèjo. Tega seveda ni potrebno napraviti takoj, ampak lahko +urejate, medtem ko imate odprto okno s pomoèjo, in ga zaprete, ko ste +konèali. + +Sledi ¹e nekaj uporabnih mo¾nosti, ki jih ponuja pomoè: + + C-h f Opi¹i funkcijo. Kot argument morate podati ime + funkcije. + +>> Poskusite C-h f previous-line. + To izpi¹e vse podatke, ki jih ima Emacs o funkciji, ki izvede ukaz C-p. + + C-h a Apropos. Vtipkajte kljuèno besedo in Emacs bo izpisal + vse ukaze, ki vsebujejo to kljuèno besedo. Vse te + ukaze lahko priklièete z Meta-x. Pri nekaterih ukazih + bo Apropos izpisal tudi eno ali dvoznakovno + zaporedje, s katerim dose¾ete isti uèinek. + +>> Vtipkajte C-h a file. + +To odpre novo okno, v katerem so vsa dolga imena ukazov, ki vsebujejo +,,file`` v imenu. Izvedete jih lahko z M-x. Pri nekaterih se izpi¹e +tudi kratek ukaz, npr. C-x C-f ali C-x C-w pri ukazih find-file in +write-file. + +>> Pritisnite C-M-v, da se sprehajate po oknu s pomoèjo. Poskusite + nekajkrat. + +>> Vtipkajte C-x 1, da zaprete okno s pomoèjo. + + +* ZAKLJUÈEK +----------- + +Zapomnite si, da Emacs zapustite z ukazom C-x C-c. Èe bi radi samo +zaèasno skoèili v ukazno lupino in se kasneje vrnili v Emacs, pa +storite to z ukazom C-z. + +Ta uèbenik je napisan z namenom, da bi bil razumljiv vsem novincem v +Emacsu. Èe se vam kaj ne zdi jasno napisano, ne valite krivde nase - +prito¾ite se! + + +RAZMNO®EVANJE IN RAZ©IRJANJE +---------------------------- + +Angle¹ki izvirnik tega uvoda v Emacs je naslednik dolge vrste tovrstnih +besedil, zaèen¹i s tistim, ki ga je Stuart Cracraft napisal za izvorni +Emacs. V sloven¹èino ga je prevedel Primo¾ Peterlin. + +To besedilo, kot sam GNU Emacs, je avtorsko delo, in njegovo +razmno¾evanje in raz¹irjanje je dovoljeno pod naslednjimi pogoji: + +Copyright (c) 1985, 1996, 1997 Free Software Foundation + + Dovoljeno je izdelovati in raz¹irjati neokrnjene kopije tega spisa + v kakr¹nikoli obliki pod pogojem, da je ohranjena navedba o + avtorstvu in to dovoljenje, ter da distributer dovoljuje prejemniku + nadaljnje raz¹irjanje pod pogoji, navedenimi v tem dovoljenju. + + Pod pogoji iz prej¹njega odstavka je dovoljeno raz¹irjati + spremenjene verzije tega spisa ali njegovih delov, èe je jasno + oznaèeno, kdo je nazadnje vnesel spremembe. + +Pogoji za razmno¾evanje in raz¹irjanje samega Emacsa so malo drugaèni, +a v istem duhu. Prosimo, preberite datoteko COPYING in potem dajte +kopijo programa GNU Emacs svojim prijateljem. Pomagajte zatreti +obstrukcionizem (,,lastni¹tvo``) v programju tako, da uporabljate, +pi¹ete in delite prosto programje! + +;;; Local Variables: +;;; coding: iso-latin-2 +;;; End: diff --git a/etc/package-index.LATEST.gpg b/etc/package-index.LATEST.gpg index 40ff6d3..0b4c618 100644 --- a/etc/package-index.LATEST.gpg +++ b/etc/package-index.LATEST.gpg @@ -4,21 +4,190 @@ Hash: SHA1 ;; Package Index file -- Do not edit manually. ;;;@@@ (package-get-update-base-entry (quote -(general-docs +(xetla (standards-version 1.1 version "1.01" + author-version "steve@eicq.org--2005/xetla--main--1.1--version-0" + date "2005-12-29" + build-date "2005-12-29" + maintainer "Steve Youngs " + distribution xemacs + priority low + category "standard" + dump nil + description "(S)XEmacs Frontend to GNU/arch (tla)." + filename "xetla-1.01-pkg.tar.gz" + md5sum "45c66a4429f53553fda1030e4f0d1e85" + size 294912 + provides (ewoc xetla-browse xetla-core + xetla-defs xetla-tips xetla-version xetla) + requires (ediff xemacs-base jde mail-lib dired prog-modes) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(re-builder + (standards-version 1.1 + version "1.05" + author-version "1.20" + date "2005-09-12" + build-date "2005-09-12" + maintainer "Aidan Kehoe " + distribution xemacs + priority medium + category "standard" + dump nil + description "Interactive development tool for regular expressions." + filename "re-builder-1.05-pkg.tar.gz" + md5sum "da77f41112a0f92416ca74fd26b23aee" + size 20729 + provides (re-builder) + requires () + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(latin-euro-standards + (standards-version 1.1 + version "1.07" + author-version "1.07" + date "2005-06-29" + build-date "2005-06-29" + maintainer "Aidan Kehoe " + distribution mule + priority high + category "mule" + dump nil + description "MULE: Support for the Latin{7,8,9,10} character sets & coding systems." + filename "latin-euro-standards-1.07-pkg.tar.gz" + md5sum "1557507199aa08bb8b292e02af543f9d" + size 13887 + provides () + requires (mule-base) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(xwem + (standards-version 1.1 + version "1.21" + author-version "lg@xwem.org--2005/xwem--main--2.1--versionfix-1" + date "2005-04-09" + build-date "2005-04-09" + maintainer "Zajcev Evgeny " + distribution xemacs + priority low + category "standard" + dump nil + description "X Emacs Window Manager." + filename "xwem-1.21-pkg.tar.gz" + md5sum "766dbbfba485e1ed1d7a6d289d73ff21" + size 649651 + provides (ixwem xwem-appcollect xwem-battery xwem-clgen + xwem-clients xwem-clswi xwem-compat xwem-desktop + xwem-diagram xwem-edmacro xwem-edprops xwem-events + xwem-faces xwem-focus xwem-frame xwem-framei + xwem-frametrans xwem-gamma xwem-help xwem-holer + xwem-icons xwem-interactive xwem-keyboard xwem-keydefs + xwem-keymacro xwem-keytt xwem-launcher xwem-load + xwem-loaddefs xwem-macros xwem-main xwem-manage + xwem-minibuffer xwem-misc xwem-modes xwem-mouse + xwem-netwm xwem-osd xwem-pager xwem-ratanot xwem-recover + xwem-register xwem-report xwem-root xwem-rooter + xwem-rooticon xwem-selections xwem-smartmods xwem-sound + xwem-special xwem-strokes xwem-struct xwem-tabbing + xwem-theme xwem-time xwem-transient xwem-tray xwem-version + xwem-vert xwem-weather xwem-win xwem-worklog xwem-xfig) + requires (xwem xemacs-base xlib strokes edit-utils text-modes time slider elib ilisp mail-lib) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(escreen + (standards-version 1.1 + version "1.01" + author-version "1.16" + date "2004-03-15" + build-date "2004-03-15" + maintainer "Jan Rychter " + distribution xemacs + priority low + category "standard" + dump nil + description "Multiple editing sessions withing a single frame (like screen)." + filename "escreen-1.01-pkg.tar.gz" + md5sum "2998cd0d7a90b89a3c3860549c43622a" + size 14639 + provides (escreen) + requires (xemacs-base) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(xlib + (standards-version 1.1 + version "1.14" + author-version "lg@xwem.org--2005/xlib--main--2.1--version-0" + date "2005-04-05" + build-date "2005-04-05" + maintainer "Zajcev Evgeny " + distribution xemacs + priority low + category "standard" + dump nil + description "Emacs interface to X server." + filename "xlib-1.14-pkg.tar.gz" + md5sum "0d3adfa462bebb9009d20b0623d23664" + size 205806 + provides (xlib-composer xlib-const xlib-hello xlib-img xlib-keysymdb xlib-math xlib-testing xlib-tray xlib-version xlib-vidmode xlib-xc xlib-xdpms xlib-xinerama xlib-xlib xlib-xpm xlib-xr xlib-xrecord xlib-xshape xlib-xtest xlib-xwin) + requires (xlib xemacs-base) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(erc + (standards-version 1.0 + version "0.19" + author-version "Version 5.0 Revision: 1.776" + date "2005-10-21" + build-date "2005-10-21" + maintainer "Adrian Aichner " + distribution stable + priority low + category "standard" + dump nil + description "ERC is an Emacs InternetRelayChat client." + filename "erc-0.19-pkg.tar.gz" + md5sum "3ec5279835c74460981e76b169aab269" + size 461162 + provides (erc) + requires (edit-utils fsf-compat gnus pcomplete xemacs-base text-modes ispell viper) + type regular +)) +)) +;;;@@@ +(package-get-update-base-entry (quote +(general-docs + (standards-version 1.1 + version "1.04" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-05-07" + build-date "2005-05-07" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "General XEmacs documentation." - filename "general-docs-1.01-pkg.tar.gz" - md5sum "06c3e4e0aeddd995f2697c91a6b8cc00" - size 1435 + filename "general-docs-1.04-pkg.tar.gz" + md5sum "0d55fe74b8cc9a5a1d34e27e2d096ec1" + size 43374 provides () requires () type regular @@ -28,21 +197,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (riece (standards-version 1.1 - version "1.12" - author-version "0.1.5" - date "2003-10-29" - build-date "2003-10-29" + version "1.21" + author-version "2.0.2" + date "2005-11-21" + build-date "2005-11-21" maintainer "Daiki Ueno " distribution xemacs priority high category "standard" dump nil description "IRC (Internet Relay Chat) client for Emacs." - filename "riece-1.12-pkg.tar.gz" - md5sum "8859cfde4a93a31407e29c35a35e9669" - size 106360 - provides (riece-compat riece-xemacs riece-globals riece-options riece-version riece-coding riece-complete riece-identity riece-channel riece-user riece-misc riece-layout riece-display riece-server riece-naming riece-message riece-filter riece-handle riece-000 riece-200 riece-300 riece-400 riece-500 riece-commands riece riece-ctcp riece-highlight riece-log riece-mini riece-rdcc riece-url riece-unread riece-doctor riece-alias riece-guess riece-history riece-button riece-keyword riece-menu riece-icon) - requires (xemacs-base mail-lib) + filename "riece-1.21-pkg.tar.gz" + md5sum "69dad9e533297eb21313dde7b8ce0026" + size 198929 + provides (riece-compat riece-xemacs riece-globals riece-options riece-debug riece-version riece-coding riece-complete riece-addon-modules riece-addon riece-ruby riece-cache riece-mode riece-identity riece-channel riece-user riece-misc riece-signal riece-layout riece-display riece-server riece-naming riece-message riece-filter riece-handle riece-000 riece-200 riece-300 riece-400 riece-500 riece-commands riece-irc riece riece-alias riece-async riece-biff riece-button riece-ctcp riece-ctlseq riece-doctor riece-eval-ruby riece-eval riece-foolproof riece-google riece-guess riece-hangman riece-highlight riece-history riece-icon riece-ignore riece-kakasi riece-keepalive riece-keyword riece-log riece-lsdb riece-menu riece-mini riece-rdcc riece-shrink-buffer riece-skk-kakutei riece-toolbar riece-unread riece-url riece-xface riece-xfaceb riece-yank) + requires (xemacs-base mail-lib bbdb) type regular )) )) @@ -72,19 +241,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (hyperbole (standards-version 1.0 - version "1.13" + version "1.16" author-version "4.18" - date "2003-10-31" - build-date "2003-10-31" + date "2004-06-13" + build-date "2004-06-13" maintainer "Mats Lidell " distribution stable priority high category "standard" dump nil description "Hyperbole: The Everyday Info Manager" - filename "hyperbole-1.13-pkg.tar.gz" - md5sum "fed416810d33560f433c4ad0bef605bc" - size 634192 + filename "hyperbole-1.16-pkg.tar.gz" + md5sum "64be21a91b7ef00696b19478ccef90f6" + size 636211 provides (hact hactypes hargs hbdata hbmap hbut hgnus hhist hib-doc-id hib-kbd hibtypes hinit hlvar hmail hmh hmoccur hmous-info hmouse-drv hmouse-key hmouse-mod hmouse-tag hpath hrmail hsite hsmail hsys-w3 hsys-wais htz hui-menu hui-mini hui-mouse hui-window hui-xe-but hui hvar hversion hvm hypb hyperbole set wconfig wrolo-logic wrolo-menu wrolo) requires (xemacs-base mail-lib calendar vm text-modes gnus mh-e rmail apel tm sh-script net-utils) type regular @@ -94,20 +263,20 @@ Hash: SHA1 (package-get-update-base-entry (quote (ecb (standards-version 1.1 - version "1.13" - author-version "1.96" - date "2003-10-31" - build-date "2003-10-31" + version "1.22" + author-version "2.31" + date "2004-12-22" + build-date "2004-12-22" maintainer "Klaus Berndl " distribution xemacs priority low category "standard" dump nil description "Emacs source code browser." - filename "ecb-1.13-pkg.tar.gz" - md5sum "dbbc4f68db8f2f294b89f0ee11ae6156" - size 525836 - provides (ecb-buffertab ecb-compilation ecb-create-layout ecb-cycle ecb ecb-eshell ecb-examples ecb-face ecb-help ecb-layout ecb-layout-defs ecb-mode-line ecb-navigate ecb-speedbar ecb-tod ecb-autogen ecb-jde ecb-upgrade ecb-util ecb-winman-support silentcomp tree-buffer) + filename "ecb-1.22-pkg.tar.gz" + md5sum "ebce6137e59c2792b3960bce293f0ec1" + size 887270 + provides (ecb-buffertab ecb-compilation ecb-create-layout ecb-cycle ecb ecb-eshell ecb-examples ecb-face ecb-file-browser ecb-help ecb-layout ecb-layout-defs ecb-method-browser ecb-mode-line ecb-navigate ecb-speedbar ecb-tod ecb-autogen ecb-jde ecb-upgrade ecb-util ecb-winman-support ecb-semantic-wrapper silentcomp tree-buffer ecb-compatibility ecb-common-browser) requires (xemacs-base semantic eieio fsf-compat edit-utils jde mail-lib eshell ediff xemacs-devel speedbar c-support) type regular )) @@ -116,21 +285,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (pgg (standards-version 1.1 - version "1.04" + version "1.06" author-version "0.1" - date "2003-10-31" - build-date "2003-10-31" + date "2005-09-26" + build-date "2005-09-26" maintainer "Simon Josefsson " distribution xemacs priority low category "standard" dump nil description "Emacs interface to various PGP implementations." - filename "pgg-1.04-pkg.tar.gz" - md5sum "8f4d77a0e99edbd3040c8d3988109ee8" - size 31307 + filename "pgg-1.06-pkg.tar.gz" + md5sum "6cb9d38dfe23cdd8ff62291be5a8b03a" + size 33917 provides (pgg pgg-def pgg-parse pgg-gpg pgg-pgp pgg-pgp5) - requires (xemacs-base fsf-compat edebug) + requires (xemacs-base fsf-compat edebug ecrypto) type regular )) )) @@ -138,19 +307,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (perl-modes (standards-version 1.1 - version "1.05" + version "1.08" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-04-27" + build-date "2005-04-28" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Perl support." - filename "perl-modes-1.05-pkg.tar.gz" - md5sum "cbfc241502bb708e878bcb2d587a78b1" - size 161184 + filename "perl-modes-1.08-pkg.tar.gz" + md5sum "b35612e5ac120e2d875899f2314cfa85" + size 165731 provides (cperl-mode perl-mode) requires (xemacs-base ispell ps-print edit-utils fsf-compat) type regular @@ -160,21 +329,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (python-modes (standards-version 1.1 - version "1.03" + version "1.07" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" - maintainer "XEmacs Development Team " + date "2005-12-19" + build-date "2005-12-19" + maintainer "Skip Montanaro " distribution xemacs priority low category "standard" dump nil description "Python support." - filename "python-modes-1.03-pkg.tar.gz" - md5sum "537b318e5901cfc95ba7dfcce32d24bf" - size 82105 + filename "python-modes-1.07-pkg.tar.gz" + md5sum "574cac0c86f8e19c684017989ea25801" + size 92924 provides (pydoc python-mode) - requires (xemacs-base mail-lib) + requires (xemacs-base mail-lib edit-utils fsf-compat) type regular )) )) @@ -204,19 +373,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (fortran-modes (standards-version 1.1 - version "1.03" + version "1.05" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-12-20" + build-date "2005-12-20" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Fortran support." - filename "fortran-modes-1.03-pkg.tar.gz" - md5sum "413d2f5ea1497c29b436fee52073563b" - size 66719 + filename "fortran-modes-1.05-pkg.tar.gz" + md5sum "2c2545602482660ad0d811b0574a3eed" + size 70602 provides (f90 fortran) requires (xemacs-base) type regular @@ -270,21 +439,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (ecrypto (standards-version 1.1 - version "0.14" + version "0.20" author-version "2.0" - date "2003-10-31" - build-date "2003-10-31" + date "2005-09-26" + build-date "2005-09-26" maintainer "Simon Josefsson " distribution xemacs priority low category "standard" dump nil description "Crypto functionality in Emacs Lisp." - filename "ecrypto-0.14-pkg.tar.gz" - md5sum "59207e5f5a5300ccf0d21f27b018de91" - size 68741 + filename "ecrypto-0.20-pkg.tar.gz" + md5sum "eb94f451a4d279cd92f8f2bcb9b9b79b" + size 76257 provides (ascii-armor blowfish des hex-util md4 md5-dl md5-el md5 paranoid rander rc16 rijndael sha1-dl sha1-el sha1) - requires () + requires (xemacs-base) type regular )) )) @@ -314,19 +483,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (sasl (standards-version 1.1 - version "1.14" + version "1.16" author-version "1.14.4" - date "2003-10-31" - build-date "2003-10-31" + date "2005-09-26" + build-date "2005-09-26" maintainer "Simon Josefsson " distribution xemacs priority low category "standard" dump nil description "Simple Authentication and Security Layer (SASL) library." - filename "sasl-1.14-pkg.tar.gz" - md5sum "a00a2f0e7e6f1614ae95cdbef50e333e" - size 27045 + filename "sasl-1.16-pkg.tar.gz" + md5sum "2799ab3b97e3d3cd2fd5ca0385b04931" + size 27864 provides (hmac-def hmac-md5 hmac-sha1 ntlm sasl sasl-cram sasl-digest sasl-ntlm sasl-plain sasl-login sasl-anonymous) requires (ecrypto) type regular @@ -336,19 +505,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (sml-mode (standards-version 1.1 - version "0.10" + version "0.12" author-version "3.9.5" - date "2003-10-31" - build-date "2003-10-31" + date "2005-07-27" + build-date "2005-07-27" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "SML editing support." - filename "sml-mode-0.10-pkg.tar.gz" - md5sum "87914cf428610799a98815b17393f6e0" - size 81763 + filename "sml-mode-0.12-pkg.tar.gz" + md5sum "017614793fe793e401911c0824356a37" + size 82366 provides (sml-compat sml-defs sml-mode sml-move sml-proc sml-util) requires (xemacs-base edebug fsf-compat) type regular @@ -356,43 +525,21 @@ Hash: SHA1 )) ;;;@@@ (package-get-update-base-entry (quote -(ess - (standards-version 1.1 - version "1.06" - author-version "5.1.21" - date "2003-11-10" - build-date "2003-11-10" - maintainer "A.J. Rossini " - distribution xemacs - priority medium - category "standard" - dump nil - description "ESS: Emacs Speaks Statistics." - filename "ess-1.06-pkg.tar.gz" - md5sum "46e105b2fd715790f6358d9f637cdf32" - size 445788 - provides (ess-batch ess-comp ess-cust ess-dump ess-emcs ess-font-lock ess-help ess-inf ess-iw32 ess-latex-mode ess-menu ess-mode ess-mous ess-noweb ess-site ess-sysdp ess-utils ess-vars ess essa-r essa-sas essd-arc essd-els essd-r essd-omg essd-r essd-s3 essd-s4 essd-sas essd-sp3 essd-sp4 essd-sp5 essd-sp6 essd-sta essd-vst essd-xls essddr essdsp6w essl-bug essl-lsp essl-omg essl-py essl-s essl-sas essl-sta make-regexp mouseme msdos noweb-font-lock-mode noweb-mode) - requires (xemacs-base mail-lib fsf-compat edit-utils speedbar sh-script eterm) - type regular -)) -)) -;;;@@@ -(package-get-update-base-entry (quote (haskell-mode (standards-version 1.1 - version "1.06" - author-version "1.44" - date "2003-10-31" - build-date "2003-10-31" - maintainer "XEmacs Development Team " + version "1.07" + author-version "1.45" + date "2004-06-16" + build-date "2004-06-16" + maintainer "Jerry James " distribution xemacs priority low category "standard" dump nil description "Haskell editing support." - filename "haskell-mode-1.06-pkg.tar.gz" - md5sum "75c3dcb6fbe0a8824c865d8b989866cc" - size 94315 + filename "haskell-mode-1.07-pkg.tar.gz" + md5sum "20d1ff41a4b753a276affd60850b08e7" + size 97642 provides (haskell-decl-scan haskell-doc haskell-font-lock haskell-indent haskell-mode haskell-simple-indent) requires (dired mail-lib xemacs-base edit-utils) type regular @@ -422,45 +569,23 @@ Hash: SHA1 )) ;;;@@@ (package-get-update-base-entry (quote -(liece - (standards-version 1.1 - version "1.12" - author-version "1.4.9" - date "2003-04-22" - build-date "2003-04-22" - maintainer "Daiki Ueno " - distribution xemacs - priority high - category "standard" - dump nil - description "IRC (Internet Relay Chat) client for Emacs." - filename "liece-1.12-pkg.tar.gz" - md5sum "c7f2aab45f8ada9398d4b0807e80433a" - size 199275 - provides (liece-xemacs gettext liece-clfns liece-handler liece-compat liece-version liece-vars liece-globals liece-inlines liece-filter liece-coding liece-dcc liece-menu liece-000 liece-200 liece-300 liece-400 liece-500 liece-nick liece-channel liece-commands liece-ctcp liece-q-el liece-message liece-handle liece-hilit liece-intl liece-mail liece-minibuf liece-misc liece-tcp liece-url liece-x-face liece-window liece) - requires (apel mail-lib fsf-compat xemacs-base) - type regular -)) -)) -;;;@@@ -(package-get-update-base-entry (quote (latin-unity (standards-version 1.1 - version "1.09" - author-version "1.09" - date "2003-11-09" - build-date "2003-11-09" + version "1.16" + author-version "1.16" + date "2005-12-29" + build-date "2005-12-29" maintainer "Stephen J. Turnbull " distribution mule priority high category "mule" dump nil description "MULE: find single ISO 8859 character set to encode a buffer." - filename "latin-unity-1.09-pkg.tar.gz" - md5sum "83b7fd603ad7cd5d9c459a0035501cac" - size 106267 + filename "latin-unity-1.16-pkg.tar.gz" + md5sum "2591f33d4c1057c238efe124ff534c81" + size 104739 provides (latin-unity latin-unity-tables latin-unity-utils) - requires (mule-base mule-ucs leim fsf-compat dired) + requires (mule-base latin-euro-standards mule-ucs leim fsf-compat dired) type regular )) )) @@ -468,19 +593,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (mmm-mode (standards-version 1.1 - version "1.01" + version "1.02" author-version "0.4.7" - date "2003-10-29" - build-date "2003-10-29" + date "2004-03-02" + build-date "2004-03-02" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Multiple major modes in a single buffer" - filename "mmm-mode-1.01-pkg.tar.gz" - md5sum "28cf0136d0d8e59e74a464074a98ef4b" - size 175927 + filename "mmm-mode-1.02-pkg.tar.gz" + md5sum "f68f90fb1b870f7a8e89c83e9b6c3973" + size 176072 provides (mmm-auto mmm-class mmm-cmds mmm-compat mmm-mason mmm-mode mmm-region mmm-rpm mmm-sample mmm-univ mmm-utils mmm-vars) requires (xemacs-base fsf-compat ) type regular @@ -512,19 +637,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (xemacs-base (standards-version 1.1 - version "1.82" + version "2.01" author-version "No-Upstream-Ver" - date "2003-10-29" - build-date "2003-10-29" + date "2005-12-31" + build-date "2005-12-31" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "Fundamental XEmacs support, you almost certainly need this." - filename "xemacs-base-1.82-pkg.tar.gz" - md5sum "7ba84839d26de61e4cb62741531d59ba" - size 472771 + filename "xemacs-base-2.01-pkg.tar.gz" + md5sum "a378f0ed585ebb9d6d8ace534f7e5987" + size 513382 provides (add-log advice-preload 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 passwd pp regexp-opt regi ring shell skeleton sort thing time-stamp timezone tq xbm-button xpm-button) requires () type regular @@ -534,22 +659,22 @@ Hash: SHA1 (package-get-update-base-entry (quote (tramp (standards-version 1.1 - version "1.16" - author-version "2.0.35" - date "2003-07-21" - build-date "2003-07-21" + version "1.28" + author-version "2.0.51" + date "2005-10-12" + build-date "2005-10-12" maintainer "Kai Großjohann " distribution xemacs priority low category "standard" dump nil description "Remote shell-based file editing." - filename "tramp-1.16-pkg.tar.gz" - md5sum "ec5a21c4462d48ebe8dc01ea0e32373c" - size 251091 + filename "tramp-1.28-pkg.tar.gz" + md5sum "5ac2f914804150d00cba64c717182c59" + size 291435 provides (tramp tramp-efs tramp-ftp tramp-smb tramp-util tramp-uu tramp-vc trampcache) - requires (tramp xemacs-base vc fsf-compat efs dired mail-lib gnus ediff) + requires (tramp xemacs-base vc efs dired mail-lib gnus ediff sh-script) type regular )) )) @@ -557,20 +682,20 @@ Hash: SHA1 (package-get-update-base-entry (quote (text-modes (standards-version 1.1 - version "1.71" + version "1.90" author-version "No-Upstream-Ver" - date "2003-11-13" - build-date "2003-11-13" + date "2005-11-02" + build-date "2005-11-02" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "Miscellaneous support for editing text files." - filename "text-modes-1.71-pkg.tar.gz" - md5sum "39be167962dc1a547a13f8bb1788327f" - size 377506 - provides (ansi-color autoinsert crontab-edit desktop-entry-mode filladapt flyspell folding fold-isearch hexl htmlize image-mode iso-acc iso-ascii iso-cvt iso-insert iso-swed rtf-support swedish tabify whitespace-mode winmgr-mode xpm-mode xrdb-mode apache-mode po-mode po-compat css-mode) + filename "text-modes-1.90-pkg.tar.gz" + md5sum "f2d5111f6e561b595aead30333b704cf" + size 442526 + provides (ansi-color autoinsert crontab-edit desktop-entry-mode filladapt flyspell folding fold-isearch hexl htmlize image-mode iso-acc iso-ascii iso-cvt iso-insert iso-swed rtf-support swedish tabify whitespace-mode whitespace-visual-mode winmgr-mode xpm-mode xrdb-mode apache-mode po-mode po-compat css-mode) requires (ispell fsf-compat xemacs-base) type regular )) @@ -579,20 +704,20 @@ Hash: SHA1 (package-get-update-base-entry (quote (pcl-cvs (standards-version 1.1 - version "1.65" + version "1.66" author-version "R-2_9_9" - date "2003-10-31" - build-date "2003-10-31" + date "2004-12-22" + build-date "2004-12-22" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "CVS frontend." - filename "pcl-cvs-1.65-pkg.tar.gz" - md5sum "53b8cbd4d0b7709cfaf9d51e11888324" - size 161016 - provides (cvs-compat cvs-edit cvs-log cvs-status easy-mmode pcl-cvs-defs pcl-cvs-info pcl-cvs-parse pcl-cvs-util pcl-cvs) + filename "pcl-cvs-1.66-pkg.tar.gz" + md5sum "04101b03e5d8e929471875b30e1a2c31" + size 161505 + provides (cvs-compat cvs-edit cvs-log cvs-status pcl-cvs-defs pcl-cvs-info pcl-cvs-parse pcl-cvs-util pcl-cvs) requires (xemacs-base elib vc dired edebug ediff edit-utils mail-lib prog-modes) type regular )) @@ -601,19 +726,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (mail-lib (standards-version 1.1 - version "1.63" + version "1.75" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-10-28" + build-date "2005-10-28" maintainer "Simon Josefsson " distribution xemacs priority medium category "standard" dump nil description "Fundamental lisp files for providing email support." - filename "mail-lib-1.63-pkg.tar.gz" - md5sum "99b3f341e8c29ad2dc3fec5196e32549" - size 198134 + filename "mail-lib-1.75-pkg.tar.gz" + md5sum "a8417567fe05e5baf884e1993bf13a44" + size 211214 provides (base64 browse-url-xemacs browse-url highlight-headers mail-abbrevs mail-extr mail-utils mailheader netrc pop3 reporter rfc2104 rfc822 rmail rmail-mini rmailout sendmail smtpmail starttls tls) requires (eterm xemacs-base fsf-compat sh-script ecrypto) type regular @@ -623,19 +748,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (jde (standards-version 1.1 - version "1.46" + version "1.48" author-version "2.3.2" - date "2003-10-08" - build-date "2003-10-08" + date "2005-06-01" + build-date "2005-06-01" maintainer "Andy Piper " distribution xemacs priority medium category "standard" dump nil description "Integrated Development Environment for Java." - filename "jde-1.46-pkg.tar.gz" - md5sum "60f5d299a53be811f6ef6006f2566c20" - size 2403395 + filename "jde-1.48-pkg.tar.gz" + md5sum "26a98e47f6358b465f423dc9d597c6f6" + size 2404962 provides (beanshell efc jde-ant jde-bug jde-checkstyle jde-compat jde-compile jde-complete jde-db jde-dbo jde-dbs jde-ejb jde-gen jde-help jde-imenu jde-import jde-java-font-lock jde-java-grammar jde-javadoc-gen jde-javadoc jde-jdb jde-make jde-open-source jde-package jde-parse-class jde-parse jde-run jde-setnu jde-stat jde-util jde-which-method jde-widgets jde-wiz jde-xref jde tree-widget) requires (jde cc-mode semantic debug speedbar edit-utils eterm mail-lib xemacs-base xemacs-devel eieio elib sh-script fsf-compat) type regular @@ -645,19 +770,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (fsf-compat (standards-version 1.1 - version "1.13" + version "1.15" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2004-10-22" + build-date "2004-10-22" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "FSF Emacs compatibility files." - filename "fsf-compat-1.13-pkg.tar.gz" - md5sum "270a9deea6166bb38ac00f6191c7e8c0" - size 21687 + filename "fsf-compat-1.15-pkg.tar.gz" + md5sum "a68d000cf16b054b20a56e917d57e712" + size 18912 provides (overlay thingatpt timer x-popup-menu goto-addr) requires (xemacs-base) type single @@ -667,19 +792,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (edit-utils (standards-version 1.1 - version "2.10" + version "2.32" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-12-05" + build-date "2005-12-05" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "Miscellaneous editor extensions, you probably need this." - filename "edit-utils-2.10-pkg.tar.gz" - md5sum "8d3c77a3ae8fb443a608a148e32e0d48" - size 925330 + filename "edit-utils-2.32-pkg.tar.gz" + md5sum "c858e39c25478b3797a5859c991d7bc9" + size 944596 provides (abbrevlist after-save-commands 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 makesum man mic-paren paren mode-motion+ outl-mouse outln-18 page-ext blink-paren paren permanent-buffers popper power-macros recent-files redo reportmail resume rsz-minibuf saveconf savehist saveplace scroll-in-place setnu shell-font tempo toolbar-utils tree-menu uniquify vertical-mode where-was-i-db winring autorevert align allout outline narrow-stack highline) requires (xemacs-base xemacs-devel fsf-compat dired mail-lib) type single @@ -711,19 +836,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (ps-print (standards-version 1.1 - version "1.09" + version "1.11" author-version "6.5.6" - date "2003-10-31" - build-date "2003-10-31" + date "2004-08-10" + build-date "2004-08-10" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Printing functions and utilities" - filename "ps-print-1.09-pkg.tar.gz" - md5sum "9055fe7244e253e2a12cc7e4d69df041" - size 155737 + filename "ps-print-1.11-pkg.tar.gz" + md5sum "a9460da8906bbbcbec37f28625b2bbad" + size 156222 provides (lpr ps-bdf ps-mule ps-print) requires (text-modes) type regular @@ -733,21 +858,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (sieve (standards-version 1.1 - version "1.14" + version "1.18" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-09-26" + build-date "2005-09-26" maintainer "Simon Josefsson " distribution xemacs priority low category "standard" dump nil description "Manage Sieve email filtering scripts." - filename "sieve-1.14-pkg.tar.gz" - md5sum "6a9234ad3e59c485869db92a3637d91f" - size 25677 + filename "sieve-1.18-pkg.tar.gz" + md5sum "254bfbb81e4204ab8e57066baee8e78f" + size 27387 provides (sieve sieve-mode sieve-manage) - requires (xemacs-base mail-lib cc-mode sasl) + requires (xemacs-base mail-lib cc-mode sasl ecrypto sh-script) type regular )) )) @@ -755,21 +880,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (mule-ucs (standards-version 1.1 - version "1.05" + version "1.14" author-version "0.84" - date "2003-10-31" - build-date "2003-10-31" + date "2005-06-21" + build-date "2005-06-21" maintainer "Stephen J. Turnbull " distribution mule priority high category "mule" dump nil description "MULE: Extended coding systems (including Unicode) for XEmacs." - filename "mule-ucs-1.05-pkg.tar.gz" - md5sum "772c06a697d0b3b4d7b78e8df76c019c" - size 1314530 + filename "mule-ucs-1.14-pkg.tar.gz" + md5sum "b1e0eb84dc1675400b867a57d38ffb36" + size 1300714 provides (mccl-font mucs-ccl mucs-error mucs-type mucs mule-uni tae tbl-mg trans-util txt-tbl un-data un-define un-supple un-tools un-trbase unicode unidata utf u-cns-1 u-cns-2 u-cns-3 u-cns-4 u-cns-5 u-cns-6 u-cns-7 uascii ubig5 uetiopic ugb2312 uipa uiscii uiso8859-1 uiso8859-14 uiso8859-15 uiso8859-2 uiso8859-3 uiso8859-4 uiso8859-5 uiso8859-6 uiso8859-7 uiso8859-8 uiso8859-9 ujisx0201 ujisx0208 ujisx0212 uksc5601 usisheng usupple utibetan utis620 uviscii) - requires (mule-base) + requires (mule-base latin-euro-standards) type regular )) )) @@ -777,21 +902,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (clearcase (standards-version 1.0 - version "1.08" - author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" - maintainer "Michael Diers " + version "1.10" + author-version "/main/laptop/165" + date "2005-06-04" + build-date "2005-06-04" + maintainer "Adrian Aichner " distribution xemacs priority low category "standard" dump nil description "New Clearcase Version Control for XEmacs (UNIX, Windows)." - filename "clearcase-1.08-pkg.tar.gz" - md5sum "6fedc7464137eae08c25517276f8a7ab" - size 94543 + filename "clearcase-1.10-pkg.tar.gz" + md5sum "956e445057c6c1afd48d898b9736bd22" + size 105865 provides (clearcase) - requires (dired fsf-compat mail-lib xemacs-base) + requires (dired mail-lib xemacs-base sh-script) type regular )) )) @@ -799,19 +924,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (dictionary (standards-version 1.1 - version "1.12" + version "1.16" author-version "1.8" - date "2003-06-22" - build-date "2003-06-22" + date "2005-05-10" + build-date "2005-05-10" maintainer "Torsten Hilbrich " distribution xemacs priority low category "standard" dump nil description "Interface to RFC2229 dictionary servers." - filename "dictionary-1.12-pkg.tar.gz" - md5sum "717517bbad4e241f18941fd6c289b868" - size 39658 + filename "dictionary-1.16-pkg.tar.gz" + md5sum "83011986c60b22aecb5c1246f66c7744" + size 40085 provides (dictionary connection link) requires (xemacs-base) type regular @@ -843,19 +968,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (xslt-process (standards-version 1.0 - version "1.11" + version "1.12" author-version "1.2.1" - date "2002-10-08" - build-date "2002-10-08" + date "2005-07-27" + build-date "2005-07-27" maintainer "Ovidiu Predescu " distribution xemacs priority medium category "standard" dump nil description "XSLT processing support." - filename "xslt-process-1.11-pkg.tar.gz" - md5sum "30273cbe2e90ae703ea410879412e68b" - size 199873 + filename "xslt-process-1.12-pkg.tar.gz" + md5sum "dde00a263877a3bb3a82c6fb96299aab" + size 59594 provides (xslt-process) requires (jde cc-mode semantic debug speedbar edit-utils eterm mail-lib xemacs-base elib eieio sh-script fsf-compat xemacs-devel) type regular @@ -931,19 +1056,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (lookup (standards-version 1.1 - version "1.14" + version "1.15" author-version "1.0" - date "2003-10-31" - build-date "2003-10-31" + date "2005-05-10" + build-date "2005-05-10" maintainer "XEmacs Development Team " distribution mule priority high category "mule" dump nil description "MULE: Dictionary support" - filename "lookup-1.14-pkg.tar.gz" - md5sum "f48776563d7fbd0852ad73ac9c513260" - size 225996 + filename "lookup-1.15-pkg.tar.gz" + md5sum "975f4d8435cae628e7c6338115a3a542" + size 225952 provides (evi-mule evi lookup-content lookup-defs lookup-entry lookup-select lookup-package lookup-select lookup-types lookup-utils lookup-vars lookup-vse lookup ndcookie ndeb ndic ndict ndkks ndmisc ndnmz ndspell ndsrd ndtp sdicf stem) requires (mule-base cookie lookup) type regular @@ -975,19 +1100,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (locale (standards-version 1.1 - version "1.21" + version "1.22" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2004-12-07" + build-date "2004-12-07" maintainer "XEmacs Development Team " distribution mule priority high category "mule" dump nil description "MULE: Localized menubars and localized splash screens." - filename "locale-1.21-pkg.tar.gz" - md5sum "2256243bb8cdd282af7b40bc2cf30018" - size 36961 + filename "locale-1.22-pkg.tar.gz" + md5sum "2a3accb220d0c67b3e76762fb2872ab9" + size 37968 provides () requires (mule-base) type regular @@ -997,19 +1122,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (mule-base (standards-version 1.1 - version "1.44" + version "1.47" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-05-10" + build-date "2005-05-10" maintainer "XEmacs Development Team " distribution mule priority high category "mule" dump nil - description "MULE: Basic Mule support, required for building with Mule." - filename "mule-base-1.44-pkg.tar.gz" - md5sum "9eaa93208008617bd8f0d34448dcfaa3" - size 444749 + description "MULE: Basic Mule support." + filename "mule-base-1.47-pkg.tar.gz" + md5sum "f6f85c610f6bd604edcb252b20f32108" + size 444408 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 apel) type regular @@ -1085,19 +1210,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (sgml (standards-version 1.1 - version "1.10" + version "1.11" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2004-01-27" + build-date "2004-01-27" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "SGML/Linuxdoc-SGML editing." - filename "sgml-1.10-pkg.tar.gz" - md5sum "ab80262877e3547dfb97e80a0a778e09" - size 27462 + filename "sgml-1.11-pkg.tar.gz" + md5sum "8d1cec5b4b005210507b6fe57e2db9a8" + size 27506 provides (sgml linuxdoc-sgml) requires (xemacs-base) type regular @@ -1107,19 +1232,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (psgml (standards-version 1.1 - version "1.41" + version "1.44" author-version "1.3.1" - date "2003-08-29" - build-date "2003-08-29" + date "2005-04-05" + build-date "2005-04-05" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Validated HTML/SGML editing." - filename "psgml-1.41-pkg.tar.gz" - md5sum "33baca4b85d3d9c48df682b748c9a273" - size 301000 + filename "psgml-1.44-pkg.tar.gz" + md5sum "9edbc1b72754f45d23cf73b287b6a2aa" + size 302065 provides (iso-sgml psgml-api psgml-charent psgml-debug psgml-dtd psgml-edit psgml-fs psgml-html psgml-info psgml-parse psgml-sysdep psgml-xemacs psgml sgml-mode) requires (xemacs-base edit-utils edebug xemacs-devel mail-lib fsf-compat eterm sh-script ps-print) type regular @@ -1129,19 +1254,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (pc (standards-version 1.1 - version "1.26" + version "1.28" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-04-26" + build-date "2005-04-26" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "PC style interface emulation." - filename "pc-1.26-pkg.tar.gz" - md5sum "47189d077b363012c4b17f527eef2ec7" - size 17611 + filename "pc-1.28-pkg.tar.gz" + md5sum "b3722c793e2f9b977fc0967ed0805efa" + size 17720 provides (delbs fusion pc-select pending-del s-region) requires (xemacs-base) type regular @@ -1151,19 +1276,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (ispell (standards-version 1.1 - version "1.26" - author-version "3.3" - date "2003-11-02" - build-date "2003-11-02" + version "1.32" + author-version "3.6" + date "2005-10-16" + build-date "2005-10-16" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Spell-checking with GNU ispell." - filename "ispell-1.26-pkg.tar.gz" - md5sum "85a9da0fe8ed41199388b5f41a0f7769" - size 72869 + filename "ispell-1.32-pkg.tar.gz" + md5sum "0eceb13fd90b388f744f04bbf83fe4a1" + size 83587 provides (ispell) requires () type regular @@ -1239,19 +1364,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (calendar (standards-version 1.1 - version "1.22" + version "1.23" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2004-01-27" + build-date "2004-01-27" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Calendar and diary support." - filename "calendar-1.22-pkg.tar.gz" - md5sum "c9f0bdbcb3cbbb9eff338e4edd9d7f95" - size 253996 + filename "calendar-1.23-pkg.tar.gz" + md5sum "de5fd826168913232c48aa88ec0f1d5c" + size 254025 provides (appt cal-china cal-coptic cal-dst cal-french cal-hebrew cal-islam cal-iso cal-japanese cal-julian cal-mayan cal-move cal-persia cal-tex cal-x cal-xemacs calendar diary-lib holidays lunar solar) requires (xemacs-base) type regular @@ -1261,19 +1386,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (calc (standards-version 1.1 - version "1.24" + version "1.26" author-version "2.02fX3" - date "2003-10-31" - build-date "2003-10-31" + date "2004-09-07" + build-date "2004-09-07" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Emacs calculator" - filename "calc-1.24-pkg.tar.gz" - md5sum "61fa56abe04492e448a8549b5978ca3a" - size 1600141 + filename "calc-1.26-pkg.tar.gz" + md5sum "2ebbdf5c8cba89d50ab6300287697a6b" + size 1600637 provides (calc-ext calc-macs calc) requires (xemacs-base) type regular @@ -1283,19 +1408,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (speedbar (standards-version 1.1 - version "1.27" + version "1.28" author-version "0.14beta4" - date "2003-10-31" - build-date "2003-10-31" + date "2005-07-19" + build-date "2005-07-19" maintainer "Eric M. Ludlam " distribution xemacs priority low category "standard" dump nil description "Provides a separate frame with convenient references." - filename "speedbar-1.27-pkg.tar.gz" - md5sum "4df8d109364493dca814ef7429d560d2" - size 163245 + filename "speedbar-1.28-pkg.tar.gz" + md5sum "1b82aee8431f3c8083689f7a6c3a6a33" + size 163269 provides (bigclock dframe rpm sb-ant sb-gud sb-html sb-image sb-info sb-rmail sb-texinfo sb-w3 speedbar) requires (xemacs-base edebug) type regular @@ -1305,19 +1430,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (pcomplete (standards-version 1.1 - version "1.03" + version "1.04" author-version "1.1.6" - date "2003-10-31" - build-date "2003-10-31" + date "2005-01-23" + build-date "2005-01-23" maintainer "John Wiegley " distribution xemacs priority medium category "standard" dump nil description "Provides programmatic completion." - filename "pcomplete-1.03-pkg.tar.gz" - md5sum "43bad91be873dd6ae2f9483e90c42226" - size 37443 + filename "pcomplete-1.04-pkg.tar.gz" + md5sum "f8631085f1355707234110c9ab043a53" + size 37573 provides (pcomplete) requires (sh-script xemacs-base) type regular @@ -1327,19 +1452,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (eshell (standards-version 1.1 - version "1.06" + version "1.10" author-version "2.4.1" - date "2003-10-31" - build-date "2003-10-31" + date "2005-06-27" + build-date "2005-06-27" maintainer "John Wiegley " distribution xemacs priority medium category "standard" dump nil description "Command shell implemented entirely in Emacs Lisp" - filename "eshell-1.06-pkg.tar.gz" - md5sum "737f4d5caed7ffe8cb987f0e2459d6e8" - size 232041 + filename "eshell-1.10-pkg.tar.gz" + md5sum "859fc15237a3d5177551614fecd88671" + size 232616 provides (em-alias em-banner em-basic em-cmpl em-dirs em-glob em-hist em-ls em-pred em-prompt em-rebind em-script em-smart em-term em-unix em-xtra esh-arg esh-cmd esh-ext esh-io esh-maint esh-mode esh-module esh-opt esh-proc esh-test esh-toggle esh-util esh-var eshell) requires (xemacs-base eterm) type regular @@ -1371,19 +1496,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (os-utils (standards-version 1.1 - version "1.34" + version "1.36" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-01-31" + build-date "2005-01-31" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Miscellaneous O/S utilities." - filename "os-utils-1.34-pkg.tar.gz" - md5sum "98fa67e0d1b89febd16bfc952d552171" - size 225849 + filename "os-utils-1.36-pkg.tar.gz" + md5sum "56d04bd914e392d03719206469964f20" + size 225865 provides (archive-mode background crypt++ crypt ftelnet inf-lisp jka-compr mchat rlogin ssh tar-mode telnet terminal uncompress) requires (xemacs-base) type single @@ -1415,19 +1540,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (igrep (standards-version 1.1 - version "1.12" - author-version "2.95" - date "2003-10-31" - build-date "2003-10-31" + version "1.14" + author-version "2.111" + date "2005-12-05" + build-date "2005-12-05" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Enhanced front-end for Grep." - filename "igrep-1.12-pkg.tar.gz" - md5sum "a46e749b903ad526dad1a898496e9812" - size 17316 + filename "igrep-1.14-pkg.tar.gz" + md5sum "c67cfd9d4fbb5356784898a54cf957d1" + size 20838 provides (igrep) requires (dired xemacs-base efs) type regular @@ -1437,19 +1562,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (eterm (standards-version 1.1 - version "1.15" + version "1.17" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-06-27" + build-date "2005-06-27" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Terminal emulation." - filename "eterm-1.15-pkg.tar.gz" - md5sum "4821611600abfb6f7e6d2d91b361e5dc" - size 109135 + filename "eterm-1.17-pkg.tar.gz" + md5sum "3f0508fad96213912261afdc934e5ce8" + size 109229 provides (eterm) requires (xemacs-base) type regular @@ -1459,19 +1584,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (viper (standards-version 1.1 - version "1.37" + version "1.47" author-version "3.09" - date "2003-10-31" - build-date "2003-10-31" + date "2005-11-25" + build-date "2005-11-25" maintainer "Michael Kifer " distribution xemacs priority low category "standard" dump nil description "VI emulation support." - filename "viper-1.37-pkg.tar.gz" - md5sum "5bd6157ea98d1cc9399e91eb3b684c8c" - size 327719 + filename "viper-1.47-pkg.tar.gz" + md5sum "66e3556c2421cf81083406bc92ad9f88" + size 335017 provides (viper-cmd viper-ex viper-init viper-keym viper-macs viper-mous viper-util viper) requires (xemacs-base) type regular @@ -1525,21 +1650,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (texinfo (standards-version 1.1 - version "1.25" + version "1.30" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-09-26" + build-date "2005-09-26" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "XEmacs TeXinfo support." - filename "texinfo-1.25-pkg.tar.gz" - md5sum "a2755f74e1f4c76ba36d844abc718d3a" - size 133884 + filename "texinfo-1.30-pkg.tar.gz" + md5sum "afa4dfa82a93fc7d4b85096621b8acdf" + size 145763 provides (makeinfo tex-mode texinfmt texinfo texnfo-tex texnfo-upd) - requires (xemacs-base) + requires (text-modes xemacs-base) type regular )) )) @@ -1547,21 +1672,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (reftex (standards-version 1.1 - version "1.33" + version "1.34" author-version "4.21" - date "2003-10-31" - build-date "2003-10-31" + date "2004-03-15" + build-date "2004-03-15" maintainer "Carsten Dominik " distribution xemacs priority medium category "standard" dump nil description "Emacs support for LaTeX cross-references, citations.." - filename "reftex-1.33-pkg.tar.gz" - md5sum "4d9a603199ad55c5d3f3cd31413a56de" - size 352053 + filename "reftex-1.34-pkg.tar.gz" + md5sum "161d28002e1a7c80bdaf9facb3559fad" + size 352338 provides (reftex-auc reftex-cite reftex-dcr reftex-vcr reftex-global reftex-index reftex-parse reftex-ref reftex-sel reftex-toc reftex-vars reftex) - requires (fsf-compat xemacs-base) + requires (xemacs-base) type regular )) )) @@ -1591,19 +1716,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (crisp (standards-version 1.1 - version "1.14" + version "1.15" author-version "1.34" - date "2003-10-31" - build-date "2003-10-31" + date "2005-04-26" + build-date "2005-04-26" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Crisp/Brief emulation." - filename "crisp-1.14-pkg.tar.gz" - md5sum "ba1bbc29153b1849e71d123b9f2021b1" - size 10361 + filename "crisp-1.15-pkg.tar.gz" + md5sum "0efd73abddf2e032f520ed60b493d463" + size 10436 provides (crisp scroll-lock) requires () type regular @@ -1613,20 +1738,20 @@ Hash: SHA1 (package-get-update-base-entry (quote (auctex (standards-version 1.1 - version "1.35" - author-version "11.13" - date "2003-01-03" - build-date "2003-01-03" - maintainer "XEmacs Development Team " + version "1.46" + author-version "11.55" + date "2005-02-12" + build-date "2005-12-08" + maintainer "Uwe Brauer " distribution xemacs priority medium category "standard" dump nil description "Basic TeX/LaTeX support." - filename "auctex-1.35-pkg.tar.gz" - md5sum "168e82155e152dab8c7c913bc9a4788b" - size 406466 - provides (auc-old auc-tex bib-cite font-latex latex multi-prompt tex-buf tex-info tex-jp tex-mik tex-site tex texmathp) + filename "auctex-1.46-pkg.tar.gz" + md5sum "0d7170230b9300fcef5eb57a7b4e6fbf" + size 710140 + provides (auc-old auc-tex bib-cite font-latex latex multi-prompt tex-buf tex-info tex-jp tex-mik tex-site tex texmathp hilit-LaTeX tex-font tex-fptex) requires (xemacs-base) type regular )) @@ -1635,19 +1760,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (vhdl (standards-version 1.1 - version "1.18" - author-version "3.31.20" - date "2003-10-31" - build-date "2003-10-31" + version "1.20" + author-version "3.33.2" + date "2005-02-14" + build-date "2005-02-14" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Support for VHDL." - filename "vhdl-1.18-pkg.tar.gz" - md5sum "6a38f9e4428754114593b94089c71943" - size 273202 + filename "vhdl-1.20-pkg.tar.gz" + md5sum "f4f9381623e0c14957f2ea064e5044d5" + size 300258 provides (vhdl-mode) requires (xemacs-base edit-utils c-support speedbar ps-print os-utils) type regular @@ -1657,19 +1782,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (x-symbol (standards-version 1.1 - version "1.07" + version "1.10" author-version "4.5.1" - date "2003-10-26" - build-date "2003-10-26" - maintainer "Steve Youngs " + date "2004-02-16" + build-date "2004-02-16" + maintainer "Uwe Brauer " distribution xemacs priority high category "standard" dump nil description "Semi WYSIWYG for LaTeX, HTML, etc, using additional fonts." - filename "x-symbol-1.07-pkg.tar.gz" - md5sum "c4a1cfc1318d5eb87eb186f0972abad6" - size 679781 + filename "x-symbol-1.10-pkg.tar.gz" + md5sum "f213f93f156cc9eb511094292caf6f51" + size 680100 provides (x-symbol-bib x-symbol-hooks x-symbol-image x-symbol-macs x-symbol-mule x-symbol-nomule x-symbol-sgml x-symbol-tex x-symbol-texi x-symbol-vars x-symbol-xmacs x-symbol) requires (x-symbol xemacs-base auctex mail-lib) type regular @@ -1679,19 +1804,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (vc (standards-version 1.1 - version "1.38" + version "1.41" author-version "No-Upstream-Ver" - date "2003-10-27" - build-date "2003-10-27" + date "2005-06-05" + build-date "2005-06-05" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Version Control for Free systems." - filename "vc-1.38-pkg.tar.gz" - md5sum "b19fa9b253ec9335829c3289ea1b046b" - size 93835 + filename "vc-1.41-pkg.tar.gz" + md5sum "78b4e9fefebd73d45e0953f719268d67" + size 94597 provides (vc vc-hooks) requires (dired xemacs-base vc mail-lib ediff) type regular @@ -1723,19 +1848,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (sh-script (standards-version 1.1 - version "1.18" - author-version "2.0e" - date "2003-10-31" - build-date "2003-10-31" + version "1.21" + author-version "2.0f" + date "2005-10-18" + build-date "2005-10-18" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Support for editing shell scripts." - filename "sh-script-1.18-pkg.tar.gz" - md5sum "4a0e2de6d1006c987dfd9e861b8562cd" - size 37055 + filename "sh-script-1.21-pkg.tar.gz" + md5sum "c3cd67259af1073985af3d5ad83f4d2e" + size 70351 provides (sh-script executable) requires (xemacs-base) type regular @@ -1767,20 +1892,20 @@ Hash: SHA1 (package-get-update-base-entry (quote (prog-modes (standards-version 1.1 - version "1.91" + version "2.06" author-version "No-Upstream-Ver" - date "2003-10-29" - build-date "2003-10-29" + date "2005-12-05" + build-date "2005-12-05" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Support for various programming languages." - filename "prog-modes-1.91-pkg.tar.gz" - md5sum "b0203d7e022fdf730845ffbceaf41bf0" - size 715961 - provides (autoconf-mode awk-mode c-mode cvs diff-mode eiffel-mode icon javascript-mode ksh-mode m4-mode make-mode makefile mode-compile mode-compile-kill modula2 p4 php-mode postscript rexx-mode rpm-spec-mode simula-mode sql tcl teco uil-mode verilog-mode) + filename "prog-modes-2.06-pkg.tar.gz" + md5sum "bf0e6a8a0ba1ad529fd945bc358b00c1" + size 777078 + provides (autoconf-mode awk-mode c-mode cvs diff-mode eiffel-mode icon javascript-mode ksh-mode lua-mode m4-mode make-mode makefile mode-compile mode-compile-kill modula2 p4 php-mode postscript rexx-mode rpm-spec-mode simula-mode sql tcl teco uil-mode verilog-mode) requires (mail-lib xemacs-devel xemacs-base cc-mode fsf-compat edit-utils ediff emerge efs vc speedbar dired ilisp sh-script) type regular )) @@ -1789,19 +1914,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (idlwave (standards-version 1.1 - version "1.31" + version "1.32" author-version "5.1" - date "2003-10-31" - build-date "2003-10-31" + date "2005-05-07" + build-date "2005-05-07" maintainer "Carsten Dominik " distribution xemacs priority medium category "standard" dump nil description "Editing and Shell mode for the Interactive Data Language" - filename "idlwave-1.31-pkg.tar.gz" - md5sum "c5e8e00757efddd5d83d9acb31247102" - size 520952 + filename "idlwave-1.32-pkg.tar.gz" + md5sum "3669f4554b9d1a487a5f3a279e5821e9" + size 520863 provides (idlw-rinfo idlwave-rinfo idlw-shell idlwave-shell idlw-toolbar idlwave-toolbar idlwave) requires (fsf-compat xemacs-base mail-lib) type regular @@ -1833,19 +1958,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (ediff (standards-version 1.1 - version "1.49" + version "1.60" author-version "2.75" - date "2003-10-31" - build-date "2003-10-31" + date "2005-12-05" + build-date "2005-12-05" maintainer "Michael Kifer " distribution xemacs priority medium category "standard" dump nil description "Interface over GNU patch." - filename "ediff-1.49-pkg.tar.gz" - md5sum "de66f77ac38f2df7dd4c5a94d9582f55" - size 305252 + filename "ediff-1.60-pkg.tar.gz" + md5sum "1c33606ab5bce3bf0a8c5f8fe949e2ca" + size 313973 provides (ediff-diff ediff-help ediff-hook ediff-init ediff-merg ediff-mult ediff-ptch ediff-tbar ediff-util ediff-vers ediff-wind ediff) requires (pcl-cvs elib dired xemacs-base edebug prog-modes) type regular @@ -1877,19 +2002,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (c-support (standards-version 1.1 - version "1.18" + version "1.22" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-07-27" + build-date "2005-07-27" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Basic single-file add-ons for editing C code." - filename "c-support-1.18-pkg.tar.gz" - md5sum "950c5d610fb614bd418863075cde1c4c" - size 70705 + filename "c-support-1.22-pkg.tar.gz" + md5sum "972b0abd7158053f28a2c66c62ce0270" + size 78027 provides (c-comment-edit cmacexp ctypes hideif hideshow) requires (cc-mode xemacs-base) type regular @@ -1921,19 +2046,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (cc-mode (standards-version 1.1 - version "1.41" - author-version "5.30.7" - date "2003-10-31" - build-date "2003-10-31" + version "1.45" + author-version "5.30.10" + date "2005-05-24" + build-date "2005-05-24" maintainer "Martin Stjernholm " distribution xemacs priority medium category "standard" dump nil description "C, C++, Objective-C, Java, CORBA IDL, Pike and AWK language support." - filename "cc-mode-1.41-pkg.tar.gz" - md5sum "31b9f8e38d95e6b5dd079c14f88ef360" - size 513369 + filename "cc-mode-1.45-pkg.tar.gz" + md5sum "e1a2e251e57f29ce6e082181c13c7f04" + size 524116 provides (cc-align cc-awk cc-bytecomp cc-cmds cc-compat cc-defs cc-engine cc-fix cc-fonts cc-guess cc-langs cc-lobotomy cc-menus cc-mode cc-styles cc-vars) requires (xemacs-base mail-lib) type regular @@ -1943,19 +2068,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (semantic (standards-version 1.1 - version "1.18" + version "1.19" author-version "1.4.2" - date "2003-10-31" - build-date "2003-10-31" + date "2004-10-31" + build-date "2004-10-31" maintainer "Eric M. Ludlam " distribution xemacs priority low category "standard" dump nil description "Semantic bovinator (Yacc/Lex for XEmacs). Includes Senator." - filename "semantic-1.18-pkg.tar.gz" - md5sum "bb333c47f371748a1e923893c98d7b3f" - size 443092 + filename "semantic-1.19-pkg.tar.gz" + md5sum "b7fdaa9ad2d2e9d9aaba5c88df8f2fd0" + size 446114 provides (document-vars document semantic-analyze semantic-bnf semantic-c semantic-cb semantic-chart semantic-ctxt semantic-el semantic-example semantic-ia-sb semantic-ia semantic-imenu semantic-java semantic-load semantic-make semantic-sb semantic-scm semantic-skel semantic-texi semantic-util-modes semantic-util semantic semanticdb senator sformat working) requires (eieio xemacs-base xemacs-devel edit-utils speedbar texinfo fsf-compat cc-mode edebug) type regular @@ -2009,19 +2134,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (games (standards-version 1.1 - version "1.15" + version "1.17" author-version "1.04" - date "2003-10-31" - build-date "2003-10-31" - maintainer "Glynn Clements " + date "2005-11-14" + build-date "2005-11-14" + maintainer "Glynn Clements " distribution xemacs priority low category "standard" dump nil description "Tetris, Sokoban, and Snake." - filename "games-1.15-pkg.tar.gz" - md5sum "e50c1cd9ae0e9d32a022f52e795119b4" - size 37242 + filename "games-1.17-pkg.tar.gz" + md5sum "42032b4568b5b46e588a6ffc63efd487" + size 37489 provides (gamegrid snake tetris sokoban) requires (xemacs-base) type regular @@ -2053,21 +2178,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (bbdb (standards-version 1.1 - version "1.24" + version "1.29" author-version "2.34" - date "2003-10-31" - build-date "2003-10-31" + date "2005-10-12" + build-date "2005-10-12" maintainer "Ronan Waide " distribution xemacs priority medium category "standard" dump nil description "The Big Brother Data Base" - filename "bbdb-1.24-pkg.tar.gz" - md5sum "bb9a7c33c742e28076643be7fda317ed" - size 373736 + filename "bbdb-1.29-pkg.tar.gz" + md5sum "c8314f305d41335ac91bf5a2ff10d635" + size 379982 provides (bbdb-com bbdb-ftp bbdb-gnus bbdb-gui bbdb-hooks bbdb-merge bbdb-mhe bbdb-migrate bbdb-print bbdb-reportmail bbdb-rmail bbdb-sc bbdb-snarf bbdb-srv bbdb-vm bbdb-w3 bbdb-whois bbdb-xemacs bbdb) - requires (bbdb edit-utils gnus mh-e rmail supercite vm tm apel mail-lib xemacs-base w3 fsf-compat eterm sh-script net-utils os-utils) + requires (bbdb edit-utils gnus mh-e rmail supercite vm tm apel mail-lib xemacs-base w3 fsf-compat eterm sh-script net-utils os-utils ecrypto) type regular )) )) @@ -2075,19 +2200,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (zenirc (standards-version 1.1 - version "1.14" + version "1.16" author-version "2.112" - date "2003-10-31" - build-date "2003-10-31" + date "2005-05-10" + build-date "2005-05-10" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "ZENIRC IRC Client." - filename "zenirc-1.14-pkg.tar.gz" - md5sum "9e40efa659a867dae6aac4673b474322" - size 277304 + filename "zenirc-1.16-pkg.tar.gz" + md5sum "074e5d8aef2568e9e73bfb227faf61dd" + size 277377 provides (zenirc-18 zenirc-8ball zenirc-away zenirc-bork zenirc-color zenirc-command-queue zenirc-complete zenirc-ctcp-flood zenirc-dcc zenirc-doto zenirc-fill zenirc-finnish zenirc-format zenirc-fortran zenirc-french zenirc-history zenirc-ignore zenirc-iwantop zenirc-klingon zenirc-latin zenirc-meditate zenirc-netsplit zenirc-notify zenirc-oink zenirc-ojnk zenirc-pjg zenirc-popup zenirc-random-away zenirc-random-nick zenirc-signal zenirc-stamp zenirc-swedish zenirc-trigger zenirc-yow-filter zenirc-yow zenirc) requires (zenirc) type regular @@ -2097,19 +2222,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (mew (standards-version 1.1 - version "1.18" + version "1.19" author-version "1.94.2" - date "2003-10-31" - build-date "2003-10-31" + date "2005-05-10" + build-date "2005-05-10" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Messaging in an Emacs World." - filename "mew-1.18-pkg.tar.gz" - md5sum "09533ddf67f0948c6b4a40b996d82fbd" - size 745829 + filename "mew-1.19-pkg.tar.gz" + md5sum "c3bad6f65dfc096c707ed238b138c940" + size 745714 provides (mew-addrbook mew-attach mew-bq mew-cache mew-complete mew-decode mew-demo mew-draft mew-encode mew-env mew-ext mew-fib mew-func mew-header mew-highlight mew-lang-jp mew-mark mew-message mew-mime mew-minibuf mew-mule mew-mule0 mew-mule2 mew-mule3 mew-os2 mew-pgp mew-pick mew-refile mew-scan mew-sort mew-summary mew-syntax mew-temacs mew-unix mew-vars mew-virtual mew-win32 mew-xemacs mew) requires (mew w3 efs mail-lib xemacs-base fsf-compat) type regular @@ -2119,21 +2244,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (tm (standards-version 1.1 - version "1.37" + version "1.38" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-04-09" + build-date "2005-04-09" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Emacs MIME support. Not needed for gnus >= 5.8.0" - filename "tm-1.37-pkg.tar.gz" - md5sum "9cd28b13243debe9a986dcbd332f1ccd" - size 334179 + filename "tm-1.38-pkg.tar.gz" + md5sum "dcf814b84cbe6cae01153ba702ccd704" + size 333864 provides (char-util cless gnus-art-mime gnus-charset gnus-mime gnus-sum-mime latex-math-symbol mel-b mel-g mel-q mel-u mel message-mime mime-setup mu-bbdb mu-cite range sc-setup signature texi-util tl-atype tl-list tl-misc tl-num tl-seq tl-str tm-bbdb tm-def tm-edit-mc tm-edit tm-ew-d tm-ew-e tm-file tm-ftp tm-html tm-image tm-latex tm-mail tm-mh-e tm-parse tm-partial tm-pgp tm-play tm-rmail tm-setup tm-tar tm-text tm-view tm-vm tmh-comp) - requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base fsf-compat sh-script net-utils) + requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base fsf-compat sh-script net-utils ecrypto) type regular )) )) @@ -2141,21 +2266,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (gnus (standards-version 1.1 - version "1.73" - author-version "5.10.2" - date "2003-10-13" - build-date "2003-10-13" - maintainer "Steve Youngs " + version "1.89" + author-version "5.10.7" + date "2006-01-04" + build-date "2006-01-04" + maintainer "Steve Youngs " distribution xemacs priority medium category "standard" dump nil description "The Gnus Newsreader and Mailreader." - filename "gnus-1.73-pkg.tar.gz" - md5sum "a1259caa28482a71bc4dfa1e434f9511" - size 3245188 + filename "gnus-1.89-pkg.tar.gz" + md5sum "e7707178416716eac643af29c437f619" + size 3457913 provides (binhex canlock compface deuglify earcon flow-fill format-spec gnus-agent gnus-art gnus-async gnus-audio gnus-bcklg gnus-cache gnus-cite gnus-cus gnus-delay gnus-demon gnus-diary gnus-dired gnus-draft gnus-dup gnus-eform gnus-ems gnus-fun gnus-gl gnus-group gnus-int gnus-kill gnus-logic gnus-mh gnus-ml gnus-mlspl gnus-move gnus-msg gnus-nocem gnus-picon gnus-range gnus-registry gnus-salt gnus-score gnus-setup gnus-sieve gnus-soup gnus-spec gnus-srvr gnus-start gnus-sum gnus-topic gnus-undo gnus-util gnus-uu gnus-vm gnus-win gnus-xmas gnus ietf-drums imap mail-parse mail-prsvr mail-source mailcap message messagexmas messcompat mm-bodies mm-decode mm-encode mm-extern mm-partial mm-url mm-util mm-uu mm-view mml-sec mml-smime mml mml1991 mml2015 nnagent nnbabyl nndb nndiary nndir nndoc nndraft nneething nnfolder nngateway nnheader nnheaderxm nnimap nnkiboze nnlistserv nnmail nnmaildir nnmbox nnmh nnml nnnil nnoo nnrss nnslashdot nnsoup nnspool nntp nnultimate nnvirtual nnwarchive nnweb nnwfm parse-time qp rfc1843 rfc2045 rfc2047 rfc2231 score-mode smiley smime spam-report spam-stat spam time-date utf7 uudecode webmail yenc gnus-idna gpg-ring gpg hashcash vcard) - requires (gnus w3 mh-e mailcrypt rmail eterm mail-lib xemacs-base fsf-compat ecrypto tm apel pgg net-utils sh-script os-utils dired sieve sasl) + requires (gnus mail-lib xemacs-base eterm sh-script net-utils os-utils dired mh-e sieve ps-print w3 pgg mailcrypt ecrypto sasl) type regular )) )) @@ -2185,19 +2310,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (mailcrypt (standards-version 1.1 - version "2.13" + version "2.14" author-version "3.5.8" - date "2003-10-31" - build-date "2003-10-31" + date "2004-01-17" + build-date "2004-01-17" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Support for messaging encryption with PGP." - filename "mailcrypt-2.13-pkg.tar.gz" - md5sum "efe51870b559239cf48a102ea8a89e2f" - size 154111 + filename "mailcrypt-2.14-pkg.tar.gz" + md5sum "df1654138b6a146868bb52addb33bf47" + size 154180 provides (expect mailcrypt) requires (mail-lib fsf-compat xemacs-base cookie gnus mh-e rmail vm) type regular @@ -2207,19 +2332,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (supercite (standards-version 1.1 - version "1.20" + version "1.21" author-version "3.55x3" - date "2003-10-31" - build-date "2003-10-31" + date "2005-10-29" + build-date "2005-10-29" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "An Emacs citation tool for News & Mail messages." - filename "supercite-1.20-pkg.tar.gz" - md5sum "277fb688d3765c0434e34013e811e94d" - size 100553 + filename "supercite-1.21-pkg.tar.gz" + md5sum "4fb516d03f2d95d9e0e092c994f79df7" + size 100802 provides (supercite) requires (mail-lib xemacs-base) type regular @@ -2229,21 +2354,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (mh-e (standards-version 1.1 - version "1.27" + version "1.29" author-version "7.4.2" - date "2003-10-31" - build-date "2003-10-31" - maintainer "Steve Youngs " + date "2005-03-14" + build-date "2005-03-14" + maintainer "XEmacs Beta " distribution xemacs priority low category "standard" dump nil - description "Front end support for MH." - filename "mh-e-1.27-pkg.tar.gz" - md5sum "5b886efc6e93f97a61237dade2f360ee" - size 577724 + description "The XEmacs Interface to the MH Mail System." + filename "mh-e-1.29-pkg.tar.gz" + md5sum "c4009dbf4aa47d505dd8cb025e326ca3" + size 578385 provides (mh-alias mh-comp mh-customize mh-e mh-funcs mh-gnus mh-identity mh-inc mh-index mh-junk mh-loaddefs mh-mime mh-pick mh-seq mh-speed mh-unit mh-utils mh-xemacs-compat mh-xemacs-icons) - requires (gnus mail-lib xemacs-base speedbar rmail tm apel sh-script fsf-compat xemacs-devel net-utils eterm os-utils) + requires (gnus mail-lib xemacs-base speedbar rmail tm apel sh-script fsf-compat xemacs-devel net-utils eterm os-utils ecrypto) type regular )) )) @@ -2251,19 +2376,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (gnats (standards-version 1.1 - version "1.16" + version "1.17" author-version "3.101" - date "2003-10-31" - build-date "2003-10-31" + date "2005-04-09" + build-date "2005-04-09" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "XEmacs bug reports." - filename "gnats-1.16-pkg.tar.gz" - md5sum "678c190f7cd184426dcccc0f3a6d10b2" - size 188963 + filename "gnats-1.17-pkg.tar.gz" + md5sum "f048ff33f8b6f724613bd63173b9d9ef" + size 188959 provides (gnats gnats-admin send-pr) requires (mail-lib xemacs-base) type regular @@ -2317,21 +2442,23 @@ Hash: SHA1 (package-get-update-base-entry (quote (net-utils (standards-version 1.1 - version "1.33" - author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" - maintainer "XEmacs Development Team " + version "1.48" + author-version "N/A" + date "2005-10-12" + build-date "2005-10-12" + maintainer "Steve Youngs " distribution xemacs priority low category "standard" dump nil description "Miscellaneous Networking Utilities." - filename "net-utils-1.33-pkg.tar.gz" - md5sum "9470e0dc21c8dd3c1d859ce7541f31c0" - size 137514 - provides (ilisp-browse-cltl2 xemacsbug feedmail metamail net-utils rcompile shadowfile webjump webster-www dig dns xml) - requires (bbdb w3 efs mail-lib xemacs-base fsf-compat eterm sh-script gnus rmail tm apel) + filename "net-utils-1.48-pkg.tar.gz" + md5sum "09cd58b37a72e17ff53c05ba1e67cf2f" + size 155120 + provides (ilisp-browse-cltl2 xemacsbug feedmail metamail + net-utils rcompile shadowfile webjump webster-www + dig dns dns-mode xml google-query mozmail) + requires (bbdb w3 efs mail-lib xemacs-base eterm sh-script gnus rmail tm apel vm mh-e mew ecrypto) type single )) )) @@ -2339,19 +2466,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (w3 (standards-version 1.1 - version "1.29" + version "1.32" author-version "4.0pre47" - date "2003-10-31" - build-date "2003-10-31" + date "2005-12-29" + build-date "2005-12-29" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "A Web browser." - filename "w3-1.29-pkg.tar.gz" - md5sum "088e276b855e95b2032aa58160ffeba2" - size 694178 + filename "w3-1.32-pkg.tar.gz" + md5sum "92a3dcd5c51317ab8317fe6059491213" + size 695310 provides (css devices w3-auto dsssl-flow dsssl font images mm mule-sysdp socks ssl urlauth url-cache url-cookie url-file url-gopher url-gw url-http url-ldap url-mail url-misc url-news url-ns url-parse url-vars url w3-about w3-auto w3-cfg w3-cus w3-display w3-emacs19 w3-e19 w3-e20 w3-elisp w3-emulate w3-forms w3-hot w3-hotindex w3-imap w3-java w3-jscript w3-keyword w3-latex w3-menu w3-mouse w3-parse w3-print w3-props w3-script w3-structure w3-speak w3-style w3-sysdp w3-toolbar w3-vars w3-widget w3-xemacs w3-xemac w3) requires (w3 mail-lib xemacs-base ecrypto) type regular @@ -2361,19 +2488,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (vm (standards-version 1.1 - version "7.18" + version "7.22" author-version "7.17" - date "2003-10-31" - build-date "2003-10-31" + date "2005-06-06" + build-date "2005-06-06" maintainer "Kyle Jones " distribution xemacs priority medium category "standard" dump nil description "An Emacs mailer." - filename "vm-7.18-pkg.tar.gz" - md5sum "25a353d78f64c2dd2e1001719158a315" - size 812340 + filename "vm-7.22-pkg.tar.gz" + md5sum "067b3cac6c8b6ee68a5fd2abf1e0acea" + size 822094 provides (tapestry vm-byteopts vm-delete vm-digest vm-easymenu vm-edit vm-folder vm-imap vm-license vm-macro vm-mark vm-menu vm-message vm-mime vm-minibuf vm-misc vm-motion vm-mouse vm-page vm-pop vm-reply vm-save vm-search vm-sort vm-startup vm-summary vm-thread vm-toolbar vm-undo vm-user vm-vars vm vm-version vm-virtual vm-window) requires (mail-lib xemacs-base) type regular @@ -2427,21 +2554,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (xemacs-devel (standards-version 1.1 - version "1.60" + version "1.72" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2005-10-12" + build-date "2005-10-12" maintainer "XEmacs Development Team " distribution xemacs priority medium category "standard" dump nil description "Emacs Lisp developer support." - filename "xemacs-devel-1.60-pkg.tar.gz" - md5sum "db789317a15bf3a73bacd7b337ec7a34" - size 232116 + filename "xemacs-devel-1.72-pkg.tar.gz" + md5sum "b11f75c8ab895518f9324c668cb5fd84" + size 243274 provides (checkdoc docref eldoc elp eval-expr find-func hide-copyleft ielm patcher pp trace patch-keywords) - requires (xemacs-base ispell mail-lib gnus rmail tm apel sh-script net-utils eterm) + requires (xemacs-base ispell mail-lib gnus rmail tm apel sh-script net-utils eterm ecrypto) type single )) )) @@ -2493,21 +2620,21 @@ Hash: SHA1 (package-get-update-base-entry (quote (edebug (standards-version 1.1 - version "1.20" + version "1.21" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2004-07-05" + build-date "2004-07-05" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "An Emacs Lisp debugger." - filename "edebug-1.20-pkg.tar.gz" - md5sum "ff397fa7dba09ab0a52a83649b8a14d8" - size 115244 + filename "edebug-1.21-pkg.tar.gz" + md5sum "c3807d0c7bf76758b81f4d1837861758" + size 115585 provides (edebug cl-read cust-print eval-reg cl-specs) - requires (xemacs-base) + requires (xemacs-base xemacs-devel) type regular )) )) @@ -2515,19 +2642,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (Sun (standards-version 1.1 - version "1.15" + version "1.16" author-version "No-Upstream-Ver" - date "2003-10-31" - build-date "2003-10-31" + date "2004-09-06" + build-date "2004-09-06" maintainer "XEmacs Development Team " distribution xemacs priority low category "standard" dump nil description "Support for Sparcworks." - filename "Sun-1.15-pkg.tar.gz" - md5sum "ac4b09817681596ba032cf868c7c6dac" - size 64660 + filename "Sun-1.16-pkg.tar.gz" + md5sum "e82c814a75cab21586f81c6aef7d6ea9" + size 64431 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 @@ -2537,19 +2664,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (apel (standards-version 1.1 - version "1.27" - author-version "10.2" - date "2003-10-31" - build-date "2003-10-31" + version "1.32" + author-version "10.6" + date "2005-12-06" + build-date "2005-12-06" maintainer "XEmacs Development Team " distribution xemacs priority high category "standard" dump nil description "A Portable Emacs Library. Used by XEmacs MIME support." - filename "apel-1.27-pkg.tar.gz" - md5sum "2f35080836afe0730b2fe664f90b01be" - size 108585 + filename "apel-1.32-pkg.tar.gz" + md5sum "0c3f9d60d3bdaf4a7f4eaf2bdf656e84" + size 121589 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 @@ -2559,19 +2686,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (efs (standards-version 1.0 - version "1.32" - author-version "1.22" - date "2003-10-31" - build-date "2003-10-31" + version "1.33" + author-version "1.23" + date "2004-10-04" + build-date "2004-10-04" maintainer "Mike Sperber " distribution stable priority medium category "standard" dump nil description "Treat files on remote systems the same as local files." - filename "efs-1.32-pkg.tar.gz" - md5sum "6123c11bc7a9c993429e9976f7bf42c4" - size 375800 + filename "efs-1.33-pkg.tar.gz" + md5sum "d0e7badb65439e1ac144aa4588be4db1" + size 375842 provides (efs) requires (xemacs-base dired) type regular @@ -2581,19 +2708,19 @@ Hash: SHA1 (package-get-update-base-entry (quote (dired (standards-version 1.0 - version "1.15" - author-version "7.11" - date "2003-10-31" - build-date "2003-10-31" + version "1.17" + author-version "7.13" + date "2005-04-09" + build-date "2005-04-09" maintainer "Mike Sperber " distribution stable priority medium category "standard" dump nil description "Manage file systems." - filename "dired-1.15-pkg.tar.gz" - md5sum "3bd864d76ba88c2a8a42772222a2743f" - size 198282 + filename "dired-1.17-pkg.tar.gz" + md5sum "fc911843a2e768b657f61d4dc0137a6d" + size 201027 provides (diff dired) requires (xemacs-base prog-modes) type regular @@ -2602,10 +2729,9 @@ Hash: SHA1 ;;;@@@ ;; Package Index file ends here -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.3 (FreeBSD) -Comment: The XEmacs Development Team +Version: GnuPG v1.4.1 (GNU/Linux) -iD4DBQE/s2HKgu3ywdHdhM0RAsIRAJiVkwgHSIPBMZBJlZdA06kOtKV2AKCqhmSb -/TUbeZRrIemjq9es9VqYJg== -=n9fY +iD8DBQFDu3/3gu3ywdHdhM0RArnQAKC2oQEX2BRllTlQl4UiMYIZYEBeQQCeNTHj +p3T7YxmbQDgZRUSOEEmtxs0= +=EoNd -----END PGP SIGNATURE----- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index bd5d443..f481972 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,43 @@ +2007-10-07 Vin Shelton + + * XEmacs 21.4.21 is released + +2006-12-09 Vin Shelton + + * XEmacs 21.4.20 is released + +2006-08-11 Jerry James + + * gnuslib.c (disconnect_from_server): shutdown() has been fine on + Linux for a long time now; use it. Also, don't use length to + access the buffer unless it is positive, not just nonzero. + * gnuclient.c (filename_expand): Initialize the last array element + to get a valid C string in case of overflow. Use strncat to avoid + buffer overruns. + * gnuclient.c (main): Use strncpy to avoid buffer overruns. + +2006-08-11 Jerry James + + * pop.h: Sync with Emacs. + * pop.c: Ditto. + +2006-07-21 Stephen J. Turnbull + + * etags.c: Xemacs -> XEmacs + +2006-01-28 Vin Shelton + + * XEmacs 21.4.19 is released + +2005-12-03 Vin Shelton + + * XEmacs 21.4.18 is released + +2005-09-18 Mike Alexander + + * installexe.sh: Don't add an exe extention to a file that already + has one. Patch from Rick Rankin. + 2005-02-06 Vin Shelton * XEmacs 21.4.17 is released diff --git a/lib-src/etags.c b/lib-src/etags.c index d59e2e8..d2e0008 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1,6 +1,36 @@ /* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*- - Copyright (C) 1984, 87, 88, 89, 93, 94, 95, 98, 99, 2000, 2001 - Free Software Foundation, Inc. and Ken Arnold + +Copyright (C) 1984 The Regents of the University of California + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. +3. Neither the name of the University nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Copyright (C) 1984, 1987, 1988, 1989, 1993, 1994, 1995, 1998, 1999, + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is not considered part of GNU Emacs. @@ -16,23 +46,41 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, -Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + + +/* NB To comply with the above BSD license, copyright information is +reproduced in etc/ETAGS.README. That file should be updated when the +above notices are. + +To the best of our knowledge, this code was originally based on the +ctags.c distributed with BSD4.2, which was copyrighted by the +University of California, as described above. */ + /* * Authors: - * Ctags originally by Ken Arnold. - * Fortran added by Jim Kleckner. - * Ed Pelegri-Llopart added C typedefs. - * Gnu Emacs TAGS format and modifications by RMS? + * 1983 Ctags originally by Ken Arnold. + * 1984 Fortran added by Jim Kleckner. + * 1984 Ed Pelegri-Llopart added C typedefs. + * 1985 Emacs TAGS format by Richard Stallman. * 1989 Sam Kendall added C++. - * 1993 Francesco Potortì reorganised C and C++ based on work by Joe Wells. - * 1994 Regexp tags by Tom Tromey. - * 2001 Nested classes by Francesco Potortì based on work by Mykola Dzyuba. + * 1992 Joseph B. Wells improved C and C++ parsing. + * 1993 Francesco Potortì reorganised C and C++. + * 1994 Line-by-line regexp tags by Tom Tromey. + * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba). + * 2002 #line directives by Francesco Potortì. * - * Francesco Potortì has maintained it since 1993. + * Francesco Potortì has maintained and improved it since 1993. + */ + +/* + * If you want to add support for a new language, start by looking at the LUA + * language, which is the simplest. Alternatively, consider shipping a + * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 14.15"; +char pot_etags_version[] = "@(#) pot revision number is 17.33"; #define TRUE 1 #define FALSE 0 @@ -45,26 +93,33 @@ char pot_etags_version[] = "@(#) pot revision number is 14.15"; # define NDEBUG /* disable assert */ #endif -#if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C)) -# define P_(proto) proto -#else -# define P_(proto) () -#endif - #ifdef HAVE_CONFIG_H # include /* On some systems, Emacs defines static as nothing for the sake of unexec. We don't want that here since we don't use unexec. */ # undef static -# define ETAGS_REGEXPS /* use the regexp features */ -# define LONG_OPTIONS /* accept long options */ -#endif /* HAVE_CONFIG_H */ +# ifndef PTR /* for XEmacs */ +# define PTR void * +# endif +# ifndef __P /* for XEmacs */ +# define __P(args) args +# endif +#else /* no config.h */ +# if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C)) +# define __P(args) args /* use prototypes */ +# define PTR void * /* for generic pointers */ +# else /* not standard C */ +# define __P(args) () /* no prototypes */ +# define const /* remove const for old compilers' sake */ +# define PTR long * /* don't use void* */ +# endif +#endif /* !HAVE_CONFIG_H */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ #endif -/* WIN32_NATIVE is for Xemacs. +/* WIN32_NATIVE is for XEmacs. MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ #ifdef WIN32_NATIVE # undef MSDOS @@ -99,12 +154,26 @@ char pot_etags_version[] = "@(#) pot revision number is 14.15"; # ifndef HAVE_GETCWD # define HAVE_GETCWD # endif /* undef HAVE_GETCWD */ -#else /* !WINDOWSNT */ +#else /* not WINDOWSNT */ # ifdef STDC_HEADERS # include # include -# else - extern char *getenv (); +# else /* no standard C headers */ + extern char *getenv (); + extern char *strcpy (); + extern char *strncpy (); + extern char *strcat (); + extern char *strncat (); + extern unsigned long strlen (); + extern PTR malloc (); + extern PTR realloc (); +# ifdef VMS +# define EXIT_SUCCESS 1 +# define EXIT_FAILURE 0 +# else /* no VMS */ +# define EXIT_SUCCESS 0 +# define EXIT_FAILURE 1 +# endif # endif #endif /* !WINDOWSNT */ @@ -135,17 +204,25 @@ char pot_etags_version[] = "@(#) pot revision number is 14.15"; # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif -#ifdef LONG_OPTIONS -# include -#else +#ifdef NO_LONG_OPTIONS /* define this if you don't have GNU getopt */ +# define NO_LONG_OPTIONS TRUE # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr) extern char *optarg; extern int optind, opterr; -#endif /* LONG_OPTIONS */ - -#ifdef ETAGS_REGEXPS -# include -#endif /* ETAGS_REGEXPS */ +#else +# define NO_LONG_OPTIONS FALSE +# include +#endif /* NO_LONG_OPTIONS */ + +#ifndef HAVE_CONFIG_H /* this is a standalone compilation */ +# ifdef __CYGWIN__ /* compiling on Cygwin */ + !!! NOTICE !!! + the regex.h distributed with Cygwin is not compatible with etags, alas! +If you want regular expression support, you should delete this notice and + arrange to use the GNU regex.h and regex.c. +# endif +#endif +#include /* Define CTAGS to make the program "ctags" compatible with the usual one. Leave it undefined to make the program "etags", which makes emacs-style @@ -157,25 +234,18 @@ char pot_etags_version[] = "@(#) pot revision number is 14.15"; # define CTAGS FALSE #endif -/* Exit codes for success and failure. */ -#ifdef VMS -# define GOOD 1 -# define BAD 0 -#else -# define GOOD 0 -# define BAD 1 -#endif - #define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) +#define strcaseeq(s,t) (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t)) #define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) +#define strncaseeq(s,t,n) (assert((s)!=NULL && (t)!=NULL), !etags_strncasecmp (s, t, n)) #define CHARS 256 /* 2^sizeof(char) */ #define CHAR(x) ((unsigned int)(x) & (CHARS - 1)) -#define iswhite(c) (_wht[CHAR(c)]) /* c is white */ -#define notinname(c) (_nin[CHAR(c)]) /* c is not in a name */ -#define begtoken(c) (_btk[CHAR(c)]) /* c can start token */ -#define intoken(c) (_itk[CHAR(c)]) /* c can be in token */ -#define endtoken(c) (_etk[CHAR(c)]) /* c ends tokens */ +#define iswhite(c) (_wht[CHAR(c)]) /* c is white (see white) */ +#define notinname(c) (_nin[CHAR(c)]) /* c is not in a name (see nonam) */ +#define begtoken(c) (_btk[CHAR(c)]) /* c can start token (see begtk) */ +#define intoken(c) (_itk[CHAR(c)]) /* c can be in token (see midtk) */ +#define endtoken(c) (_etk[CHAR(c)]) /* c ends tokens (see endtk) */ #define ISALNUM(c) isalnum (CHAR(c)) #define ISALPHA(c) isalpha (CHAR(c)) @@ -204,35 +274,51 @@ char pot_etags_version[] = "@(#) pot revision number is 14.15"; (char *) (op), (n) * sizeof (Type))) #endif -typedef int bool; +#define bool int -typedef void Lang_function P_((FILE *)); +typedef void Lang_function __P((FILE *)); typedef struct { - char *suffix; - char *command; /* Takes one arg and decompresses to stdout */ + char *suffix; /* file name suffix for this compressor */ + char *command; /* takes one arg and decompresses to stdout */ } compressor; typedef struct { - char *name; - Lang_function *function; - char **filenames; - char **suffixes; - char **interpreters; + char *name; /* language name */ + char *help; /* detailed help for the language */ + Lang_function *function; /* parse function */ + char **suffixes; /* name suffixes of this language's files */ + char **filenames; /* names of this language's files */ + char **interpreters; /* interpreters for this language */ + bool metasource; /* source used to generate other sources */ } language; +typedef struct fdesc +{ + struct fdesc *next; /* for the linked list */ + char *infname; /* uncompressed input file name */ + char *infabsname; /* absolute uncompressed input file name */ + char *infabsdir; /* absolute dir of input file */ + char *taggedfname; /* file name to write in tagfile */ + language *lang; /* language of file */ + char *prop; /* file properties to write in tagfile */ + bool usecharno; /* etags tags shall contain char number */ + bool written; /* entry written in the tags file */ +} fdesc; + typedef struct node_st -{ /* sorting structure */ - char *name; /* function or type name */ - char *file; /* file name */ - bool is_func; /* use pattern or line no */ - bool been_warned; /* set if noticed dup */ - int lno; /* line number tag is on */ +{ /* sorting structure */ + struct node_st *left, *right; /* left and right sons */ + fdesc *fdp; /* description of file to whom tag belongs */ + char *name; /* tag name */ + char *regex; /* search regexp */ + bool valid; /* write this tag on the tag file */ + bool is_func; /* function tag: use regexp in CTAGS mode */ + bool been_warned; /* warning already given for duplicated tag */ + int lno; /* line number tag is on */ long cno; /* character number line starts on */ - char *pat; /* search pattern */ - struct node_st *left, *right; /* left and right sons */ } node; /* @@ -249,114 +335,153 @@ typedef struct char *buffer; } linebuffer; +/* Used to support mixing of --lang and file names. */ +typedef struct +{ + enum { + at_language, /* a language specification */ + at_regexp, /* a regular expression */ + at_filename, /* a file name */ + at_stdin, /* read from stdin here */ + at_end /* stop parsing the list */ + } arg_type; /* argument type */ + language *lang; /* language associated with the argument */ + char *what; /* the argument itself */ +} argument; + +/* Structure defining a regular expression. */ +typedef struct regexp +{ + struct regexp *p_next; /* pointer to next in list */ + language *lang; /* if set, use only for this language */ + char *pattern; /* the regexp pattern */ + char *name; /* tag name */ + struct re_pattern_buffer *pat; /* the compiled pattern */ + struct re_registers regs; /* re registers */ + bool error_signaled; /* already signaled for this regexp */ + bool force_explicit_name; /* do not allow implict tag name */ + bool ignore_case; /* ignore case when matching */ + bool multi_line; /* do a multi-line match on the whole file */ +} regexp; + + /* Many compilers barf on this: Lang_function Ada_funcs; so let's write it this way */ -static void Ada_funcs P_((FILE *)); -static void Asm_labels P_((FILE *)); -static void C_entries P_((int c_ext, FILE *)); -static void default_C_entries P_((FILE *)); -static void plain_C_entries P_((FILE *)); -static void Cjava_entries P_((FILE *)); -static void Cobol_paragraphs P_((FILE *)); -static void Cplusplus_entries P_((FILE *)); -static void Cstar_entries P_((FILE *)); -static void Erlang_functions P_((FILE *)); -static void Fortran_functions P_((FILE *)); -static void Yacc_entries P_((FILE *)); -static void Lisp_functions P_((FILE *)); -static void Makefile_targets P_((FILE *)); -static void Pascal_functions P_((FILE *)); -static void Perl_functions P_((FILE *)); -static void Postscript_functions P_((FILE *)); -static void Prolog_functions P_((FILE *)); -static void Python_functions P_((FILE *)); -static void Scheme_functions P_((FILE *)); -static void TeX_commands P_((FILE *)); -static void Texinfo_nodes P_((FILE *)); -static void just_read_file P_((FILE *)); - -static void print_language_names P_((void)); -static void print_version P_((void)); -static void print_help P_((void)); -int main P_((int, char **)); -static int number_len P_((long)); - -static compressor *get_compressor_from_suffix P_((char *, char **)); -static language *get_language_from_langname P_((char *)); -static language *get_language_from_interpreter P_((char *)); -static language *get_language_from_filename P_((char *)); -static int total_size_of_entries P_((node *)); -static long readline P_((linebuffer *, FILE *)); -static long readline_internal P_((linebuffer *, FILE *)); -static void get_tag P_((char *)); - -#ifdef ETAGS_REGEXPS -static void analyse_regex P_((char *, bool)); -static void add_regex P_((char *, bool, language *)); -static void free_patterns P_((void)); -#endif /* ETAGS_REGEXPS */ -static void error P_((const char *, const char *)); -static void suggest_asking_for_help P_((void)); -void fatal P_((char *, char *)); -static void pfatal P_((char *)); -static void add_node P_((node *, node **)); - -static void init P_((void)); -static void initbuffer P_((linebuffer *)); -static void find_entries P_((char *, FILE *)); -static void free_tree P_((node *)); -static void pfnote P_((char *, bool, char *, int, int, long)); -static void new_pfnote P_((char *, int, bool, char *, int, int, long)); -static void process_file P_((char *)); -static void put_entries P_((node *)); -static void takeprec P_((void)); - -static char *concat P_((char *, char *, char *)); -static char *skip_spaces P_((char *)); -static char *skip_non_spaces P_((char *)); -static char *savenstr P_((char *, int)); -static char *savestr P_((char *)); -static char *etags_strchr P_((const char *, int)); -static char *etags_strrchr P_((const char *, int)); -static char *etags_getcwd P_((void)); -static char *relative_filename P_((char *, char *)); -static char *absolute_filename P_((char *, char *)); -static char *absolute_dirname P_((char *, char *)); -static bool filename_is_absolute P_((char *f)); -static void canonicalize_filename P_((char *)); -static void linebuffer_setlen P_((linebuffer *, int)); -long *xmalloc P_((unsigned int)); -long *xrealloc P_((char *, unsigned int)); +static void Ada_funcs __P((FILE *)); +static void Asm_labels __P((FILE *)); +static void C_entries __P((int c_ext, FILE *)); +static void default_C_entries __P((FILE *)); +static void plain_C_entries __P((FILE *)); +static void Cjava_entries __P((FILE *)); +static void Cobol_paragraphs __P((FILE *)); +static void Cplusplus_entries __P((FILE *)); +static void Cstar_entries __P((FILE *)); +static void Erlang_functions __P((FILE *)); +static void Forth_words __P((FILE *)); +static void Fortran_functions __P((FILE *)); +static void HTML_labels __P((FILE *)); +static void Lisp_functions __P((FILE *)); +static void Lua_functions __P((FILE *)); +static void Makefile_targets __P((FILE *)); +static void Pascal_functions __P((FILE *)); +static void Perl_functions __P((FILE *)); +static void PHP_functions __P((FILE *)); +static void PS_functions __P((FILE *)); +static void Prolog_functions __P((FILE *)); +static void Python_functions __P((FILE *)); +static void Scheme_functions __P((FILE *)); +static void TeX_commands __P((FILE *)); +static void Texinfo_nodes __P((FILE *)); +static void Yacc_entries __P((FILE *)); +static void just_read_file __P((FILE *)); + +static void print_language_names __P((void)); +static void print_version __P((void)); +static void print_help __P((argument *)); +int main __P((int, char **)); + +static compressor *get_compressor_from_suffix __P((char *, char **)); +static language *get_language_from_langname __P((const char *)); +static language *get_language_from_interpreter __P((char *)); +static language *get_language_from_filename __P((char *, bool)); +static void readline __P((linebuffer *, FILE *)); +static long readline_internal __P((linebuffer *, FILE *)); +static bool nocase_tail __P((char *)); +static void get_tag __P((char *, char **)); + +static void analyse_regex __P((char *)); +static void free_regexps __P((void)); +static void regex_tag_multiline __P((void)); +static void error __P((const char *, const char *)); +static void suggest_asking_for_help __P((void)); +void fatal __P((char *, char *)); +static void pfatal __P((char *)); +static void add_node __P((node *, node **)); + +static void init __P((void)); +static void process_file_name __P((char *, language *)); +static void process_file __P((FILE *, char *, language *)); +static void find_entries __P((FILE *)); +static void free_tree __P((node *)); +static void free_fdesc __P((fdesc *)); +static void pfnote __P((char *, bool, char *, int, int, long)); +static void make_tag __P((char *, int, bool, char *, int, int, long)); +static void invalidate_nodes __P((fdesc *, node **)); +static void put_entries __P((node *)); + +static char *concat __P((char *, char *, char *)); +static char *skip_spaces __P((char *)); +static char *skip_non_spaces __P((char *)); +static char *savenstr __P((char *, int)); +static char *savestr __P((char *)); +static char *etags_strchr __P((const char *, int)); +static char *etags_strrchr __P((const char *, int)); +static int etags_strcasecmp __P((const char *, const char *)); +static int etags_strncasecmp __P((const char *, const char *, int)); +static char *etags_getcwd __P((void)); +static char *relative_filename __P((char *, char *)); +static char *absolute_filename __P((char *, char *)); +static char *absolute_dirname __P((char *, char *)); +static bool filename_is_absolute __P((char *f)); +static void canonicalize_filename __P((char *)); +static void linebuffer_init __P((linebuffer *)); +static void linebuffer_setlen __P((linebuffer *, int)); +static PTR xmalloc __P((unsigned int)); +static PTR xrealloc __P((char *, unsigned int)); -char searchar = '/'; /* use /.../ searches */ +static char searchar = '/'; /* use /.../ searches */ -char *tagfile; /* output file */ -char *progname; /* name this program was invoked with */ -char *cwd; /* current working directory */ -char *tagfiledir; /* directory of tagfile */ -FILE *tagf; /* ioptr for tags file */ +static char *tagfile; /* output file */ +static char *progname; /* name this program was invoked with */ +static char *cwd; /* current working directory */ +static char *tagfiledir; /* directory of tagfile */ +static FILE *tagf; /* ioptr for tags file */ -char *curfile; /* current input file name */ -language *curlang; /* current language */ +static fdesc *fdhead; /* head of file description list */ +static fdesc *curfdp; /* current file description */ +static int lineno; /* line number of current line */ +static long charno; /* current character number */ +static long linecharno; /* charno of start of current line */ +static char *dbp; /* pointer to start of current tag */ -int lineno; /* line number of current line */ -long charno; /* current character number */ -long linecharno; /* charno of start of current line */ -char *dbp; /* pointer to start of current tag */ +static const int invalidcharno = -1; -node *head; /* the head of the binary tree of tags */ +static node *nodehead; /* the head of the binary tree of tags */ +static node *last_node; /* the last node created */ -linebuffer lb; /* the current line */ +static linebuffer lb; /* the current line */ +static linebuffer filebuf; /* a buffer containing the whole file */ +static linebuffer token_name; /* a buffer containing a tag name */ /* boolean "functions" (see init) */ -bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS]; -char +static bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS]; +static char /* white chars */ *white = " \f\t\n\r\v", /* not in a name */ - *nonam = " \f\t\n\r(=,[;", + *nonam = " \f\t\n\r()=,;", /* look at make_tag before modifying! */ /* token ending chars */ *endtk = " \t\n\r\"'#()[]{}=-+%*/&|^~!<>;,.:?", /* token starting chars */ @@ -364,86 +489,80 @@ char /* valid in-token chars */ *midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789"; -bool append_to_tagfile; /* -a: append to tags */ -/* The following four default to TRUE for etags, but to FALSE for ctags. */ -bool typedefs; /* -t: create tags for C and Ada typedefs */ -bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */ +static bool append_to_tagfile; /* -a: append to tags */ +/* The next five default to TRUE for etags, but to FALSE for ctags. */ +static bool typedefs; /* -t: create tags for C and Ada typedefs */ +static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */ /* 0 struct/enum/union decls, and C++ */ /* member functions. */ -bool constantypedefs; /* -d: create tags for C #define, enum */ +static bool constantypedefs; /* -d: create tags for C #define, enum */ /* constants and variables. */ /* -D: opposite of -d. Default under ctags. */ -bool declarations; /* --declarations: tag them and extern in C&Co*/ -bool globals; /* create tags for global variables */ -bool members; /* create tags for C member variables */ -bool update; /* -u: update tags */ -bool vgrind_style; /* -v: create vgrind style index output */ -bool no_warnings; /* -w: suppress warnings */ -bool cxref_style; /* -x: create cxref style output */ -bool cplusplus; /* .[hc] means C++, not C */ -bool noindentypedefs; /* -I: ignore indentation in C */ -bool packages_only; /* --packages-only: in Ada, only tag packages*/ - -#ifdef LONG_OPTIONS -struct option longopts[] = +static bool globals; /* create tags for global variables */ +static bool members; /* create tags for C member variables */ +static bool declarations; /* --declarations: tag them and extern in C&Co*/ +static bool no_line_directive; /* ignore #line directives (undocumented) */ +static bool no_duplicates; /* no duplicate tags for ctags (undocumented) */ +static bool update; /* -u: update tags */ +static bool vgrind_style; /* -v: create vgrind style index output */ +static bool no_warnings; /* -w: suppress warnings (undocumented) */ +static bool cxref_style; /* -x: create cxref style output */ +static bool cplusplus; /* .[hc] means C++, not C */ +static bool ignoreindent; /* -I: ignore indentation in C */ +static bool packages_only; /* --packages-only: in Ada, only tag packages*/ + +/* STDIN is defined in LynxOS system headers */ +#ifdef STDIN +# undef STDIN +#endif + +#define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */ +static bool parsing_stdin; /* --parse-stdin used */ + +static regexp *p_head; /* list of all regexps */ +static bool need_filebuf; /* some regexes are multi-line */ + +static struct option longopts[] = { - { "packages-only", no_argument, &packages_only, TRUE }, - { "append", no_argument, NULL, 'a' }, - { "backward-search", no_argument, NULL, 'B' }, - { "c++", no_argument, NULL, 'C' }, - { "cxref", no_argument, NULL, 'x' }, - { "defines", no_argument, NULL, 'd' }, - { "declarations", no_argument, &declarations, TRUE }, - { "no-defines", no_argument, NULL, 'D' }, - { "globals", no_argument, &globals, TRUE }, - { "no-globals", no_argument, &globals, FALSE }, - { "help", no_argument, NULL, 'h' }, - { "help", no_argument, NULL, 'H' }, - { "ignore-indentation", no_argument, NULL, 'I' }, - { "include", required_argument, NULL, 'i' }, - { "language", required_argument, NULL, 'l' }, - { "members", no_argument, &members, TRUE }, - { "no-members", no_argument, &members, FALSE }, - { "no-warn", no_argument, NULL, 'w' }, - { "output", required_argument, NULL, 'o' }, -#ifdef ETAGS_REGEXPS - { "regex", required_argument, NULL, 'r' }, - { "no-regex", no_argument, NULL, 'R' }, - { "ignore-case-regex", required_argument, NULL, 'c' }, -#endif /* ETAGS_REGEXPS */ - { "typedefs", no_argument, NULL, 't' }, - { "typedefs-and-c++", no_argument, NULL, 'T' }, - { "update", no_argument, NULL, 'u' }, - { "version", no_argument, NULL, 'V' }, - { "vgrind", no_argument, NULL, 'v' }, + { "append", no_argument, NULL, 'a' }, + { "packages-only", no_argument, &packages_only, TRUE }, + { "c++", no_argument, NULL, 'C' }, + { "declarations", no_argument, &declarations, TRUE }, + { "no-line-directive", no_argument, &no_line_directive, TRUE }, + { "no-duplicates", no_argument, &no_duplicates, TRUE }, + { "help", no_argument, NULL, 'h' }, + { "help", no_argument, NULL, 'H' }, + { "ignore-indentation", no_argument, NULL, 'I' }, + { "language", required_argument, NULL, 'l' }, + { "members", no_argument, &members, TRUE }, + { "no-members", no_argument, &members, FALSE }, + { "output", required_argument, NULL, 'o' }, + { "regex", required_argument, NULL, 'r' }, + { "no-regex", no_argument, NULL, 'R' }, + { "ignore-case-regex", required_argument, NULL, 'c' }, + { "parse-stdin", required_argument, NULL, STDIN }, + { "version", no_argument, NULL, 'V' }, + +#if CTAGS /* Ctags options */ + { "backward-search", no_argument, NULL, 'B' }, + { "cxref", no_argument, NULL, 'x' }, + { "defines", no_argument, NULL, 'd' }, + { "globals", no_argument, &globals, TRUE }, + { "typedefs", no_argument, NULL, 't' }, + { "typedefs-and-c++", no_argument, NULL, 'T' }, + { "update", no_argument, NULL, 'u' }, + { "vgrind", no_argument, NULL, 'v' }, + { "no-warn", no_argument, NULL, 'w' }, + +#else /* Etags options */ + { "no-defines", no_argument, NULL, 'D' }, + { "no-globals", no_argument, &globals, FALSE }, + { "include", required_argument, NULL, 'i' }, +#endif { NULL } }; -#endif /* LONG_OPTIONS */ -#ifdef ETAGS_REGEXPS -/* Structure defining a regular expression. Elements are - the compiled pattern, and the name string. */ -typedef struct pattern -{ - struct pattern *p_next; - language *language; - char *regex; - struct re_pattern_buffer *pattern; - struct re_registers regs; - char *name_pattern; - bool error_signaled; -} pattern; - -/* List of all regexps. */ -pattern *p_head = NULL; - -/* How many characters in the character set. (From regex.c.) */ -#define CHAR_SET_SIZE 256 -/* Translation table for case-insensitive matching. */ -char lc_trans[CHAR_SET_SIZE]; -#endif /* ETAGS_REGEXPS */ - -compressor compressors[] = +static compressor compressors[] = { { "z", "gzip -d -c"}, { "Z", "gzip -d -c"}, @@ -457,93 +576,233 @@ compressor compressors[] = * Language stuff. */ -/* Non-NULL if language fixed. */ -language *forced_lang = NULL; - /* Ada code */ -char *Ada_suffixes [] = +static char *Ada_suffixes [] = { "ads", "adb", "ada", NULL }; +static char Ada_help [] = +"In Ada code, functions, procedures, packages, tasks and types are\n\ +tags. Use the `--packages-only' option to create tags for\n\ +packages only.\n\ +Ada tag names have suffixes indicating the type of entity:\n\ + Entity type: Qualifier:\n\ + ------------ ----------\n\ + function /f\n\ + procedure /p\n\ + package spec /s\n\ + package body /b\n\ + type /t\n\ + task /k\n\ +Thus, `M-x find-tag bidule/b ' will go directly to the\n\ +body of the package `bidule', while `M-x find-tag bidule '\n\ +will just search for any tag `bidule'."; /* Assembly code */ -char *Asm_suffixes [] = { "a", /* Unix assembler */ - "asm", /* Microcontroller assembly */ - "def", /* BSO/Tasking definition includes */ - "inc", /* Microcontroller include files */ - "ins", /* Microcontroller include files */ - "s", "sa", /* Unix assembler */ - "S", /* cpp-processed Unix assembler */ - "src", /* BSO/Tasking C compiler output */ - NULL - }; +static char *Asm_suffixes [] = + { "a", /* Unix assembler */ + "asm", /* Microcontroller assembly */ + "def", /* BSO/Tasking definition includes */ + "inc", /* Microcontroller include files */ + "ins", /* Microcontroller include files */ + "s", "sa", /* Unix assembler */ + "S", /* cpp-processed Unix assembler */ + "src", /* BSO/Tasking C compiler output */ + NULL + }; +static char Asm_help [] = +"In assembler code, labels appearing at the beginning of a line,\n\ +followed by a colon, are tags."; + /* Note that .c and .h can be considered C++, if the --c++ flag was - given, or if the `class' keyowrd is met inside the file. + given, or if the `class' or `template' keyowrds are met inside the file. That is why default_C_entries is called for these. */ -char *default_C_suffixes [] = +static char *default_C_suffixes [] = { "c", "h", NULL }; - -char *Cplusplus_suffixes [] = +static char default_C_help [] = +"In C code, any C function or typedef is a tag, and so are\n\ +definitions of `struct', `union' and `enum'. `#define' macro\n\ +definitions and `enum' constants are tags unless you specify\n\ +`--no-defines'. Global variables are tags unless you specify\n\ +`--no-globals' and so are struct members unless you specify\n\ +`--no-members'. Use of `--no-globals', `--no-defines' and\n\ +`--no-members' can make the tags table file much smaller.\n\ +You can tag function declarations and external variables by\n\ +using `--declarations'."; + +static char *Cplusplus_suffixes [] = { "C", "c++", "cc", "cpp", "cxx", "H", "h++", "hh", "hpp", "hxx", "M", /* Objective C++ */ "pdb", /* Postscript with C syntax */ NULL }; - -char *Cjava_suffixes [] = +static char Cplusplus_help [] = +"In C++ code, all the tag constructs of C code are tagged. (Use\n\ +--help --lang=c --lang=c++ for full help.)\n\ +In addition to C tags, member functions are also recognized. Member\n\ +variables are recognized unless you use the `--no-members' option.\n\ +Tags for variables and functions in classes are named `CLASS::VARIABLE'\n\ +and `CLASS::FUNCTION'. `operator' definitions have tag names like\n\ +`operator+'."; + +static char *Cjava_suffixes [] = { "java", NULL }; +static char Cjava_help [] = +"In Java code, all the tags constructs of C and C++ code are\n\ +tagged. (Use --help --lang=c --lang=c++ --lang=java for full help.)"; + -char *Cobol_suffixes [] = +static char *Cobol_suffixes [] = { "COB", "cob", NULL }; +static char Cobol_help [] = +"In Cobol code, tags are paragraph names; that is, any word\n\ +starting in column 8 and followed by a period."; -char *Cstar_suffixes [] = +static char *Cstar_suffixes [] = { "cs", "hs", NULL }; -char *Erlang_suffixes [] = +static char *Erlang_suffixes [] = { "erl", "hrl", NULL }; +static char Erlang_help [] = +"In Erlang code, the tags are the functions, records and macros\n\ +defined in the file."; -char *Fortran_suffixes [] = +char *Forth_suffixes [] = + { "fth", "tok", NULL }; +static char Forth_help [] = +"In Forth code, tags are words defined by `:',\n\ +constant, code, create, defer, value, variable, buffer:, field."; + +static char *Fortran_suffixes [] = { "F", "f", "f90", "for", NULL }; +static char Fortran_help [] = +"In Fortran code, functions, subroutines and block data are tags."; -char *Lisp_suffixes [] = - { "cl", "clisp", "el", "l", "lisp", "LSP", "lsp", "ml", NULL }; +static char *HTML_suffixes [] = + { "htm", "html", "shtml", NULL }; +static char HTML_help [] = +"In HTML input files, the tags are the `title' and the `h1', `h2',\n\ +`h3' headers. Also, tags are `name=' in anchors and all\n\ +occurrences of `id='."; -char *Makefile_filenames [] = +static char *Lisp_suffixes [] = + { "cl", "clisp", "el", "l", "lisp", "LSP", "lsp", "ml", NULL }; +static char Lisp_help [] = +"In Lisp code, any function defined with `defun', any variable\n\ +defined with `defvar' or `defconst', and in general the first\n\ +argument of any expression that starts with `(def' in column zero\n\ +is a tag."; + +static char *Lua_suffixes [] = + { "lua", "LUA", NULL }; +static char Lua_help [] = +"In Lua scripts, all functions are tags."; + +static char *Makefile_filenames [] = { "Makefile", "makefile", "GNUMakefile", "Makefile.in", "Makefile.am", NULL}; +static char Makefile_help [] = +"In makefiles, targets are tags; additionally, variables are tags\n\ +unless you specify `--no-globals'."; + +static char *Objc_suffixes [] = + { "lm", /* Objective lex file */ + "m", /* Objective C file */ + NULL }; +static char Objc_help [] = +"In Objective C code, tags include Objective C definitions for classes,\n\ +class categories, methods and protocols. Tags for variables and\n\ +functions in classes are named `CLASS::VARIABLE' and `CLASS::FUNCTION'.\n\ +(Use --help --lang=c --lang=objc --lang=java for full help.)"; -char *Pascal_suffixes [] = +static char *Pascal_suffixes [] = { "p", "pas", NULL }; +static char Pascal_help [] = +"In Pascal code, the tags are the functions and procedures defined\n\ +in the file."; +/* " // this is for working around an Emacs highlighting bug... */ -char *Perl_suffixes [] = +static char *Perl_suffixes [] = { "pl", "pm", NULL }; -char *Perl_interpreters [] = +static char *Perl_interpreters [] = { "perl", "@PERL@", NULL }; - -char *plain_C_suffixes [] = - { "lm", /* Objective lex file */ - "m", /* Objective C file */ - "pc", /* Pro*C file */ +static char Perl_help [] = +"In Perl code, the tags are the packages, subroutines and variables\n\ +defined by the `package', `sub', `my' and `local' keywords. Use\n\ +`--globals' if you want to tag global variables. Tags for\n\ +subroutines are named `PACKAGE::SUB'. The name for subroutines\n\ +defined in the default package is `main::SUB'."; + +static char *PHP_suffixes [] = + { "php", "php3", "php4", NULL }; +static char PHP_help [] = +"In PHP code, tags are functions, classes and defines. Unless you use\n\ +the `--no-members' option, vars are tags too."; + +static char *plain_C_suffixes [] = + { "pc", /* Pro*C file */ NULL }; -char *Postscript_suffixes [] = +static char *PS_suffixes [] = { "ps", "psw", NULL }; /* .psw is for PSWrap */ +static char PS_help [] = +"In PostScript code, the tags are the functions."; -char *Prolog_suffixes [] = +static char *Prolog_suffixes [] = { "prolog", NULL }; +static char Prolog_help [] = +"In Prolog code, tags are predicates and rules at the beginning of\n\ +line."; -char *Python_suffixes [] = +static char *Python_suffixes [] = { "py", NULL }; +static char Python_help [] = +"In Python code, `def' or `class' at the beginning of a line\n\ +generate a tag."; /* Can't do the `SCM' or `scm' prefix with a version number. */ -char *Scheme_suffixes [] = +static char *Scheme_suffixes [] = { "oak", "sch", "scheme", "SCM", "scm", "SM", "sm", "ss", "t", NULL }; +static char Scheme_help [] = +"In Scheme code, tags include anything defined with `def' or with a\n\ +construct whose name starts with `def'. They also include\n\ +variables set with `set!' at top level in the file."; -char *TeX_suffixes [] = +static char *TeX_suffixes [] = { "bib", "clo", "cls", "ltx", "sty", "TeX", "tex", NULL }; +static char TeX_help [] = +"In LaTeX text, the argument of any of the commands `\\chapter',\n\ +`\\section', `\\subsection', `\\subsubsection', `\\eqno', `\\label',\n\ +`\\ref', `\\cite', `\\bibitem', `\\part', `\\appendix', `\\entry',\n\ +`\\index', `\\def', `\\newcommand', `\\renewcommand',\n\ +`\\newenvironment' or `\\renewenvironment' is a tag.\n\ +\n\ +Other commands can be specified by setting the environment variable\n\ +`TEXTAGS' to a colon-separated list like, for example,\n\ + TEXTAGS=\"mycommand:myothercommand\"."; + -char *Texinfo_suffixes [] = +static char *Texinfo_suffixes [] = { "texi", "texinfo", "txi", NULL }; +static char Texinfo_help [] = +"for texinfo files, lines starting with @node are tagged."; -char *Yacc_suffixes [] = +static char *Yacc_suffixes [] = { "y", "y++", "ym", "yxx", "yy", NULL }; /* .ym is Objective yacc file */ +static char Yacc_help [] = +"In Bison or Yacc input files, each rule defines as a tag the\n\ +nonterminal it constructs. The portions of the file that contain\n\ +C code are parsed as C code (use --help --lang=c --lang=yacc\n\ +for full help)."; + +static char auto_help [] = +"`auto' is not a real language, it indicates to use\n\ +a default language for files base on file name suffix and file contents."; + +static char none_help [] = +"`none' is not a real language, it indicates to only do\n\ +regexp processing on files."; + +static char no_lang_help [] = +"No detailed help available for this language."; + /* * Table of languages. @@ -552,32 +811,37 @@ char *Yacc_suffixes [] = * name. I just didn't. */ -language lang_names [] = +static language lang_names [] = { - { "ada", Ada_funcs, NULL, Ada_suffixes, NULL }, - { "asm", Asm_labels, NULL, Asm_suffixes, NULL }, - { "c", default_C_entries, NULL, default_C_suffixes, NULL }, - { "c++", Cplusplus_entries, NULL, Cplusplus_suffixes, NULL }, - { "c*", Cstar_entries, NULL, Cstar_suffixes, NULL }, - { "cobol", Cobol_paragraphs, NULL, Cobol_suffixes, NULL }, - { "erlang", Erlang_functions, NULL, Erlang_suffixes, NULL }, - { "fortran", Fortran_functions, NULL, Fortran_suffixes, NULL }, - { "java", Cjava_entries, NULL, Cjava_suffixes, NULL }, - { "lisp", Lisp_functions, NULL, Lisp_suffixes, NULL }, - { "makefile", Makefile_targets, Makefile_filenames, NULL, NULL }, - { "pascal", Pascal_functions, NULL, Pascal_suffixes, NULL }, - { "perl", Perl_functions, NULL, Perl_suffixes, Perl_interpreters }, - { "postscript", Postscript_functions, NULL, Postscript_suffixes, NULL }, - { "proc", plain_C_entries, NULL, plain_C_suffixes, NULL }, - { "prolog", Prolog_functions, NULL, Prolog_suffixes, NULL }, - { "python", Python_functions, NULL, Python_suffixes, NULL }, - { "scheme", Scheme_functions, NULL, Scheme_suffixes, NULL }, - { "tex", TeX_commands, NULL, TeX_suffixes, NULL }, - { "texinfo", Texinfo_nodes, NULL, Texinfo_suffixes, NULL }, - { "yacc", Yacc_entries, NULL, Yacc_suffixes, NULL }, - { "auto", NULL }, /* default guessing scheme */ - { "none", just_read_file }, /* regexp matching only */ - { NULL, NULL } /* end of list */ + { "ada", Ada_help, Ada_funcs, Ada_suffixes }, + { "asm", Asm_help, Asm_labels, Asm_suffixes }, + { "c", default_C_help, default_C_entries, default_C_suffixes }, + { "c++", Cplusplus_help, Cplusplus_entries, Cplusplus_suffixes }, + { "c*", no_lang_help, Cstar_entries, Cstar_suffixes }, + { "cobol", Cobol_help, Cobol_paragraphs, Cobol_suffixes }, + { "erlang", Erlang_help, Erlang_functions, Erlang_suffixes }, + { "forth", Forth_help, Forth_words, Forth_suffixes }, + { "fortran", Fortran_help, Fortran_functions, Fortran_suffixes }, + { "html", HTML_help, HTML_labels, HTML_suffixes }, + { "java", Cjava_help, Cjava_entries, Cjava_suffixes }, + { "lisp", Lisp_help, Lisp_functions, Lisp_suffixes }, + { "lua", Lua_help, Lua_functions, Lua_suffixes }, + { "makefile", Makefile_help,Makefile_targets,NULL,Makefile_filenames}, + { "objc", Objc_help, plain_C_entries, Objc_suffixes }, + { "pascal", Pascal_help, Pascal_functions, Pascal_suffixes }, + { "perl",Perl_help,Perl_functions,Perl_suffixes,NULL,Perl_interpreters}, + { "php", PHP_help, PHP_functions, PHP_suffixes }, + { "postscript",PS_help, PS_functions, PS_suffixes }, + { "proc", no_lang_help, plain_C_entries, plain_C_suffixes }, + { "prolog", Prolog_help, Prolog_functions, Prolog_suffixes }, + { "python", Python_help, Python_functions, Python_suffixes }, + { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes }, + { "tex", TeX_help, TeX_commands, TeX_suffixes }, + { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes }, + { "yacc", Yacc_help,Yacc_entries,Yacc_suffixes,NULL,NULL,TRUE}, + { "auto", auto_help }, /* default guessing scheme */ + { "none", none_help, just_read_file }, /* regexp matching only */ + { NULL } /* end of list */ }; @@ -600,55 +864,75 @@ default file names and dot suffixes:"); printf (" .%s", *ext); puts (""); } - puts ("Where `auto' means use default language for files based on file\n\ + puts ("where `auto' means use default language for files based on file\n\ name suffix, and `none' means only do regexp processing on files.\n\ If no language is specified and no matching suffix is found,\n\ the first line of the file is read for a sharp-bang (#!) sequence\n\ followed by the name of an interpreter. If no such sequence is found,\n\ Fortran is tried first; if no tags are found, C is tried next.\n\ -When parsing any C file, a \"class\" keyword switches to C++.\n\ -Compressed files are supported using gzip and bzip2."); +When parsing any C file, a \"class\" or \"template\" keyword\n\ +switches to C++."); + puts ("Compressed files are supported using gzip and bzip2.\n\ +\n\ +For detailed help on a given language use, for example,\n\ +etags --help --lang=ada."); } #ifndef EMACS_NAME -# define EMACS_NAME "GNU Emacs" +# define EMACS_NAME "standalone" #endif #ifndef VERSION -# define VERSION "21" +# define VERSION "17.33" #endif static void print_version () { printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION); - puts ("Copyright (C) 1999 Free Software Foundation, Inc. and Ken Arnold"); - puts ("This program is distributed under the same terms as Emacs"); + puts ("Copyright (C) 2007 Free Software Foundation, Inc."); + puts ("This program is distributed under the terms in ETAGS.README"); - exit (GOOD); + exit (EXIT_SUCCESS); } +#ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP +# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE +#endif + static void -print_help () +print_help (argbuffer) + argument *argbuffer; { + bool help_for_lang = FALSE; + + for (; argbuffer->arg_type != at_end; argbuffer++) + if (argbuffer->arg_type == at_language) + { + if (help_for_lang) + puts (""); + puts (argbuffer->lang->help); + help_for_lang = TRUE; + } + + if (help_for_lang) + exit (EXIT_SUCCESS); + printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ \n\ These are the options accepted by %s.\n", progname, progname); -#ifdef LONG_OPTIONS - puts ("You may use unambiguous abbreviations for the long option names."); -#else - puts ("Long option names do not work with this executable, as it is not\n\ -linked with GNU getopt."); -#endif /* LONG_OPTIONS */ - puts ("A - as file name means read names from stdin (one per line)."); - if (!CTAGS) - printf (" Absolute names are stored in the output file as they are.\n\ -Relative ones are stored relative to the output file's directory."); - puts ("\n"); + if (NO_LONG_OPTIONS) + puts ("WARNING: long option names do not work with this executable,\n\ +as it is not linked with GNU getopt."); + else + puts ("You may use unambiguous abbreviations for the long option names."); + puts (" A - as file name means read names from stdin (one per line).\n\ +Absolute names are stored in the output file as they are.\n\ +Relative ones are stored relative to the output file's directory.\n"); puts ("-a, --append\n\ Append tag entries to existing tags file."); puts ("--packages-only\n\ - For Ada files, only generate tags for packages ."); + For Ada files, only generate tags for packages."); if (CTAGS) puts ("-B, --backward-search\n\ @@ -658,7 +942,7 @@ Relative ones are stored relative to the output file's directory."); /* This option is mostly obsolete, because etags can now automatically detect C++. Retained for backward compatibility and for debugging and experimentation. In principle, we could want to tag as C++ even - before any "class" keyword. + before any "class" or "template" keyword. puts ("-C, --c++\n\ Treat files whose name suffix defaults to C language as C++ files."); */ @@ -680,15 +964,14 @@ Relative ones are stored relative to the output file's directory."); This makes the tags file smaller."); if (!CTAGS) - { - puts ("-i FILE, --include=FILE\n\ + puts ("-i FILE, --include=FILE\n\ Include a note in tag file indicating that, when searching for\n\ a tag, one should also consult the tags file FILE after\n\ checking the current file."); - puts ("-l LANG, --language=LANG\n\ + + puts ("-l LANG, --language=LANG\n\ Force the following files to be considered as written in the\n\ named language up to the next --language=LANG option."); - } if (CTAGS) puts ("--globals\n\ @@ -697,30 +980,44 @@ Relative ones are stored relative to the output file's directory."); puts ("--no-globals\n\ Do not create tag entries for global variables in some\n\ languages. This makes the tags file smaller."); - puts ("--members\n\ - Create tag entries for member variables in C and derived languages."); - -#ifdef ETAGS_REGEXPS - puts ("-r /REGEXP/, --regex=/REGEXP/ or --regex=@regexfile\n\ - Make a tag for each line matching pattern REGEXP in the following\n\ - files. {LANGUAGE}/REGEXP/ uses REGEXP for LANGUAGE files only.\n\ - regexfile is a file containing one REGEXP per line.\n\ - REGEXP is anchored (as if preceded by ^).\n\ - The form /REGEXP/NAME/ creates a named tag.\n\ + + if (PRINT_UNDOCUMENTED_OPTIONS_HELP) + puts ("--no-line-directive\n\ + Ignore #line preprocessor directives in C and derived languages."); + + if (CTAGS) + puts ("--members\n\ + Create tag entries for members of structures in some languages."); + else + puts ("--no-members\n\ + Do not create tag entries for members of structures\n\ + in some languages."); + + puts ("-r REGEXP, --regex=REGEXP or --regex=@regexfile\n\ + Make a tag for each line matching a regular expression pattern\n\ + in the following files. {LANGUAGE}REGEXP uses REGEXP for LANGUAGE\n\ + files only. REGEXFILE is a file containing one REGEXP per line.\n\ + REGEXP takes the form /TAGREGEXP/TAGNAME/MODS, where TAGNAME/ is\n\ + optional. The TAGREGEXP pattern is anchored (as if preceded by ^)."); + puts (" If TAGNAME/ is present, the tags created are named.\n\ For example Tcl named tags can be created with:\n\ - --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/."); - puts ("-c /REGEXP/, --ignore-case-regex=/REGEXP/ or --ignore-case-regex=@regexfile\n\ - Like -r, --regex but ignore case when matching expressions."); + --regex=\"/proc[ \\t]+\\([^ \\t]+\\)/\\1/.\".\n\ + MODS are optional one-letter modifiers: `i' means to ignore case,\n\ + `m' means to allow multi-line matches, `s' implies `m' and\n\ + causes dot to match any character, including newline."); + puts ("-R, --no-regex\n\ Don't create tags from regexps for the following files."); -#endif /* ETAGS_REGEXPS */ + + puts ("-I, --ignore-indentation\n\ + In C and C++ do not assume that a closing brace in the first\n\ + column is the final brace of a function or structure definition."); + puts ("-o FILE, --output=FILE\n\ Write the tags to FILE."); - puts ("-I, --ignore-indentation\n\ - Don't rely on indentation quite as much as normal. Currently,\n\ - this means not to assume that a closing brace in the first\n\ - column is the final brace of a function or structure\n\ - definition in C and C++."); + + puts ("--parse-stdin=NAME\n\ + Read from standard input and record tags as belonging to file NAME."); if (CTAGS) { @@ -729,20 +1026,33 @@ Relative ones are stored relative to the output file's directory."); puts ("-T, --typedefs-and-c++\n\ Generate tag entries for C typedefs, C struct/enum/union tags,\n\ and C++ member functions."); - puts ("-u, --update\n\ + } + + if (CTAGS) + puts ("-u, --update\n\ Update the tag entries for the given files, leaving tag\n\ entries for other files in place. Currently, this is\n\ implemented by deleting the existing entries for the given\n\ files and then rewriting the new entries at the end of the\n\ tags file. It is often faster to simply rebuild the entire\n\ tag file than to use this."); + + if (CTAGS) + { puts ("-v, --vgrind\n\ - Generates an index of items intended for human consumption,\n\ - similar to the output of vgrind. The index is sorted, and\n\ - gives the page number of each item."); - puts ("-w, --no-warn\n\ - Suppress warning messages about entries defined in multiple\n\ - files."); + Print on the standard output an index of items intended for\n\ + human consumption, similar to the output of vgrind. The index\n\ + is sorted, and gives the page number of each item."); + + if (PRINT_UNDOCUMENTED_OPTIONS_HELP) + puts ("-w, --no-duplicates\n\ + Do not create duplicate tag entries, for compatibility with\n\ + traditional ctags."); + + if (PRINT_UNDOCUMENTED_OPTIONS_HELP) + puts ("-w, --no-warn\n\ + Suppress warning messages about duplicate tag entries."); + puts ("-x, --cxref\n\ Like --vgrind, but in the style of cxref, rather than vgrind.\n\ The output uses line numbers instead of page numbers, but\n\ @@ -753,33 +1063,19 @@ Relative ones are stored relative to the output file's directory."); puts ("-V, --version\n\ Print the version of the program.\n\ -h, --help\n\ - Print this help message."); + Print this help message.\n\ + Followed by one or more `--language' options prints detailed\n\ + help about tag generation for the specified languages."); print_language_names (); puts (""); puts ("Report bugs to bug-gnu-emacs@gnu.org"); - exit (GOOD); + exit (EXIT_SUCCESS); } -enum argument_type -{ - at_language, - at_regexp, - at_filename, - at_icregexp -}; - -/* This structure helps us allow mixing of --lang and file names. */ -typedef struct -{ - enum argument_type arg_type; - char *what; - language *lang; /* language of the regexp */ -} argument; - #ifdef VMS /* VMS specific functions */ #define EOS '\0' @@ -913,13 +1209,16 @@ main (argc, argv) int i; unsigned int nincluded_files; char **included_files; - char *this_file; argument *argbuffer; int current_arg, file_count; linebuffer filename_lb; + bool help_asked = FALSE; #ifdef VMS bool got_err; #endif + char *optstring; + int opt; + #ifdef DOS_NT _fmode = O_BINARY; /* all of files are treated as binary files */ @@ -935,139 +1234,120 @@ main (argc, argv) is small. */ argbuffer = xnew (argc, argument); -#ifdef ETAGS_REGEXPS - /* Set syntax for regular expression routines. */ - re_set_syntax (RE_SYNTAX_EMACS | RE_INTERVALS); - /* Translation table for case-insensitive search. */ - for (i = 0; i < CHAR_SET_SIZE; i++) - lc_trans[i] = lowcase (i); -#endif /* ETAGS_REGEXPS */ - /* * If etags, always find typedefs and structure tags. Why not? - * Also default to find macro constants, enum constants and - * global variables. + * Also default to find macro constants, enum constants, struct + * members and global variables. */ if (!CTAGS) { typedefs = typedefs_or_cplusplus = constantypedefs = TRUE; - globals = TRUE; - declarations = FALSE; - members = FALSE; + globals = members = TRUE; } - while (1) - { - int opt; - char *optstring; + /* When the optstring begins with a '-' getopt_long does not rearrange the + non-options arguments to be at the end, but leaves them alone. */ + optstring = concat (NO_LONG_OPTIONS ? "" : "-", + "ac:Cf:Il:o:r:RSVhH", + (CTAGS) ? "BxdtTuvw" : "Di:"); -#ifdef ETAGS_REGEXPS - optstring = "-aCdDf:Il:o:r:c:RStTi:BuvxwVhH"; -#else - optstring = "-aCdDf:Il:o:StTi:BuvxwVhH"; -#endif /* ETAGS_REGEXPS */ + while ((opt = getopt_long (argc, argv, optstring, longopts, NULL)) != EOF) + switch (opt) + { + case 0: + /* If getopt returns 0, then it has already processed a + long-named option. We should do nothing. */ + break; -#ifndef LONG_OPTIONS - optstring = optstring + 1; -#endif /* LONG_OPTIONS */ + case 1: + /* This means that a file name has been seen. Record it. */ + argbuffer[current_arg].arg_type = at_filename; + argbuffer[current_arg].what = optarg; + ++current_arg; + ++file_count; + break; - opt = getopt_long (argc, argv, optstring, longopts, 0); - if (opt == EOF) + case STDIN: + /* Parse standard input. Idea by Vivek . */ + argbuffer[current_arg].arg_type = at_stdin; + argbuffer[current_arg].what = optarg; + ++current_arg; + ++file_count; + if (parsing_stdin) + fatal ("cannot parse standard input more than once", (char *)NULL); + parsing_stdin = TRUE; break; - switch (opt) + /* Common options. */ + case 'a': append_to_tagfile = TRUE; break; + case 'C': cplusplus = TRUE; break; + case 'f': /* for compatibility with old makefiles */ + case 'o': + if (tagfile) + { + error ("-o option may only be given once.", (char *)NULL); + suggest_asking_for_help (); + /* NOTREACHED */ + } + tagfile = optarg; + break; + case 'I': + case 'S': /* for backward compatibility */ + ignoreindent = TRUE; + break; + case 'l': { - case 0: - /* If getopt returns 0, then it has already processed a - long-named option. We should do nothing. */ - break; - - case 1: - /* This means that a file name has been seen. Record it. */ - argbuffer[current_arg].arg_type = at_filename; - argbuffer[current_arg].what = optarg; - ++current_arg; - ++file_count; - break; - - /* Common options. */ - case 'a': append_to_tagfile = TRUE; break; - case 'C': cplusplus = TRUE; break; - case 'd': constantypedefs = TRUE; break; - case 'D': constantypedefs = FALSE; break; - case 'f': /* for compatibility with old makefiles */ - case 'o': - if (tagfile) + language *lang = get_language_from_langname (optarg); + if (lang != NULL) { - error ("-o option may only be given once.", (char *)NULL); - suggest_asking_for_help (); + argbuffer[current_arg].lang = lang; + argbuffer[current_arg].arg_type = at_language; + ++current_arg; } - tagfile = optarg; - break; - case 'I': - case 'S': /* for backward compatibility */ - noindentypedefs = TRUE; - break; - case 'l': - { - language *lang = get_language_from_langname (optarg); - if (lang != NULL) - { - argbuffer[current_arg].lang = lang; - argbuffer[current_arg].arg_type = at_language; - ++current_arg; - } - } - break; -#ifdef ETAGS_REGEXPS - case 'r': - argbuffer[current_arg].arg_type = at_regexp; - argbuffer[current_arg].what = optarg; - ++current_arg; - break; - case 'R': - argbuffer[current_arg].arg_type = at_regexp; - argbuffer[current_arg].what = NULL; - ++current_arg; - break; - case 'c': - argbuffer[current_arg].arg_type = at_icregexp; - argbuffer[current_arg].what = optarg; - ++current_arg; - break; -#endif /* ETAGS_REGEXPS */ - case 'V': - print_version (); - break; - case 'h': - case 'H': - print_help (); - break; - case 't': - typedefs = TRUE; - break; - case 'T': - typedefs = typedefs_or_cplusplus = TRUE; - break; -#if (!CTAGS) - /* Etags options */ - case 'i': - included_files[nincluded_files++] = optarg; - break; -#else /* CTAGS */ - /* Ctags options. */ - case 'B': searchar = '?'; break; - case 'u': update = TRUE; break; - case 'v': vgrind_style = TRUE; /*FALLTHRU*/ - case 'x': cxref_style = TRUE; break; - case 'w': no_warnings = TRUE; break; -#endif /* CTAGS */ - default: - suggest_asking_for_help (); } - } + break; + case 'c': + /* Backward compatibility: support obsolete --ignore-case-regexp. */ + optarg = concat (optarg, "i", ""); /* memory leak here */ + /* FALLTHRU */ + case 'r': + argbuffer[current_arg].arg_type = at_regexp; + argbuffer[current_arg].what = optarg; + ++current_arg; + break; + case 'R': + argbuffer[current_arg].arg_type = at_regexp; + argbuffer[current_arg].what = NULL; + ++current_arg; + break; + case 'V': + print_version (); + break; + case 'h': + case 'H': + help_asked = TRUE; + break; + + /* Etags options */ + case 'D': constantypedefs = FALSE; break; + case 'i': included_files[nincluded_files++] = optarg; break; + + /* Ctags options. */ + case 'B': searchar = '?'; break; + case 'd': constantypedefs = TRUE; break; + case 't': typedefs = TRUE; break; + case 'T': typedefs = typedefs_or_cplusplus = TRUE; break; + case 'u': update = TRUE; break; + case 'v': vgrind_style = TRUE; /*FALLTHRU*/ + case 'x': cxref_style = TRUE; break; + case 'w': no_warnings = TRUE; break; + default: + suggest_asking_for_help (); + /* NOTREACHED */ + } - for (; optind < argc; ++optind) + /* No more options. Store the rest of arguments. */ + for (; optind < argc; optind++) { argbuffer[current_arg].arg_type = at_filename; argbuffer[current_arg].what = argv[optind]; @@ -1075,10 +1355,17 @@ main (argc, argv) ++file_count; } + argbuffer[current_arg].arg_type = at_end; + + if (help_asked) + print_help (argbuffer); + /* NOTREACHED */ + if (nincluded_files == 0 && file_count == 0) { error ("no input files specified.", (char *)NULL); suggest_asking_for_help (); + /* NOTREACHED */ } if (tagfile == NULL) @@ -1090,15 +1377,19 @@ main (argc, argv) cwd = concat (oldcwd, "/", ""); free (oldcwd); } - if (streq (tagfile, "-")) + /* Relative file names are made relative to the current directory. */ + if (streq (tagfile, "-") + || strneq (tagfile, "/dev/", 5)) tagfiledir = cwd; else tagfiledir = absolute_dirname (tagfile, cwd); init (); /* set up boolean "functions" */ - initbuffer (&lb); - initbuffer (&filename_lb); + linebuffer_init (&lb); + linebuffer_init (&filename_lb); + linebuffer_init (&filebuf); + linebuffer_init (&token_name); if (!CTAGS) { @@ -1121,21 +1412,19 @@ main (argc, argv) /* * Loop through files finding functions. */ - for (i = 0; i < current_arg; ++i) + for (i = 0; i < current_arg; i++) { + static language *lang; /* non-NULL if language is forced */ + char *this_file; + switch (argbuffer[i].arg_type) { case at_language: - forced_lang = argbuffer[i].lang; + lang = argbuffer[i].lang; break; -#ifdef ETAGS_REGEXPS case at_regexp: - analyse_regex (argbuffer[i].what, FALSE); + analyse_regex (argbuffer[i].what); break; - case at_icregexp: - analyse_regex (argbuffer[i].what, TRUE); - break; -#endif case at_filename: #ifdef VMS while ((this_file = gfnames (argbuffer[i].what, &got_err)) != NULL) @@ -1155,38 +1444,54 @@ main (argc, argv) /* Input file named "-" means read file names from stdin (one per line) and use them. */ if (streq (this_file, "-")) - while (readline_internal (&filename_lb, stdin) > 0) - process_file (filename_lb.buffer); + { + if (parsing_stdin) + fatal ("cannot parse standard input AND read file names from it", + (char *)NULL); + while (readline_internal (&filename_lb, stdin) > 0) + process_file_name (filename_lb.buffer, lang); + } else - process_file (this_file); + process_file_name (this_file, lang); #ifdef VMS } #endif break; + case at_stdin: + this_file = argbuffer[i].what; + process_file (stdin, this_file, lang); + break; } } -#ifdef ETAGS_REGEXPS - free_patterns (); -#endif /* ETAGS_REGEXPS */ + free_regexps (); + free (lb.buffer); + free (filebuf.buffer); + free (token_name.buffer); - if (!CTAGS) + if (!CTAGS || cxref_style) { - while (nincluded_files-- > 0) - fprintf (tagf, "\f\n%s,include\n", *included_files++); + /* Write the remaining tags to tagf (ETAGS) or stdout (CXREF). */ + put_entries (nodehead); + free_tree (nodehead); + nodehead = NULL; + if (!CTAGS) + { + fdesc *fdp; - fclose (tagf); - exit (GOOD); - } + /* Output file entries that have no tags. */ + for (fdp = fdhead; fdp != NULL; fdp = fdp->next) + if (!fdp->written) + fprintf (tagf, "\f\n%s,0\n", fdp->taggedfname); - /* If CTAGS, we are here. process_file did not write the tags yet, - because we want them ordered. Let's do it now. */ - if (cxref_style) - { - put_entries (head); - free_tree (head); - head = NULL; - exit (GOOD); + while (nincluded_files-- > 0) + fprintf (tagf, "\f\n%s,include\n", *included_files++); + + if (fclose (tagf) == EOF) + pfatal (tagfile); + } + + exit (EXIT_SUCCESS); } if (update) @@ -1194,12 +1499,18 @@ main (argc, argv) char cmd[BUFSIZ]; for (i = 0; i < current_arg; ++i) { - if (argbuffer[i].arg_type != at_filename) - continue; + switch (argbuffer[i].arg_type) + { + case at_filename: + case at_stdin: + break; + default: + continue; /* the for loop */ + } sprintf (cmd, "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS", tagfile, argbuffer[i].what, tagfile); - if (system (cmd) != GOOD) + if (system (cmd) != EXIT_SUCCESS) fatal ("failed to execute shell command", (char *)NULL); } append_to_tagfile = TRUE; @@ -1208,22 +1519,26 @@ main (argc, argv) tagf = fopen (tagfile, append_to_tagfile ? "a" : "w"); if (tagf == NULL) pfatal (tagfile); - put_entries (head); - free_tree (head); - head = NULL; - fclose (tagf); + put_entries (nodehead); /* write all the tags (CTAGS) */ + free_tree (nodehead); + nodehead = NULL; + if (fclose (tagf) == EOF) + pfatal (tagfile); - if (update) - { - char cmd[BUFSIZ]; - sprintf (cmd, "sort %s -o %s", tagfile, tagfile); - exit (system (cmd)); - } - return GOOD; + if (CTAGS) + if (append_to_tagfile || update) + { + char cmd[2*BUFSIZ+20]; + /* Maybe these should be used: + setenv ("LC_COLLATE", "C", 1); + setenv ("LC_ALL", "C", 1); */ + sprintf (cmd, "sort -u -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); + exit (system (cmd)); + } + return EXIT_SUCCESS; } - /* * Return a compressor given the file name. If EXTPTR is non-zero, * return a pointer into FILE where the compressor-specific @@ -1271,7 +1586,7 @@ get_compressor_from_suffix (file, extptr) */ static language * get_language_from_langname (name) - char *name; + const char *name; { language *lang; @@ -1316,8 +1631,9 @@ get_language_from_interpreter (interpreter) * Return a language given the file name. */ static language * -get_language_from_filename (file) +get_language_from_filename (file, case_sensitive) char *file; + bool case_sensitive; { language *lang; char **name, **ext, *suffix; @@ -1326,7 +1642,9 @@ get_language_from_filename (file) for (lang = lang_names; lang->name != NULL; lang++) if (lang->filenames != NULL) for (name = lang->filenames; *name != NULL; name++) - if (streq (*name, file)) + if ((case_sensitive) + ? streq (*name, file) + : strcaseeq (*name, file)) return lang; /* If not found, try suffix after last dot. */ @@ -1337,26 +1655,29 @@ get_language_from_filename (file) for (lang = lang_names; lang->name != NULL; lang++) if (lang->suffixes != NULL) for (ext = lang->suffixes; *ext != NULL; ext++) - if (streq (*ext, suffix)) + if ((case_sensitive) + ? streq (*ext, suffix) + : strcaseeq (*ext, suffix)) return lang; return NULL; } - - + /* * This routine is called on each file argument. */ static void -process_file (file) +process_file_name (file, lang) char *file; + language *lang; { struct stat stat_buf; FILE *inf; + fdesc *fdp; compressor *compr; char *compressed_name, *uncompressed_name; char *ext, *real_name; - + int retval; canonicalize_filename (file); if (streq (file, tagfile) && !streq (tagfile, "-")) @@ -1375,25 +1696,14 @@ process_file (file) uncompressed_name = savenstr (file, ext - file); } - /* If the canonicalised uncompressed name has already be dealt with, - skip it silently, else add it to the list. */ - { - typedef struct processed_file + /* If the canonicalized uncompressed name + has already been dealt with, skip it silently. */ + for (fdp = fdhead; fdp != NULL; fdp = fdp->next) { - char *filename; - struct processed_file *next; - } processed_file; - static processed_file *pf_head = NULL; - register processed_file *fnp; - - for (fnp = pf_head; fnp != NULL; fnp = fnp->next) - if (streq (uncompressed_name, fnp->filename)) - goto exit; - fnp = pf_head; - pf_head = xnew (1, struct processed_file); - pf_head->filename = savestr (uncompressed_name); - pf_head->next = fnp; - } + assert (fdp->infname != NULL); + if (streq (uncompressed_name, fdp->infname)) + goto cleanup; + } if (stat (real_name, &stat_buf) != 0) { @@ -1440,14 +1750,14 @@ process_file (file) if (real_name == NULL) { perror (file); - goto exit; + goto cleanup; } } /* try with a different name */ if (!S_ISREG (stat_buf.st_mode)) { error ("skipping %s: it is not a regular file.", real_name); - goto exit; + goto cleanup; } if (real_name == compressed_name) { @@ -1460,42 +1770,96 @@ process_file (file) if (inf == NULL) { perror (real_name); - goto exit; + goto cleanup; } - find_entries (uncompressed_name, inf); + process_file (inf, uncompressed_name, lang); if (real_name == compressed_name) - pclose (inf); + retval = pclose (inf); else - fclose (inf); + retval = fclose (inf); + if (retval < 0) + pfatal (file); + + cleanup: + if (compressed_name) free (compressed_name); + if (uncompressed_name) free (uncompressed_name); + last_node = NULL; + curfdp = NULL; + return; +} - if (!CTAGS) +static void +process_file (fh, fn, lang) + FILE *fh; + char *fn; + language *lang; +{ + static const fdesc emptyfdesc; + fdesc *fdp; + + /* Create a new input file description entry. */ + fdp = xnew (1, fdesc); + *fdp = emptyfdesc; + fdp->next = fdhead; + fdp->infname = savestr (fn); + fdp->lang = lang; + fdp->infabsname = absolute_filename (fn, cwd); + fdp->infabsdir = absolute_dirname (fn, cwd); + if (filename_is_absolute (fn)) + { + /* An absolute file name. Canonicalize it. */ + fdp->taggedfname = absolute_filename (fn, NULL); + } + else { - char *filename; + /* A file name relative to cwd. Make it relative + to the directory of the tags file. */ + fdp->taggedfname = relative_filename (fn, tagfiledir); + } + fdp->usecharno = TRUE; /* use char position when making tags */ + fdp->prop = NULL; + fdp->written = FALSE; /* not written on tags file yet */ - if (filename_is_absolute (uncompressed_name)) - { - /* file is an absolute file name. Canonicalise it. */ - filename = absolute_filename (uncompressed_name, cwd); - } - else + fdhead = fdp; + curfdp = fdhead; /* the current file description */ + + find_entries (fh); + + /* If not Ctags, and if this is not metasource and if it contained no #line + directives, we can write the tags and free all nodes pointing to + curfdp. */ + if (!CTAGS + && curfdp->usecharno /* no #line directives in this file */ + && !curfdp->lang->metasource) + { + node *np, *prev; + + /* Look for the head of the sublist relative to this file. See add_node + for the structure of the node tree. */ + prev = NULL; + for (np = nodehead; np != NULL; prev = np, np = np->left) + if (np->fdp == curfdp) + break; + + /* If we generated tags for this file, write and delete them. */ + if (np != NULL) { - /* file is a file name relative to cwd. Make it relative - to the directory of the tags file. */ - filename = relative_filename (uncompressed_name, tagfiledir); + /* This is the head of the last sublist, if any. The following + instructions depend on this being true. */ + assert (np->left == NULL); + + assert (fdhead == curfdp); + assert (last_node->fdp == curfdp); + put_entries (np); /* write tags for file curfdp->taggedfname */ + free_tree (np); /* remove the written nodes */ + if (prev == NULL) + nodehead = NULL; /* no nodes left */ + else + prev->left = NULL; /* delete the pointer to the sublist */ } - fprintf (tagf, "\f\n%s,%d\n", filename, total_size_of_entries (head)); - free (filename); - put_entries (head); - free_tree (head); - head = NULL; } - - exit: - if (compressed_name) free(compressed_name); - if (uncompressed_name) free(uncompressed_name); - return; } /* @@ -1529,44 +1893,34 @@ init () * This routine opens the specified file and calls the function * which finds the function and type definitions. */ -node *last_node = NULL; - static void -find_entries (file, inf) - char *file; +find_entries (inf) FILE *inf; { char *cp; - language *lang; - node *old_last_node; - - /* Memory leakage here: the string pointed by curfile is - never released, because curfile is copied into np->file - for each node, to be used in CTAGS mode. The amount of - memory leaked here is the sum of the lengths of the - file names. */ - curfile = savestr (file); + language *lang = curfdp->lang; + Lang_function *parser = NULL; /* If user specified a language, use it. */ - lang = forced_lang; if (lang != NULL && lang->function != NULL) { - curlang = lang; - lang->function (inf); - return; + parser = lang->function; } - /* Try to guess the language given the file name. */ - lang = get_language_from_filename (file); - if (lang != NULL && lang->function != NULL) + /* Else try to guess the language given the file name. */ + if (parser == NULL) { - curlang = lang; - lang->function (inf); - return; + lang = get_language_from_filename (curfdp->infname, TRUE); + if (lang != NULL && lang->function != NULL) + { + curfdp->lang = lang; + parser = lang->function; + } } - /* Look for sharp-bang as the first two characters. */ - if (readline_internal (&lb, inf) > 0 + /* Else look for sharp-bang as the first two characters. */ + if (parser == NULL + && readline_internal (&lb, inf) > 0 && lb.len >= 2 && lb.buffer[0] == '#' && lb.buffer[1] == '!') @@ -1589,141 +1943,212 @@ find_entries (file, inf) lang = get_language_from_interpreter (lp); if (lang != NULL && lang->function != NULL) { - curlang = lang; - lang->function (inf); - return; + curfdp->lang = lang; + parser = lang->function; } } } + /* We rewind here, even if inf may be a pipe. We fail if the length of the first line is longer than the pipe block size, which is unlikely. */ rewind (inf); - /* Try Fortran. */ - old_last_node = last_node; - curlang = get_language_from_langname ("fortran"); - Fortran_functions (inf); + /* Else try to guess the language given the case insensitive file name. */ + if (parser == NULL) + { + lang = get_language_from_filename (curfdp->infname, FALSE); + if (lang != NULL && lang->function != NULL) + { + curfdp->lang = lang; + parser = lang->function; + } + } + + /* Else try Fortran or C. */ + if (parser == NULL) + { + node *old_last_node = last_node; + + curfdp->lang = get_language_from_langname ("fortran"); + find_entries (inf); + + if (old_last_node == last_node) + /* No Fortran entries found. Try C. */ + { + /* We do not tag if rewind fails. + Only the file name will be recorded in the tags file. */ + rewind (inf); + curfdp->lang = get_language_from_langname (cplusplus ? "c++" : "c"); + find_entries (inf); + } + return; + } - /* No Fortran entries found. Try C. */ - if (old_last_node == last_node) + if (!no_line_directive + && curfdp->lang != NULL && curfdp->lang->metasource) + /* It may be that this is a bingo.y file, and we already parsed a bingo.c + file, or anyway we parsed a file that is automatically generated from + this one. If this is the case, the bingo.c file contained #line + directives that generated tags pointing to this file. Let's delete + them all before parsing this file, which is the real source. */ { - /* We do not tag if rewind fails. - Only the file name will be recorded in the tags file. */ - rewind (inf); - curlang = get_language_from_langname (cplusplus ? "c++" : "c"); - default_C_entries (inf); + fdesc **fdpp = &fdhead; + while (*fdpp != NULL) + if (*fdpp != curfdp + && streq ((*fdpp)->taggedfname, curfdp->taggedfname)) + /* We found one of those! We must delete both the file description + and all tags referring to it. */ + { + fdesc *badfdp = *fdpp; + + /* Delete the tags referring to badfdp->taggedfname + that were obtained from badfdp->infname. */ + invalidate_nodes (badfdp, &nodehead); + + *fdpp = badfdp->next; /* remove the bad description from the list */ + free_fdesc (badfdp); + } + else + fdpp = &(*fdpp)->next; /* advance the list pointer */ } - return; + + assert (parser != NULL); + + /* Generic initialisations before reading from file. */ + linebuffer_setlen (&filebuf, 0); /* reset the file buffer */ + + /* Generic initialisations before parsing file with readline. */ + lineno = 0; /* reset global line number */ + charno = 0; /* reset global char number */ + linecharno = 0; /* reset global char number of line start */ + + parser (inf); + + regex_tag_multiline (); } -/* Record a tag. */ +/* + * Check whether an implicitly named tag should be created, + * then call `pfnote'. + * NAME is a string that is internally copied by this function. + * + * TAGS format specification + * Idea by Sam Kendall (1997) + * The following is explained in some more detail in etc/ETAGS.EBNF. + * + * make_tag creates tags with "implicit tag names" (unnamed tags) + * if the following are all true, assuming NONAM=" \f\t\n\r()=,;": + * 1. NAME does not contain any of the characters in NONAM; + * 2. LINESTART contains name as either a rightmost, or rightmost but + * one character, substring; + * 3. the character, if any, immediately before NAME in LINESTART must + * be a character in NONAM; + * 4. the character, if any, immediately after NAME in LINESTART must + * also be a character in NONAM. + * + * The implementation uses the notinname() macro, which recognises the + * characters stored in the string `nonam'. + * etags.el needs to use the same characters that are in NONAM. + */ static void -pfnote (name, is_func, linestart, linelen, lno, cno) +make_tag (name, namelen, is_func, linestart, linelen, lno, cno) char *name; /* tag name, or NULL if unnamed */ + int namelen; /* tag length */ bool is_func; /* tag is a function */ char *linestart; /* start of the line where tag is */ int linelen; /* length of the line where tag is */ int lno; /* line number */ long cno; /* character number */ { - register node *np; + bool named = (name != NULL && namelen > 0); - if (CTAGS && name == NULL) - return; + if (!CTAGS && named) /* maybe set named to false */ + /* Let's try to make an implicit tag name, that is, create an unnamed tag + such that etags.el can guess a name from it. */ + { + int i; + register char *cp = name; - np = xnew (1, node); + for (i = 0; i < namelen; i++) + if (notinname (*cp++)) + break; + if (i == namelen) /* rule #1 */ + { + cp = linestart + linelen - namelen; + if (notinname (linestart[linelen-1])) + cp -= 1; /* rule #4 */ + if (cp >= linestart /* rule #2 */ + && (cp == linestart + || notinname (cp[-1])) /* rule #3 */ + && strneq (name, cp, namelen)) /* rule #2 */ + named = FALSE; /* use implicit tag name */ + } + } + + if (named) + name = savenstr (name, namelen); + else + name = NULL; + pfnote (name, is_func, linestart, linelen, lno, cno); +} + +/* Record a tag. */ +static void +pfnote (name, is_func, linestart, linelen, lno, cno) + char *name; /* tag name, or NULL if unnamed */ + bool is_func; /* tag is a function */ + char *linestart; /* start of the line where tag is */ + int linelen; /* length of the line where tag is */ + int lno; /* line number */ + long cno; /* character number */ +{ + register node *np; + + assert (name == NULL || name[0] != '\0'); + if (CTAGS && name == NULL) + return; + + np = xnew (1, node); /* If ctags mode, change name "main" to M. */ if (CTAGS && !cxref_style && streq (name, "main")) { - register char *fp = etags_strrchr (curfile, '/'); - np->name = concat ("M", fp == NULL ? curfile : fp + 1, ""); + register char *fp = etags_strrchr (curfdp->taggedfname, '/'); + np->name = concat ("M", fp == NULL ? curfdp->taggedfname : fp + 1, ""); fp = etags_strrchr (np->name, '.'); if (fp != NULL && fp[1] != '\0' && fp[2] == '\0') fp[0] = '\0'; } else np->name = name; + np->valid = TRUE; np->been_warned = FALSE; - np->file = curfile; + np->fdp = curfdp; np->is_func = is_func; np->lno = lno; - /* Our char numbers are 0-base, because of C language tradition? - ctags compatibility? old versions compatibility? I don't know. - Anyway, since emacs's are 1-base we expect etags.el to take care - of the difference. If we wanted to have 1-based numbers, we would - uncomment the +1 below. */ - np->cno = cno /* + 1 */ ; + if (np->fdp->usecharno) + /* Our char numbers are 0-base, because of C language tradition? + ctags compatibility? old versions compatibility? I don't know. + Anyway, since emacs's are 1-base we expect etags.el to take care + of the difference. If we wanted to have 1-based numbers, we would + uncomment the +1 below. */ + np->cno = cno /* + 1 */ ; + else + np->cno = invalidcharno; np->left = np->right = NULL; if (CTAGS && !cxref_style) { if (strlen (linestart) < 50) - np->pat = concat (linestart, "$", ""); + np->regex = concat (linestart, "$", ""); else - np->pat = savenstr (linestart, 50); + np->regex = savenstr (linestart, 50); } else - np->pat = savenstr (linestart, linelen); + np->regex = savenstr (linestart, linelen); - add_node (np, &head); -} - -/* - * TAGS format specification - * Idea by Sam Kendall (1997) - * - * pfnote should emit the optimized form [unnamed tag] only if: - * 1. name does not contain any of the characters " \t\r\n(),;"; - * 2. linestart contains name as either a rightmost, or rightmost but - * one character, substring; - * 3. the character, if any, immediately before name in linestart must - * be one of the characters " \t(),;"; - * 4. the character, if any, immediately after name in linestart must - * also be one of the characters " \t(),;". - * - * The real implementation uses the notinname() macro, which recognises - * characters slightly different form " \t\r\n(),;". See the variable - * `nonam'. - */ -#define traditional_tag_style TRUE -static void -new_pfnote (name, namelen, is_func, linestart, linelen, lno, cno) - char *name; /* tag name, or NULL if unnamed */ - int namelen; /* tag length */ - bool is_func; /* tag is a function */ - char *linestart; /* start of the line where tag is */ - int linelen; /* length of the line where tag is */ - int lno; /* line number */ - long cno; /* character number */ -{ - register char *cp; - bool named; - - named = TRUE; - if (!CTAGS) - { - for (cp = name; !notinname (*cp); cp++) - continue; - if (*cp == '\0') /* rule #1 */ - { - cp = linestart + linelen - namelen; - if (notinname (linestart[linelen-1])) - cp -= 1; /* rule #4 */ - if (cp >= linestart /* rule #2 */ - && (cp == linestart - || notinname (cp[-1])) /* rule #3 */ - && strneq (name, cp, namelen)) /* rule #2 */ - named = FALSE; /* use unnamed tag */ - } - } - - if (named) - name = savenstr (name, namelen); - else - name = NULL; - pfnote (name, is_func, linestart, linelen, lno, cno); + add_node (np, &nodehead); } /* @@ -1740,17 +2165,33 @@ free_tree (np) free_tree (np->left); if (np->name != NULL) free (np->name); - free (np->pat); + free (np->regex); free (np); np = node_right; } } /* + * free_fdesc () + * delete a file description + */ +static void +free_fdesc (fdp) + register fdesc *fdp; +{ + if (fdp->infname != NULL) free (fdp->infname); + if (fdp->infabsname != NULL) free (fdp->infabsname); + if (fdp->infabsdir != NULL) free (fdp->infabsdir); + if (fdp->taggedfname != NULL) free (fdp->taggedfname); + if (fdp->prop != NULL) free (fdp->prop); + free (fdp); +} + +/* * add_node () - * Adds a node to the tree of nodes. In etags mode, we don't keep - * it sorted; we just keep a linear list. In ctags mode, maintain - * an ordered tree, with no attempt at balancing. + * Adds a node to the tree of nodes. In etags mode, sort by file + * name. In ctags mode, sort by tag name. Make no attempt at + * balancing. * * add_node is the only function allowed to add nodes, so it can * maintain state. @@ -1770,13 +2211,31 @@ add_node (np, cur_node_p) } if (!CTAGS) + /* Etags Mode */ { - /* Etags Mode */ - if (last_node == NULL) - fatal ("internal error in add_node", (char *)NULL); - last_node->right = np; - last_node = np; - } + /* For each file name, tags are in a linked sublist on the right + pointer. The first tags of different files are a linked list + on the left pointer. last_node points to the end of the last + used sublist. */ + if (last_node != NULL && last_node->fdp == np->fdp) + { + /* Let's use the same sublist as the last added node. */ + assert (last_node->right == NULL); + last_node->right = np; + last_node = np; + } + else if (cur_node->fdp == np->fdp) + { + /* Scanning the list we found the head of a sublist which is + good for us. Let's scan this sublist. */ + add_node (np, &cur_node->right); + } + else + /* The head of this sublist is not good for us. Let's try the + next one. */ + add_node (np, &cur_node->left); + } /* if ETAGS mode */ + else { /* Ctags Mode */ @@ -1786,14 +2245,14 @@ add_node (np, cur_node_p) * If this tag name matches an existing one, then * do not add the node, but maybe print a warning. */ - if (!dif) + if (no_duplicates && !dif) { - if (streq (np->file, cur_node->file)) + if (np->fdp == cur_node->fdp) { if (!no_warnings) { fprintf (stderr, "Duplicate entry in file %s, line %d: %s\n", - np->file, lineno, np->name); + np->fdp->infname, lineno, np->name); fprintf (stderr, "Second entry ignored\n"); } } @@ -1802,7 +2261,7 @@ add_node (np, cur_node_p) fprintf (stderr, "Duplicate entry in files %s and %s: %s (Warning only)\n", - np->file, cur_node->file, np->name); + np->fdp->infname, cur_node->fdp->infname, np->name); cur_node->been_warned = TRUE; } return; @@ -1810,77 +2269,53 @@ add_node (np, cur_node_p) /* Actually add the node */ add_node (np, dif < 0 ? &cur_node->left : &cur_node->right); - } + } /* if CTAGS mode */ } - +/* + * invalidate_nodes () + * Scan the node tree and invalidate all nodes pointing to the + * given file description (CTAGS case) or free them (ETAGS case). + */ static void -put_entries (np) - register node *np; +invalidate_nodes (badfdp, npp) + fdesc *badfdp; + node **npp; { - register char *sp; + node *np = *npp; if (np == NULL) return; - /* Output subentries that precede this one */ - put_entries (np->left); - - /* Output this entry */ - - if (!CTAGS) + if (CTAGS) { - if (np->name != NULL) - fprintf (tagf, "%s\177%s\001%d,%ld\n", - np->pat, np->name, np->lno, np->cno); - else - fprintf (tagf, "%s\177%d,%ld\n", - np->pat, np->lno, np->cno); + if (np->left != NULL) + invalidate_nodes (badfdp, &np->left); + if (np->fdp == badfdp) + np->valid = FALSE; + if (np->right != NULL) + invalidate_nodes (badfdp, &np->right); } else { - if (np->name == NULL) - error ("internal error: NULL name in ctags mode.", (char *)NULL); - - if (cxref_style) + assert (np->fdp != NULL); + if (np->fdp == badfdp) { - if (vgrind_style) - fprintf (stdout, "%s %s %d\n", - np->name, np->file, (np->lno + 63) / 64); - else - fprintf (stdout, "%-16s %3d %-16s %s\n", - np->name, np->lno, np->file, np->pat); + *npp = np->left; /* detach the sublist from the list */ + np->left = NULL; /* isolate it */ + free_tree (np); /* free it */ + invalidate_nodes (badfdp, npp); } else - { - fprintf (tagf, "%s\t%s\t", np->name, np->file); - - if (np->is_func) - { /* a function */ - putc (searchar, tagf); - putc ('^', tagf); - - for (sp = np->pat; *sp; sp++) - { - if (*sp == '\\' || *sp == searchar) - putc ('\\', tagf); - putc (*sp, tagf); - } - putc (searchar, tagf); - } - else - { /* a typedef; text pattern inadequate */ - fprintf (tagf, "%d", np->lno); - } - putc ('\n', tagf); - } + invalidate_nodes (badfdp, &np->left); } - - /* Output subentries that follow this one */ - put_entries (np->right); } -/* Length of a number's decimal representation. */ + +static int total_size_of_entries __P((node *)); +static int number_len __P((long)); + +/* Length of a non-negative number's decimal representation. */ static int number_len (num) long num; @@ -1893,33 +2328,115 @@ number_len (num) /* * Return total number of characters that put_entries will output for - * the nodes in the subtree of the specified node. Works only if - * we are not ctags, but called only in that case. This count - * is irrelevant with the new tags.el, but is still supplied for - * backward compatibility. + * the nodes in the linked list at the right of the specified node. + * This count is irrelevant with etags.el since emacs 19.34 at least, + * but is still supplied for backward compatibility. */ static int total_size_of_entries (np) register node *np; { - register int total; + register int total = 0; + + for (; np != NULL; np = np->right) + if (np->valid) + { + total += strlen (np->regex) + 1; /* pat\177 */ + if (np->name != NULL) + total += strlen (np->name) + 1; /* name\001 */ + total += number_len ((long) np->lno) + 1; /* lno, */ + if (np->cno != invalidcharno) /* cno */ + total += number_len (np->cno); + total += 1; /* newline */ + } + + return total; +} + +static void +put_entries (np) + register node *np; +{ + register char *sp; + static fdesc *fdp = NULL; if (np == NULL) - return 0; + return; + + /* Output subentries that precede this one */ + if (CTAGS) + put_entries (np->left); - for (total = 0; np != NULL; np = np->right) + /* Output this entry */ + if (np->valid) { - /* Count left subentries. */ - total += total_size_of_entries (np->left); + if (!CTAGS) + { + /* Etags mode */ + if (fdp != np->fdp) + { + fdp = np->fdp; + fprintf (tagf, "\f\n%s,%d\n", + fdp->taggedfname, total_size_of_entries (np)); + fdp->written = TRUE; + } + fputs (np->regex, tagf); + fputc ('\177', tagf); + if (np->name != NULL) + { + fputs (np->name, tagf); + fputc ('\001', tagf); + } + fprintf (tagf, "%d,", np->lno); + if (np->cno != invalidcharno) + fprintf (tagf, "%ld", np->cno); + fputs ("\n", tagf); + } + else + { + /* Ctags mode */ + if (np->name == NULL) + error ("internal error: NULL name in ctags mode.", (char *)NULL); - /* Count this entry */ - total += strlen (np->pat) + 1; - total += number_len ((long) np->lno) + 1 + number_len (np->cno) + 1; - if (np->name != NULL) - total += 1 + strlen (np->name); /* \001name */ - } + if (cxref_style) + { + if (vgrind_style) + fprintf (stdout, "%s %s %d\n", + np->name, np->fdp->taggedfname, (np->lno + 63) / 64); + else + fprintf (stdout, "%-16s %3d %-16s %s\n", + np->name, np->lno, np->fdp->taggedfname, np->regex); + } + else + { + fprintf (tagf, "%s\t%s\t", np->name, np->fdp->taggedfname); - return total; + if (np->is_func) + { /* function or #define macro with args */ + putc (searchar, tagf); + putc ('^', tagf); + + for (sp = np->regex; *sp; sp++) + { + if (*sp == '\\' || *sp == searchar) + putc ('\\', tagf); + putc (*sp, tagf); + } + putc (searchar, tagf); + } + else + { /* anything else; text pattern inadequate */ + fprintf (tagf, "%d", np->lno); + } + putc ('\n', tagf); + } + } + } /* if this node contains a valid tag */ + + /* Output subentries that follow this one */ + put_entries (np->right); + if (!CTAGS) + put_entries (np->left); } @@ -1940,91 +2457,80 @@ enum sym_type st_none, st_C_objprot, st_C_objimpl, st_C_objend, st_C_gnumacro, - st_C_ignore, + st_C_ignore, st_C_attribute, st_C_javastruct, st_C_operator, - st_C_class, - st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef, st_C_typespec + st_C_class, st_C_template, + st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef }; -static unsigned int hash P_((const char *, unsigned int)); -static struct C_stab_entry * in_word_set P_((const char *, unsigned int)); -static enum sym_type C_symtype P_((char *, int, int)); +static unsigned int hash __P((const char *, unsigned int)); +static struct C_stab_entry * in_word_set __P((const char *, unsigned int)); +static enum sym_type C_symtype __P((char *, int, int)); /* Feed stuff between (but not including) %[ and %] lines to: - gperf -c -k 1,3 -o -p -r -t - then put a `static' keyword in front of the in_word_set function. + gperf -m 5 %[ +%compare-strncmp +%enum +%struct-type struct C_stab_entry { char *name; int c_ext; enum sym_type type; } %% -if, 0, st_C_ignore -for, 0, st_C_ignore -while, 0, st_C_ignore -switch, 0, st_C_ignore -return, 0, st_C_ignore -@interface, 0, st_C_objprot -@protocol, 0, st_C_objprot -@implementation,0, st_C_objimpl -@end, 0, st_C_objend -import, C_JAVA, st_C_ignore -package, C_JAVA, st_C_ignore -friend, C_PLPL, st_C_ignore -extends, C_JAVA, st_C_javastruct -implements, C_JAVA, st_C_javastruct -interface, C_JAVA, st_C_struct -class, 0, st_C_class -namespace, C_PLPL, st_C_struct -domain, C_STAR, st_C_struct -union, 0, st_C_struct -struct, 0, st_C_struct -extern, 0, st_C_extern -enum, 0, st_C_enum -typedef, 0, st_C_typedef -define, 0, st_C_define -operator, C_PLPL, st_C_operator -bool, C_PLPL, st_C_typespec -long, 0, st_C_typespec -short, 0, st_C_typespec -int, 0, st_C_typespec -char, 0, st_C_typespec -float, 0, st_C_typespec -double, 0, st_C_typespec -signed, 0, st_C_typespec -unsigned, 0, st_C_typespec -auto, 0, st_C_typespec -void, 0, st_C_typespec -static, 0, st_C_typespec -const, 0, st_C_typespec -volatile, 0, st_C_typespec -explicit, C_PLPL, st_C_typespec -mutable, C_PLPL, st_C_typespec -typename, C_PLPL, st_C_typespec +if, 0, st_C_ignore +for, 0, st_C_ignore +while, 0, st_C_ignore +switch, 0, st_C_ignore +return, 0, st_C_ignore +__attribute__, 0, st_C_attribute +@interface, 0, st_C_objprot +@protocol, 0, st_C_objprot +@implementation,0, st_C_objimpl +@end, 0, st_C_objend +import, (C_JAVA & ~C_PLPL), st_C_ignore +package, (C_JAVA & ~C_PLPL), st_C_ignore +friend, C_PLPL, st_C_ignore +extends, (C_JAVA & ~C_PLPL), st_C_javastruct +implements, (C_JAVA & ~C_PLPL), st_C_javastruct +interface, (C_JAVA & ~C_PLPL), st_C_struct +class, 0, st_C_class +namespace, C_PLPL, st_C_struct +domain, C_STAR, st_C_struct +union, 0, st_C_struct +struct, 0, st_C_struct +extern, 0, st_C_extern +enum, 0, st_C_enum +typedef, 0, st_C_typedef +define, 0, st_C_define +undef, 0, st_C_define +operator, C_PLPL, st_C_operator +template, 0, st_C_template # DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach). -DEFUN, 0, st_C_gnumacro -SYSCALL, 0, st_C_gnumacro -ENTRY, 0, st_C_gnumacro -PSEUDO, 0, st_C_gnumacro +DEFUN, 0, st_C_gnumacro +SYSCALL, 0, st_C_gnumacro +ENTRY, 0, st_C_gnumacro +PSEUDO, 0, st_C_gnumacro # These are defined inside C functions, so currently they are not met. # EXFUN used in glibc, DEFVAR_* in emacs. -#EXFUN, 0, st_C_gnumacro -#DEFVAR_, 0, st_C_gnumacro +#EXFUN, 0, st_C_gnumacro +#DEFVAR_, 0, st_C_gnumacro %] -and replace lines between %< and %> with its output, -then make in_word_set static. */ +and replace lines between %< and %> with its output, then: + - remove the #if characterset check + - make in_word_set static and not inline. */ /*%<*/ -/* C code produced by gperf version 2.7.1 (19981006 egcs) */ -/* Command-line: gperf -c -k 1,3 -o -p -r -t */ -struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; +/* C code produced by gperf version 3.0.1 */ +/* Command-line: gperf -m 5 */ +/* Computed positions: -k'2-3' */ -#define TOTAL_KEYWORDS 46 -#define MIN_WORD_LENGTH 2 -#define MAX_WORD_LENGTH 15 -#define MIN_HASH_VALUE 13 -#define MAX_HASH_VALUE 121 -/* maximum key range = 109, duplicates = 0 */ +struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; +/* maximum key range = 33, duplicates = 0 */ #ifdef __GNUC__ __inline +#else +#ifdef __cplusplus +inline +#endif #endif static unsigned int hash (str, len) @@ -2033,130 +2539,97 @@ hash (str, len) { static unsigned char asso_values[] = { - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 57, 122, 122, 122, 55, 6, - 60, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 51, 122, 122, 10, 2, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 2, 52, 59, - 49, 38, 56, 41, 122, 22, 122, 122, 9, 32, - 33, 60, 26, 122, 1, 28, 46, 59, 44, 51, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122 + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 15, + 14, 35, 35, 35, 35, 35, 35, 35, 14, 35, + 35, 35, 35, 12, 13, 35, 35, 35, 35, 12, + 35, 35, 35, 35, 35, 1, 35, 16, 35, 6, + 23, 0, 0, 35, 22, 0, 35, 35, 5, 0, + 0, 15, 1, 35, 6, 35, 8, 19, 35, 16, + 4, 5, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35 }; register int hval = len; switch (hval) { default: - case 3: hval += asso_values[(unsigned char)str[2]]; + /*FALLTHROUGH*/ case 2: - case 1: - hval += asso_values[(unsigned char)str[0]]; + hval += asso_values[(unsigned char)str[1]]; break; } return hval; } -#ifdef __GNUC__ -__inline -#endif static struct C_stab_entry * in_word_set (str, len) register const char *str; register unsigned int len; { + enum + { + TOTAL_KEYWORDS = 32, + MIN_WORD_LENGTH = 2, + MAX_WORD_LENGTH = 15, + MIN_HASH_VALUE = 2, + MAX_HASH_VALUE = 34 + }; + static struct C_stab_entry wordlist[] = { - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"ENTRY", 0, st_C_gnumacro}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"if", 0, st_C_ignore}, {""}, {""}, - {"SYSCALL", 0, st_C_gnumacro}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"struct", 0, st_C_struct}, - {"static", 0, st_C_typespec}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"long", 0, st_C_typespec}, - {""}, {""}, {""}, {""}, {""}, - {"auto", 0, st_C_typespec}, - {"return", 0, st_C_ignore}, - {"import", C_JAVA, st_C_ignore}, - {""}, - {"switch", 0, st_C_ignore}, - {""}, - {"implements", C_JAVA, st_C_javastruct}, - {""}, - {"for", 0, st_C_ignore}, - {"volatile", 0, st_C_typespec}, - {""}, - {"PSEUDO", 0, st_C_gnumacro}, + {"if", 0, st_C_ignore}, {""}, - {"char", 0, st_C_typespec}, - {"class", 0, st_C_class}, - {"@protocol", 0, st_C_objprot}, - {""}, {""}, - {"void", 0, st_C_typespec}, - {"int", 0, st_C_typespec}, - {"explicit", C_PLPL, st_C_typespec}, - {""}, - {"namespace", C_PLPL, st_C_struct}, - {"signed", 0, st_C_typespec}, - {""}, - {"interface", C_JAVA, st_C_struct}, - {"while", 0, st_C_ignore}, - {"typedef", 0, st_C_typedef}, - {"typename", C_PLPL, st_C_typespec}, - {""}, {""}, {""}, - {"friend", C_PLPL, st_C_ignore}, - {"mutable", C_PLPL, st_C_typespec}, - {"union", 0, st_C_struct}, - {"domain", C_STAR, st_C_struct}, - {""}, {""}, - {"extern", 0, st_C_extern}, - {"extends", C_JAVA, st_C_javastruct}, - {"package", C_JAVA, st_C_ignore}, - {"short", 0, st_C_typespec}, - {"@end", 0, st_C_objend}, - {"unsigned", 0, st_C_typespec}, - {""}, - {"const", 0, st_C_typespec}, - {""}, {""}, - {"@interface", 0, st_C_objprot}, - {"enum", 0, st_C_enum}, - {""}, {""}, - {"@implementation",0, st_C_objimpl}, - {""}, - {"operator", C_PLPL, st_C_operator}, - {""}, {""}, {""}, {""}, - {"define", 0, st_C_define}, - {""}, {""}, - {"double", 0, st_C_typespec}, - {""}, - {"bool", C_PLPL, st_C_typespec}, - {""}, {""}, {""}, - {"DEFUN", 0, st_C_gnumacro}, - {"float", 0, st_C_typespec} + {"@end", 0, st_C_objend}, + {"union", 0, st_C_struct}, + {"define", 0, st_C_define}, + {"import", (C_JAVA & ~C_PLPL), st_C_ignore}, + {"template", 0, st_C_template}, + {"operator", C_PLPL, st_C_operator}, + {"@interface", 0, st_C_objprot}, + {"implements", (C_JAVA & ~C_PLPL), st_C_javastruct}, + {"friend", C_PLPL, st_C_ignore}, + {"typedef", 0, st_C_typedef}, + {"return", 0, st_C_ignore}, + {"@implementation",0, st_C_objimpl}, + {"@protocol", 0, st_C_objprot}, + {"interface", (C_JAVA & ~C_PLPL), st_C_struct}, + {"extern", 0, st_C_extern}, + {"extends", (C_JAVA & ~C_PLPL), st_C_javastruct}, + {"struct", 0, st_C_struct}, + {"domain", C_STAR, st_C_struct}, + {"switch", 0, st_C_ignore}, + {"enum", 0, st_C_enum}, + {"for", 0, st_C_ignore}, + {"namespace", C_PLPL, st_C_struct}, + {"class", 0, st_C_class}, + {"while", 0, st_C_ignore}, + {"undef", 0, st_C_define}, + {"package", (C_JAVA & ~C_PLPL), st_C_ignore}, + {"__attribute__", 0, st_C_attribute}, + {"SYSCALL", 0, st_C_gnumacro}, + {"ENTRY", 0, st_C_gnumacro}, + {"PSEUDO", 0, st_C_gnumacro}, + {"DEFUN", 0, st_C_gnumacro} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -2167,7 +2640,7 @@ in_word_set (str, len) { register const char *s = wordlist[key].name; - if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') return &wordlist[key]; } } @@ -2190,10 +2663,15 @@ C_symtype (str, len, c_ext) /* + * Ignoring __attribute__ ((list)) + */ +static bool inattribute; /* looking at an __attribute__ construct */ + +/* * C functions and variables are recognized using a simple * finite automaton. fvdef is its state variable. */ -enum +static enum { fvnone, /* nothing seen */ fdefunkey, /* Emacs DEFUN keyword seen */ @@ -2207,13 +2685,13 @@ enum vignore /* var-like: ignore until ';' */ } fvdef; -bool fvextern; /* func or var: extern keyword seen; */ +static bool fvextern; /* func or var: extern keyword seen; */ /* * typedefs are recognized using a simple finite automaton. * typdef is its state variable. */ -enum +static enum { tnone, /* nothing seen */ tkeyseen, /* typedef keyword seen */ @@ -2228,25 +2706,24 @@ enum * using another simple finite automaton. `structdef' is its state * variable. */ -enum +static enum { snone, /* nothing seen yet, - or in struct body if cblev > 0 */ + or in struct body if bracelev > 0 */ skeyseen, /* struct-like keyword seen */ stagseen, /* struct-like tag seen */ - sintemplate, /* inside template (ignore) */ scolonseen /* colon seen after struct-like tag */ } structdef; /* * When objdef is different from onone, objtag is the name of the class. */ -char *objtag = ""; +static char *objtag = ""; /* * Yet another little state machine to deal with preprocessor lines. */ -enum +static enum { dnone, /* nothing seen */ dsharpseen, /* '#' seen as first char on line */ @@ -2258,7 +2735,7 @@ enum * State machine for Objective C protocols and implementations. * Idea by Tom R.Hageman (1995) */ -enum +static enum { onone, /* nothing seen */ oprotocol, /* @interface or @protocol seen */ @@ -2279,68 +2756,75 @@ enum * Use this structure to keep info about the token read, and how it * should be tagged. Used by the make_C_tag function to build a tag. */ -struct tok +static struct tok { - bool valid; - bool named; - int offset; - int length; - int lineno; - long linepos; - char *line; + char *line; /* string containing the token */ + int offset; /* where the token starts in LINE */ + int length; /* token length */ + /* + The previous members can be used to pass strings around for generic + purposes. The following ones specifically refer to creating tags. In this + case the token contained here is the pattern that will be used to create a + tag. + */ + bool valid; /* do not create a tag; the token should be + invalidated whenever a state machine is + reset prematurely */ + bool named; /* create a named tag */ + int lineno; /* source line number of tag */ + long linepos; /* source char number of tag */ } token; /* latest token read */ -linebuffer token_name; /* its name */ /* * Variables and functions for dealing with nested structures. * Idea by Mykola Dzyuba (2001) */ -static void pushclass_above P_((int, char *, int)); -static void popclass_above P_((int)); -static void write_classname P_((linebuffer *, char *qualifier)); +static void pushclass_above __P((int, char *, int)); +static void popclass_above __P((int)); +static void write_classname __P((linebuffer *, char *qualifier)); -struct { +static struct { char **cname; /* nested class names */ - int *cblev; /* nested class curly brace level */ + int *bracelev; /* nested class brace level */ int nl; /* class nesting level (elements used) */ int size; /* length of the array */ } cstack; /* stack for nested declaration tags */ /* Current struct nesting depth (namespace, class, struct, union, enum). */ #define nestlev (cstack.nl) -/* After struct keyword or in struct body, not inside an nested function. */ +/* After struct keyword or in struct body, not inside a nested function. */ #define instruct (structdef == snone && nestlev > 0 \ - && cblev == cstack.cblev[nestlev-1] + 1) + && bracelev == cstack.bracelev[nestlev-1] + 1) static void -pushclass_above (cblev, str, len) - int cblev; +pushclass_above (bracelev, str, len) + int bracelev; char *str; int len; { int nl; - popclass_above (cblev); + popclass_above (bracelev); nl = cstack.nl; if (nl >= cstack.size) { int size = cstack.size *= 2; xrnew (cstack.cname, size, char *); - xrnew (cstack.cblev, size, int); + xrnew (cstack.bracelev, size, int); } - assert (nl == 0 || cstack.cblev[nl-1] < cblev); + assert (nl == 0 || cstack.bracelev[nl-1] < bracelev); cstack.cname[nl] = (str == NULL) ? NULL : savenstr (str, len); - cstack.cblev[nl] = cblev; + cstack.bracelev[nl] = bracelev; cstack.nl = nl + 1; } static void -popclass_above (cblev) - int cblev; +popclass_above (bracelev) + int bracelev; { int nl; for (nl = cstack.nl - 1; - nl >= 0 && cstack.cblev[nl] >= cblev; + nl >= 0 && cstack.bracelev[nl] >= bracelev; nl--) { if (cstack.cname[nl] != NULL) @@ -2386,8 +2870,8 @@ write_classname (cn, qualifier) } -static bool consider_token P_((char *, int, int, int *, int, int, bool *)); -static void make_C_tag P_((bool)); +static bool consider_token __P((char *, int, int, int *, int, int, bool *)); +static void make_C_tag __P((bool)); /* * consider_token () @@ -2407,265 +2891,295 @@ static void make_C_tag P_((bool)); */ static bool -consider_token (str, len, c, c_extp, cblev, parlev, is_func_or_var) +consider_token (str, len, c, c_extp, bracelev, parlev, is_func_or_var) register char *str; /* IN: token pointer */ register int len; /* IN: token length */ register int c; /* IN: first char after the token */ int *c_extp; /* IN, OUT: C extensions mask */ - int cblev; /* IN: curly brace level */ + int bracelev; /* IN: brace level */ int parlev; /* IN: parenthesis level */ bool *is_func_or_var; /* OUT: function or variable found */ { - /* When structdef is stagseen, scolonseen, or snone with cblev > 0, + /* When structdef is stagseen, scolonseen, or snone with bracelev > 0, structtype is the type of the preceding struct-like keyword, and - structcblev is the curly brace level where it has been seen. */ + structbracelev is the brace level where it has been seen. */ static enum sym_type structtype; - static int structcblev; + static int structbracelev; static enum sym_type toktype; toktype = C_symtype (str, len, *c_extp); /* - * Advance the definedef state machine. + * Skip __attribute__ */ - switch (definedef) + if (toktype == st_C_attribute) { - case dnone: - /* We're not on a preprocessor line. */ - if (toktype == st_C_gnumacro) - { - fvdef = fdefunkey; - return FALSE; - } - break; - case dsharpseen: - if (toktype == st_C_define) - { - definedef = ddefineseen; - } - else - { - definedef = dignorerest; - } - return FALSE; - case ddefineseen: - /* - * Make a tag for any macro, unless it is a constant - * and constantypedefs is FALSE. - */ - definedef = dignorerest; - *is_func_or_var = (c == '('); - if (!*is_func_or_var && !constantypedefs) - return FALSE; - else - return TRUE; - case dignorerest: + inattribute = TRUE; return FALSE; - default: - error ("internal error: definedef value.", (char *)NULL); - } - - /* - * Now typedefs - */ - switch (typdef) - { - case tnone: - if (toktype == st_C_typedef) - { - if (typedefs) - typdef = tkeyseen; - fvextern = FALSE; - fvdef = fvnone; - return FALSE; - } - break; - case tkeyseen: - switch (toktype) - { - case st_none: - case st_C_typespec: - case st_C_class: - case st_C_struct: - case st_C_enum: - typdef = ttypeseen; - break; - } - break; - case ttypeseen: - if (structdef == snone && fvdef == fvnone) - { - fvdef = fvnameseen; - return TRUE; - } - break; - case tend: - switch (toktype) - { - case st_C_typespec: - case st_C_class: - case st_C_struct: - case st_C_enum: - return FALSE; - } - return TRUE; - } - - /* - * This structdef business is NOT invoked when we are ctags and the - * file is plain C. This is because a struct tag may have the same - * name as another tag, and this loses with ctags. - */ - switch (toktype) - { - case st_C_javastruct: - if (structdef == stagseen) - structdef = scolonseen; - return FALSE; - case st_C_class: - if (cblev == 0 - && (*c_extp & C_AUTO) /* automatic detection of C++ language */ - && definedef == dnone && structdef == snone - && typdef == tnone && fvdef == fvnone) - *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; - /* FALLTHRU */ - case st_C_struct: - case st_C_enum: - if (parlev == 0 - && fvdef != vignore - && (typdef == tkeyseen - || (typedefs_or_cplusplus && structdef == snone))) - { - structdef = skeyseen; - structtype = toktype; - structcblev = cblev; - } - return FALSE; - } - - if (structdef == skeyseen) - { - structdef = stagseen; - return TRUE; - } - - if (typdef != tnone) - definedef = dnone; - - /* Detect Objective C constructs. */ - switch (objdef) - { - case onone: - switch (toktype) - { - case st_C_objprot: - objdef = oprotocol; - return FALSE; - case st_C_objimpl: - objdef = oimplementation; - return FALSE; - } - break; - case oimplementation: - /* Save the class tag for functions or variables defined inside. */ - objtag = savenstr (str, len); - objdef = oinbody; - return FALSE; - case oprotocol: - /* Save the class tag for categories. */ - objtag = savenstr (str, len); - objdef = otagseen; - *is_func_or_var = TRUE; - return TRUE; - case oparenseen: - objdef = ocatseen; - *is_func_or_var = TRUE; - return TRUE; - case oinbody: - break; - case omethodsign: - if (parlev == 0) - { - objdef = omethodtag; - linebuffer_setlen (&token_name, len); - strncpy (token_name.buffer, str, len); - token_name.buffer[len] = '\0'; - return TRUE; - } - return FALSE; - case omethodcolon: - if (parlev == 0) - objdef = omethodparm; - return FALSE; - case omethodparm: - if (parlev == 0) - { - objdef = omethodtag; - linebuffer_setlen (&token_name, token_name.len + len); - strncat (token_name.buffer, str, len); - return TRUE; - } - return FALSE; - case oignore: - if (toktype == st_C_objend) - { - /* Memory leakage here: the string pointed by objtag is - never released, because many tests would be needed to - avoid breaking on incorrect input code. The amount of - memory leaked here is the sum of the lengths of the - class tags. - free (objtag); */ - objdef = onone; - } - return FALSE; - } - - /* A function, variable or enum constant? */ - switch (toktype) - { - case st_C_extern: - fvextern = TRUE; - /* FALLTHRU */ - case st_C_typespec: - if (fvdef != finlist && fvdef != fignore && fvdef != vignore) - fvdef = fvnone; /* should be useless */ - return FALSE; - case st_C_ignore: - fvextern = FALSE; - fvdef = vignore; - return FALSE; - case st_C_operator: - fvdef = foperator; - *is_func_or_var = TRUE; - return TRUE; - case st_none: - if (constantypedefs - && structdef == snone - && structtype == st_C_enum && cblev > structcblev) - return TRUE; /* enum constant */ - switch (fvdef) - { - case fdefunkey: - if (cblev > 0) - break; - fvdef = fdefunname; /* GNU macro */ - *is_func_or_var = TRUE; - return TRUE; - case fvnone: - if ((strneq (str, "asm", 3) && endtoken (str[3])) - || (strneq (str, "__asm__", 7) && endtoken (str[7]))) - { - fvdef = vignore; - return FALSE; - } - if ((*c_extp & C_PLPL) && strneq (str+len-10, "::operator", 10)) + } + + /* + * Advance the definedef state machine. + */ + switch (definedef) + { + case dnone: + /* We're not on a preprocessor line. */ + if (toktype == st_C_gnumacro) + { + fvdef = fdefunkey; + return FALSE; + } + break; + case dsharpseen: + if (toktype == st_C_define) + { + definedef = ddefineseen; + } + else + { + definedef = dignorerest; + } + return FALSE; + case ddefineseen: + /* + * Make a tag for any macro, unless it is a constant + * and constantypedefs is FALSE. + */ + definedef = dignorerest; + *is_func_or_var = (c == '('); + if (!*is_func_or_var && !constantypedefs) + return FALSE; + else + return TRUE; + case dignorerest: + return FALSE; + default: + error ("internal error: definedef value.", (char *)NULL); + } + + /* + * Now typedefs + */ + switch (typdef) + { + case tnone: + if (toktype == st_C_typedef) + { + if (typedefs) + typdef = tkeyseen; + fvextern = FALSE; + fvdef = fvnone; + return FALSE; + } + break; + case tkeyseen: + switch (toktype) + { + case st_none: + case st_C_class: + case st_C_struct: + case st_C_enum: + typdef = ttypeseen; + } + break; + case ttypeseen: + if (structdef == snone && fvdef == fvnone) + { + fvdef = fvnameseen; + return TRUE; + } + break; + case tend: + switch (toktype) + { + case st_C_class: + case st_C_struct: + case st_C_enum: + return FALSE; + } + return TRUE; + } + + /* + * This structdef business is NOT invoked when we are ctags and the + * file is plain C. This is because a struct tag may have the same + * name as another tag, and this loses with ctags. + */ + switch (toktype) + { + case st_C_javastruct: + if (structdef == stagseen) + structdef = scolonseen; + return FALSE; + case st_C_template: + case st_C_class: + if ((*c_extp & C_AUTO) /* automatic detection of C++ language */ + && bracelev == 0 + && definedef == dnone && structdef == snone + && typdef == tnone && fvdef == fvnone) + *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; + if (toktype == st_C_template) + break; + /* FALLTHRU */ + case st_C_struct: + case st_C_enum: + if (parlev == 0 + && fvdef != vignore + && (typdef == tkeyseen + || (typedefs_or_cplusplus && structdef == snone))) + { + structdef = skeyseen; + structtype = toktype; + structbracelev = bracelev; + if (fvdef == fvnameseen) + fvdef = fvnone; + } + return FALSE; + } + + if (structdef == skeyseen) + { + structdef = stagseen; + return TRUE; + } + + if (typdef != tnone) + definedef = dnone; + + /* Detect Objective C constructs. */ + switch (objdef) + { + case onone: + switch (toktype) + { + case st_C_objprot: + objdef = oprotocol; + return FALSE; + case st_C_objimpl: + objdef = oimplementation; + return FALSE; + } + break; + case oimplementation: + /* Save the class tag for functions or variables defined inside. */ + objtag = savenstr (str, len); + objdef = oinbody; + return FALSE; + case oprotocol: + /* Save the class tag for categories. */ + objtag = savenstr (str, len); + objdef = otagseen; + *is_func_or_var = TRUE; + return TRUE; + case oparenseen: + objdef = ocatseen; + *is_func_or_var = TRUE; + return TRUE; + case oinbody: + break; + case omethodsign: + if (parlev == 0) + { + fvdef = fvnone; + objdef = omethodtag; + linebuffer_setlen (&token_name, len); + strncpy (token_name.buffer, str, len); + token_name.buffer[len] = '\0'; + return TRUE; + } + return FALSE; + case omethodcolon: + if (parlev == 0) + objdef = omethodparm; + return FALSE; + case omethodparm: + if (parlev == 0) + { + fvdef = fvnone; + objdef = omethodtag; + linebuffer_setlen (&token_name, token_name.len + len); + strncat (token_name.buffer, str, len); + return TRUE; + } + return FALSE; + case oignore: + if (toktype == st_C_objend) + { + /* Memory leakage here: the string pointed by objtag is + never released, because many tests would be needed to + avoid breaking on incorrect input code. The amount of + memory leaked here is the sum of the lengths of the + class tags. + free (objtag); */ + objdef = onone; + } + return FALSE; + } + + /* A function, variable or enum constant? */ + switch (toktype) + { + case st_C_extern: + fvextern = TRUE; + switch (fvdef) + { + case finlist: + case flistseen: + case fignore: + case vignore: + break; + default: + fvdef = fvnone; + } + return FALSE; + case st_C_ignore: + fvextern = FALSE; + fvdef = vignore; + return FALSE; + case st_C_operator: + fvdef = foperator; + *is_func_or_var = TRUE; + return TRUE; + case st_none: + if (constantypedefs + && structdef == snone + && structtype == st_C_enum && bracelev > structbracelev) + return TRUE; /* enum constant */ + switch (fvdef) + { + case fdefunkey: + if (bracelev > 0) + break; + fvdef = fdefunname; /* GNU macro */ + *is_func_or_var = TRUE; + return TRUE; + case fvnone: + switch (typdef) + { + case ttypeseen: + return FALSE; + case tnone: + if ((strneq (str, "asm", 3) && endtoken (str[3])) + || (strneq (str, "__asm__", 7) && endtoken (str[7]))) + { + fvdef = vignore; + return FALSE; + } + break; + } + /* FALLTHRU */ + case fvnameseen: + if (len >= 10 && strneq (str+len-10, "::operator", 10)) { + if (*c_extp & C_AUTO) /* automatic detection of C++ */ + *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; fvdef = foperator; *is_func_or_var = TRUE; return TRUE; } - if (cblev > 0 && !instruct) + if (bracelev > 0 && !instruct) break; fvdef = fvnameseen; /* function or variable */ *is_func_or_var = TRUE; @@ -2683,7 +3197,7 @@ consider_token (str, len, c, c_extp, cblev, parlev, is_func_or_var) * the line currently read. By keeping two line buffers, and switching * them at end of line, it is possible to use those pointers. */ -struct +static struct { long linepos; linebuffer lb; @@ -2697,12 +3211,14 @@ struct #define curlinepos (lbs[curndx].linepos) #define newlinepos (lbs[newndx].linepos) +#define plainc ((c_ext & C_EXT) == C_PLAIN) +#define cplpl (c_ext & C_PLPL) +#define cjava ((c_ext & C_JAVA) == C_JAVA) + #define CNL_SAVE_DEFINEDEF() \ do { \ curlinepos = charno; \ - lineno++; \ - linecharno = charno; \ - charno += readline (&curlb, inf); \ + readline (&curlb, inf); \ lp = curlb.buffer; \ quotednl = FALSE; \ newndx = curndx; \ @@ -2724,33 +3240,20 @@ static void make_C_tag (isfun) bool isfun; { - /* This function should never be called when token.valid is FALSE, but + /* This function is never called when token.valid is FALSE, but we must protect against invalid input or internal errors. */ - if (DEBUG || token.valid) - { - if (traditional_tag_style) - { - /* This was the original code. Now we call new_pfnote instead, - which uses the new method for naming tags (see new_pfnote). */ - char *name = NULL; + if (!DEBUG && !token.valid) + return; - if (CTAGS || token.named) - name = savestr (token_name.buffer); - if (DEBUG && !token.valid) - { - if (token.named) - name = concat (name, "##invalid##", ""); - else - name = savestr ("##invalid##"); - } - pfnote (name, isfun, token.line, - token.offset+token.length+1, token.lineno, token.linepos); - } - else - new_pfnote (token_name.buffer, token_name.len, isfun, token.line, - token.offset+token.length+1, token.lineno, token.linepos); - token.valid = FALSE; - } + if (token.valid) + make_tag (token_name.buffer, token_name.len, isfun, token.line, + token.offset+token.length+1, token.lineno, token.linepos); + else /* this case is optimised away if !DEBUG */ + make_tag (concat ("INVALID TOKEN:-->", token_name.buffer, ""), + token_name.len + 17, isfun, token.line, + token.offset+token.length+1, token.lineno, token.linepos); + + token.valid = FALSE; } @@ -2772,30 +3275,29 @@ C_entries (c_ext, inf) register int toklen; /* length of current token */ char *qualifier; /* string used to qualify names */ int qlen; /* length of qualifier */ - int cblev; /* current curly brace level */ + int bracelev; /* current brace level */ + int bracketlev; /* current bracket level */ int parlev; /* current parenthesis level */ - int typdefcblev; /* cblev where a typedef struct body begun */ + int attrparlev; /* __attribute__ parenthesis level */ + int templatelev; /* current template level */ + int typdefbracelev; /* bracelev where a typedef struct body begun */ bool incomm, inquote, inchar, quotednl, midtoken; - bool cplpl, cjava; bool yacc_rules; /* in the rules part of a yacc file */ - struct tok savetoken; /* token saved during preprocessor handling */ + struct tok savetoken = {0}; /* token saved during preprocessor handling */ - initbuffer (&token_name); - initbuffer (&lbs[0].lb); - initbuffer (&lbs[1].lb); + linebuffer_init (&lbs[0].lb); + linebuffer_init (&lbs[1].lb); if (cstack.size == 0) { cstack.size = (DEBUG) ? 1 : 4; cstack.nl = 0; cstack.cname = xnew (cstack.size, char *); - cstack.cblev = xnew (cstack.size, int); + cstack.bracelev = xnew (cstack.size, int); } - tokoff = toklen = 0; /* keep compiler quiet */ + tokoff = toklen = typdefbracelev = 0; /* keep compiler quiet */ curndx = newndx = 0; - lineno = 0; - charno = 0; lp = curlb.buffer; *lp = 0; @@ -2804,11 +3306,7 @@ C_entries (c_ext, inf) yacc_rules = FALSE; midtoken = inquote = inchar = incomm = quotednl = FALSE; token.valid = savetoken.valid = FALSE; - cblev = 0; - typdefcblev = 0; - parlev = 0; - cplpl = (c_ext & C_PLPL) == C_PLPL; - cjava = (c_ext & C_JAVA) == C_JAVA; + bracelev = bracketlev = parlev = attrparlev = templatelev = 0; if (cjava) { qualifier = "."; qlen = 1; } else @@ -2820,8 +3318,8 @@ C_entries (c_ext, inf) c = *lp++; if (c == '\\') { - /* If we're at the end of the line, the next character is a - '\0'; don't skip it, because it's the thing that tells us + /* If we are at the end of the line, the next character is a + '\0'; do not skip it, because it is what tells us to read the next line. */ if (*lp == '\0') { @@ -2880,107 +3378,125 @@ C_entries (c_ext, inf) } continue; } - else - switch (c) - { - case '"': - inquote = TRUE; - switch (fvdef) - { - case fdefunkey: - case fstartlist: - case finlist: - case fignore: - case vignore: - break; - default: - fvextern = FALSE; - fvdef = fvnone; - } - continue; - case '\'': - inchar = TRUE; - if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) - { - fvextern = FALSE; - fvdef = fvnone; - } - continue; - case '/': - if (*lp == '*') - { - lp++; - incomm = TRUE; + else if (bracketlev > 0) + { + switch (c) + { + case ']': + if (--bracketlev > 0) continue; - } - else if (/* cplpl && */ *lp == '/') - { - c = '\0'; - break; - } - else break; - case '%': - if ((c_ext & YACC) && *lp == '%') - { - /* Entering or exiting rules section in yacc file. */ - lp++; - definedef = dnone; fvdef = fvnone; fvextern = FALSE; - typdef = tnone; structdef = snone; - midtoken = inquote = inchar = incomm = quotednl = FALSE; - cblev = 0; - yacc_rules = !yacc_rules; - continue; - } - else + case '\0': + CNL_SAVE_DEFINEDEF (); break; - case '#': - if (definedef == dnone) - { - char *cp; - bool cpptoken = TRUE; - - /* Look back on this line. If all blanks, or nonblanks - followed by an end of comment, this is a preprocessor - token. */ - for (cp = newlb.buffer; cp < lp-1; cp++) - if (!iswhite (*cp)) - { - if (*cp == '*' && *(cp+1) == '/') - { - cp++; - cpptoken = TRUE; - } - else - cpptoken = FALSE; - } - if (cpptoken) - definedef = dsharpseen; - } /* if (definedef == dnone) */ - + } + continue; + } + else switch (c) + { + case '"': + inquote = TRUE; + if (inattribute) + break; + switch (fvdef) + { + case fdefunkey: + case fstartlist: + case finlist: + case fignore: + case vignore: + break; + default: + fvextern = FALSE; + fvdef = fvnone; + } + continue; + case '\'': + inchar = TRUE; + if (inattribute) + break; + if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) + { + fvextern = FALSE; + fvdef = fvnone; + } + continue; + case '/': + if (*lp == '*') + { + incomm = TRUE; + lp++; + c = ' '; + } + else if (/* cplpl && */ *lp == '/') + { + c = '\0'; + } + break; + case '%': + if ((c_ext & YACC) && *lp == '%') + { + /* Entering or exiting rules section in yacc file. */ + lp++; + definedef = dnone; fvdef = fvnone; fvextern = FALSE; + typdef = tnone; structdef = snone; + midtoken = inquote = inchar = incomm = quotednl = FALSE; + bracelev = 0; + yacc_rules = !yacc_rules; + continue; + } + else + break; + case '#': + if (definedef == dnone) + { + char *cp; + bool cpptoken = TRUE; + + /* Look back on this line. If all blanks, or nonblanks + followed by an end of comment, this is a preprocessor + token. */ + for (cp = newlb.buffer; cp < lp-1; cp++) + if (!iswhite (*cp)) + { + if (*cp == '*' && *(cp+1) == '/') + { + cp++; + cpptoken = TRUE; + } + else + cpptoken = FALSE; + } + if (cpptoken) + definedef = dsharpseen; + } /* if (definedef == dnone) */ + continue; + case '[': + bracketlev++; continue; - } /* switch (c) */ + } /* switch (c) */ /* Consider token only if some involved conditions are satisfied. */ if (typdef != tignore && definedef != dignorerest && fvdef != finlist - && structdef != sintemplate + && templatelev == 0 && (definedef != dnone - || structdef != scolonseen)) + || structdef != scolonseen) + && !inattribute) { if (midtoken) { if (endtoken (c)) { - if (c == ':' && cplpl && *lp == ':' && begtoken (lp[1])) + if (c == ':' && *lp == ':' && begtoken (lp[1])) + /* This handles :: in the middle, + but not at the beginning of an identifier. + Also, space-separated :: is not recognised. */ { - /* - * This handles :: in the middle, but not at the - * beginning of an identifier. Also, space-separated - * :: is not recognised. - */ + if (c_ext & C_AUTO) /* automatic detection of C++ */ + c_ext = (c_ext | C_PLPL) & ~C_AUTO; lp += 2; toklen += 2; c = lp[-1]; @@ -2992,7 +3508,8 @@ C_entries (c_ext, inf) if (yacc_rules || consider_token (newlb.buffer + tokoff, toklen, c, - &c_ext, cblev, parlev, &funorvar)) + &c_ext, bracelev, parlev, + &funorvar)) { if (fvdef == foperator) { @@ -3007,7 +3524,7 @@ C_entries (c_ext, inf) toklen += lp - oldlp; } token.named = FALSE; - if ((c_ext & C_EXT) /* not pure C */ + if (!plainc && nestlev > 0 && definedef == dnone) /* in struct body */ { @@ -3051,7 +3568,6 @@ C_entries (c_ext, inf) off += 1; len -= 1; } - len = toklen; linebuffer_setlen (&token_name, len); strncpy (token_name.buffer, newlb.buffer + off, len); @@ -3077,7 +3593,7 @@ C_entries (c_ext, inf) || (funorvar && definedef == dnone && structdef == snone - && cblev > 0)); + && bracelev > 0)); } token.lineno = lineno; token.offset = tokoff; @@ -3102,6 +3618,16 @@ C_entries (c_ext, inf) || instruct) make_C_tag (funorvar); } + else /* not yacc and consider_token failed */ + { + if (inattribute && fvdef == fignore) + { + /* We have just met __attribute__ after a + function parameter list: do not tag the + function again. */ + fvdef = fvnone; + } + } midtoken = FALSE; } } /* if (endtoken (c)) */ @@ -3120,24 +3646,28 @@ C_entries (c_ext, inf) switch (fvdef) { case fstartlist: + /* This prevents tagging fb in + void (__attribute__((noreturn)) *fb) (void); + Fixing this is not easy and not very important. */ fvdef = finlist; continue; case flistseen: - make_C_tag (TRUE); /* a function */ - fvdef = fignore; - break; - case fvnameseen: - fvdef = fvnone; + if (plainc || declarations) + { + make_C_tag (TRUE); /* a function */ + fvdef = fignore; + } break; } if (structdef == stagseen && !cjava) { - popclass_above (cblev); + popclass_above (bracelev); structdef = snone; } break; case dsharpseen: savetoken = token; + break; } if (!yacc_rules || lp == newlb.buffer + 1) { @@ -3155,6 +3685,8 @@ C_entries (c_ext, inf) switch (c) { case ':': + if (inattribute) + break; if (yacc_rules && token.offset == 0 && token.valid) { make_C_tag (FALSE); /* a yacc function */ @@ -3176,10 +3708,20 @@ C_entries (c_ext, inf) break; } if (structdef == stagseen) - structdef = scolonseen; + { + structdef = scolonseen; + break; + } + /* Should be useless, but may be work as a safety net. */ + if (cplpl && fvdef == flistseen) + { + make_C_tag (TRUE); /* a function */ + fvdef = fignore; + break; + } break; case ';': - if (definedef != dnone) + if (definedef != dnone || inattribute) break; switch (typdef) { @@ -3195,11 +3737,11 @@ C_entries (c_ext, inf) switch (fvdef) { case fignore: - if (typdef == tignore) + if (typdef == tignore || cplpl) fvdef = fvnone; break; case fvnameseen: - if ((globals && cblev == 0 && (!fvextern || declarations)) + if ((globals && bracelev == 0 && (!fvextern || declarations)) || (members && instruct)) make_C_tag (FALSE); /* a variable */ fvextern = FALSE; @@ -3207,20 +3749,20 @@ C_entries (c_ext, inf) token.valid = FALSE; break; case flistseen: - if ((declarations && typdef == tnone && !instruct) - || (members && typdef != tignore && instruct)) - make_C_tag (TRUE); /* a function declaration */ + if ((declarations + && (cplpl || !instruct) + && (typdef == tnone || (typdef != tignore && instruct))) + || (members + && plainc && instruct)) + make_C_tag (TRUE); /* a function */ /* FALLTHRU */ default: fvextern = FALSE; fvdef = fvnone; if (declarations - && structdef == stagseen && (c_ext & C_PLPL)) + && cplpl && structdef == stagseen) make_C_tag (FALSE); /* forward declaration */ else - /* The following instruction invalidates the token. - Probably the token should be invalidated in all other - cases where some state machine is reset prematurely. */ token.valid = FALSE; } /* switch (fvdef) */ /* FALLTHRU */ @@ -3232,7 +3774,7 @@ C_entries (c_ext, inf) structdef = snone; break; case ',': - if (definedef != dnone) + if (definedef != dnone || inattribute) break; switch (objdef) { @@ -3254,16 +3796,20 @@ C_entries (c_ext, inf) case fdefunname: fvdef = fignore; break; - case fvnameseen: /* a variable */ - if ((globals && cblev == 0 && (!fvextern || declarations)) - || (members && instruct)) - make_C_tag (FALSE); + case fvnameseen: + if (parlev == 0 + && ((globals + && bracelev == 0 + && templatelev == 0 + && (!fvextern || declarations)) + || (members && instruct))) + make_C_tag (FALSE); /* a variable */ break; - case flistseen: /* a function */ + case flistseen: if ((declarations && typdef == tnone && !instruct) || (members && typdef != tignore && instruct)) { - make_C_tag (TRUE); /* a function declaration */ + make_C_tag (TRUE); /* a function */ fvdef = fvnameseen; } else if (!declarations) @@ -3276,8 +3822,8 @@ C_entries (c_ext, inf) if (structdef == stagseen) structdef = snone; break; - case '[': - if (definedef != dnone) + case ']': + if (definedef != dnone || inattribute) break; if (structdef == stagseen) structdef = snone; @@ -3298,8 +3844,8 @@ C_entries (c_ext, inf) case vignore: break; case fvnameseen: - if ((members && cblev == 1) - || (globals && cblev == 0 + if ((members && bracelev == 1) + || (globals && bracelev == 0 && (!fvextern || declarations))) make_C_tag (FALSE); /* a variable */ /* FALLTHRU */ @@ -3310,6 +3856,11 @@ C_entries (c_ext, inf) } break; case '(': + if (inattribute) + { + attrparlev++; + break; + } if (definedef != dnone) break; if (objdef == otagseen && parlev == 0) @@ -3339,6 +3890,12 @@ C_entries (c_ext, inf) parlev++; break; case ')': + if (inattribute) + { + if (--attrparlev == 0) + inattribute = FALSE; + break; + } if (definedef != dnone) break; if (objdef == ocatseen && parlev == 1) @@ -3371,8 +3928,10 @@ C_entries (c_ext, inf) break; if (typdef == ttypeseen) { - typdefcblev = cblev; + /* Whenever typdef is set to tinbody (currently only + here), typdefbracelev should be set to bracelev. */ typdef = tinbody; + typdefbracelev = bracelev; } switch (fvdef) { @@ -3396,47 +3955,56 @@ C_entries (c_ext, inf) break; default: /* Neutralize `extern "C" {' grot. */ - if (cblev == 0 && structdef == snone && nestlev == 0 + if (bracelev == 0 && structdef == snone && nestlev == 0 && typdef == tnone) - cblev = -1; + bracelev = -1; } + break; } switch (structdef) { case skeyseen: /* unnamed struct */ - pushclass_above (cblev, NULL, 0); + pushclass_above (bracelev, NULL, 0); structdef = snone; break; case stagseen: /* named struct or enum */ case scolonseen: /* a class */ - pushclass_above (cblev, token.line+token.offset, token.length); + pushclass_above (bracelev,token.line+token.offset, token.length); structdef = snone; make_C_tag (FALSE); /* a struct or enum */ break; } - cblev++; + bracelev++; break; case '*': if (definedef != dnone) break; if (fvdef == fstartlist) - fvdef = fvnone; /* avoid tagging `foo' in `foo (*bar()) ()' */ + { + fvdef = fvnone; /* avoid tagging `foo' in `foo (*bar()) ()' */ + token.valid = FALSE; + } break; case '}': if (definedef != dnone) break; - if (!noindentypedefs && lp == newlb.buffer + 1) + if (!ignoreindent && lp == newlb.buffer + 1) { - cblev = 0; /* reset curly brace level if first column */ + if (bracelev != 0) + token.valid = FALSE; + bracelev = 0; /* reset brace level if first column */ parlev = 0; /* also reset paren level, just in case... */ } - else if (cblev > 0) - cblev--; - popclass_above (cblev); + else if (bracelev > 0) + bracelev--; + else + token.valid = FALSE; /* something gone amiss, token unreliable */ + popclass_above (bracelev); structdef = snone; - if (typdef == tinbody && cblev <= typdefcblev) + /* Only if typdef == tinbody is typdefbracelev significant. */ + if (typdef == tinbody && bracelev <= typdefbracelev) { - assert (cblev == typdefcblev); + assert (bracelev == typdefbracelev); typdef = tend; } break; @@ -3451,8 +4019,8 @@ C_entries (c_ext, inf) case vignore: break; case fvnameseen: - if ((members && cblev == 1) - || (globals && cblev == 0 && (!fvextern || declarations))) + if ((members && bracelev == 1) + || (globals && bracelev == 0 && (!fvextern || declarations))) make_C_tag (FALSE); /* a variable */ /* FALLTHRU */ default: @@ -3460,30 +4028,31 @@ C_entries (c_ext, inf) } break; case '<': - if (cplpl && structdef == stagseen) + if (cplpl + && (structdef == stagseen || fvdef == fvnameseen)) { - structdef = sintemplate; + templatelev++; break; } goto resetfvdef; case '>': - if (structdef == sintemplate) + if (templatelev > 0) { - structdef = stagseen; + templatelev--; break; } goto resetfvdef; case '+': case '-': - if (objdef == oinbody && cblev == 0) + if (objdef == oinbody && bracelev == 0) { objdef = omethodsign; break; } /* FALLTHRU */ resetfvdef: - case '#': case '~': case '&': case '%': case '/': case '|': - case '^': case '!': case '.': case '?': case ']': + case '#': case '~': case '&': case '%': case '/': + case '|': case '^': case '!': case '.': case '?': if (definedef != dnone) break; /* These surely cannot follow a function tag in C. */ @@ -3514,7 +4083,6 @@ C_entries (c_ext, inf) } /* while not eof */ - free (token_name.buffer); free (lbs[0].lb.buffer); free (lbs[1].lb.buffer); } @@ -3571,17 +4139,27 @@ Yacc_entries (inf) } -/* A useful macro. */ +/* Useful macros. */ #define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer) \ - for (lineno = charno = 0; /* loop initialization */ \ + for (; /* loop initialization */ \ !feof (file_pointer) /* loop test */ \ - && (lineno++, /* instructions at start of loop */ \ - linecharno = charno, \ - charno += readline (&line_buffer, file_pointer), \ - char_pointer = lb.buffer, \ + && /* instructions at start of loop */ \ + (readline (&line_buffer, file_pointer), \ + char_pointer = line_buffer.buffer, \ TRUE); \ ) +#define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ + ((assert("" kw), TRUE) /* syntax error if not a literal string */ \ + && strneq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ + && notinname ((cp)[sizeof(kw)-1]) /* end of kw */ \ + && ((cp) = skip_spaces((cp)+sizeof(kw)-1))) /* skip spaces */ + +/* Similar to LOOKING_AT but does not use notinname, does not skip */ +#define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \ + ((assert("" kw), TRUE) /* syntax error if not a literal string */ \ + && strncaseeq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ + && ((cp) += sizeof(kw)-1)) /* skip spaces */ /* * Read a file, but do no processing. This is used to do regexp @@ -3600,28 +4178,11 @@ just_read_file (inf) /* Fortran parsing */ -static bool tail P_((char *)); -static void takeprec P_((void)); -static void getit P_((FILE *)); - -static bool -tail (cp) - char *cp; -{ - register int len = 0; - - while (*cp != '\0' && lowcase (*cp) == lowcase (dbp[len])) - cp++, len++; - if (*cp == '\0' && !intoken (dbp[len])) - { - dbp += len; - return TRUE; - } - return FALSE; -} +static void F_takeprec __P((void)); +static void F_getit __P((FILE *)); static void -takeprec () +F_takeprec () { dbp = skip_spaces (dbp); if (*dbp != '*') @@ -3644,7 +4205,7 @@ takeprec () } static void -getit (inf) +F_getit (inf) FILE *inf; { register char *cp; @@ -3652,9 +4213,7 @@ getit (inf) dbp = skip_spaces (dbp); if (*dbp == '\0') { - lineno++; - linecharno = charno; - charno += readline (&lb, inf); + readline (&lb, inf); dbp = lb.buffer; if (dbp[5] != '&') return; @@ -3665,8 +4224,8 @@ getit (inf) return; for (cp = dbp + 1; *cp != '\0' && intoken (*cp); cp++) continue; - pfnote (savenstr (dbp, cp-dbp), TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + make_tag (dbp, cp-dbp, TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } @@ -3684,28 +4243,28 @@ Fortran_functions (inf) switch (lowcase (*dbp)) { case 'i': - if (tail ("integer")) - takeprec (); + if (nocase_tail ("integer")) + F_takeprec (); break; case 'r': - if (tail ("real")) - takeprec (); + if (nocase_tail ("real")) + F_takeprec (); break; case 'l': - if (tail ("logical")) - takeprec (); + if (nocase_tail ("logical")) + F_takeprec (); break; case 'c': - if (tail ("complex") || tail ("character")) - takeprec (); + if (nocase_tail ("complex") || nocase_tail ("character")) + F_takeprec (); break; case 'd': - if (tail ("double")) + if (nocase_tail ("double")) { dbp = skip_spaces (dbp); if (*dbp == '\0') continue; - if (tail ("precision")) + if (nocase_tail ("precision")) break; continue; } @@ -3717,26 +4276,26 @@ Fortran_functions (inf) switch (lowcase (*dbp)) { case 'f': - if (tail ("function")) - getit (inf); + if (nocase_tail ("function")) + F_getit (inf); continue; case 's': - if (tail ("subroutine")) - getit (inf); + if (nocase_tail ("subroutine")) + F_getit (inf); continue; case 'e': - if (tail ("entry")) - getit (inf); + if (nocase_tail ("entry")) + F_getit (inf); continue; case 'b': - if (tail ("blockdata") || tail ("block data")) + if (nocase_tail ("blockdata") || nocase_tail ("block data")) { dbp = skip_spaces (dbp); if (*dbp == '\0') /* assume un-named */ - pfnote (savestr ("blockdata"), TRUE, - lb.buffer, dbp - lb.buffer, lineno, linecharno); + make_tag ("blockdata", 9, TRUE, + lb.buffer, dbp - lb.buffer, lineno, linecharno); else - getit (inf); /* look for name */ + F_getit (inf); /* look for name */ } continue; } @@ -3746,15 +4305,16 @@ Fortran_functions (inf) /* * Ada parsing - * Philippe Waroquiers (1998) + * Original code by + * Philippe Waroquiers (1998) */ -static void adagetit P_((FILE *, char *)); +static void Ada_getit __P((FILE *, char *)); /* Once we are positioned after an "interesting" keyword, let's get the real tag value necessary. */ static void -adagetit (inf, name_qualifier) +Ada_getit (inf, name_qualifier) FILE *inf; char *name_qualifier; { @@ -3768,16 +4328,13 @@ adagetit (inf, name_qualifier) if (*dbp == '\0' || (dbp[0] == '-' && dbp[1] == '-')) { - lineno++; - linecharno = charno; - charno += readline (&lb, inf); + readline (&lb, inf); dbp = lb.buffer; } - switch (*dbp) + switch (lowcase(*dbp)) { case 'b': - case 'B': - if (tail ("body")) + if (nocase_tail ("body")) { /* Skipping body of procedure body or package body or .... resetting qualifier to body instead of spec. */ @@ -3786,9 +4343,8 @@ adagetit (inf, name_qualifier) } break; case 't': - case 'T': /* Skipping type of task type or protected type ... */ - if (tail ("type")) + if (nocase_tail ("type")) continue; break; } @@ -3813,7 +4369,9 @@ adagetit (inf, name_qualifier) *cp = '\0'; name = concat (dbp, name_qualifier, ""); *cp = c; - pfnote (name, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + make_tag (name, strlen (name), TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + free (name); if (c == '"') dbp = cp + 1; return; @@ -3825,6 +4383,7 @@ Ada_funcs (inf) FILE *inf; { bool inquote = FALSE; + bool skip_till_semicolumn = FALSE; LOOP_ON_INPUT_LINES (inf, lb, dbp) { @@ -3861,6 +4420,14 @@ Ada_funcs (inf) continue; } + if (skip_till_semicolumn) + { + if (*dbp == ';') + skip_till_semicolumn = FALSE; + dbp++; + continue; /* advance char */ + } + /* Search for beginning of a token. */ if (!begtoken (*dbp)) { @@ -3869,33 +4436,40 @@ Ada_funcs (inf) } /* We are at the beginning of a token. */ - switch (*dbp) + switch (lowcase(*dbp)) { case 'f': - case 'F': - if (!packages_only && tail ("function")) - adagetit (inf, "/f"); + if (!packages_only && nocase_tail ("function")) + Ada_getit (inf, "/f"); else break; /* from switch */ continue; /* advance char */ case 'p': - case 'P': - if (!packages_only && tail ("procedure")) - adagetit (inf, "/p"); - else if (tail ("package")) - adagetit (inf, "/s"); - else if (tail ("protected")) /* protected type */ - adagetit (inf, "/t"); + if (!packages_only && nocase_tail ("procedure")) + Ada_getit (inf, "/p"); + else if (nocase_tail ("package")) + Ada_getit (inf, "/s"); + else if (nocase_tail ("protected")) /* protected type */ + Ada_getit (inf, "/t"); else break; /* from switch */ continue; /* advance char */ + + case 'u': + if (typedefs && !packages_only && nocase_tail ("use")) + { + /* when tagging types, avoid tagging use type Pack.Typename; + for this, we will skip everything till a ; */ + skip_till_semicolumn = TRUE; + continue; /* advance char */ + } + case 't': - case 'T': - if (!packages_only && tail ("task")) - adagetit (inf, "/k"); - else if (typedefs && !packages_only && tail ("type")) + if (!packages_only && nocase_tail ("task")) + Ada_getit (inf, "/k"); + else if (typedefs && !packages_only && nocase_tail ("type")) { - adagetit (inf, "/t"); + Ada_getit (inf, "/t"); while (*dbp != '\0') dbp += 1; } @@ -3914,9 +4488,9 @@ Ada_funcs (inf) /* - * Bob Weiner, Motorola Inc., 4/3/94 * Unix and microcontroller assembly tag handling - * look for '^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]' + * Labels: /^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]/ + * Idea by Bob Weiner, Motorola Inc. (1994) */ static void Asm_labels (inf) @@ -3935,11 +4509,9 @@ Asm_labels (inf) while (ISALNUM (*cp) || *cp == '_' || *cp == '.' || *cp == '$') cp++; if (*cp == ':' || iswhite (*cp)) - { - /* Found end of label, so copy it and add it to the table. */ - pfnote (savenstr(lb.buffer, cp-lb.buffer), TRUE, + /* Found end of label, so copy it and add it to the table. */ + make_tag (lb.buffer, cp - lb.buffer, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); - } } } } @@ -3947,79 +4519,94 @@ Asm_labels (inf) /* * Perl support - * Perl sub names: look for /^sub[ \t\n]+[^ \t\n{]+/ + * Perl sub names: /^sub[ \t\n]+[^ \t\n{]+/ * Perl variable names: /^(my|local).../ - * Bart Robinson (1995) - * Michael Ernst (1997) + * Original code by Bart Robinson (1995) + * Additions by Michael Ernst (1997) + * Ideas by Kai Großjohann (2001) */ static void Perl_functions (inf) FILE *inf; { + char *package = savestr ("main"); /* current package name */ register char *cp; LOOP_ON_INPUT_LINES (inf, lb, cp) { - if (*cp++ == 's' - && *cp++ == 'u' - && *cp++ == 'b' && iswhite (*cp++)) + skip_spaces(cp); + + if (LOOKING_AT (cp, "package")) { - cp = skip_spaces (cp); - if (*cp != '\0') - { - char *sp = cp; - while (*cp != '\0' - && !iswhite (*cp) && *cp != '{' && *cp != '(') - cp++; - pfnote (savenstr (sp, cp-sp), TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); - } + free (package); + get_tag (cp, &package); + } + else if (LOOKING_AT (cp, "sub")) + { + char *pos; + char *sp = cp; + + while (!notinname (*cp)) + cp++; + if (cp == sp) + continue; /* nothing found */ + if ((pos = etags_strchr (sp, ':')) != NULL + && pos < cp && pos[1] == ':') + /* The name is already qualified. */ + make_tag (sp, cp - sp, TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + else + /* Qualify it. */ + { + char savechar, *name; + + savechar = *cp; + *cp = '\0'; + name = concat (package, "::", sp); + *cp = savechar; + make_tag (name, strlen(name), TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + free (name); + } } - else if (globals /* only if tagging global vars is enabled */ - && ((cp = lb.buffer, - *cp++ == 'm' - && *cp++ == 'y') - || (cp = lb.buffer, - *cp++ == 'l' - && *cp++ == 'o' - && *cp++ == 'c' - && *cp++ == 'a' - && *cp++ == 'l')) - && (*cp == '(' || iswhite (*cp))) + else if (globals) /* only if we are tagging global vars */ { + /* Skip a qualifier, if any. */ + bool qual = LOOKING_AT (cp, "my") || LOOKING_AT (cp, "local"); /* After "my" or "local", but before any following paren or space. */ - char *varname = NULL; + char *varstart = cp; - cp = skip_spaces (cp); - if (*cp == '$' || *cp == '@' || *cp == '%') + if (qual /* should this be removed? If yes, how? */ + && (*cp == '$' || *cp == '@' || *cp == '%')) { - char* varstart = ++cp; - while (ISALNUM (*cp) || *cp == '_') + varstart += 1; + do cp++; - varname = savenstr (varstart, cp-varstart); + while (ISALNUM (*cp) || *cp == '_'); } - else + else if (qual) { /* Should be examining a variable list at this point; could insist on seeing an open parenthesis. */ while (*cp != '\0' && *cp != ';' && *cp != '=' && *cp != ')') cp++; } + else + continue; - /* Perhaps I should back cp up one character, so the TAGS table - doesn't mention (and so depend upon) the following char. */ - pfnote ((CTAGS) ? savenstr (lb.buffer, cp-lb.buffer) : varname, - FALSE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + make_tag (varstart, cp - varstart, FALSE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } } + free (package); } - + /* * Python support - * Look for /^[ \t\n]*def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/ - * Eric S. Raymond (1997) - * Sean Legassick (2004) + * Look for /^[\t]*def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/ + * Idea by Eric S. Raymond (1997) + * More ideas by seb bacon (2002) */ static void Python_functions (inf) @@ -4030,38 +4617,107 @@ Python_functions (inf) LOOP_ON_INPUT_LINES (inf, lb, cp) { cp = skip_spaces (cp); - if (*cp++ == 'd' - && *cp++ == 'e' - && *cp++ == 'f' && iswhite (*cp++)) + if (LOOKING_AT (cp, "def") || LOOKING_AT (cp, "class")) { - cp = skip_spaces (cp); - while (*cp != '\0' && !iswhite (*cp) && *cp != '(' && *cp != ':') + char *name = cp; + while (!notinname (*cp) && *cp != ':') cp++; - pfnote (NULL, TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + make_tag (name, cp - name, TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } + } +} + + +/* + * PHP support + * Look for: + * - /^[ \t]*function[ \t\n]+[^ \t\n(]+/ + * - /^[ \t]*class[ \t\n]+[^ \t\n]+/ + * - /^[ \t]*define\(\"[^\"]+/ + * Only with --members: + * - /^[ \t]*var[ \t\n]+\$[^ \t\n=;]/ + * Idea by Diez B. Roggisch (2001) + */ +static void +PHP_functions (inf) + FILE *inf; +{ + register char *cp, *name; + bool search_identifier = FALSE; - cp = lb.buffer; - if (*cp++ == 'c' - && *cp++ == 'l' - && *cp++ == 'a' - && *cp++ == 's' - && *cp++ == 's' && iswhite (*cp++)) + LOOP_ON_INPUT_LINES (inf, lb, cp) + { + cp = skip_spaces (cp); + name = cp; + if (search_identifier + && *cp != '\0') { - cp = skip_spaces (cp); - while (*cp != '\0' && !iswhite (*cp) && *cp != '(' && *cp != ':') + while (!notinname (*cp)) cp++; - pfnote (NULL, TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + make_tag (name, cp - name, TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + search_identifier = FALSE; + } + else if (LOOKING_AT (cp, "function")) + { + if(*cp == '&') + cp = skip_spaces (cp+1); + if(*cp != '\0') + { + name = cp; + while (!notinname (*cp)) + cp++; + make_tag (name, cp - name, TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + } + else + search_identifier = TRUE; + } + else if (LOOKING_AT (cp, "class")) + { + if (*cp != '\0') + { + name = cp; + while (*cp != '\0' && !iswhite (*cp)) + cp++; + make_tag (name, cp - name, FALSE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + } + else + search_identifier = TRUE; + } + else if (strneq (cp, "define", 6) + && (cp = skip_spaces (cp+6)) + && *cp++ == '(' + && (*cp == '"' || *cp == '\'')) + { + char quote = *cp++; + name = cp; + while (*cp != quote && *cp != '\0') + cp++; + make_tag (name, cp - name, FALSE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + } + else if (members + && LOOKING_AT (cp, "var") + && *cp == '$') + { + name = cp; + while (!notinname(*cp)) + cp++; + make_tag (name, cp - name, FALSE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } } } -/* Idea by Corny de Souza +/* * Cobol tag functions * We could look for anything that could be a paragraph name. * i.e. anything that starts in column 8 is one word and ends in a full stop. + * Idea by Corny de Souza (1993) */ static void Cobol_paragraphs (inf) @@ -4082,15 +4738,15 @@ Cobol_paragraphs (inf) for (ep = bp; ISALNUM (*ep) || *ep == '-'; ep++) continue; if (*ep++ == '.') - pfnote (savenstr (bp, ep-bp), TRUE, - lb.buffer, ep - lb.buffer + 1, lineno, linecharno); + make_tag (bp, ep - bp, TRUE, + lb.buffer, ep - lb.buffer + 1, lineno, linecharno); } } /* * Makefile support - * Idea by Assar Westerlund (2001) + * Ideas by Assar Westerlund (2001) */ static void Makefile_targets (inf) @@ -4104,17 +4760,25 @@ Makefile_targets (inf) continue; while (*bp != '\0' && *bp != '=' && *bp != ':') bp++; - if (*bp == ':') - pfnote (savenstr (lb.buffer, bp - lb.buffer), TRUE, - lb.buffer, bp - lb.buffer + 1, lineno, linecharno); + if (*bp == ':' || (globals && *bp == '=')) + { + /* We should detect if there is more than one tag, but we do not. + We just skip initial and final spaces. */ + char * namestart = skip_spaces (lb.buffer); + while (--bp > namestart) + if (!notinname (*bp)) + break; + make_tag (namestart, bp - namestart + 1, TRUE, + lb.buffer, bp - lb.buffer + 2, lineno, linecharno); + } } } -/* Added by Mosur Mohan, 4/22/88 */ -/* Pascal parsing */ - /* + * Pascal parsing + * Original code by Mosur K. Mohan (1989) + * * Locates tags for procedures & functions. Doesn't do any type- or * var-definitions. It does look for the keyword "extern" or * "forward" immediately following the procedure statement; if found, @@ -4126,8 +4790,8 @@ Pascal_functions (inf) { linebuffer tline; /* mostly copied from C_entries */ long save_lcno; - int save_lineno, save_len; - char c, *cp, *namebuf; + int save_lineno, namelen, taglen; + char c, *name; bool /* each of these flags is TRUE iff: */ incomment, /* point is inside a comment */ @@ -4141,17 +4805,15 @@ Pascal_functions (inf) is a FORWARD/EXTERN to be ignored, or whether it is a real tag */ - save_lcno = save_lineno = save_len = 0; /* keep compiler quiet */ - namebuf = NULL; /* keep compiler quiet */ - lineno = 0; - charno = 0; + save_lcno = save_lineno = namelen = taglen = 0; /* keep compiler quiet */ + name = NULL; /* keep compiler quiet */ dbp = lb.buffer; *dbp = '\0'; - initbuffer (&tline); + linebuffer_init (&tline); incomment = inquote = FALSE; found_tag = FALSE; /* have a proc name; check if extern */ - get_tagname = FALSE; /* have found "procedure" keyword */ + get_tagname = FALSE; /* found "procedure" keyword */ inparms = FALSE; /* found '(' after "proc" */ verify_tag = FALSE; /* check if "extern" is ahead */ @@ -4161,9 +4823,7 @@ Pascal_functions (inf) c = *dbp++; if (c == '\0') /* if end of line */ { - lineno++; - linecharno = charno; - charno += readline (&lb, inf); + readline (&lb, inf); dbp = lb.buffer; if (*dbp == '\0') continue; @@ -4222,12 +4882,12 @@ Pascal_functions (inf) } if (found_tag && verify_tag && (*dbp != ' ')) { - /* check if this is an "extern" declaration */ + /* Check if this is an "extern" declaration. */ if (*dbp == '\0') continue; if (lowcase (*dbp == 'e')) { - if (tail ("extern")) /* superfluous, really! */ + if (nocase_tail ("extern")) /* superfluous, really! */ { found_tag = FALSE; verify_tag = FALSE; @@ -4235,7 +4895,7 @@ Pascal_functions (inf) } else if (lowcase (*dbp) == 'f') { - if (tail ("forward")) /* check for forward reference */ + if (nocase_tail ("forward")) /* check for forward reference */ { found_tag = FALSE; verify_tag = FALSE; @@ -4245,50 +4905,54 @@ Pascal_functions (inf) { found_tag = FALSE; verify_tag = FALSE; - pfnote (namebuf, TRUE, - tline.buffer, save_len, save_lineno, save_lcno); + make_tag (name, namelen, TRUE, + tline.buffer, taglen, save_lineno, save_lcno); continue; } } if (get_tagname) /* grab name of proc or fn */ { + char *cp; + if (*dbp == '\0') continue; - /* save all values for later tagging */ + /* Find block name. */ + for (cp = dbp + 1; *cp != '\0' && !endtoken (*cp); cp++) + continue; + + /* Save all values for later tagging. */ linebuffer_setlen (&tline, lb.len); strcpy (tline.buffer, lb.buffer); save_lineno = lineno; save_lcno = linecharno; + name = tline.buffer + (dbp - lb.buffer); + namelen = cp - dbp; + taglen = cp - lb.buffer + 1; - /* grab block name */ - for (cp = dbp + 1; *cp != '\0' && !endtoken (*cp); cp++) - continue; - namebuf = savenstr (dbp, cp-dbp); dbp = cp; /* set dbp to e-o-token */ - save_len = dbp - lb.buffer + 1; get_tagname = FALSE; found_tag = TRUE; continue; - /* and proceed to check for "extern" */ + /* And proceed to check for "extern". */ } else if (!incomment && !inquote && !found_tag) { - /* check for proc/fn keywords */ + /* Check for proc/fn keywords. */ switch (lowcase (c)) { case 'p': - if (tail ("rocedure")) /* c = 'p', dbp has advanced */ + if (nocase_tail ("rocedure")) /* c = 'p', dbp has advanced */ get_tagname = TRUE; continue; case 'f': - if (tail ("unction")) + if (nocase_tail ("unction")) get_tagname = TRUE; continue; } } - } /* while not eof */ + } /* while not eof */ free (tline.buffer); } @@ -4299,56 +4963,22 @@ Pascal_functions (inf) * look for (def or (DEF, quote or QUOTE */ -static int L_isdef P_((char *)); -static int L_isquote P_((char *)); -static void L_getit P_((void)); - -static int -L_isdef (strp) - register char *strp; -{ - return ((strp[1] == 'd' || strp[1] == 'D') - && (strp[2] == 'e' || strp[2] == 'E') - && (strp[3] == 'f' || strp[3] == 'F')); -} - -static int -L_isquote (strp) - register char *strp; -{ - return ((*++strp == 'q' || *strp == 'Q') - && (*++strp == 'u' || *strp == 'U') - && (*++strp == 'o' || *strp == 'O') - && (*++strp == 't' || *strp == 'T') - && (*++strp == 'e' || *strp == 'E') - && iswhite (*++strp)); -} +static void L_getit __P((void)); static void L_getit () { - register char *cp; - if (*dbp == '\'') /* Skip prefix quote */ dbp++; else if (*dbp == '(') { - if (L_isquote (dbp)) - dbp += 7; /* Skip "(quote " */ - else - dbp += 1; /* Skip "(" before name in (defstruct (foo)) */ - dbp = skip_spaces (dbp); + dbp++; + /* Try to skip "(quote " */ + if (!LOOKING_AT (dbp, "quote") && !LOOKING_AT (dbp, "QUOTE")) + /* Ok, then skip "(" before name in (defstruct (foo)) */ + dbp = skip_spaces (dbp); } - - for (cp = dbp /*+1*/; - *cp != '\0' && *cp != '(' && !iswhite(*cp) && *cp != ')'; - cp++) - continue; - if (cp == dbp) - return; - - pfnote (savenstr (dbp, cp-dbp), TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + get_tag (dbp, NULL); } static void @@ -4357,33 +4987,32 @@ Lisp_functions (inf) { LOOP_ON_INPUT_LINES (inf, lb, dbp) { - if (dbp[0] == '(') + if (dbp[0] != '(') + continue; + + if (strneq (dbp+1, "def", 3) || strneq (dbp+1, "DEF", 3)) { - if (L_isdef (dbp)) - { - dbp = skip_non_spaces (dbp); - dbp = skip_spaces (dbp); - L_getit (); - } - else + dbp = skip_non_spaces (dbp); + dbp = skip_spaces (dbp); + L_getit (); + } + else + { + /* Check for (foo::defmumble name-defined ... */ + do + dbp++; + while (!notinname (*dbp) && *dbp != ':'); + if (*dbp == ':') { - /* Check for (foo::defmumble name-defined ... */ do dbp++; - while (*dbp != '\0' && !iswhite (*dbp) - && *dbp != ':' && *dbp != '(' && *dbp != ')'); - if (*dbp == ':') - { - do - dbp++; - while (*dbp == ':'); + while (*dbp == ':'); - if (L_isdef (dbp - 1)) - { - dbp = skip_non_spaces (dbp); - dbp = skip_spaces (dbp); - L_getit (); - } + if (strneq (dbp, "def", 3) || strneq (dbp, "DEF", 3)) + { + dbp = skip_non_spaces (dbp); + dbp = skip_spaces (dbp); + L_getit (); } } } @@ -4392,14 +5021,40 @@ Lisp_functions (inf) /* - * Postscript tag functions + * Lua script language parsing + * Original code by David A. Capello (2004) + * + * "function" and "local function" are tags if they start at column 1. + */ +static void +Lua_functions (inf) + FILE *inf; +{ + register char *bp; + + LOOP_ON_INPUT_LINES (inf, lb, bp) + { + if (bp[0] != 'f' && bp[0] != 'l') + continue; + + (void)LOOKING_AT (bp, "local"); /* skip possible "local" */ + + if (LOOKING_AT (bp, "function")) + get_tag (bp, NULL); + } +} + + +/* + * Postscript tags * Just look for lines where the first character is '/' * Also look at "defineps" for PSWrap - * Richard Mlynarik (1997) - * Ideas by Masatake Yamato (1999) + * Ideas by: + * Richard Mlynarik (1997) + * Masatake Yamato (1999) */ static void -Postscript_functions (inf) +PS_functions (inf) FILE *inf; { register char *bp, *ep; @@ -4412,27 +5067,60 @@ Postscript_functions (inf) *ep != '\0' && *ep != ' ' && *ep != '{'; ep++) continue; - pfnote (savenstr (bp, ep-bp), TRUE, - lb.buffer, ep - lb.buffer + 1, lineno, linecharno); - } - else if (strneq (bp, "defineps", 8)) - { - bp = skip_non_spaces (bp); - bp = skip_spaces (bp); - get_tag (bp); + make_tag (bp, ep - bp, TRUE, + lb.buffer, ep - lb.buffer + 1, lineno, linecharno); } + else if (LOOKING_AT (bp, "defineps")) + get_tag (bp, NULL); } } /* + * Forth tags + * Ignore anything after \ followed by space or in ( ) + * Look for words defined by : + * Look for constant, code, create, defer, value, and variable + * OBP extensions: Look for buffer:, field, + * Ideas by Eduardo Horvath (2004) + */ +static void +Forth_words (inf) + FILE *inf; +{ + register char *bp; + + LOOP_ON_INPUT_LINES (inf, lb, bp) + while ((bp = skip_spaces (bp))[0] != '\0') + if (bp[0] == '\\' && iswhite(bp[1])) + break; /* read next line */ + else if (bp[0] == '(' && iswhite(bp[1])) + do /* skip to ) or eol */ + bp++; + while (*bp != ')' && *bp != '\0'); + else if ((bp[0] == ':' && iswhite(bp[1]) && bp++) + || LOOKING_AT_NOCASE (bp, "constant") + || LOOKING_AT_NOCASE (bp, "code") + || LOOKING_AT_NOCASE (bp, "create") + || LOOKING_AT_NOCASE (bp, "defer") + || LOOKING_AT_NOCASE (bp, "value") + || LOOKING_AT_NOCASE (bp, "variable") + || LOOKING_AT_NOCASE (bp, "buffer:") + || LOOKING_AT_NOCASE (bp, "field")) + get_tag (skip_spaces (bp), NULL); /* Yay! A definition! */ + else + bp = skip_non_spaces (bp); +} + + +/* * Scheme tag functions * look for (def... xyzzy - * look for (def... (xyzzy - * look for (def ... ((...(xyzzy .... - * look for (set! xyzzy + * (def... (xyzzy + * (def ... ((...(xyzzy .... + * (set! xyzzy + * Original code by Ken Haase (1985?) */ - static void Scheme_functions (inf) FILE *inf; @@ -4441,28 +5129,16 @@ Scheme_functions (inf) LOOP_ON_INPUT_LINES (inf, lb, bp) { - if (bp[0] == '(' - && (bp[1] == 'D' || bp[1] == 'd') - && (bp[2] == 'E' || bp[2] == 'e') - && (bp[3] == 'F' || bp[3] == 'f')) + if (strneq (bp, "(def", 4) || strneq (bp, "(DEF", 4)) { - bp = skip_non_spaces (bp); + bp = skip_non_spaces (bp+4); /* Skip over open parens and white space */ - while (iswhite (*bp) || *bp == '(') + while (notinname (*bp)) bp++; - get_tag (bp); - } - if (bp[0] == '(' - && (bp[1] == 'S' || bp[1] == 's') - && (bp[2] == 'E' || bp[2] == 'e') - && (bp[3] == 'T' || bp[3] == 't') - && (bp[4] == '!' || bp[4] == '!') - && (iswhite (bp[5]))) - { - bp = skip_non_spaces (bp); - bp = skip_spaces (bp); - get_tag (bp); + get_tag (bp, NULL); } + if (LOOKING_AT (bp, "(SET!") || LOOKING_AT (bp, "(set!")) + get_tag (bp, NULL); } } @@ -4470,30 +5146,28 @@ Scheme_functions (inf) /* Find tags in TeX and LaTeX input files. */ /* TEX_toktab is a table of TeX control sequences that define tags. - Each TEX_tabent records one such control sequence. - CONVERT THIS TO USE THE Stab TYPE!! */ -struct TEX_tabent -{ - char *name; - int len; -}; + * Each entry records one such control sequence. + * + * Original code from who knows whom. + * Ideas by: + * Stefan Monnier (2002) + */ -struct TEX_tabent *TEX_toktab = NULL; /* Table with tag tokens */ +static linebuffer *TEX_toktab = NULL; /* Table with tag tokens */ /* Default set of control sequences to put into TEX_toktab. The value of environment var TEXTAGS is prepended to this. */ - -char *TEX_defenv = "\ +static char *TEX_defenv = "\ :chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem\ -:part:appendix:entry:index"; +:part:appendix:entry:index:def\ +:newcommand:renewcommand:newenvironment:renewenvironment"; -static void TEX_mode P_((FILE *)); -static struct TEX_tabent *TEX_decode_env P_((char *, char *)); -static int TEX_Token P_((char *)); +static void TEX_mode __P((FILE *)); +static void TEX_decode_env __P((char *, char *)); -char TEX_esc = '\\'; -char TEX_opgrp = '{'; -char TEX_clgrp = '}'; +static char TEX_esc = '\\'; +static char TEX_opgrp = '{'; +static char TEX_clgrp = '}'; /* * TeX/LaTeX scanning loop. @@ -4502,46 +5176,64 @@ static void TeX_commands (inf) FILE *inf; { - char *cp, *lasthit; - register int i; + char *cp; + linebuffer *key; /* Select either \ or ! as escape character. */ TEX_mode (inf); /* Initialize token table once from environment. */ - if (!TEX_toktab) - TEX_toktab = TEX_decode_env ("TEXTAGS", TEX_defenv); + if (TEX_toktab == NULL) + TEX_decode_env ("TEXTAGS", TEX_defenv); LOOP_ON_INPUT_LINES (inf, lb, cp) { - lasthit = cp; - /* Look at each esc in line. */ - while ((cp = etags_strchr (cp, TEX_esc)) != NULL) + /* Look at each TEX keyword in line. */ + for (;;) { - if (*++cp == '\0') - break; - linecharno += cp - lasthit; - lasthit = cp; - i = TEX_Token (lasthit); - if (i >= 0) - { - /* We seem to include the TeX command in the tag name. - register char *p; - for (p = lasthit + TEX_toktab[i].len; - *p != '\0' && *p != TEX_clgrp; - p++) - continue; */ - pfnote (/*savenstr (lasthit, p-lasthit)*/ (char *)NULL, TRUE, - lb.buffer, lb.len, lineno, linecharno); - break; /* We only tag a line once */ - } + /* Look for a TEX escape. */ + while (*cp++ != TEX_esc) + if (cp[-1] == '\0' || cp[-1] == '%') + goto tex_next_line; + + for (key = TEX_toktab; key->buffer != NULL; key++) + if (strneq (cp, key->buffer, key->len)) + { + register char *p; + int namelen, linelen; + bool opgrp = FALSE; + + cp = skip_spaces (cp + key->len); + if (*cp == TEX_opgrp) + { + opgrp = TRUE; + cp++; + } + for (p = cp; + (!iswhite (*p) && *p != '#' && + *p != TEX_opgrp && *p != TEX_clgrp); + p++) + continue; + namelen = p - cp; + linelen = lb.len; + if (!opgrp || *p == TEX_clgrp) + { + while (*p != '\0' && *p != TEX_opgrp && *p != TEX_clgrp) + p++; + linelen = p - lb.buffer + 1; + } + make_tag (cp, namelen, TRUE, + lb.buffer, linelen, lineno, linecharno); + goto tex_next_line; /* We only tag a line once */ + } } + tex_next_line: + ; } } #define TEX_LESC '\\' #define TEX_SESC '!' -#define TEX_cmt '%' /* Figure out whether TeX's escapechar is '\\' or '!' and set grouping chars accordingly. */ @@ -4554,8 +5246,8 @@ TEX_mode (inf) while ((c = getc (inf)) != EOF) { /* Skip to next line if we hit the TeX comment char. */ - if (c == TEX_cmt) - while (c != '\n') + if (c == '%') + while (c != '\n' && c != EOF) c = getc (inf); else if (c == TEX_LESC || c == TEX_SESC ) break; @@ -4580,15 +5272,13 @@ TEX_mode (inf) /* Read environment and prepend it to the default string. Build token table. */ -static struct TEX_tabent * +static void TEX_decode_env (evarname, defenv) char *evarname; char *defenv; { register char *env, *p; - - struct TEX_tabent *tab; - int size, i; + int i, len; /* Append default string to environment. */ env = getenv (evarname); @@ -4601,52 +5291,33 @@ TEX_decode_env (evarname, defenv) } /* Allocate a token table */ - for (size = 1, p = env; p;) + for (len = 1, p = env; p;) if ((p = etags_strchr (p, ':')) && *++p != '\0') - size++; - /* Add 1 to leave room for null terminator. */ - tab = xnew (size + 1, struct TEX_tabent); + len++; + TEX_toktab = xnew (len, linebuffer); /* Unpack environment string into token table. Be careful about */ /* zero-length strings (leading ':', "::" and trailing ':') */ - for (i = 0; *env;) + for (i = 0; *env != '\0';) { p = etags_strchr (env, ':'); if (!p) /* End of environment string. */ p = env + strlen (env); if (p - env > 0) { /* Only non-zero strings. */ - tab[i].name = savenstr (env, p - env); - tab[i].len = strlen (tab[i].name); + TEX_toktab[i].buffer = savenstr (env, p - env); + TEX_toktab[i].len = p - env; i++; } if (*p) env = p + 1; else { - tab[i].name = NULL; /* Mark end of table. */ - tab[i].len = 0; + TEX_toktab[i].buffer = NULL; /* Mark end of table. */ + TEX_toktab[i].len = 0; break; } } - return tab; -} - -/* If the text at CP matches one of the tag-defining TeX command names, - return the pointer to the first occurrence of that command in TEX_toktab. - Otherwise return -1. - Keep the capital `T' in `token' for dumb truncating compilers - (this distinguishes it from `TEX_toktab' */ -static int -TEX_Token (cp) - char *cp; -{ - int i; - - for (i = 0; TEX_toktab[i].len > 0; i++) - if (strneq (TEX_toktab[i].name, cp, TEX_toktab[i].len)) - return i; - return -1; } @@ -4657,32 +5328,149 @@ Texinfo_nodes (inf) { char *cp, *start; LOOP_ON_INPUT_LINES (inf, lb, cp) - { - if ((*cp++ == '@' - && *cp++ == 'n' - && *cp++ == 'o' - && *cp++ == 'd' - && *cp++ == 'e' && iswhite (*cp++))) - { - start = cp = skip_spaces(cp); - while (*cp != '\0' && *cp != ',') - cp++; - pfnote (savenstr (start, cp - start), TRUE, + if (LOOKING_AT (cp, "@node")) + { + start = cp; + while (*cp != '\0' && *cp != ',') + cp++; + make_tag (start, cp - start, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); - } - } + } +} + + +/* + * HTML support. + * Contents of , <h1>, <h2>, <h3> are tags. + * Contents of <a name=xxx> are tags with name xxx. + * + * Francesco Potortì, 2002. + */ +static void +HTML_labels (inf) + FILE * inf; +{ + bool getnext = FALSE; /* next text outside of HTML tags is a tag */ + bool skiptag = FALSE; /* skip to the end of the current HTML tag */ + bool intag = FALSE; /* inside an html tag, looking for ID= */ + bool inanchor = FALSE; /* when INTAG, is an anchor, look for NAME= */ + char *end; + + + linebuffer_setlen (&token_name, 0); /* no name in buffer */ + + LOOP_ON_INPUT_LINES (inf, lb, dbp) + for (;;) /* loop on the same line */ + { + if (skiptag) /* skip HTML tag */ + { + while (*dbp != '\0' && *dbp != '>') + dbp++; + if (*dbp == '>') + { + dbp += 1; + skiptag = FALSE; + continue; /* look on the same line */ + } + break; /* go to next line */ + } + + else if (intag) /* look for "name=" or "id=" */ + { + while (*dbp != '\0' && *dbp != '>' + && lowcase (*dbp) != 'n' && lowcase (*dbp) != 'i') + dbp++; + if (*dbp == '\0') + break; /* go to next line */ + if (*dbp == '>') + { + dbp += 1; + intag = FALSE; + continue; /* look on the same line */ + } + if ((inanchor && LOOKING_AT_NOCASE (dbp, "name=")) + || LOOKING_AT_NOCASE (dbp, "id=")) + { + bool quoted = (dbp[0] == '"'); + + if (quoted) + for (end = ++dbp; *end != '\0' && *end != '"'; end++) + continue; + else + for (end = dbp; *end != '\0' && intoken (*end); end++) + continue; + linebuffer_setlen (&token_name, end - dbp); + strncpy (token_name.buffer, dbp, end - dbp); + token_name.buffer[end - dbp] = '\0'; + + dbp = end; + intag = FALSE; /* we found what we looked for */ + skiptag = TRUE; /* skip to the end of the tag */ + getnext = TRUE; /* then grab the text */ + continue; /* look on the same line */ + } + dbp += 1; + } + + else if (getnext) /* grab next tokens and tag them */ + { + dbp = skip_spaces (dbp); + if (*dbp == '\0') + break; /* go to next line */ + if (*dbp == '<') + { + intag = TRUE; + inanchor = (lowcase (dbp[1]) == 'a' && !intoken (dbp[2])); + continue; /* look on the same line */ + } + + for (end = dbp + 1; *end != '\0' && *end != '<'; end++) + continue; + make_tag (token_name.buffer, token_name.len, TRUE, + dbp, end - dbp, lineno, linecharno); + linebuffer_setlen (&token_name, 0); /* no name in buffer */ + getnext = FALSE; + break; /* go to next line */ + } + + else /* look for an interesting HTML tag */ + { + while (*dbp != '\0' && *dbp != '<') + dbp++; + if (*dbp == '\0') + break; /* go to next line */ + intag = TRUE; + if (lowcase (dbp[1]) == 'a' && !intoken (dbp[2])) + { + inanchor = TRUE; + continue; /* look on the same line */ + } + else if (LOOKING_AT_NOCASE (dbp, "<title>") + || LOOKING_AT_NOCASE (dbp, "<h1>") + || LOOKING_AT_NOCASE (dbp, "<h2>") + || LOOKING_AT_NOCASE (dbp, "<h3>")) + { + intag = FALSE; + getnext = TRUE; + continue; /* look on the same line */ + } + dbp += 1; + } + } } /* - * Prolog support (rewritten) by Anders Lindgren, Mar. 96 + * Prolog support * - * Assumes that the predicate starts at column 0. - * Only the first clause of a predicate is added. + * Assumes that the predicate or rule starts at column 0. + * Only the first clause of a predicate or rule is added. + * Original code by Sunichirou Sugou (1989) + * Rewritten by Anders Lindgren (1996) */ -static int prolog_pred P_((char *, char *)); -static void prolog_skip_comment P_((linebuffer *, FILE *)); -static int prolog_atom P_((char *, int)); +static int prolog_pr __P((char *, char *)); +static void prolog_skip_comment __P((linebuffer *, FILE *)); +static int prolog_atom __P((char *, int)); static void Prolog_functions (inf) @@ -4704,10 +5492,10 @@ Prolog_functions (inf) continue; else if (cp[0] == '/' && cp[1] == '*') /* comment. */ prolog_skip_comment (&lb, inf); - else if ((len = prolog_pred (cp, last)) > 0) + else if ((len = prolog_pr (cp, last)) > 0) { - /* Predicate. Store the function name so that we only - generate a tag for the first clause. */ + /* Predicate or rule. Store the function name so that we + only generate a tag for the first clause. */ if (last == NULL) last = xnew(len + 1, char); else if (len + 1 > allocated) @@ -4717,6 +5505,8 @@ Prolog_functions (inf) last[len] = '\0'; } } + if (last != NULL) + free (last); } @@ -4732,24 +5522,24 @@ prolog_skip_comment (plb, inf) for (cp = plb->buffer; *cp != '\0'; cp++) if (cp[0] == '*' && cp[1] == '/') return; - lineno++; - linecharno += readline (plb, inf); + readline (plb, inf); } while (!feof(inf)); } /* - * A predicate definition is added if it matches: + * A predicate or rule definition is added if it matches: * <beginning of line><Prolog Atom><whitespace>( + * or <beginning of line><Prolog Atom><whitespace>:- * * It is added to the tags database if it doesn't match the * name of the previous clause header. * - * Return the size of the name of the predicate, or 0 if no header - * was found. + * Return the size of the name of the predicate or rule, or 0 if no + * header was found. */ static int -prolog_pred (s, last) +prolog_pr (s, last) char *s; char *last; /* Name of last clause. */ { @@ -4763,21 +5553,18 @@ prolog_pred (s, last) len = pos; pos = skip_spaces (s + pos) - s; - if ((s[pos] == '(') || (s[pos] == '.')) - { - if (s[pos] == '(') - pos++; - - /* Save only the first clause. */ - if (last == NULL + if ((s[pos] == '.' + || (s[pos] == '(' && (pos += 1)) + || (s[pos] == ':' && s[pos + 1] == '-' && (pos += 2))) + && (last == NULL /* save only the first clause */ || len != (int)strlen (last) - || !strneq (s, last, len)) + || !strneq (s, last, len))) { - pfnote (savenstr (s, len), TRUE, s, pos, lineno, linecharno); + make_tag (s, len, TRUE, s, pos, lineno, linecharno); return len; } - } - return 0; + else + return 0; } /* @@ -4812,7 +5599,7 @@ prolog_atom (s, pos) { pos++; - while (1) + for (;;) { if (s[pos] == '\'') { @@ -4841,15 +5628,15 @@ prolog_atom (s, pos) /* - * Support for Erlang -- Anders Lindgren, Feb 1996. + * Support for Erlang * * Generates tags for functions, defines, and records. - * * Assumes that Erlang functions start at column 0. + * Original code by Anders Lindgren (1996) */ -static int erlang_func P_((char *, char *)); -static void erlang_attribute P_((char *)); -static int erlang_atom P_((char *, int)); +static int erlang_func __P((char *, char *)); +static void erlang_attribute __P((char *)); +static int erlang_atom __P((char *)); static void Erlang_functions (inf) @@ -4876,7 +5663,11 @@ Erlang_functions (inf) else if (cp[0] == '-') /* attribute, e.g. "-define" */ { erlang_attribute (cp); - last = NULL; + if (last != NULL) + { + free (last); + last = NULL; + } } else if ((len = erlang_func (cp, last)) > 0) { @@ -4893,6 +5684,8 @@ Erlang_functions (inf) last[len] = '\0'; } } + if (last != NULL) + free (last); } @@ -4914,7 +5707,7 @@ erlang_func (s, last) int pos; int len; - pos = erlang_atom (s, 0); + pos = erlang_atom (s); if (pos < 1) return 0; @@ -4927,7 +5720,7 @@ erlang_func (s, last) || len != (int)strlen (last) || !strneq (s, last, len))) { - pfnote (savenstr (s, len), TRUE, s, pos, lineno, linecharno); + make_tag (s, len, TRUE, s, pos, lineno, linecharno); return len; } @@ -4948,20 +5741,14 @@ static void erlang_attribute (s) char *s; { - int pos; - int len; + char *cp = s; - if (strneq (s, "-define", 7) || strneq (s, "-record", 7)) + if ((LOOKING_AT (cp, "-define") || LOOKING_AT (cp, "-record")) + && *cp++ == '(') { - pos = skip_spaces (s + 7) - s; - if (s[pos++] == '(') - { - pos = skip_spaces (s + pos) - s; - len = erlang_atom (s, pos); - if (len != 0) - pfnote (savenstr (& s[pos], len), TRUE, - s, pos + len, lineno, linecharno); - } + int len = erlang_atom (skip_spaces (cp)); + if (len > 0) + make_tag (cp, len, TRUE, s, cp + len - s, lineno, linecharno); } return; } @@ -4972,65 +5759,44 @@ erlang_attribute (s) * Return the number of bytes consumed, or -1 if there was an error. */ static int -erlang_atom (s, pos) +erlang_atom (s) char *s; - int pos; { - int origpos; - - origpos = pos; + int pos = 0; if (ISALPHA (s[pos]) || s[pos] == '_') { /* The atom is unquoted. */ - pos++; - while (ISALNUM (s[pos]) || s[pos] == '_') + do pos++; - return pos - origpos; + while (ISALNUM (s[pos]) || s[pos] == '_'); } else if (s[pos] == '\'') { + for (pos++; s[pos] != '\''; pos++) + if (s[pos] == '\0' /* multiline quoted atoms are ignored */ + || (s[pos] == '\\' && s[++pos] == '\0')) + return 0; pos++; - - while (1) - { - if (s[pos] == '\'') - { - pos++; - break; - } - else if (s[pos] == '\0') - /* Multiline quoted atoms are ignored. */ - return -1; - else if (s[pos] == '\\') - { - if (s[pos+1] == '\0') - return -1; - pos += 2; - } - else - pos++; - } - return pos - origpos; } - else - return -1; + + return pos; } -#ifdef ETAGS_REGEXPS - -static char *scan_separators P_((char *)); -static void analyse_regex P_((char *, bool)); -static void add_regex P_((char *, bool, language *)); -static char *substitute P_((char *, char *, struct re_registers *)); - -/* Take a string like "/blah/" and turn it into "blah", making sure - that the first and last characters are the same, and handling - quoted separator characters. Actually, stops on the occurrence of - an unquoted separator. Also turns "\t" into a Tab character. - Returns pointer to terminating separator. Works in place. Null - terminates name string. */ +static char *scan_separators __P((char *)); +static void add_regex __P((char *, language *)); +static char *substitute __P((char *, char *, struct re_registers *)); + +/* + * Take a string like "/blah/" and turn it into "blah", verifying + * that the first and last characters are the same, and handling + * quoted separator characters. Actually, stops on the occurrence of + * an unquoted separator. Also process \t, \n, etc. and turn into + * appropriate characters. Works in place. Null terminates name string. + * Returns pointer to terminating separator, or NULL for + * unterminated regexps. + */ static char * scan_separators (name) char *name; @@ -5043,15 +5809,27 @@ scan_separators (name) { if (quoted) { - if (*name == 't') - *copyto++ = '\t'; - else if (*name == sep) - *copyto++ = sep; - else + switch (*name) { - /* Something else is quoted, so preserve the quote. */ - *copyto++ = '\\'; - *copyto++ = *name; + case 'a': *copyto++ = '\007'; break; /* BEL (bell) */ + case 'b': *copyto++ = '\b'; break; /* BS (back space) */ + case 'd': *copyto++ = 0177; break; /* DEL (delete) */ + case 'e': *copyto++ = 033; break; /* ESC (delete) */ + case 'f': *copyto++ = '\f'; break; /* FF (form feed) */ + case 'n': *copyto++ = '\n'; break; /* NL (new line) */ + case 'r': *copyto++ = '\r'; break; /* CR (carriage return) */ + case 't': *copyto++ = '\t'; break; /* TAB (horizontal tab) */ + case 'v': *copyto++ = '\v'; break; /* VT (vertical tab) */ + default: + if (*name == sep) + *copyto++ = sep; + else + { + /* Something else is quoted, so preserve the quote. */ + *copyto++ = '\\'; + *copyto++ = *name; + } + break; } quoted = FALSE; } @@ -5062,6 +5840,8 @@ scan_separators (name) else *copyto++ = *name; } + if (*name != sep) + name = NULL; /* signal unterminated regexp */ /* Terminate copied string. */ *copyto = '\0'; @@ -5071,12 +5851,14 @@ scan_separators (name) /* Look at the argument of --regex or --no-regex and do the right thing. Same for each line of a regexp file. */ static void -analyse_regex (regex_arg, ignore_case) +analyse_regex (regex_arg) char *regex_arg; - bool ignore_case; { if (regex_arg == NULL) - free_patterns (); /* --no-regex: remove existing regexps */ + { + free_regexps (); /* --no-regex: remove existing regexps */ + return; + } /* A real --regexp option or a line in a regexp file. */ switch (regex_arg[0]) @@ -5102,9 +5884,9 @@ analyse_regex (regex_arg, ignore_case) pfatal (regexfile); return; } - initbuffer (®exbuf); + linebuffer_init (®exbuf); while (readline_internal (®exbuf, regexfp) > 0) - analyse_regex (regexbuf.buffer, ignore_case); + analyse_regex (regexbuf.buffer); free (regexbuf.buffer); fclose (regexfp); } @@ -5123,69 +5905,136 @@ analyse_regex (regex_arg, ignore_case) error ("unterminated language name in regex: %s", regex_arg); return; } - *cp = '\0'; + *cp++ = '\0'; lang = get_language_from_langname (lang_name); if (lang == NULL) return; - add_regex (cp + 1, ignore_case, lang); + add_regex (cp, lang); } break; /* Regexp to be used for any language. */ default: - add_regex (regex_arg, ignore_case, NULL); + add_regex (regex_arg, NULL); break; } } -/* Turn a name, which is an ed-style (but Emacs syntax) regular - expression, into a real regular expression by compiling it. */ +/* Separate the regexp pattern, compile it, + and care for optional name and modifiers. */ static void -add_regex (regexp_pattern, ignore_case, lang) +add_regex (regexp_pattern, lang) char *regexp_pattern; - bool ignore_case; language *lang; { static struct re_pattern_buffer zeropattern; - char *name; + char sep, *pat, *name, *modifiers; const char *err; struct re_pattern_buffer *patbuf; - pattern *pp; + regexp *rp; + bool + force_explicit_name = TRUE, /* do not use implicit tag names */ + ignore_case = FALSE, /* case is significant */ + multi_line = FALSE, /* matches are done one line at a time */ + single_line = FALSE; /* dot does not match newline */ - if (regexp_pattern[strlen(regexp_pattern)-1] != regexp_pattern[0]) + if (strlen(regexp_pattern) < 3) { - error ("%s: unterminated regexp", regexp_pattern); + error ("null regexp", (char *)NULL); return; } + sep = regexp_pattern[0]; name = scan_separators (regexp_pattern); - if (regexp_pattern[0] == '\0') + if (name == NULL) { - error ("null regexp", (char *)NULL); + error ("%s: unterminated regexp", regexp_pattern); + return; + } + if (name[1] == sep) + { + error ("null name for regexp \"%s\"", regexp_pattern); return; } - (void) scan_separators (name); + modifiers = scan_separators (name); + if (modifiers == NULL) /* no terminating separator --> no name */ + { + modifiers = name; + name = ""; + } + else + modifiers += 1; /* skip separator */ + + /* Parse regex modifiers. */ + for (; modifiers[0] != '\0'; modifiers++) + switch (modifiers[0]) + { + case 'N': + if (modifiers == name) + error ("forcing explicit tag name but no name, ignoring", NULL); + force_explicit_name = TRUE; + break; + case 'i': + ignore_case = TRUE; + break; + case 's': + single_line = TRUE; + /* FALLTHRU */ + case 'm': + multi_line = TRUE; + need_filebuf = TRUE; + break; + default: + { + char wrongmod [2]; + wrongmod[0] = modifiers[0]; + wrongmod[1] = '\0'; + error ("invalid regexp modifier `%s', ignoring", wrongmod); + } + break; + } patbuf = xnew (1, struct re_pattern_buffer); *patbuf = zeropattern; - /* Translation table to fold case if appropriate. */ - patbuf->translate = (ignore_case) ? lc_trans : NULL; + if (ignore_case) + { + static char lc_trans[CHARS]; + int i; + for (i = 0; i < CHARS; i++) + lc_trans[i] = lowcase (i); + patbuf->translate = lc_trans; /* translation table to fold case */ + } + + if (multi_line) + pat = concat ("^", regexp_pattern, ""); /* anchor to beginning of line */ + else + pat = regexp_pattern; + + if (single_line) + re_set_syntax (RE_SYNTAX_EMACS | RE_DOT_NEWLINE); + else + re_set_syntax (RE_SYNTAX_EMACS); - err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf); + err = re_compile_pattern (pat, strlen (regexp_pattern), patbuf); + if (multi_line) + free (pat); if (err != NULL) { error ("%s while compiling pattern", err); return; } - pp = p_head; - p_head = xnew (1, pattern); - p_head->regex = savestr (regexp_pattern); - p_head->p_next = pp; - p_head->language = lang; - p_head->pattern = patbuf; - p_head->name_pattern = savestr (name); + rp = p_head; + p_head = xnew (1, regexp); + p_head->pattern = savestr (regexp_pattern); + p_head->p_next = rp; + p_head->lang = lang; + p_head->pat = patbuf; + p_head->name = savestr (name); p_head->error_signaled = FALSE; + p_head->force_explicit_name = force_explicit_name; + p_head->ignore_case = ignore_case; + p_head->multi_line = multi_line; } /* @@ -5219,6 +6068,7 @@ substitute (in, out, regs) size -= 1; /* Allocate space and do the substitutions. */ + assert (size >= 0); result = xnew (size + 1, char); for (t = result; *out != '\0'; out++) @@ -5233,55 +6083,146 @@ substitute (in, out, regs) *t++ = *out; *t = '\0'; - assert (t <= result + size && t - result == (int)strlen (result)); + assert (t <= result + size); + assert (t - result == (int)strlen (result)); return result; } -/* Deallocate all patterns. */ +/* Deallocate all regexps. */ static void -free_patterns () +free_regexps () { - pattern *pp; + regexp *rp; while (p_head != NULL) { - pp = p_head->p_next; - free (p_head->regex); - free (p_head->name_pattern); + rp = p_head->p_next; + free (p_head->pattern); + free (p_head->name); free (p_head); - p_head = pp; + p_head = rp; } return; } -#endif /* ETAGS_REGEXPS */ - +/* + * Reads the whole file as a single string from `filebuf' and looks for + * multi-line regular expressions, creating tags on matches. + * readline already dealt with normal regexps. + * + * Idea by Ben Wing <ben@666.com> (2002). + */ static void -get_tag (bp) - register char *bp; +regex_tag_multiline () { - register char *cp; + char *buffer = filebuf.buffer; + regexp *rp; + char *name; - if (*bp == '\0') - return; - /* Go till you get to white space or a syntactic break */ - for (cp = bp + 1; - *cp != '\0' && *cp != '(' && *cp != ')' && !iswhite (*cp); - cp++) - continue; - pfnote (savenstr (bp, cp-bp), TRUE, - lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + for (rp = p_head; rp != NULL; rp = rp->p_next) + { + int match = 0; + + if (!rp->multi_line) + continue; /* skip normal regexps */ + + /* Generic initialisations before parsing file from memory. */ + lineno = 1; /* reset global line number */ + charno = 0; /* reset global char number */ + linecharno = 0; /* reset global char number of line start */ + + /* Only use generic regexps or those for the current language. */ + if (rp->lang != NULL && rp->lang != curfdp->lang) + continue; + + while (match >= 0 && match < filebuf.len) + { + match = re_search (rp->pat, buffer, filebuf.len, charno, + filebuf.len - match, &rp->regs); + switch (match) + { + case -2: + /* Some error. */ + if (!rp->error_signaled) + { + error ("regexp stack overflow while matching \"%s\"", + rp->pattern); + rp->error_signaled = TRUE; + } + break; + case -1: + /* No match. */ + break; + default: + if (match == rp->regs.end[0]) + { + if (!rp->error_signaled) + { + error ("regexp matches the empty string: \"%s\"", + rp->pattern); + rp->error_signaled = TRUE; + } + match = -3; /* exit from while loop */ + break; + } + + /* Match occurred. Construct a tag. */ + while (charno < rp->regs.end[0]) + if (buffer[charno++] == '\n') + lineno++, linecharno = charno; + name = rp->name; + if (name[0] == '\0') + name = NULL; + else /* make a named tag */ + name = substitute (buffer, rp->name, &rp->regs); + if (rp->force_explicit_name) + /* Force explicit tag name, if a name is there. */ + pfnote (name, TRUE, buffer + linecharno, + charno - linecharno + 1, lineno, linecharno); + else + make_tag (name, strlen (name), TRUE, buffer + linecharno, + charno - linecharno + 1, lineno, linecharno); + break; + } + } + } +} + + +static bool +nocase_tail (cp) + char *cp; +{ + register int len = 0; + + while (*cp != '\0' && lowcase (*cp) == lowcase (dbp[len])) + cp++, len++; + if (*cp == '\0' && !intoken (dbp[len])) + { + dbp += len; + return TRUE; + } + return FALSE; } -/* Initialize a linebuffer for use */ static void -initbuffer (lbp) - linebuffer *lbp; +get_tag (bp, namepp) + register char *bp; + char **namepp; { - lbp->size = (DEBUG) ? 3 : 200; - lbp->buffer = xnew (lbp->size, char); - lbp->buffer[0] = '\0'; - lbp->len = 0; + register char *cp = bp; + + if (*bp != '\0') + { + /* Go till you get to white space or a syntactic break */ + for (cp = bp + 1; !notinname (*cp); cp++) + continue; + make_tag (bp, cp - bp, TRUE, + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + } + + if (namepp != NULL) + *namepp = savenstr (bp, cp - bp); } /* @@ -5289,10 +6230,13 @@ initbuffer (lbp) * newline or CR-NL, if any. Return the number of characters read from * `stream', which is the length of the line including the newline. * - * On DOS or Windows we do not count the CR character, if any, before the - * NL, in the returned length; this mirrors the behavior of emacs on those + * On DOS or Windows we do not count the CR character, if any before the + * NL, in the returned length; this mirrors the behavior of Emacs on those * platforms (for text files, it translates CR-NL to NL as it reads in the * file). + * + * If multi-line regular expressions are requested, each line read is + * appended to `filebuf'. */ static long readline_internal (lbp, stream) @@ -5306,7 +6250,7 @@ readline_internal (lbp, stream) pend = p + lbp->size; /* Separate to avoid 386/IX compiler bug. */ - while (1) + for (;;) { register int c = getc (stream); if (p == pend) @@ -5351,68 +6295,217 @@ readline_internal (lbp, stream) } lbp->len = p - buffer; + if (need_filebuf /* we need filebuf for multi-line regexps */ + && chars_deleted > 0) /* not at EOF */ + { + while (filebuf.size <= filebuf.len + lbp->len + 1) /* +1 for \n */ + { + /* Expand filebuf. */ + filebuf.size *= 2; + xrnew (filebuf.buffer, filebuf.size, char); + } + strncpy (filebuf.buffer + filebuf.len, lbp->buffer, lbp->len); + filebuf.len += lbp->len; + filebuf.buffer[filebuf.len++] = '\n'; + filebuf.buffer[filebuf.len] = '\0'; + } + return lbp->len + chars_deleted; } /* * Like readline_internal, above, but in addition try to match the - * input line against relevant regular expressions. + * input line against relevant regular expressions and manage #line + * directives. */ -static long +static void readline (lbp, stream) linebuffer *lbp; FILE *stream; { - /* Read new line. */ - long result = readline_internal (lbp, stream); -#ifdef ETAGS_REGEXPS - int match; - pattern *pp; - - /* Match against relevant patterns. */ - if (lbp->len > 0) - for (pp = p_head; pp != NULL; pp = pp->p_next) - { - /* Only use generic regexps or those for the current language. */ - if (pp->language != NULL && pp->language != curlang) - continue; + long result; - match = re_match (pp->pattern, lbp->buffer, lbp->len, 0, &pp->regs); - switch (match) - { - case -2: - /* Some error. */ - if (!pp->error_signaled) - { - error ("error while matching \"%s\"", pp->regex); - pp->error_signaled = TRUE; - } - break; - case -1: - /* No match. */ - break; - default: - /* Match occurred. Construct a tag. */ - if (pp->name_pattern[0] != '\0') - { - /* Make a named tag. */ - char *name = substitute (lbp->buffer, - pp->name_pattern, &pp->regs); - if (name != NULL) - pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno); - } - else - { - /* Make an unnamed tag. */ - pfnote ((char *)NULL, TRUE, - lbp->buffer, match, lineno, linecharno); - } - break; - } - } -#endif /* ETAGS_REGEXPS */ + linecharno = charno; /* update global char number of line start */ + result = readline_internal (lbp, stream); /* read line */ + lineno += 1; /* increment global line number */ + charno += result; /* increment global char number */ - return result; + /* Honour #line directives. */ + if (!no_line_directive) + { + static bool discard_until_line_directive; + + /* Check whether this is a #line directive. */ + if (result > 12 && strneq (lbp->buffer, "#line ", 6)) + { + unsigned int lno; + int start = 0; + + if (sscanf (lbp->buffer, "#line %u \"%n", &lno, &start) >= 1 + && start > 0) /* double quote character found */ + { + char *endp = lbp->buffer + start; + + while ((endp = etags_strchr (endp, '"')) != NULL + && endp[-1] == '\\') + endp++; + if (endp != NULL) + /* Ok, this is a real #line directive. Let's deal with it. */ + { + char *taggedabsname; /* absolute name of original file */ + char *taggedfname; /* name of original file as given */ + char *name; /* temp var */ + + discard_until_line_directive = FALSE; /* found it */ + name = lbp->buffer + start; + *endp = '\0'; + canonicalize_filename (name); /* for DOS */ + taggedabsname = absolute_filename (name, tagfiledir); + if (filename_is_absolute (name) + || filename_is_absolute (curfdp->infname)) + taggedfname = savestr (taggedabsname); + else + taggedfname = relative_filename (taggedabsname,tagfiledir); + + if (streq (curfdp->taggedfname, taggedfname)) + /* The #line directive is only a line number change. We + deal with this afterwards. */ + free (taggedfname); + else + /* The tags following this #line directive should be + attributed to taggedfname. In order to do this, set + curfdp accordingly. */ + { + fdesc *fdp; /* file description pointer */ + + /* Go look for a file description already set up for the + file indicated in the #line directive. If there is + one, use it from now until the next #line + directive. */ + for (fdp = fdhead; fdp != NULL; fdp = fdp->next) + if (streq (fdp->infname, curfdp->infname) + && streq (fdp->taggedfname, taggedfname)) + /* If we remove the second test above (after the &&) + then all entries pertaining to the same file are + coalesced in the tags file. If we use it, then + entries pertaining to the same file but generated + from different files (via #line directives) will + go into separate sections in the tags file. These + alternatives look equivalent. The first one + destroys some apparently useless information. */ + { + curfdp = fdp; + free (taggedfname); + break; + } + /* Else, if we already tagged the real file, skip all + input lines until the next #line directive. */ + if (fdp == NULL) /* not found */ + for (fdp = fdhead; fdp != NULL; fdp = fdp->next) + if (streq (fdp->infabsname, taggedabsname)) + { + discard_until_line_directive = TRUE; + free (taggedfname); + break; + } + /* Else create a new file description and use that from + now on, until the next #line directive. */ + if (fdp == NULL) /* not found */ + { + fdp = fdhead; + fdhead = xnew (1, fdesc); + *fdhead = *curfdp; /* copy curr. file description */ + fdhead->next = fdp; + fdhead->infname = savestr (curfdp->infname); + fdhead->infabsname = savestr (curfdp->infabsname); + fdhead->infabsdir = savestr (curfdp->infabsdir); + fdhead->taggedfname = taggedfname; + fdhead->usecharno = FALSE; + fdhead->prop = NULL; + fdhead->written = FALSE; + curfdp = fdhead; + } + } + free (taggedabsname); + lineno = lno - 1; + readline (lbp, stream); + return; + } /* if a real #line directive */ + } /* if #line is followed by a a number */ + } /* if line begins with "#line " */ + + /* If we are here, no #line directive was found. */ + if (discard_until_line_directive) + { + if (result > 0) + { + /* Do a tail recursion on ourselves, thus discarding the contents + of the line buffer. */ + readline (lbp, stream); + return; + } + /* End of file. */ + discard_until_line_directive = FALSE; + return; + } + } /* if #line directives should be considered */ + + { + int match; + regexp *rp; + char *name; + + /* Match against relevant regexps. */ + if (lbp->len > 0) + for (rp = p_head; rp != NULL; rp = rp->p_next) + { + /* Only use generic regexps or those for the current language. + Also do not use multiline regexps, which is the job of + regex_tag_multiline. */ + if ((rp->lang != NULL && rp->lang != fdhead->lang) + || rp->multi_line) + continue; + + match = re_match (rp->pat, lbp->buffer, lbp->len, 0, &rp->regs); + switch (match) + { + case -2: + /* Some error. */ + if (!rp->error_signaled) + { + error ("regexp stack overflow while matching \"%s\"", + rp->pattern); + rp->error_signaled = TRUE; + } + break; + case -1: + /* No match. */ + break; + case 0: + /* Empty string matched. */ + if (!rp->error_signaled) + { + error ("regexp matches the empty string: \"%s\"", rp->pattern); + rp->error_signaled = TRUE; + } + break; + default: + /* Match occurred. Construct a tag. */ + name = rp->name; + if (name[0] == '\0') + name = NULL; + else /* make a named tag */ + name = substitute (lbp->buffer, rp->name, &rp->regs); + if (rp->force_explicit_name) + /* Force explicit tag name, if a name is there. */ + pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno); + else + make_tag (name, strlen (name), TRUE, + lbp->buffer, match, lineno, linecharno); + break; + } + } + } } @@ -5466,7 +6559,6 @@ etags_strrchr (sp, c) return (char *)r; } - /* * Return the ptr in sp at which the character c first * appears; NULL if not found @@ -5486,7 +6578,54 @@ etags_strchr (sp, c) return NULL; } -/* Skip spaces, return new pointer. */ +/* + * Compare two strings, ignoring case for alphabetic characters. + * + * Same as BSD's strcasecmp, included for portability. + */ +static int +etags_strcasecmp (s1, s2) + register const char *s1; + register const char *s2; +{ + while (*s1 != '\0' + && (ISALPHA (*s1) && ISALPHA (*s2) + ? lowcase (*s1) == lowcase (*s2) + : *s1 == *s2)) + s1++, s2++; + + return (ISALPHA (*s1) && ISALPHA (*s2) + ? lowcase (*s1) - lowcase (*s2) + : *s1 - *s2); +} + +/* + * Compare two strings, ignoring case for alphabetic characters. + * Stop after a given number of characters + * + * Same as BSD's strncasecmp, included for portability. + */ +static int +etags_strncasecmp (s1, s2, n) + register const char *s1; + register const char *s2; + register int n; +{ + while (*s1 != '\0' && n-- > 0 + && (ISALPHA (*s1) && ISALPHA (*s2) + ? lowcase (*s1) == lowcase (*s2) + : *s1 == *s2)) + s1++, s2++; + + if (n < 0) + return 0; + else + return (ISALPHA (*s1) && ISALPHA (*s2) + ? lowcase (*s1) - lowcase (*s2) + : *s1 - *s2); +} + +/* Skip spaces (end of string is not space), return new pointer. */ static char * skip_spaces (cp) char *cp; @@ -5496,7 +6635,7 @@ skip_spaces (cp) return cp; } -/* Skip non spaces, return new pointer. */ +/* Skip non spaces, except end of string, return new pointer. */ static char * skip_non_spaces (cp) char *cp; @@ -5512,7 +6651,7 @@ fatal (s1, s2) char *s1, *s2; { error (s1, s2); - exit (BAD); + exit (EXIT_FAILURE); } static void @@ -5520,21 +6659,15 @@ pfatal (s1) char *s1; { perror (s1); - exit (BAD); + exit (EXIT_FAILURE); } static void suggest_asking_for_help () { fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", - progname, -#ifdef LONG_OPTIONS - "--help" -#else - "-h" -#endif - ); - exit (BAD); + progname, NO_LONG_OPTIONS ? "-h" : "--help"); + exit (EXIT_FAILURE); } /* Print error message. `s1' is printf control string, `s2' is arg for it. */ @@ -5604,7 +6737,7 @@ etags_getcwd () linebuffer path; FILE *pipe; - initbuffer (&path); + linebuffer_init (&path); pipe = (FILE *) popen ("pwd 2>/dev/null", "r"); if (pipe == NULL || readline_internal (&path, pipe) == 0) pfatal ("pwd"); @@ -5710,8 +6843,11 @@ absolute_filename (file, dir) slashp = etags_strchr (slashp + 1, '/'); } - if (res[0] == '\0') - return savestr ("/"); + if (res[0] == '\0') /* just a safety net: should never happen */ + { + free (res); + return savestr ("/"); + } else return res; } @@ -5770,6 +6906,18 @@ canonicalize_filename (fn) #endif } + +/* Initialize a linebuffer for use */ +static void +linebuffer_init (lbp) + linebuffer *lbp; +{ + lbp->size = (DEBUG) ? 3 : 200; + lbp->buffer = xnew (lbp->size, char); + lbp->buffer[0] = '\0'; + lbp->len = 0; +} + /* Set the minimum size of a string contained in a linebuffer. */ static void linebuffer_setlen (lbp, toksize) @@ -5784,24 +6932,39 @@ linebuffer_setlen (lbp, toksize) lbp->len = toksize; } -/* Like malloc but get fatal error if memory is exhausted. */ -long * +/* Like malloc but get fatal error if memory is exhausted. */ +static PTR xmalloc (size) unsigned int size; { - long *result = (long *) malloc (size); + PTR result = (PTR) malloc (size); if (result == NULL) fatal ("virtual memory exhausted", (char *)NULL); return result; } -long * +static PTR xrealloc (ptr, size) char *ptr; unsigned int size; { - long *result = (long *) realloc (ptr, size); + PTR result = (PTR) realloc (ptr, size); if (result == NULL) fatal ("virtual memory exhausted", (char *)NULL); return result; } + +/* + * Local Variables: + * indent-tabs-mode: t + * tab-width: 8 + * fill-column: 79 + * c-font-lock-extra-types: ("FILE" "bool" "language" "linebuffer" "fdesc" "node" "regexp") + * c-file-style: "gnu" + * End: + */ + +/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051 + (do not change this comment) */ + +/* etags.c ends here */ diff --git a/lib-src/gnuclient.c b/lib-src/gnuclient.c index aaec46a..311249e 100644 --- a/lib-src/gnuclient.c +++ b/lib-src/gnuclient.c @@ -198,7 +198,7 @@ filename_expand (char *fullpath, char *filename) #endif int len; - fullpath[0] = '\0'; + fullpath[0] = fullpath[MAXPATHLEN] = '\0'; #ifdef CYGWIN /* @@ -211,7 +211,7 @@ filename_expand (char *fullpath, char *filename) if (filename[0] && filename[0] == '/') { /* Absolute (unix-style) pathname. Do nothing */ - strcat (fullpath, filename); + strncat (fullpath, filename, MAXPATHLEN); } else { @@ -219,15 +219,18 @@ filename_expand (char *fullpath, char *filename) and prepend it. FIXME: need to fix the case of DOS paths like "\foo", where we need to get the current drive. */ - strcat (fullpath, get_current_working_directory ()); + strncat (fullpath, get_current_working_directory (), MAXPATHLEN); len = strlen (fullpath); - if (len > 0 && fullpath[len-1] == '/') /* trailing slash already? */ - ; /* yep */ - else - strcat (fullpath, "/"); /* nope, append trailing slash */ + /* If no trailing slash, add one */ + if (len <= 0 || (fullpath[len - 1] != '/' && len < MAXPATHLEN)) + { + strcat (fullpath, "/"); + len++; + } + /* Don't forget to add the filename! */ - strcat (fullpath,filename); + strncat (fullpath, filename, MAXPATHLEN - len); } } /* filename_expand */ @@ -439,7 +442,7 @@ main (int argc, char *argv[]) break; case 'r': GET_ARGUMENT (remotearg, "-r"); - strcpy (remotepath, remotearg); + strncpy (remotepath, remotearg, MAXPATHLEN); rflg = 1; break; #endif /* INTERNET_DOMAIN_SOCKETS */ @@ -594,7 +597,7 @@ main (int argc, char *argv[]) * to this machine */ if ((ptr = getenv ("GNU_NODE")) != NULL) /* user specified a path */ - strcpy (remotepath, ptr); + strncpy (remotepath, ptr, MAXPATHLEN); } #if 0 /* This is really bogus... re-enable it if you must have it! */ #if defined (hp9000s300) || defined (hp9000s800) diff --git a/lib-src/gnuslib.c b/lib-src/gnuslib.c index ba5a96c..8951b26 100644 --- a/lib-src/gnuslib.c +++ b/lib-src/gnuslib.c @@ -411,13 +411,11 @@ disconnect_from_server (int s, int echo) send_string(s,EOT_STR); /* make sure server gets string */ -#if !defined (linux) && !defined (_SCO_DS) +#if !defined (_SCO_DS) /* - * shutdown is completely hozed under linux. If s is a unix domain socket, - * you'll get EOPNOTSUPP back from it. If s is an internet socket, you get - * a broken pipe when you try to read a bit later. The latter - * problem is fixed for linux versions >= 1.1.46, but the problem - * with unix sockets persists. Sigh. + * There used to be a comment here complaining about ancient Linux + * versions. It is no longer relevant. I don't know why _SCO_DS is + * verboten here, as the original comment did not say. */ if (shutdown(s,1) == -1) { @@ -436,7 +434,7 @@ disconnect_from_server (int s, int echo) #else while ((length = read(s,buffer,GSERV_BUFSZ)) > 0 || (length == -1 && errno == EINTR)) { - if (length) { + if (length > 0) { buffer[length] = '\0'; if (echo) { fputs(buffer,stdout); diff --git a/lib-src/installexe.sh b/lib-src/installexe.sh index d971b09..1698125 100644 --- a/lib-src/installexe.sh +++ b/lib-src/installexe.sh @@ -5,11 +5,16 @@ shift tstr="" -while [ $# -gt 0 ] +while [[ $# -gt 0 ]] do - if [ -f $1.exe ] + if [[ -f $1.exe ]] then - tstr="$tstr$1.exe $2.exe" + if [[ "$2" == *.exe ]] + then + tstr="$tstr$1 $2" + else + tstr="$tstr$1.exe $2.exe" + fi shift 2 else tstr="$tstr$1 " diff --git a/lib-src/pop.c b/lib-src/pop.c index 0bf05de..164eb6e 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1,5 +1,7 @@ /* pop.c: client routines for talking to a POP3-protocol post-office server - Copyright (c) 1991, 1993, 1996 Free Software Foundation, Inc. + Copyright (C) 1991, 1993, 1996, 1997, 1999, 2002, 2003, 2004, + 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2001 Ben Wing. Written by Jonathan Kamens, jik@security.ov.com. This file is part of GNU Emacs. @@ -16,8 +18,10 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License 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. */ +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ + +/* Synched up with: FSF 22.0.50. */ #ifdef HAVE_CONFIG_H #define NO_SHORTNAMES /* Tell config not to load remap.h */ @@ -95,7 +99,7 @@ extern struct servent *hes_getservbyname (/* char *, char * */); #ifdef KERBEROS #ifndef KRB5 extern int krb_sendauth (/* long, int, KTEXT, char *, char *, char *, - unsigned long, MSG_DAT *, CREDENTIALS *, Key_schedule, + u_long, MSG_DAT *, CREDENTIALS *, Key_schedule, struct sockaddr_in *, struct sockaddr_in *, char * */); extern char *krb_realmofhost (/* char * */); @@ -109,7 +113,7 @@ extern int h_errno; #endif static int socket_connection (char *, int); -static char *pop_getline (popserver); +static int pop_getline (popserver, char **); static int sendline (popserver, char *); static int fullwrite (int, char *, int); static int getok (popserver); @@ -117,9 +121,11 @@ static int getok (popserver); static int gettermination (popserver); #endif static void pop_trash (popserver); -static char *find_crlf (char *); +static char *find_crlf (char *, int); -#define ERROR_MAX 80 /* a pretty arbitrary size */ +#define ERROR_MAX 160 /* a pretty arbitrary size, but needs + to be bigger than the original + value of 80 */ #define POP_PORT 110 #define KPOP_PORT 1109 #if defined(WIN32_NATIVE) || defined(CYGWIN) @@ -129,7 +135,7 @@ static char *find_crlf (char *); #endif #ifdef KERBEROS #ifdef KRB5 -#define KPOP_SERVICE "k5pop"; +#define KPOP_SERVICE "k5pop" #else #define KPOP_SERVICE "kpop" #endif @@ -355,7 +361,7 @@ pop_stat (popserver server, int *count, int *size) return (-1); } - if (sendline (server, "STAT") || (! (fromserver = pop_getline (server)))) + if (sendline (server, "STAT") || (pop_getline (server, &fromserver) < 0)) return (-1); if (strncmp (fromserver, "+OK ", 4)) @@ -447,7 +453,7 @@ pop_list (popserver server, int message, int **IDs, int **sizes) free ((char *) *sizes); return (-1); } - if (! (fromserver = pop_getline (server))) + if (pop_getline (server, &fromserver) < 0) { free ((char *) *IDs); free ((char *) *sizes); @@ -492,7 +498,7 @@ pop_list (popserver server, int message, int **IDs, int **sizes) } for (i = 0; i < how_many; i++) { - if (pop_multi_next (server, &fromserver)) + if (pop_multi_next (server, &fromserver) <= 0) { free ((char *) *IDs); free ((char *) *sizes); @@ -511,7 +517,7 @@ pop_list (popserver server, int message, int **IDs, int **sizes) } (*sizes)[i] = atoi (fromserver); } - if (pop_multi_next (server, &fromserver)) + if (pop_multi_next (server, &fromserver) < 0) { free ((char *) *IDs); free ((char *) *sizes); @@ -541,14 +547,17 @@ pop_list (popserver server, int message, int **IDs, int **sizes) * markfrom * If true, then mark the string "From " at the beginning * of lines with '>'. + * msg_buf Output parameter to which a buffer containing the + * message is assigned. * - * Return value: A string pointing to the message, if successful, or - * null with pop_error set if not. + * Return value: The number of bytes in msg_buf, which may contain + * embedded nulls, not including its final null, or -1 on error + * with pop_error set. * * Side effects: May kill connection on error. */ -char * -pop_retrieve (popserver server, int message, int markfrom) +int +pop_retrieve (popserver server, int message, int markfrom, char **msg_buf) { int *IDs, *sizes, bufsize, fromcount = 0, cp = 0; char *ptr, *fromserver; @@ -561,11 +570,11 @@ pop_retrieve (popserver server, int message, int markfrom) } if (pop_list (server, message, &IDs, &sizes)) - return (0); + return (-1); if (pop_retrieve_first (server, message, &fromserver)) { - return (0); + return (-1); } /* @@ -583,17 +592,16 @@ pop_retrieve (popserver server, int message, int markfrom) { strcpy (pop_error, "Out of memory in pop_retrieve"); pop_retrieve_flush (server); - return (0); + return (-1); } - while (! (ret = pop_retrieve_next (server, &fromserver))) + while ((ret = pop_retrieve_next (server, &fromserver)) >= 0) { - int linesize; - if (! fromserver) { ptr[cp] = '\0'; - return (ptr); + *msg_buf = ptr; + return (cp); } if (markfrom && fromserver[0] == 'F' && fromserver[1] == 'r' && fromserver[2] == 'o' && fromserver[3] == 'm' && @@ -607,25 +615,19 @@ pop_retrieve (popserver server, int message, int markfrom) { strcpy (pop_error, "Out of memory in pop_retrieve"); pop_retrieve_flush (server); - return (0); + return (-1); } fromcount = 0; } ptr[cp++] = '>'; } - linesize = strlen (fromserver); - memcpy (&ptr[cp], fromserver, linesize); - cp += linesize; + memcpy (&ptr[cp], fromserver, ret); + cp += ret; ptr[cp++] = '\n'; } - if (ret) - { - free (ptr); - /* return (0); */ - } - /* This function used to fall off the end, but that doesn't make any sense */ - return (0); + free (ptr); + return (-1); } int @@ -635,6 +637,14 @@ pop_retrieve_first (popserver server, int message, char **response) return (pop_multi_first (server, pop_error, response)); } +/* + Returns a negative number on error, 0 to indicate that the data has + all been read (i.e., the server has returned a "." termination + line), or a positive number indicating the number of bytes in the + returned buffer (which is null-terminated and may contain embedded + nulls, but the returned bytecount doesn't include the final null). + */ + int pop_retrieve_next (popserver server, char **line) { @@ -654,6 +664,14 @@ pop_top_first (popserver server, int message, int lines, char **response) return (pop_multi_first (server, pop_error, response)); } +/* + Returns a negative number on error, 0 to indicate that the data has + all been read (i.e., the server has returned a "." termination + line), or a positive number indicating the number of bytes in the + returned buffer (which is null-terminated and may contain embedded + nulls, but the returned bytecount doesn't include the final null). + */ + int pop_top_next (popserver server, char **line) { @@ -676,7 +694,7 @@ pop_multi_first (popserver server, char *command, char **response) return (-1); } - if (sendline (server, command) || (! (*response = pop_getline (server)))) + if (sendline (server, command) || (pop_getline (server, response) < 0)) { return (-1); } @@ -700,10 +718,20 @@ pop_multi_first (popserver server, char *command, char **response) } } +/* + Read the next line of data from SERVER and place a pointer to it + into LINE. Return -1 on error, 0 if there are no more lines to read + (i.e., the server has returned a line containing only "."), or a + positive number indicating the number of bytes in the LINE buffer + (not including the final null). The data in that buffer may contain + embedded nulls, but does not contain the final CRLF. When returning + 0, LINE is set to null. */ + int pop_multi_next (popserver server, char **line) { char *fromserver; + int ret; if (! server->in_multi) { @@ -711,8 +739,7 @@ pop_multi_next (popserver server, char **line) return (-1); } - fromserver = pop_getline (server); - if (! fromserver) + if ((ret = pop_getline (server, &fromserver)) < 0) { return (-1); } @@ -728,13 +755,13 @@ pop_multi_next (popserver server, char **line) else { *line = fromserver + 1; - return (0); + return (ret - 1); } } else { *line = fromserver; - return (0); + return (ret); } } @@ -742,21 +769,22 @@ int pop_multi_flush (popserver server) { char *line; + int ret; if (! server->in_multi) { return (0); } - while (! pop_multi_next (server, &line)) + while ((ret = pop_multi_next (server, &line))) { - if (! line) + if (ret < 0) { - return (0); + return (-1); } } - return (-1); + return (0); } /* Function: pop_delete @@ -843,7 +871,7 @@ pop_last (popserver server) if (sendline (server, "LAST")) return (-1); - if (! (fromserver = pop_getline (server))) + if (pop_getline (server, &fromserver) < 0) return (-1); if (! strncmp (fromserver, "-ERR", 4)) @@ -961,6 +989,8 @@ socket_connection (char *host, int flags) #ifdef KERBEROS #ifdef KRB5 krb5_error_code rem; + krb5_context kcontext = 0; + krb5_auth_context auth_context = 0; krb5_ccache ccdef; krb5_principal client, server; krb5_error *err_ret; @@ -971,6 +1001,7 @@ socket_connection (char *host, int flags) CREDENTIALS cred; Key_schedule schedule; int rem; + char *realhost; #endif /* KRB5 */ #endif /* KERBEROS */ @@ -984,21 +1015,6 @@ socket_connection (char *host, int flags) } #endif - do - { - hostent = gethostbyname (host); - try_count++; - if ((! hostent) -#ifndef BROKEN_CYGWIN - && ((h_errno != TRY_AGAIN) || (try_count == 5)) -#endif - ) - { - strcpy (pop_error, "Could not determine POP server's address"); - return (-1); - } - } while (! hostent); - memset (&addr, 0, sizeof (addr)); addr.sin_family = AF_INET; @@ -1037,18 +1053,33 @@ socket_connection (char *host, int flags) } } -#define SOCKET_ERROR "Could not create socket for POP connection: " +#define POP_SOCKET_ERROR "Could not create socket for POP connection: " sock = socket (PF_INET, SOCK_STREAM, 0); if (sock < 0) { - strcpy (pop_error, SOCKET_ERROR); + strcpy (pop_error, POP_SOCKET_ERROR); strncat (pop_error, strerror (errno), - ERROR_MAX - sizeof (SOCKET_ERROR)); + ERROR_MAX - sizeof (POP_SOCKET_ERROR)); return (-1); } + do + { + hostent = gethostbyname (host); + try_count++; + if ((! hostent) +#ifndef BROKEN_CYGWIN + && ((h_errno != TRY_AGAIN) || (try_count == 5)) +#endif + ) + { + strcpy (pop_error, "Could not determine POP server's address"); + return (-1); + } + } while (! hostent); + while (*hostent->h_addr_list) { memcpy (&addr.sin_addr, *hostent->h_addr_list, hostent->h_length); @@ -1074,11 +1105,13 @@ socket_connection (char *host, int flags) if (! (flags & POP_NO_KERBEROS)) { #ifdef KRB5 - krb5_init_ets (); - - if (rem = krb5_cc_default (&ccdef)) + if ((rem = krb5_init_context (&kcontext))) { krb5error: + if (auth_context) + krb5_auth_con_free (kcontext, auth_context); + if (kcontext) + krb5_free_context (kcontext); strcpy (pop_error, KRB_ERROR); strncat (pop_error, error_message (rem), ERROR_MAX - sizeof(KRB_ERROR)); @@ -1086,10 +1119,14 @@ socket_connection (char *host, int flags) return (-1); } - if (rem = krb5_cc_get_principal (ccdef, &client)) - { - goto krb5error; - } + if ((rem = krb5_auth_con_init (kcontext, &auth_context))) + goto krb5error; + + if (rem = krb5_cc_default (kcontext, &ccdef)) + goto krb5error; + + if (rem = krb5_cc_get_principal (kcontext, ccdef, &client)) + goto krb5error; for (cp = hostent->h_name; *cp; cp++) { @@ -1099,22 +1136,20 @@ socket_connection (char *host, int flags) } } - if (rem = krb5_sname_to_principal (hostent->h_name, POP_SERVICE, - FALSE, &server)) - { - goto krb5error; - } + if (rem = krb5_sname_to_principal (kcontext, hostent->h_name, + POP_SERVICE, FALSE, &server)) + goto krb5error; - rem = krb5_sendauth ((krb5_pointer) &sock, "KPOPV1.0", client, server, + rem = krb5_sendauth (kcontext, &auth_context, + (krb5_pointer) &sock, "KPOPV1.0", client, server, AP_OPTS_MUTUAL_REQUIRED, 0, /* no checksum */ 0, /* no creds, use ccache instead */ ccdef, - 0, /* don't need seq # */ - 0, /* don't need subsession key */ &err_ret, + 0, /* don't need subsession key */ 0); /* don't need reply */ - krb5_free_principal (server); + krb5_free_principal (kcontext, server); if (rem) { if (err_ret && err_ret->text.length) @@ -1137,20 +1172,23 @@ socket_connection (char *host, int flags) ERROR_MAX - sizeof (KRB_ERROR)); } if (err_ret) - krb5_free_error (err_ret); + krb5_free_error (kcontext, err_ret); + krb5_auth_con_free (kcontext, auth_context); + krb5_free_context (kcontext); CLOSESOCKET (sock); return (-1); } #else /* ! KRB5 */ ticket = (KTEXT) malloc (sizeof (KTEXT_ST)); - rem = krb_sendauth (0L, sock, ticket, "pop", hostent->h_name, - (char *) krb_realmofhost (hostent->h_name), + rem = krb_sendauth (0L, sock, ticket, "pop", realhost, + (char *) krb_realmofhost (realhost), (unsigned long) 0, &msg_data, &cred, schedule, (struct sockaddr_in *) 0, (struct sockaddr_in *) 0, "KPOPV0.1"); free ((char *) ticket); + free (realhost); if (rem != KSUCCESS) { strcpy (pop_error, KRB_ERROR); @@ -1177,15 +1215,20 @@ socket_connection (char *host, int flags) * Arguments: * server The server from which to get the line of text. * - * Returns: A non-null pointer if successful, or a null pointer on any - * error, with an error message copied into pop_error. + * Returns: The number of characters in the line, which is returned in + * LINE, not including the final null. A return value of 0 + * indicates a blank line. A negative return value indicates an + * error (in which case the contents of LINE are undefined. In + * case of error, an error message is copied into pop_error. * * Notes: The line returned is overwritten with each call to pop_getline. * * Side effects: Closes the connection on error. + * + * THE RETURNED LINE MAY CONTAIN EMBEDDED NULLS! */ -static char * -pop_getline (popserver server) +static int +pop_getline (popserver server, char **line) { #define GETLINE_ERROR "Error reading from server: " @@ -1194,7 +1237,8 @@ pop_getline (popserver server) if (server->data) { - char *cp = find_crlf (server->buffer + server->buffer_index); + char *cp = find_crlf (server->buffer + server->buffer_index, + server->data); if (cp) { int found; @@ -1208,8 +1252,11 @@ pop_getline (popserver server) server->buffer_index += data_used; if (pop_debug) + /* Embedded nulls will truncate this output prematurely, + but that's OK because it's just for debugging anyway. */ fprintf (stderr, "<<< %s\n", server->buffer + found); - return (server->buffer + found); + *line = server->buffer + found; + return (data_used - 2); } else { @@ -1245,7 +1292,7 @@ pop_getline (popserver server) { strcpy (pop_error, "Out of memory in pop_getline"); pop_trash (server); - return (0); + return (-1); } } ret = RECV (server->file, server->buffer + server->data, @@ -1256,13 +1303,13 @@ pop_getline (popserver server) strncat (pop_error, strerror (errno), ERROR_MAX - sizeof (GETLINE_ERROR)); pop_trash (server); - return (0); + return (-1); } else if (ret == 0) { strcpy (pop_error, "Unexpected EOF from server in pop_getline"); pop_trash (server); - return (0); + return (-1); } else { @@ -1270,7 +1317,8 @@ pop_getline (popserver server) server->data += ret; server->buffer[server->data] = '\0'; - cp = find_crlf (server->buffer + search_offset); + cp = find_crlf (server->buffer + search_offset, + server->data - search_offset); if (cp) { int data_used = (cp + 2) - server->buffer; @@ -1280,9 +1328,12 @@ pop_getline (popserver server) if (pop_debug) fprintf (stderr, "<<< %s\n", server->buffer); - return (server->buffer); + *line = server->buffer; + return (data_used - 2); } - search_offset += ret; + /* As above, the "- 1" here is to account for the fact that + we may have read a CR without its accompanying LF. */ + search_offset += ret - 1; } } @@ -1312,12 +1363,24 @@ sendline (popserver server, char *line) { #define SENDLINE_ERROR "Error writing to POP server: " int ret; - + char *buf; + + /* Combine the string and the CR-LF into one buffer. Otherwise, two + reasonable network stack optimizations, Nagle's algorithm and + delayed acks, combine to delay us a fraction of a second on every + message we send. (Movemail writes line without \r\n, client + kernel sends packet, server kernel delays the ack to see if it + can combine it with data, movemail writes \r\n, client kernel + waits because it has unacked data already in its outgoing queue, + client kernel eventually times out and sends.) + + This can be something like 0.2s per command, which can add up + over a few dozen messages, and is a big chunk of the time we + spend fetching mail from a server close by. */ + buf = alloca (strlen (line) + 3); + strcpy (buf, line); + strcat (buf, "\r\n"); ret = fullwrite (server->file, line, strlen (line)); - if (ret >= 0) - { /* 0 indicates that a blank line was written */ - ret = fullwrite (server->file, "\r\n", 2); - } if (ret < 0) { @@ -1346,10 +1409,10 @@ static int fullwrite (int fd, char *buf, int nbytes) { char *cp; - int ret; + int ret = 0; cp = buf; - while ((ret = SEND (fd, cp, nbytes, 0)) > 0) + while (nbytes && ((ret = SEND (fd, cp, nbytes, 0)) > 0)) { cp += ret; nbytes -= ret; @@ -1377,7 +1440,7 @@ getok (popserver server) { char *fromline; - if (! (fromline = pop_getline (server))) + if (pop_getline (server, &fromline) < 0) { return (-1); } @@ -1415,8 +1478,7 @@ gettermination (popserver server) { char *fromserver; - fromserver = pop_getline (server); - if (! fromserver) + if (pop_getline (server, &fromserver) < 0) return (-1); if (strcmp (fromserver, ".")) @@ -1487,17 +1549,16 @@ pop_trash (popserver server) #endif } -/* Return a pointer to the first CRLF in IN_STRING, - or 0 if it does not contain one. */ +/* Return a pointer to the first CRLF in IN_STRING, which can contain + embedded nulls and has LEN characters in it not including the final + null, or 0 if it does not contain one. */ static char * -find_crlf (char *in_string) +find_crlf (char *in_string, int len) { - while (1) + while (len--) { - if (! *in_string) - return (0); - else if (*in_string == '\r') + if (*in_string == '\r') { if (*++in_string == '\n') return (in_string - 1); @@ -1505,7 +1566,7 @@ find_crlf (char *in_string) else in_string++; } - /* NOTREACHED */ + return (0); } #endif /* MAIL_USE_POP */ diff --git a/lib-src/pop.h b/lib-src/pop.h index 9121425..c18b623 100644 --- a/lib-src/pop.h +++ b/lib-src/pop.h @@ -1,5 +1,6 @@ /* pop.h: Header file for the "pop.c" client POP3 protocol. - Copyright (c) 1991,1993 Free Software Foundation, Inc. + Copyright (C) 1991, 1993, 2002, 2003, 2004, + 2005, 2006 Free Software Foundation, Inc. Written by Jonathan Kamens, jik@security.ov.com. This file is part of GNU Emacs. @@ -16,8 +17,10 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License 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. */ +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ + +/* Synched up with: FSF 22.0.50. */ #include <stdio.h> @@ -59,7 +62,8 @@ extern popserver pop_open _ARGS((char *host, char *username, char *password, extern int pop_stat _ARGS((popserver server, int *count, int *size)); extern int pop_list _ARGS((popserver server, int message, int **IDs, int **size)); -extern char *pop_retrieve _ARGS((popserver server, int message, int markfrom)); +extern int pop_retrieve _ARGS((popserver server, int message, int markfrom, + char **)); extern int pop_retrieve_first _ARGS((popserver server, int message, char **response)); extern int pop_retrieve_next _ARGS((popserver server, char **line)); diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0107fd..9ccd2eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1363,6 +1363,228 @@ * files.el (insert-file-contents-literally): Treat file as binary; call file-name-handlers. [sync with Emacs 20.3.10] +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2007-09-19 Didier Verna <didier@xemacs.org> + + Update my personal info. + * about.el (xemacs-hackers): Use 'didier instead of 'dv. + * about.el (about-other-current-hackers): Ditto. + * about.el (about-url-alist): Add my musical website. + * about.el (about-personal-info): Update my entry. + * about.el (about-hacker-contribution): Ditto. + +2007-08-21 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-download-sites): Update download + sites in Japan. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-08-18 Vin Shelton <acs@xemacs.org> + + * package-get.el (package-get-pre-release-download-sites): Sync + mirror sites with 21.5. (Thanks, Adrian) + +2007-08-09 Mike Sperber <mike@xemacs.org> + + * startup.el (migrate-user-init-file): Create backup of + `user-init-file' before migrating. + * startup.el (maybe-migrate-user-init-file): Print + information about backup file. + (maybe-create-compatibility-dot-emacs): Follow above change. + +2006-11-02 Adrian Aichner <adrian@xemacs.org> + + * font-lock.el: Sync font-lock-add-keywords and + font-lock-remove-keywords from GNU Emacs. + * font-lock.el (font-lock-keywords-alist): New. + * font-lock.el (font-lock-removed-keywords-alist): New. + * font-lock.el (font-lock-add-keywords): New. + * font-lock.el (font-lock-update-removed-keyword-alist): New. + * font-lock.el (font-lock-remove-keywords): New. + +2007-08-16 Vin Shelton <acs@xemacs.org> + + * font-lock.el: Add defvar for font-lock-warning-face. Original + patch from Hans de Graaff. + +2007-07-28 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-download-sites): Document Chile and + update Denmark download site. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-05-20 Stephen J. Turnbull <stephen@xemacs.org> + + * gutter-items.el (progress-feedback-with-label): Clarify docstring. + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-10-14 Jeff Miller <jmiller@xemacs.org> + + * info.el (Info-find-emacs-command-nodes): fix regex for find command node. + +2006-11-14 Stephen J. Turnbull <stephen@xemacs.org> + + * info.el (Info-find-file-node, Info-insert-dir) + (Info-read-subfile, Info-insert-file-contents): Maintain invariant + `(equal buffer-file-truename (file-truename buffer-file-name))'. + Thanks to Nelson Ferreira <nelson.ferreira@ieee.org> for report + and discussion. + +2006-05-20 Ville Skyttä <scop@xemacs.org> + + * obsolete.el (line-beginning-position): New, from 21.5.x. + (line-end-position): Ditto. + +2006-06-03 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-download-sites): Welcome + nl.xemacs.org and Thanks! + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2004-01-19 Martin Buchholz <martin@xemacs.org> + + * font-lock.el: Add support for not-so recent changes in Java to + java-mode. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2006-01-03 Aidan Kehoe <kehoea@parhasard.net> + + * easymenu.el: Update copyright. + * easymenu.el (easy-menu-all-popups): + Add a docstring. + * easymenu.el (easy-menu-add): + Document a bug, rework the function to preserve any existing + non-default mode-popup-menu instead of overwriting it, and not to + bother normalising the menu title (nothing else does). + * easymenu.el (easy-menu-remove): + Restore the default mode-popup-menu instead of leaving an empty + one when we remove the last easy-menu popup. + +2006-01-06 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-download-sites): Add pt.xemacs.org, + as suggested by Rodrigo Ventura. + * package-get.el (package-get-pre-release-download-sites): Ditto, + with replacement of xemacs-21.5 by beta, which is the logical path + to our beta core and package pre-releases. + +2005-12-17 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-download-sites): Add Hong Kong + download site. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2005-12-26 Vin Shelton <acs@xemacs.org> + + * find-paths.el: + * find-paths.el (paths-emacs-root-p): Add search for package root. + * find-paths.el (paths-find-emacs-root): Replaced with + paths-find-invocation-roots, which returns a list of roots. + * find-paths.el (paths-find-invocation-roots): New. + * find-paths.el (paths-find-emacs-roots): Call paths-find-invocation-roots. + +2005-12-05 Ville Skyttä <scop@xemacs.org> + + * minibuf.el (x-library-search-path): Add /usr(/local)/share/X11. + * font.el (font-lookup-rgb-components): Ditto, remove stale comment. + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + +2005-10-28 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-download-sites): Update reflecting + latest http://www.xemacs.org/Releases/ information generated by + xemacs-builds/adrian/website/package-get-2-download-sites.el. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2005-02-28 Simon Josefsson <jas@extundo.com> + + * about.el (xemacs-hackers): Add jas. + (about-other-current-hackers): Likewise. + (about-url-alist): Add URL for jas. + (about-personal-info): Document jas. + (about-hacker-contribution): Describe jas contributions. + +2005-03-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * easymenu.el (easy-menu-remove): As described in + E1D4Nn5-0001lq-EU@neutrino.iwi.uni-sb.de; don't strip everything + except the "Command" menu from mode-popup-menu. + +2005-03-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font.el (font-spatial-to-canonical): Correct calculation of + return value for pixel-based input value. + +2002-05-13 Adrian Aichner <adrian@xemacs.org> + + * code-process.el (call-process): Process-related docstring + improvements spurred by Norbert Koch. + * code-process.el (call-process-region): Ditto. + * code-process.el (start-process): Ditto. + +2005-10-09 Adrian Aichner <adrian@xemacs.org> + + * finder.el (finder-find-library): Return filename actually + searched for. + +2005-10-10 Steve Youngs <steve@sxemacs.org> + + * help.el (view-emacs-news): Use `expand-file-name' instead of + `locate-data-file' as the latter will find any "NEWS" files that + might exist in packages _before_ the one in core. + +2005-06-06 Adrian Aichner <adrian@xemacs.org> + + * package-get.el (package-get-init-package): + package-get-init-package buglet (21.4.17) by Jeff Mincy + <mincy@rcn.com> fixing false temporary load-path shadows reported + after package installation and simplifying code. + +2005-10-18 Ville Skyttä <scop@xemacs.org> + + * package-get.el (package-get-download-sites): Sync mirrors list + with the XEmacs website. + (package-get-pre-release-download-sites): Ditto. + +2005-04-06 Stephen J. Turnbull <stephen@xemacs.org> + + * derived.el (derived-mode-merge-syntax-tables): + Revert my 21.5-only patch of 2003-07-18 which slipped in + through Jerry James's patch of 2004-06-07. + +2005-02-23 Adrian Aichner <adrian@xemacs.org> + + * cmdloop.el (keyboard-quit): Remove workaround for + `region-active-p' not making sure active region is in current + buffer now that it does. + * minibuf.el (minibuffer-keyboard-quit): Ditto. + * simple.el (region-active-p): `region-active-p' to only return t + when active region is in current buffer. + +2005-02-21 Norbert Koch <viteno@xemacs.org> + + * package-ui.el (pui-list-packages): MF21.5, adapt to longer + package names, quell a byte-compiler warning, doc fix. + +2005-02-16 Aidan Kehoe <kehoea@parhasard.net> + + * buffer.el (pop-to-buffer): + * window-xemacs.el (display-buffer): + Document use of `same-window-buffer-names,' `same-window-regexps' + by pop-to-buffer and display-buffer. + 2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released diff --git a/lisp/about.el b/lisp/about.el index 3d1d5af..ef91a55 100644 --- a/lisp/about.el +++ b/lisp/about.el @@ -1,6 +1,6 @@ ;;; about.el --- the About The Authors page (shameless self promotion). -;; Copyright (c) 1997 Free Software Foundation, Inc. +;; Copyright (c) 1997, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2001 Ben Wing. ;; Keywords: extensions @@ -111,7 +111,7 @@ (devin "Matthieu Devin" "devin@xemacs.org") (dkindred "Darrell Kindred" "dkindred@xemacs.org") (dmoore "David Moore" "dmoore@xemacs.org") - (dv "Didier Verna" "didier@xemacs.org") + (didier "Didier Verna" "didier@xemacs.org") (eb "Eric Benson" "eb@xemacs.org") (fabrice "Fabrice Popineau" "fabrice@xemacs.org") (golubev "Ilya Golubev" "golubev@xemacs.org") @@ -123,6 +123,7 @@ (hobley "David hobley" "hobley@xemacs.org") (jan "Jan Vroonhof" "jan@xemacs.org") (jareth "Jareth Hein" "jareth@xemacs.org") + (jas "Simon Josefsson" "simon@xemacs.org") (jason "Jason R. Mastaler" "jason@xemacs.org") (jens "Jens Lautenbacher" "jens@xemacs.org") (jmiller "Jeff Miller" "jmiller@xemacs.org") @@ -172,13 +173,13 @@ (defvar about-other-current-hackers ;; to sort this list or the one below, use: ;; M-x sort-regexp-fields RET [a-z]+ RET \(.*\) RET - '(aj alastair cgw craig daiki dan dv fabrice golubev gunnar hisashi hniksic + '(aj alastair cgw craig daiki dan didier fabrice golubev gunnar hisashi hniksic jan jareth jmiller jason jonathan kazz kirill larsi morioka mta ograf olivier oscar pittman tomonori tuck wmperry yoshiki)) (defvar about-once-and-future-hackers '(ajc baw bw chr cthomp darrylo devin dkindred dmoore eb hbs hmuller - hobley jens juhp jwz kyle marcpa mcook mly ograf pelegri pez + hobley jas jens juhp jwz kyle marcpa mcook mly ograf pelegri pez rickc rose rossini slb stig stigb thiessel vladimir)) ;; The CAR of alist elements is a valid argument to `about-url-link'. @@ -198,9 +199,11 @@ (daiki . "http://deisui.bug.org/diary/servlet/view") (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") (dmoore . "http://oj.egbt.org/dmoore/") - (dv . "http://www.lrde.epita.fr/~didier/") + (didier . "http://didier.lrde.org/") + (dvljazz . "http://www.didierverna.com/") (fabrice . "http://www.ese-metz.fr/~popineau/") (fptex . "http://www.fptex.org/") + (jas . "http://josefsson.org/") (jason . "http://www.mastaler.com/") (juhp . "http://www.01.246.ne.jp/~juhp/") (jwz . "http://www.jwz.org/") @@ -929,24 +932,30 @@ hours of the day. He has a page at ") (about-url-link 'dmoore nil "Visit David's home page") (widget-insert ".\n")) - (dv - (widget-insert "\ -I graduated at ENST (an engineering school in Paris) and have a Ph.D. -in computer science. I'm currently a teacher at EPITA (another -engineering school, still in Paris) and a researcher at LRDE (EPITA's -research and development laboratory). Our research topics include -generic programming and distributed virtual reality. - -Apart from XEmacs, I'm also involved in other free software projects, -including Gnus, BBDB, and the GNU \"autotools\". I also wrote some -LaTeX packages (ugh :-). - -All of this, actually, is only 60% true. Two days per week, I'm also a -semi-professional Jazz guitar player (and singer), which means that it -is not the way I earn my crust, but things may very well reverse in -the future ...\n\n") - (widget-insert "Visit Didier's home page: ") - (about-url-link 'dv nil "Visit Didier's home page") + (didier + (widget-insert "\ +Didier has a Ph.D. in Computer Science and is currently working as an +assistant professor for an engineering school in Paris). He gives +lectures on Operating Systems, Computer Graphics, Functional Programming +and Typesetting. His research interests include Genericity, Object +Orientation and Functional Programming, all in one language: + +... Common Lisp. + + +Apart from the world of XEmacs and Emacs Lisp, Didier is also the author +of several LaTeX packages (FiNK, FiXme, QCM and CurVe) and an occasional +contributor to other Free Software projects (the GNU Autotools most +notably; he was one of the technical reviewers for the \"Goat Book\"). + +But all of this is only 60% true... Two days per week, Didier is indeed +a semi-professional Jazz guitar player (and singer), which means that he +doesn't quite earn his crust with it, but things may very well reverse in +the future...\n") + (widget-insert "\nVisit Didier's scientific website: ") + (about-url-link 'didier nil "Visit Didier's scientific website") + (widget-insert "\nVisit Didier's musical website: ") + (about-url-link 'dvljazz nil "Visit Didier's musical website") (widget-insert "\n")) (eb (widget-insert @@ -1059,6 +1068,25 @@ portable, implements a language, includes a non-trivial bit of graphics and a garbage collector, but is multithreaded to boot! Unfortunately his XEmacs time is directly limited by the amount of traffic on the M40.\n")) + (jas + (widget-insert "\ + +Simon lives in Stockholm where he has discovered that computers +can be a powerful procrastinating tool. Combined with a +frustrating desire to see computers simply work, he spends most +of his time complaining. Occasionally he rises up to the task +and produces something that others may complain about, which +brings him increased satisfaction with every bug report. Today +he is pretending to be a network security guy, with a preference +for standardization issues, while secretly longing to start a +cafe or becoming a theoretical computer scientist. His personal +interest is literature, and to some extent traveling, but will +try anything for fun, such as juggling, skiing, wine, and +long-distance biking. + +See: ") + (about-url-link 'jas nil "Visit Simon's homepage") + (widget-insert ".\n")) (jareth (widget-insert "\ Jareth Hein is a mountain boy who abandoned his home state of Colorado @@ -1519,18 +1547,17 @@ annoy him. He hopes he's spared you from a core dump or two.\n")) (dmoore (widget-insert "\ David has contributed greatly to the quest to speed up XEmacs.\n")) - (dv - (widget-insert "\ -I joined the development of XEmacs in 1996, and have been one of the -core maintainers since 1998. Although I'm mostly interested in the -GUI, ergonomics, redisplay and autoconf issues, it's probably simpler -to describe what I'm *not* involved in: I've never touched the Lisp -implementation, and I probably never will... - -I'm the author of the multicast support, I wrote and maintain some -external Emacs Lisp packages (including mchat) and I'm also -responsible for some of the core Lisp code (including the rectangle -library which I rewrote for both XEmacs and GNU Emacs).\n")) + (didier + (widget-insert "\ +Didier joined the development of XEmacs in 1996, and has been one of +the core maintainers since 1998. His very first contribution was the +translation of the tutorial to French. Since then, he has contributed +various bug fixes and enhancements in fields as diverse as the GUI, +redisplay engine and autoconf support. + +Didier is the official maintainer of some core libraries (rect, cus-edit, +wid-edit) and the author of the multicast support. He is also the author +of several packages, including mchat and Patcher.\n")) (eb (widget-insert "\ Also part of the original Lucid Emacs development team. Eric played a @@ -1609,6 +1636,14 @@ of the XEmacs custom subsystem and gnuserv.\n")) (widget-insert "\ Owner of cvs.xemacs.org, the machine that holds the XEmacs CVS repository, and author of some of the graphics code in XEmacs.\n")) + (jas + (widget-insert "\ +Wrote and/or integrated several packages for Gnus, such as +support for IMAP, Sieve, format=flowed, GnuTLS, S/MIME, and PGP. +Irregularly synchronizes lisp code between Emacs and XEmacs. He +maintains the mail-lib, sieve, sasl, pgg and ecrypto XEmacs +packages. Operates the secondary DNS and mail server for +xemacs.org.\n")) (jason (widget-insert "\ Beta tester, manager of the various XEmacs mailing lists and binary diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index 670a8c8..835ba1f 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -1506,9 +1506,9 @@ one version of a package available.") (defcustom package-get-install-to-user-init-directory nil "*If non-nil install packages under `user-init-directory'." :type 'boolean :group 'package-get) -(defcustom package-get-download-sites '(("US (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/packages") ("Australia (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/packages") ("Australia (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/packages") ("Austria (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/packages") ("Brazil (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/packages") ("Canada (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/packages") ("Canada (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") ("Canada (ualberta.ca)" "sunsite.ualberta.ca" "pub/Mirror/xemacs/packages") ("Czech Republic (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages") ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "pub/emacs/xemacs/packages") ("Finland (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("France (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/packages") ("France (mirror.cict.fr)" "mirror.cict.fr" "xemacs/packages") ("France (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("Germany (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/packages") ("Germany (tu-darmstadt.de)" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") ("Ireland (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages") ("Italy (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages") ("Japan (aist.go.jp)" "ring.aist.go.jp" "pub/text/xemacs/packages") ("Japan (asahi-net.or.jp)" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") ("Japan (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("Japan (jaist.ac.jp)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/GNU/xemacs/packages") ("Japan (nucba.ac.jp)" "mirror.nucba.ac.jp" "mirror/xemacs/packages") ("Japan (sut.ac.jp)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages") ("New Zealand (nz.xemacs.org)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages") ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages") ("Poland (pl.xemacs.org)" "ftp.pl.xemacs.org" "pub/unix/editors/xemacs/packages") ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/xemacs/packages") ("Slovakia (sk.xemacs.org)" "ftp.sk.xemacs.org" "pub/mirrors/xemacs/packages") ("South Africa (za.xemacs.org)" "ftp.za.xemacs.org" "mirrorsites/ftp.xemacs.org/packages") ("Sweden (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages") ("Switzerland (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/packages") ("UK (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages") ("US (ibiblio.org)" "ibiblio.org" "pub/packages/editors/xemacs/packages") ("US (stealth.net)" "ftp.stealth.net" "pub/mirrors/ftp.xemacs.org/pub/xemacs/packages") ("US (unc.edu)" "metalab.unc.edu" "pub/packages/editors/xemacs/packages") ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/xemacs/packages") ("US (utk.edu)" "ftp.sunsite.utk.edu" "pub/xemacs/packages")) "*List of remote sites available for downloading packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) +(defcustom package-get-download-sites '(("US (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/packages") ("Argentina (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/packages") ("Australia (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/packages") ("Australia (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/packages") ("Austria (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/packages") ("Brazil (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/packages") ("Canada (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/packages") ("Canada (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") ("Canada (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/packages") ("Czech Republic (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages") ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/packages") ("Finland (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("France (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/packages") ("France (mirror.cict.fr)" "mirror.cict.fr" "xemacs/packages") ("France (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("Germany (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/packages") ("Greece (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/packages") ("Hong Kong (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/packages") ("Ireland (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages") ("Ireland (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/packages") ("Italy (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages") ("Japan (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/packages") ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages") ("Portugal (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/packages") ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/packages") ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/packages") ("Sweden (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages") ("Switzerland (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/packages") ("Taiwan (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/packages") ("UK (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages") ("US (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/packages") ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/packages")) "*List of remote sites available for downloading packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) -(defcustom package-get-pre-release-download-sites '(("Pre-Releases (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Australia Pre-Releases (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/beta/experimental/packages") ("Australia Pre-Releases (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Austria Pre-Releases (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/beta/experimentsl/packages") ("Brazil Pre-Releases (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/xemacs-21.5/experimental/packages") ("Canada Pre-Releases (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/beta/experimental/packages") ("Canada Pre-Releases (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/beta/experimental/packages") ("Canada Pre-Releases (ualberta.ca)" "sunsite.ualberta.ca" "pub/Mirror/xemacs/beta/experimental/packages") ("Czech Republic Pre-Releases (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/xemacs-21.5/experimental/packages") ("Denmark Pre-Releases (dk.xemacs.org)" "ftp.dk.xemacs.org" "pub/emacs/xemacs/beta/experimental/packages") ("Finland Pre-Releases (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/beta/experimental/packages") ("France Pre-Releases (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/beta/experimental/packages") ("France Pre-Releases (mirror.cict.fr)" "mirror.cict.fr" "xemacs/beta/experimental/packages") ("France Pre-Releases (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/beta/experimental/packages") ("Germany Pre-Releases (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/beta/experimental/packages") ("Germany Pre-Releases (tu-darmstadt.de)" "ftp.tu-darmstadt.de" "pub/editors/xemacs/beta/experimental/packages") ("Ireland Pre-Releases (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("Italy Pre-Releases (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/beta/experimental/packages") ("Japan Pre-Releases (aist.go.jp)" "ring.aist.go.jp" "pub/text/xemacs/beta/experimental/packages") ("Japan Pre-Releases (asahi-net.or.jp)" "ring.asahi-net.or.jp" "pub/text/xemacs/beta/experimental/packages") ("Japan Pre-Releases (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/beta/experimental/packages") ("Japan Pre-Releases (jaist.ac.jp)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/beta/experimental/packages") ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/GNU/xemacs/beta/experimental/packages") ("Japan Pre-Releases (sut.ac.jp)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/xemacs-21.5/experimental/packages") ("New Zealand Pre-Releases (nz.xemacs.org)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages") ("Norway Pre-Releases (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Poland Pre-Releases (pl.xemacs.org)" "ftp.pl.xemacs.org" "pub/unix/editors/xemacs/beta/experimental/packages") ("Russia Pre-Releases (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Saudi Arabia Pre-Releases (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/mirrors/ftp.xemacs.org/xemacs/xemacs-21.5/experimental/packages") ("Slovakia Pre-Releases (sk.xemacs.org)" "ftp.sk.xemacs.org" "pub/mirrors/xemacs/beta/experimental/packages") ("South Africa Pre-Releases (za.xemacs.org)" "ftp.za.xemacs.org" "mirrorsites/ftp.xemacs.org/beta/experimental/packages") ("Sweden Pre-Releases (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/beta/experimental/packages") ("Switzerland Pre-Releases (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/beta/experimental/packages") ("UK Pre-Releases (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("US Pre-Releases (ibiblio.org)" "ibiblio.org" "pub/packages/editors/xemacs/beta/experimental/packages") ("US Pre-Releases (stealth.net)" "ftp.stealth.net" "pub/mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("US Pre-Releases (unc.edu)" "metalab.unc.edu" "pub/packages/editors/xemacs/beta/experimental/packages") ("US Pre-Releases (us.xemacs.org)" "ftp.us.xemacs.org" "pub/xemacs/beta/experimental/packages") ("US Pre-Releases (utk.edu)" "ftp.sunsite.utk.edu" "pub/xemacs/beta/experimental/packages")) "*List of remote sites available for downloading \"Pre-Release\" packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Pre-Release Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) +(defcustom package-get-pre-release-download-sites '(("US Pre-Releases (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Argentina Pre-Releases (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/beta/experimental/packages") ("Australia Pre-Releases (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/beta/experimental/packages") ("Australia Pre-Releases (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Austria Pre-Releases (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/beta/experimental/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/beta/experimental/packages") ("Brazil Pre-Releases (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/xemacs-21.5/experimental/packages") ("Canada Pre-Releases (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/beta/experimental/packages") ("Canada Pre-Releases (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/beta/experimental/packages") ("Czech Republic Pre-Releases (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/xemacs-21.5/experimental/packages") ("Denmark Pre-Releases (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/beta/experimental/packages") ("Finland Pre-Releases (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/beta/experimental/packages") ("France Pre-Releases (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/beta/experimental/packages") ("France Pre-Releases (mirror.cict.fr)" "mirror.cict.fr" "xemacs/beta/experimental/packages") ("France Pre-Releases (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/beta/experimental/packages") ("Germany Pre-Releases (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/beta/experimental/packages") ("Greece Pre-Releases (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/beta/experimental/packages") ("Hong Kong Pre-Releases (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/beta/experimental/packages") ("Ireland Pre-Releases (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("Ireland Pre-Releases (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/beta/experimental/packages") ("Italy Pre-Releases (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/beta/experimental/packages") ("Japan Pre-Releases (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/beta/experimental/packages") ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/beta/experimental/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/beta/experimental/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/beta/experimental/packages") ("Norway Pre-Releases (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Portugal Pre-Releases (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/beta/experimental/packages") ("Russia Pre-Releases (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/beta/experimental/packages") ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/beta/experimental/packages") ("Sweden Pre-Releases (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/beta/experimental/packages") ("Switzerland Pre-Releases (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/beta/experimental/packages") ("Taiwan Pre-Releases (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/beta/experimental/packages") ("UK Pre-Releases (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("US Pre-Releases (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/beta/experimental/packages") ("US Pre-Releases (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/beta/experimental/packages")) "*List of remote sites available for downloading \"Pre-Release\" packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Pre-Release Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) (defcustom package-get-site-release-download-sites nil "*List of remote sites available for downloading \"Site Release\" packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Site Release Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) diff --git a/lisp/buffer.el b/lisp/buffer.el index 983a55e..057583b 100644 --- a/lisp/buffer.el +++ b/lisp/buffer.el @@ -71,7 +71,12 @@ If optional second arg NOT-THIS-WINDOW-P is non-nil, insist on finding another window even if BUFNAME is already visible in the selected window. If optional third arg is non-nil, it is the frame to pop to this buffer on. -If `focus-follows-mouse' is non-nil, keyboard focus is left unchanged." +If `focus-follows-mouse' is non-nil, keyboard focus is left unchanged. + +Buffers with names that are members of the `same-window-buffer-names' +list, or that match an element of the `same-window-regexps' list are +treated specially by this function--they are always selected in the +same window rather than in a different one." ;; #ifdef I18N3 ;; #### Doc string should indicate that the buffer name will get ;; translated. diff --git a/lisp/cmdloop.el b/lisp/cmdloop.el index 9e9a56a..6d972de 100644 --- a/lisp/cmdloop.el +++ b/lisp/cmdloop.el @@ -70,8 +70,7 @@ If this character is typed at top-level, this simply beeps. If `zmacs-regions' is true, and the zmacs region is active in this buffer, then this key deactivates the region without beeping or signalling." (interactive) - (if (and (region-active-p) - (eq (current-buffer) (zmacs-region-buffer))) + (if (region-active-p) ;; pseudo-zmacs compatibility: don't beep if this ^G is simply ;; deactivating the region. If it is inactive, beep. nil diff --git a/lisp/code-process.el b/lisp/code-process.el index 1b493d5..1d9208a 100644 --- a/lisp/code-process.el +++ b/lisp/code-process.el @@ -50,6 +50,8 @@ or a cons of coding systems which are used as above.") The program's input comes from file INFILE (nil means `/dev/null'). Insert output in BUFFER before point; t means current buffer; nil for BUFFER means discard it; 0 means discard and don't wait. +If BUFFER is a string, then find or create a buffer with that name, +then insert the output in that buffer, before point. BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, REAL-BUFFER says what to do with standard output, as above, while STDERR-FILE says what to do with standard error in the child. @@ -100,6 +102,8 @@ Delete the text if fourth arg DELETEP is non-nil. Insert output in BUFFER before point; t means current buffer; nil for BUFFER means discard it; 0 means discard and don't wait. +If BUFFER is a string, then find or create a buffer with that name, +then insert the output in that buffer, before point. BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, REAL-BUFFER says what to do with standard output, as above, while STDERR-FILE says what to do with standard error in the child. @@ -158,10 +162,10 @@ found, they default to `nil' for both input and output." Args are NAME BUFFER PROGRAM &rest PROGRAM-ARGS NAME is name for process. It is modified if necessary to make it unique. BUFFER is the buffer or (buffer-name) to associate with the process. - Process output goes at end of that buffer, unless you specify - an output stream or filter function to handle the output. - BUFFER may be also nil, meaning that this process is not associated - with any buffer +Process output goes at end of that buffer, unless you specify +an output stream or filter function to handle the output. +BUFFER may also be nil, meaning that this process is not associated +with any buffer. Third arg is program file name. It is searched for as in the shell. Remaining arguments are strings to give program as arguments. diff --git a/lisp/derived.el b/lisp/derived.el index 9f3dfc7..3ca8e03 100644 --- a/lisp/derived.el +++ b/lisp/derived.el @@ -421,20 +421,12 @@ Where the new table already has an entry, nothing is copied from the old one." ;; check for inheritance. (map-char-table #'(lambda (key value) - (let ((newval (get-range-char-table key new 'multi))) - (cond ((eq newval 'multi) ; OK, dive into the class hierarchy - (map-char-table - #'(lambda (key1 value1) - (when (eq ?@ (char-syntax-from-code - (get-range-char-table key new ?@))) - (put-char-table key1 value new)) - nil) - new - key)) - ((eq ?@ (char-syntax-from-code newval)) ;; class at once - (put-char-table key value new)))) - nil) - old)) + (if (eq ?@ (char-syntax-from-code value)) + (map-char-table #'(lambda (key1 value1) + (put-char-table key1 value1 new)) + old + key))) + new)) ;; Merge an old abbrev table into a new one. ;; This function requires internal knowledge of how abbrev tables work, diff --git a/lisp/easymenu.el b/lisp/easymenu.el index 6673789..6052fac 100644 --- a/lisp/easymenu.el +++ b/lisp/easymenu.el @@ -1,6 +1,6 @@ ;;; easymenu.el - Easy menu support for Emacs 19 and XEmacs. -;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993, 1994, 1995, 2005 Free Software Foundation, Inc. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Maintainer: XEmacs Development Team @@ -159,32 +159,52 @@ is a list of menu items, as above." ,doc (interactive "@e") (run-hooks 'activate-menubar-hook) - (setq zmacs-region-stays 't) + (setq zmacs-region-stays t) (popup-menu ,symbol))))) (defun easy-menu-change (&rest args) (when (featurep 'menubar) (apply 'add-menu args))) -;; This variable hold the easy-menu mode menus of all major and -;; minor modes currently in effect in the current buffer. -(defvar easy-menu-all-popups nil) +(defvar easy-menu-all-popups nil + "Don't use this. +This variable holds the menus of all major and minor modes in effect in the +current buffer. ") (make-variable-buffer-local 'easy-menu-all-popups) (defun easy-menu-add (menu &optional map) "Add MENU to the current menu bar." + ;; If you uncomment the following, do an xemacs -vanilla, type M-x + ;; folding-mode RET, you'll see that this code, which theoretically has + ;; *scratch* as its buffer context, can't see *scratch*'s value for + ;; mode-popup-menu--the default overrides it. + ;; + ;; This is not specific to *scratch*--try it on ~/.xemacs/init.el--but it + ;; does appear to be specific to the first time mode-popup-menu is + ;; accessed as a buffer-local variable in non-interactive code (that is, + ;; M-: mode-popup-menu RET gives the correct value). + ;; + ;; My fixing this right now isn't going to happen. Aidan Kehoe, 2006-01-03 +; (message (concat "inside easy-menu-add, menu is %s, " +; "mode-popup-menu is %s, current buffer is %s, " +; "default-value mode-popup-menu is %s, " +; "easy-menu-all-popups is %s") +; menu mode-popup-menu (current-buffer) +; (default-value 'mode-popup-menu) easy-menu-all-popups) (when (featurep 'menubar) - (unless (member menu easy-menu-all-popups) - (push menu easy-menu-all-popups)) - (setq mode-popup-menu (if (> (length easy-menu-all-popups) 1) - (cons (easy-menu-title) - (reverse easy-menu-all-popups)) - (let ((same-as-menu - (car easy-menu-all-popups))) - (cons (normalize-menu-item-name - (car same-as-menu)) - (cdr same-as-menu))))) - + ;; Save the existing mode-popup-menu, if it's been changed. + (when (and (zerop (length easy-menu-all-popups)) + (not (equal (default-value 'mode-popup-menu) mode-popup-menu))) + (push mode-popup-menu easy-menu-all-popups)) + ;; Add the menu to our list of all the popups for the buffer. + (pushnew menu easy-menu-all-popups :test 'equal) + ;; If there are multiple popup menus available, make the popup menu + ;; normally shown with button-3 a menu of them. If there is just one, + ;; make that button show it, and no super-menu. + (setq mode-popup-menu (if (= 1 (length easy-menu-all-popups)) + (car easy-menu-all-popups) + (cons (easy-menu-title) + (reverse easy-menu-all-popups)))) (cond ((null current-menubar) ;; Don't add it to a non-existing menubar. nil) @@ -202,16 +222,20 @@ is a list of menu items, as above." (defun easy-menu-remove (menu) "Remove MENU from the current menu bar." (when (featurep 'menubar) - (setq easy-menu-all-popups (delq menu easy-menu-all-popups) - mode-popup-menu (if (< (length easy-menu-all-popups) 1) - (cons (easy-menu-title) - (reverse easy-menu-all-popups)) - (let ((same-as-menu - (car easy-menu-all-popups))) - (cons (normalize-menu-item-name - (car same-as-menu)) - (cdr same-as-menu))))) - + (setq + ;; Remove this menu from the list of popups we know about. + easy-menu-all-popups (delq menu easy-menu-all-popups) + ;; If there are multiple popup menus available, make the popup menu + ;; normally shown with button-3 a menu of them. If there is just one, + ;; make that button show it, and no super-menu. + mode-popup-menu (if (= 1 (length easy-menu-all-popups)) + (car easy-menu-all-popups) + (cons (easy-menu-title) + (reverse easy-menu-all-popups)))) + ;; If we've just set mode-popup-menu to an empty menu, change that menu + ;; to its default value (without intervention from easy-menu). + (if (zerop (length easy-menu-all-popups)) + (setq mode-popup-menu (default-value 'mode-popup-menu))) (and current-menubar (assoc (car menu) current-menubar) (delete-menu-item (list (car menu)))))) @@ -261,9 +285,6 @@ The return value can be used as an argument to `easy-menu-add-item'." (delete-menu-item (append path (list name)) (easy-menu-normalize menu)))) - - - ;; Think up a good title for the menu. Take the major-mode of the ;; buffer, strip the -mode part, convert hyphens to spaces, and ;; capitalize it. diff --git a/lisp/find-paths.el b/lisp/find-paths.el index 494ed16..bad05a9 100644 --- a/lisp/find-paths.el +++ b/lisp/find-paths.el @@ -108,7 +108,12 @@ from the search." ;; in-place or windows-nt (and (paths-file-readable-directory-p (paths-construct-path (list directory "lisp"))) - (paths-file-readable-directory-p (paths-construct-path (list directory "etc")))))) + (paths-file-readable-directory-p (paths-construct-path (list directory "etc")))) + + ;; searching for a package directory on Windows + (and + (string-match "win32\\|cygwin" system-configuration) + (paths-file-readable-directory-p (paths-construct-path (list directory "xemacs-packages")))))) (defun paths-root-in-place-p (root) "Check if ROOT is an in-place installation root for XEmacs." @@ -123,9 +128,10 @@ from the search." (paths-chase-symlink destination)) file-name))) -(defun paths-find-emacs-root - (invocation-directory invocation-name) - "Find the run-time root of XEmacs." +(defun paths-find-invocation-roots (invocation-directory invocation-name) + "Find the list of run-time roots of XEmacs. +INVOCATION-DIRECTORY is a directory containing the XEmacs executable. +INVOCATION-NAME is the name of the executable itself." (let* ((executable-file-name (paths-chase-symlink (concat invocation-directory invocation-name))) @@ -134,10 +140,9 @@ from the search." (paths-construct-path '("..") executable-directory))) (maybe-root-2 (file-name-as-directory (paths-construct-path '(".." "..") executable-directory)))) - (or (and (paths-emacs-root-p maybe-root-1) - maybe-root-1) - (and (paths-emacs-root-p maybe-root-2) - maybe-root-2)))) + + (paths-filter #'paths-emacs-root-p + (list maybe-root-1 maybe-root-2)))) (defun paths-construct-path (components &optional expand-directory) "Convert list of path components COMPONENTS into a path. @@ -301,11 +306,8 @@ Otherwise, they are left alone." (defun paths-find-emacs-roots (invocation-directory invocation-name) "Find all plausible installation roots for XEmacs." - (let* ((potential-invocation-root - (paths-find-emacs-root invocation-directory invocation-name)) - (invocation-roots - (and potential-invocation-root - (list potential-invocation-root))) + (let* ((invocation-roots + (paths-find-invocation-roots invocation-directory invocation-name)) (potential-installation-roots (paths-uniq-append (and configure-exec-prefix-directory diff --git a/lisp/finder.el b/lisp/finder.el index cbed603..6124ce8 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -287,7 +287,7 @@ arguments compiles from `load-path'." found) (while (and dirs (not found)) (if (file-exists-p (expand-file-name (concat file ".el") (car dirs))) - (setq found (expand-file-name file (car dirs))) + (setq found (expand-file-name (concat file ".el") (car dirs))) (if (file-exists-p (expand-file-name file (car dirs))) (setq found (expand-file-name file (car dirs))))) (setq dirs (cdr dirs))) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 1734010..d72aeeb 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -441,6 +441,32 @@ edit the buffer does not, since it considers text one line at a time. Be very careful composing regexps for this list; the wrong pattern can dramatically slow things down! ") + +(defvar font-lock-keywords-alist nil + "Alist of additional `font-lock-keywords' elements for major modes. + +Each element has the form (MODE KEYWORDS . HOW). +`font-lock-set-defaults' adds the elements in the list KEYWORDS to +`font-lock-keywords' when Font Lock is turned on in major mode MODE. + +If HOW is nil, KEYWORDS are added at the beginning of +`font-lock-keywords'. If it is `set', they are used to replace the +value of `font-lock-keywords'. If HOW is any other non-nil value, +they are added at the end. + +This is normally set via `font-lock-add-keywords' and +`font-lock-remove-keywords'.") + +(defvar font-lock-removed-keywords-alist nil + "Alist of `font-lock-keywords' elements to be removed for major modes. + +Each element has the form (MODE . KEYWORDS). `font-lock-set-defaults' +removes the elements in the list KEYWORDS from `font-lock-keywords' +when Font Lock is turned on in major mode MODE. + +This is normally set via `font-lock-add-keywords' and +`font-lock-remove-keywords'.") + ;;;###autoload (make-variable-buffer-local 'font-lock-keywords) @@ -687,6 +713,11 @@ The corresponding face should be set using `edit-faces' or the It is present only for horrid FSF compatibility reasons. The corresponding face should be set using `edit-faces' or the `set-face-*' functions.") +(defvar font-lock-warning-face 'font-lock-warning-face + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defconst font-lock-face-list '(font-lock-comment-face @@ -860,6 +891,188 @@ on the major mode's symbol." (setq font-lock-maximum-decoration t) (font-lock-recompute-variables))) +(defun font-lock-add-keywords (mode keywords &optional how) + "Add highlighting KEYWORDS for MODE. + +MODE should be a symbol, the major mode command name, such as `c-mode' +or nil. If nil, highlighting keywords are added for the current buffer. +KEYWORDS should be a list; see the variable `font-lock-keywords'. +By default they are added at the beginning of the current highlighting list. +If optional argument HOW is `set', they are used to replace the current +highlighting list. If HOW is any other non-nil value, they are added at the +end of the current highlighting list. + +For example: + + (font-lock-add-keywords 'c-mode + '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) + (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . font-lock-keyword-face))) + +adds two fontification patterns for C mode, to fontify `FIXME:' words, even in +comments, and to fontify `and', `or' and `not' words as keywords. + +The above procedure will only add the keywords for C mode, not +for modes derived from C mode. To add them for derived modes too, +pass nil for MODE and add the call to c-mode-hook. + +For example: + + (add-hook 'c-mode-hook + (lambda () + (font-lock-add-keywords nil + '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) + (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . + font-lock-keyword-face))))) + +The above procedure may fail to add keywords to derived modes if +some involved major mode does not follow the standard conventions. +File a bug report if this happens, so the major mode can be corrected. + +Note that some modes have specialized support for additional patterns, e.g., +see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', +`objc-font-lock-extra-types' and `java-font-lock-extra-types'." + (cond (mode + ;; If MODE is non-nil, add the KEYWORDS and HOW spec to + ;; `font-lock-keywords-alist' so `font-lock-set-defaults' uses them. + (let ((spec (cons keywords how)) cell) + (if (setq cell (assq mode font-lock-keywords-alist)) + (if (eq how 'set) + (setcdr cell (list spec)) + (setcdr cell (append (cdr cell) (list spec)))) + (push (list mode spec) font-lock-keywords-alist))) + ;; Make sure that `font-lock-removed-keywords-alist' does not + ;; contain the new keywords. + (font-lock-update-removed-keyword-alist mode keywords how)) + (t + ;; Otherwise set or add the keywords now. + ;; This is a no-op if it has been done already in this buffer + ;; for the correct major mode. + (font-lock-set-defaults) + (let ((was-compiled (eq (car font-lock-keywords) t))) + ;; Bring back the user-level (uncompiled) keywords. + (if was-compiled + (setq font-lock-keywords (cadr font-lock-keywords))) + ;; Now modify or replace them. + (if (eq how 'set) + (setq font-lock-keywords keywords) + (font-lock-remove-keywords nil keywords) ;to avoid duplicates + (let ((old (if (eq (car-safe font-lock-keywords) t) + (cdr font-lock-keywords) + font-lock-keywords))) + (setq font-lock-keywords (if how + (append old keywords) + (append keywords old))))) + ;; If the keywords were compiled before, compile them again. + (if was-compiled + (setq font-lock-keywords + (font-lock-compile-keywords font-lock-keywords))))))) + +(defun font-lock-update-removed-keyword-alist (mode keywords how) + "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." + ;; When font-lock is enabled first all keywords in the list + ;; `font-lock-keywords-alist' are added, then all keywords in the + ;; list `font-lock-removed-keywords-alist' are removed. If a + ;; keyword was once added, removed, and then added again it must be + ;; removed from the removed-keywords list. Otherwise the second add + ;; will not take effect. + (let ((cell (assq mode font-lock-removed-keywords-alist))) + (if cell + (if (eq how 'set) + ;; A new set of keywords is defined. Forget all about + ;; our old keywords that should be removed. + (setq font-lock-removed-keywords-alist + (delq cell font-lock-removed-keywords-alist)) + ;; Delete all previously removed keywords. + (dolist (kword keywords) + (setcdr cell (delete kword (cdr cell)))) + ;; Delete the mode cell if empty. + (if (null (cdr cell)) + (setq font-lock-removed-keywords-alist + (delq cell font-lock-removed-keywords-alist))))))) + +;; Written by Anders Lindgren <andersl@andersl.com>. +;; +;; Case study: +;; (I) The keywords are removed from a major mode. +;; In this case the keyword could be local (i.e. added earlier by +;; `font-lock-add-keywords'), global, or both. +;; +;; (a) In the local case we remove the keywords from the variable +;; `font-lock-keywords-alist'. +;; +;; (b) The actual global keywords are not known at this time. +;; All keywords are added to `font-lock-removed-keywords-alist', +;; when font-lock is enabled those keywords are removed. +;; +;; Note that added keywords are taken out of the list of removed +;; keywords. This ensure correct operation when the same keyword +;; is added and removed several times. +;; +;; (II) The keywords are removed from the current buffer. +(defun font-lock-remove-keywords (mode keywords) + "Remove highlighting KEYWORDS for MODE. + +MODE should be a symbol, the major mode command name, such as `c-mode' +or nil. If nil, highlighting keywords are removed for the current buffer. + +To make the removal apply to modes derived from MODE as well, +pass nil for MODE and add the call to MODE-hook. This may fail +for some derived modes if some involved major mode does not +follow the standard conventions. File a bug report if this +happens, so the major mode can be corrected." + (cond (mode + ;; Remove one keyword at the time. + (dolist (keyword keywords) + (let ((top-cell (assq mode font-lock-keywords-alist))) + ;; If MODE is non-nil, remove the KEYWORD from + ;; `font-lock-keywords-alist'. + (when top-cell + (dolist (keyword-list-how-pair (cdr top-cell)) + ;; `keywords-list-how-pair' is a cons with a list of + ;; keywords in the car top-cell and the original how + ;; argument in the cdr top-cell. + (setcar keyword-list-how-pair + (delete keyword (car keyword-list-how-pair)))) + ;; Remove keyword list/how pair when the keyword list + ;; is empty and how doesn't specify `set'. (If it + ;; should be deleted then previously deleted keywords + ;; would appear again.) + (let ((cell top-cell)) + (while (cdr cell) + (if (and (null (car (car (cdr cell)))) + (not (eq (cdr (car (cdr cell))) 'set))) + (setcdr cell (cdr (cdr cell))) + (setq cell (cdr cell))))) + ;; Final cleanup, remove major mode cell if last keyword + ;; was deleted. + (if (null (cdr top-cell)) + (setq font-lock-keywords-alist + (delq top-cell font-lock-keywords-alist)))) + ;; Remember the keyword in case it is not local. + (let ((cell (assq mode font-lock-removed-keywords-alist))) + (if cell + (unless (member keyword (cdr cell)) + (nconc cell (list keyword))) + (push (cons mode (list keyword)) + font-lock-removed-keywords-alist)))))) + (t + ;; Otherwise remove it immediately. + (font-lock-set-defaults) + (let ((was-compiled (eq (car font-lock-keywords) t))) + ;; Bring back the user-level (uncompiled) keywords. + (if was-compiled + (setq font-lock-keywords (cadr font-lock-keywords))) + + ;; Edit them. + (setq font-lock-keywords (copy-sequence font-lock-keywords)) + (dolist (keyword keywords) + (setq font-lock-keywords + (delete keyword font-lock-keywords))) + + ;; If the keywords were compiled before, compile them again. + (if was-compiled + (setq font-lock-keywords + (font-lock-compile-keywords font-lock-keywords))))))) ;;;;;;;;;;;;;;;;;;;;;; actual code ;;;;;;;;;;;;;;;;;;;;;; @@ -2503,9 +2716,10 @@ The name is assumed to begin with a capital letter.") (list (concat "\\<\\(" + "assert\\|" "break\\|byvalue\\|" "case\\|cast\\|catch\\|class\\|continue\\|" - "do\\|else\\|extends\\|" + "do\\|else\\|enum\\|extends\\|" "finally\\|for\\|future\\|" "generic\\|goto\\|" "if\\|implements\\|import\\|" @@ -2691,10 +2905,10 @@ The name is assumed to begin with a capital letter.") '("\\(@beaninfo\\)" 0 font-lock-keyword-face t) ;; Doc tag - Links - '("{ *@link\\s +\\([^}]+\\)}" + '("{ *@link\\(?:plain\\)?\\s +\\([^}]+\\)}" 0 font-lock-keyword-face t) ;; Doc tag - Links - '("{ *@link\\s +\\(\\(\\S +\\)\\|\\(\\S +\\s +\\S +\\)\\) *}" + '("{ *@link\\(?:plain\\)?\\s +\\(\\(\\S +\\)\\|\\(\\S +\\s +\\S +\\)\\) *}" 1 font-lock-function-name-face t) ))) diff --git a/lisp/font.el b/lisp/font.el index 6b27b64..b0e002f 100644 --- a/lisp/font.el +++ b/lisp/font.el @@ -310,8 +310,8 @@ Canonical sizes are in points. If SPEC is null, nil is returned. If SPEC is a number, it is interpreted as the desired point size and returned unchanged. Otherwise SPEC must be a string consisting of a number and an optional type. The type may be the strings \"px\", \"pix\", or \"pixel\" (pixels), \"pt\" or -\"point\" (points), \"pa\" or \"pica\" (picas), \"in\" or \"inch\" (inches), \"cm\" -(centimeters), or \"mm\" (millimeters). +\"point\" (points), \"pa\" or \"pica\" (picas), \"in\" or \"inch\" (inches), +\"cm\" (centimeters), or \"mm\" (millimeters). 1 in = 2.54 cm = 6 pa = 25.4 mm = 72 pt. Pixel size is device-dependent." (cond @@ -350,7 +350,7 @@ The type may be the strings \"px\", \"pix\", or \"pixel\" (pixels), \"pt\" or (setq num (string-to-number spec)) (cond ((member type '("pixel" "px" "pix")) - (setq retval (* num (/ pix-width mm-width) (/ 25.4 72.0)))) + (setq retval (* num (/ mm-width pix-width) (/ 72.0 25.4)))) ((member type '("point" "pt")) (setq retval num)) ((member type '("pica" "pa")) @@ -1078,8 +1078,6 @@ for use in the 'weight' field of an mswindows font string.") The list (R G B) is returned, or an error is signaled if the lookup fails." (let ((lib-list (if (boundp 'x-library-search-path) x-library-search-path - ;; This default is from XEmacs 19.13 - hope it covers - ;; everyone. (list "/usr/X11R6/lib/X11/" "/usr/X11R5/lib/X11/" "/usr/lib/X11R6/X11/" @@ -1090,7 +1088,9 @@ The list (R G B) is returned, or an error is signaled if the lookup fails." "/usr/local/lib/X11R5/X11/" "/usr/X11/lib/X11/" "/usr/lib/X11/" + "/usr/share/X11/" "/usr/local/lib/X11/" + "/usr/local/share/X11/" "/usr/X386/lib/X11/" "/usr/x386/lib/X11/" "/usr/XFree86/lib/X11/" diff --git a/lisp/gutter-items.el b/lisp/gutter-items.el index c71a172..8ac62f6 100644 --- a/lisp/gutter-items.el +++ b/lisp/gutter-items.el @@ -670,8 +670,10 @@ If the only argument is nil, clear any existing progress gauge." (defun progress-feedback-with-label (label fmt &optional value &rest args) "Print a progress gauge and message in the bottom gutter area of the frame. -First argument LABEL is an identifier for this progress gauge. The rest of the -arguments are the same as to `format'." +LABEL is an identifier for this progress gauge. +FMT is a format string to be passed to `format' along with ARGS. +Optional VALUE is the current degree of progress, an integer 0-100. +The remaining ARGS are passed with FMT `(apply #'format FMT ARGS)'." ;; #### sometimes the buffer gets changed temporarily. I don't know ;; why this is, so protect against it. (save-excursion diff --git a/lisp/help.el b/lisp/help.el index 2ef37f9..1ac1780 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -736,7 +736,7 @@ of the key sequence that ran this command." (defun view-emacs-news () "Display info on recent changes to XEmacs." (interactive) - (Help-find-file (locate-data-file "NEWS"))) + (Help-find-file (expand-file-name "NEWS" data-directory))) (defun xemacs-www-page () "Go to the XEmacs World Wide Web page." diff --git a/lisp/info.el b/lisp/info.el index 41cfc46..a83a578 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -699,7 +699,8 @@ further (recursive) error recovery. TRYFILE is ??" Info-current-subfile nil Info-current-file-completions nil Info-index-alternatives nil - buffer-file-name nil) + buffer-file-name nil + buffer-file-truename nil) (erase-buffer) (if (string= "dir" (file-name-nondirectory filename)) (Info-insert-dir) @@ -1034,7 +1035,8 @@ actually get any text from." (message "Composing main Info directory...done")) (setq Info-dir-contents (buffer-string))) (setq default-directory (file-name-as-directory Info-dir-contents-directory)) - (setq buffer-file-name (caar Info-dir-file-attributes))) + (setq buffer-file-name (caar Info-dir-file-attributes) + buffer-file-truename (file-truename buffer-file-name))) (defmacro Info-directory-files (dir-file &optional all full nosort files-only) "Return a list of Info files living in the same directory as DIR-FILE. @@ -1405,7 +1407,8 @@ invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"." (throw 'foo t))))) (or (equal Info-current-subfile lastfilename) (let ((buffer-read-only nil)) - (setq buffer-file-name nil) + (setq buffer-file-name nil + buffer-file-truename nil) (widen) (erase-buffer) (Info-insert-file-contents (Info-suffixed-file @@ -1513,7 +1516,8 @@ versions of NAME. Only the suffixes are tried." (call-process shell-file-name nil t nil shell-command-switch command) (message "") (when visit - (setq buffer-file-name file) + (setq buffer-file-name file + buffer-file-truename (file-truename buffer-file-name)) (set-buffer-modified-p nil) (clear-visited-file-modtime))) (insert-file-contents file visit)))) @@ -3035,7 +3039,7 @@ The locations are of the format used in Info-history, i.e. \(FILENAME NODENAME BUFFERPOS\)." (let ((where '()) (cmd-desc (concat "^\\* " (regexp-quote (symbol-name command)) - ":\\s *\\(.*\\)\\.$"))) + ":\\s *\\(.*\\)\\."))) (save-excursion (Info-find-node "XEmacs" "Command Index") ;; Take the index node off the Info history. diff --git a/lisp/minibuf.el b/lisp/minibuf.el index d6dc4c4..8177a3e 100644 --- a/lisp/minibuf.el +++ b/lisp/minibuf.el @@ -271,8 +271,7 @@ in `substitute-in-file-name'." If `zmacs-regions' is true, and the zmacs region is active in this buffer, then this key deactivates the region without beeping." (interactive) - (if (and (region-active-p) - (eq (current-buffer) (zmacs-region-buffer))) + (if (region-active-p) ;; pseudo-zmacs compatibility: don't beep if this ^G is simply ;; deactivating the region. If it is inactive, beep. nil @@ -2197,7 +2196,9 @@ whether it is a file(/result) or a directory (/result/)." "/usr/local/lib/X11R5/X11/" "/usr/X11/lib/X11/" "/usr/lib/X11/" + "/usr/share/X11/" "/usr/local/lib/X11/" + "/usr/local/share/X11/" "/usr/X386/lib/X11/" "/usr/x386/lib/X11/" "/usr/XFree86/lib/X11/" diff --git a/lisp/obsolete.el b/lisp/obsolete.el index f0d54f5..2cb8043 100644 --- a/lisp/obsolete.el +++ b/lisp/obsolete.el @@ -269,6 +269,9 @@ set Info-directory-list.") (define-compatible-function-alias 'assq-delete-all 'remassq) ;GNU 21.1 +(define-compatible-function-alias 'line-beginning-position 'point-at-bol) +(define-compatible-function-alias 'line-end-position 'point-at-eol) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline) diff --git a/lisp/package-get.el b/lisp/package-get.el index c0d29a4..1ca37a6 100644 --- a/lisp/package-get.el +++ b/lisp/package-get.el @@ -204,6 +204,7 @@ directory." ("US (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/packages") ;; In alphabetical order of Country, our mirrors... + ("Argentina (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/packages") ("Australia (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/packages") ("Australia (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/packages") ("Austria (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/packages") @@ -211,39 +212,37 @@ directory." ("Brazil (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/packages") ("Canada (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/packages") ("Canada (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") - ("Canada (ualberta.ca)" "sunsite.ualberta.ca" "pub/Mirror/xemacs/packages") + ("Canada (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/packages") +; ;; no anonymous ftp available: +; ("Chile (cl.xemacs.org)" "ftp.cl.xemacs.org" "packages") ("Czech Republic (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages") - ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "pub/emacs/xemacs/packages") + ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/packages") ("Finland (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("France (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/packages") ("France (mirror.cict.fr)" "mirror.cict.fr" "xemacs/packages") ("France (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("Germany (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/packages") - ("Germany (tu-darmstadt.de)" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") + ("Greece (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/packages") + ("Hong Kong (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/packages") ("Ireland (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages") + ("Ireland (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/packages") ("Italy (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages") - ("Japan (aist.go.jp)" "ring.aist.go.jp" "pub/text/xemacs/packages") - ("Japan (asahi-net.or.jp)" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") ("Japan (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") - ("Japan (jaist.ac.jp)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") - ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/GNU/xemacs/packages") - ("Japan (nucba.ac.jp)" "mirror.nucba.ac.jp" "mirror/xemacs/packages") - ("Japan (sut.ac.jp)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/packages") +; ("Japan (jaist.ac.jp)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") + ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/packages") +; ("Japan (nucba.ac.jp)" "mirror.nucba.ac.jp" "mirror/xemacs/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages") - ("New Zealand (nz.xemacs.org)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages") + ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/packages") ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages") - ("Poland (pl.xemacs.org)" "ftp.pl.xemacs.org" "pub/unix/editors/xemacs/packages") - ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/xemacs/packages") - ("Slovakia (sk.xemacs.org)" "ftp.sk.xemacs.org" "pub/mirrors/xemacs/packages") - ("South Africa (za.xemacs.org)" "ftp.za.xemacs.org" "mirrorsites/ftp.xemacs.org/packages") + ("Portugal (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/packages") + ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/packages") + ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/packages") ("Sweden (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages") ("Switzerland (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/packages") + ("Taiwan (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/packages") ("UK (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages") - ("US (ibiblio.org)" "ibiblio.org" "pub/packages/editors/xemacs/packages") - ("US (stealth.net)" "ftp.stealth.net" "pub/mirrors/ftp.xemacs.org/pub/xemacs/packages") - ("US (unc.edu)" "metalab.unc.edu" "pub/packages/editors/xemacs/packages") - ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/xemacs/packages") - ("US (utk.edu)" "ftp.sunsite.utk.edu" "pub/xemacs/packages") + ("US (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/packages") + ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/packages") ) "*List of remote sites available for downloading packages. List format is '(site-description site-name directory-on-site). @@ -260,27 +259,32 @@ variable actually used to specify package download sites." (defcustom package-get-pre-release-download-sites '( ;; Main XEmacs Site (ftp.xemacs.org) - ("Pre-Releases (Main XEmacs Site)" "ftp.xemacs.org" + ("US Pre-Releases (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/beta/experimental/packages") ;; In alphabetical order of Country, our mirrors... + ("Argentina Pre-Releases (xmundo.net)" "xemacs.xmundo.net" + "pub/mirrors/xemacs/beta/experimental/packages") ("Australia Pre-Releases (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/beta/experimental/packages") ("Australia Pre-Releases (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Austria Pre-Releases (at.xemacs.org)" "ftp.at.xemacs.org" - "editors/xemacs/beta/experimentsl/packages") + "editors/xemacs/beta/experimental/packages") + ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" + "xemacs/beta/experimental/packages") ("Brazil Pre-Releases (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/xemacs-21.5/experimental/packages") ("Canada Pre-Releases (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/beta/experimental/packages") - ("Canada Pre-Releases (crc.ca)" "ftp.crc.ca" + ("Canada Pre-Releases (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/beta/experimental/packages") - ("Canada Pre-Releases (ualberta.ca)" "sunsite.ualberta.ca" - "pub/Mirror/xemacs/beta/experimental/packages") +; ;; no anonymous ftp available: +; ("Chile Pre-Releases (cl.xemacs.org)" "ftp.cl.xemacs.org" +; "beta/experimental/packages") ("Czech Republic Pre-Releases (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/xemacs-21.5/experimental/packages") ("Denmark Pre-Releases (dk.xemacs.org)" "ftp.dk.xemacs.org" - "pub/emacs/xemacs/beta/experimental/packages") + "xemacs/beta/experimental/packages") ("Finland Pre-Releases (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/beta/experimental/packages") ("France Pre-Releases (fr.xemacs.org)" "ftp.fr.xemacs.org" @@ -291,53 +295,47 @@ variable actually used to specify package download sites." "pub/computing/xemacs/beta/experimental/packages") ("Germany Pre-Releases (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/beta/experimental/packages") - ("Germany Pre-Releases (tu-darmstadt.de)" "ftp.tu-darmstadt.de" - "pub/editors/xemacs/beta/experimental/packages") + ("Greece Pre-Releases (gr.xemacs.org)" "ftp.gr.xemacs.org" + "mirrors/XEmacs/ftp/beta/experimental/packages") + ("Hong Kong Pre-Releases (hk.xemacs.org)" "ftp.hk.xemacs.org" + "pub/xemacsftp/beta/experimental/packages") ("Ireland Pre-Releases (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") + ("Ireland Pre-Releases (heanet.ie)" "ftp.heanet.ie" + "mirrors/ftp.xemacs.org/beta/experimental/packages") ("Italy Pre-Releases (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/beta/experimental/packages") - ("Japan Pre-Releases (aist.go.jp)" "ring.aist.go.jp" - "pub/text/xemacs/beta/experimental/packages") - ("Japan Pre-Releases (asahi-net.or.jp)" "ring.asahi-net.or.jp" - "pub/text/xemacs/beta/experimental/packages") ("Japan Pre-Releases (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/beta/experimental/packages") - ("Japan Pre-Releases (jaist.ac.jp)" "ftp.jaist.ac.jp" - "pub/GNU/xemacs/beta/experimental/packages") +; ("Japan Pre-Releases (jaist.ac.jp)" "ftp.jaist.ac.jp" +; "pub/GNU/xemacs/beta/experimental/packages") ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" - "pub/GNU/xemacs/beta/experimental/packages") - ("Japan Pre-Releases (sut.ac.jp)" "sunsite.sut.ac.jp" - "pub/archives/packages/xemacs/xemacs-21.5/experimental/packages") - ("New Zealand Pre-Releases (nz.xemacs.org)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages") + "pub/text/xemacs/beta/experimental/packages") + ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" + "pub/tools/emacs/xemacs/beta/experimental/packages") + ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" + "pub/xemacs/ftp/beta/experimental/packages") ("Norway Pre-Releases (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/beta/experimental/packages") - ("Poland Pre-Releases (pl.xemacs.org)" "ftp.pl.xemacs.org" - "pub/unix/editors/xemacs/beta/experimental/packages") + ("Portugal Pre-Releases (pt.xemacs.org)" "ftp.pt.xemacs.org" + "pub/MIRRORS/ftp.xemacs.org/beta/experimental/packages") ("Russia Pre-Releases (ru.xemacs.org)" "ftp.ru.xemacs.org" - "pub/xemacs/beta/experimental/packages") - ("Saudi Arabia Pre-Releases (sa.xemacs.org)" "ftp.sa.xemacs.org" - "pub/mirrors/ftp.xemacs.org/xemacs/xemacs-21.5/experimental/packages") - ("Slovakia Pre-Releases (sk.xemacs.org)" "ftp.sk.xemacs.org" - "pub/mirrors/xemacs/beta/experimental/packages") - ("South Africa Pre-Releases (za.xemacs.org)" "ftp.za.xemacs.org" - "mirrorsites/ftp.xemacs.org/beta/experimental/packages") + "pub/emacs/xemacs/beta/experimental/packages") + ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" + "pub/xemacs.org/beta/experimental/packages") ("Sweden Pre-Releases (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/beta/experimental/packages") ("Switzerland Pre-Releases (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/beta/experimental/packages") + ("Taiwan Pre-Releases (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" + "Unix/Editors/XEmacs/beta/experimental/packages") ("UK Pre-Releases (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") - ("US Pre-Releases (ibiblio.org)" "ibiblio.org" - "pub/packages/editors/xemacs/beta/experimental/packages") - ("US Pre-Releases (stealth.net)" "ftp.stealth.net" - "pub/mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") - ("US Pre-Releases (unc.edu)" "metalab.unc.edu" - "pub/packages/editors/xemacs/beta/experimental/packages") + ("US Pre-Releases (ibiblio.org)" "mirrors.ibiblio.org" + "pub/mirrors/xemacs/beta/experimental/packages") ("US Pre-Releases (us.xemacs.org)" "ftp.us.xemacs.org" - "pub/xemacs/beta/experimental/packages") - ("US Pre-Releases (utk.edu)" "ftp.sunsite.utk.edu" - "pub/xemacs/beta/experimental/packages")) + "pub/mirrors/xemacs/beta/experimental/packages") +) "*List of remote sites available for downloading \"Pre-Release\" packages. List format is '(site-description site-name directory-on-site). SITE-DESCRIPTION is a textual description of the site. SITE-NAME @@ -844,14 +842,7 @@ Return `t' upon complete success, `nil' if any errors occurred." (progn ;; Add lispdir to load-path if it doesn't already exist. ;; NOTE: this does not take symlinks, etc., into account. - (if (let ((dirs load-path)) - (catch 'done - (while dirs - (if (string-equal (car dirs) lispdir) - (throw 'done nil)) - (setq dirs (cdr dirs))) - t)) - (setq load-path (cons lispdir load-path))) + (add-to-list 'load-path (file-name-as-directory lispdir)) (if (not (package-get-load-package-file lispdir "auto-autoloads")) (package-get-load-package-file lispdir "_pkg")) t) diff --git a/lisp/package-ui.el b/lisp/package-ui.el index 9e4eee4..f8ed19a 100644 --- a/lisp/package-ui.el +++ b/lisp/package-ui.el @@ -509,14 +509,15 @@ Designed to be called interactively (from a keypress)." (defun pui-display-maintainer (&optional no-error event) "Display a package's maintainer in the minibuffer." (interactive) - (let (extent pkg-sym info maintainer) + (let (extent ;pkg-sym + info maintainer) (save-excursion (beginning-of-line) (if (setq extent (extent-at (point) (current-buffer) 'pui)) (progn - (setq pkg-sym (extent-property extent 'pui-package) - info (extent-property extent 'pui-info) - maintainer (package-get-info-prop info 'maintainer)) + (setq ;pkg-sym (extent-property extent 'pui-package) + info (extent-property extent 'pui-info) + maintainer (package-get-info-prop info 'maintainer)) (message (format "Maintainer: %s" maintainer))) (if no-error (clear-message nil) @@ -564,7 +565,7 @@ Useful keys: `\\[pui-toggle-package-delete-key]' to select/unselect the current package for removal. `\\[pui-add-required-packages]' to add any packages required by those selected. `\\[pui-install-selected-packages]' to install/delete selected packages. - `\\[pui-display-info]' to display additional information about the package in the modeline. + `\\[pui-display-info]' to display additional information about the package in the minibuffer. `\\[pui-display-maintainer]' to display the package's maintainer in the minibuffer `\\[pui-list-packages]' to refresh the package list. `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose display. @@ -606,11 +607,11 @@ Warning: No download sites specified. Package index may be out of date. ")) (if pui-list-verbose - (insert " Latest Installed - Package name Vers. Vers. Description + (insert " Latest Installed + Package name Vers. Vers. Description ") - (insert " Latest - Package name Vers. Description + (insert " Latest + Package name Vers. Description ")) (insert sep-string) (setq start (point)) @@ -639,13 +640,13 @@ Warning: No download sites specified. Package index may be out of date. ((numberp current-vers) (setq current-vers (format "%.2f" current-vers)))) (insert - (format "%s %-15s %-5.2f %-5s %s\n" + (format "%s %-20s %-5.2f %-5s %s\n" (car disp) pkg-sym (if (stringp version) (string-to-number version) version) current-vers desc))) - (insert (format "%s %-15s %-5s %s\n" + (insert (format "%s %-20s %-5s %s\n" (car disp) pkg-sym version desc))) (save-excursion diff --git a/lisp/simple.el b/lisp/simple.el index c20c4f8..b0666a1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3898,7 +3898,7 @@ This correctly caters to the user's setting of `zmacs-regions'." ;; XEmacs (defun region-active-p () - "Return non-nil if the region is active. + "Return non-nil if the region is active in the current buffer. If `zmacs-regions' is true, this is equivalent to `region-exists-p'. Otherwise, this function always returns false. @@ -3908,7 +3908,8 @@ want grayed out when the region is not active. Instead, use this: [ ... ... :active (region-exists-p)] Which correctly caters to the user's setting of `zmacs-regions'." - (and zmacs-regions zmacs-region-extent)) + (and zmacs-regions zmacs-region-extent + (eq (current-buffer) (zmacs-region-buffer)))) (defvar zmacs-activate-region-hook nil "Function or functions called when the region becomes active; diff --git a/lisp/startup.el b/lisp/startup.el index 5c036fa..26cc299 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -715,43 +715,56 @@ perform the migration at any time with M-x migrate-user-init-file.") (yes-or-no-p-minibuf (concat "Migrate init file to " user-init-directory "? ")))) - (progn - (migrate-user-init-file) - (maybe-create-compatibility-dot-emacs)) - (customize-save-variable 'load-home-init-file t)))) -(defun maybe-create-compatibility-dot-emacs () - "Ask user if she wants to create a .emacs compatibility file." - (if (with-output-to-temp-buffer (help-buffer-name nil) - (progn - (princ "The initialization code has now been migrated to the ") - (princ user-init-directory) - (princ "directory. + (let ((backup (migrate-user-init-file))) + (with-output-to-temp-buffer (help-buffer-name nil) + (progn + (princ "The initialization code has now been migrated to the ") + (princ user-init-directory) + (princ "directory. For backwards compatibility with, for example, older versions of XEmacs, XEmacs can create a special old-style .emacs file in your home directory which will load the relocated initialization code.") - (show-temp-buffer-in-current-frame standard-output) - (yes-or-no-p-minibuf "Create compatibility .emacs? "))) + (if backup + (progn + (princ "\nMoreover, a backup of your old .emacs file was created as\n") + (princ backup) + (princ ".\n"))) + (show-temp-buffer-in-current-frame standard-output) + (maybe-create-compatibility-dot-emacs)))) + (customize-save-variable 'load-home-init-file t)))) + +(defun maybe-create-compatibility-dot-emacs () + "Ask user if she wants to create a .emacs compatibility file." + (if (yes-or-no-p-minibuf "Create compatibility .emacs? ") (create-compatibility-dot-emacs))) (defun migrate-user-init-file () - "Migrate the init file from the home directory." + "Migrate the init file from the home directory. +Return the name of backup file, if one was created." (interactive) (if (not (file-exists-p user-init-directory)) (progn (message "Creating %s directory..." user-init-directory) (make-directory user-init-directory))) (message "Migrating custom file...") - (customize-set-value 'load-home-init-file nil) - (custom-migrate-custom-file (make-custom-file-name user-init-file - 'force-new)) - (message "Moving init file...") - (let ((new-user-init-file (expand-file-name user-init-file-base - user-init-directory))) - (rename-file user-init-file new-user-init-file) - (setq user-init-file new-user-init-file)) - (message "Migration done.")) + (let* ((backup (concat user-init-file ".backup")) + (backup-p + (and (not (file-exists-p backup)) + (progn + (copy-file user-init-file backup) + t)))) + (customize-set-value 'load-home-init-file nil) + (custom-migrate-custom-file (make-custom-file-name user-init-file + 'force-new)) + (message "Moving init file...") + (let ((new-user-init-file (expand-file-name user-init-file-base + user-init-directory))) + (rename-file user-init-file new-user-init-file) + (setq user-init-file new-user-init-file)) + (message "Migration done.") + (and backup-p backup))) (defun create-compatibility-dot-emacs () "Create .emacs compatibility file for migrated setup." diff --git a/lisp/window-xemacs.el b/lisp/window-xemacs.el index 502c6dc..4af7720 100644 --- a/lisp/window-xemacs.el +++ b/lisp/window-xemacs.el @@ -376,6 +376,10 @@ OVERRIDE-FRAME was specified. If `pop-up-frames' is non-nil, make a new frame if no window shows BUFFER. +If the buffer name is a member of the `same-window-buffer-names' list, +or matches one of the `same-window-regexps' expressions, display the +buffer in the currently selected window. + Returns the window displaying BUFFER." (interactive "BDisplay buffer:\nP") diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 0e8b92c..df27f9e 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,50 @@ +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2007-05-20 Stephen J. Turnbull <stephen@xemacs.org> + + Gauge values are signed integers (ints). + (XawGaugeGetValue): Declare return value as int. + (XawGaugeSetValue): Declare value as int. + + * xlwgauge.h: Get rid of references to Cardinal in comment. + + * xlwgauge.c (GaugeGetValue): Declare value as int. + (GaugeMercury): Declare val0 and val1 as int. Remove redundant casts. + (XawGaugeGetValue): Declare return value as int. + (XawGaugeSetValue): Declare value as int. + +2007-05-17 Stephen J. Turnbull <stephen@xemacs.org> + + * lwlib-Xaw.c (wm_delete_window): Iterate over children of shell + (there may be more than one) to find our widget. + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-06-22 Jerry James <james@xemacs.org> + + * lwlib-Xlw.c (xlw_scrollbar_callback): Do not dereference + instance before checking whether it is NULL. + * xlwmenu.c (xlw_map_menu): Prevent uninitialized access to root + and waste. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + +2005-03-07 Stephen J. Turnbull <stephen@xemacs.org> + + * lwlib-Xlw.c (build_tabs_in_widget): Correctly disable geometry + negotiation for tab children. + (xlw_create_tab_control): Don't set nonexistent resizable resource. + 2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index a52b231..2fe4dc9 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -597,11 +597,14 @@ wm_delete_window (Widget shell, XtPointer closure, XtPointer call_data) abort (); XtSetArg (al [0], XtNchildren, &kids); XtGetValues (shell, al, 1); - if (!kids || !*kids) - abort (); - widget = kids [0]; - if (! XtIsSubclass (widget, dialogWidgetClass)) - abort (); + if (!kids || !*kids) abort (); + + for (widget = *kids; + widget && ! XtIsSubclass (widget, dialogWidgetClass); + widget = *++kids) + ; + if (!widget) abort (); + id = lw_get_widget_id (widget); if (! id) abort (); diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c index 150e168..712a62b 100644 --- a/lwlib/lwlib-Xlw.c +++ b/lwlib/lwlib-Xlw.c @@ -163,13 +163,13 @@ xlw_scrollbar_callback (Widget widget, XtPointer closure, XtPointer call_data) XlwScrollBarCallbackStruct *data = (XlwScrollBarCallbackStruct *) call_data; scroll_event event_data; - scrollbar_values *val = - (scrollbar_values *) instance->info->val->scrollbar_data; + scrollbar_values *val; double percent; if (!instance || widget->core.being_destroyed) return; + val = (scrollbar_values *) instance->info->val->scrollbar_data; id = instance->info->id; percent = (double) (data->value - 1) / (double) (INT_MAX - 1); @@ -324,13 +324,21 @@ xlw_update_scrollbar (widget_instance *instance, Widget widget, #ifdef LWLIB_TABS_LUCID /* tab control - lwlib is such an incredible hairy crock. I just cannot believe + [[ lwlib is such an incredible hairy crock. I just cannot believe it! There are random dependencies between functions, there is a total lack of genericity, even though it initially appears to be generic. It should all be junked and begun again. Building tabs are an example - in theory we should be able to reuse a lot of the general stuff because we want to put labels of whatever toolkit we - are using in the tab. Instead we have to hack it by hand. */ + are using in the tab. Instead we have to hack it by hand. ]] + While lwlib is a hairy crock, whoever wrote that seems to misunderstand + Falk's tab control widget. The tab control widget has *two* kinds of + children: *widgets*, which all occupy a *single* pane below the row of + tabs---this is where the labels created in build_tabs_in_widget go, and + *gadgets*, the tabs themselves, which do *not* draw themselves, but + rather are drawn by the control. In fact, in XEmacs the true widget + children are *never* visible! So this case is not a problem in the + design of lwlib, but rather of Falk's widget. -- sjt */ static void xlw_tab_control_callback (Widget w, XtPointer client_data, XtPointer call_data) { @@ -380,9 +388,8 @@ xlw_create_tab_control (widget_instance *instance) widget_value* val = instance->info->val; XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; - XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; + XtSetArg (al [ac], XtNmappedWhenManaged, False); ac++; XtSetArg (al [ac], XtNorientation, XtorientHorizontal); ac++; - XtSetArg (al [ac], XtNresizable, False); ac++; /* add any args the user supplied for creation time */ lw_add_value_args_to_args (val, al, &ac); @@ -401,15 +408,22 @@ static void build_tabs_in_widget (widget_instance* instance, Widget widget, widget_value* val) { widget_value* cur = val; + Arg al[1]; + + /* Children are always invisible, don't permit resizing. */ + XtSetArg (al[0], XtNresizable, False); + for (cur = val; cur; cur = cur->next) { if (cur->value) { + Widget w; #ifdef LWLIB_WIDGETS_MOTIF - xm_create_label (widget, cur); + w = xm_create_label (widget, cur); #else - xaw_create_label (widget, cur); + w = xaw_create_label (widget, cur); #endif + XtSetValues (w, al, 1); } cur->change = NO_CHANGE; } diff --git a/lwlib/xlwgauge.c b/lwlib/xlwgauge.c index 074a6c7..7364fd1 100644 --- a/lwlib/xlwgauge.c +++ b/lwlib/xlwgauge.c @@ -132,7 +132,7 @@ static void EnableUpdate (GaugeWidget); static void DisableUpdate (GaugeWidget); static void GaugeGetValue (XtPointer, XtIntervalId *); -static void GaugeMercury (Display *, Window, GC, GaugeWidget, Cardinal, Cardinal); +static void GaugeMercury (Display *, Window, GC, GaugeWidget, int, int); static Boolean GaugeConvert (Widget, Atom *, Atom *, Atom *, XtPointer *, unsigned long *, int *); @@ -819,8 +819,7 @@ GaugeGetSelCB (Widget w, */ void -XawGaugeSetValue (Widget w, - Cardinal value) +XawGaugeSetValue (Widget w, int value) { GaugeWidget gw = (GaugeWidget)w ; int oldvalue ; @@ -852,7 +851,7 @@ XawGaugeSetValue (Widget w, } -Cardinal +int XawGaugeGetValue (Widget w) { GaugeWidget gw = (GaugeWidget)w ; @@ -875,8 +874,8 @@ GaugeMercury (Display *dpy, Window win, GC gc, GaugeWidget gw, - Cardinal val0, - Cardinal val1) + int val0, + int val1) { int v0 = gw->gauge.v0 ; int v1 = gw->gauge.v1 ; @@ -1110,7 +1109,7 @@ GaugeGetValue (XtPointer clientData, XtIntervalId *intervalId) { GaugeWidget gw = (GaugeWidget)clientData ; - Cardinal value ; + int value ; if( gw->gauge.update > 0 ) EnableUpdate(gw) ; diff --git a/lwlib/xlwgauge.h b/lwlib/xlwgauge.h index ceb21ef..8141384 100644 --- a/lwlib/xlwgauge.h +++ b/lwlib/xlwgauge.h @@ -48,9 +48,9 @@ Boston, MA 02111-1307, USA. */ Name Class RepType Default Value ---- ----- ------- ------------- - value Value Cardinal 0 - minValue MinValue Cardinal 0 - maxValue MaxValue Cardinal 100 + value Value Int 0 + minValue Int Cardinal 0 + maxValue Int Cardinal 100 ntics NTics Cardinal 0 + nlabels NLabels Cardinal 0 ++ labels Labels String * NULL +++ @@ -100,7 +100,7 @@ Boston, MA 02111-1307, USA. */ XtPointer client ; XtPointer rval ; { - *(Cardinal *)rval = value ; + *(int *)rval = value ; } */ @@ -169,11 +169,11 @@ _XFUNCPROTOBEGIN extern void XawGaugeSetValue( #if NeedFunctionPrototypes Widget gauge, - Cardinal value + int value #endif ); -extern Cardinal XawGaugeGetValue( +extern int XawGaugeGetValue( #if NeedFunctionPrototypes Widget gauge #endif diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index cd013c8..eff3d24 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -3412,8 +3412,8 @@ xlw_map_menu (Time t) if (!mw->menu.pointer_grabbed) { XWindowAttributes ret; - Window parent,root; - Window *waste; + Window parent,root = 0UL; + Window *waste = NULL; unsigned int num_waste; lw_menu_active = True; diff --git a/man/ChangeLog b/man/ChangeLog index 481b609..28c171a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,4 +1,80 @@ -2005-02-06 Vin Shelton <acs@xemacs.org> +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-11-07 Robert Pluim <rpluim@gmail.com> + + * lispref/os.texi (User Identification): The code uses HOMEPATH, + not HOMEDIR. + +2006-07-19 Stephen J. Turnbull <stephen@xemacs.org> + + * new-users-guide/edit.texi (Insert): Document bogosity in + vendor labeling of DEL key. + (Numeric Argument): Remove spurious RETs from keystroke examples. + Thanks to Michael C. Wescott <wescott@sc.rr.com>. + +2006-05-17 Stephen J. Turnbull <stephen@xemacs.org> + + * xemacs-faq.texi (Q2.2.3): New node. + (Q2.2.2, Q2.3.1): Fix navigation references. + (Top, Installation): Add to menus. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2005-12-07 Vin Shelton <acs@xemacs.org> + + * xemacs-faq.texi (Q1.0.5): Updated the dates of my contributions. + +2005-12-06 Vin Shelton <acs@xemacs.org> + + * xemacs-faq.texi: copied from 21.5. + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + +2005-12-03 Adrian Aichner <adrian@xemacs.org> + + * custom.texi (Declaring Variables): Typo fixes. + +2005-01-19 Aidan Kehoe <kehoea@parhasard.net> + + * lispref/mule.texi (CCL Example): Detail an implementation of the + web's URL encoding as a CCL coding system example. + +2005-03-26 Aidan Kehoe <kehoea@parhasard.net> + + * lispref/mule.texi (CCL Example): + char-int -> char-to-int, and hex 41 is decimal 65, both problems + with my previous patch pointed out by Stephen. + * lispref/mule.texi (The actual coding system): + Give information on the make-coding-system call, and where the + actual package can be found. + +2005-02-23 Aidan Kehoe <kehoea@parhasard.net> + + * lispref/searching.texi (Syntax of Regexps): + Mention the \c and \C regular expression constructs; cross + reference to the Category Table documentation. + +2005-02-22 Stephen J. Turnbull <stephen@xemacs.org> + + * lispref/glyphs.texi: Complete reorganization, some content updated. + * lispref/lispref.texi (Top): Update menu to match. + * lispref/extents.texi (Extent Properties): Update xref. + * lispref/faces.texi (Face Properties): Background pixmaps can be + used on GTK and MS Windows. + (Face Convenience Functions): Cross-reference glyph interface. + Background pixmap is an image specifier, not a glyph. + +2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released @@ -40,7 +116,7 @@ * lispref/help.texi: Document 3rd arg to `make-obsolete'. -2004-12-05 Vin Shelton <acs@xemacs.org> +2004-12-05 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.16 is released @@ -95,7 +171,7 @@ run-hook-with-args-until-failure, and run-hook-with-args-until-success. -2004-02-02 Vin Shelton <acs@xemacs.org> +2004-02-02 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.15 is released @@ -236,7 +312,7 @@ * lispref/backups.texi (Reverting): Fix the PRINTED-MANUAL-TITLE argument for a cross reference to "The XEmacs User's Manual". -2003-09-03 Vin Shelton <acs@xemacs.org> +2003-09-03 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.14 is released diff --git a/man/custom.texi b/man/custom.texi index a3960a8..fc3a9e4 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -165,13 +165,13 @@ specified default value, @code{saved-value} for a value saved by the user, and @code{variable-documentation} for the documentation string. Use @code{custom-add-option} to specify that a specific function is -useful as an member of a hook. +useful as a member of a hook. @defun custom-add-option symbol option To the variable @var{symbol} add @var{option}. If @var{symbol} is a hook variable, @var{option} should be a hook -member. For other types variables, the effect is undefined." +member. For other types of variables, the effect is undefined." @end defun @node Declaring Faces, Usage for Package Authors, Declaring Variables, Top diff --git a/man/lispref/extents.texi b/man/lispref/extents.texi index ac56b6a..968b835 100644 --- a/man/lispref/extents.texi +++ b/man/lispref/extents.texi @@ -555,7 +555,7 @@ priority over faces later in the list. @xref{Extents and Events}. the extent. This takes precedence over the @code{text-pointer-glyph} and @code{nontext-pointer-glyph} variables. If for any reason this glyph is an invalid pointer, the standard glyphs will be used as -fallbacks. @xref{Mouse Pointer}. +fallbacks. @xref{External Glyphs}. @item detachable (Boolean) Whether this extent becomes detached when all of the text it diff --git a/man/lispref/faces.texi b/man/lispref/faces.texi index 4837ae7..f6d3faa 100644 --- a/man/lispref/faces.texi +++ b/man/lispref/faces.texi @@ -164,7 +164,7 @@ The display table of the face. @item background-pixmap The pixmap displayed in the background of the face. Only used by faces -on X devices. +on GUI devices, currently X11, GTK, and Microsoft Windows. @item underline Underline all text covered by this face. @@ -373,6 +373,14 @@ returned by @code{make-glyph} (@pxref{Glyphs}). The argument may also be a list of the form @code{(@var{width} @var{height} @var{data})} where @var{width} and @var{height} are the size in pixels, and @var{data} is a string, containing the raw bits of the bitmap. + +Similarly to how the glyph's image specifier works @xref{Creating +Glyphs}, you don't create your own image specifier, but rather add +specifications to the existing one. Note that the image instance that is +generated in order to actually display the background pixmap is of type +@code{mono-pixmap}, meaning that it's a two-color image and the +foreground and background of the image get filled in with the +corresponding colors from the face. (#### Is this still true?) @end deffn @deffn Command set-face-font face font &optional locale tag-set how-to-add @@ -393,7 +401,7 @@ specifier of face @var{face}. @end defun @defun face-background-pixmap face &optional locale tag-set exact-p -This function return the background-pixmap glyph object of face +This function returns the background-pixmap image specifier of face @var{face}. @end defun diff --git a/man/lispref/glyphs.texi b/man/lispref/glyphs.texi index 79575a8..b0b4855 100644 --- a/man/lispref/glyphs.texi +++ b/man/lispref/glyphs.texi @@ -1,740 +1,626 @@ @c -*-texinfo-*- @c This is part of the XEmacs Lisp Reference Manual. @c Copyright (C) 1995, 1996 Ben Wing. +@c Copyright (C) 2004 Free Software Foundation, Inc. @c See the file lispref.texi for copying conditions. @setfilename ../../info/glyphs.info @node Glyphs, Annotations, Faces and Window-System Objects, top @chapter Glyphs @cindex glyphs - A @dfn{glyph} is an object that is used for pixmaps, widgets and + A @dfn{glyph} is an object that is used for pixmaps, widgets, and images of all sorts, as well as for things that ``act'' like pixmaps, such as non-textual strings (@dfn{annotations}) displayed in a buffer or in the margins. It is used in begin-glyphs and end-glyphs attached to extents, marginal and textual annotations, overlay arrows (@code{overlay-arrow-*} variables), toolbar buttons, mouse pointers, frame icons, truncation and continuation markers, and the -like. (Basically, any place there is an image or something that acts -like an image, there will be a glyph object representing it.) - - The actual image that is displayed (as opposed to its position or -clipping) is defined by an @dfn{image specifier} object contained -within the glyph. The separation between an image specifier object -and a glyph object is made because the glyph includes other properties -than just the actual image: e.g. the face it is displayed in (for text -images), the alignment of the image (when it is in a buffer), etc. +like. Basically, any place there is an image or something that acts +like an image, there will be a glyph object representing it. @defun glyphp object This function returns @code{t} if @var{object} is a glyph. @end defun @menu -* Glyph Functions:: Functions for working with glyphs. -* Images:: Graphical images displayed in a frame. -* Glyph Types:: Each glyph has a particular type. -* Mouse Pointer:: Controlling the mouse pointer. -* Redisplay Glyphs:: Glyphs controlling various redisplay functions. -* Subwindows:: Inserting an externally-controlled subwindow - into a buffer. -* Glyph Examples:: Examples of how to work with glyphs. +* Glyph Intro:: Glyphs are abstract image specifications. +* Images:: Specifying the appearance of glyphs. +* Using Glyphs:: Creating and displaying glyphs. +* Manipulating Glyphs:: Getting and setting glyph properties. +* Glyph Examples:: Examples of how to work with glyphs. @end menu -@node Glyph Functions -@section Glyph Functions + +@node Glyph Intro +@section Glyph Introduction + + In XEmacs, ``glyph'' does @strong{not} refer to a single unit of textual +display (the XEmacs term for that is @dfn{rune}, and runes are confined +to the internal implementation of redisplay), but rather is an +object encapsulating a graphical element, such as an image or widget (an +active GUI element such as a button or text entry field; X11 calls this a +@dfn{widget}, while MS Windows uses the term @dfn{control}). +This graphical element could appear in a buffer, a margin, a gutter, or +a toolbar, or even externally to XEmacs as a mouse pointer or an icon, +for example. + + On the other hand, by contrast with GNU Emacs 21, an XEmacs glyph is +not ``just'' an image. The actual image that is displayed (as opposed +to its position or clipping) is defined by an ``image specifier'' object +contained within the glyph. The separation between an image specifier +object and a glyph object is made because the glyph includes other +properties than just the actual image: e.g. the face it is displayed in, +the alignment of the image, @emph{etc}. Also, an image specifier is +used in at least one place in XEmacs in lieu of a glyph, namely the +backing pixmap of a face. + + An image specifier is used because glyphs often have locale-specific +semantics. The most important example is semantics determined by the +display device: you can't usefully display a JPEG on stdout, or a color +image on a monochrome display. But because the image property is a +specifier in XEmacs, you can specify that a given glyph appear as a +monochrome image on monochrome displays, a color image on color +displays, and as a string on TTYs. (Specifying a string for the +@code{tty} device locale would give behavior like the @code{ALT} +attribute of an @code{IMG} element in HTML.) Another is semantics +determined by the buffer or mode. (Unfortunately, currently there are +no compelling examples of this for glyphs.) + + All this means that only one global glyph needs to exist for a +particular purpose (e.g. the icon used to represent an iconified frame, +the mouse pointer used over particular areas of a frame, etc.). Often +you need not (and should not!) create your own glyph, but rather modify +an existing one. + + In working with glyphs it is important to keep in mind the distinction +between a locale and a domain. A @dfn{locale} is specified by the +programmer, and is an abstract link between a specification (for a +glyph, its visual appearance) and a displayable object. The displayable +object may be a buffer or a window, or an object containing buffers or +windows such as frame, device, or console. A @dfn{domain} is an actual +display context, which must be concrete enough to enable XEmacs to +identify the device type. (Buffers may be displayed in windows on +different devices, even simultaneously, so a buffer cannot be a domain. +Similarly, the global locale cannot be a domain.) @ref{Specifiers}, for +more information about specifier locales and domains. + + +@node Images +@section Images @menu -* Creating Glyphs:: Creating new glyphs. -* Glyph Properties:: Accessing and modifying a glyph's properties. -* Glyph Convenience Functions:: - Convenience functions for accessing particular - properties of a glyph. -* Glyph Dimensions:: Determining the height, width, etc. of a glyph. +* Image Specifiers:: Specifying an image's appearance. +* Image Instantiator Conversion:: Lazy realization of graphics. +* Image Instantiator Formats:: A catalog of image descriptors. +* Image Instances:: Classes of graphical objects. @end menu -@node Creating Glyphs -@subsection Creating Glyphs -@defun make-glyph &optional spec-list type -This function creates a new glyph object of type @var{type}. +@node Image Specifiers +@subsection Image Specifiers +@cindex image specifiers -@var{spec-list} is used to initialize the glyph's image. It is -typically an image instantiator (a string or a vector; @ref{Image -Specifiers}), but can also be a list of such instantiators (each one in -turn is tried until an image is successfully produced), a cons of a -locale (frame, buffer, etc.) and an instantiator, a list of such conses, -or any other form accepted by @code{canonicalize-spec-list}. -@xref{Specifiers}, for more information about specifiers. - -@var{type} specifies the type of the glyph, which specifies in which -contexts the glyph can be used, and controls the allowable image types -into which the glyph's image can be instantiated. @var{type} should be -one of @code{buffer} (used for glyphs in an extent, the modeline, the -toolbar, or elsewhere in a buffer), @code{pointer} (used for the -mouse-pointer), or @code{icon} (used for a frame's icon), and defaults -to @code{buffer}. @xref{Glyph Types}. - -A glyph in XEmacs does @strong{NOT} refer to a single unit of textual -display (the XEmacs term for this is @dfn{rune}), but rather is an -object encapsulating a graphical element, such as an image or widget (an -element such as a button or text field; @dfn{widget} is the term for -this under X Windows, and it's called a @dfn{control} under MS Windows). -This graphical element could appear in a buffer, a margin, a gutter, or -a toolbar, or as a mouse pointer or an icon, for example. + An image specifier is a description of the actual graphical +realization of a glyph. For example, a typical image description is +@emph{the file system path to a PNG file}. Since redisplay doesn't know +about files, and in any case the image may need to be manipulated +(@emph{e.g.}, a face's background pixmap must be clipped and tiled), the +PNG file must be converted internally to a window system bitmap or +pixmap object. We describe this process by writing that when XEmacs +displays the image, it @dfn{instantiates} the @dfn{image instantiator} +into an @dfn{image instance}. Image instances are an internal object +type (similar to font instances and color instances), describing how the +image appears in a particular domain. On the other hand, image +instantiators, which are just descriptions of how the image should +appear, are represented using Lisp strings or vectors. + +Furthermore the graphical realization will vary, and for some devices +may not even be a bitmapped graphic. These variations may be controlled +by the program by specifying different @dfn{image instantiators} in +different locales. This is implemented with an @dfn{image specifier}, +a specifier whose specifications are image instantiators. + +Image specifiers are rarely if ever found by themselves. However, an +image specifier results from calling @code{glyph-image} on a glyph, or +retrieving the @code{background-pixmap} property of a face, and you can +check if some random object is an image specifier. -Creating a glyph using @code{make-glyph} does not specify @emph{where} -the glyph will be used, but it does specify @emph{what} the glyph will -look like. In particular, @var{spec-list} is used to specify this, and it's -used to initialize the glyph's @code{image} property, which is an image -specifier. (Note that @dfn{image} as used in the context of a glyph's -@code{image} property or in the terms @dfn{image specifier}, @dfn{image -instantiator}, or @dfn{image instance} does not refer to what people -normally think of as an image (which in XEmacs is called a -@dfn{pixmap}), but to any graphical element---a pixmap, a widget, or -even a block of text, when used in the places that call for a glyph.) -The format of the @var{spec-list} is typically an image instantiator (a string -or a vector; @ref{Image Specifiers}), but can also be a list of such -instantiators (each one in turn is tried until an image is successfully -produced), a cons of a locale (frame, buffer, etc.) and an -instantiator, a list of such conses, or any other form accepted by -@code{canonicalize-spec-list}. @xref{Specifiers}, for more information -about specifiers. - -If you're not familiar with specifiers, you should be in order to -understand how glyphs work. The clearest introduction to specifiers -is in the Lispref manual, available under Info. (Choose -Help->Info->Info Contents on the menubar or type C-h i.) You can -also see @code{make-specifier} for a capsule summary. What's important to -keep in mind is that a specifier lets you set a different value for -any particular buffer, window, frame, device, or console. This allows -for a great deal of flexibility; in particular, only one global glyph -needs to exist for a particular purpose (e.g. the icon used to represent -an iconified frame, the mouse pointer used over particular areas of a -frame, etc.), and in these cases you do not create your own glyph, but -rather modify the existing one. +@defun image-specifier-p object +This function returns non-@code{nil} if @var{object} is an image specifier. +@end defun -As well as using @var{spec-list} to initialize the glyph, you can set -specifications using @code{set-glyph-image}. Note that, due to a -possibly questionable historical design decision, a glyph itself is not -actually a specifier, but rather is an object containing an image -specifier (as well as other, seldom-used properties). Therefore, you -cannot set or access specifications for the glyph's image by directly -using @code{set-specifier}, @code{specifier-instance} or the like on the -glyph; instead use them on @code{(glyph-image @var{glyph})} or use the -convenience functions @code{set-glyph-image}, -@code{glyph-image-instance}, and @code{glyph-image}. +@defun make-image-specifier spec-list +This function creates a new image specifier object and initializes it +according to @var{spec-list}. @xref{Specifiers}. +@end defun -Once you have created a glyph, you specify where it will be used as -follows: +This function exists mainly for completeness. In practice, you rarely, +if ever, need to actually create an image specifier. Instead, they are +implicitly created by the initialization of glyphs and faces, and the +specifier member of these objects cannot be changed after +initialization; you may only set the specifications it contains. -@itemize @bullet -@item -To insert a glyph into a buffer, create an extent in the buffer and then -use @code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set -a glyph to be displayed at the corresponding edge of the extent. (It is -common to create zero-width extents for this purpose.) +Image instantiators come in many formats: @code{xbm}, @code{xpm}, +@code{gif}, @code{jpeg}, etc. These denote the format of the data +describing the image. The resulting image instances also come in many +types---@code{mono-pixmap}, @code{color-pixmap}, @code{text}, +@code{pointer}, etc. This refers to the behavior of the image and the +sorts of places it can appear. (For example, a color-pixmap image has +fixed colors specified for it, while a mono-pixmap image comes in two +unspecified shades ``foreground'' and ``background'' that are determined +from the face of the glyph or surrounding text; a text image appears as +a string of text and has an unspecified foreground, background, and +font; a pointer image behaves like a mono-pixmap image but can only be +used as a mouse pointer [mono-pixmap images cannot be used as mouse +pointers]; etc.) -@item -To insert a glyph into the left or right margin of a buffer, first -make sure the margin is visible by setting a value for the specifiers -@code{left-margin-width} or @code{right-margin-width}. (Not strictly necessary -when using margin glyphs with layout policy @code{whitespace}.) Then follow -the same procedure above for inserting a glyph in a buffer, and then -set a non-default layout policy for the glyph using -@code{set-extent-begin-glyph-layout} or @code{set-extent-end-glyph-layout}. -Alternatively, use the high-level annotations API (see -@code{make-annotation}). (In point of fact, you can also use the annotations -API for glyphs in a buffer, by setting a layout policy of @code{text}.) +It is important to keep the distinction between image instantiator +format and image instance type in mind. Typically, a given image +instantiator format can result in many different image instance types. +For example, @code{xpm} can be instanced as @code{color-pixmap}, +@code{mono-pixmap}, or @code{pointer}; whereas @code{cursor-font} can be +instanced only as @code{pointer}. On the other hand, a particular image +instance type can be generated by many different image instantiator +formats (e.g. @code{color-pixmap} can be generated by @code{xpm}, +@code{gif}, @code{jpeg}, etc.). -@item -To insert a glyph into the modeline, just put the glyph directly as one -of the modeline elements. (Unfortunately you can't currently put a begin -glyph or end glyph on one of the modeline extents---they're ignored.) + @xref{Image Instances}, for a more detailed discussion of image +instance types. -@item -To insert a glyph into a toolbar, specify it as part of a toolbar -instantiator (typically set on the specifier @code{default-toolbar}). -See @code{default-toolbar} for more information. (Note that it is -standard practice to use a symbol in place of the glyph list in the -toolbar instantiator; the symbol is evalled to get the glyph list. This -facilitates both creating the toolbar instantiator and modifying -individual glyphs in a toolbar later on. For example, you can change -the way that the Mail toolbar button looks by modifying the value of the -variable @code{toolbar-mail-icon} (in general, @code{toolbar-*-icon}) -and then calling @code{(set-specifier-dirty-flag default-toolbar)}. -(#### Unfortunately this doesn't quite work the way it should; the -change will appear in new frames, but not existing ones. + An image instantiator should be a string or a vector of the form -@item -To insert a glyph into a gutter, create or modify a gutter instantiator -(typically set on the specifier @code{default-gutter}). Gutter -instantiators consist of strings or lists of strings, so to insert a -glyph, create an extent over the string, and use -@code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set a -glyph to be displayed at the corresponding edge of the extent, just like -for glyphs in a buffer. +@example + @code{[@var{format} @var{:keyword} @var{value} ...]} +@end example -@item -To use a glyph as the icon for a frame, you do not actually create a new -glyph; rather, you change the specifications for the existing glyph -@code{frame-icon-glyph}. (Remember that, because of the specifier nature -of glyphs, you can set different values for any particular buffer or -frame.) +i.e. a format symbol followed by zero or more alternating keyword-value +pairs. -@item -To use a glyph as the mouse pointer, in general you do not create a new -glyph, but rather you change the specifications of various existing -glyphs, such as @code{text-pointer-glyph} for the pointer used over -text, @code{modeline-pointer-glyph} for the pointer used over the -modeline, etc. Do an apropos over @code{*-pointer-glyph} to find all of -them. (Note also that you can temporarily set the mouse pointer to some -specific shape by using @code{set-frame-pointer}, which takes an image -instance, as obtained from calling @code{glyph-image-instance} on a glyph -of type @code{pointer} -- either one of the above-mentioned variables or -one you created yourself. (See below for what it means to create a -glyph of type @code{pointer}.) This pointer will last only until the -next mouse motion event is processed or certain other things happen, -such as creating or deleting a window. (In fact, the above-mentioned -pointer glyph variables are implemented as part of the default handler -for mouse motion events. If you want to customize this behavior, take a -look at @code{mode-motion-hook}, or @code{mouse-motion-handler} if you -really want to get low-level.) +The form of an instantiator can be checked with +@code{valid-instantiator-p} with a @var{TYPE} of @code{image}, +@ref{Specifier Validation Functions}. -@item -To use a glyph to control the shape of miscellaneous redisplay effects -such as the truncation and continuation markers, set the appropriate -existing glyph variables, as for icons and pointers above. See -@code{continuation-glyph}, @code{control-arrow-glyph}, -@code{hscroll-glyph}, @code{invisible-text-glyph}, -@code{octal-escape-glyph}, and @code{truncation-glyph}. See also -@code{overlay-arrow-string}, an odd redisplay leftover which can be set -to a glyph you created, and will cause the glyph to be displayed on top -of the text position specified in the marker stored in -@code{overlay-arrow-position}. +For a complete list of the format symbols and their usage, +@ref{Image Instantiator Formats}. -@item -To use a glyph in a display table (i.e. to control the appearance of any -individual character), create the appropriate character glyphs and then -set a specification for the specifier @code{current-display-table}, -which controls the appearance of characters. You can also set an -overriding display table for use with text displayed in a particular -face; see @code{set-face-display-table} and @code{make-display-table}. -#### Note: Display tables do not currently support general Mule -characters. They will be overhauled at some point to support this -and to provide other features required under Mule. +If the instantiator is a string, it will be converted into a vector by +looking it up according to the specs in the +@code{console-type-image-conversion-list} for the console type of the +domain (usually a window; sometimes a frame or device) over which the +image is being instantiated. -@item -To use a glyph as the background pixmap of a face: Note that the -background pixmap of a face is actually an image specifier -- probably -the only place in XEmacs where an image specifier occurs outside of a -glyph. Similarly to how the glyph's image specifier works, you don't -create your own image specifier, but rather add specifications to the -existing one (using @code{set-face-background-pixmap}). Note that the -image instance that is generated in order to actually display the -background pixmap is of type @code{mono-pixmap}, meaning that it's a -two-color image and the foreground and background of the image get -filled in with the corresponding colors from the face. -@end itemize +If the instantiator specifies data from a file, the data will be read in +at the time that the instantiator is added to the image specifier (which +may be well before the image is actually displayed), and the +instantiator will be converted into one of the inline-data forms, with +the filename retained using a @code{:file} keyword. This implies that +the file must exist when the instantiator is added to the image, but +does not need to exist at any other time (e.g. it may safely be a +temporary file). -It is extremely rare that you will ever have to specify a value for -@var{type}, which should be one of @code{buffer} (used for glyphs in an -extent, the modeline, the toolbar, or elsewhere in a buffer), -@code{pointer} (used for the mouse-pointer), or @code{icon} (used for a -frame's icon), and defaults to @code{buffer}. The only cases where it -needs to be specified is when creating icon or pointer glyphs, and in -both cases the necessary glyphs have already been created at startup and -are accessed through the appropriate variables, -e.g. @code{text-pointer-glyph} (or in general, @code{*-pointer-glyph}) -and @code{frame-icon-glyph}. @xref{Glyph Types}. -@end defun +The available keywords are given below. Note that some keywords are +generally available (for example, the @code{:data} keyword may be used +with any format except @code{nothing}), while others are only available +for one format (@code{resource-id} is unique to the +@code{mswindows-resource} format). -@defun make-glyph-internal &optional type -This function creates a new, uninitialized glyph of type @var{type}. -@end defun +@table @code +@item :data +Inline image data. If available for a given format, it may be specified +directly by the program, or it may be a cache of file data previously +read. When present, it is used to instantiate the image in preference +to the file named by the @code{:file} property. -@defun make-pointer-glyph &optional spec-list +The format of inline data is image-format-specific. For example, in +pixmap formats, the value should be a string, which is interpreted as an +octet-stream representing a bitmap or pixmap. But for text formats, +it's string containing the text to be displayed, and for resource +formats, it's a string containing the name of the resource. -Return a new @code{pointer-glyph} object with the specification list -@var{spec-list}. This function is equivalent to calling -@code{make-glyph} with a @var{type} of @code{pointer}. +@item :file +Data contained in a file. The value is the name of this file. If both +@code{:data} and @code{:file} are specified, the image is created from +what is specified in @code{:data} and the string in @code{:file} becomes +the value of the @code{image-instance-file-name} function when applied +to the resulting image-instance. Note that there is nothing to stop a +program from changing either the @code{:file} or the @code{:data} +property, and there is no way to detect such mischief. This means that +the data will @emph{not} be automatically reread if you change the +@code{file} property; you must force it by removing the @code{:data} +property. +@c #### If there are ways to do this in-place, describe them. +(One way to do this is replacing the whole specification with a new +vector.) This keyword is not valid for instantiator formats +@code{nothing}, @code{string}, @code{formatted-string}, +@code{cursor-font}, @code{font}, and @code{autodetect}. -It is extremely unlikely that you will ever need to create a pointer -glyph. Instead, you probably want to be calling @code{set-glyph-image} -on an existing glyph, e.g. @code{text-pointer-glyph}. -@end defun +@item :mask-data +Inline data for @code{xbm} and @code{xface}. This specifies a mask to +be used with the bitmap. Pixels which are not set in the mask will not +be written to the imaging device. The format is a list of width, +height, and bits, as for @code{:data}. -@defun make-icon-glyph &optional spec-list +@item :mask-file +For @code{xbm} and @code{xface}. This specifies a file containing the +mask data. If neither a mask file nor inline mask data is given for an +XBM image, and the XBM image comes from a file, XEmacs will look for a +mask file with the same name as the image file but with @samp{Mask} or +@samp{msk} appended. For example, if you specify the XBM file +@file{left_ptr} [usually located in @file{/usr/include/X11/bitmaps}], +the associated mask file @file{left_ptrmsk} will automatically be picked +up. -Return a new @code{pointer-glyph} object with the specification list -@var{spec-list}. This function is equivalent to calling -@code{make-glyph} with a @var{type} of @code{icon}. +@item :resource-id +Only for @code{mswindows-resource}. This must be either an integer +(which directly specifies a resource number) or a string. See the +description of @code{mswindows-resource} for valid strings. @xref{Image +Instantiator Formats}. -It is extremely unlikely that you will ever need to create a pointer -glyph. Instead, you probably want to be calling @code{set-glyph-image} -on an existing glyph, e.g. @code{text-pointer-glyph}. -@end defun +@item :foreground +@itemx :background +For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}. +These keywords allow you to explicitly specify foreground and background +colors. The value should be anything acceptable to +@code{make-color-instance}. This will cause an external format that +would by default be instantiated as a @code{mono-pixmap} to instead be +instantiated as a two-color color-pixmap. This can be used to override +the colors specified by a glyph's face, for example. If the image is +instantiated as a pointer, they specify its foreground and/or +background, instead of the defaults of black and white. -@node Glyph Properties -@subsection Glyph Properties +@item :hotspot-x +@itemx :hotspot-y +For @code{xbm} and @code{xface}. These keywords specify a hotspot if +the image is instantiated as a @code{pointer}. Note that if the XBM +image file specifies a hotspot, it will automatically be picked up if no +explicit hotspot is given. -Each glyph has a list of properties, which control all of the aspects of -the glyph's appearance. The following symbols have predefined meanings: +@item :color-symbols +Only for @code{xpm}. This specifies an alist that maps strings that +specify symbolic color names to the actual color to be used for that +symbolic color (in the form of a string or a color-specifier object). +If this is not specified, the contents of @code{xpm-color-symbols} are +used to generate the alist. -@table @code -@item image -The image used to display the glyph. +@item :resource-type +Only for @code{mswindows-resource}. This must be a symbol, either +@code{cursor}, @code{icon}, or @code{bitmap}, specifying the type of +resource to be retrieved. -@item baseline -Percent above baseline that glyph is to be displayed. Only for glyphs -displayed inside of a buffer. +@item :face +For @code{inherit} and the widget formats. This specifies the face to +inherit from. For widgets this specifies the face to use for display. +It defaults to gui-element-face. + +@item :selected +@itemx :active +@itemx :suffix +@itemx :keys +@itemx :style +@itemx :filter +@itemx :config +@itemx :included +@itemx :key-sequence +@itemx :accelerator +@itemx :label +@itemx :callback +These keywords, accepted as menu item specs, are also accepted by images +instantiated as @code{widget}. For their semantics, @ref{Menu Format}. +@end table -@item contrib-p -Whether the glyph contributes to the height of the line it's on. -Only for glyphs displayed inside of a buffer. -@item face -Face of this glyph (@emph{not} a specifier). -@end table +@node Image Instantiator Conversion +@subsection Image Instantiator Conversion +@cindex image instantiator conversion +@cindex conversion of image instantiators -@defun set-glyph-property glyph property value &optional locale tag-set how-to-add -This function changes a property of a @var{glyph}. +Conversion is applied to image instantiators at the time they are added +to an image specifier or at the time they are passed to +@code{make-image-instance}. -For built-in properties, the actual value of the property is a specifier -and you cannot change this; but you can change the specifications within -the specifier, and that is what this function will do. For user-defined -properties, you can use this function to either change the actual value -of the property or, if this value is a specifier, change the -specifications within it. +@defun set-console-type-image-conversion-list console-type list +This function sets the image-conversion-list for consoles of the given +@var{console-type}. The image-conversion-list specifies how image +instantiators that are strings should be interpreted. Each element of +the list should be a list of two elements (a regular expression string +and a vector) or a list of three elements (the preceding two plus an +integer index into the vector). The string is converted to the vector +associated with the first matching regular expression. If a vector +index is specified, the string itself is substituted into that position +in the vector. -If @var{property} is a built-in property, the specifications to be added -to this property can be supplied in many different ways: +Note: The conversion above is applied when the image instantiator is +added to an image specifier, not when the specifier is actually +instantiated. Therefore, changing the image-conversion-list only affects +newly-added instantiators. Existing instantiators in glyphs and image +specifiers will not be affected. +@end defun -@itemize @bullet -@item -If @var{value} is a simple instantiator (e.g. a string naming a pixmap -filename) or a list of instantiators, then the instantiator(s) will be -added as a specification of the property for the given @var{locale} -(which defaults to @code{global} if omitted). +@defun console-type-image-conversion-list console-type +This function returns the image-conversion-list for consoles of the given +@var{console-type}. +@end defun -@item -If @var{value} is a list of specifications (each of which is a cons of a -locale and a list of instantiators), then @var{locale} must be -@code{nil} (it does not make sense to explicitly specify a locale in -this case), and specifications will be added as given. -@item -If @var{value} is a specifier (as would be returned by -@code{glyph-property} if no @var{locale} argument is given), then some -or all of the specifications in the specifier will be added to the -property. In this case, the function is really equivalent to -@code{copy-specifier} and @var{locale} has the same semantics (if it is -a particular locale, the specification for the locale will be copied; if -a locale type, specifications for all locales of that type will be -copied; if @code{nil} or @code{all}, then all specifications will be -copied). -@end itemize +@node Image Instantiator Formats +@subsection Image Instantiator Formats +@cindex image instantiator formats -@var{how-to-add} should be either @code{nil} or one of the symbols -@code{prepend}, @code{append}, @code{remove-tag-set-prepend}, -@code{remove-tag-set-append}, @code{remove-locale}, -@code{remove-locale-type}, or @code{remove-all}. See -@code{copy-specifier} and @code{add-spec-to-specifier} for a description -of what each of these means. Most of the time, you do not need to worry -about this argument; the default behavior usually is fine. +The @dfn{format} field of an image instantiator should be a symbol +denoting a valid format. Which formats are valid will depend on the +features (such as image decoding libraries) available, on platform +support (MS Windows resource IDs make no sense on other platforms), and +on the locale. -In general, it is OK to pass an instance object (e.g. as returned by -@code{glyph-property-instance}) as an instantiator in place of an actual -instantiator. In such a case, the instantiator used to create that -instance object will be used (for example, if you set a font-instance -object as the value of the @code{font} property, then the font name used -to create that object will be used instead). If some cases, however, -doing this conversion does not make sense, and this will be noted in the -documentation for particular types of instance objects. +@defun valid-image-instantiator-format-p format &optional locale +This function returns non-@code{nil} if @var{format} is a valid image +instantiator format. -If @var{property} is not a built-in property, then this function will -simply set its value if @var{locale} is @code{nil}. However, if -@var{locale} is given, then this function will attempt to add -@var{value} as the instantiator for the given @var{locale}, using -@code{add-spec-to-specifier}. If the value of the property is not a -specifier, it will automatically be converted into a @code{generic} -specifier. +If @var{locale} is non-@code{nil} then the format is checked in that locale. +If @var{locale} is @code{nil} the current console is used. + +Note that the return value for many formats listed above depends on +whether XEmacs was compiled with support for that format. @end defun -@defun glyph-property glyph property &optional locale -This function returns @var{glyph}'s value of the given @var{property}. +@defun image-instantiator-format-list +This function returns a list of valid image-instantiator formats. +@end defun -If @var{locale} is omitted, the @var{glyph}'s actual value for -@var{property} will be returned. For built-in properties, this will be -a specifier object of a type appropriate to the property (e.g. a font or -color specifier). For other properties, this could be anything. +Here is a table of image-instantiator formats, giving the keywords that +are usable with each, and the kinds of instances that may result. -If @var{locale} is supplied, then instead of returning the actual value, -the specification(s) for the given locale or locale type will be -returned. This will only work if the actual value of @var{property} is -a specifier (this will always be the case for built-in properties, but -may or may not apply to user-defined properties). If the actual value -of @var{property} is not a specifier, this value will simply be returned -regardless of @var{locale}. +@table @code +@item nothing +Don't display anything; no keywords are valid for this format. Can only be +instanced as @code{nothing}. -The return value will be a list of instantiators (e.g. vectors -specifying pixmap data), or a list of specifications, each of which is a -cons of a locale and a list of instantiators. Specifically, if -@var{locale} is a particular locale (a buffer, window, frame, device, or -@code{global}), a list of instantiators for that locale will be -returned. Otherwise, if @var{locale} is a locale type (one of the -symbols @code{buffer}, @code{window}, @code{frame}, or @code{device}), -the specifications for all locales of that type will be returned. -Finally, if @var{locale} is @code{all}, the specifications for all -locales of all types will be returned. +@item string +Display this image as a text string. Can only be instanced +as @code{text}, although support for instancing as @code{mono-pixmap} +should be added. The valid keyword is @code{:data}. The value should +be a string, and it is interpreted as a string of characters. -The specifications in a specifier determine what the value of -@var{property} will be in a particular @dfn{domain} or set of -circumstances, which is typically a particular Emacs window along with -the buffer it contains and the frame and device it lies within. The -value is derived from the instantiator associated with the most specific -locale (in the order buffer, window, frame, device, and @code{global}) -that matches the domain in question. In other words, given a domain -(i.e. an Emacs window, usually), the specifier for @var{property} will -first be searched for a specification whose locale is the buffer -contained within that window; then for a specification whose locale is -the window itself; then for a specification whose locale is the frame -that the window is contained within; etc. The first instantiator that -is valid for the domain (usually this means that the instantiator is -recognized by the device [i.e. the X server or TTY device] that the -domain is on). The function @code{glyph-property-instance} actually does -all this, and is used to determine how to display the glyph. -@end defun +@item formatted-string +Display this image as a text string with replaceable fields, +similar to a modeline format string. The valid keyword is @code{:data}. +The value should be a string, and it is interpreted as a string of +characters containing format sequences. -@defun glyph-property-instance glyph property &optional domain default no-fallback -This function returns the instance of @var{glyph}'s @var{property} in the -specified @var{domain}. +Not currently implemented. -Under most circumstances, @var{domain} will be a particular window, and -the returned instance describes how the specified property actually is -displayed for that window and the particular buffer in it. Note that -this may not be the same as how the property appears when the buffer is -displayed in a different window or frame, or how the property appears in -the same window if you switch to another buffer in that window; and in -those cases, the returned instance would be different. +@item xbm +An X bitmap; available only if X support was compiled into this XEmacs. + +If used in a buffer glyph, icon glyph, or face background pixmap, it +will be instantiated as @code{mono-pixmap} unless the @code{:foreground} +or @code{:background} keywords are present. In the latter case it will +be instantiated as @code{color-pixmap} with the two specified colors. +@c #### Check this. +(Probably if @code{:foreground} or @code{:background} is omitted, it +defaults to black or white respectively.) If used in a pointer glyph, +it will be instantiated as an @code{pointer}. + +The valid keywords and their values are +@table @code +@item :data +A list containing the height and width of the bitmap as integers, and +a string interpreted as a bit vector according to the X11 standard XBM +bitmap format, in that order. +@item :file +The name of a file containing standard XBM-format data. If it contains +a hotspot specification, it will be parsed and used if the hotspot is +not explicitly specified. +@item :mask-data +A list containing the height and width of the bitmap as integers, and +a string interpreted as a bit vector according to the X11 standard XBM +bitmap format, in that order. This bitmap is interpreted as the +clipping region for the bitmap contained in the @code{:data} property. +@item :mask-file +The name of a file containing standard XBM-format data. Interpreted as +the clipping region for the bitmap contained in the @code{:data} property. +@item :foreground +@itemx :background +These keywords allow you to explicitly specify foreground and background +colors. The values should be acceptable to @code{make-color-instance}. +@item :hotspot-x +@itemx :hotspot-y +Integers denoting the hotspot (mouse pointer position), with (0,0) at +the top left corner. If given, these override any specification in the +XBM file. +@end table -The returned instance is an image-instance object, and you can query it -using the appropriate image instance functions. For example, you could use -@code{image-instance-depth} to find out the depth (number of color -planes) of a pixmap displayed in a particular window. The results might -be different from the results you would get for another window (perhaps -the user specified a different image for the frame that window is on; or -perhaps the same image was specified but the window is on a different X -server, and that X server has different color capabilities from this -one). +@item xpm +An XPM pixmap; only available if XPM support was compiled into this XEmacs. -@var{domain} defaults to the selected window if omitted. +Can be instanced as @code{color-pixmap}, @code{mono-pixmap}, or +@code{pointer}. -@var{domain} can be a frame or device, instead of a window. The value -returned for such a domain is used in special circumstances when a -more specific domain does not apply; for example, a frame value might be -used for coloring a toolbar, which is conceptually attached to a frame -rather than a particular window. The value is also useful in -determining what the value would be for a particular window within the -frame or device, if it is not overridden by a more specific -specification. +XPM is an add-on library for X that was designed to rectify the +shortcomings of the XBM format. Many icons and labels used in the +XEmacs GUI are still distributed in XPM format (although we are moving +to standardize on the PNG format). It is therefore highly desirable +that XPM be available in your XEmacs. -If @var{property} does not name a built-in property, its value will -simply be returned unless it is a specifier object, in which case it -will be instanced using @code{specifier-instance}. +Most implementations of X include the XPM library as a standard part. +If your vendor does not, it is highly recommended that you download it +and install it. You can get it from the XEmacs FTP site and mirrors, as +well as from most sites that distribute X11. -Optional arguments @var{default} and @var{no-fallback} are the same as -in @code{specifier-instance}. @xref{Specifiers}. -@end defun +The valid keywords and their values are +@table @code +@item :data +A string interpreted as the contents of a standard XPM file. +@item :file +The name of a file containing standard XPM-format data. If it contains +a hotspot specification, it will be parsed and used if the hotspot is +not explicitly specified. +@c #### Does XPM provide for a hotspot? +@item :hotspot-x +@itemx :hotspot-y +Integers denoting the hotspot (mouse pointer position), with (0,0) at +the top left corner. If given, these override any specification in the +XBM file. +@c #### Check this. +(This may not be true. The original documentation doesn't mention them +in connection with XPM, but a pointer needs a hotspot.) +@item :color-symbols +An alist that maps the one- or two-character strings that specify +symbolic color names in the XPM file to the actual color to be used for +that symbolic color (in the form of a string acceptable as a color +instantiator, @ref{Color Specifiers}, or a color-specifier object). +If this is not specified, the contents of @code{xpm-color-symbols} are +used to generate the alist. +@end table -@defun remove-glyph-property glyph property &optional locale tag-set exact-p -This function removes a property from a glyph. For built-in properties, -this is analogous to @code{remove-specifier}. @xref{Specifiers, -remove-specifier-p}, for the meaning of the @var{locale}, @var{tag-set}, -and @var{exact-p} arguments. -@end defun +@item xface +An X-Face bitmap, used to encode people's faces in e-mail messages; +only available if X-Face support was compiled into this XEmacs. -@node Glyph Convenience Functions -@subsection Glyph Convenience Functions +Will be instanced as @code{mono-pixmap}, @code{color-pixmap}, or +@code{pointer}, depending on the target instance type and the presence +of color keywords. - The following functions are provided for working with specific -properties of a glyph. Note that these are exactly like calling -the general functions described above and passing in the -appropriate value for @var{property}. +The valid keywords and their values are +@table @code +@item :data +A list containing the height and width of the bitmap as integers, and +a string interpreted as a bit vector according to the X11 standard XBM +bitmap format, in that order. +@item :file +The name of a file containing standard XBM-format data. If it contains +a hotspot specification, it will be parsed and used if the hotspot is +not explicitly specified. +@item :mask-data +A list containing the height and width of the bitmap as integers, and +a string interpreted as a bit vector according to the X11 standard XBM +bitmap format, in that order. This bitmap is interpreted as the +clipping region for the bitmap contained in the @code{:data} property. +@item :mask-file +The name of a file containing standard XBM-format data. Interpreted as +the clipping region for the bitmap contained in the @code{:data} property. +@item :foreground +@itemx :background +These keywords allow you to explicitly specify foreground and background +colors. The values should be acceptable to @code{make-color-instance}. +@item :hotspot-x +@itemx :hotspot-y +Integers denoting the hotspot (mouse pointer position), with (0,0) at +the top left corner. If given, these override any specification in the +XBM file. +@end table - Remember that if you want to determine the ``value'' of a -specific glyph property, you probably want to use the @code{*-instance} -functions. For example, to determine whether a glyph contributes -to its line height, use @code{glyph-contrib-p-instance}, not -@code{glyph-contrib-p}. (The latter will return a boolean specifier -or a list of specifications, and you probably aren't concerned with -these.) +@item gif +@itemx jpeg +@itemx png +@itemx tiff +These are GIF87- or GIF89-format, JPEG-format, PNG/GIF24-format, and +TIFF-format images, respectively. They are available only if +appropriate decoding support was built into XEmacs. XEmacs includes GIF +decoding functions as a standard part of it, so if you have X support, +you will normally have GIF support, unless you explicitly disable it at +configure time. If you have development support (both the libraries and +the relevant C header files) available when XEmacs is built, the JPEG, +PNG, and TIFF libraries will automatically be detected (in the ``usual +places'') and linked into the build. + +Note that PNG is the standard format for images distributed with XEmacs, +so it is highly recommended that PNG support be built in. + +All of these instantiators will be instanced as @code{color-pixmap}. + +The valid keywords and their values are +@table @code +@item :data +A string interpreted as the contents of a file containing data in the +appropriate standard format. +@item :file +The name of a file containing standard-format data. +@end table -@defun glyph-image glyph &optional locale -This function is equivalent to calling @code{glyph-property} with -a property of @code{image}. The return value will be an image -specifier if @var{locale} is @code{nil} or omitted; otherwise, -it will be a specification or list of specifications. -@end defun +@item cursor-font +Most window systems provide a set of standard cursors, which in X11 is +called a cursor font. Can only be instanced as @code{pointer}. This +should probably be fixed. + +The valid keyword is @code{:data}. Its value should be a string +containing one of the standard cursor-font names, such as @samp{watch} +or @samp{right_ptr} under X. More specifically, in the X Window System +it may be any of the standard cursor names from appendix B of the Xlib +manual, provided in the file @file{<X11/cursorfont.h>} by most +distributions, minus the @samp{XC_} prefix. For MS Windows, use +@code{mswindows-resource} instantiator format, not @code{cursor-font}. +Other window systems may have different lists. -@defun set-glyph-image glyph spec &optional locale tag-set how-to-add -This function is equivalent to calling @code{set-glyph-property} with -a property of @code{image}. -@end defun +@item font +A glyph from a font; i.e. the name of a font, and glyph index into it +of the form @samp{@var{font} fontname index [[mask-font] mask-index]}. +Only if X support was compiled into this XEmacs. Currently can only be +instanced as @code{pointer}. This should probably be fixed. +@c #### The above description is not very helpful, so it's not obvious +@c how to instantiate a font image. -@defun glyph-image-instance glyph &optional domain default no-fallback -This function returns the instance of @var{glyph}'s image in the given -@var{domain}, and is equivalent to calling -@code{glyph-property-instance} with a property of @code{image}. The -return value will be an image instance. +@item mswindows-resource +An MS Windows pointer resource. Specifies a resource to retrieve +directly from the system (an OEM resource) or from a file, particularly +an executable file. Can be instanced as @code{pointer} or +@code{color-pixmap}. -Normally @var{domain} will be a window or @code{nil} (meaning the -selected window), and an instance object describing how the image -appears in that particular window and buffer will be returned. -@end defun +The valid keywords and their values are -@defun glyph-contrib-p glyph &optional locale -This function is equivalent to calling @code{glyph-property} with -a property of @code{contrib-p}. The return value will be a boolean -specifier if @var{locale} is @code{nil} or omitted; otherwise, -it will be a specification or list of specifications. -@end defun +@table @code +@item :resource-type +A string naming the type (@code{cursor}, @code{bitmap}, or @code{icon}) +of the resource. Required. +@item :file +A string containing the name of the file containing the resource (often +an executable). If a system resource, @code{:file} should be omitted. +@item :resource-id +A string containing the name of a resource. Required if @code{:file} +is not specified. -@defun set-glyph-contrib-p glyph spec &optional locale tag-set how-to-add -This function is equivalent to calling @code{set-glyph-property} with -a property of @code{contrib-p}. -@end defun +This must be either an integer (which directly specifies a resource +number) or a string. Valid strings are -@defun glyph-contrib-p-instance glyph &optional domain default no-fallback -This function returns whether the glyph contributes to its line height -in the given @var{domain}, and is equivalent to calling -@code{glyph-property-instance} with a property of @code{contrib-p}. The -return value will be either @code{nil} or @code{t}. (Normally @var{domain} -will be a window or @code{nil}, meaning the selected window.) -@end defun +For bitmaps: -@defun glyph-baseline glyph &optional locale -This function is equivalent to calling @code{glyph-property} with a -property of @code{baseline}. The return value will be a specifier if -@var{locale} is @code{nil} or omitted; otherwise, it will be a -specification or list of specifications. -@end defun +"close", "uparrow", "dnarrow", "rgarrow", "lfarrow", +"reduce", "zoom", "restore", "reduced", "zoomd", +"restored", "uparrowd", "dnarrowd", "rgarrowd", "lfarrowd", +"mnarrow", "combo", "uparrowi", "dnarrowi", "rgarrowi", +"lfarrowi", "size", "btsize", "check", "checkboxes", and +"btncorners". -@defun set-glyph-baseline glyph spec &optional locale tag-set how-to-add -This function is equivalent to calling @code{set-glyph-property} with -a property of @code{baseline}. -@end defun +For cursors: -@defun glyph-baseline-instance glyph &optional domain default no-fallback -This function returns the instance of @var{glyph}'s baseline value in -the given @var{domain}, and is equivalent to calling -@code{glyph-property-instance} with a property of @code{baseline}. The -return value will be an integer or @code{nil}. +"normal", "ibeam", "wait", "cross", "up", "sizenwse", +"sizenesw", "sizewe", "sizens", "sizeall", and "no". -Normally @var{domain} will be a window or @code{nil} (meaning the -selected window), and an instance object describing the baseline value -appears in that particular window and buffer will be returned. -@end defun +For icons: -@defun glyph-face glyph -This function returns the face of @var{glyph}. (Remember, this is -not a specifier, but a simple property.) -@end defun +"sample", "hand", "ques", "bang", "note", and "winlogo". +@end table -@defun set-glyph-face glyph face -This function changes the face of @var{glyph} to @var{face}. -@end defun +@item subwindow +An embedded windowing system window. Can only be instanced as +@code{subwindow}. Not implemented. +@c #### Check status of subwindows ... I thought Andy implemented them. -@node Glyph Dimensions -@subsection Glyph Dimensions - -@defun glyph-width glyph &optional window -This function returns the width of @var{glyph} on @var{window}. This -may not be exact as it does not take into account all of the context -that redisplay will. -@end defun - -@defun glyph-ascent glyph &optional window -This function returns the ascent value of @var{glyph} on @var{window}. -This may not be exact as it does not take into account all of the -context that redisplay will. -@end defun - -@defun glyph-descent glyph &optional window -This function returns the descent value of @var{glyph} on @var{window}. -This may not be exact as it does not take into account all of the -context that redisplay will. -@end defun - -@defun glyph-height glyph &optional window -This function returns the height of @var{glyph} on @var{window}. (This -is equivalent to the sum of the ascent and descent values.) This may -not be exact as it does not take into account all of the context that -redisplay will. -@end defun - -@node Images -@section Images - -@menu -* Image Specifiers:: Specifying how an image will appear. -* Image Instantiator Conversion:: - Conversion is applied to image instantiators - at the time they are added to an - image specifier or at the time they - are passed to @code{make-image-instance}. -* Image Instances:: What an image specifier gets instanced as. -@end menu - -@node Image Specifiers -@subsection Image Specifiers -@cindex image specifiers - - An image specifier is used to describe the actual image of a glyph. -It works like other specifiers (@pxref{Specifiers}), in that it contains -a number of specifications describing how the image should appear in a -variety of circumstances. These specifications are called @dfn{image -instantiators}. When XEmacs wants to display the image, it instantiates -the image into an @dfn{image instance}. Image instances are their own -primitive object type (similar to font instances and color instances), -describing how the image appears in a particular domain. (On the other -hand, image instantiators, which are just descriptions of how the image -should appear, are represented using strings or vectors.) - -@defun image-specifier-p object -This function returns non-@code{nil} if @var{object} is an image specifier. -Usually, an image specifier results from calling @code{glyph-image} on -a glyph. -@end defun - -@defun make-image-specifier spec-list -This function creates a new image specifier object and initializes it -according to @var{spec-list}. @xref{Specifiers}. - -Note that, in practice, you rarely, if ever, need to actually create an -image specifier! (This function exists mainly for completeness.) Pretty -much the only use for image specifiers is to control how glyphs are -displayed, and the image specifier associated with a glyph (the -@code{image} property of a glyph) is created automatically when a glyph -is created and need not (and cannot, for that matter) ever be changed -(@pxref{Glyphs}). In fact, the design decision to create a separate -image specifier type, rather than make glyphs themselves be specifiers, -is debatable---the other properties of glyphs are rarely used and could -conceivably have been incorporated into the glyph's instantiator. The -rarely used glyph types (buffer, pointer, icon) could also have been -incorporated into the instantiator. -@end defun - - Image instantiators come in many formats: @code{xbm}, @code{xpm}, -@code{gif}, @code{jpeg}, etc. This describes the format of the data -describing the image. The resulting image instances also come in many -types---@code{mono-pixmap}, @code{color-pixmap}, @code{text}, -@code{pointer}, etc. This refers to the behavior of the image and the -sorts of places it can appear. (For example, a color-pixmap image has -fixed colors specified for it, while a mono-pixmap image comes in two -unspecified shades ``foreground'' and ``background'' that are determined -from the face of the glyph or surrounding text; a text image appears as -a string of text and has an unspecified foreground, background, and -font; a pointer image behaves like a mono-pixmap image but can only be -used as a mouse pointer [mono-pixmap images cannot be used as mouse -pointers]; etc.) It is important to keep the distinction between image -instantiator format and image instance type in mind. Typically, a given -image instantiator format can result in many different image instance -types (for example, @code{xpm} can be instanced as @code{color-pixmap}, -@code{mono-pixmap}, or @code{pointer}; whereas @code{cursor-font} can be -instanced only as @code{pointer}), and a particular image instance type -can be generated by many different image instantiator formats (e.g. -@code{color-pixmap} can be generated by @code{xpm}, @code{gif}, -@code{jpeg}, etc.). - - @xref{Image Instances}, for a more detailed discussion of image -instance types. - - An image instantiator should be a string or a vector of the form - -@example - @code{[@var{format} @var{:keyword} @var{value} ...]} -@end example - -i.e. a format symbol followed by zero or more alternating keyword-value -pairs. The @dfn{format} field should be a symbol, one of - -@table @code -@item nothing -Don't display anything; no keywords are valid for this. Can only be -instanced as @code{nothing}. -@item string -Display this image as a text string. Can only be instanced -as @code{text}, although support for instancing as @code{mono-pixmap} -should be added. -@item formatted-string -Display this image as a text string with replaceable fields, -similar to a modeline format string; not currently implemented. -@item xbm -An X bitmap; only if X support was compiled into this XEmacs. Can be -instanced as @code{mono-pixmap}, @code{color-pixmap}, or -@code{pointer}. -@item xpm -An XPM pixmap; only if XPM support was compiled into this XEmacs. Can -be instanced as @code{color-pixmap}, @code{mono-pixmap}, or -@code{pointer}. XPM is an add-on library for X that was designed to -rectify the shortcomings of the XBM format. Most implementations of X -include the XPM library as a standard part. If your vendor does not, it -is highly recommended that you download it and install it. You can get -it from the standard XEmacs FTP site, among other places. -@item xface -An X-Face bitmap, used to encode people's faces in e-mail messages; -only if X-Face support was compiled into this XEmacs. Can be instanced -as @code{mono-pixmap}, @code{color-pixmap}, or @code{pointer}. -@item gif -A GIF87 or GIF89 image; only if GIF support was compiled into this -XEmacs. Can be instanced as @code{color-pixmap}. Note that XEmacs -includes GIF decoding functions as a standard part of it, so if you have -X support, you will normally have GIF support, unless you explicitly -disable it at configure time. -@item jpeg -A JPEG-format image; only if JPEG support was compiled into this -XEmacs. Can be instanced as @code{color-pixmap}. If you have the JPEG -libraries present on your system when XEmacs is built, XEmacs will -automatically detect this and use them, unless you explicitly disable it -at configure time. -@item png -A PNG/GIF24 image; only if PNG support was compiled into this XEmacs. -Can be instanced as @code{color-pixmap}. -@item tiff -A TIFF-format image; only if TIFF support was compiled into this XEmacs. -@item cursor-font -One of the standard cursor-font names, such as @samp{watch} or -@samp{right_ptr} under X. Under X, this is, more specifically, any of -the standard cursor names from appendix B of the Xlib manual [also known -as the file @file{<X11/cursorfont.h>}] minus the @samp{XC_} prefix. On -other window systems, the valid names will be specific to the type of -window system. Can only be instanced as @code{pointer}. -@item font -A glyph from a font; i.e. the name of a font, and glyph index into it -of the form @samp{@var{font} fontname index [[mask-font] mask-index]}. -Only if X support was compiled into this XEmacs. Currently can only be -instanced as @code{pointer}, although this should probably be fixed. -@item mswindows-resource -An MS Windows pointer resource. Specifies a resource to retrieve -directly from the system (an OEM resource) or from a file, particularly -an executable file. If the resource is to be retrieved from a file, use -:file and optionally :resource-id. Otherwise use :resource-id. Always -specify :resource-type to specify the type (cursor, bitmap or icon) of -the resource. Possible values for :resource-id are listed below. Can -be instanced as @code{pointer} or @code{color-pixmap}. -@item subwindow -An embedded windowing system window. Can only be instanced as -@code{subwindow}. @item button A button widget; either a push button, radio button or toggle button. Can only be instanced as @code{widget}. + @item combo-box A drop list of selectable items in a widget, for editing text. Can only be instanced as @code{widget}. + @item edit-field A text editing widget. Can only be instanced as @code{widget}. + @item label A static, text-only, widget; for displaying text. Can only be instanced as @code{widget}. + @item layout A widget for controlling the positioning of children underneath it. Through the use of nested layouts, a widget hierarchy can be created @@ -742,20 +628,25 @@ which can have the appearance of any standard dialog box or similar arrangement; all of this is counted as one @dfn{glyph} and could appear in many of the places that expect a single glyph. Can only be instanced as @code{widget}. + @item native-layout -@c #### Document me better! The native version of a layout widget. Can only be instanced as @code{widget}. + @item progress-gauge A sliding widget, for showing progress. Can only be instanced as @code{widget}. + @item tab-control A tab widget; a series of user selectable tabs. Can only be instanced as @code{widget}. + @item tree-view A folding widget. Can only be instanced as @code{widget}. + @item scrollbar A scrollbar widget. Can only be instanced as @code{widget}. + @item autodetect XEmacs tries to guess what format the data is in. If X support exists, the data string will be checked to see if it names a filename. If so, @@ -766,135 +657,14 @@ is one of the allowable image-instance types and the string names a valid cursor-font name, the image will be created as a pointer. Otherwise, the image will be displayed as text. If no X support exists, the image will always be displayed as text. + @item inherit Inherit from the background-pixmap property of a face. Can only be instanced as @code{mono-pixmap}. @end table -The valid keywords are: - -@table @code -@item :data -Inline data. For most formats above, this should be a string. For -XBM images, this should be a list of three elements: width, height, and -a string of bit data. This keyword is not valid for instantiator -format @code{nothing}. - -@item :file -Data is contained in a file. The value is the name of this file. If -both @code{:data} and @code{:file} are specified, the image is created -from what is specified in @code{:data} and the string in @code{:file} -becomes the value of the @code{image-instance-file-name} function when -applied to the resulting image-instance. This keyword is not valid for -instantiator formats @code{nothing}, @code{string}, -@code{formatted-string}, @code{cursor-font}, @code{font}, and -@code{autodetect}. - -@item :foreground -@itemx :background -For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}. -These keywords allow you to explicitly specify foreground and background -colors. The argument should be anything acceptable to -@code{make-color-instance}. This will cause what would be a -@code{mono-pixmap} to instead be colorized as a two-color color-pixmap, -and specifies the foreground and/or background colors for a pointer -instead of black and white. - -@item :mask-data -For @code{xbm} and @code{xface}. This specifies a mask to be used with the -bitmap. The format is a list of width, height, and bits, like for -@code{:data}. - -@item :mask-file -For @code{xbm} and @code{xface}. This specifies a file containing the -mask data. If neither a mask file nor inline mask data is given for an -XBM image, and the XBM image comes from a file, XEmacs will look for a -mask file with the same name as the image file but with @samp{Mask} or -@samp{msk} appended. For example, if you specify the XBM file -@file{left_ptr} [usually located in @file{/usr/include/X11/bitmaps}], -the associated mask file @file{left_ptrmsk} will automatically be picked -up. - -@item :hotspot-x -@itemx :hotspot-y -For @code{xbm} and @code{xface}. These keywords specify a hotspot if -the image is instantiated as a @code{pointer}. Note that if the XBM -image file specifies a hotspot, it will automatically be picked up if no -explicit hotspot is given. - -@item :color-symbols -Only for @code{xpm}. This specifies an alist that maps strings that -specify symbolic color names to the actual color to be used for that -symbolic color (in the form of a string or a color-specifier object). -If this is not specified, the contents of @code{xpm-color-symbols} are -used to generate the alist. -@item :resource-id -Only for @code{mswindows-resource}. This must be either an integer -(which directly specifies a resource number) or a string. Valid strings -are - -For bitmaps: - -"close", "uparrow", "dnarrow", "rgarrow", "lfarrow", -"reduce", "zoom", "restore", "reduced", "zoomd", -"restored", "uparrowd", "dnarrowd", "rgarrowd", "lfarrowd", -"mnarrow", "combo", "uparrowi", "dnarrowi", "rgarrowi", -"lfarrowi", "size", "btsize", "check", "checkboxes", and -"btncorners". - -For cursors: - -"normal", "ibeam", "wait", "cross", "up", "sizenwse", -"sizenesw", "sizewe", "sizens", "sizeall", and "no". - -For icons: - -"sample", "hand", "ques", "bang", "note", and "winlogo". -@item :resource-type -Only for @code{mswindows-resource}. This must be a symbol, either -@code{cursor}, @code{icon}, or @code{bitmap}, specifying the type of -resource to be retrieved. -@item :face -Only for @code{inherit}. This specifies the face to inherit from. For -widgets this also specifies the face to use for display. It defaults to -gui-element-face. -@end table - -Keywords accepted as menu item specs are also accepted by widgets. -These are @code{:selected}, @code{:active}, @code{:suffix}, -@code{:keys}, @code{:style}, @code{:filter}, @code{:config}, -@code{:included}, @code{:key-sequence}, @code{:accelerator}, -@code{:label} and @code{:callback}. - -If instead of a vector, the instantiator is a string, it will be -converted into a vector by looking it up according to the specs in the -@code{console-type-image-conversion-list} for the console type of -the domain (usually a window; sometimes a frame or device) over which -the image is being instantiated. - -If the instantiator specifies data from a file, the data will be read in -at the time that the instantiator is added to the image specifier (which -may be well before the image is actually displayed), and the -instantiator will be converted into one of the inline-data forms, with -the filename retained using a @code{:file} keyword. This implies that -the file must exist when the instantiator is added to the image, but -does not need to exist at any other time (e.g. it may safely be a -temporary file). - -@defun valid-image-instantiator-format-p format &optional locale -This function returns non-@code{nil} if @var{format} is a valid image -instantiator format. - -If @var{locale} is non-@code{nil} then the format is checked in that locale. -If @var{locale} is @code{nil} the current console is used. - -Note that the return value for many formats listed above depends on -whether XEmacs was compiled with support for that format. -@end defun - -@defun image-instantiator-format-list -This function return a list of valid image-instantiator formats. -@end defun +There are two convenience variables for use with the XBM and XPM image +formats. @defvar xpm-color-symbols This variable holds definitions of logical color-names used when reading @@ -919,293 +689,1280 @@ the environment variable @samp{XBMLANGPATH} is set, it is consulted first). @end defvar -@node Image Instantiator Conversion -@subsection Image Instantiator Conversion -@cindex image instantiator conversion -@cindex conversion of image instantiators -@defun set-console-type-image-conversion-list console-type list -This function sets the image-conversion-list for consoles of the given -@var{console-type}. The image-conversion-list specifies how image -instantiators that are strings should be interpreted. Each element of -the list should be a list of two elements (a regular expression string -and a vector) or a list of three elements (the preceding two plus an -integer index into the vector). The string is converted to the vector -associated with the first matching regular expression. If a vector -index is specified, the string itself is substituted into that position -in the vector. +@node Image Instances +@subsection Image Instances +@cindex image instances -Note: The conversion above is applied when the image instantiator is -added to an image specifier, not when the specifier is actually -instantiated. Therefore, changing the image-conversion-list only affects -newly-added instantiators. Existing instantiators in glyphs and image -specifiers will not be affected. + Image-instance objects encapsulate the way a particular image (pixmap, +etc.) is displayed on a particular device. + + In most circumstances, you do not need to directly create image +instances; use a glyph instead. However, it may occasionally be useful +to explicitly create image instances, if you want more control over the +instantiation process. + +@defun image-instance-p object +This function returns non-@code{nil} if @var{object} is an image instance. @end defun -@defun console-type-image-conversion-list console-type -This function returns the image-conversion-list for consoles of the given -@var{console-type}. -@end defun +@menu +* Image Instance Types:: Each image instances has a particular type. +* Image Instance Functions:: Functions for working with image instances. +@end menu + + +@node Image Instance Types +@subsubsection Image Instance Types +@cindex image instance types + + Image instances come in a number of different types. The type +of an image instance specifies the nature of the image: Whether +it is a text string, a mono pixmap, a color pixmap, etc. + + The valid image instance types are + +@table @code +@item nothing +Nothing is displayed. + +@item text +Displayed as text. The foreground and background colors and the +font of the text are specified independent of the pixmap. Typically +these attributes will come from the face of the surrounding text, +unless a face is specified for the glyph in which the image appears. + +@item mono-pixmap +Displayed as a mono pixmap (a pixmap with only two colors where the +foreground and background can be specified independent of the pixmap; +typically the pixmap assumes the foreground and background colors of +the text around it, unless a face is specified for the glyph in which +the image appears). +@item color-pixmap + +Displayed as a color pixmap. + +@item pointer +Used as the mouse pointer for a window. + +@item subwindow +A child window that is treated as an image. This allows (e.g.) +another program to be responsible for drawing into the window. +Not currently implemented. +@c #### Check status of subwindows ... I thought Andy implemented them. + +@item widget +An active GUI element implemented as a ``widget'' or ``control'' of the +underlying window system. +@end table + +The following functions are used to check whether an image instance type +is valid in the running XEmacs. + +@defun valid-image-instance-type-p type +This function returns non-@code{nil} if @var{type} is a valid image +instance type. +@end defun + +@defun image-instance-type-list +This function returns a list of the valid image instance types. +@end defun + +The following functions are used to determine the type of an image +instance. + +@defun image-instance-type image-instance +Return the type of the given image instance. The return +value will be one of @code{nothing}, @code{text}, @code{mono-pixmap}, +@code{color-pixmap}, @code{pointer}, @code{subwindow}, or @code{widget}. +@c #### Check status of subwindows ... I thought Andy implemented them. +@end defun + +@defun text-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{text}. +@end defun + +@defun mono-pixmap-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{mono-pixmap}. +@end defun + +@defun color-pixmap-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{color-pixmap}. +@end defun + +@defun pointer-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{pointer}. +@end defun + +@defun subwindow-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{subwindow}. +@c #### Check status of subwindows ... I thought Andy implemented them. +@end defun + +@defun nothing-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{nothing}. +@end defun + +@defun widget-image-instance-p object +Return non-@code{nil} if @var{object} is an image instance of type +@code{widget}. +@end defun + + +@node Image Instance Functions +@subsubsection Image Instance Functions + +@defun make-image-instance data &optional domain dest-types noerror +This function creates a new image-instance object. + +@var{data} is an image instantiator, which describes the image +(@pxref{Image Specifiers}). + +@var{dest-types} should be a list of allowed image instance types that +can be generated. The @var{dest-types} list is unordered. If multiple +destination types are possible for a given instantiator, the ``most +natural'' type for the instantiator's format is chosen. These are + +@table @code +@item XBM +@c #### check xface +@itemx xface +@code{mono-pixmap}, then @code{color-pixmap}, then @code{pointer}. + +@item XPM +@itemx GIF +@itemx JPEG +@itemx PNG +@itemx TIFF +@code{color-pixmap}, then @code{mono-pixmap}, then @code{pointer}. + +@item string +@itemx formatted-string formats +@code{text}, then @code{mono-pixmap} (not currently implemented), then +@code{color-pixmap} (not currently implemented). + +@item mswindows-resource +For pointer resources, @code{pointer}. + +For the others, @code{color-pixmap}. +@end table + +@c #### So what? This is a reference manual, list them, you lazy bastard! +The other formats can only be instantiated as one type. + +If you want to control more specifically the order of the types into +which an image is instantiated, call @code{make-image-instance} +repeatedly until it succeeds, passing less and less preferred +destination types each time. + +If @var{dest-types} is omitted, all possible types are allowed. + +@var{domain} specifies the domain to which the image instance will be +attached. This domain is termed the @dfn{governing domain}. The type +of the governing domain depends on the image instantiator format. +(Although, more correctly, it should probably depend on the image +instance type.) For example, pixmap image instances are specific to a +device, but widget image instances are specific to a particular XEmacs +window because in order to display such a widget when two windows onto +the same buffer want to display the widget, two separate underlying +widgets must be created. (That's because a widget is actually a child +window-system window, and all window-system windows have a unique +existence on the screen.) This means that the governing domain for a +pixmap image instance will be some device (most likely, the only +existing device), whereas the governing domain for a widget image +instance will be some XEmacs window. + +If you specify an overly general @var{domain} (e.g. a frame when a +window was wanted), an error is signaled. If you specify an overly +specific @var{domain} (e.g. a window when a device was wanted), the +corresponding general domain is fetched and used instead. For +@code{make-image-instance}, it makes no difference whether you specify +an overly specific domain or the properly general domain derived from +it. However, it does matter when creating an image instance by +instantiating a specifier or glyph (e.g. with +@code{glyph-image-instance}), because the more specific domain causes +spec lookup to start there and proceed to more general domains. (It +would also matter when creating an image instance with an instantiator +format of @code{inherit}, but we currently disallow this.) +@c #### We should fix that. + +If omitted, @var{domain} defaults to the selected window. + +@var{noerror} controls what happens when the image cannot be generated. +If @code{nil}, an error message is generated. If @code{t}, no messages +are generated and this function returns @code{nil}. If anything else, a +warning message is generated and this function returns @code{nil}. +@end defun + +@defun colorize-image-instance image-instance foreground background +This function makes the image instance be displayed in the given +colors. Image instances come in two varieties: bitmaps, which are 1 +bit deep which are rendered in the prevailing foreground and background +colors; and pixmaps, which are of arbitrary depth (including 1) and +which have the colors explicitly specified. This function converts a +bitmap to a pixmap. If the image instance was a pixmap already, +nothing is done (and @code{nil} is returned). Otherwise @code{t} is +returned. +@end defun + +The following functions are + +@defun image-instance-name image-instance +This function returns the name of the given image instance. The name is +typically taken from the @code{:file} property of the instantiator if +present, otherwise from the @code{:data} property. +@end defun + +@defun image-instance-domain image-instance +Return the governing domain of the given @var{image-instance}. The +governing domain of an image instance is the domain that the image +instance is specific to. It is @emph{NOT} necessarily the domain that +was given to the call to @code{specifier-instance} that resulted in the +creation of this image instance. See @code{make-image-instance} for +more information on governing domains. +@end defun + +@defun image-instance-string image-instance +This function returns the string of the given image instance. This will +only be non-@code{nil} for text image instances. +@end defun + +@defun image-instance-file-name image-instance +This function returns the file name from which @var{image-instance} was +read, if known. +@end defun + +@defun image-instance-mask-file-name image-instance +This function returns the file name from which @var{image-instance}'s +mask was read, if known. +@end defun + +Pixmaps are considered to be three-dimensional. The height and width of +the pixel array that is displayed, and the color depth of its pixels, +are accessed with these functions. + +@defun image-instance-depth image-instance +This function returns the depth of the image instance. This is 0 for a +mono pixmap, or a positive integer for a color pixmap. +@end defun + +@defun image-instance-height image-instance +This function returns the height of the image instance, in pixels. +@end defun + +@defun image-instance-width image-instance +This function returns the width of the image instance, in pixels. +@end defun + +The hotspot is a point relative to the origin of the pixmap. When +an image is used as a mouse pointer, the hotspot is the point on the +image that sits over the location that the pointer points to. This is, +for example, the tip of the arrow or the center of the crosshairs. + +These functions access the coordinates of the hotspot. They simply +return @code{nil} for a non-pointer image instance. + +@defun image-instance-hotspot-x image-instance +This function returns the X coordinate of the image instance's hotspot, +if known. +@end defun + +@defun image-instance-hotspot-y image-instance +This function returns the Y coordinate of the image instance's hotspot, +if known. +@end defun + +Mono pixmaps and pointers may have their foreground and background +colors set when instanced. Use these functions to access color +information. + +@defun image-instance-foreground image-instance +This function returns the foreground color of @var{image-instance}, if +applicable. This will be a color instance or @code{nil}. (It will only +be non-@code{nil} for colorized mono pixmaps and for pointers.) +@end defun + +@defun image-instance-background image-instance +This function returns the background color of @var{image-instance}, if +applicable. This will be a color instance or @code{nil}. (It will only +be non-@code{nil} for colorized mono pixmaps and for pointers.) +@end defun + + +@node Using Glyphs +@section Using Glyphs + +Glyph usage is unfortunately somewhat arcane. (For discussion of +rationale, @ref{Glyphs,,,Internals}.) Because they are not ``text,'' +they cannot be inserted directly into a buffer. Instead, they are +values of properties of extents attached to buffers or strings, values +of global variables such as mouse pointers, or as a component of a +complex data structure such as a toolbar initializer. Although these +uses could probably streamlined, each structure has its own +requirements. Since glyphs are very flexible, it is possible to create +applications like the @file{edit-toolbar} and @file{xpm-mode} libraries +which display glyphs in a buffer (for reference while editing) that are +normally used in a different context. + +Usage of glyphs can roughly be categorized as follows: + +@table @strong +@item Buffer glyphs +Glyphs that are inserted in a buffer may be used for their own sake (for +example, image display in @file{w3}), as an accurate representation of +text that can't be displayed in usual fonts (equation display in +@file{preview-latex}), or as annotations (such as a marginal indication +of a bookmark). Glyphs are attached to buffers via extents. + +@item Redisplay glyphs +Glyphs can be used to create XEmacs-specific ``fonts''. For example, +the character that indicates truncation of lines is implemented as the +@code{truncation-glyph}. It is also possible to have XEmacs display a +certain character using a custom glyph, via display tables. + +@item Frame glyphs +Glyphs are used to control the appearance of various other components of +the frame. They can be inserted in the modeline, like the favicons used +in Web browsers. They are used to specify the labels on toolbar +buttons. Finally, they can be inserted in the gutters. (The difference +between a glyph inserted in a gutter and a marginal annotation is that +the marginal annotation is tied to the text in the buffer. If the +buffer line scrolls out of view, the marginal annotation will, as well. +A gutter glyph does not move with the text.) + +Unfortunately, all these uses are special cases, and have their own +APIs, in contrast to glyphs in a buffer. + +@item External glyphs +External glyphs simply allow a consistent API for images. The images +are then passed to external software such as the window system itself +(mouse cursor shapes) and the window manager (icons to represent +minimized windows). XEmacs has no role in managing their use. + +@item Subwindow and widget glyphs +These do not constitute a context of use, but rather an important class of +glyph types. The difference between these and other glyphs is that +while their geometry is determined by XEmacs, their behavior is managed +separately, by internal mechanisms in the case of widgets, and +(possibly) by another process in the case of subwindows. +@c #### Check status of subwindows ... I thought Andy implemented them. +@end table + +Some simple concrete examples showing how to insert a glyph in a +buffer are presented later. @ref{Glyph Examples}. + +``Creating Glyphs'' explains how to create glyphs. Creating a glyph +using @code{make-glyph} does not specify @emph{where} the glyph will be +used, it only specifies @emph{what} the glyph will look like. The next +four sections explain how to embed glyphs in different display +contexts. Finally, the last two sections explain the special +considerations of using glyphs whose behavior is not determined by the +code creating them, but by the glyph itself (a ``widget'' in X11 or +``control'' in MS Windows or Aqua), or even by a separate process. + +@menu +* Creating Glyphs:: Creating new glyphs. +* Buffer Glyphs:: Annotations are glyphs that appear in a buffer. +* Redisplay Glyphs:: Glyphs controlling various redisplay functions. +* Frame Glyphs:: Displaying glyphs in GUI components of the frame. +* External Glyphs:: Icons and mouse pointers for the window system. +* Native GUI Widgets:: Complex active elements treated as a single glyph. +* Subwindows:: Externally-controlled subwindows in buffers. +@c #### Check status of subwindows ... I thought Andy implemented them. +@end menu + +@node Creating Glyphs +@subsection Creating Glyphs + +@defun make-glyph &optional spec-list type +This function creates a new glyph object of type @var{type}. + +The optional @var{spec-list} is used to initialize the glyph's image. +It can be any spec-list of @dfn{image instantiator} accepted by +@code{canonicalize-spec-list}, @ref{Adding Specifications}. An +individual image instantiator may be a string, which is converted to a +vector according to @code{console-type-image-conversion-list}, or a +vector. The vector's first element specifies the @emph{external} format +of the data, such as a string, a PNG file, or an MS Windows resource. +This is followed by properties (keyword-value pairs) specifying such +information as the name of a file containing an image, or pixmap data +directly. @xref{Image Specifiers}. + +The optional @var{type} specifies the type of the glyph. @var{type} +should be one of @code{buffer} (used for glyphs in an extent, the +modeline, the toolbar, or elsewhere in a frame), @code{pointer} (used +for the mouse-pointer), or @code{icon} (used for a frame's icon), and +defaults to @code{buffer}. +@end defun + +@var{spec-list} is the initializer for the glyph's @code{image} +property, which is an image specifier. (Note that @dfn{image} as used +in the context of a glyph's @code{image} property or in the terms +@dfn{image specifier}, @dfn{image instantiator}, or @dfn{image instance} +does not refer to what people normally think of as an image (which in +XEmacs is called a @dfn{pixmap}), but to any graphical element---a +pixmap, a widget, or even a block of text, when used in the places that +call for a glyph.) + +The most common form of @var{spec-list} is a single image instantiator. +(@strong{Compatibility note:} in GNU Emacs 21, a string used to +instantiate an image is interpreted as the name of an image file, which +is searched for and instantiated.) The conversion controlled by +@code{console-type-image-conversion-list} typically attempts to look up +the string as a file name in XEmacs's data directory path, and if this +fails, defaults to displaying the string as a text image instance +(@emph{i.e.}. the string itself. + +Fine control of a particular specification is provided by using a vector +as the image instantiator. More complicated instantiators allow lists +of instantiators to be specified (which are tried in order), or mappings +from locales to lists of instantiators, @emph{etc}. @xref{Specifiers}, +for more information about specification formats. + +As well as using @var{spec-list} to initialize the glyph, you can set +specifications using @code{set-glyph-image}. The glyph itself is not +actually a specifier, but rather is an object containing an image +specifier (as well as other properties seldom set by user code). +Therefore, you cannot set or access specifications for the glyph's image +by directly using @code{set-specifier}, @code{specifier-instance} or the +like on the glyph; instead use them on @code{(glyph-image @var{glyph})} +or use the convenience functions @code{set-glyph-image}, +@code{glyph-image-instance}, and @code{glyph-image}. + +Glyph types reflect the fact that glyphs are used in contexts like +pointers and window manager icons, which are defined by external +programs such as the window system or window manager. These require +somewhat different @emph{internal} format, which is opaque to the user. + +It is extremely rare that you will ever have to specify a value for +@var{type}, which should be one of @code{buffer} (used for glyphs in an +extent, the modeline, the toolbar, or elsewhere in a buffer), +@code{pointer} (used for the mouse-pointer), or @code{icon} (used for a +frame's icon), and defaults to @code{buffer}. The only cases where it +needs to be specified is when creating icon or pointer glyphs, and in +both cases the necessary glyphs have already been created at startup and +are accessed through the appropriate variables, +e.g. @code{text-pointer-glyph} (or in general, any +@samp{*-pointer-glyph}) and @code{frame-icon-glyph}. User code should +never need to create @code{pointer} or @code{icon} glyphs. @xref{Glyph +Types}. + +There are a few other glyph creation functions, normally used only +internally or at XEmacs initialization. + +@defun make-glyph-internal &optional type +This function creates a new, uninitialized glyph of type @var{type}. +@end defun + +@defun make-pointer-glyph &optional spec-list + +Return a new @code{pointer-glyph} object with the specification list +@var{spec-list}. This function is equivalent to calling +@code{make-glyph} with a @var{type} of @code{pointer}. +@end defun + +@code{make-pointer-glyph} is normally used only by XEmacs initialization +code. It is extremely unlikely that you will ever need to create a +pointer glyph. Instead, you probably want to be calling +@code{set-glyph-image} on an existing glyph, +e.g. @code{text-pointer-glyph}. + +@defun make-icon-glyph &optional spec-list + +Return a new @code{icon-glyph} object with the specification list +@var{spec-list}. This function is equivalent to calling +@code{make-glyph} with a @var{type} of @code{icon}. +@end defun + +@code{make-icon-glyph} is normally used only by XEmacs initialization +code. It is extremely unlikely that you will ever need to create a icon +glyph. Instead, you probably want to be calling @code{set-glyph-image} +on the existing glyph, @code{frame-icon-glyph}. + + +@node Buffer Glyphs +@subsection Buffer Glyphs + +Creating a glyph using @code{make-glyph} does not specify @emph{where} +the glyph will be used, it only specifies @emph{what} the glyph will +look like. Once you have created a glyph, you specify where it will be +used by attaching it to an extent as a @emph{begin-glyph} or +@emph{end-glyph}. + +@table @code +@item buffer text +To insert a glyph into a buffer, create an extent in the buffer and then +use @code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set +a glyph to be displayed at the corresponding edge of the extent. (It is +common to create zero-width extents for this purpose.) + +@item margins +To insert a glyph into the left or right margin of a buffer, first +make sure the margin is visible by setting a value for the specifiers +@code{left-margin-width} or @code{right-margin-width}. (Not strictly necessary +when using margin glyphs with layout policy @code{whitespace}.) Follow +the same procedure above for inserting a glyph in a buffer, then +set a non-default layout policy for the glyph using +@code{set-extent-begin-glyph-layout} or @code{set-extent-end-glyph-layout}. +Alternatively, use the high-level annotations API (see +@code{make-annotation}). (In fact, you can also use the annotations +API for glyphs in a buffer, by setting a layout policy of @code{text}.) + +@end table + + +@node Redisplay Glyphs +@subsection Redisplay Glyphs + +To use a glyph to control the shape of miscellaneous redisplay effects +such as the truncation and continuation markers, set the appropriate +existing glyph variables with @code{set-glyph-image}. See +@code{continuation-glyph}, @code{control-arrow-glyph}, +@code{hscroll-glyph}, @code{invisible-text-glyph}, +@code{octal-escape-glyph}, and @code{truncation-glyph}. See also +@code{overlay-arrow-string}, an odd redisplay leftover which can be set +to a glyph you created, and will cause the glyph to be displayed on top +of the text position specified in the marker stored in +@code{overlay-arrow-position}. + +To use a glyph in a display table (i.e. to control the appearance of any +individual character), create the appropriate character glyphs and then +set a specification for the specifier @code{current-display-table}, +which controls the appearance of characters. You can also set an +overriding display table for use with text displayed in a particular +face; see @code{set-face-display-table} and @code{make-display-table}. +#### Note: Display tables do not currently support general Mule +characters. They will be overhauled at some point to support this +and to provide other features required under Mule. @ref{Display Tables}. + +Glyphs are not actually used as the background pixmaps of faces, but the +API is similar. The +background pixmap of a face is actually an image specifier -- probably +the only place in XEmacs where an image specifier occurs outside of a +glyph. If you would like to use a glyph's image as a background pixmap, +you can extract it with @code{glyph-image}, and then add it to a face. +@xref{Face Convenience Functions}. + +@defvr Glyph truncation-glyph +This variable specifies what is displayed at the end of truncated lines. +@end defvr + +@defvr Glyph continuation-glyph +This variable specifies what is displayed at the end of wrapped lines. +@end defvr + +@defvr Glyph octal-escape-glyph +This variable specifies what to prefix character codes displayed in octal +with. +@end defvr + +@defvr Glyph hscroll-glyph +This variable specifies what to display at the beginning of horizontally +scrolled lines. +@end defvr + +@defvr Glyph invisible-text-glyph +This variable specifies what to use to indicate the presence of +invisible text. This is the glyph that is displayed when an ellipsis is +called for, according to @code{selective-display-ellipses} or +@code{buffer-invisibility-spec}). Normally this is three dots (``...''). +@end defvr + +@defvr Glyph control-arrow-glyph +This variable specifies what to use as an arrow for control characters. +@end defvr + + +@node Frame Glyphs +@subsection Frame Glyphs + +There are also a number of special objects whose appearance is specified +by a glyph. Most of these a global objects that you update with +@code{set-glyph-image}, such as mouse pointers. Frame icons, toolbar +button icons, and the modeline are the main non-text objects which +accept glyphs as elements. + +@table @code +@item modeline +A glyph may be displayed in the modeline by inserting the glyph as one +of the elements of the modeline format. (Unfortunately you can't +currently put a begin glyph or end glyph on one of the modeline +extents---they're ignored.) + +@item toolbar +To insert a glyph into a toolbar, specify it as the icon part of a toolbar +button, which in turn must be part of a toolbar instantiator (typically +set on the specifier @code{default-toolbar}). +See @code{default-toolbar} for more information. (As a convenience, you +may use a symbol in place of the glyph list in the toolbar button +instantiator; the symbol is evalled to get the glyph list. This +facilitates both creating the toolbar instantiator and modifying +individual glyphs in a toolbar later on. For example, you can change +the way that the Mail toolbar button looks by modifying the value of the +variable @code{toolbar-mail-icon} (in general, @code{toolbar-*-icon}) +and then calling @code{(set-specifier-dirty-flag default-toolbar)}. +(#### Unfortunately this doesn't quite work the way it should; the +change will appear in new frames, but not existing ones, because once an +image has been displayed the pixmap replaces the symbol for those domains.) + +@item gutter +To insert a glyph into a gutter, use +@code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set a +glyph to be displayed at the corresponding edge of extent in a string, +similar to the way you insert glyphs in a buffer. Then insert the +string into the gutter @ref{Specifying a Gutter}. Glyphs that are +frequently used in this way are @code{tab control} and @code{progress +bar} glyphs. + +@end table + + +@node External Glyphs +@subsection External Glyphs +@cindex frame icon +@cindex icon, frame +@cindex mouse cursor +@cindex cursor (mouse) +@cindex pointer (mouse) +@cindex mouse pointer + +There are two special kinds of glyph that are not displayed by XEmacs. +Instead, they are used to set the appearance of iconified frames and the +mouse pointer. Because these uses are constrained by the window system, +icons and pointers have their own special types @xref{Glyph Types}. + +You may use a glyph as the icon for a frame. Do not create a new glyph; +instead, change the specifications for the existing glyph +@code{frame-icon-glyph} with @code{set-glyph-image}. This is a unique, +predefined object. Although the natural usage is to set specifications +for the global locale or a frame locale, you can also arrange for a +special icon when a frame's selected window displays a particular buffer +by using a buffer locale. + +The shape of the mouse pointer when over a particular section of a frame +is controlled using various glyph variables. Since the image of a glyph +is a specifier, it can be controlled on a per-buffer, per-frame, per-window, +or per-device basis. + +To use a glyph as the mouse pointer, in general you do not create a new +glyph, but rather you change the specifications of various existing +glyphs, such as @code{text-pointer-glyph} for the pointer used over +text, @code{modeline-pointer-glyph} for the pointer used over the +modeline, etc. Do an apropos over @samp{pointer-glyph} to find all of +them. (Note also that you can temporarily set the mouse pointer to some +specific shape by using @code{set-frame-pointer}, which takes an image +instance, as obtained from calling @code{glyph-image-instance} on a glyph +of type @code{pointer} -- either one of the above-mentioned variables or +one you created yourself. (See below for what it means to create a +glyph of type @code{pointer}.) This pointer will last only until the +next mouse motion event is processed or certain other things happen, +such as creating or deleting a window. (In fact, the above-mentioned +pointer glyph variables are implemented as part of the default handler +for mouse motion events. If you want to customize this behavior, take a +look at @code{mode-motion-hook}, or @code{mouse-motion-handler} if you +really want to get low-level.) + +You should use @code{set-glyph-image} to set the following variables, +@emph{not} @code{setq}. + +@defvr Glyph text-pointer-glyph +This variable specifies the shape of the mouse pointer when over text. +@end defvr + +@defvr Glyph nontext-pointer-glyph +This variable specifies the shape of the mouse pointer when over a +buffer, but not over text. If unspecified in a particular domain, +@code{text-pointer-glyph} is used. +@end defvr + +@defvr Glyph modeline-pointer-glyph +This variable specifies the shape of the mouse pointer when over the modeline. +If unspecified in a particular domain, @code{nontext-pointer-glyph} is used. +@end defvr + +@defvr Glyph selection-pointer-glyph +This variable specifies the shape of the mouse pointer when over a +selectable text region. If unspecified in a particular domain, +@code{text-pointer-glyph} is used. +@end defvr + +@defvr Glyph gc-pointer-glyph +This variable specifies the shape of the mouse pointer when a garbage +collection is in progress. If the selected window is on a window system +and this glyph specifies a value (i.e. a pointer image instance) in the +domain of the selected window, the pointer will be changed as specified +during garbage collection. Otherwise, a message will be printed in the +echo area, as controlled by @code{gc-message}. +@end defvr + +@defvr Glyph busy-pointer-glyph +This variable specifies the shape of the mouse pointer when XEmacs is busy. +If unspecified in a particular domain, the pointer is not changed +when XEmacs is busy. +@end defvr + +@defvr Glyph menubar-pointer-glyph +This variable specifies the shape of the mouse pointer when over the +menubar. If unspecified in a particular domain, the +window-system-provided default pointer is used. +@end defvr + +@defvr Glyph scrollbar-pointer-glyph +This variable specifies the shape of the mouse pointer when over a +scrollbar. If unspecified in a particular domain, the +window-system-provided default pointer is used. +@end defvr + +@defvr Glyph toolbar-pointer-glyph +This variable specifies the shape of the mouse pointer when over a +toolbar. If unspecified in a particular domain, +@code{nontext-pointer-glyph} is used. +@end defvr + +Internally, these variables are implemented in +@code{default-mouse-motion-handler}, and thus only take effect when the +mouse moves. That function calls @code{set-frame-pointer}, which sets +the current mouse pointer for a frame. + +@defun set-frame-pointer frame image-instance +This function sets the mouse pointer of @var{frame} to the given pointer +image instance. You should not call this function directly. +(If you do, the pointer will change again the next time the mouse moves.) +@end defun + + +@node Native GUI Widgets +@subsection Native GUI Widgets +@cindex native widget + +A ``native widget'' is a primitive GUI object defined either by the host +GUI platform or an external toolkit, and accessed from Lisp as a +``glyph.'' + +@menu +* Introduction to Widgets:: Native widgets provide tight integration of + GUI features with the platform GUI. +* Lisp API to Native Widgets:: Native widgets are glyphs. +* Layouts:: Specifying composite widgets from Lisp. +* Primitive Widgets:: Catalogue of available native widgets. +@end menu + +@node Introduction to Widgets +@subsubsection Introduction to Native Widgets and Subwindow Glyphs + +Traditionally Emacsen have hidden the GUI apparatus from the Lisp +programmer, but in XEmacs 21.4 the ability to embed autonomous GUI +objects, called @dfn{native widgets}, in text was added to Lisp. They +are handled as @emph{glyphs}. Unlike traditional XEmacs +glyphs such images and strings, native widgets are opaque to XEmacs, and +must be able to redraw themselves because they are implemented as +subwindows, not as graphics drawn by XEmacs into the text window. + +Primitive widgets are coded in C using the underlying GUI toolkit, and +thus are beyond the scope of the @emph{XEmacs Lisp Reference Manual}. +However, composite widgets can be created in Lisp using ``layouts,'' +which are horizontal or vertical arrays of subwidgets. For example, the +search dialog is formatted using layouts. + +@node Lisp API to Native Widgets +@subsubsection Lisp API to Native Widgets + +Native widgets are manipulated as @emph{glyphs} (@pxref{Glyphs}). Thus +they are created using @code{make-glyph}, with a format of one of the +widget types and a @code{:data} property specific to the widget being +instanced. + +However, there is a technical difference between widgets and other kinds +of glyphs that is theoretically important. Because widgets +are active (that is, they can respond to user input events themselves), +it is possible for the user to become aware that two appearances of the +``same'' glyph are actually separate instances. For example, if a user +changes an image glyph from red to blue, and the buffer containing the +glyph appears in more than one window, the user will perceive all the +appearances to change from red to blue simultaneously. However, suppose +the glyph is a button glyph (@emph{e.g.}, as used in the Customize +buffer for the Set, Save, and Done buttons). Then if the Customize +buffer appears in several windows at the same time, and the user clicks +on the button, she will only perceive the button to be depressed in the +window where she clicked the button. + +It seems from this example that it is unlikely to be a problem in +practice. When the user is faced with an active widget, it seems likely +that attention will focus on the widget being manipulated, and having +other instances of the widget respond simultaneously might be more +disconcerting than the actual case. + +@node Layouts +@subsubsection Layouts + +An XEmacs @dfn{layout} is a one-dimensional array of glyphs. It is a +widget for controlling the positioning of children underneath it. +Through the use of nested layouts, a widget hierarchy can be created +which can have the appearance of any standard dialog box or similar +arrangement; all of this is counted as one "glyph" and could appear in +many of the places that expect a single glyph. +@c #### Fix me! +(There are also @dfn{native layouts}, but these are undocumented, as are +their uses.) + +A layout descriptor is an image instantiator, @emph{i.e.}, a vector of +the form @samp{[FORMAT KEY-1 VALUE-1 KEY-2 VALUE-2 ...]} with format +@code{layout}, and properties + +@c #### need defaults for these +@table @code +@item :orientation +Specifies the orientation of the contained array of glyphs. The value +must be one of the symbols @code{horizontal} or @code{vertical}. + +@item :horizontally-justify +Specifies the horizontal justification of the items in the array. The +value must be one of the symbols @code{:right}, @code{:center}, or +@code{:left}. + +@item :vertically-justify +Specifies the vertical justification of the items in the array. The +value must be one of the symbols @code{:top}, @code{:center}, or +@code{:bottom}. + +@item :justify +Specifies justification. #### not understood. + +@item :border +A glyph to place in the border. The value must be an image +instantiator. + +@item :items +The glyphs controlled by the layout. The value must be a list of image +instantiators. +@end table + +Here is the specification of the search dialog widget created by +@code{make-search-dialog} in the @file{dialog-items} library, which +makes use of recursive layouts. + +@example +(make-glyph + `[layout + :orientation horizontal + :vertically-justify top + :horizontally-justify center + :border [string :data "Search"] + :items + ([layout :orientation vertical + :justify top ; implies left also + :items + ([string :data "Search for:"] + [button :descriptor "Match Case" + :style toggle + :selected (not case-fold-search) + :callback (setq case-fold-search + (not case-fold-search))] + [button :descriptor "Regular Expression" + :style toggle + :selected search-dialog-regexp + :callback (setq search-dialog-regexp + (not search-dialog-regexp))] + [button :descriptor "Forwards" + :style radio + :selected search-dialog-direction + :callback (setq search-dialog-direction t)] + [button :descriptor "Backwards" + :style radio + :selected (not search-dialog-direction) + :callback (setq search-dialog-direction nil)] + )] + [layout :orientation vertical + :vertically-justify top + :horizontally-justify right + :items + ([edit-field :width 15 :descriptor "" :active t + :initial-focus t] + [button :width 10 :descriptor "Find Next" + :callback-ex + (lambda (image-instance event) + (search-dialog-callback ,parent + image-instance + event))] + [button :width 10 :descriptor "Cancel" + :callback-ex + (lambda (image-instance event) + (isearch-dehighlight) + (delete-frame + (event-channel event)))])])]) +@end example + +@node Primitive Widgets +@subsubsection Primitive Widgets + +@c #### the following table should be replaced with a menu of nodes +@table @code +@item button +A button widget; either a push button, radio button or toggle +button. + +@item combo-box +A drop list of selectable items in a widget, for editing text. + +@item edit-field +A text editing widget. + +@item label +A static, text-only, widget; for displaying text. + +@item progress-gauge +A sliding widget, for showing progress. + +@item tab-control +A tab widget; a series of user selectable tabs. -@node Image Instances -@subsection Image Instances -@cindex image instances +@item tree-view +A folding widget. - Image-instance objects encapsulate the way a particular image (pixmap, -etc.) is displayed on a particular device. +@item scrollbar +A scrollbar widget. (#### Probably not the same as the scrollbar +controlling an Emacs window.) +@end table - In most circumstances, you do not need to directly create image -instances; use a glyph instead. However, it may occasionally be useful -to explicitly create image instances, if you want more control over the -instantiation process. -@defun image-instance-p object -This function returns non-@code{nil} if @var{object} is an image instance. +@node Subwindows +@subsection Subwindows + +Subwindows are not currently implemented. +@c #### Check status of subwindows ... I thought Andy implemented them. + +@defun subwindowp object +This function returns non-@code{nil} if @var{object} is a subwindow. @end defun + +@node Manipulating Glyphs +@section Manipulating Glyphs + + Each glyphs has properties that may be accessed. Most of these can +also be set after the glyph is initialized, with the exception of the +glyph's type. This is not a real restriction, as it is almost never +useful to create glyphs of types other than @code{buffer}. + @menu -* Image Instance Types:: Each image instances has a particular type. -* Image Instance Functions:: Functions for working with image instances. +* Glyph Properties:: Accessing and modifying a glyph's properties. +* Glyph Convenience Functions:: Accessing particular properties of a glyph. +* Glyph Dimensions:: Determining the height, width, etc. of a glyph. +* Glyph Types:: Each glyph has a particular type. @end menu -@node Image Instance Types -@subsubsection Image Instance Types -@cindex image instance types - Image instances come in a number of different types. The type -of an image instance specifies the nature of the image: Whether -it is a text string, a mono pixmap, a color pixmap, etc. +@node Glyph Properties +@subsection Glyph Properties - The valid image instance types are +Each glyph has a list of properties, which control all of the aspects of +the glyph's appearance. The following symbols have predefined meanings: @table @code -@item nothing -Nothing is displayed. +@item image +The image used to display the glyph. -@item text -Displayed as text. The foreground and background colors and the -font of the text are specified independent of the pixmap. Typically -these attributes will come from the face of the surrounding text, -unless a face is specified for the glyph in which the image appears. +@item baseline +Percent above baseline that glyph is to be displayed. Only for glyphs +displayed inside of a buffer. -@item mono-pixmap -Displayed as a mono pixmap (a pixmap with only two colors where the -foreground and background can be specified independent of the pixmap; -typically the pixmap assumes the foreground and background colors of -the text around it, unless a face is specified for the glyph in which -the image appears). -@item color-pixmap +@item contrib-p +Whether the glyph contributes to the height of the line it's on. +Only for glyphs displayed inside of a buffer. -Displayed as a color pixmap. +@item face +Face of this glyph (@emph{not} a specifier). +@end table -@item pointer -Used as the mouse pointer for a window. +@defun set-glyph-property glyph property value &optional locale tag-set how-to-add +This function changes a property of a @var{glyph}. -@item subwindow -A child window that is treated as an image. This allows (e.g.) -another program to be responsible for drawing into the window. -Not currently implemented. -@end table +For built-in properties, the actual value of the property is a specifier +and you cannot change this; but you can change the specifications within +the specifier, and that is what this function will do. The glyph face +is an exception; it is a face name (a symbol) or a face object, not a +specifier. (The face properties themselves are typically specifiers.) +For user-defined properties, you can use this function to either change +the actual value of the property or, if this value is a specifier, +change the specifications within it. -@defun valid-image-instance-type-p type -This function returns non-@code{nil} if @var{type} is a valid image -instance type. -@end defun +If @var{property} is a built-in property, the specifications to be added +to this property can be supplied in many different ways: -@defun image-instance-type-list -This function returns a list of the valid image instance types. -@end defun +@itemize @bullet +@item +If @var{value} is a simple instantiator (e.g. a string naming a pixmap +filename) or a list of instantiators, then the instantiator(s) will be +added as a specification of the property for the given @var{locale} +(which defaults to @code{global} if omitted). -@defun image-instance-type image-instance -This function returns the type of the given image instance. The return -value will be one of @code{nothing}, @code{text}, @code{mono-pixmap}, -@code{color-pixmap}, @code{pointer}, or @code{subwindow}. -@end defun +@item +If @var{value} is a list of specifications (each of which is a cons of a +locale and a list of instantiators), then @var{locale} must be +@code{nil} (it does not make sense to explicitly specify a locale in +this case), and specifications will be added as given. -@defun text-image-instance-p object -This function returns non-@code{nil} if @var{object} is an image -instance of type @code{text}. -@end defun +@item +If @var{value} is a specifier (as would be returned by +@code{glyph-property} if no @var{locale} argument is given), then some +or all of the specifications in the specifier will be added to the +property. In this case, the function is really equivalent to +@code{copy-specifier} and @var{locale} has the same semantics (if it is +a particular locale, the specification for the locale will be copied; if +a locale type, specifications for all locales of that type will be +copied; if @code{nil} or @code{all}, then all specifications will be +copied). +@end itemize -@defun mono-pixmap-image-instance-p object -This function returns non-@code{nil} if @var{object} is an image -instance of type @code{mono-pixmap}. -@end defun +@var{how-to-add} should be either @code{nil} or one of the symbols +@code{prepend}, @code{append}, @code{remove-tag-set-prepend}, +@code{remove-tag-set-append}, @code{remove-locale}, +@code{remove-locale-type}, or @code{remove-all}. See +@code{copy-specifier} and @code{add-spec-to-specifier} for a description +of what each of these means. Most of the time, you do not need to worry +about this argument; the default behavior usually is fine. -@defun color-pixmap-image-instance-p object -This function returns non-@code{nil} if @var{object} is an image -instance of type @code{color-pixmap}. -@end defun +In general, it is OK to pass an instance object (e.g. as returned by +@code{glyph-property-instance}) as an instantiator in place of an actual +instantiator. In such a case, the instantiator used to create that +instance object will be used (for example, if you set a font-instance +object as the value of the @code{font} property, then the font name used +to create that object will be used instead). In some cases, however, +doing this conversion does not make sense, and this will be noted in the +documentation for particular types of instance objects. -@defun pointer-image-instance-p object -This function returns non-@code{nil} if @var{object} is an image -instance of type @code{pointer}. +If @var{property} is not a built-in property, then this function will +simply set its value if @var{locale} is @code{nil}. However, if +@var{locale} is given, then this function will attempt to add +@var{value} as the instantiator for the given @var{locale}, using +@code{add-spec-to-specifier}. If the value of the property is not a +specifier, it will automatically be converted into a @code{generic} +specifier. @end defun -@defun subwindow-image-instance-p object -This function returns non-@code{nil} if @var{object} is an image -instance of type @code{subwindow}. -@end defun +@defun glyph-property glyph property &optional locale +This function returns @var{glyph}'s value of the given @var{property}. -@defun nothing-image-instance-p object -This function returns non-@code{nil} if @var{object} is an image -instance of type @code{nothing}. -@end defun +If @var{locale} is omitted, the @var{glyph}'s actual value for +@var{property} will be returned. For built-in properties, this will be +a specifier object of a type appropriate to the property (e.g. a font or +color specifier). For other properties, this could be anything. -@defun widget-image-instance-p object -Return @code{t} if @var{object} is an image instance of type @code{widget}. +If @var{locale} is supplied, then instead of returning the actual value, +the specification(s) for the given locale or locale type will be +returned. This will only work if the actual value of @var{property} is +a specifier (this will always be the case for built-in properties, but +may or may not apply to user-defined properties). If the actual value +of @var{property} is not a specifier, this value will simply be returned +regardless of @var{locale}. + +The return value will be a list of instantiators (e.g. vectors +specifying pixmap data), or a list of specifications, each of which is a +cons of a locale and a list of instantiators. Specifically, if +@var{locale} is a particular locale (a buffer, window, frame, device, or +@code{global}), a list of instantiators for that locale will be +returned. Otherwise, if @var{locale} is a locale type (one of the +symbols @code{buffer}, @code{window}, @code{frame}, or @code{device}), +the specifications for all locales of that type will be returned. +Finally, if @var{locale} is @code{all}, the specifications for all +locales of all types will be returned. + +The specifications in a specifier determine what the value of +@var{property} will be in a particular @dfn{domain} or set of +circumstances, which is typically a particular Emacs window along with +the buffer it contains and the frame and device it lies within. The +value is derived from the instantiator associated with the most specific +locale (in the order buffer, window, frame, device, and @code{global}) +that matches the domain in question. In other words, given a domain +(i.e. an Emacs window, usually), the specifier for @var{property} will +first be searched for a specification whose locale is the buffer +contained within that window; then for a specification whose locale is +the window itself; then for a specification whose locale is the frame +that the window is contained within; etc. The first instantiator that +is valid for the domain (usually this means that the instantiator is +recognized by the device [i.e. the X server or TTY device] that the +domain is on). The function @code{glyph-property-instance} actually does +all this, and is used to determine how to display the glyph. @end defun -@node Image Instance Functions -@subsubsection Image Instance Functions +@defun glyph-property-instance glyph property &optional domain default no-fallback +This function returns the instance of @var{glyph}'s @var{property} in the +specified @var{domain}. -@defun make-image-instance data &optional domain dest-types noerror -This function creates a new image-instance object. +Under most circumstances, @var{domain} will be a particular window, and +the returned instance describes how the specified property actually is +displayed for that window and the particular buffer in it. Note that +this may not be the same as how the property appears when the buffer is +displayed in a different window or frame, or how the property appears in +the same window if you switch to another buffer in that window; and in +those cases, the returned instance would be different. -@var{data} is an image instantiator, which describes the image -(@pxref{Image Specifiers}). +The returned instance is an image-instance object, and you can query it +using the appropriate image instance functions. For example, you could use +@code{image-instance-depth} to find out the depth (number of color +planes) of a pixmap displayed in a particular window. The results might +be different from the results you would get for another window (perhaps +the user specified a different image for the frame that window is on; or +perhaps the same image was specified but the window is on a different X +server, and that X server has different color capabilities from this +one). -@var{dest-types} should be a list of allowed image instance types that -can be generated. The @var{dest-types} list is unordered. If multiple -destination types are possible for a given instantiator, the ``most -natural'' type for the instantiator's format is chosen. (For XBM, the -most natural types are @code{mono-pixmap}, followed by -@code{color-pixmap}, followed by @code{pointer}. For the other normal -image formats, the most natural types are @code{color-pixmap}, followed -by @code{mono-pixmap}, followed by @code{pointer}. For the string and -formatted-string formats, the most natural types are @code{text}, -followed by @code{mono-pixmap} (not currently implemented), followed by -@code{color-pixmap} (not currently implemented). For MS Windows -resources, the most natural type for pointer resources is -@code{pointer}, and for the others it's @code{color-pixmap}. The other -formats can only be instantiated as one type. (If you want to control -more specifically the order of the types into which an image is -instantiated, just call @code{make-image-instance} repeatedly until it -succeeds, passing less and less preferred destination types each time. +@var{domain} defaults to the selected window if omitted. -If @var{dest-types} is omitted, all possible types are allowed. +@var{domain} can be a frame or device, instead of a window. The value +returned for such a domain is used in special circumstances when a +more specific domain does not apply; for example, a frame value might be +used for coloring a toolbar, which is conceptually attached to a frame +rather than a particular window. The value is also useful in +determining what the value would be for a particular window within the +frame or device, if it is not overridden by a more specific +specification. -@var{domain} specifies the domain to which the image instance will be -attached. This domain is termed the @dfn{governing domain}. The type -of the governing domain depends on the image instantiator -format. (Although, more correctly, it should probably depend on the -image instance type.) For example, pixmap image instances are specific -to a device, but widget image instances are specific to a particular -XEmacs window because in order to display such a widget when two windows -onto the same buffer want to display the widget, two separate underlying -widgets must be created. (That's because a widget is actually a child -window-system window, and all window-system windows have a unique -existence on the screen.) This means that the governing domain for a -pixmap image instance will be some device (most likely, the only -existing device), whereas the governing domain for a widget image -instance will be some XEmacs window. +If @var{property} does not name a built-in property, its value will +simply be returned unless it is a specifier object, in which case it +will be instanced using @code{specifier-instance}. -If you specify an overly general @var{domain} (e.g. a frame when a -window was wanted), an error is signaled. If you specify an overly -specific @var{domain} (e.g. a window when a device was wanted), the -corresponding general domain is fetched and used instead. For -@code{make-image-instance}, it makes no difference whether you specify -an overly specific domain or the properly general domain derived from -it. However, it does matter when creating an image instance by -instantiating a specifier or glyph (e.g. with -@code{glyph-image-instance}), because the more specific domain causes -spec lookup to start there and proceed to more general domains. (It -would also matter when creating an image instance with an instantiator -format of @code{inherit}, but we currently disallow this. #### We should -fix this.) -n -If omitted, @var{domain} defaults to the selected window. +Optional arguments @var{default} and @var{no-fallback} are the same as +in @code{specifier-instance}. @xref{Specifiers}. +@end defun -@var{noerror} controls what happens when the image cannot be generated. -If @code{nil}, an error message is generated. If @code{t}, no messages -are generated and this function returns @code{nil}. If anything else, a -warning message is generated and this function returns @code{nil}. +@defun remove-glyph-property glyph property &optional locale tag-set exact-p +This function removes a property from a glyph. For built-in properties, +this is analogous to @code{remove-specifier}. @xref{Specifiers, +remove-specifier-p}, for the meaning of the @var{locale}, @var{tag-set}, +and @var{exact-p} arguments. @end defun -@defun colorize-image-instance image-instance foreground background -This function makes the image instance be displayed in the given -colors. Image instances come in two varieties: bitmaps, which are 1 -bit deep which are rendered in the prevailing foreground and background -colors; and pixmaps, which are of arbitrary depth (including 1) and -which have the colors explicitly specified. This function converts a -bitmap to a pixmap. If the image instance was a pixmap already, -nothing is done (and @code{nil} is returned). Otherwise @code{t} is -returned. + +@node Glyph Convenience Functions +@subsection Glyph Convenience Functions + + The following functions are provided for working with specific +properties of a glyph. Note that these are exactly like calling +the general functions described above and passing in the +appropriate value for @var{property}. + + Remember that if you want to determine the ``value'' of a +specific glyph property, you probably want to use the @code{*-instance} +functions. For example, to determine whether a glyph contributes +to its line height, use @code{glyph-contrib-p-instance}, not +@code{glyph-contrib-p}. (The latter will return a boolean specifier +or a list of specifications, and you probably aren't concerned with +these.) + +@defun glyph-image glyph &optional locale +This function is equivalent to calling @code{glyph-property} with +a property of @code{image}. The return value will be an image +specifier if @var{locale} is @code{nil} or omitted; otherwise, +it will be a specification or list of specifications. @end defun -@defun image-instance-name image-instance -This function returns the name of the given image instance. +@defun set-glyph-image glyph spec &optional locale tag-set how-to-add +This function is equivalent to calling @code{set-glyph-property} with +a property of @code{image}. @end defun -@defun image-instance-domain image-instance +@defun glyph-image-instance glyph &optional domain default no-fallback +This function returns the instance of @var{glyph}'s image in the given +@var{domain}, and is equivalent to calling +@code{glyph-property-instance} with a property of @code{image}. The +return value will be an image instance. -Return the governing domain of the given @var{image-instance}. The -governing domain of an image instance is the domain that the image -instance is specific to. It is @emph{NOT} necessarily the domain that -was given to the call to @code{specifier-instance} that resulted in the -creation of this image instance. See @code{make-image-instance} for -more information on governing domains. +Normally @var{domain} will be a window or @code{nil} (meaning the +selected window), and an instance object describing how the image +appears in that particular window and buffer will be returned. @end defun +@defun glyph-contrib-p glyph &optional locale +This function is equivalent to calling @code{glyph-property} with +a property of @code{contrib-p}. The return value will be a boolean +specifier if @var{locale} is @code{nil} or omitted; otherwise, +it will be a specification or list of specifications. +@end defun -@defun image-instance-string image-instance -This function returns the string of the given image instance. This will -only be non-@code{nil} for text image instances. +@defun set-glyph-contrib-p glyph spec &optional locale tag-set how-to-add +This function is equivalent to calling @code{set-glyph-property} with +a property of @code{contrib-p}. @end defun -@defun image-instance-file-name image-instance -This function returns the file name from which @var{image-instance} was -read, if known. +@defun glyph-contrib-p-instance glyph &optional domain default no-fallback +This function returns whether the glyph contributes to its line height +in the given @var{domain}, and is equivalent to calling +@code{glyph-property-instance} with a property of @code{contrib-p}. The +return value will be either @code{nil} or @code{t}. (Normally @var{domain} +will be a window or @code{nil}, meaning the selected window.) @end defun -@defun image-instance-mask-file-name image-instance -This function returns the file name from which @var{image-instance}'s -mask was read, if known. +@defun glyph-baseline glyph &optional locale +This function is equivalent to calling @code{glyph-property} with a +property of @code{baseline}. The return value will be a specifier if +@var{locale} is @code{nil} or omitted; otherwise, it will be a +specification or list of specifications. @end defun -@defun image-instance-depth image-instance -This function returns the depth of the image instance. This is 0 for a -mono pixmap, or a positive integer for a color pixmap. +@defun set-glyph-baseline glyph spec &optional locale tag-set how-to-add +This function is equivalent to calling @code{set-glyph-property} with +a property of @code{baseline}. @end defun -@defun image-instance-height image-instance -This function returns the height of the image instance, in pixels. +@defun glyph-baseline-instance glyph &optional domain default no-fallback +This function returns the instance of @var{glyph}'s baseline value in +the given @var{domain}, and is equivalent to calling +@code{glyph-property-instance} with a property of @code{baseline}. The +return value will be an integer or @code{nil}. + +Normally @var{domain} will be a window or @code{nil} (meaning the +selected window), and an instance object describing the baseline value +appears in that particular window and buffer will be returned. @end defun -@defun image-instance-width image-instance -This function returns the width of the image instance, in pixels. +@defun glyph-face glyph +This function returns the face of @var{glyph}. (Remember, this is +not a specifier, but a simple property.) @end defun -@defun image-instance-hotspot-x image-instance -This function returns the X coordinate of the image instance's hotspot, -if known. This is a point relative to the origin of the pixmap. When -an image is used as a mouse pointer, the hotspot is the point on the -image that sits over the location that the pointer points to. This is, -for example, the tip of the arrow or the center of the crosshairs. +@defun set-glyph-face glyph face +This function changes the face of @var{glyph} to @var{face}. +@end defun + + +@node Glyph Dimensions +@subsection Glyph Dimensions -This will always be @code{nil} for a non-pointer image instance. +@defun glyph-width glyph &optional window +This function returns the width of @var{glyph} on @var{window}. This +may not be exact as it does not take into account all of the context +that redisplay will. @end defun -@defun image-instance-hotspot-y image-instance -This function returns the Y coordinate of the image instance's hotspot, -if known. +@defun glyph-ascent glyph &optional window +This function returns the ascent value of @var{glyph} on @var{window}. +This may not be exact as it does not take into account all of the +context that redisplay will. @end defun -@defun image-instance-foreground image-instance -This function returns the foreground color of @var{image-instance}, if -applicable. This will be a color instance or @code{nil}. (It will only -be non-@code{nil} for colorized mono pixmaps and for pointers.) +@defun glyph-descent glyph &optional window +This function returns the descent value of @var{glyph} on @var{window}. +This may not be exact as it does not take into account all of the +context that redisplay will. @end defun -@defun image-instance-background image-instance -This function returns the background color of @var{image-instance}, if -applicable. This will be a color instance or @code{nil}. (It will only -be non-@code{nil} for colorized mono pixmaps and for pointers.) +@defun glyph-height glyph &optional window +This function returns the height of @var{glyph} on @var{window}. (This +is equivalent to the sum of the ascent and descent values.) This may +not be exact as it does not take into account all of the context that +redisplay will. @end defun @node Glyph Types -@section Glyph Types +@subsection Glyph Types Each glyph has a particular type, which controls how the glyph's image is generated. Each glyph type has a corresponding list of allowable @@ -1221,6 +1978,7 @@ for the glyph's type. extent, in the modeline, and in the toolbar. Their image can be instantiated as @code{nothing}, @code{mono-pixmap}, @code{color-pixmap}, @code{text}, and @code{subwindow}. +@c #### Check status of subwindows ... I thought Andy implemented them. @item @code{pointer} glyphs can be used to specify the mouse pointer. Their @@ -1261,126 +2019,6 @@ This function returns non-@code{nil} if @var{object} is a glyph of type @code{pointer}. @end defun -@node Mouse Pointer -@section Mouse Pointer -@cindex mouse cursor -@cindex cursor (mouse) -@cindex pointer (mouse) -@cindex mouse pointer - -The shape of the mouse pointer when over a particular section of a frame -is controlled using various glyph variables. Since the image of a glyph -is a specifier, it can be controlled on a per-buffer, per-frame, per-window, -or per-device basis. - -You should use @code{set-glyph-image} to set the following variables, -@emph{not} @code{setq}. - -@defvr Glyph text-pointer-glyph -This variable specifies the shape of the mouse pointer when over text. -@end defvr - -@defvr Glyph nontext-pointer-glyph -This variable specifies the shape of the mouse pointer when over a -buffer, but not over text. If unspecified in a particular domain, -@code{text-pointer-glyph} is used. -@end defvr - -@defvr Glyph modeline-pointer-glyph -This variable specifies the shape of the mouse pointer when over the modeline. -If unspecified in a particular domain, @code{nontext-pointer-glyph} is used. -@end defvr - -@defvr Glyph selection-pointer-glyph -This variable specifies the shape of the mouse pointer when over a -selectable text region. If unspecified in a particular domain, -@code{text-pointer-glyph} is used. -@end defvr - -@defvr Glyph gc-pointer-glyph -This variable specifies the shape of the mouse pointer when a garbage -collection is in progress. If the selected window is on a window system -and this glyph specifies a value (i.e. a pointer image instance) in the -domain of the selected window, the pointer will be changed as specified -during garbage collection. Otherwise, a message will be printed in the -echo area, as controlled by @code{gc-message}. -@end defvr - -@defvr Glyph busy-pointer-glyph -This variable specifies the shape of the mouse pointer when XEmacs is busy. -If unspecified in a particular domain, the pointer is not changed -when XEmacs is busy. -@end defvr - -@defvr Glyph menubar-pointer-glyph -This variable specifies the shape of the mouse pointer when over the -menubar. If unspecified in a particular domain, the -window-system-provided default pointer is used. -@end defvr - -@defvr Glyph scrollbar-pointer-glyph -This variable specifies the shape of the mouse pointer when over a -scrollbar. If unspecified in a particular domain, the -window-system-provided default pointer is used. -@end defvr - -@defvr Glyph toolbar-pointer-glyph -This variable specifies the shape of the mouse pointer when over a -toolbar. If unspecified in a particular domain, -@code{nontext-pointer-glyph} is used. -@end defvr - -Internally, these variables are implemented in -@code{default-mouse-motion-handler}, and thus only take effect when the -mouse moves. That function calls @code{set-frame-pointer}, which sets -the current mouse pointer for a frame. - -@defun set-frame-pointer frame image-instance -This function sets the mouse pointer of @var{frame} to the given pointer -image instance. You should not call this function directly. -(If you do, the pointer will change again the next time the mouse moves.) -@end defun - -@node Redisplay Glyphs -@section Redisplay Glyphs - -@defvr Glyph truncation-glyph -This variable specifies what is displayed at the end of truncated lines. -@end defvr - -@defvr Glyph continuation-glyph -This variable specifies what is displayed at the end of wrapped lines. -@end defvr - -@defvr Glyph octal-escape-glyph -This variable specifies what to prefix character codes displayed in octal -with. -@end defvr - -@defvr Glyph hscroll-glyph -This variable specifies what to display at the beginning of horizontally -scrolled lines. -@end defvr - -@defvr Glyph invisible-text-glyph -This variable specifies what to use to indicate the presence of -invisible text. This is the glyph that is displayed when an ellipsis is -called for, according to @code{selective-display-ellipses} or -@code{buffer-invisibility-spec}). Normally this is three dots (``...''). -@end defvr - -@defvr Glyph control-arrow-glyph -This variable specifies what to use as an arrow for control characters. -@end defvr - -@node Subwindows -@section Subwindows - -Subwindows are not currently implemented. - -@defun subwindowp object -This function returns non-@code{nil} if @var{object} is a subwindow. -@end defun @node Glyph Examples @section Glyph Examples @@ -1454,7 +2092,7 @@ Once you have a glyph, you can then insert it into a buffer. Example: ;; current buffer. Any existing glyph at this location is replaced. (defun insert-glyph (gl) "Insert a glyph at the left edge of point." - (let ( (prop 'myimage) ;; myimage is an arbitrary name, chosen + (let ( (prop 'myimage) ;; myimage is an arbitrary name, chosen ;; to (hopefully) not conflict with any ;; other properties. Change it if ;; necessary. diff --git a/man/lispref/lispref.texi b/man/lispref/lispref.texi index ed05c96..2ff7479 100644 --- a/man/lispref/lispref.texi +++ b/man/lispref/lispref.texi @@ -994,39 +994,57 @@ Colors Glyphs -* Glyph Functions:: Functions for working with glyphs. -* Images:: Graphical images displayed in a frame. -* Glyph Types:: Each glyph has a particular type. -* Mouse Pointer:: Controlling the mouse pointer. -* Redisplay Glyphs:: Glyphs controlling various redisplay functions. -* Subwindows:: Inserting an externally-controlled subwindow - into a buffer. -* Glyph Examples:: Examples of how to work with glyphs. +* Glyph Intro:: Glyphs are abstract image specifications. +* Images:: Specifying the appearance of glyphs. +* Using Glyphs:: Creating and displaying glyphs. +* Manipulating Glyphs:: Getting and setting glyph properties. +* Glyph Examples:: Examples of how to work with glyphs. -Glyph Functions +Images -* Creating Glyphs:: Creating new glyphs. -* Glyph Properties:: Accessing and modifying a glyph's properties. -* Glyph Convenience Functions:: - Convenience functions for accessing particular - properties of a glyph. -* Glyph Dimensions:: Determining the height, width, etc. of a glyph. +* Image Specifiers:: Specifying an image's appearance. +* Image Instantiator Conversion:: Lazy realization of graphics. +* Image Instantiator Formats:: A catalog of image descriptors. +* Image Instances:: Classes of graphical objects. -Images +Image Instances + +* Image Instance Types:: Each image instances has a particular type. +* Image Instance Functions:: Functions for working with image instances. + +Using Glyphs -* Image Specifiers:: Specifying how an image will appear. -* Image Instantiator Conversion:: - Conversion is applied to image instantiators - at the time they are added to an - image specifier or at the time they - are passed to @code{make-image-instance}. -* Image Instances:: What an image specifier gets instanced as. Image Instances * Image Instance Types:: Each image instances has a particular type. * Image Instance Functions:: Functions for working with image instances. +Using Glyphs + +* Creating Glyphs:: Creating new glyphs. +* Buffer Glyphs:: Annotations are glyphs that appear in a buffer. +* Redisplay Glyphs:: Glyphs controlling various redisplay functions. +* Frame Glyphs:: Displaying glyphs in GUI components of the frame. +* External Glyphs:: Icons and mouse pointers for the window system. +* Native GUI Widgets:: Complex active elements treated as a single glyph. +* Subwindows:: Externally-controlled subwindows in buffers. + +Native GUI Widgets + +* Introduction to Widgets:: Native widgets provide tight integration of + GUI features with the platform GUI. +* Lisp API to Native Widgets:: Native widgets are glyphs. +* Layouts:: Specifying composite widgets from Lisp. +* Primitive Widgets:: Catalogue of available native widgets. + +Manipulating Glyphs + +* Glyph Properties:: Accessing and modifying a glyph's properties. +* Glyph Convenience Functions:: Accessing particular properties of a glyph. +* Glyph Dimensions:: Determining the height, width, etc. of a glyph. +* Glyph Types:: Each glyph has a particular type. + Annotations * Annotation Basics:: Introduction to annotations. diff --git a/man/lispref/mule.texi b/man/lispref/mule.texi index a3b68bf..e01a2a1 100644 --- a/man/lispref/mule.texi +++ b/man/lispref/mule.texi @@ -1723,7 +1723,7 @@ depends on the keyword). * CCL Statements:: Semantics of CCL statements. * CCL Expressions:: Operators and expressions in CCL. * Calling CCL:: Running CCL programs. -* CCL Examples:: The encoding functions for Big5 and KOI-8. +* CCL Example:: A trivial program to transform the Web's URL encoding. @end menu @node CCL Syntax, CCL Statements, , CCL @@ -1942,7 +1942,7 @@ complicated transformation of the Japanese standard JIS encoding to Shift JIS. CCL_DECODE_SJIS is its inverse.) It is somewhat odd to represent the SJIS operations in infix form. -@node Calling CCL, CCL Examples, CCL Expressions, CCL +@node Calling CCL, CCL Example, CCL Expressions, CCL @comment Node, Next, Previous, Up @subsection Calling CCL @@ -2008,11 +2008,307 @@ value and 0. Resets the CCL interpreter's internal elapsed time registers. @end defun -@node CCL Examples, , Calling CCL, CCL +@node CCL Example, , Calling CCL, CCL @comment Node, Next, Previous, Up -@subsection CCL Examples +@subsection CCL Example + + In this section, we describe the implementation of a trivial coding +system to transform from the Web's URL encoding to XEmacs' internal +coding. Many people will have been first exposed to URL encoding when +they saw ``%20'' where they expected a space in a file's name on their +local hard disk; this can happen when a browser saves a file from the +web and doesn't encode the name, as passed from the server, properly. + + URL encoding itself is underspecified with regard to encodings beyond +ASCII. The relevant document, RFC 1738, explicitly doesn't give any +information on how to encode non-ASCII characters, and the ``obvious'' +way---use the %xx values for the octets of the eight bit MIME character +set in which the page was served---breaks when a user types a character +outside that character set. Best practice for web development is to +serve all pages as UTF-8 and treat incoming form data as using that +coding system. (Oh, and gamble that your clients won't ever want to +type anything outside Unicode. But that's not so much of a gamble with +today's client operating systems.) We don't treat non-ASCII in this +example, as dealing with @samp{(read-multibyte-character ...)} and +errors therewith would make it much harder to understand. + + Since CCL isn't a very rich language, we move much of the logic that +would ordinarily be computed from operations like @code{(member ..)}, +@code{(and ...)} and @code{(or ...)} into tables, from which register +values are read and written, and on which @code{if} statements are +predicated. Much more of the implementation of this coding system is +occupied with constructing these tables---in normal Emacs Lisp---than it +is with actual CCL code. + + All the @code{defvar} statements we deal with in the next few sections +are surrounded by a @code{(eval-and-compile ...)}, which means that the +logic which initializes these variables executes at compile time, and if +XEmacs loads the compiled version of the file, these variables are +initialized as constants. - This section is not yet written. +@menu +* Four bits to ASCII:: Two tables used for getting hex digits from ASCII. +* URI Encoding constants:: Useful predefined characters. +* Numeric to ASCII-hexadecimal conversion:: Trivial in Lisp, not so in CCL. +* Characters to be preserved:: No transformation needed for these characters. +* The program to decode to internal format:: . +* The program to encode from internal format:: . +* The actual coding system:: . +@end menu + +@node Four bits to ASCII, URI Encoding constants, , CCL Example +@subsubsection Four bits to ASCII + + The first @code{defvar} is for +@code{url-coding-high-order-nybble-as-ascii}, a 256-entry table that +maps from an octet's value to the ASCII encoding for the hex value of +its most significant four bits. That might sound complex, but it isn't; +for decimal 65, hex value @samp{#x41}, the entry in the table is the +ASCII encoding of `4'. For decimal 122, ASCII `z', hex value +@code{#x7a}, @code{(elt url-coding-high-order-nybble-as-ascii #x7a)} +after this file is loaded gives the ASCII encoding of 7. + +@example +(defvar url-coding-high-order-nybble-as-ascii + (let ((val (make-vector 256 0)) + (i 0)) + (while (< i (length val)) + (aset val i (char-to-int (aref (format "%02X" i) 0))) + (setq i (1+ i))) + val) + "Table to find an ASCII version of an octet's most significant 4 bits.") +@end example + + The next table, @code{url-coding-low-order-nybble-as-ascii} is almost +the same thing, but this time it has a map for the hex encoding of the +low-order four bits. So the sixty-fifth entry (offset @samp{#x41}) is +the ASCII encoding of `1', the hundred-and-twenty-second (offset +@samp{#x7a}) is the ASCII encoding of `A'. + +@example +(defvar url-coding-low-order-nybble-as-ascii + (let ((val (make-vector 256 0)) + (i 0)) + (while (< i (length val)) + (aset val i (char-to-int (aref (format "%02X" i) 1))) + (setq i (1+ i))) + val) + "Table to find an ASCII version of an octet's least significant 4 bits.") +@end example + +@node URI Encoding constants, Numeric to ASCII-hexadecimal conversion, Four bits to ASCII, CCL Example +@subsubsection URI Encoding constants + + Next, we have a couple of variables that make the CCL code more +readable. The first is the ASCII encoding of the percentage sign; this +character is used as an escape code, to start the encoding of a +non-printable character. For historical reasons, URL encoding allows +the space character to be encoded as a plus sign--it does make typing +URLs like @samp{http://google.com/search?q=XEmacs+home+page} easier--and +as such, we have to check when decoding for this value, and map it to +the space character. When doing this in CCL, we use the +@code{url-coding-escaped-space-code} variable. + +@example +(defvar url-coding-escape-character-code (char-to-int ?%) + "The code point for the percentage sign, in ASCII.") + +(defvar url-coding-escaped-space-code (char-to-int ?+) + "The URL-encoded value of the space character, that is, +.") +@end example + +@node Numeric to ASCII-hexadecimal conversion, Characters to be preserved, URI Encoding constants, CCL Example +@subsubsection Numeric to ASCII-hexadecimal conversion + + Now, we have a couple of utility tables that wouldn't be necessary in +a more expressive programming language than is CCL. The first is sixteen +in length, and maps a hexadecimal number to the ASCII encoding of that +number; so zero maps to ASCII `0', ten maps to ASCII `A.' The second +does the reverse; that is, it maps an ASCII character to its value when +interpreted as a hexadecimal digit. ('A' => 10, 'c' => 12, '2' => 2, as +a few examples.) + +@example +(defvar url-coding-hex-digit-table + (let ((i 0) + (val (make-vector 16 0))) + (while (< i 16) + (aset val i (char-to-int (aref (format "%X" i) 0))) + (setq i (1+ i))) + val) + "A map from a hexadecimal digit's numeric value to its encoding in ASCII.") + +(defvar url-coding-latin-1-as-hex-table + (let ((val (make-vector 256 0)) + (i 0)) + (while (< i (length val)) + ;; Get a hex val for this ASCII character. + (aset val i (string-to-int (format "%c" i) 16)) + (setq i (1+ i))) + val) + "A map from Latin 1 code points to their values as hexadecimal digits.") +@end example + +@node Characters to be preserved, The program to decode to internal format, Numeric to ASCII-hexadecimal conversion, CCL Example +@subsubsection Characters to be preserved + + And finally, the last of these tables. URL encoding says that +alphanumeric characters, the underscore, hyphen and the full stop +@footnote{That's what the standards call it, though my North American +readers will be more familiar with it as the period character.} retain +their ASCII encoding, and don't undergo transformation. +@code{url-coding-should-preserve-table} is an array in which the entries +are one if the corresponding ASCII character should be left as-is, and +zero if they should be transformed. So the entries for all the control +and most of the punctuation charcters are zero. Lisp programmers will +observe that this initialization is particularly inefficient, but +they'll also be aware that this is a long way from an inner loop where +every nanosecond counts. + +@example +(defvar url-coding-should-preserve-table + (let ((preserve + (list ?- ?_ ?. ?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 ?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)) + (i 0) + (res (make-vector 256 0))) + (while (< i 256) + (when (member (int-char i) preserve) + (aset res i 1)) + (setq i (1+ i))) + res) + "A 256-entry array of flags, indicating whether or not to preserve an +octet as its ASCII encoding.") +@end example + +@node The program to decode to internal format, The program to encode from internal format, Characters to be preserved, CCL Example +@subsubsection The program to decode to internal format + + After the almost interminable tables, we get to the CCL. The first +CCL program, @code{ccl-decode-urlcoding} decodes from the URL coding to +our internal format; since this version of CCL doesn't have support for +error checking on the input, we don't do any verification on it. + +The buffer magnification--approximate ratio of the size of the output +buffer to the size of the input buffer--is declared as one, because +fractional values aren't allowed. (Since all those %20's will map to +` ', the length of the output text will be less than that of the input +text.) + +So, first we read an octet from the input buffer into register +@samp{r0}, to set up the loop. Next, we start the loop, with a +@code{(loop ...)} statement, and we check if the value in @samp{r0} is a +percentage sign. (Note the comma before +@code{url-coding-escape-character-code}; since CCL is a Lisp macro +language, we can break out of the macro evaluation with a comman, and as +such, ``@code{,url-coding-escape-character-code}'' will be evaluated as a +literal `37.') + +If it is a percentage sign, we read the next two octets into @samp{r2} +and @samp{r3}, and convert them into their hexadecimal numeric values, +using the @code{url-coding-latin-1-as-hex-table} array declared above. +(But again, it'll be interpreted as a literal array.) We then left +shift the first by four bits, mask the two together, and write the +result to the output buffer. + +If it isn't a percentage sign, and it is a `+' sign, we write a +space--hexadecimal 20--to the output buffer. + +If none of those things are true, we pass the octet to the output buffer +untransformed. (This could be a place to put error checking, in a more +expressive language.) We then read one more octet from the input +buffer, and move to the next iteration of the loop. + +@example +(define-ccl-program ccl-decode-urlcoding + `(1 + ((read r0) + (loop + (if (r0 == ,url-coding-escape-character-code) + ((read r2 r3) + ;; Assign the value at offset r2 in the url-coding-hex-digit-table + ;; to r3. + (r2 = r2 ,url-coding-latin-1-as-hex-table) + (r3 = r3 ,url-coding-latin-1-as-hex-table) + (r2 <<= 4) + (r3 |= r2) + (write r3)) + (if (r0 == ,url-coding-escaped-space-code) + (write #x20) + (write r0))) + (read r0) + (repeat)))) + "CCL program to take URI-encoded ASCII text and transform it to our +internal encoding. ") +@end example + +@node The program to encode from internal format, The actual coding system, The program to decode to internal format, CCL Example +@subsubsection The program to encode from internal format + + Next, we see the CCL program to encode ASCII text as URL coded text. +Here, the buffer magnification is specified as three, to account for ` ' +mapping to %20, etc. As before, we read an octet from the input into +@samp{r0}, and move into the body of the loop. Next, we check if we +should preserve the value of this octet, by reading from offset +@samp{r0} in the @code{url-coding-should-preserve-table} into @samp{r1}. +Then we have an @samp{if} statement predicated on the value in +@samp{r1}; for the true branch, we write the input octet directly. For +the false branch, we write a percentage sign, the ASCII encoding of the +high four bits in hex, and then the ASCII encoding of the low four bits +in hex. + +We then read an octet from the input into @samp{r0}, and repeat the loop. + +@example +(define-ccl-program ccl-encode-urlcoding + `(3 + ((read r0) + (loop + (r1 = r0 ,url-coding-should-preserve-table) + ;; If we should preserve the value, just write the octet directly. + (if r1 + (write r0) + ;; else, write a percentage sign, and the hex value of the octet, in + ;; an ASCII-friendly format. + ((write ,url-coding-escape-character-code) + (write r0 ,url-coding-high-order-nybble-as-ascii) + (write r0 ,url-coding-low-order-nybble-as-ascii))) + (read r0) + (repeat)))) + "CCL program to encode octets (almost) according to RFC 1738") +@end example + +@node The actual coding system, , The program to encode from internal format, CCL Example +@subsubsection The actual coding system + +To actually create the coding system, we call +@samp{make-coding-system}. The first argument is the symbol that is to +be the name of the coding system, in our case @samp{url-coding}. The +second specifies that the coding system is to be of type +@samp{ccl}---there are several other coding system types available, +including, see the documentation for @samp{make-coding-system} for the +full list. Then there's a documentation string describing the wherefore +and caveats of the coding system, and the final argument is a property +list giving information about the CCL programs and the coding system's +mnemonic. + +@example +(make-coding-system + 'url-coding 'ccl + "The coding used by application/x-www-form-urlencoded HTTP applications. +This coding form doesn't specify anything about non-ASCII characters, so +make sure you've transformed to a seven-bit coding system first." + '(decode ccl-decode-urlcoding + encode ccl-encode-urlcoding + mnemonic "URLenc")) +@end example + +If you're lucky, the @samp{url-coding} coding system describe here +should be available in the XEmacs package system. Otherwise, downloading +it from @samp{http://www.parhasard.net/url-coding.el} should work for +the foreseeable future. @node Category Tables, , CCL, MULE @section Category Tables diff --git a/man/lispref/os.texi b/man/lispref/os.texi index 67d1ff3..9376868 100644 --- a/man/lispref/os.texi +++ b/man/lispref/os.texi @@ -866,10 +866,10 @@ Under MS Windows, this is done: Return the value of ``@code{(getenv "HOME")}'', if set. @item -If the environment variables @code{HOMEDRIVE} and @code{HOMEDIR} are +If the environment variables @code{HOMEDRIVE} and @code{HOMEPATH} are both set, return the concatenation (the following description uses MS Windows environment variable substitution syntax): -@code{%HOMEDRIVE%%HOMEDIR%}. +@code{%HOMEDRIVE%%HOMEPATH%}. @item Return ``C:\'', as a fallback, but issue a warning. diff --git a/man/lispref/searching.texi b/man/lispref/searching.texi index fd8c292..4f82114 100644 --- a/man/lispref/searching.texi +++ b/man/lispref/searching.texi @@ -516,6 +516,19 @@ characters that stand for them. @item \S@var{code} @cindex @samp{\S} in regexp matches any character whose syntax is not @var{code}. + +@item \c@var{category} +@cindex @samp{\c} in regexp +matches any character in @var{category}. Only available under Mule, +categories, and category tables, are further described in @ref{Category +Tables}. They are a mechanism for constructing classes of characters +that can be local to a buffer, and that do not require complicated [] +expressions every time they are referenced. + +@item \C@var{category} +@cindex @samp{\C} in regexp +matches any character outside @var{category}. @xref{Category Tables}, +again, and note that this is only available under Mule. @end table The following regular expression constructs match the empty string---that is, diff --git a/man/new-users-guide/edit.texi b/man/new-users-guide/edit.texi index 022a5df..0efac03 100644 --- a/man/new-users-guide/edit.texi +++ b/man/new-users-guide/edit.texi @@ -71,10 +71,20 @@ the cursor). The cursor and all characters after it move backwards. Therefore, if you type a printing character and then type @key{DEL}, they cancel out. + Unfortunately, computer and keyboard manufacturers differ over the +name of the @key{DEL} key. This is the key at the far right of the row +of keys containing the digits, usually immediately above the @kbd{RET} +key. It is usually labelled ``Backspace'' or ``Delete'' or some +abbreviation. Modern keyboards will often have another key labelled +``Del'' in the @emph{edit keypad} (along with an ``Ins'' key and perhaps +some others). This is not the @kbd{DEL} key referred to here. It +usually deletes @emph{forward} in Emacs. + @kindex RET @cindex newline @findex auto-fill-mode - To end a line and start typing a new one, type @key{RET}. This + To end a line and start typing a new one, type @key{RET}. On some +keyboards, this key is labelled ``Enter''. This inserts a newline character in the buffer. If point is in the middle of a line, @key{RET} splits the line. Typing @key{DEL} when the cursor is at the beginning of a line rubs out the newline before the line, thus @@ -241,24 +251,24 @@ forward one character). Negative arguments are also allowed. Often they tell a command to move or act backwards. For example, if you want to move down ten lines, type the following: @example -C-u 10 C-n RET +C-u 10 C-n @end example @noindent -After you press @key{RET} key, the cursor will move ten lines +After you press the @kbd{C-n} key, the cursor will move ten lines downward. You can also type: @example -M-10 C-n RET +M-10 C-n @end example @noindent Both @kbd{C-u} and @kbd{M-} allow you to give numeric arguments. If you want to move ten lines backward, you can also give negative arguments, like: @example -C-u -10 C-n RET +C-u -10 C-n @end example @noindent OR you could also type: @example -M--10 C-n RET +M--10 C-n @end example @noindent You can obviously use @kbd{C-b} to move backward rather than giving diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index af2fa57..404f853 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -7,10 +7,10 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2003/10/09 19:16:02 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2005/10/14 02:11:49 $ @sp 1 -@author Tony Rossini <rossini@@u.washington.edu> @author Ben Wing <ben@@xemacs.org> +@author Tony Rossini <rossini@@u.washington.edu> @author Chuck Thompson <cthomp@@xemacs.org> @author Steve Baur <steve@@xemacs.org> @author Andreas Kaempf <andreas@@sccon.com> @@ -26,6 +26,108 @@ @end direntry @end ifinfo +@ignore + ***************************************** + ***** To update the menus and nodes ***** + ***************************************** + +First, the first argument to @node (the name itself) needs to be correct. +Use a macro if necessary to update the @node names from the +@unnumberedsubsec commands. Also note that the command we're about to +run will not correctly fix up the part of the menu to the right of a ::. +It will leave existing text in place but not change anything. If you +make a lot of changes and want to update this semi-automatically, use +M-x occur to pick out all @unnumberedsubsec lines then do some editing +magic to coerce them into the right format and cut and paste as necessary: + +1. M-x occur @unnumberedsubsec +2. <select a rectangle including all text before the Q#.#.#> +3. C-x r t *<space> +4. go to the top and use the following macro to get the indentation right. + +(setq last-kbd-macro (read-kbd-macro +"C-s : RET : <right> M-x indent- to- column RET 14 RET <home> <down>")) + +5. Cut and paste the menus into the detailmenu at the top and + individual menus at the top of the appropriate chapters. (#### I + wonder, does texinfo-master-menu generate the detailmenu from the + individual menus or vice-versa or neither?) + +Then, + +6. C-u C-c C-u m (C-u M-x texinfo-master-menu) will update the menus + and nodes. However, it appears that even though it tries to + preserve the existing menu structure as much as possible, it + doesn't do a perfect job. It messes up in at least two ways: The + indentation in the part of the main menu above the detailmenu will + be screwed up, and the #.0 titles will be removed from both the + detailmenu and the individual chapter menus. In addition, + sometimes random things get screwed up in individual parts of the + menus. Therefore: + + 1. Use the Lisp line below to get the spacing correct for the Q#.#.# + menu entries. + +(set (make-local-variable 'texinfo-column-for-description) 14) + + 2. Copy the whole detailmenu beforehand. + 3. Run C-u C-c C-u m to fix up the nodes. + 4. Run `fix-main-menu' and `fix-omitted-menu-lines'. + 5. Check the new detailmenu carefully to see if anything is screwed up + compared to the old detailmenu you copied. + 6. If so, paste back the appropriate sections and fix up the corresponding + part of the chapter-specific menu. + +(defun fix-main-menu () + (interactive) + (save-restriction + (let (p q) + (goto-char (point-min)) + (re-search-forward "^@menu") + (setq p (match-beginning 0)) + (re-search-forward "^$") + (setq q (match-end 0)) + (narrow-to-region p q) + (goto-char p) + (while (search-forward ":: " nil t) + (indent-to-column 26))))) + +(defun fix-omitted-menu-lines () + (interactive) + (save-excursion + (loop for x from 1 to 10 do + (goto-char (point-min)) + (re-search-forward (format "@unnumberedsec \\(%d.0: .*\\)" x)) + (let ((line (match-string 1))) + (re-search-backward "^@menu") + (forward-line 1) + (unless (looking-at "[0-9]+.0:") + (insert line) + (insert "\n")) + (goto-char (point-min)) + (re-search-forward "^@menu") + (search-forward (format "Q%d.0.1:" x)) + (forward-line -1) + (unless (looking-at "[0-9]+.0:") + (insert "\n") + (insert line)))))) + + ***************************************** + ***** Other work ***** + ***************************************** + +When you've rearranged and renumbered a bunch of nodes, you can get +the numbers agreeing again. The macro below assumes that the +unnumberedsubsec number is correct, and fixes up the node to agree. +Only the first part of the node is fixed and the other parts may still +be wrong; but they will be fixed as part of +@code{texinfo-master-menu}. + +(setq last-kbd-macro (read-kbd-macro +"<f1> unnumberedsubsec SPC RET C-s : RET <left> C-x C-x <f3> <home> <up> <C-right> <right> C-s , RET <left> C-x C-x <f4> <home> 2*<down>")) +@end ignore + + @node Top, Introduction, (dir), (dir) @top XEmacs FAQ @@ -77,360 +179,391 @@ library directory>/info/}. For example in @c end ifset points to CANONICAL @menu -* Introduction:: Introduction, Policy, Credits. -* Installation:: Installation and Trouble Shooting. -* Customization:: Customization and Options. -* Subsystems:: Major Subsystems. -* Miscellaneous:: The Miscellaneous Stuff. -* MS Windows:: XEmacs on Microsoft Windows. -* Current Events:: What the Future Holds. -* Legacy Versions:: New information about old XEmacsen. +* Introduction:: Introduction, Policy, Credits. +* Installation:: Installation and Troubleshooting. +* Editing:: Editing Functions. +* Display:: Display Functions. +* External Subsystems:: Interfacing with the OS and External Devices. +* Internet:: Connecting to the Internet. +* Advanced:: Advanced Customization Using XEmacs Lisp. +* Other Packages:: Other External Packages. +* Current Events:: What the Future Holds. +* Legacy Versions:: New information about old XEmacsen. @detailmenu - --- The Detailed Node Listing --- -Introduction, Policy, Credits - -* Q1.0.1:: What is XEmacs? -* Q1.0.2:: What is the current version of XEmacs? -* Q1.0.3:: Where can I find it? -* Q1.0.4:: Why Another Version of Emacs? -* Q1.0.5:: Why Haven't XEmacs and GNU Emacs Merged? -* Q1.0.6:: Where can I get help? -* Q1.0.7:: Where are the mailing lists archived? -* Q1.0.8:: How do you pronounce XEmacs? -* Q1.0.9:: What does XEmacs look like? -* Q1.0.10:: Is there a port of XEmacs to Microsoft ('95 or NT)? -* Q1.0.11:: Is there a port of XEmacs to the Macintosh? -* Q1.0.12:: Is there a port of XEmacs to NextStep? -* Q1.0.13:: Is there a port of XEmacs to OS/2? -* Q1.0.14:: Where can I get a printed copy of the XEmacs users manual? - -Policies: -* Q1.1.1:: What is the FAQ editorial policy? -* Q1.1.2:: How do I become a Beta Tester? -* Q1.1.3:: How do I contribute to XEmacs itself? - -Credits: -* Q1.2.1:: Who wrote XEmacs? -* Q1.2.2:: Who contributed to this version of the FAQ? -* Q1.2.3:: Who contributed to the FAQ in the past? - -Internationalization: -* Q1.3.1:: What is the status of internationalization support aka MULE (including Asian language support? -* Q1.3.2:: How can I help with internationalization? -* Q1.3.3:: How do I type non-ASCII characters? -* Q1.3.4:: Can XEmacs messages come out in a different language? -* Q1.3.5:: Please explain the various input methods in MULE/XEmacs -* Q1.3.6:: How do I portably code for MULE/XEmacs? -* Q1.3.7:: How about Cyrillic Modes? -* Q1.3.8:: Does XEmacs support Unicode? -* Q1.3.9:: How does XEmacs display Unicode? - -Getting Started: -* Q1.4.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one? -* Q1.4.2:: Can I use the same @file{init.el}/@file{.emacs} with the other Emacs? -* Q1.4.3:: Any good XEmacs tutorials around? -* Q1.4.4:: May I see an example of a useful XEmacs Lisp function? -* Q1.4.5:: And how do I bind it to a key? -* Q1.4.6:: What's the difference between a macro and a function? - -Installation and Trouble Shooting - -* Q2.0.1:: Running XEmacs without installing. -* Q2.0.2:: XEmacs is too big. -* Q2.0.3:: Compiling XEmacs with Netaudio. -* Q2.0.4:: Problems with Linux and ncurses. -* Q2.0.5:: Do I need X11 to run XEmacs? -* Q2.0.6:: I'm having strange crashes. What do I do? -* Q2.0.7:: Libraries in non-standard locations. -* Q2.0.8:: can't resolve symbol _h_errno -* Q2.0.9:: Where do I find external libraries? -* Q2.0.10:: After I run configure I find a coredump, is something wrong? -* Q2.0.11:: XEmacs can't resolve host names. -* Q2.0.12:: Why can't I strip XEmacs? -* Q2.0.13:: I don't need no steenkin' packages. Do I? -* Q2.0.14:: How do I figure out which packages to install? -* Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW) -* Q2.0.16:: Cygwin XEmacs won't start: cygXpm-noX4.dll was not found (NEW) - -Trouble Shooting: -* Q2.1.1:: XEmacs just crashed on me! -* Q2.1.2:: Cryptic Minibuffer messages. -* Q2.1.3:: Translation Table Syntax messages at Startup. -* Q2.1.4:: Startup warnings about deducing proper fonts? -* Q2.1.5:: XEmacs cannot connect to my X Terminal. -* Q2.1.6:: XEmacs just locked up my Linux X server. -* Q2.1.7:: HP Alt key as Meta. -* Q2.1.8:: got (wrong-type-argument color-instance-p nil)! -* Q2.1.9:: XEmacs causes my OpenWindows 3.0 server to crash. -* Q2.1.10:: Warnings from incorrect key modifiers. -* Q2.1.11:: Can't instantiate image error... in toolbar -* Q2.1.12:: Regular Expression Problems on DEC OSF1. -* Q2.1.13:: HP/UX 10.10 and @code{create_process} failure -* Q2.1.14:: @kbd{C-g} doesn't work for me. Is it broken? -* Q2.1.15:: How to debug an XEmacs problem with a debugger. -* Q2.1.16:: XEmacs crashes in @code{strcat} on HP/UX 10. -* Q2.1.17:: @samp{Marker does not point anywhere}. -* Q2.1.18:: XEmacs is outputting lots of X errors. -* Q2.1.19:: XEmacs does not follow the local timezone. -* Q2.1.20:: @samp{Symbol's function definition is void: hkey-help-show.} -* Q2.1.21:: [This question intentionally left blank] -* Q2.1.22:: XEmacs seems to take a really long time to do some things. -* Q2.1.23:: Movemail on Linux does not work for XEmacs 19.15 and later. -* Q2.1.24:: XEmacs won't start without network. -* Q2.1.25:: After upgrading, XEmacs won't do `foo' any more! - -Customization and Options - -* Q3.0.1:: What version of Emacs am I running? -* Q3.0.2:: How do I evaluate Elisp expressions? -* Q3.0.3:: @code{(setq tab-width 6)} behaves oddly. -* Q3.0.4:: How can I add directories to the @code{load-path}? -* Q3.0.5:: How to check if a lisp function is defined? -* Q3.0.6:: Can I force the output of @code{(face-list)} to a buffer? -* Q3.0.7:: Font selections don't get saved after @code{Save Options}. -* Q3.0.8:: How do I make a single minibuffer frame? -* Q3.0.9:: What is @code{Customize}? - -X Window System & Resources: -* Q3.1.1:: Where is a list of X resources? -* Q3.1.2:: How can I detect a color display? -* Q3.1.3:: [This question intentionally left blank] -* Q3.1.4:: [This question intentionally left blank] -* Q3.1.5:: How can I get the icon to just say @samp{XEmacs}? -* Q3.1.6:: How can I have the window title area display the full path? -* Q3.1.7:: @samp{xemacs -name junk} doesn't work? -* Q3.1.8:: @samp{-iconic} doesn't work. - -Textual Fonts & Colors: -* Q3.2.1:: How can I set color options from @file{init.el}/@file{.emacs}? -* Q3.2.2:: How do I set the text, menu and modeline fonts? -* Q3.2.3:: How can I set the colors when highlighting a region? -* Q3.2.4:: How can I limit color map usage? -* Q3.2.5:: My tty supports color, but XEmacs doesn't use them. -* Q3.2.6:: Can I have pixmap backgrounds in XEmacs? - -The Modeline: -* Q3.3.1:: How can I make the modeline go away? -* Q3.3.2:: How do you have XEmacs display the line number in the modeline? -* Q3.3.3:: How do I get XEmacs to put the time of day on the modeline? -* Q3.3.4:: How do I turn off current chapter from AUC TeX modeline? -* Q3.3.5:: How can one change the modeline color based on the mode used? - -Multiple Device Support: -* Q3.4.1:: How do I open a frame on another screen of my multi-headed display? -* Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How? - -The Keyboard: -* Q3.5.1:: How can I bind complex functions (or macros) to keys? -* Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers? -* Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down? -* Q3.5.4:: Globally binding @kbd{Delete}? -* Q3.5.5:: Scrolling one line at a time. -* Q3.5.6:: How to map @kbd{Help} key alone on Sun type4 keyboard? -* Q3.5.7:: How can you type in special characters in XEmacs? -* Q3.5.8:: [This question intentionally left blank] -* Q3.5.9:: How do I make the Delete key delete forward? -* Q3.5.10:: Can I turn on @dfn{sticky} modifier keys? -* Q3.5.11:: How do I map the arrow keys? - -The Cursor: -* Q3.6.1:: Is there a way to make the bar cursor thicker? -* Q3.6.2:: Is there a way to get back the old block cursor where the cursor covers the character in front of the point? -* Q3.6.3:: Can I make the cursor blink? - -The Mouse and Highlighting: -* Q3.7.1:: How can I turn off Mouse pasting? -* Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons? -* Q3.7.3:: Clicking the left button does not do anything in buffer list. -* Q3.7.4:: How can I get a list of buffers when I hit mouse button 3? -* Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool? -* Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is? -* Q3.7.7:: How do I select a rectangular region? -* Q3.7.8:: Why does @kbd{M-w} take so long? - -The Menubar and Toolbar: -* Q3.8.1:: How do I get rid of the menu (or menubar)? -* Q3.8.2:: Can I customize the basic menubar? -* Q3.8.3:: How do I control how many buffers are listed in the menu @code{Buffers} list? -* Q3.8.4:: Resources like @code{Emacs*menubar*font} are not working? -* Q3.8.5:: How can I bind a key to a function to toggle the toolbar? - -Scrollbars: -* Q3.9.1:: How can I disable the scrollbar? -* Q3.9.2:: How can one use resources to change scrollbar colors? -* Q3.9.3:: Moving the scrollbar can move the point; can I disable this? -* Q3.9.4:: How can I turn off automatic horizontal scrolling in specific modes? - -Text Selections: -* Q3.10.1:: How can I turn off or change highlighted selections? -* Q3.10.2:: How do I get that typing on an active region removes it? -* Q3.10.3:: Can I turn off the highlight during isearch? -* Q3.10.4:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? -* Q3.10.5:: The region disappears when I hit the end of buffer while scrolling. -* Q3.10.6:: Why is killing so slow? - -Major Subsystems - -* Q4.0.1:: How do I set up VM to retrieve remote mail using POP? -* Q4.0.2:: How do I get VM to filter mail for me? -* Q4.0.3:: How can I get VM to automatically check for new mail? -* Q4.0.4:: [This question intentionally left blank] -* Q4.0.5:: How do I get my outgoing mail archived? -* Q4.0.6:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? -* Q4.0.7:: Is there a mailing list or FAQ for VM? -* Q4.0.8:: Remote mail reading with VM. -* Q4.0.9:: rmail or VM gets an error incorporating new mail. -* Q4.0.10:: How do I make VM stay in a single frame? -* Q4.0.11:: How do I make VM or mh-e display graphical smilies? -* Q4.0.12:: Customization of VM not covered in the manual or here. - -Web browsing with W3: -* Q4.1.1:: What is W3? -* Q4.1.2:: How do I run W3 from behind a firewall? -* Q4.1.3:: Is it true that W3 supports style sheets and tables? - -Reading Netnews and Mail with Gnus: -* Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! -* Q4.2.2:: [This question intentionally left blank] -* Q4.2.3:: How do I make Gnus stay within a single frame? -* Q4.2.4:: How do I customize the From: line? - -Other Mail & News: -* Q4.3.1:: How can I read and/or compose MIME messages? -* Q4.3.2:: What is TM and where do I get it? -* Q4.3.3:: Why isn't this @code{movemail} program working? -* Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems? -* Q4.3.5:: Where do I find pstogif (required by tm)? - -Sparcworks, EOS, and WorkShop: -* Q4.4.1:: What is SPARCworks, EOS, and WorkShop -* Q4.4.2:: How do I start the Sun Workshop support in XEmacs 21? - -Energize: -* Q4.5.1:: What is/was Energize? - -Infodock: -* Q4.6.1:: What is Infodock? - -Other Unbundled Packages: -* Q4.7.1:: What is AUC TeX? Where do you get it? -* Q4.7.2:: Are there any Emacs Lisp Spreadsheets? -* Q4.7.3:: [This question intentionally left blank] -* Q4.7.4:: Problems installing AUC TeX -* Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs? -* Q4.7.6:: Is there a MatLab mode? -* Q4.7.7:: Can I edit files on other hosts? - -The Miscellaneous Stuff - -* Q5.0.1:: How can I do source code highlighting using font-lock? -* Q5.0.2:: I do not like cc-mode. How do I use the old c-mode? -* Q5.0.3:: How do I get @samp{More} Syntax Highlighting on by default? -* Q5.0.4:: How can I enable auto-indent and/or Filladapt? -* Q5.0.5:: How can I get XEmacs to come up in text/auto-fill mode by default? -* Q5.0.6:: How do I start up a second shell buffer? -* Q5.0.7:: Telnet from shell filters too much. -* Q5.0.8:: Why does edt emulation not work? -* Q5.0.9:: How can I emulate VI and use it as my default mode? -* Q5.0.10:: [This question intentionally left blank] -* Q5.0.11:: [This question intentionally left blank] -* Q5.0.12:: How do I disable gnuserv from opening a new frame? -* Q5.0.13:: How do I start gnuserv so that each subsequent XEmacs is a client? -* Q5.0.14:: Strange things are happening in Shell Mode. -* Q5.0.15:: Where do I get the latest CC Mode? -* Q5.0.16:: I find auto-show-mode disconcerting. How do I turn it off? -* Q5.0.17:: How can I get two instances of info? -* Q5.0.18:: [This question intentionally left blank] -* Q5.0.19:: Is there something better than LaTeX mode? -* Q5.0.20:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? - -Emacs Lisp Programming Techniques: -* Q5.1.1:: The difference in key sequences between XEmacs and GNU Emacs? -* Q5.1.2:: Can I generate "fake" keyboard events? -* Q5.1.3:: Could you explain @code{read-kbd-macro} in more detail? -* Q5.1.4:: What is the performance hit of @code{let}? -* Q5.1.5:: What is the recommended use of @code{setq}? -* Q5.1.6:: What is the typical misuse of @code{setq} ? -* Q5.1.7:: I like the @code{do} form of cl, does it slow things down? -* Q5.1.8:: I like recursion, does it slow things down? -* Q5.1.9:: How do I put a glyph as annotation in a buffer? -* Q5.1.10:: @code{map-extents} won't traverse all of my extents! -* Q5.1.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time? - -Sound: -* Q5.2.1:: How do I turn off the sound? -* Q5.2.2:: How do I get funky sounds instead of a boring beep? -* Q5.2.3:: What's NAS, how do I get it? -* Q5.2.4:: Sunsite sounds don't play. - -Miscellaneous: -* Q5.3.1:: How do you make XEmacs indent CL if-clauses correctly? -* Q5.3.2:: [This question intentionally left blank] -* Q5.3.3:: How can I print WYSIWYG a font-locked buffer? -* Q5.3.4:: Getting @kbd{M-x lpr} to work with postscript printer. -* Q5.3.5:: How do I specify the paths that XEmacs uses for finding files? -* Q5.3.6:: [This question intentionally left blank] -* Q5.3.7:: Can I have the end of the buffer delimited in some way? -* Q5.3.8:: How do I insert today's date into a buffer? -* Q5.3.9:: Are only certain syntactic character classes available for abbrevs? -* Q5.3.10:: How can I get those oh-so-neat X-Face lines? -* Q5.3.11:: How do I add new Info directories? -* Q5.3.12:: What do I need to change to make printing work? - -XEmacs on MS Windows - -General Info: -* Q6.0.1:: What is the status of the XEmacs port to Windows? -* Q6.0.2:: What flavors of MS Windows are supported? The list name implies NT only. -* Q6.0.3:: Are binaries available? -* Q6.0.4:: Can I build XEmacs on MS Windows with X support? Do I need to? -* Q6.0.5:: I'd like to help out. What do I do? -* Q6.0.6:: What are Cygwin and MinGW, and do I need them to run XEmacs? -* Q6.0.7:: What exactly are all the different ways to build XEmacs under Windows? - -Building XEmacs on MS Windows: -* Q6.1.1:: What compiler/libraries do I need to compile XEmacs? -* Q6.1.2:: How do I compile the native port? -* Q6.1.3:: What do I need for Cygwin? -* Q6.1.4:: How do I compile under Cygwin? -* Q6.1.5:: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})? -* Q6.1.6:: I decided to run with X. Where do I get an X server? -* Q6.1.7:: How do I compile with X support? - -Customization and User Interface: -* Q6.2.1:: How does the port cope with differences in the Windows user interface? -* Q6.2.2:: How do I change fonts in XEmacs on MS Windows? -* Q6.2.3:: Where do I put my @file{init.el}/@file{.emacs} file? -* Q6.2.4:: How do I get Windows Explorer to associate a file type with XEmacs? -* Q6.2.5:: Is it possible to print from XEmacs? - -Miscellaneous: -* Q6.3.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? -* Q6.3.2:: What are the differences between the various MS Windows emacsen? -* Q6.3.3:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? -* Q6.3.4:: What is the porting team doing at the moment? - -Troubleshooting: -* Q6.4.1:: XEmacs won't start on Windows. -* Q6.4.2:: Why do I get a blank toolbar on Windows 95? -* Q6.4.3:: XEmacs complains "No such file or directory, diff" - -What the Future Holds - -* Q7.0.1:: What new features will be in XEmacs soon? -* Q7.0.2:: What's new in XEmacs 21.4? -* Q7.0.3:: What's new in XEmacs 21.1? -* Q7.0.4:: What's new in XEmacs 20.4? -* Q7.0.5:: What's new in XEmacs 20.3? -* Q7.0.6:: What's new in XEmacs 20.2? - -New information about old XEmacsen. - -XEmacs 21.1: -* Q8.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. +1 Introduction, Policy, Credits + +1.0: What is XEmacs? +* Q1.0.1:: What is XEmacs? +* Q1.0.2:: What is the current version of XEmacs? +* Q1.0.3:: How do you pronounce XEmacs? +* Q1.0.4:: What does XEmacs look like? +* Q1.0.5:: Who wrote XEmacs? +* Q1.0.6:: Who wrote the FAQ? + +1.1: Getting XEmacs +* Q1.1.1:: Where can I find XEmacs? +* Q1.1.2:: Are binaries available? +* Q1.1.3:: How do I get the bleeding-edge sources? +* Q1.1.4:: Where can I obtain a printed copy of the XEmacs User's Manual? + +1.2: Versions for Different Operating Systems +* Q1.2.1:: Do I need X11 to run XEmacs? +* Q1.2.2:: What versions of Unix does XEmacs run on? +* Q1.2.3:: Is there a port of XEmacs to Microsoft Windows? +* Q1.2.4:: Can I build XEmacs on MS Windows with X support? Do I need to? +* Q1.2.5:: What are Cygwin and MinGW, and do I need them to run XEmacs? +* Q1.2.6:: What are the differences between the various MS Windows emacsen? +* Q1.2.7:: How does the port cope with differences in the Windows user interface? +* Q1.2.8:: Is there a port of XEmacs to the Macintosh? +* Q1.2.9:: Is there a port of XEmacs to MS-DOS? +* Q1.2.10:: Is there a port of XEmacs to OS/2? +* Q1.2.11:: Is there a port of XEmacs to NextStep? +* Q1.2.12:: Is there a port of XEmacs to VMS? + +1.3: Getting Started +* Q1.3.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one? +* Q1.3.2:: Where do I put my @file{init.el} file? +* Q1.3.3:: Can I use the same @file{init.el} with the other Emacs? +* Q1.3.4:: Any good XEmacs tutorials around? +* Q1.3.5:: May I see an example of a useful XEmacs Lisp function? +* Q1.3.6:: And how do I bind it to a key? +* Q1.3.7:: What's the difference between a macro and a function? +* Q1.3.8:: What is @code{Custom}? + +1.4: Getting Help +* Q1.4.1:: Where can I get help? +* Q1.4.2:: Which mailing lists are there? +* Q1.4.3:: Where are the mailing lists archived? +* Q1.4.4:: How can I get two instances of info? +* Q1.4.5:: How do I add new Info directories? + +1.5: Contributing to XEmacs +* Q1.5.1:: How do I submit changes to the FAQ? +* Q1.5.2:: How do I become a beta tester? +* Q1.5.3:: How do I contribute to XEmacs itself? +* Q1.5.4:: How do I get started developing XEmacs? +* Q1.5.5:: What's the basic layout of the code? + +1.6: Politics (XEmacs vs. GNU Emacs) +* Q1.6.1:: What is GNU Emacs? +* Q1.6.2:: How does XEmacs differ from GNU Emacs? +* Q1.6.3:: How much does XEmacs differ? +* Q1.6.4:: Is XEmacs "GNU"? +* Q1.6.5:: What is the correct way to refer to XEmacs and GNU Emacs? +* Q1.6.6:: Why haven't XEmacs and GNU Emacs merged? + +1.7: External Packages +* Q1.7.1:: What is the package system? +* Q1.7.2:: Which external packages are there? +* Q1.7.3:: Do I need to have the packages to run XEmacs? +* Q1.7.4:: Is there a way to find which package has particular functionality? + +1.8: Internationalization +* Q1.8.1:: What is the status of internationalization support aka MULE (including Asian language support)? +* Q1.8.2:: How can I help with internationalization? +* Q1.8.3:: How do I type non-ASCII characters? +* Q1.8.4:: Can XEmacs messages come out in a different language? +* Q1.8.5:: Please explain the various input methods in MULE/XEmacs +* Q1.8.6:: How do I portably code for MULE/XEmacs? +* Q1.8.7:: How about Cyrillic modes? +* Q1.8.8:: Does XEmacs support Unicode? +* Q1.8.9:: How does XEmacs display Unicode? + +2 Installation and Troubleshooting + +2.0: Installation (General) +* Q2.0.1:: How do I build and install XEmacs? +* Q2.0.2:: Where do I find external libraries? +* Q2.0.3:: How do I specify the paths that XEmacs uses for finding files? +* Q2.0.4:: Running XEmacs without installing +* Q2.0.5:: XEmacs is too big + +2.1: Package Installation +* Q2.1.1:: How do I install the packages? +* Q2.1.2:: Can I install the packages individually? +* Q2.1.3:: Can I install the packages automatically? +* Q2.1.4:: Can I upgrade or remove packages? +* Q2.1.5:: Which packages to install? +* Q2.1.6:: Can you describe the package location process in more detail? +* Q2.1.7:: EFS fails with "500 AUTH not understood" + +2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW) +* Q2.2.1:: Libraries in non-standard locations +* Q2.2.2:: Why can't I strip XEmacs? +* Q2.2.3:: X11/bitmaps/gray (or other X11-related file) not found. + +2.3: Windows Installation (Windows, Cygwin, MinGW) +* Q2.3.1:: What exactly are all the different ways to build XEmacs under Windows? +* Q2.3.2:: What compiler/libraries do I need to compile XEmacs? +* Q2.3.3:: How do I compile the native port? +* Q2.3.4:: What do I need for Cygwin? +* Q2.3.5:: How do I compile under Cygwin? +* Q2.3.6:: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})? +* Q2.3.7:: How do I compile with X support? +* Q2.3.8:: Cygwin XEmacs won't start -- cygXpm-noX4.dll was not found (NEW) + +2.4: General Troubleshooting +* Q2.4.1:: How do I deal with bugs or with problems building, installing, or running? +* Q2.4.2:: Help! XEmacs just crashed on me! +* Q2.4.3:: XEmacs crashes and I compiled it myself. +* Q2.4.4:: How to debug an XEmacs problem with a debugger +* Q2.4.5:: I get a cryptic error message when trying to do something. +* Q2.4.6:: XEmacs hangs when I try to do something. +* Q2.4.7:: I get an error message when XEmacs is running in batch mode. +* Q2.4.8:: The keyboard or mouse is not working properly, or I have some other event-related problem. +* Q2.4.9:: @kbd{C-g} doesn't work for me. Is it broken? +* Q2.4.10:: How do I debug process-related problems? +* Q2.4.11:: XEmacs is outputting lots of X errors. +* Q2.4.12:: After upgrading, XEmacs won't do `foo' any more! + +2.5: Startup-Related Problems +* Q2.5.1:: XEmacs cannot connect to my X Terminal! +* Q2.5.2:: Startup problems related to paths or package locations. +* Q2.5.3:: XEmacs won't start without network. +* Q2.5.4:: Startup warnings about deducing proper fonts? +* Q2.5.5:: Warnings from incorrect key modifiers. +* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? + +3 Editing Functions + +3.0: The Keyboard +* Q3.0.1:: How can I customize the keyboard? +* Q3.0.2:: How can I bind complex functions (or macros) to keys? +* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down? +* Q3.0.4:: Globally binding @kbd{Delete}? +* Q3.0.5:: How to map @kbd{Help} key alone on Sun type4 keyboard? +* Q3.0.6:: How can you type in special characters in XEmacs? +* Q3.0.7:: Can I turn on @dfn{sticky} modifier keys? +* Q3.0.8:: How do I map the arrow keys? +* Q3.0.9:: HP Alt key as Meta. +* Q3.0.10:: Why does edt emulation not work? +* Q3.0.11:: How can I emulate VI and use it as my default mode? + +3.1: The Mouse +* Q3.1.1:: How can I turn off Mouse pasting? +* Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons? +* Q3.1.3:: Clicking the left button does not do anything in buffer list. +* Q3.1.4:: How can I get a list of buffers when I hit mouse button 3? +* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is? + +3.2: Buffers, Text Editing +* Q3.2.1:: Can I have the end of the buffer delimited in some way? +* Q3.2.2:: How do I insert today's date into a buffer? +* Q3.2.3:: How do I get a single minibuffer frame? +* Q3.2.4:: How can I enable auto-indent and/or Filladapt? +* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default? + +3.3: Text Selections +* Q3.3.1:: How do I select a rectangular region? +* Q3.3.2:: How can I turn off or change highlighted selections? +* Q3.3.3:: How do I cause typing on an active region to remove it? +* Q3.3.4:: Can I turn off the highlight during isearch? +* Q3.3.5:: Why is killing so slow? +* Q3.3.6:: Why does @kbd{M-w} take so long? + +3.4: Editing Source Code +* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode? +* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly? + +4 Display Functions + +4.0: Textual Fonts and Colors +* Q4.0.1:: How do I specify a font? +* Q4.0.2:: How do I set the text, menu and modeline fonts? +* Q4.0.3:: How can I set color options from @file{init.el}? +* Q4.0.4:: How can I set the colors when highlighting a region? +* Q4.0.5:: How can I limit color map usage? +* Q4.0.6:: My tty supports color, but XEmacs doesn't use them. +* Q4.0.7:: Can I have pixmap backgrounds in XEmacs? +* Q4.0.8:: How do I display non-ASCII characters? +* Q4.0.9:: Font selections in don't get saved after @code{Save Options}. + +4.1: Syntax Highlighting (Font Lock) +* Q4.1.1:: How can I do source code highlighting using font-lock? +* Q4.1.2:: How do I get @samp{More} Syntax Highlighting on by default? + +4.2: The Modeline +* Q4.2.1:: How can I make the modeline go away? +* Q4.2.2:: How do you have XEmacs display the line number in the modeline? +* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline? +* Q4.2.4:: How can I change the modeline color based on the mode used? + +4.3: The Cursor +* Q4.3.1:: Is there a way to make the bar cursor thicker? +* Q4.3.2:: Is there a way to get back the block cursor? +* Q4.3.3:: Can I make the cursor blink? + +4.4: The Menubar +* Q4.4.1:: How do I get rid of the menubar? +* Q4.4.2:: How can I customize the menubar? +* Q4.4.3:: How do I enable use of the keyboard (@kbd{Alt}) to access menu items? +* Q4.4.4:: How do I control how many buffers are listed in the menu @code{Buffers List}? +* Q4.4.5:: Resources like @code{Emacs*menubar*font} are not working? + +4.5: The Toolbar +* Q4.5.1:: How do I get rid of the toolbar? +* Q4.5.2:: How can I customize the toolbar? +* Q4.5.3:: How can I bind a key to a function to toggle the toolbar? +* Q4.5.4:: @samp{Can't instantiate image error...} in toolbar + +4.6: Scrollbars and Scrolling +* Q4.6.1:: How can I disable the scrollbar? +* Q4.6.2:: How can I change the scrollbar width? +* Q4.6.3:: How can I use resources to change scrollbar colors? +* Q4.6.4:: Moving the scrollbar can move the point; can I disable this? +* Q4.6.5:: Scrolling one line at a time. +* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes? +* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off? + +4.7: The Gutter Tabs, The Progress Bar, Widgets +* Q4.7.1:: How can I disable the gutter tabs? +* Q4.7.2:: How can I disable the progress bar? +* Q4.7.3:: There are bugs in the gutter or widgets. +* Q4.7.4:: How can I customize the gutter or gutter tabs? + +5 Interfacing with the Operating System and External Devices + +5.0: X Window System and Resources +* Q5.0.1:: Where is a list of X resources? +* Q5.0.2:: How can I detect a color display? +* Q5.0.3:: How can I get the icon to just say @samp{XEmacs}? +* Q5.0.4:: How can I have the window title area display the full path? +* Q5.0.5:: @samp{xemacs -name junk} doesn't work? +* Q5.0.6:: @samp{-iconic} doesn't work. + +5.1: Microsoft Windows +* Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? +* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs? + +5.2: Printing +* Q5.2.1:: What do I need to change to make printing work? +* Q5.2.2:: How can I print WYSIWYG a font-locked buffer? +* Q5.2.3:: Getting @kbd{M-x lpr} to work with postscript printer. +* Q5.2.4:: Can you print under MS Windows? + +5.3: Sound +* Q5.3.1:: How do I turn off the sound? +* Q5.3.2:: How do I get funky sounds instead of a boring beep? +* Q5.3.3:: What are NAS and ESD (EsounD)? +* Q5.3.4:: Sunsite sounds don't play. + +5.4: Running an Interior Shell, Invoking Subprocesses +* Q5.4.1:: What is an interior shell? +* Q5.4.2:: How do I start up a second shell buffer? +* Q5.4.3:: Telnet from shell filters too much +* Q5.4.4:: Strange things are happening in Shell Mode. +* Q5.4.5:: XEmacs complains "No such file or directory, diff" +* Q5.4.6:: Cygwin error "fork_copy: linked dll/bss pass 0 failed" + +5.5: Multiple Device Support +* Q5.5.1:: How do I open a frame on another screen of my multi-headed display? +* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How? +* Q5.5.3:: How do I disable gnuserv from opening a new frame? +* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client? +* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? + +6 Connecting to the Internet + +6.0: General Mail and News +* Q6.0.1:: What are the various packages for reading mail? +* Q6.0.2:: How can I send mail? +* Q6.0.3:: How do I get my outgoing mail archived? +* Q6.0.4:: How can I read and/or compose MIME messages? +* Q6.0.5:: How do I customize the From line? +* Q6.0.6:: How do I get my MUA to filter mail for me? +* Q6.0.7:: Remote mail reading with an MUA. +* Q6.0.8:: An MUA gets an error incorporating new mail. +* Q6.0.9:: Why isn't @file{movemail} working? +* Q6.0.10:: How do I make my MUA display graphical smilies? +* Q6.0.11:: How can I get those oh-so-neat X-Face lines? + +6.1: Reading Mail with VM +* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP? +* Q6.1.2:: How can I get VM to automatically check for new mail? +* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? +* Q6.1.4:: Is there a mailing list or FAQ for VM? +* Q6.1.5:: How do I make VM stay in a single frame? +* Q6.1.6:: Customization of VM not covered in the manual, or here. + +6.2: Reading Netnews and Mail with Gnus +* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! +* Q6.2.2:: How do I make Gnus stay within a single frame? + +6.3: FTP Access +* Q6.3.1:: Can I edit files on other hosts? +* Q6.3.2:: What is EFS? + +6.4: Web Browsing with W3 +* Q6.4.1:: What is W3? +* Q6.4.2:: How do I run W3 from behind a firewall? +* Q6.4.3:: Is it true that W3 supports style sheets and tables? + +7 Advanced Customization Using XEmacs Lisp + +7.0: Emacs Lisp and @file{init.el} +* Q7.0.1:: What version of Emacs am I running? +* Q7.0.2:: How can I evaluate Emacs-Lisp expressions? +* Q7.0.3:: @code{(setq tab-width 6)} behaves oddly. +* Q7.0.4:: How can I add directories to the @code{load-path}? +* Q7.0.5:: How to check if a lisp function is defined? +* Q7.0.6:: Can I force the output of @code{(face-list)} to a buffer? + +7.1: Emacs Lisp Programming Techniques +* Q7.1.1:: What is the difference in key sequences between XEmacs and GNU Emacs? +* Q7.1.2:: Can I generate "fake" keyboard events? +* Q7.1.3:: Could you explain @code{read-kbd-macro} in more detail? +* Q7.1.4:: What is the performance hit of @code{let}? +* Q7.1.5:: What is the recommended use of @code{setq}? +* Q7.1.6:: What is the typical misuse of @code{setq}? +* Q7.1.7:: I like the @code{do} form of cl, does it slow things down? +* Q7.1.8:: I like recursion, does it slow things down? +* Q7.1.9:: How do I put a glyph as annotation in a buffer? +* Q7.1.10:: @code{map-extents} won't traverse all of my extents! +* Q7.1.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time? + +7.2: Mathematics +* Q7.2.1:: What are bignums, ratios, and bigfloats in Lisp? +* Q7.2.2:: XEmacs segfaults when I use very big numbers! +* Q7.2.3:: Bignums are really slow! +* Q7.2.4:: Equal bignums don't compare as equal! What gives? + +8 Other External Packages + +8.0: TeX +* Q8.0.1:: Is there something better than LaTeX mode? +* Q8.0.2:: What is AUCTeX? Where do you get it? +* Q8.0.3:: Problems installing AUCTeX. +* Q8.0.4:: How do I turn off current chapter from AUCTeX modeline? + +8.1: Other Unbundled Packages +* Q8.1.1:: Is there a reason for an Emacs package not to be included in XEmacs? +* Q8.1.2:: Are there any Emacs Lisp Spreadsheets? +* Q8.1.3:: Is there a MatLab mode? + +8.2: Environments Built Around XEmacs +* Q8.2.1:: What are SPARCworks, EOS, and WorkShop? +* Q8.2.2:: How do I start the Sun Workshop support in XEmacs 21? +* Q8.2.3:: What is/was Energize? +* Q8.2.4:: What is Infodock? + +9 What the Future Holds + +9.0: Changes +* Q9.0.1:: What new features will be in XEmacs soon? +* Q9.0.2:: What's new in XEmacs 21.4? +* Q9.0.3:: What's new in XEmacs 21.1? +* Q9.0.4:: What's new in XEmacs 20.4? +* Q9.0.5:: What's new in XEmacs 20.3? +* Q9.0.6:: What's new in XEmacs 20.2? + +10 New information about old XEmacsen + +10.0: XEmacs 21.1 +* Q10.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. +* Q10.0.2:: XEmacs won't start on Windows in XEmacs 21.1. @end detailmenu @end menu @@ -445,437 +578,387 @@ considering XEmacs for their own use, or has just obtained it and is wondering what to do next. It is also useful as a reference to available resources. -The previous maintainer of the FAQ was @email{rossini@@biostat.washington.edu, -Anthony Rossini}, who started it, after getting tired of hearing JWZ -complain about repeatedly having to answer questions. -@email{ben@@xemacs.org, Ben Wing} and @email{cthomp@@xemacs.org, Chuck -Thompson}, the principal authors of XEmacs, then took over and Ben did -a massive update reorganizing the whole thing. At which point Anthony -took back over, but then had to give it up again. Some of the other -contributors to this FAQ are listed later in this document. +The previous maintainer of the FAQ was +@email{rossini@@biostat.washington.edu, Anthony Rossini}, who started +it, after getting tired of hearing JWZ complain about repeatedly +having to answer questions. @email{ben@@xemacs.org, Ben Wing} then +took over and did a massive update reorganizing the whole thing. At +this point Anthony took back over, but then had to give it up again. +Some of the other contributors to this FAQ are listed later in this +document. The previous version was converted to hypertext format, and edited by @email{steve@@xemacs.org, Steven L. Baur}. It was converted back to texinfo by @email{hniksic@@xemacs.org, Hrvoje Niksic}. The FAQ was then maintained by @email{andreas@@sccon.com, Andreas Kaempf}, who passed it -on to ChristianNyb@o{}. +on to ChristianNyb@o{}, and then to @email{wambold@@xemacs.org,Sandra Wambold}. + +The current version of the FAQ has been heavily redone by +@email{ben@@xemacs.org, Ben Wing}. If you notice any errors or items which should be added or amended to -this FAQ please send email to @email{faq@@xemacs.org, Sandra -Wambold}. Include @samp{XEmacs FAQ} on the Subject: line. +this FAQ please send email to @email{xemacs-beta@@xemacs.org}. +Include @samp{XEmacs FAQ} on the Subject: line. @menu -Introduction: -* Q1.0.1:: What is XEmacs? -* Q1.0.2:: What is the current version of XEmacs? -* Q1.0.3:: Where can I find it? -* Q1.0.4:: Why Another Version of Emacs? -* Q1.0.5:: Why Haven't XEmacs and GNU Emacs Merged? -* Q1.0.6:: Where can I get help? -* Q1.0.7:: Where are the mailing lists archived? -* Q1.0.8:: How do you pronounce XEmacs? -* Q1.0.9:: What does XEmacs look like? -* Q1.0.10:: Is there a port of XEmacs to Microsoft ('95 or NT)? -* Q1.0.11:: Is there a port of XEmacs to the Macintosh? -* Q1.0.12:: Is there a port of XEmacs to NextStep? -* Q1.0.13:: Is there a port of XEmacs to OS/2? -* Q1.0.14:: Where can I get a printed copy of the XEmacs users manual? - -Policies: -* Q1.1.1:: What is the FAQ editorial policy? -* Q1.1.2:: How do I become a Beta Tester? -* Q1.1.3:: How do I contribute to XEmacs itself? - -Credits: -* Q1.2.1:: Who wrote XEmacs? -* Q1.2.2:: Who contributed to this version of the FAQ? -* Q1.2.3:: Who contributed to the FAQ in the past? - -Internationalization: -* Q1.3.1:: What is the status of internationalization support aka MULE (including Asian language support? -* Q1.3.2:: How can I help with internationalization? -* Q1.3.3:: How do I type non-ASCII characters? -* Q1.3.4:: Can XEmacs messages come out in a different language? -* Q1.3.5:: Please explain the various input methods in MULE/XEmacs -* Q1.3.6:: How do I portably code for MULE/XEmacs? -* Q1.3.7:: How about Cyrillic Modes? -* Q1.3.8:: Does XEmacs support Unicode? -* Q1.3.9:: How does XEmacs display Unicode? - -Getting Started: -* Q1.4.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one? -* Q1.4.2:: Can I use the same @file{init.el}/@file{.emacs} with the other Emacs? -* Q1.4.3:: Any good XEmacs tutorials around? -* Q1.4.4:: May I see an example of a useful XEmacs Lisp function? -* Q1.4.5:: And how do I bind it to a key? -* Q1.4.6:: What's the difference between a macro and a function? +1.0: What is XEmacs? +* Q1.0.1:: What is XEmacs? +* Q1.0.2:: What is the current version of XEmacs? +* Q1.0.3:: How do you pronounce XEmacs? +* Q1.0.4:: What does XEmacs look like? +* Q1.0.5:: Who wrote XEmacs? +* Q1.0.6:: Who wrote the FAQ? + +1.1: Getting XEmacs +* Q1.1.1:: Where can I find XEmacs? +* Q1.1.2:: Are binaries available? +* Q1.1.3:: How do I get the bleeding-edge sources? +* Q1.1.4:: Where can I obtain a printed copy of the XEmacs User's Manual? + +1.2: Versions for Different Operating Systems +* Q1.2.1:: Do I need X11 to run XEmacs? +* Q1.2.2:: What versions of Unix does XEmacs run on? +* Q1.2.3:: Is there a port of XEmacs to Microsoft Windows? +* Q1.2.4:: Can I build XEmacs on MS Windows with X support? Do I need to? +* Q1.2.5:: What are Cygwin and MinGW, and do I need them to run XEmacs? +* Q1.2.6:: What are the differences between the various MS Windows emacsen? +* Q1.2.7:: How does the port cope with differences in the Windows user interface? +* Q1.2.8:: Is there a port of XEmacs to the Macintosh? +* Q1.2.9:: Is there a port of XEmacs to MS-DOS? +* Q1.2.10:: Is there a port of XEmacs to OS/2? +* Q1.2.11:: Is there a port of XEmacs to NextStep? +* Q1.2.12:: Is there a port of XEmacs to VMS? + +1.3: Getting Started +* Q1.3.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one? +* Q1.3.2:: Where do I put my @file{init.el} file? +* Q1.3.3:: Can I use the same @file{init.el} with the other Emacs? +* Q1.3.4:: Any good XEmacs tutorials around? +* Q1.3.5:: May I see an example of a useful XEmacs Lisp function? +* Q1.3.6:: And how do I bind it to a key? +* Q1.3.7:: What's the difference between a macro and a function? +* Q1.3.8:: What is @code{Custom}? + +1.4: Getting Help +* Q1.4.1:: Where can I get help? +* Q1.4.2:: Which mailing lists are there? +* Q1.4.3:: Where are the mailing lists archived? +* Q1.4.4:: How can I get two instances of info? +* Q1.4.5:: How do I add new Info directories? + +1.5: Contributing to XEmacs +* Q1.5.1:: How do I submit changes to the FAQ? +* Q1.5.2:: How do I become a beta tester? +* Q1.5.3:: How do I contribute to XEmacs itself? +* Q1.5.4:: How do I get started developing XEmacs? +* Q1.5.5:: What's the basic layout of the code? + +1.6: Politics (XEmacs vs. GNU Emacs) +* Q1.6.1:: What is GNU Emacs? +* Q1.6.2:: How does XEmacs differ from GNU Emacs? +* Q1.6.3:: How much does XEmacs differ? +* Q1.6.4:: Is XEmacs "GNU"? +* Q1.6.5:: What is the correct way to refer to XEmacs and GNU Emacs? +* Q1.6.6:: Why haven't XEmacs and GNU Emacs merged? + +1.7: External Packages +* Q1.7.1:: What is the package system? +* Q1.7.2:: Which external packages are there? +* Q1.7.3:: Do I need to have the packages to run XEmacs? +* Q1.7.4:: Is there a way to find which package has particular functionality? + +1.8: Internationalization +* Q1.8.1:: What is the status of internationalization support aka MULE (including Asian language support)? +* Q1.8.2:: How can I help with internationalization? +* Q1.8.3:: How do I type non-ASCII characters? +* Q1.8.4:: Can XEmacs messages come out in a different language? +* Q1.8.5:: Please explain the various input methods in MULE/XEmacs +* Q1.8.6:: How do I portably code for MULE/XEmacs? +* Q1.8.7:: How about Cyrillic modes? +* Q1.8.8:: Does XEmacs support Unicode? +* Q1.8.9:: How does XEmacs display Unicode? @end menu +@unnumberedsec 1.0: What is XEmacs? + @node Q1.0.1, Q1.0.2, Introduction, Introduction -@unnumberedsec 1.0: Introduction @unnumberedsubsec Q1.0.1: What is XEmacs? - XEmacs is a powerful, highly customizable open source text editor and -application development system, with full GUI support. It is protected -under the GNU Public License and related to other versions of Emacs, in -particular GNU Emacs. Its emphasis is on modern graphical user -interface support and an open software development model, similar to -Linux. XEmacs has an active development community numbering in the -hundreds (and thousands of active beta testers on top of this), and runs -on all versions of MS Windows, on Linux, and on nearly every other -version of Unix in existence. Support for XEmacs has been supplied by -Sun Microsystems, University of Illinois, Lucid, ETL/Electrotechnical -Laboratory, Amdahl Corporation, BeOpen, and others, as well as the -unpaid time of a great number of individual developers. +application development system, with full GUI support. It is +protected under the GNU Public License and related to other versions +of Emacs, in particular GNU Emacs. Its emphasis is on modern +graphical user interface support and an open software development +model, similar to Linux. XEmacs has an active development community +numbering in the hundreds (and thousands of active beta testers on top +of this), and runs on all versions of MS Windows, on Mac OS X, on +Linux, and on nearly every other version of Unix in existence. +Support for XEmacs has been supplied by Sun Microsystems, University +of Illinois, Lucid, ETL/Electrotechnical Laboratory, Amdahl +Corporation, BeOpen, and others, as well as the unpaid time of a great +number of individual developers. @node Q1.0.2, Q1.0.3, Q1.0.1, Introduction @unnumberedsubsec Q1.0.2: What is the current version of XEmacs? -XEmacs versions 21.1.* are releases made from the current stable -sources. XEmacs versions 21.2.* are releases made from the development -sources. Check at @uref{http://www.xemacs.org} for the current minor -version. +XEmacs versions 21.4.* are releases made from the current stable +sources. XEmacs versions 21.5.* (which will be released as 22.0) are +releases made from the development sources. Check at +@uref{http://www.xemacs.org} for the current minor version. XEmacs +versions 21.1.* were the previous stable releases, now retired. -XEmacs 19.16 was the last release of v19, released in November, 1997, -which was also the last version without international language support. +XEmacs 20.4, released in February 1998, was the last release of v20. -@node Q1.0.3, Q1.0.4, Q1.0.2, Introduction -@unnumberedsubsec Q1.0.3: Where can I find it? +XEmacs 19.16, released in November, 1997. was the last release of v19, +and was also the last version without international language support. -The canonical source and binaries can be found via anonymous FTP at: +@node Q1.0.3, Q1.0.4, Q1.0.2, Introduction +@unnumberedsubsec Q1.0.3: How do you pronounce XEmacs? -@example -@uref{ftp://ftp.xemacs.org/pub/xemacs/} -@end example +The most common pronounciation is @samp{Eks eemax}. @node Q1.0.4, Q1.0.5, Q1.0.3, Introduction -@unnumberedsubsec Q1.0.4: Why Another Version of Emacs? +@unnumberedsubsec Q1.0.4: What does XEmacs look like? -For a detailed description of the differences between GNU Emacs and -XEmacs and a detailed history of XEmacs, check out the -@example -@uref{http://www.xemacs.org/About/XEmacsVsGNUemacs.html, NEWS file} -@end example +Screen snapshots are available at +@uref{http://www.xemacs.org/About/Screenshots/index.html} +as part of the XEmacs website. -However, here is a list of some of the reasons why we think you might -consider using it: +@node Q1.0.5, Q1.0.6, Q1.0.4, Introduction +@unnumberedsubsec Q1.0.5: Who wrote XEmacs? -@itemize @bullet -@item -It looks nicer. +XEmacs is the result of the time and effort of many people, and the +active developers have changed over time. There are two major +components of the XEmacs effort -- writing the code itself and providing +all the support work (testing the code, releasing beta and final +versions, handling patches, reading bug reports, maintaining the web +site, managing the mailing lists, etc. etc.). Neither component would +work without the other. -@item -The XEmacs maintainers are generally more receptive to suggestions than -the GNU Emacs maintainers. +@subheading CODING -@item -Many more bundled packages than GNU Emacs. +The primary code contributor over the years has been Ben Wing (active +since late 1992). Between 1991 and 1995, large amounts of coding was +contributed by Jamie Zawinski and Chuck Thompson. Many other people +have authored major subsystems or otherwise contributed large amounts of +code, including Andy Piper, Hrvoje Niksic, Jerry James, Jonathan Harris, +Kyle Jones, Martin Buchholz, Michael Sperber, Olivier Galibert, Richard +Mlynarik, Stig, William Perry and plenty of others. -@item -Binaries are available for many common operating systems. +Primary XEmacs-specific subsystems and their authors: +@table @asis +@item Objects +@itemize @minus @item -Face support on TTY's. - +Conversion from 26-bit to 28-bit pointers and integers, lrecords, lcrecords: Richard Mlynarik, 1994 @item -A built-in toolbar. - +Conversion to 32-bit pointers and 31-bit integers: Kyle Jones, Martin Buchholz @item -Better Motif compliance. - +Portable dumper, object descriptions: Olivier Galibert @item -Some internationalization support (including full MULE support, if -compiled with it). - +KKCC (new garbage collector), ephemerons, weak boxes: Michael Sperber and students @item -Variable-width fonts. - +Random object work (object equal and hash methods, weak lists, lcrecord lists, bit vectors, dynarr, blocktype, opaque, string resizing): Ben Wing @item -Variable-height lines. - +Profiling: Ben Wing @item -Marginal annotations. - +Some byte-compilation and hash-table improvements: Martin Buchholz @item -ToolTalk support. +Bignum: Jerry James +@end itemize +@item Internationalization/Mule +@itemize @minus @item -XEmacs can be used as an Xt widget, and can be embedded within another -application. +mostly Ben Wing; many ideas for future work, Stephen Turnbull +@end itemize +@item I/O +@itemize @minus @item -Horizontal and vertical scrollbars (using real toolkit scrollbars). - +Basic event/event-stream implementation: Jamie Zawinski @item -Better APIs (and performance) for attaching fonts, colors, and other -properties to text. - +Most event work since 1994: Ben Wing @item -The ability to embed arbitrary graphics in a buffer. - +Asynchronous stuff (async timeouts, signals, quit-checking): Ben Wing @item -Completely compatible (at the C level) with the Xt-based toolkits. - +Process method abstraction, Windows process work: Kirill Katsnelson +@item +Misc-user events, async timeouts, most quit-checking and signal code, most other work since 1994: Ben Wing +@item +Lstreams: Ben Wing @end itemize -@node Q1.0.5, Q1.0.6, Q1.0.4, Introduction -@unnumberedsubsec Q1.0.5: Why Haven't XEmacs and GNU Emacs Merged? - -There are currently irreconcilable differences in the views about -technical, programming, design and organizational matters between RMS -and the XEmacs development team which provide little hope for a merge to -take place in the short-term future. - -If you have a comment to add regarding the merge, it is a good idea to -avoid posting to the newsgroups, because of the very heated flamewars -that often result. Mail your questions to @email{xemacs-beta@@xemacs.org} and -@email{bug-gnu-emacs@@prep.ai.mit.edu}. - -@node Q1.0.6, Q1.0.7, Q1.0.5, Introduction -@unnumberedsubsec Q1.0.6: Where can I get help? - -Probably the easiest way, if everything is installed, is to use Info, by -pressing @kbd{C-h i}, or looking for an Info item on the -Help Menu. @kbd{M-x apropos} can be used to look for particular commands. - -For items not found in the manual, try reading this FAQ -@comment , examining the regular GNU Emacs FAQ (which can be -@comment found with the Emacs 19 distribution) as well as at -@comment @uref{http://www.eecs.nwu.edu/emacs/faq/} -and reading the Usenet group comp.emacs.xemacs. - -If you choose to post to a newsgroup, @strong{please use -comp.emacs.xemacs}. Please do not post XEmacs related questions to -gnu.emacs.help. - -If you cannot post or read Usenet news, there is a corresponding mailing -list @email{xemacs-news@@xemacs.org} which is available. It can be -subscribed to via the Mailman Web interface or by sending mail to to -@email{xemacs-news-request@@xemacs.org} with @samp{subscribe} in the -body of the message. See also -@uref{http://www.xemacs.org/Lists/#xemacs-news}. To cancel a -subscription, you may use the @email{xemacs-news-request@@xemacs.org} -address or the Web interface. Send a message with a subject of -@samp{unsubscribe} to be removed. - -@node Q1.0.7, Q1.0.8, Q1.0.6, Introduction -@unnumberedsubsec Q1.0.7: Where are the mailing lists archived? - -The archives can be found at @uref{http://list-archive.xemacs.org} - -@node Q1.0.8, Q1.0.9, Q1.0.7, Introduction -@unnumberedsubsec Q1.0.8: How do you pronounce XEmacs? - -The most common pronounciation is @samp{Eks eemax}. - -@node Q1.0.9, Q1.0.10, Q1.0.8, Introduction -@unnumberedsubsec Q1.0.9: What does XEmacs look like? - -Screen snapshots are available at -@uref{http://www.xemacs.org/About/Screenshots/index.html} -as part of the XEmacs website. - -@node Q1.0.10, Q1.0.11, Q1.0.9, Introduction -@unnumberedsubsec Q1.0.10: Is there a port of XEmacs to Microsoft ('95 or NT)? - -Yes. XEmacs can be built under MS Windows and is fully-featured and -actively developed. See @ref{MS Windows}. - -@node Q1.0.11, Q1.0.12, Q1.0.10, Introduction -@unnumberedsubsec Q1.0.11: Is there a port of XEmacs to the Macintosh? -@c changed - -@c There has been a port to the MachTen environment of XEmacs 19.13, but no -@c patches have been submitted to the maintainers to get this in the -@c mainstream distribution. -@c -@c For the MacOS, there is a port of -@c @uref{ftp://ftp.cs.cornell.edu/pub/parmet/, Emacs 18.59}. - -Yes. - -XEmacs 21.5 (perhaps 21.4 also?) works on MacOS X, although it certainly -will not feel very much like a Mac application as it has no Mac-specific -code in it. - -There is also a port of XEmacs 19.14 that works on all recent versions -of MacOS, from 8.1 through MacOS X, by @email{pjarvis@@ispchannel.com, -Pitts Jarvis}. It runs in an equivalent of TTY mode only (one single -Macintosh window, 25 colors), but has a large number of Mac-specific -additions. It's available at -@uref{http://homepage.mac.com/pjarvis/xemacs.html}. - -@node Q1.0.12, Q1.0.13, Q1.0.11, Introduction -@unnumberedsubsec Q1.0.12: Is there a port of XEmacs to NextStep? - -Carl Edman, apparently no longer at @email{cedman@@princeton.edu}, did -the port of GNU Emacs to NeXTstep and expressed interest in doing the -XEmacs port, but never went any farther. - -@node Q1.0.13, Q1.0.14, Q1.0.12, Introduction -@unnumberedsubsec Q1.0.13: Is there a port of XEmacs to OS/2? - -No, but Alexander Nikolaev <avn_1251@@mail.ru> is working on it. - -@node Q1.0.14, Q1.1.1, Q1.0.13, Introduction -@unnumberedsubsec Q1.0.14: Where can I obtain a printed copy of the XEmacs User's Manual? - -Pre-printed manuals are not available. If you are familiar with -TeX, you can generate your own manual from the XEmacs sources. - -HTML and Postscript versions of XEmacs manuals are available from the -XEmacs web site at -@uref{http://www.xemacs.org/Documentation/index.html}. - -@node Q1.1.1, Q1.1.2, Q1.0.14, Introduction -@unnumberedsec 1.1: Policies -@unnumberedsubsec Q1.1.1: What is the FAQ editorial policy? +@item Display +@itemize @minus +@item +Redisplay mechanism: implementation, Chuck Thompson; additional work, lots of people +@item +Glyphs: mostly Ben Wing +@item +Specifiers: Ben Wing +@item +Extents: initial implementation, someone at Lucid; rewrite, 1994, Ben Wing +@item +Widgets: Andy Piper +@item +JPEG/PNG/TIFF image converters: Ben Wing, William Perry, Jareth Hein, others (see comment in @file{glyphs-eimage.c}) +@item +Menus: Jamie Zawinski, someone at Lucid (Lucid menus) +@item +Scrollbars: Chuck Thompson, ??? (Lucid scrollbar) +@item +Multi-device/device-independence work (console/device/etc methods): Ben Wing, prototype by chuck thompson +@item +Faces: first implementation, Jamie Zawinski; second, chuck; third, Ben Wing +@item +Fonts/colors: first implementation, Jamie Zawinski; further work, Ben Wing +@item +Toolbars: implementation, chuck, much interface work, Ben Wing +@item +Gutters, tabs: andy piper +@end itemize -The FAQ is actively maintained and modified regularly. All links should -be up to date. Unfortunately, some of the information is out of date -- -a situation which the FAQ maintainer is working on. All submissions are -welcome, please e-mail submissions to @email{faq@@xemacs.org, XEmacs FAQ -maintainers}. +@item Device subsystems +@itemize @minus +@item +X Windows: Jamie Zawinksi, Ben Wing, others +@item +GTK: William Perry, Malcolm Purvis +@item +MS Windows: initial implementation, Jonathan Harris; some more work, Andy Piper, Ben Wing +@item +TTY: Chuck Thompson, Ben Wing +@item +Cygwin: Andy Piper +@end itemize -Please make sure that @samp{XEmacs FAQ} appears on the Subject: line. -If you think you have a better way of answering a question, or think a -question should be included, we'd like to hear about it. Questions and -answers included into the FAQ will be edited for spelling and grammar -and will be attributed. Answers appearing without attribution are -either from versions of the FAQ dated before May 1996 or are from -previous FAQ maintainers. Answers quoted from Usenet news articles will -always be attributed, regardless of the author. +@item Misc +@itemize @minus +@item +Configure: initial porting from fsf, Chuck Thompson; conversion to autoconf 2, much rewriting, Martin Buchholz +@item +Most initialization-related code: Ben Wing +@item +Internals manual, much of Lisp manual: Ben Wing +@item +FSF synching: initial sync with FSF 19, Richard Mlynarik, further work, Ben Wing +@end itemize +@end table -@node Q1.1.2, Q1.1.3, Q1.1.1, Introduction -@unnumberedsubsec Q1.1.2: How do I become a Beta Tester? +@subheading SUPPORT -Send an email message to @email{xemacs-beta-request@@xemacs.org} with -the line @samp{subscribe} in the body of the message. +Currently, support duties are handled by many different people. -Be prepared to get your hands dirty, as beta testers are expected to -identify problems as best they can. +Release managers have been -@node Q1.1.3, Q1.2.1, Q1.1.2, Introduction -@unnumberedsubsec Q1.1.3: How do I contribute to XEmacs itself? +@itemize @minus +@item +Stephen Turnbull (April 2001 - January 2003, March 2004 - present, 21.2.47 - 21.4.12, 21.5.2 - 21.5.7, 21.5.17 - present) +@item +Vin Shelton (Mar 1997 - Jan 2001, May 2003 - present, 19.16, 21.1.3 - +21.1.14, 21.4.13 - present) +@item +Steve Youngs (July 2002 - September 2003, 21.5.8 - 21.5.16) +@item +Martin Buchholz (December 1998, November 1999 - May 2001, 21.2.7 - 21.2.8, 21.2.21 - 21.2.46, 21.5.0 - 21.5.1) +@item +Steve Baur (early 1997 - December 1998, February 1999 - November 1999, 19.15 - 21.2.5, 21.2.9 - 21.2.20) +@item +Andy Piper (December 1998, 21.2.6) +@item +Chuck Thompson (June 1994 - September 1996, 19.11 - 19.14) +@item +Jamie Zawinski (April 1991 - June 1994, 19.0 - 19.10) +@end itemize -Ben Wing @email{ben@@xemacs.org} writes: +The recent overlapping dates are intentional, since two or three trees +are maintained simultaneously at any point. -@quotation -BTW if you have a wish list of things that you want added, you have to -speak up about it! More specifically, you can do the following if you -want a feature added (in increasing order of usefulness): +Other major support work: -@itemize @bullet +@itemize @minus @item -Make a posting about a feature you want added. - +Adrian Aichner wrote and maintains the web site. @item -Become a beta tester and make more postings about those same features. - +Stephen Turnbull has produced many of the beta and semi-stable releases +and has attempted to be the "face" of XEmacs on the newsgroups and +mailing lists. @item -Convince us that you're going to use the features in some cool and -useful way. - +Steve Youngs currently produces the beta releases (???). @item -Come up with a clear and well-thought-out API concerning the features. - +Steve Youngs, Ville Skytta, and now Norbert Koch have taken turns +maintaining the packages. @item -Write the code to implement a feature and send us a patch. +Vin Shelton maintains the stable releases. +@item +Testing - #### Norbert, Adrian, ??? @end itemize -(not that we're necessarily requiring you to write the code, but we can -always hope :) -@end quotation - -@node Q1.2.1, Q1.2.2, Q1.1.3, Introduction -@unnumberedsec 1.2: Credits -@unnumberedsubsec Q1.2.1: Who wrote XEmacs? - -XEmacs is the result of the time and effort of many people. The -developers responsible for recent releases are: +Portraits and email of some of the major developers: @itemize @bullet -@item @email{martin@@xemacs.org, Martin Buchholz} +@item @email{andy@@xemacs.org, Andy Piper} @html -<br><img src="mrb.jpeg" alt="Portrait of Martin Buchholz"><br> +<br><img src="piper.png" alt="Portrait of Andy Piper"><br> @end html - -@item @email{stephen@@xemacs.org, Stephen Turnbull} - - @item @email{ben@@xemacs.org, Ben Wing} @html -<br><img src="wing.gif" alt="Portrait of Ben Wing"><br> +<br><img src="ben.png" alt="Portrait of Ben Wing"><br> @end html - -@item @email{hniksic@@xemacs.org, Hrvoje Niksic} - +@item @email{cthomp@@xemacs.org, Chuck Thompson} @html -<br><img src="hniksic.jpeg" alt="Portrait of Hrvoje Niksic"><br> +<br><img src="cthomp.png" alt="Portrait of Chuck Thompson"><br> @end html -@end itemize - -The developers responsible for older releases were: - -@itemize @bullet -@item @email{steve@@xemacs.org, Steve Baur} +@item @email{hniksic@@xemacs.org, Hrvoje Niksic} @html -<br><img src="steve.gif" alt="Portrait of Steve Baur"><br> +<br><img src="hniksic.png" alt="Portrait of Hrvoje Niksic"><br> @end html -@item @email{cthomp@@xemacs.org, Chuck Thompson} +@item @email{jwz@@jwz.org, Jamie Zawinski} @html -<br><img src="cthomp.jpeg" alt="Portrait of Chuck Thompson"><br> +<br><img src="jwz.png" alt="Portrait of Jamie Zawinski"><br> @end html -@item @email{jwz@@jwz.org, Jamie Zawinski} +@item @email{martin@@xemacs.org, Martin Buchholz} @html -<br><img src="jwz.gif" alt="Portrait of Jamie Zawinski"><br> +<br><img src="martin.png" alt="Portrait of Martin Buchholz"><br> @end html @item @email{mly@@adoc.xerox.com, Richard Mlynarik} +@html +<br><img src="mly.png" alt="Portrait of Richard Mlynarik"><br> +@end html -Steve Baur was the primary maintainer for 19.15 through 21.0. - -Chuck Thompson and Ben Wing were the maintainers for 19.11 through 19.14 -and heavy code contributors for 19.8 through 19.10. - -Jamie Zawinski was the maintainer for 19.0 through 19.10 (the entire -history of Lucid Emacs). Richard Mlynarik was a heavy code contributor -to 19.6 through 19.8. +@item @email{stephen@@xemacs.org, Stephen Turnbull} +@item @email{steve@@xemacs.org, Steve Baur} +@html +<br><img src="slb.png" alt="Portrait of Steve Baur"><br> +@end html @end itemize -Along with many other contributors, partially enumerated in the -@samp{About XEmacs} option in the Help menu. +Many other people have contributed to XEmacs; this is partially +enumerated in the @samp{About XEmacs} option in the Help menu. -@node Q1.2.2, Q1.2.3, Q1.2.1, Introduction -@unnumberedsubsec Q1.2.2: Who contributed to this version of the FAQ? +@node Q1.0.6, Q1.1.1, Q1.0.5, Introduction +@unnumberedsubsec Q1.0.6: Who wrote the FAQ? + +The current version of this FAQ was created by @email{ben@@xemacs.org, +Ben Wing}. -The following people contributed valuable suggestions to building this -version of the FAQ (listed in alphabetical order): +Previous contributors to the FAQ include @itemize @bullet @item @email{steve@@xemacs.org, SL Baur} @item @email{hniksic@@xemacs.org, Hrvoje Niksic} -@item @email{Aki.Vehtari@@hut.fi, Aki Vehtari} - -@end itemize - -@node Q1.2.3, Q1.3.1, Q1.2.2, Introduction -@unnumberedsubsec Q1.2.3: Who contributed to the FAQ in the past? - -This is only a partial list, as many names were lost in a hard disk -crash some time ago. - -@itemize @bullet @item @email{binge@@aloft.att.com, Curtis.N.Bingham} @item @email{bruncott@@dormeur.inria.fr, Georges Brun-Cottan} @@ -915,308 +998,391 @@ crash some time ago. @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari} @end itemize -@node Q1.3.1, Q1.3.2, Q1.2.3, Introduction -@unnumberedsec 1.3: Internationalization -@unnumberedsubsec Q1.3.1: What is the status of internationalization support aka MULE (including Asian language support? +@unnumberedsec 1.1: Getting XEmacs -Both the stable and development versions of XEmacs include -internationalization support (aka MULE). MULE currently (21.4) works on -UNIX and Linux systems. It is possible to build with MULE on Windows -systems, but if you really need MULE on Windows, it is recommended that -you build and use the development (21.5) version, and deal with the -instability of the development tree. Binaries compiled without MULE -support run faster than MULE capable XEmacsen. +@node Q1.1.1, Q1.1.2, Q1.0.6, Introduction +@unnumberedsubsec Q1.1.1: Where can I find XEmacs? -@node Q1.3.2, Q1.3.3, Q1.3.1, Introduction -@unnumberedsubsec Q1.3.2: How can I help with internationalization? +To download XEmacs, visit the XEmacs WWW page at +@uref{http://www.xemacs.org/Download/}. The most up-to-date list of +distribution sites can always be found there. Try to pick a site that +is networkologically close to you. If you know of other mirrors of +the XEmacs archives, please send e-mail to +@uref{mailto:webmaster@@xemacs.org} and we will list them here as well. -If you would like to help, you may want to join the -@email{xemacs-mule@@xemacs.org} mailing list. Especially needed are -people who speak/write languages other than English, who are willing to -use XEmacs/MULE regularly, and have some experience with Elisp. +The canonical distribution point is ftp.xemacs.org, available either +through HTTP (@uref{http://ftp.xemacs.org/}) or anonymous FTP +(@uref{ftp://ftp.xemacs.org/pub/xemacs/}). -Translations of the TUTORIAL and man page are welcome, and XEmacs does -support multilingual menus, but we have few current translations. +@node Q1.1.2, Q1.1.3, Q1.1.1, Introduction +@unnumberedsubsec Q1.1.2: Are binaries available? -@xref{Q1.1.2}. +MS Windows binaries are available at +@uref{http://www.xemacs.org/Download/win32/} for the native versions +of 21.4 and 21.1. Cygwin binaries are now available as part of the +standard Cygwin installation process. XEmacs also comes pre-built as +part of many Linux distributions, such as Red Hat and SuSE. -@node Q1.3.3, Q1.3.4, Q1.3.2, Introduction -@unnumberedsubsec Q1.3.3: How do I type non-ASCII characters? +Otherwise, you will need to build XEmacs yourself or get your system +administrator to do it. Generally, this is not a difficult process +under Unix and Mac OS X, as XEmacs has been tested under all of the +common Unix versions and under Mac OS X and comes with an extensive +configure script that is able to automatically detect most aspects of +the configuration of your particular system. -See question 3.5.7 (@pxref{Q3.5.7}) in part 3 of this FAQ for some -simple methods that also work in non-MULE builds of XEmacs (but only for -one-octet coded character sets, and mostly for ISO 8859/1). Many of the -methods available for Cyrillic (@pxref{Q1.3.7}) work without MULE. -MULE has more general capabilities. @xref{Q1.3.5}. +@node Q1.1.3, Q1.1.4, Q1.1.2, Introduction +@unnumberedsubsec Q1.1.3: How do I get the bleeding-edge sources? -@xref{Q3.2.7}, which covers display of non-ASCII characters. +If you are interested in developing XEmacs, or getting the absolutely most +recent, up-to-the-moment, bleeding-edge source code, you can directly +access the master CVS source tree (read-only, of course, until you ask for +and are granted permission to directly modify portions of the source tree) +at cvs.xemacs.org. Directions on how to access the source tree are located +at @uref{http://www.xemacs.org/Develop/cvsaccess.html}. -@node Q1.3.4, Q1.3.5, Q1.3.3, Introduction -@unnumberedsubsec Q1.3.4: Can XEmacs messages come out in a different language? +Nightly CVS snapshots are available at +@uref{http://www.dk.xemacs.org/Download/CVS-snapshots/}. -The message-catalog support was written but is badly bit-rotted. XEmacs -20 and 21 did @emph{not} support it, and early releases of XEmacs 22 -will not either. +@node Q1.1.4, Q1.2.1, Q1.1.3, Introduction +@unnumberedsubsec Q1.1.4: Where can I obtain a printed copy of the XEmacs User's Manual? -However, menubar localization @emph{does} work. To enable it, add to -your @file{Emacs} file entries like this: - -@example -Emacs*XlwMenu.resourceLabels: True -Emacs*XlwMenu.file.labelString: Fichier -Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster oeffnen -@end example - -The name of the resource is derived from the non-localized entry by -removing punctuation and capitalizing as above. +Pre-printed manuals are not available. If you are familiar with +TeX, you can generate your own manual from the XEmacs sources. -@node Q1.3.5, Q1.3.6, Q1.3.4, Introduction -@unnumberedsubsec Q1.3.5: Please explain the various input methods in MULE/XEmacs +HTML and Postscript versions of XEmacs manuals are available from the +XEmacs web site at +@uref{http://www.xemacs.org/Documentation/index.html}. -Mule supports a wide variety of input methods. There are three basic -classes: Lisp implementations, generic platform support, and library -interfaces. +@unnumberedsec 1.2: Versions for Different Operating Systems -@emph{Lisp implementations} include Quail, which provides table-driven input -methods for almost all the character sets that Mule supports (including -all of the ISO 8859 family, the Indic languages, Thai, and so on), and -SKK, for Japanese. (SKK also supports an interface to an external -"dictionary server" process.) Quail supports both typical "dead-key" -methods (eg, in the "latin-1-prefix" method, @kbd{" a} produces ä, LATIN -SMALL LETTER A WITH DIAERESIS), and the complex dictionary-based phonetic -methods used for Asian ideographic languages like Chinese. +@node Q1.2.1, Q1.2.2, Q1.1.4, Introduction +@unnumberedsubsec Q1.2.1: Do I need X11 to run XEmacs? -Lisp implementations can be less powerful (but they are not perceptibly -inefficient), and of course are not portable to non-Emacs applications. -The incompatibility can be very annoying. On the other hand, they -require no special platform support or external libraries, so if you can -display the characters, Mule can input them for you and you can edit, -anywhere. +No. The name @dfn{XEmacs} is unfortunate in the sense that it is +@strong{not} an X Window System-only version of Emacs. XEmacs has +full color support on a color-capable character terminal. -@emph{Generic platform support} is currently limited to the X Input -Method (XIM) framework, although support for MSIME (for MS Windows) is -planned, and IIIMF (Sun's Internet-Intranet Input Method Framework) -support is extremely desirable. XIM is enabled at build time by use of -the @samp{--with-xim} flag to @code{configure}. For use of XIM, see -your platform documentation. However, normally the input method you use -is specified via the @samp{LANG} and @samp{XMODIFIERS} environment -variables. +@node Q1.2.2, Q1.2.3, Q1.2.1, Introduction +@unnumberedsubsec Q1.2.2: What versions of Unix does XEmacs run on? -Of course, input skills are portable across most applications. However, -especially in modern GUI systems the habit of using bucky bits has -fallen into sad disuse, and many XIM systems are poorly configured for -use with Emacs. For example, the kinput2 input manager (a separate -process providing an interface between Japanese dictionary servers such -as Canna and Wnn, and the application) tends to gobble up keystrokes -generating Meta characters. This means that to edit while using an XIM -input method, you must toggle the input method off every time you want -to use @kbd{M-f}. Your mileage may vary. +XEmacs is regularly tested on Linux, Solaris, SunOS, HP/UX, FreeBSD, +OpenBSD, BSD/OS aka BSDI, Tru64 aka DEC/OSF, SCO5, and probably +others. It should work on all versions of Unix created in the last 10 +years or so, perhaps with a bit of work on more obscure platforms to +correct bit-rot. It uses a sophisticated configuration system to +auto-detect zillions of features that are implemented differently in +different versions of Unix, so it will probably work on your vendor's +version, possibly with a bit of tweaking, even if we've never heard of +it. -@emph{Library interfaces} are most common for Japanese, although Wnn -supports Chinese (traditional and simplified) and Korean. There are -Chinese and Korean input servers available, but we do not know of any -patches for XEmacs to use them directly. You can use them via -IM-enabled terminals, by manipulating the terminal coding systems. We -describe only the Japanese-oriented systems here. The advantage of -these systems is that they are very powerful, and on platforms where -they are available there is typically a wide range of applications that -support them. Thus your input skills are portable across applications. +For problems with particular machines and versions of Unix, see the +@file{PROBLEMS} file. -Mule provides built-in interfaces to the following input methods: Wnn4, -Wnn6, Canna, and SJ3. These can be configured at build time. There are -patches available (no URL, sorry) to support the SKK server, as well. -Wnn and SJ3 use the @code{egg} user interface. The interface for Canna -is specialized to Canna. +Much effort has gone into making XEmacs work on as many different +machines, configurations, and compilers as possible. -Wnn supports Japanese, Chinese and Korean. It is made by OMRON and Kyôto -University. It is a powerful and complex system. Wnn4 is free and Wnn6 -is not. Wnn uses grammatical hints and probability of word association, -so in principle Wnn can be cleverer than other methods. +Much effort has gone into making XEmacs 64-bit clean. -Canna, made by NEC, supports only Japanese. It is a simple and powerful -system. Canna uses only grammar, but its grammar and dictionary are -quite sophisticated. So for standard modern Japanese, Canna seems -cleverer than Wnn4. In addition, the UNIX version of Canna is free (now -there is a Microsoft Windows version). +Much effort has gone into removing system-specific code, and replacing +such code with autodetection at configure time. -SJ3, by Sony, supports only Japanese. +The XEmacs core should build "out of the box" on most Unix-like systems. -Egg consists of following parts: +XEmacs 21.2 was tested and @samp{make check} succeeded on these Unix +configurations as of 2001-02-10: -@enumerate -@item -Input character Translation System (ITS) layer. -It translates ASCII inputs to Kana/PinYin/Hangul characters. +@example +alphaev56-dec-osf4.0e (both Compaq C and gcc) +i386-unknown-freebsd4.2 +i386-unknown-netbsdelf1.5 +i586-sco-sysv5uw7.0.1 (both SCO's cc and gcc) +i686-pc-linux-gnu +hppa2.0-hp-hpux10.20 (both HP's ANSI cc and gcc) +mips-sgi-irix6.5 (both MIPSpro cc and gcc) +rs6000-ibm-aix4.3.0.0 (both IBM's xlc and gcc) +sparc-sun-solaris2.6 (both Sun's Forte C and gcc) +sparc-sun-solaris2.7 (both Sun's Forte C and gcc) +sparc-sun-sunos4.1.4 (gcc) +@end example -@item -Kana/PinYin/Hangul to Kanji transfer layer. -The interface layer to network Kana-Kanji server (Wnn and Sj3). -@end enumerate +Some systems have a dual mode 32-bit/64-bit compiler. On most of these, +XEmacs requires the @samp{--pdump} (in XEmacs 21.5, +@samp{--enable-pdump}) configure option to build correctly with the +64-bit version of the compiler. -These input methods are modal. They have a raw (alphabet) mode, a -phonetic input mode, and Kana-Kanji transfer mode. However there are -mode-less input methods for Egg and Canna. @samp{boiled-egg} is a -mode-less input method running on Egg. For Canna, @samp{canna.el} has a -tiny boiled-egg-like command, @code{(canna-boil)}, and there are some -boiled-egg-like utilities. +@example +mips-sgi-irix6.5, CC="gcc -mabi=64" +mips-sgi-irix6.5, CC="cc -64" +rs6000-ibm-aix4.3.0.0, CC="cc -q64" +@end example -Much of this information was provided by @email{morioka@@jaist.ac.jp, -MORIOKA Tomohiko}. +On most of these systems, XEmacs also builds with a C++ compiler, +but not "out of the box". This feature is only for use by the +maintainers. -@node Q1.3.6, Q1.3.7, Q1.3.5, Introduction -@unnumberedsubsec Q1.3.6: How do I portably code for MULE/XEmacs? +XEmacs 21.2 is known @emph{not} to work on any machines with m680x0 +processors. Sorry, all you sun3 and Unix PC nostalgia buffs out there. -MULE has evolved rapidly over the last few years, and the original third -party patch (for GNU Emacs 19), GNU Emacs 20+, and XEmacs 20+ have quite -different implementations. The APIs also vary although recent versions -of XEmacs have tended to converge to the GNU Emacs standard. +VMS has never been supported by XEmacs. In fact, all the old VMS code +inherited from Emacs has been removed. Sorry, all you VMS fans out there. -MULE implementations are going to continue to evolve. Both GNU Emacs -and XEmacs are working hard on Unicode support, which will involve new -APIs and probably variations on old ones. For XEmacs 22, the old ISO -2022-based system for recognizing encodings will be replaced by a much -more flexible system, which should improve accuracy of automatic coding -detections, but will also involve new APIs. +@node Q1.2.3, Q1.2.4, Q1.2.2, Introduction +@unnumberedsubsec Q1.2.3: Is there a port of XEmacs to Microsoft Windows? -@email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes: +Yes. Beginning with release 21.0, XEmacs has worked under MS Windows +and is fully-featured and actively developed. A group of dedicated +developers actively maintains and improves the Windows-specific +portions of the code. Some of the core developers, in fact, use +Windows as their only development environment, and some features, such +as printing, actually work better on Windows than native Unix and Mac +OS X. The mailing list at @email{xemacs-winnt@@xemacs.org} is dedicated +to that effort (please use the -request address to +subscribe). (Despite its name, XEmacs actually works on all versions +of Windows.) -@quotation -The application implementor must write separate code for these mule -variants. [Please don't hesitate to report these variants to us; they -are not, strictly speaking, bugs, but they give third-party developers -the same kind of creepy-crawly feeling. We'll do what we can. -- Ed.] +The list name is misleading, as XEmacs supports and has been compiled on +Windows 95, Windows 98, Windows NT, Windows 2000, Windows ME, Windows +XP, and all newer versions of Windows. The MS Windows-specific code is +based on Microsoft Win32 API, and will not work on MS Windows 3.x or on +MS-DOS. -MULE and the next version of Emacs are similar but the symbols are very -different---requiring separate code as well. +XEmacs also supports the Cygwin and MinGW development and runtime +environments, where it also uses native Windows code for graphical +features. In addition, under Cygwin it is possible to compile XEmacs +to use an X server (and XFree86 is available as part of the standard +Cygwin installation). -Namely we must support 3 kinds of mule variants and 4 or 5 or 6 kinds of -emacs variants... (;_;) I'm shocked, so I wrote a wrapper package called -@code{emu} to provide a common interface. [There is an XEmacs package -of APEL which provides much more comprehensive coverage. Be careful, -however; APEL has problems of its own. -- Ed.] +@node Q1.2.4, Q1.2.5, Q1.2.3, Introduction +@unnumberedsubsec Q1.2.4: Can I build XEmacs on MS Windows with X support? Do I need to? -I have the following suggestions about dealing with mule variants: +Yes, you can, but no you do not need to. In fact, we recommend that you +use a native-GUI version unless you have a specific need for an X +version. -@itemize @bullet -@item -@code{(featurep 'mule)} @code{t} on all mule variants +@node Q1.2.5, Q1.2.6, Q1.2.4, Introduction +@unnumberedsubsec Q1.2.5: What are Cygwin and MinGW, and do I need them to run XEmacs? -@item -@code{(boundp 'MULE)} is @code{t} on only MULE. Maybe the next version -of Emacs will not have this symbol. +To answer the second part of the question: No, you, you don't need +Cygwin or MinGW to build or to run XEmacs. But if you have them and +want to use them, XEmacs supports these environments. -@item -MULE has a variable @code{mule-version}. Perhaps the next version of -Emacs will have this variable as well. -@end itemize +(One important reason to support Cygwin is that it lets the MS Windows +developers test out their code in a Unix environment without actually +having to have a Unix machine around. For this reason alone, Cygwin +support is likely to remain supported for a long time in XEmacs. Same +goes for the X support under Cygwin, for the same reasons. MinGW +support, on the other hand, depends on volunteers to keep it up to date; +but this is generally not hard.) -Following is a sample to distinguish mule variants: +Cygwin is a set of tools providing Unix-like API on top of Win32. +It makes it easy to port large Unix programs without significant +changes to their source code. It is a development environment as well +as a runtime environment. -@lisp -(if (featurep 'mule) - (cond ((boundp 'MULE) - ;; for original Mule - ) - ((string-match "XEmacs" emacs-version) - ;; for XEmacs with Mule - ) - (t - ;; for next version of Emacs - )) - ;; for old emacs variants - ) -@end lisp -@end quotation +When built with Cygwin, XEmacs supports all display types -- TTY, X & +Win32 GUI, and can be built with support for all three simultaneously. +If you build with Win32 GUI support then the Cygwin version uses the +majority of the Windows-specific code, which is mostly related to +display. If you want to build with X support you need X libraries (and +an X server to display XEmacs on); see @ref{Q2.3.7}. TTY and Win32 GUI +require no additional libraries beyond what comes standard with Cygwin. -@node Q1.3.7, Q1.3.8, Q1.3.6, Introduction -@unnumberedsubsec Q1.3.7: How about Cyrillic Modes? +The advantages of the Cygwin version are that it integrates well with +the Cygwin environment for existing Cygwin users; uses configure so +building with different features is very easy; and actively supports X & +TTY. Furthermore, the entire Cygwin environment and compiler are free, +whereas Visual C++ costs money. -@email{ilya@@math.ohio-state.edu, Ilya Zakharevich} writes: +The disadvantage is that it requires the whole Cygwin environment, +whereas the native port requires only a suitable MS Windows compiler. +Also, it follows the Unix filesystem and process model very closely +(some will undoubtedly view this as an advantage). -@quotation -There is a cyrillic mode in the file @file{mysetup.zip} in -@iftex -@* -@end iftex -@uref{ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/}. This is a -modification to @email{ava@@math.jhu.ed, Valery Alexeev's} @file{russian.el} -which can be obtained from -@end quotation +See @uref{http://www.cygwin.com/} for more information on +Cygwin. -@uref{http://www.math.uga.edu/~valery/russian.el}. +MinGW is a collection of header files and import libraries that allow +one to use GCC under the Cygwin environment to compile and produce +exactly the same native Win32 programs that you can using Visual C++. +Programs compiled with MinGW make use of the standard Microsoft runtime +library @file{MSVCRT.DLL}, present on all Windows systems, and look, +feel, and act like a standard Visual-C-produced application. (The only +difference is the compiler.) This means that, unlike a +standardly-compiled Cygwin application, no extra runtime support +(e.g. Cygwin's @file{cygwin1.dll}) is required. This, along with the +fact that GCC is free (and works in a nice Unix-y way in a nice Unix-y +environment, for those die-hard Unix hackers out there), is the main +advantage of MinGW. It is also potentially faster than Cygwin because +it has less overhead when calling Windows, but you lose the POSIX +emulation layer, which makes Unix programs harder to port. (But this is +irrelevant for XEmacs since it's already ported to Win32.) -@email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes: +See @uref{http://www.mingw.org/} for more information on MinGW. -@quotation -There is another cyrillic mode for both GNU Emacs and XEmacs by -@email{manin@@camelot.mssm.edu, Dmitrii -(Mitya) Manin} at -@iftex +@node Q1.2.6, Q1.2.7, Q1.2.5, Introduction +@unnumberedsubsec Q1.2.6: What are the differences between the various MS Windows emacsen? -@end iftex -@uref{http://kulichki-lat.rambler.ru/centrolit/manin/cyr.el}. -@c Link above, <URL:http://camelot.mssm.edu/~manin/cyr.el> was dead. -@c Changed to russian host instead -@end quotation +XEmacs, Win-Emacs, DOS Emacs, NT Emacs, this is all very confusing. +Could you briefly explain the differences between them? -@email{rebecca.ore@@op.net, Rebecca Ore} writes: +Here is a recount of various Emacs versions running on MS Windows: -@quotation -The fullest resource I found on Russian language use (in and out of -XEmacs) is @uref{http://www.ibiblio.org/sergei/Software/Software.html} -@end quotation +@itemize @bullet -@node Q1.3.8, Q1.3.9, Q1.3.7, Introduction -@unnumberedsubsec Q1.3.8: Does XEmacs support Unicode? +@item +XEmacs -Partially, as an external encoding for files, processes, and terminals. -It does not yet support Unicode fonts @ref{Q1.3.9, Does XEmacs support -Unicode Fonts?} +@itemize @minus -To get Unicode support, you need a Mule-enabled XEmacs. Install -Mule-UCS from packages in the usual way. Put +@item +Beginning with XEmacs 19.12, XEmacs' architecture was redesigned +in such a way to allow clean support of multiple window systems. At +this time the TTY support was added, making X and TTY the first two +"window systems" supported by XEmacs. The 19.12 design is the basis for +the current native MS Windows code. -@example -(require 'un-define) -(set-coding-priority-list '(utf-8)) -(set-coding-category-system 'utf-8 'utf-8) -@end example +@item +Some time during 1997, David Hobley (soon joined by Marc Paquette) +imported some of the NT-specific portions of GNU Emacs, making XEmacs +with X support compile under Windows NT, and creating the "X" port. -in your init file to enable the UTF-8 coding system. You may wish to -view the documentation of @code{set-coding-priority-list} if you find -that files that are not UTF-8 are being mis-recognized as UTF-8. +@item +Several months later, Jonathan Harris sent out initial patches to use +the Win32 API, thus creating the native port. Since then, various +people have contributed, including Kirill M. Katsnelson (contributed +support for menubars, subprocesses and network, as well as loads of +other code), Andy Piper (ported XEmacs to Cygwin environment, +contributed Windows unexec, Windows-specific glyphs and toolbars code, +and more), Ben Wing (loads of improvements; primary MS Windows developer +since 2000), Jeff Sparkes (contributed scrollbars support) and many +others. +@end itemize -Install standard national fonts (not Unicode fonts) for all -character sets you use. See @ref{Q1.3.9}. +@item +NT Emacs -Mule-UCS also supports 16-bit forms of Unicode (UTF-16). It does not -support 31-bit forms of Unicode (UTF-32 or UCS-4). +@itemize @minus -@node Q1.3.9, Q1.4.1, Q1.3.8, Introduction -@unnumberedsubsec Q1.3.9: How does XEmacs display Unicode? +@item +NT Emacs was an early version of GNU Emacs 19 modified to compile and +run under MS Windows 95 and NT using the native Win32 API. It was +written by Geoff Voelker, and has long since been incorporated into +the mainline GNU Emacs distribution. +@end itemize -Mule doesn't have a Unicode charset internally, so there's nothing to -bind a Unicode registry to. It would not be straightforward to create, -either, because Unicode is not ISO 2022-compatible. You'd have to -translate it to multiple 96x96 pages. +@item +Win-Emacs -This means that Mule-UCS uses ordinary national fonts for display. This -is not really a problem, except for those languages that use the Unified -Han characters. The problem here is that Mule-UCS maps from Unicode -code points to national character sets in a deterministic way. By -default, this means that Japanese fonts are tried first, then Chinese, -then Korean. To change the priority ordering, use the command -`un-define-change-charset-order'. +@itemize @minus -It also means you can't use Unicode fonts directly, at least not without -extreme hackery. You can run -nw with (set-terminal-coding-system -'utf-8) if you really want a Unicode font for some reason. +@item +Win-Emacs was a port of Lucid Emacs 19.6 to MS Windows using X +compatibility libraries. Win-Emacs was written by Ben Wing. The MS +Windows code never made it back to Lucid Emacs, and its creator (Pearl +Software) has long since gone out of business. +@end itemize -Real Unicode support will be introduced in XEmacs 22.0. +@item +GNU Emacs for DOS + +@itemize @minus + +@item +GNU Emacs features support for MS-DOS and DJGPP (D.J. Delorie's DOS +port of GCC). Such an Emacs is heavily underfeatured, because it does +not support long file names, lacks proper subprocesses support, and +is far too big compared with typical DOS editors. +@end itemize + +@item +GNU Emacs compiled with Win32 + +@itemize @minus + +@item +Starting with GNU Emacs 19.30, it has been possible to compile GNU Emacs +under MS Windows using the DJGPP compiler and X libraries. The result +is very similar to GNU Emacs compiled under MS DOS, only it works +somewhat better because it runs in 32-bit mode, makes use of all the +system memory, supports long file names, etc. +@end itemize + +@end itemize + +@node Q1.2.7, Q1.2.8, Q1.2.6, Introduction +@unnumberedsubsec Q1.2.7: How does the port cope with differences in the Windows user interface? + +The XEmacs (and Emacs in general) user interface is pretty different +from what is expected of a typical MS Windows program. How does the MS +Windows port cope with it? + +As a general rule, we follow native MS Windows conventions as much as +possible. 21.4 is a fairly complete Windows application, supporting +native printing, system file dialog boxes, tool tips, etc. In cases +where there's a clear UI conflict, we currently use normal Unix XEmacs +behavior by default, but make sure the MS Windows "look and feel" (mark +via shift-arrow, self-inserting deletes region, Alt selects menu items, +etc.) is easily configurable (respectively: using the variable +@code{shifted-motion-keys-select-region} in 21.4 and above [it's in fact +the default in these versions], or the @file{pc-select} package; using +the @file{pending-del} package; and setting the variable +@code{menu-accelerator-enabled} to @code{menu-force} in 21.4 and above). +In fact, if you use the sample @file{init.el} file as your init file, +you will get all these behaviors automatically turned on. + +In future versions, some of these features might be turned on by +default in the MS Windows environment. + +@node Q1.2.8, Q1.2.9, Q1.2.7, Introduction +@unnumberedsubsec Q1.2.8: Is there a port of XEmacs to the Macintosh? + +Yes. + +XEmacs 21.5 (perhaps 21.4 also?) works on MacOS X, although it certainly +will not feel very much like a Mac application as it has no Mac-specific +code in it. + +There is also a port of XEmacs 19.14 that works on all recent versions +of MacOS, from 8.1 through MacOS X, by @email{pjarvis@@ispchannel.com, +Pitts Jarvis} (recently deceased). It runs in an equivalent of TTY +mode only (one single Macintosh window, 25 colors), but has a large +number of Mac-specific additions. It's available at +@uref{http://homepage.mac.com/pjarvis/xemacs.html}. + +@node Q1.2.9, Q1.2.10, Q1.2.8, Introduction +@unnumberedsubsec Q1.2.9: Is there a port of XEmacs to MS-DOS? + +No. We have never supported running on MS-DOS or Windows 3.1, and in +fact have long since deleted all MS-DOS-related code. We're not +particularly interested in patches for these platforms, as they would +introduce huge amounts of code clutter due to the woefully +underfeatured nature of these systems. (See GNU Emacs for a port to +MS-DOS.) + +@node Q1.2.10, Q1.2.11, Q1.2.9, Introduction +@unnumberedsubsec Q1.2.10: Is there a port of XEmacs to OS/2? + +No, but Alexander Nikolaev <avn_1251@@mail.ru> was at one point +working on it. + +@node Q1.2.11, Q1.2.12, Q1.2.10, Introduction +@unnumberedsubsec Q1.2.11: Is there a port of XEmacs to NextStep? + +Carl Edman, apparently no longer at @email{cedman@@princeton.edu}, did +the port of GNU Emacs to NeXTstep and expressed interest in doing the +XEmacs port, but never went any farther. -@node Q1.4.1, Q1.4.2, Q1.3.9, Introduction -@unnumberedsec 1.4: Getting Started, Backing up & Recovery -@unnumberedsubsec Q1.4.1: What is an @file{init.el} or @file{.emacs} and is there a sample one? +@node Q1.2.12, Q1.3.1, Q1.2.11, Introduction +@unnumberedsubsec Q1.2.12: Is there a port of XEmacs to VMS? + +VMS has never been supported by XEmacs. In fact, all the old VMS code +inherited from GNU Emacs has been removed. Sorry, all you VMS fans +out there. + +@unnumberedsec 1.3: Getting Started + +@node Q1.3.1, Q1.3.2, Q1.2.12, Introduction +@unnumberedsubsec Q1.3.1: What is an @file{init.el} or @file{.emacs} and is there a sample one? The @file{init.el} or @file{.emacs} file is used to customize XEmacs to your tastes. Starting in 21.4, the preferred location for the init file @@ -1244,18 +1410,32 @@ various versions. Recently, look under the @samp{Samples} submenu.) To determine the location of the @file{etc/} directory type the command @kbd{C-h v data-directory @key{RET}}. -@node Q1.4.2, Q1.4.3, Q1.4.1, Introduction -@unnumberedsubsec Q1.4.2: Can I use the same @file{init.el}/@file{.emacs} with the other Emacs? +@node Q1.3.2, Q1.3.3, Q1.3.1, Introduction +@unnumberedsubsec Q1.3.2: Where do I put my @file{init.el} file? + +@file{init.el} is the name of the init file starting with 21.4, and is +located in the subdirectory @file{.xemacs/} of your home directory. In +prior versions, the init file is called @file{.emacs} and is located in +your home directory. + +Your home directory under Windows is determined by the @samp{HOME} +environment variable. If this is not set, it defaults to @samp{C:\}. +To set this variable, modify @file{AUTOEXEC.BAT} under Windows 95/98, or +select @samp{Control Panel->System->Advanced->Environment Variables...} +under Windows NT/2000. + +@node Q1.3.3, Q1.3.4, Q1.3.2, Introduction +@unnumberedsubsec Q1.3.3: Can I use the same @file{init.el} with the other Emacs? -Yes. The sample @file{init.el}/@file{.emacs} included in the XEmacs +Yes. The sample @file{init.el} included in the XEmacs distribution will show you how to handle different versions and flavors of Emacs. -@node Q1.4.3, Q1.4.4, Q1.4.2, Introduction -@unnumberedsubsec Q1.4.3: Any good tutorials around? +@node Q1.3.4, Q1.3.5, Q1.3.3, Introduction +@unnumberedsubsec Q1.3.4: Any good XEmacs tutorials around? There's the XEmacs tutorial available from the Help Menu under -@samp{Basics->Tutorials}, or by typing @kbd{C-h t}. To check whether +@samp{Help->Tutorials}, or by typing @kbd{C-h t}. To check whether it's available in a non-english language, type @kbd{C-u C-h t TAB}, type the first letters of your preferred language, then type @key{RET}. @@ -1272,8 +1452,8 @@ the first letters of your preferred language, then type @key{RET}. @comment @end iftex @comment @uref{http://petaxp.rug.ac.be/~erik/xemacs/}. -@node Q1.4.4, Q1.4.5, Q1.4.3, Introduction -@unnumberedsubsec Q1.4.4: May I see an example of a useful XEmacs Lisp function? +@node Q1.3.5, Q1.3.6, Q1.3.4, Introduction +@unnumberedsubsec Q1.3.5: May I see an example of a useful XEmacs Lisp function? The following function does a little bit of everything useful. It does something with the prefix argument, it examines the text around the @@ -1307,8 +1487,8 @@ this will tell you that the @code{*} requires a writable buffer, and @code{p} converts the prefix argument to a number, and @code{interactive} allows you to execute the command with @kbd{M-x}. -@node Q1.4.5, Q1.4.6, Q1.4.4, Introduction -@unnumberedsubsec Q1.4.5: And how do I bind it to a key? +@node Q1.3.6, Q1.3.7, Q1.3.5, Introduction +@unnumberedsubsec Q1.3.6: And how do I bind it to a key? To bind to a key do: @@ -1318,8 +1498,8 @@ To bind to a key do: Or interactively, @kbd{M-x global-set-key} and follow the prompts. -@node Q1.4.6, , Q1.4.5, Introduction -@unnumberedsubsec Q1.4.6: What's the difference between a macro and a function? +@node Q1.3.7, Q1.3.8, Q1.3.6, Introduction +@unnumberedsubsec Q1.3.7: What's the difference between a macro and a function? Quoting from the Lisp Reference (a.k.a @dfn{Lispref}) Manual: @@ -1338,3725 +1518,4116 @@ Do not confuse the two terms with @dfn{keyboard macros}, which are another matter, entirely. A keyboard macro is a key bound to several other keys. Refer to manual for details. -@node Installation, Customization, Introduction, Top -@unnumbered 2 Installation and Trouble Shooting - -This is part 2 of the XEmacs Frequently Asked Questions list. This -section is devoted to Installation, Maintenance and Trouble Shooting. +@node Q1.3.8, Q1.4.1, Q1.3.7, Introduction +@unnumberedsubsec Q1.3.8: What is @code{Custom}? -@menu -Installation: -* Q2.0.1:: Running XEmacs without installing. -* Q2.0.2:: XEmacs is too big. -* Q2.0.3:: Compiling XEmacs with Netaudio. -* Q2.0.4:: Problems with Linux and ncurses. -* Q2.0.5:: Do I need X11 to run XEmacs? -* Q2.0.6:: I'm having strange crashes. What do I do? -* Q2.0.7:: Libraries in non-standard locations. -* Q2.0.8:: can't resolve symbol _h_errno -* Q2.0.9:: Where do I find external libraries? -* Q2.0.10:: After I run configure I find a coredump, is something wrong? -* Q2.0.11:: XEmacs can't resolve host names. -* Q2.0.12:: Why can't I strip XEmacs? -* Q2.0.13:: I don't need no steenkin' packages. Do I? -* Q2.0.14:: I don't want to install a million .els one at a time! -* Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW) -* Q2.0.16:: Cygwin XEmacs won't start: cygXpm-noX4.dll was not found (NEW) - -Trouble Shooting: -* Q2.1.1:: XEmacs just crashed on me! -* Q2.1.2:: Cryptic Minibuffer messages. -* Q2.1.3:: Translation Table Syntax messages at Startup. -* Q2.1.4:: Startup warnings about deducing proper fonts? -* Q2.1.5:: XEmacs cannot connect to my X Terminal. -* Q2.1.6:: XEmacs just locked up my Linux X server. -* Q2.1.7:: HP Alt key as Meta. -* Q2.1.8:: got (wrong-type-argument color-instance-p nil)! -* Q2.1.9:: XEmacs causes my OpenWindows 3.0 server to crash. -* Q2.1.10:: Warnings from incorrect key modifiers. -* Q2.1.11:: Can't instantiate image error... in toolbar -* Q2.1.12:: Regular Expression Problems on DEC OSF1. -* Q2.1.13:: HP/UX 10.10 and @code{create_process} failure -* Q2.1.14:: @kbd{C-g} doesn't work for me. Is it broken? -* Q2.1.15:: How to debug an XEmacs problem with a debugger. -* Q2.1.16:: XEmacs crashes in @code{strcat} on HP/UX 10. -* Q2.1.17:: @samp{Marker does not point anywhere}. -* Q2.1.18:: XEmacs is outputting lots of X errors. -* Q2.1.19:: XEmacs does not follow the local timezone. -* Q2.1.20:: @samp{Symbol's function definition is void: hkey-help-show.} -* Q2.1.21:: [This question intentionally left blank] -* Q2.1.22:: XEmacs seems to take a really long time to do some things. -* Q2.1.23:: Movemail on Linux does not work for XEmacs 19.15 and later. -* Q2.1.24:: XEmacs won't start without network. -* Q2.1.25:: After upgrading, XEmacs won't do `foo' any more! -@end menu +@code{Custom} is a system for customizing XEmacs options. -@node Q2.0.1, Q2.0.2, Installation, Installation -@unnumberedsec 2.0: Installation -@unnumberedsubsec Q2.0.1: Running XEmacs without installing +You can access @code{Advanced (Customize)} from the @code{Options} menu +or invoking one of customize commands by typing eg. +@kbd{M-x customize}, @kbd{M-x customize-face}, +@kbd{M-x customize-variable} or @kbd{M-x customize-apropos}. -How can I just try XEmacs without installing it? +There is also new @samp{browser} mode for Customize. +Try it out with @kbd{M-x customize-browse} -XEmacs will run in place without requiring installation and copying of -the Lisp directories, and without having to specify a special build-time -flag. It's the copying of the Lisp directories that requires so much -space. XEmacs is largely written in Lisp. +@unnumberedsec 1.4: Getting Help -A good method is to make a shell alias for xemacs: +@node Q1.4.1, Q1.4.2, Q1.3.8, Introduction +@unnumberedsubsec Q1.4.1: Where can I get help? -@example -alias xemacs=/i/xemacs-20.2/src/xemacs -@end example +Probably the easiest way, if everything is installed, is to use Info, by +pressing @kbd{C-h i}, or looking for an Info item on the +Help Menu. @kbd{M-x apropos} can be used to look for particular commands. -(You will obviously use whatever directory you downloaded the source -tree to instead of @file{/i/xemacs-20.2}). +For items not found in the manual, try reading this FAQ +and reading the Usenet group comp.emacs.xemacs. -This will let you run XEmacs without massive copying. +If you choose to post to a newsgroup, @strong{please use +comp.emacs.xemacs}. Please do not post XEmacs related questions to +gnu.emacs.help. -@node Q2.0.2, Q2.0.3, Q2.0.1, Installation -@unnumberedsubsec Q2.0.2: XEmacs is too big +If you cannot post or read Usenet news, there is a corresponding mailing +list @email{xemacs-news@@xemacs.org} which is available. It can be +subscribed to via the Mailman Web interface or by sending mail to to +@email{xemacs-news-request@@xemacs.org} with @samp{subscribe} in the +body of the message. See also +@uref{http://www.xemacs.org/Lists/#xemacs-news}. To cancel a +subscription, you may use the @email{xemacs-news-request@@xemacs.org} +address or the Web interface. Send a message with a subject of +@samp{unsubscribe} to be removed. -The space required by the installation directories can be -reduced dramatically if desired. Gzip all the .el files. Remove all -the packages you'll never want to use. Remove the TexInfo manuals. -Remove the Info (and use just hardcopy versions of the manual). Remove -most of the stuff in etc. Remove or gzip all the source code. Gzip or -remove the C source code. Configure it so that copies are not made of -the support lisp. +@node Q1.4.2, Q1.4.3, Q1.4.1, Introduction +@unnumberedsubsec Q1.4.2: Which mailing lists are there? + +For complete, up-to-date info on the lists and how to subscribe, see +@uref{http://www.xemacs.org/Lists/}. + +@table @samp + +@item comp.emacs.xemacs +is a Usenet newsgroup +for XEmacs users to discuss problems and issues that arise +for them. It's not generally an appropriate place to ask +about apparent bugs (use @samp{xemacs-beta}), or future plans +(use @samp{xemacs-design}). + +@item xemacs-announce +is a read-only, low +volume list for announcements concerning the XEmacs project +and new releases of the XEmacs software. + +@item xemacs-beta +is an open list for bug reports about beta versions of XEmacs. This +includes the bug reports themselves, by both users and developers, as +well as queries, follow-ups, and discussions further determining their +nature and status. This is the primary channel for this kind of +discussion; related code changes will usually not be applied until +they have been discussed here. When such discussions touch on +significant changes to the code (in particular, structural changes), +or on changes to API's or external functionality, they should be moved +to @samp{xemacs-design}. Requests and proposals for non-bug-related +changes do not belong on @samp{xemacs-beta}, and should be sent to +@samp{xemacs-design} instead. + +@item xemacs-beta-ja +is an open list for bug +reports and design discussion related to Mule features, +including Japanese handling, in beta versions of XEmacs. +Japanese is the preferred language of discussion. For most +timely presentation to reviewers, please consider sending +appropriate discussion to @samp{xemacs-mule} or +@samp{xemacs-design} in English when convenient for +the participants in discussion. When possible, bug reports +not related to Mule (including Japanese) should be reported on +@samp{xemacs-beta} in English. + +@item xemacs-buildreports +is an open list for +submission of build-reports on beta versions of XEmacs. For +information on what the build-reports should contain, please +see the `etc/BETA' file which is included in each beta +distribution. -These are all Emacs Lisp source code and bytecompiled object code. You -may safely gzip everything named *.el here. You may remove any package -you don't use. @emph{Nothing bad will happen if you delete a package -that you do not use}. You must be sure you do not use it though, so be -conservative at first. +@item xemacs-cvs +is a read-only list for notices +and information on what has been committed to the XEmacs CVS +trees, by whom, and for what. + +@item xemacs-design +is an open list for +discussing the design of XEmacs. This includes discussion +about planned and ongoing changes to functionality and API +changes and additions as well as requests for them. This is +the primary channel for this kind of discussion; related code +changes will usually not be applied until they have been +discussed here. This does not include bug reports, which go +to @samp{xemacs-beta}. + +@item xemacs-mule +is an open mailing list for +discussion of International extensions to XEmacs including +Mule, XIM, I18n issues, etc, and is not confined to +developmental issues. This list is not restricted to +English, postings in all languages are welcome. + +@item xemacs-news +is an open list for discussion +and bug reporting for XEmacs. This mailing list is +bi-directionally gatewayed with the USENET newsgroup +comp.emacs.xemacs. + +@item xemacs-nt +is a developers-only mailing +list and is intended for people who wish to work actively on +the porting of XEmacs to Microsoft Windows NT and Microsoft +Windows '95. + +@item xemacs-patches +is an open, moderated +list for submission of patches to the XEmacs distribution +and its packages. Anyone may subscribe or submit to +xemacs-patches, but all submissions are reviewed by the list +moderator before they are distributed to the +list. Discussion is not appropriate on xemacs-patches. + +@item xemacs-users-ja +is an open list for +discussion and bug reporting for XEmacs. Japanese is the +preferred language of discussion. It is not gated to +comp.emacs.xemacs or the @samp{xemacs} list. For +fastest response, bugs not specifically related to Japanese +or Mule features should be reported on +@samp{xemacs-beta} (in English). + +@item xemacs-users-ru +is an open list for +discussion and bug reporting for XEmacs. Russian is the +preferred language of discussion. It is not gated to +comp.emacs.xemacs or the @samp{xemacs} list. For +fastest response, bugs not specifically related to Russian +or Mule features should be reported on +@samp{xemacs-beta} (in English). +@end table -Any package with the possible exceptions of xemacs-base, and EFS are -candidates for removal. Ask yourself, @emph{Do I ever want to use this -package?} If the answer is no, then it is a candidate for removal. +@node Q1.4.3, Q1.4.4, Q1.4.2, Introduction +@unnumberedsubsec Q1.4.3: Where are the mailing lists archived? -First, gzip all the .el files. Then go about package by package and -start gzipping the .elc files. Then run XEmacs and do whatever it is -you normally do. If nothing bad happens, then remove the package. You -can remove a package via the PUI interface -(@code{M-x pui-list-packages}, then press @kbd{d} to mark the packages -you wish to delete, and then @kbd{x} to delete them. +The archives can be found at @uref{http://list-archive.xemacs.org} -Another method is to do @code{M-x package-get-delete-package}. +@node Q1.4.4, Q1.4.5, Q1.4.3, Introduction +@unnumberedsubsec Q1.4.4: How can I get two instances of info? -@node Q2.0.3, Q2.0.4, Q2.0.2, Installation -@unnumberedsubsec Q2.0.3: Compiling XEmacs with Netaudio. +Before 21.4, you can't. The @code{info} package does not provide for +multiple info buffers. In 21.4, this should be fixed. #### how? -What is the best way to compile XEmacs with the netaudio system, since I -have got the netaudio system compiled but installed at a weird place, I -am not root. Also in the READMEs it does not say anything about -compiling with the audioserver? +@node Q1.4.5, Q1.5.1, Q1.4.4, Introduction +@unnumberedsubsec Q1.4.5: How do I add new Info directories? -You should only need to add some stuff to the configure command line. -To tell it to compile in netaudio support: @samp{--with-sound=both}, or -@samp{--with-sound=nas} if you don't want native sound support for some -reason.) To tell it where to find the netaudio includes and libraries: +You use something like: -@example ---site-libraries=WHATEVER ---site-includes=WHATEVER -@end example +@lisp +(setq Info-directory-list (cons + (expand-file-name "~/info") + Info-default-directory-list)) +@end lisp -Then (fingers crossed) it should compile and it will use netaudio if you -have a server running corresponding to the X server. The netaudio server -has to be there when XEmacs starts. If the netaudio server goes away and -another is run, XEmacs should cope (fingers crossed, error handling in -netaudio isn't perfect). +@email{davidm@@prism.kla.com, David Masterson} writes: -BTW, netaudio has been renamed as it has a name clash with something -else, so if you see references to NAS or Network Audio System, it's the -same thing. It also might be found at -@uref{ftp://ftp.x.org/contrib/audio/nas/}. +@quotation +Emacs Info and XEmacs Info do many things differently. If you're trying to +support a number of versions of Emacs, here are some notes to remember: -@node Q2.0.4, Q2.0.5, Q2.0.3, Installation -@unnumberedsubsec Q2.0.4: Problems with Linux and ncurses. +@enumerate +@item +Emacs Info scans @code{Info-directory-list} from right-to-left while +XEmacs Info reads it from left-to-right, so append to the @emph{correct} +end of the list. -On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with libc -5.2.18, XEmacs 20.0b20 is unable to open a tty device: +@item +Use @code{Info-default-directory-list} to initialize +@code{Info-directory-list} @emph{if} it is available at startup, but not +all Emacsen define it. -@example -src/xemacs -nw -q -Initialization error: -@iftex -@* -@end iftex -Terminal type `xterm' undefined (or can't access database?) -@end example +@item +Emacs Info looks for a standard @file{dir} file in each of the +directories scanned from #1 and magically concatenates them together. -@email{ben@@xemacs.org, Ben Wing} writes: +@item +XEmacs Info looks for a @file{localdir} file (which consists of just the +menu entries from a @file{dir} file) in each of the directories scanned +from #1 (except the first), does a simple concatenation of them, and +magically attaches the resulting list to the end of the menu in the +@file{dir} file in the first directory. +@end enumerate -@quotation -Your ncurses configuration is messed up. Your /usr/lib/terminfo is a -bad pointer, perhaps to a CD-ROM that is not inserted. +Another alternative is to convert the documentation to HTML with +texi2html and read it from a web browser like Lynx or W3. @end quotation -@node Q2.0.5, Q2.0.6, Q2.0.4, Installation -@unnumberedsubsec Q2.0.5: Do I need X11 to run XEmacs? - -No. The name @dfn{XEmacs} is unfortunate in the sense that it is -@strong{not} an X Window System-only version of Emacs. XEmacs has -full color support on a color-capable character terminal. - -@node Q2.0.6, Q2.0.7, Q2.0.5, Installation -@unnumberedsubsec Q2.0.6: I'm having strange crashes. What do I do? - -There have been a variety of reports of crashes due to compilers with -buggy optimizers. Please see the @file{PROBLEMS} file that comes with -XEmacs to read what it says about your platform. +@unnumberedsec 1.5: Contributing to XEmacs -If you compiled XEmacs using @samp{--use-union-type} (or the option -@samp{USE_UNION_TYPE} in @file{config.inc} under Windows), try -recompiling again without it. The union type has been known to trigger -compiler errors in a number of cases. +@node Q1.5.1, Q1.5.2, Q1.4.5, Introduction +@unnumberedsubsec Q1.5.1: How do I submit changes to the FAQ? -@node Q2.0.7, Q2.0.8, Q2.0.6, Installation -@unnumberedsubsec Q2.0.7: Libraries in non-standard locations +The FAQ is actively maintained and modified regularly. All links should +be up to date. Unfortunately, some of the information is out of date -- +a situation which the FAQ maintainer is working on. All submissions are +welcome, please e-mail submissions to @email{faq@@xemacs.org, XEmacs FAQ +maintainers}. -I have x-faces, jpeg, xpm etc. all in different places. I've tried -space-separated, comma-separated, several --site-libraries, all to no -avail. +Please make sure that @samp{XEmacs FAQ} appears on the Subject: line. +If you think you have a better way of answering a question, or think a +question should be included, we'd like to hear about it. Questions and +answers included into the FAQ will be edited for spelling and grammar +and will be attributed. Answers appearing without attribution are +either from versions of the FAQ dated before May 1996 or are from +previous FAQ maintainers. Answers quoted from Usenet news articles will +always be attributed, regardless of the author. -@example ---site-libraries='/path/one /path/two /path/etc' -@end example +@node Q1.5.2, Q1.5.3, Q1.5.1, Introduction +@unnumberedsubsec Q1.5.2: How do I become a beta tester? -@node Q2.0.8, Q2.0.9, Q2.0.7, Installation -@unnumberedsubsec Q2.0.8: can't resolve symbol _h_errno +Send an email message to @email{xemacs-beta-request@@xemacs.org} with +the line @samp{subscribe} in the body of the message. -You are using the Linux/ELF distribution of XEmacs 19.14, and your ELF -libraries are out of date. You have the following options: +Be prepared to get your hands dirty, as beta testers are expected to +identify problems as best they can. -@enumerate -@item -Upgrade your libc to at least 5.2.16 (better is 5.2.18, 5.3.12, or -5.4.10). +@node Q1.5.3, Q1.5.4, Q1.5.2, Introduction +@unnumberedsubsec Q1.5.3: How do I contribute to XEmacs itself? -@item -Patch the XEmacs binary by replacing all occurrences of -@samp{_h_errno^@@} with -@iftex -@* -@end iftex -@samp{h_errno^@@^@@}. Any version of Emacs will -suffice. If you don't understand how to do this, don't do it. +It depends on the knowledge and time you possess. If you are able, by +all means become a beta tester (@pxref{Q1.5.2}). If you are a +programmer, try to build XEmacs and see if you can improve it. -@item -Rebuild XEmacs yourself---any working ELF version of libc should be -O.K. -@end enumerate +Otherwise, you can still help by using XEmacs as your everyday editor +(for pre-built binary versions, @pxref{Q1.1.2}) and reporting bugs you +find to the mailing list. -@email{hniksic@@xemacs.org, Hrvoje Niksic} writes: +Another area where we need help is the documentation: We need good +documentation for building XEmacs and for using it. This FAQ is a +small step in that direction. -@quotation -Why not use a Perl one-liner for No. 2? +Ben Wing @email{ben@@xemacs.org} writes: -@example -perl -pi -e 's/_h_errno\0/h_errno\0\0/g' \ -/usr/local/bin/xemacs-19.14 -@end example +@quotation +BTW if you have a wish list of things that you want added, you have to +speak up about it! More specifically, you can do the following if you +want a feature added (in increasing order of usefulness): -NB: You @emph{must} patch @file{/usr/local/bin/xemacs-19.14}, and not -@file{xemacs} because @file{xemacs} is a link to @file{xemacs-19.14}; -the Perl @samp{-i} option will cause unwanted side-effects if applied to -a symbolic link. -@end quotation +@itemize @bullet +@item +Make a posting about a feature you want added. -@email{steve@@xemacs.org, SL Baur} writes: +@item +Become a beta tester and make more postings about those same features. -@quotation -If you build against a recent libc-5.4 (late enough to have caused -problems earlier in the beta cycle) and then run with an earlier version -of libc, you get a +@item +Convince us that you're going to use the features in some cool and +useful way. -@example -$ xemacs -xemacs: can't resolve symbol '__malloc_hook' -zsh: 7942 segmentation fault (core dumped) xemacs -@end example +@item +Come up with a clear and well-thought-out API concerning the features. -(Example binary compiled against libc-5.4.23 and run with libc-5.4.16). +@item +Write the code to implement a feature and send us a patch. +@end itemize -The solution is to upgrade to at least libc-5.4.23. Sigh. Drat. +(not that we're necessarily requiring you to write the code, but we can +always hope :) @end quotation -@node Q2.0.9, Q2.0.10, Q2.0.8, Installation -@unnumberedsubsec Q2.0.9: Where do I find external libraries? +@node Q1.5.4, Q1.5.5, Q1.5.3, Introduction +@unnumberedsubsec Q1.5.4: How do I get started developing XEmacs? -All external libraries used by XEmacs can be found at the XEmacs FTP -site -@iftex -@* -@end iftex -@uref{ftp://ftp.xemacs.org/pub/xemacs/aux/}. -[These tarballs and this FAQ are wa-a-ay out of date. Sorry, I'm not -currently network-capable, and I will probably forgot to update this -before submitting the patch. -- Ed.] +First, get yourself set up under CVS so that you can access the CVS +repositories containing the XEmacs sources and the XEmacs packages. -@c Changed June Link above, <URL:ftp://ftp.xemacs.org/pub/aux/> was dead. -@c This list is a pain in the you-know-what to keep in synch with the -@c world. -The canonical locations (at the time of this writing) are as follows: +Next, set up your layout. This is important, as a good layout will +facilitate getting things done efficiently, while a bad layout will could +lead to disaster, as you can't figure out which code is the most recent, +which can be thrown away, etc. We suggest the following layout: (feel free +to make changes) -@table @asis -@item JPEG -@uref{ftp://ftp.uu.net/graphics/jpeg/}. Version 6a is current. -@c Check from host with legal IP address -@item XPM -@uref{ftp://ftp.x.org/contrib/libraries/}. Version 3.4j is current. -Older versions of this package are known to cause XEmacs crashes. - -@item TIFF -@uref{ftp://ftp.sgi.com/graphics/tiff/}. v3.4 is current. The latest -beta is v3.4b035. There is a HOWTO here. - -@item PNG -@uref{ftp://ftp.uu.net/graphics/png/}. 0.89c is current. XEmacs -requires a fairly recent version to avoid using temporary files. -@c Check from host with legal IP address - -@uref{ftp://swrinde.nde.swri.edu/pub/png/src/} - -@item Compface -@uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/}. This library has -been frozen for about 6 years, and is distributed without version -numbers. @emph{It should be compiled with the same options that X11 was -compiled with on your system}. The version of this library at -XEmacs.org includes the @file{xbm2xface.pl} script, written by -@email{stig@@hackvan.com}, which may be useful when generating your own xface. - -@item NAS -@uref{ftp://ftp.x.org/contrib/audio/nas/}. -Version 1.2p5 is current. There is a FAQ here. -@end table +@itemize @bullet +@item +Everything goes under @file{/src/xemacs} (use a different directory if +you want). From now, instead of saying @file{/src/xemacs}, we use +@file{<xsrc-top>}, to make it easier in case someone picked a +different directory. + +@item +Package source is in @file{<xsrc-top>/package-src}. -@node Q2.0.10, Q2.0.11, Q2.0.9, Installation -@unnumberedsubsec Q2.0.10: After I run configure I find a core dump, is something wrong? +@item +Installed packages go under @file{<xsrc-top>/xemacs-packages}, and +@file{<xsrc-top>/mule-packages}. -Not necessarily. If you have GNU sed 3.0 you should downgrade it to -2.05. From the @file{README} at prep.ai.mit.edu: +@item +A "workspace" is a complete copy of the sources, in which you do work of +a particular kind. Workspaces can be differentiated by which branch of +the source tree they extend off of -- usually either the stable or +experimental, unless other branches have been created (for example, Ben +created a branch for his Mule work because (1) the project was long-term +and involved an enormous number of changes, (2) people wanted to be able +to look at what his work in progress, and (3) he wanted to be able to +check things in and in general use source-code control, since it was a +long-term project). Workspaces are also differentiated in what their +purpose is -- general working workspace, workspace for particular +projects, workspace keeping the latest copy of the code in one of the +branches without mods, etc. -@quotation -sed 3.0 has been withdrawn from distribution. It has major revisions, -which mostly seem to be improvements; but it turns out to have bugs too -which cause trouble in some common cases. +@item +Various workspaces are subdirectories under @file{<xsrc-top>}, e.g.: -Tom Lord won't be able to work fixing the bugs until May. So in the -mean time, we've decided to withdraw sed 3.0 from distribution and make -version 2.05 once again the recommended version. -@end quotation +@itemize @bullet +@item +@file{<xsrc-top>/working} (the workspace you're actively working on, +periodically synched up with the latest trunk) -It has also been observed that the vfork test on Solaris will leave a -core dump. +@item +@file{<xsrc-top>/stable} (for making changes to the stable version of +XEmacs, which sits on a branch) -@node Q2.0.11, Q2.0.12, Q2.0.10, Installation -@unnumberedsubsec Q2.0.11: XEmacs doesn't resolve hostnames. +@item +@file{<xsrc-top>/unsigned-removal} (a workspace for a specific, difficult +task that's going to affect lots of source and take a long time, and +so best done in its own workspace without the interference of other +work you're doing. Also, you can commit just this one large change, +separate from all the other changes). -This is the result of a long-standing problem with SunOS and the fact -that stock SunOS systems do not ship with DNS resolver code in libc. +@item +@file{<xsrc-top>/latest} (a copy of the latest sources on the trunk, +i.e. the experimental version of XEmacs, with no patches in it; +either update it periodically, by hand, or set up a cron job to do it +automatically). Set it up so it can be built, and build it so you +have a working XEmacs. (Building it might also go into the cron job.) -@email{ckd@@loiosh.kei.com, Christopher Davis} writes: +This workspace serves a number of purposes: +@enumerate +@item +You always have a recent version of XEmacs you can compare +against when something you're working on breaks. It's true +that you can do this with cvs diff, but when you need to do +some serious investigation, this method just fails. +@item +You (almost) always have a working, up-to-date executable that +can be used when your executable is crashing and you need to +keep developing it, or when you need an `xemacs' to build +packages, etc. +@item +When creating new workspaces, you can just copy the `latest' +workspace using GNU @code{cp -a}. You have all the .elc's built, +everything else probably configured, any spare files in place +(e.g. some annoying xpm.dll under Windows, etc.). +@end enumerate -@quotation -That's correct [The SunOS 4.1.3 precompiled binaries don't do name -lookup]. Since Sun figured that everyone used NIS to do name lookups -(that DNS thing was apparently only a passing fad, right?), the stock -SunOS 4.x systems don't have DNS-based name lookups in libc. +@item +@file{<xsrc-top>/latest-stable/} (equivalent to @file{<xsrc-top>/latest/}, but +for the Stable branch of XEmacs, rather than the Experimental branch +of XEmacs). This may or may not be necessary depending on how much +development you do of the stable branch. +@end itemize -This is also why Netscape ships two binaries for SunOS 4.1.x. +@item +@file{<xsrc-top>/xemacsweb} is a workspace for working on the XEmacs +web site. -The best solution is to compile it yourself; the configure script will -check to see if you've put DNS in the shared libc and will then proceed -to link against the DNS resolver library code. -@end quotation +@item +@file{<xsrc-top>/in-patches} for patches received from email and saved +to files. -@node Q2.0.12, Q2.0.13, Q2.0.11, Installation -@unnumberedsubsec Q2.0.12: Why can't I strip XEmacs? +@item +@file{<xsrc-top>/out-patches} for locally-generated patches to be sent +to @email{xemacs-patches@@xemacs.org}. Less useful now that the +patcher util has been developed. -@email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes: +@item +@file{<xsrc-top>/build}, for build trees when compiling and testing XEmacs with +various configuration options turned off and on. The scripts in +xemacs-builds/ben (see below) can be used to automate building XEmacs +workspaces with many different configuration options and automatically +filtering out the normal output so that you see only the abnormal +output. -@quotation -Because of the way XEmacs (and every other Emacsen, AFAIK) is built. The -link gives you a bare-boned emacs (called temacs). temacs is then run, -preloading some of the lisp files. The result is then dumped into a new -executable, named xemacs, which will contain all of the preloaded lisp -functions and data. +@item +@file{<xsrc-top>/xemacs-builds}, for the xemacs-builds module, which you need +to check out separately in CVS. This contains scripts used for building +XEmacs, automating and simplifying using CVS, etc. Under various +people's directories are their own build and other scripts. The +currently most-maintained scripts are under ben/, where there are easily +configurable scripts that can be used to easily build any workspace +(esp. if you've more or less followed the layout presented above) +unattended, with one or more configuration states (there's a +pre-determined list of the most useful, but it's easy to change). The +output is filtered and split up in various ways so that you can identify +which output came from where, and you can see the output either full or +with all "normal" output except occasional status messages filtered so +that you only see the abnormal ones. +@end itemize -Now, during the dump itself, the executable (code+data+symbols) is -written on disk using a special unexec() function. This function is -obviously heavily system dependent. And on some systems, it leads to an -executable which, although valid, cannot be stripped without damage. If -memory serves, this is especially the case for AIX binaries. On other -architectures it might work OK. +@node Q1.5.5, Q1.6.1, Q1.5.4, Introduction +@unnumberedsubsec Q1.5.5: What's the basic layout of the code? -The Right Way to strip the emacs binary is to strip temacs prior to -dumping xemacs. This will always work, although you can do that only if -you install from sources (as temacs is @file{not} part of the binary -kits). -@end quotation +The file @file{configure} is a shell script to acclimate XEmacs to the +oddities of your processor and operating system. It will create a +file named @file{Makefile} (a script for the @file{make} program), which helps +automate the process of building and installing emacs. See INSTALL +for more detailed information. -@email{nat@@nataa.fr.eu.org, Nat Makarevitch} writes: +The file @file{configure.in} is the input used by the autoconf program to +construct the @file{configure} script. Since XEmacs has configuration +requirements that autoconf can't meet, @file{configure.in} uses an unholy +marriage of custom-baked configuration code and autoconf macros; it +may be wise to avoid rebuilding @file{configure} from @file{configure.in} when +possible. -@quotation -Here is the trick: +The file @file{Makefile.in} is a template used by @file{configure} to create +@file{Makefile}. + +There are several subdirectories: @enumerate @item -[ ./configure; make ] - +@file{src} holds the C code for XEmacs (the XEmacs Lisp interpreter and its +primitives, the redisplay code, and some basic editing functions). @item -rm src/xemacs - +@file{lisp} holds the XEmacs Lisp code for XEmacs (most everything else). @item -strip src/temacs - +@file{lib-src} holds the source code for some utility programs for use by +or with XEmacs, like movemail and etags. @item -make - +@file{etc} holds miscellaneous architecture-independent data files +XEmacs uses, like the tutorial text. The contents of the @file{lisp}, +@file{info} and @file{man} subdirectories are architecture-independent too. @item -cp src/xemacs /usr/local/bin/xemacs - +@file{lwlib} holds the C code for the X toolkit objects used by XEmacs. @item -cp lib-src/DOC-19.16-XEmacs -@iftex -\ @* -@end iftex -/usr/local/lib/xemacs-19.16/i586-unknown-linuxaout +@file{info} holds the Info documentation tree for XEmacs. +@item +@file{man} holds the source code for the XEmacs online documentation. +@item +@file{nt} holds files used compiling XEmacs under Microsoft Windows. @end enumerate -@end quotation -@node Q2.0.13, Q2.0.14, Q2.0.12, Installation -@unnumberedsubsec Q2.0.13: I don't need no steenkin' packages. Do I? +@unnumberedsec 1.6: Politics (XEmacs vs. GNU Emacs) -Strictly speaking, no. XEmacs will build and install just fine without -any packages installed. However, only the most basic editing functions -will be available with no packages installed, so installing packages is -an essential part of making your installed XEmacs _useful_. +@node Q1.6.1, Q1.6.2, Q1.5.5, Introduction +@unnumberedsubsec Q1.6.1: What is GNU Emacs? -@node Q2.0.14, Q2.0.15, Q2.0.13, Installation -@unnumberedsubsec Q2.0.14: How do I figure out which packages to install? +GNU Emacs and XEmacs are related open-source text editors. Both +derive from GNU Emacs version 18; the split between the two happened +in 1991 (for comparison, the oldest versions of GNU Emacs date from +1984). For information on GNU Emacs, see +@uref{http://www.gnu.org/software/emacs/emacs.html}. -Many people really liked the old way that packages were bundled and do -not want to mess with packages at all. You can grab all the packages at -once like you used to with old XEmacs versions. Download the file +@node Q1.6.2, Q1.6.3, Q1.6.1, Introduction +@unnumberedsubsec Q1.6.2: How does XEmacs differ from GNU Emacs? -@file{xemacs-sumo.tar.gz} +For a detailed description of the differences between GNU Emacs and +XEmacs and a detailed history of XEmacs, check out the +@example +@uref{http://www.xemacs.org/About/XEmacsVsGNUemacs.html, NEWS file} +@end example -For an XEmacs compiled with Mule you also need +@table @strong +@item User-Visible Editing Features +XEmacs in general tries hard to conform to exist user-interface +standards, and to work "out-of-the-box" without the need for obscure +customization changes. GNU Emacs, particularly version 21, has gotten +better about this (in many cases by copying the XEmacs behavior!), but +still has some weirdnesses. For example, the standard method of +selecting text using the Shift key works out-of-the-box in XEmacs. + +XEmacs has a built-in toolbar. Four toolbars can actually be configured +simultaneously: top, bottom, left, and right toolbars. + +XEmacs has vertical and horizontal scrollbars. Unlike in GNU Emacs 19 +(which provides a primitive form of vertical scrollbar), these are true +toolkit scrollbars. A look-alike Motif scrollbar is provided for those +who don't have Motif. (Even for those who do, the look-alike may be +preferable as it is faster.) + +XEmacs has buffer tabs along the top of the frame (although the +position can be changed) that make it very easy to switch buffers. + +The menubar under XEmacs is better-designed, with more thought put into +it. + +XEmacs can ask questions using popup dialog boxes. Any command executed +from a menu will ask yes/no questions with dialog boxes, while commands +executed via the keyboard will use the minibuffer. + +XEmacs under MS Windows provides uses the standard file-dialog box for +opening and saving files. Standard menu-accelerator behavior can easily +be enabled using the Options menu, and integrates well into the existing +keymap. + +XEmacs has (still experimental) support for widgets of various sorts -- +buttons, text boxes, sliders, progress bars, etc. A progress bar is +used in font lock to show the progress. + +Experimental support for drag-and-drop protocols is provided from +XEmacs 21. + +@item General Platform Support +If you're running on a machine with audio hardware, you can specify +sound files for XEmacs to play instead of the default X beep. See the +documentation of the function load-sound-file and the variable +sound-alist. XEmacs also supports the network sound protocols NAS and +EsounD. + +XEmacs 21 supports database protocols with LISP bindings, currently +including Berkeley DB, LDAP, and PostgreSQL (21.2 only). + +XEmacs 20 and 21 support the Canna, Wnn, and SJ3 Japanese input method +servers directly, as well as through the X Input Method (XIM) +protocol. GNU Emacs 20 supports only the XIM protocol. Both Emacsen +support the Quail family of input methods (implemented in LISP) for many +languages. + +XEmacs provides support for ToolTalk on systems that have +it. + +@item Packaged LISP Libraries +Many more packages are provided standard with XEmacs than with GNU Emacs +19 or 20. + +XEmacs 21 supports an integrated package management system which uses +EFS to download, then automatically install prebuilt LISP +libraries. This allows XEmacs users much more straightforward access to +the "latest and greatest" version of any given library. + +We are working on a standard method for enabling, disabling and +otherwise controlling packages, which should make them very easy to use. + +@item LISP Programming +From XEmacs 20 on, characters are a separate type. Characters can be +converted to integers (and many integers can be converted to +characters), but characters are not integers. GNU Emacs 19, XEmacs 19, +Mule 2.3 (an extensive patch to GNU Emacs 18.55 and 19.x), and GNU Emacs +20 (incorporating Mule 3 and later Mule 4) represent them as integers. + +From XEmacs 20 on, the buffer is treated as an array of characters, and +the representation of buffer text is not exposed to LISP. The GNU Emacs +20 functions like buffer-as-multibyte are not supported. + +In XEmacs, events are first-class objects. GNU Emacs 19 represents them +as integers, which obscures the differences between a key gesture and +the ancient ASCII code used to represent a particular overlapping subset +of them. + +In XEmacs, keymaps are first-class opaque objects. GNU Emacs 19 +represents them as complicated combinations of association lists and +vectors. If you use the advertised functional interface to manipulation +of keymaps, the same code will work in XEmacs, GNU Emacs 18, and GNU +Emacs 19; if your code depends on the underlying implementation of +keymaps, it will not. + +XEmacs uses "extents" to represent all non-textual aspects of buffers; +GNU Emacs 19 uses two distinct objects, "text properties" and +"overlays", which divide up the functionality between them. Extents are +a superset of the union of the functionality of the two GNU Emacs data +types. The full GNU Emacs 19 interface to text properties and overlays +is supported in XEmacs (with extents being the underlying +representation). + +Extents can be made to be copied into strings, and then restored, by +kill and yank. Thus, one can specify this behavior on either "extents" +or "text properties", whereas in GNU Emacs 19 text properties always +have this behavior and overlays never do. + +@item Window System Programming Interface +XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which makes +it be a more well-behaved X citizen (and also improves portability). A +result of this is that it is possible to include other Xt "Widgets" in +the XEmacs window. Also, XEmacs understands the standard Xt command-line +arguments. + +XEmacs supports Motif applications, generic Xt (e.g. Athena) +applications, and raw Xlib applications. An XEmacs variant which +supports GTK+ is available (integration as an option in the XEmacs +mainline is planned for XEmacs 22), although code to take advantage of +the support is as yet scarce. + +An XEmacs frame can be placed within an "external client widget" managed +by another application. This allows an application to use an XEmacs +frame as its text pane rather than the standard Text widget that is +provided with Motif or Athena. + +@item Community Participation +Joining the XEmacs development team is simple. Mail to +@email{xemacs-beta@@xemacs.org, XEmacs Developers}, and you're in! (If +you want to be, of course. You're also welcome to just post +development-related questions and bug reports.) The GNU Emacs +development team and internal mailing lists are still by invitation +only. + +The "bleeding edge" of mainline XEmacs development is available by +anonymous CVS as are some subsidiary branches (check out the xemacs-gtk +module for the latest in GUI features!) + +Development and maintenance of Lisp libraries is separated from the core +editor development at a fairly low level. This provides better +modularization and a better division of responsibility between external +library maintainers and the XEmacs core development team. Even for +packages the size of Gnus, XEmacs users normally have access to a +pre-built version within a few weeks of a major release, and minor +updates often within days. + +CVS commit authority is broadly dispersed. Recognized maintainers of +LISP libraries who are willing to maintain XEmacs packaged versions +automatically qualify for CVS accounts for their packages. +@end table -@file{xemacs-mule-sumo.tar.gz} +@node Q1.6.3, Q1.6.4, Q1.6.2, Introduction +@unnumberedsubsec Q1.6.3: How much does XEmacs differ? -from the @file{packages} directory on your XEmacs mirror archive. -N.B. They are called 'Sumo Tarballs' for good reason. They are -currently about 15MB and 2.3MB (gzipped) respectively. +RMS has asserted at times that XEmacs is merely a "patch" on top of +GNU Emacs (@pxref{Q1.6.4}). In fact, probably not more than 5% of the +code, if that, remains unchanged, and nearly 14 years of work has gone +into XEmacs at this point. (GNU Emacs itself is only than 20 years +old, and thus XEmacs has existed as a separate product for over 2/3 of +the lifespan of GNU Emacs.) As a point of comparison, XEmacs 21.5 has +perhaps 65,000 more lines of C code than GNU Emacs 21.2. -Install them by +However, the XEmacs developers strive to keep their code compatible with +GNU Emacs, especially on the Lisp level. Much effort goes into +"synching" the XEmacs Elisp code with recent GNU Emacs releases so as to +benefit from GNU Emacs development work. (In contrast, almost no code +from XEmacs has made it into GNU Emacs, and in fact the GNU Emacs +developers are instructed by RMS not to even look at XEmacs source code! +This stems from self-imposed licensing restrictions on the part of GNU +Emacs -- and almost certainly out of hostility, as well.) -@code{cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -} +@node Q1.6.4, Q1.6.5, Q1.6.3, Introduction +@unnumberedsubsec Q1.6.4: Is XEmacs "GNU"? -See README.packages for more detailed installation instructions. +RMS insists on the term "GNU XEmacs" and maintains that -As the Sumo tarballs are not regenerated as often as the individual -packages, it is recommended that you use the automatic package tools -afterwards to pick up any recent updates. +@quotation +XEmacs is GNU software because it's a modified version of a +GNU program. And it is GNU software because the FSF is the copyright +holder for most of it, and therefore the legal responsibility for +protecting its free status falls on us whether we want it or not. This +is why the term "GNU XEmacs" is legitimate. +@end quotation -@node Q2.0.15, Q2.0.16, Q2.0.14, Installation -@unnumberedsubsec Q2.0.15: EFS fails with "500 AUTH not understood" (NEW) +In fact, FSF is @emph{not} the copyright holder for most of the code, +as very little unmodified FSF code remains (@pxref{Q1.6.3}). + +Furthermore, RMS's assertion that XEmacs is "GNU" seems rather bizarre +to the XEmacs developers given RMS's hostility and general lack of +interest in cooperation. "GNU" software in general is part of the GNU +Project, is distributed by it on their FTP site, and receives support +(or at least cooperation), as well as implicit endorsement, from it. +The GNU Project, however, has never supported XEmacs and never +distributed XEmacs, and RMS's hostility is the farthest thing possible +from an endorsement. In fact, the GNU Project distributes a number of +non-GNU software projects on the FSF web site, but again XEmacs is not +one of them. + +@node Q1.6.5, Q1.6.6, Q1.6.4, Introduction +@unnumberedsubsec Q1.6.5: What is the correct way to refer to XEmacs and GNU Emacs? + +Unfortunately even the naming of these two applications has become +politicized. Much of this stems from RMS, who has a history of +politicizing similar issues. (Compare the controversy over "Lignux" +and "GNU/Linux".) We would prefer that the terms "XEmacs" and "GNU +Emacs" be used, which are neutral and acceptable to most people. RMS, +however, is not willing to accept these terms. He insists that, if +his product is called "GNU Emacs", then ours must be called "GNU +XEmacs". (For our opinion of this term, @xref{Q1.6.4}.) On the other +hand, if our product is to be called "XEmacs", as we prefer, then his +product must simply be called "Emacs". The intent of this seems +clear: RMS wants to make sure the names reflect his view that his +version is the "real" Emacs and ours is merely a derivative, +second-class product (@pxref{Q1.6.3}). + +The XEmacs developers hope that you will use the neutral terms +"XEmacs" and "GNU Emacs" for these two specific products. "Emacs", on +the other hand, is a generic term for a class of programmable text +editors with a similar look-and-feel, and usually a Lisp-based +extension language. These trace themselves back to early editors such +as EINE, ZWEI, ZMACS and Multics Emacs. @xref{A History of Emacs,,, +internals, XEmacs Internals Manual}. + +We also call upon RMS, in the spirit of furthering cooperation, to +stop politicizing this issue and use the neutral terms "XEmacs" and +"GNU Emacs". We have already acceded to RMS' wishes in this respect, +and we expect him to do the same. (In the past, the XEmacs developers +often used the terms "FSF Emacs" or "FSFmacs" or "RMSmacs" in +reference to GNU Emacs; these terms were apparently modeled after RMS' +own usage of "Gosmacs" and "Gosling Emacs" in reference to Unipress +Emacs, produced by James Gosling. RMS, however, considers such terms +to be insulting, so we refrain from using them as much as possible in +preference to GNU Emacs.) + +@node Q1.6.6, Q1.7.1, Q1.6.5, Introduction +@unnumberedsubsec Q1.6.6: Why haven't XEmacs and GNU Emacs merged? -A typical error: FTP Error: USER request failed; 500 AUTH not understood. +There are currently irreconcilable differences in the views about +technical, programming, design, organizational and legal matters +between Richard Stallman (RMS), the author and leader of the GNU Emacs +project, and the XEmacs development team which provide little hope for +a merge to take place in the short-term future. There have been +repeated attempts at merging by all of the major XEmacs developers, +starting from the early days of Lucid Emacs (in 1991), but they have +all failed. RMS has very strong views about how GNU Emacs should be +structured and how his project should be run, and during the repeated +merge efforts has never demonstrated any realistic interest in +sufficiently compromising or ceding control to allow a middle ground +to be found. The basic problem seems to be the very different goals +of RMS and the XEmacs project. The primary goals of the XEmacs +project are technical and organizational -- we want to create the best +editor possible, and to make it as easy as possible for people around +the world to contribute. The primary goals of RMS, on the other hand, +are political, and GNU Emacs, and any potential merge efforts with +XEmacs, are strictly subservient to these goals. In fact, in many +ways RMS sees GNU Emacs as the "poster child" of his aims, the one +program in the GNU project that above all others must set an example +to the world. (This has to do with the fact that GNU Emacs was the +first program in the GNU project, and the only one that he is still +personally involved with on a day-to-day basis.) Given his goals, his +position is completely reasonable -- but unfortunately, makes any +merge impossible. + +From the XEmacs perspective, the most intractable issues appear to be +legal and organizational, specifically: -Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends -on comp.emacs.xemacs: +@itemize @bullet +@item +RMS requires "legal papers" to be signed for all contributions of code +to GNU Emacs over 10 lines or so, transferring the copyright and all +legal rights to the code to the Free Software Foundation. XEmacs does +not and has never required this, since it has the practical effect of +discouraging individual and in particular corporate contributions -- +corporations will almost never sign away their legal rights to code +since it makes it impossible to reuse the code in any product that +whose license is not compatible with the GNU General Public License. +Since RMS has shown no inclination to compromise on this issue, a +merge would require that most of the existing XEmacs code would need +to be thrown away and rewritten -- something the XEmacs developers are +understandably reluctant to do. + +@item +A repeated stumbling block in the merge talks has been the issue of +organizational control over the resulting product. RMS has made it +clear that he intends to have final say over design issues in a merged +Emacs. Unfortunately, RMS and the XEmacs developers have repeatedly +clashed over design decisions, and RMS' insistence on getting his way +in such disagreements was the very reason for the split in the first +place. This same issue has come up again and again in merge talks and +we have never been able to come to a satisfactory resolution. To the +extent that RMS is willing to compromise at all, it appears to be of a +purely political rather than technical nature -- "If we support this +feature of yours, we also get to support this other feature of mine." +The XEmacs developers cannot see how such a process would lead to +anything but a mess of incompatible things hodgepodged together. + +@item +Because of the years of separate development, distinct and +incompatible interfaces have developed and merging would be extremely +difficult even with the above non-technical issues resolved. The +problem has been exacerbated by the issue of legal papers -- because +XEmacs code is not "kosher" from RMS' perspective, he discourages +developers from even looking at it out of legal concerns. Although it +is still possible to read the XEmacs documentation and run the +program, the practical effect of this prohibition has been to strongly +discourage code-sharing and cooperative development -- although a +great deal of GNU Emacs code has been incorporated into XEmacs, +practically none has gone the other direction. +@end itemize - tell your ftp client to not attempt AUTH authentication (or do not - use FTP servers that don't understand AUTH) +If you have a comment to add regarding the merge, it is a good idea to +avoid posting to the newsgroups, because of the very heated flamewars +that often result. Mail your questions to +@email{xemacs-beta@@xemacs.org} and @email{emacs-devel@@gnu.org}. -and notes that you need to add an element (often "-u") to -`efs-ftp-program-args'. Use M-x customize-variable, and verify the -needed flag with `man ftp' or other local documentation. +@unnumberedsec 1.7: External Packages -@node Q2.0.16, Q2.1.1, Q2.0.15, Installation -@unnumberedsubsec Q2.0.16: Cygwin XEmacs won't start: cygXpm-noX4.dll was not found (NEW) +@node Q1.7.1, Q1.7.2, Q1.6.6, Introduction +@unnumberedsubsec Q1.7.1: What is the package system? -The Cygwin binary distributed with the netinstaller uses an external DLL -to handle XPM images (such as toolbar buttons). You may get an error like +In order to reduce the size and increase the maintainability of +XEmacs, the majority of the Elisp packages that came with previous +releases have been unbundled. They have been replaced by the package +system. Each elisp add-on (or groups of them when they are small) now +comes in its own tarball that contains a small search hierarchy. - This application has failed to start because cygXpm-noX4.dll was not found. - Re-installing the application may fix this problem. +You select just the ones you need. Install them by untarring them into +the right place. On startup XEmacs will find them, set up the load +path correctly, install autoloads, etc, etc. -Andy Piper <andy@@xemacs.org> sez: +@xref{Q2.1.1}, for more info on how to download and install the packages. - cygXpm-noX4 is part of the cygwin distribution under libraries or - graphics, but is not installed by default. You need to run the - cygwin setup again and select this package. +@node Q1.7.2, Q1.7.3, Q1.7.1, Introduction +@unnumberedsubsec Q1.7.2: Which external packages are there? -Ie, reinstalling XEmacs won't help because it is not part of the XEmacs -distribution. +@subheading Normal Packages -@node Q2.1.1, Q2.1.2, Q2.0.16, Installation -@unnumberedsec 2.1: Trouble Shooting -@unnumberedsubsec Q2.1.1: Help! XEmacs just crashed on me! +A very broad collection of elisp packages. -First of all, don't panic. Whenever XEmacs crashes, it tries extremely -hard to auto-save all of your files before dying. (The main time that -this will not happen is if the machine physically lost power or if you -killed the XEmacs process using @code{kill -9}). The next time you try -to edit those files, you will be informed that a more recent auto-save -file exists. You can use @kbd{M-x recover-file} to retrieve the -auto-saved version of the file. +@table @asis +@item Sun +Support for Sparcworks. -You can use the command @kbd{M-x recover-session} after a crash to pick -up where you left off. +@item ada +Ada language support. -Now, XEmacs is not perfect, and there may occasionally be times, or -particular sequences of actions, that cause it to crash. If you can -come up with a reproducible way of doing this (or even if you have a -pretty good memory of exactly what you were doing at the time), the -maintainers would be very interested in knowing about it. The best way -to report a bug is using @kbd{M-x report-emacs-bug} (or by selecting -@samp{Send Bug Report...} from the Help menu). If that won't work -(e.g. you can't get XEmacs working at all), send ordinary mail to -@email{crashes@@xemacs.org}. @emph{MAKE SURE} to include the output from -the crash, especially including the Lisp backtrace, as well as the -XEmacs configuration from @kbd{M-x describe-installation} (or -equivalently, the file @file{Installation} in the top of the build -tree). Please note that the @samp{crashes} address is exclusively for -crash reports. The best way to report bugs in general is through the -@kbd{M-x report-emacs-bug} interface just mentioned, or if necessary by -emailing @email{xemacs-beta@@xemacs.org}. Note that the developers do -@emph{not} usually follow @samp{comp.emacs.xemacs} on a regular basis; -thus, this is better for general questions about XEmacs than bug -reports. +@item apel +A Portable Emacs Library. Used by XEmacs MIME support. -If at all possible, include a C stack backtrace of the core dump that -was produced. This shows where exactly things went wrong, and makes it -much easier to diagnose problems. To do this under Unix, you need to -locate the core file (it's called @file{core}, and is usually sitting in -the directory that you started XEmacs from, or your home directory if -that other directory was not writable). Then, go to that directory and -execute a command like: +@item auctex +Basic TeX/LaTeX support. -@example -gdb `which xemacs` core -@end example +@item bbdb +The Big Brother Data Base: a rolodex-like database program. -and then issue the command @samp{where} to get the stack backtrace. You -might have to use @code{dbx} or some similar debugger in place of -@code{gdb}. If you don't have any such debugger available, complain to -your system administrator. +@item build +Build XEmacs from within (UNIX, Windows). -It's possible that a core file didn't get produced, in which case you're -out of luck. Go complain to your system administrator and tell him not -to disable core files by default. Also see @ref{Q2.1.15}, for tips and -techniques for dealing with a debugger. +@item c-support +Basic single-file add-ons for editing C code. -If you're under Microsoft Windows, you're out of luck unless you happen -to have a debugging aid installed on your system, for example Visual -C++. In this case, the crash will result in a message giving you the -option to enter a debugger (for example, by pressing @samp{Cancel}). Do -this and locate the stack-trace window. (If your XEmacs was built -without debugging information, the stack trace may not be very useful.) +@item calc +Emacs calculator. -When making a problem report make sure that: +@item calendar +Calendar and diary support. -@enumerate -@item -Report @strong{all} of the information output by XEmacs during the -crash. +@item cc-mode +C, C++, Objective-C, Java, CORBA IDL, Pike and AWK language support. -@item -You mention what O/S & Hardware you are running XEmacs on. +@item clearcase +New Clearcase Version Control for XEmacs (UNIX, Windows). -@item -What version of XEmacs you are running. +@item clearcase +Support for the Clearcase version control system. -@item -What build options you are using. +@item cookie +"Fortune cookie"-style messages. Includes Spook (suspicious phrases) +and Yow (Zippy quotes). -@item -If the problem is related to graphics and you are running Unix, we will -also need to know what version of the X Window System you are running, -and what window manager you are using. +@item crisp +Crisp/Brief emulation. -@item -If the problem happened on a TTY, please include the terminal type. -@end enumerate +@item debug +GUD, gdb, dbx debugging support. -Much of the information above is automatically generated by @kbd{M-x -report-emacs-bug}. Even more, and often useful, information can be -generated by redirecting the output of @code{make} and @code{make check} -to a file (@file{beta.err} is the default used by @code{build-report}), -and executing @kbd{M-x build-report}. +@item dictionary +Interface to RFC2229 dictionary servers. -@node Q2.1.2, Q2.1.3, Q2.1.1, Installation -@unnumberedsubsec Q2.1.2: Cryptic Minibuffer messages. +@item dired +The DIRectory EDitor is for manipulating, and running commands on +files in a directory. -When I try to use some particular option of some particular package, I -get a cryptic error in the minibuffer. - -If you can't figure out what's going on, select Options/General -Options/Debug on Error from the Menubar and then try and make the error -happen again. This will give you a backtrace that may be enlightening. -If not, try reading through this FAQ; if that fails, you could try -posting to comp.emacs.xemacs (making sure to include the backtrace) and -someone may be able to help. If you can identify which Emacs lisp -source file the error is coming from you can get a more detailed stack -backtrace by doing the following: +@item docbookide +DocBook editing support. -@enumerate -@item -Visit the .el file in an XEmacs buffer. +@item ecb +Emacs source code browser. -@item -Issue the command @kbd{M-x eval-current-buffer}. +@item ecrypto +Crypto functionality in Emacs Lisp. -@item -Reproduce the error. -@end enumerate +@item edebug +An Emacs Lisp debugger. -Depending on the version of XEmacs, you may either select View->Show -Message Log (recent versions), Edit->Show Messages (some earlier -versions) or Help->Recent Keystrokes/Messages (other earlier versions) -from the menubar to see the most recent messages. This command is bound -to @kbd{C-h l} by default. +@item ediff +Interface over GNU patch. -@node Q2.1.3, Q2.1.4, Q2.1.2, Installation -@unnumberedsubsec Q2.1.3: Translation Table Syntax messages at Startup +@item edit-utils +Miscellaneous editor extensions, you probably need this. -I get tons of translation table syntax error messages during startup. -How do I get rid of them? +@item edt +DEC EDIT/EDT emulation. -There are two causes of this problem. The first usually only strikes -people using the prebuilt binaries. The culprit in both cases is the -file @file{XKeysymDB}. +@item efs +Treat files on remote systems the same as local files. -@itemize @bullet -@item -The binary cannot find the @file{XKeysymDB} file. The location is -hardcoded at compile time so if the system the binary was built on puts -it a different place than your system does, you have problems. To fix, -set the environment variable @code{XKEYSYMDB} to the location of the -@file{XKeysymDB} file on your system or to the location of the one -included with XEmacs which should be at -@iftex -@* -@end iftex -@file{<xemacs_root_directory>/lib/xemacs-19.16/etc/XKeysymDB}. +@item eieio +Enhanced Implementation of Emacs Interpreted Objects. -@item -The binary is finding the XKeysymDB but it is out-of-date on your system -and does not contain the necessary lines. Either ask your system -administrator to replace it with the one which comes with XEmacs (which -is the stock R6 version and is backwards compatible) or set your -@code{XKEYSYMDB} variable to the location of XEmacs's described above. -@end itemize +@item elib +Portable Emacs Lisp utilities library. -@node Q2.1.4, Q2.1.5, Q2.1.3, Installation -@unnumberedsubsec Q2.1.4: Startup warnings about deducing proper fonts? +@item emerge +Another interface over GNU patch. -How can I avoid the startup warnings about deducing proper fonts? +@item erc +ERC is an Emacs InternetRelayChat client. -This is highly dependent on your installation, but try with the -following font as your base font for XEmacs and see what it does: +@item escreen +Multiple editing sessions withing a single frame (like screen). -@format --adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 -@end format +@item eshell +Command shell implemented entirely in Emacs Lisp. -More precisely, do the following in your resource file: +@item ess +ESS: Emacs Speaks Statistics. -@format -Emacs.default.attributeFont: \ --adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 -@end format +@item eterm +Terminal emulation. -If you just don't want to see the @samp{*Warnings*} buffer at startup -time, you can set this: +@item eudc +Emacs Unified Directory Client (LDAP, PH). -@lisp -(setq display-warning-minimum-level 'error) -@end lisp +@item footnote +Footnoting in mail message editing modes. -The buffer still exists; it just isn't in your face. +@item forms +Forms editing support (obsolete, use Widget instead). -@node Q2.1.5, Q2.1.6, Q2.1.4, Installation -@unnumberedsubsec Q2.1.5: XEmacs cannot connect to my X Terminal! +@item fortran-modes +Fortran support. -Help! I can not get XEmacs to display on my Envizex X-terminal! +@item fortran-modes +Fortran language support. -Try setting the @code{DISPLAY} variable using the numeric IP address of -the host you are running XEmacs from. - -@node Q2.1.6, Q2.1.7, Q2.1.5, Installation -@unnumberedsubsec Q2.1.6: XEmacs just locked up my Linux X server! - -There have been several reports of the X server locking up under Linux. -In all reported cases removing speedo and scaled fonts from the font -path corrected the problem. This can be done with the command -@code{xset}. +@item frame-icon +Set up mode-specific icons for each frame under XEmacs. -It is possible that using a font server may also solve the problem. +@item fsf-compat +GNU Emacs compatibility files. -@node Q2.1.7, Q2.1.8, Q2.1.6, Installation -@unnumberedsubsec Q2.1.7: HP Alt key as Meta. +@item games +Tetris, Sokoban, and Snake. -How can I make XEmacs recognize the Alt key of my HP workstation as a -Meta key? - -Put the following line into a file and load it with xmodmap(1) before -starting XEmacs: +@item general-docs +General documentation. Presently, empty. -@example -remove Mod1 = Mode_switch -@end example +@item gnats +XEmacs bug reports. -@node Q2.1.8, Q2.1.9, Q2.1.7, Installation -@unnumberedsubsec Q2.1.8: got (wrong-type-argument color-instance-p nil) +@item gnus +The Gnus Newsreader and Mailreader. -@email{nataliek@@rd.scitec.com.au, Natalie Kershaw} writes: +@item haskell-mode +Haskell editing support. -@quotation -I am trying to run xemacs 19.13 under X11R4. Whenever I move the mouse I -get the following error. Has anyone seen anything like this? This -doesn't occur on X11R5. +@item hm--html-menus +HTML editing. -@lisp -Signalling: -(error "got (wrong-type-argument color-instance-p nil) -and I don't know why!") -@end lisp -@end quotation +@item hyperbole +Hyperbole: The Everyday Info Manager. -@email{map01kd@@gold.ac.uk, dinos} writes: +@item ibuffer +Advanced replacement for buffer-menu. -@quotation -I think this is due to undefined resources; You need to define color -backgrounds and foregrounds into your @file{.../app-defaults/Emacs} -like: +@item idlwave +Editing and Shell mode for the Interactive Data Language. -@example -*Foreground: Black ;everything will be of black on grey95, -*Background: Grey95 ;unless otherwise specified. -*cursorColor: Red3 ;red3 cursor with grey95 border. -*pointerColor: Red3 ;red3 pointer with grey95 border. -@end example -@end quotation +@item igrep +Enhanced front-end for Grep. -Natalie Kershaw adds: +@item ilisp +Front-end for interacting with Inferior Lisp (external lisps). -@quotation -What fixed the problem was adding some more colors to the X color -database (copying the X11R5 colors over), and also defining the -following resources: +@item ispell +Spell-checking with GNU ispell. -@example -xemacs*cursorColor: black -xemacs*pointerColor: black -@end example +@item jde +Integrated Development Environment for Java. -With the new colors installed the problem still occurs if the above -resources are not defined. +@item liece +IRC (Internet Relay Chat) client for Emacs. Note, this package is +deprecated and will be removed, use riece instead. -If the new colors are not present then an additional error occurs on -XEmacs startup, which says @samp{Color Red3} not defined. -@end quotation +@item mail-lib +Fundamental lisp files for providing email support. -@node Q2.1.9, Q2.1.10, Q2.1.8, Installation -@unnumberedsubsec Q2.1.9: XEmacs causes my OpenWindows 3.0 server to crash. +@item mailcrypt +Support for messaging encryption with PGP. -The OpenWindows 3.0 server is incredibly buggy. Your best bet is to -replace it with one from the generic MIT X11 release. You might also -try disabling parts of your @file{init.el}/@file{.emacs}, like those -that enable background pixmaps. +@item mew +Messaging in an Emacs World; a MIME-based email program. -@node Q2.1.10, Q2.1.11, Q2.1.9, Installation -@unnumberedsubsec Q2.1.10: Warnings from incorrect key modifiers. +@item mh-e +The XEmacs Interface to the MH Mail System. -The following information comes from the @file{PROBLEMS} file that comes -with XEmacs. +@item mine +Elisp implementation of the game 'Minehunt'. -If you're having troubles with HP/UX it is because HP/UX defines the -modifiers wrong in X. Here is a shell script to fix the problem; be -sure that it is run after VUE configures the X server. +@item misc-games +Other amusements and diversions. -@example -#! /bin/sh -xmodmap 2> /dev/null - << EOF -keysym Alt_L = Meta_L -keysym Alt_R = Meta_R -EOF +@item mmm-mode +Support for Multiple Major Modes within a single buffer. -xmodmap - << EOF -clear mod1 -keysym Mode_switch = NoSymbol -add mod1 = Meta_L -keysym Meta_R = Mode_switch -add mod2 = Mode_switch -EOF -@end example +@item net-utils +Miscellaneous Networking Utilities. -@node Q2.1.11, Q2.1.12, Q2.1.10, Installation -@unnumberedsubsec Q2.1.11: @samp{Can't instantiate image error...} in toolbar -@c New +@item ocaml +Objective Caml editing support. -@email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes: +@item oo-browser +OO-Browser: The Multi-Language Object-Oriented Code Browser. -I just installed the XEmacs (20.4-2) RPMS that I downloaded from -@uref{http://www.xemacs.org/}. Everything works fine, except that when -I place my mouse over the toolbar, it beeps and gives me this message: +@item ocaml +Objective Caml editing support. -@example - Can't instantiate image (probably cached): - [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data - (16 16 <strange control characters> ... -@end example +@item os-utils +Miscellaneous single-file O/S utilities, for printing, archiving, +compression, remote shells, etc. -@email{kyle_jones@@wonderworks.com, Kyle Jones} writes: -@quotation -This is problem specific to some Chips and Technologies video -chips, when running XFree86. Putting +@item pc +PC style interface emulation. -@code{Option "sw_cursor"} +@item pcl-cvs +CVS frontend. -in @file{XF86Config} gets rid of the problem. -@end quotation +@item pcomplete +Provides programmatic completion. -@node Q2.1.12, Q2.1.13, Q2.1.11, Installation -@unnumberedsubsec Q2.1.12: Problems with Regular Expressions on DEC OSF1. +@item perl-modes +Perl support. -I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and ispell -would not run because it claimed the version number was incorrect -although it was indeed OK. I traced the problem to the regular -expression handler. +@item pgg +Emacs interface to various PGP implementations. -@email{douglask@@dstc.edu.au, Douglas Kosovic} writes: +@item prog-modes +Support for various programming languages. -@quotation -Actually it's a DEC cc optimization bug that screws up the regexp -handling in XEmacs. +@item ps-print +Printing functions and utilities. -Rebuilding using the @samp{-migrate} switch for DEC cc (which uses a -different sort of optimization) works fine. -@end quotation +@item psgml +Validated HTML/SGML editing. -See @file{xemacs-19_13-dunix-3_2c.patch} at the following URL on how to -build with the @samp{-migrate} flag: +@item psgml-dtds +A collection of DTDs for psgml. Note that this package is deprecated +and will be removed in the future, most likely Q2/2003. Instead of using +this, you should install needed DTDs yourself. -@example -@uref{http://www-digital.cern.ch/carney/emacs/emacs.html} -@c Link above, <URL:http://www-digital.cern.ch/carney/emacs/emacs.html> is -@c dead. And the directory `carney' is empty. +@item python-modes +Python language support. +@item reftex +Emacs support for LaTeX cross-references, citations. +@item riece +IRC (Internet Relay Chat) client for Emacs. -@end example +@item rmail +An obsolete Emacs mailer. If you do not already use it don't start. -NOTE: There have been a variety of other problems reported that are -fixed in this fashion. +@item ruby-modes +Ruby support. -@node Q2.1.13, Q2.1.14, Q2.1.12, Installation -@unnumberedsubsec Q2.1.13: HP/UX 10.10 and @code{create_process} failure. +@item sasl +Simple Authentication and Security Layer (SASL) library. -@email{Dave.Carrigan@@ipl.ca, Dave Carrigan} writes: +@item scheme +Front-end support for Inferior Scheme. -@quotation -With XEmacs 19.13 and HP/UX 10.10, anything that relies on the -@code{create_process} function fails. This breaks a lot of things -(shell-mode, compile, ange-ftp, to name a few). -@end quotation +@item semantic +Semantic bovinator (Yacc/Lex for XEmacs). Includes Senator. -@email{johnson@@dtc.hp.com, Phil Johnson} writes: +@item sgml +SGML/Linuxdoc-SGML editing. -@quotation -This is a problem specific to HP-UX 10.10. It only occurs when XEmacs -is compiled for shared libraries (the default), so you can work around -it by compiling a statically-linked binary (run configure with -@samp{--dynamic=no}). +@item sh-script +Support for editing shell scripts. -I'm not sure whether the problem is with a particular shared library or -if it's a kernel problem which crept into 10.10. -@end quotation +@item sieve +Manage Sieve email filtering scripts. -@email{cognot@@ensg.u-nancy.fr, Richard Cognot} writes: +@item slider +User interface tool. -@quotation -I had a few problems with 10.10. Apparently, some of them were solved by -forcing a static link of libc (manually). -@end quotation +@item sml-mode +SML editing support. -@node Q2.1.14, Q2.1.15, Q2.1.13, Installation -@unnumberedsubsec Q2.1.14: @kbd{C-g} doesn't work for me. Is it broken? +@item sounds-au +XEmacs Sun sound files. -@email{ben@@xemacs.org, Ben Wing} writes: +@item sounds-wav +XEmacs Microsoft sound files. -@quotation -@kbd{C-g} does work for most people in most circumstances. If it -doesn't, there are only two explanations: +@item speedbar +Provides a separate frame with convenient references. -@enumerate -@item -The code is wrapped with a binding of @code{inhibit-quit} to -@code{t}. @kbd{Ctrl-Shift-G} should still work, I think. +@item strokes +Mouse enhancement utility. -@item -SIGIO is broken on your system, but BROKEN_SIGIO isn't defined. -@end enumerate +@item supercite +An Emacs citation tool for News & Mail messages. -To test #2, try executing @code{(while t)} from the @samp{*scratch*} -buffer. If @kbd{C-g} doesn't interrupt, then you're seeing #2. -@end quotation +@item texinfo +XEmacs TeXinfo support. -@email{terra@@diku.dk, Morten Welinder} writes: +@item text-modes +Miscellaneous support for editing text files. -@quotation -On some (but @emph{not} all) machines a hung XEmacs can be revived by -@code{kill -FPE <pid>}. This is a hack, of course, not a solution. -This technique works on a Sun4 running 4.1.3_U1. To see if it works for -you, start another XEmacs and test with that first. If you get a core -dump the method doesn't work and if you get @samp{Arithmetic error} then -it does. -@end quotation +@item textools +Miscellaneous TeX support. -@node Q2.1.15, Q2.1.16, Q2.1.14, Installation -@unnumberedsubsec Q2.1.15: How to debug an XEmacs problem with a debugger +@item time +Display time & date on the modeline. -If XEmacs does crash on you, one of the most productive things you can -do to help get the bug fixed is to poke around a bit with the debugger. -Here are some hints: +@item tm +Emacs MIME support. Not needed for gnus >= 5.8.0. -@itemize @bullet -@item -First of all, if the crash is at all reproducible, consider very -strongly recompiling your XEmacs with debugging symbols and with no -optimization (e.g. with GCC use the compiler flags @samp{-g -O0} -- -that's an "oh" followed by a zero), and with the configure options -@samp{--debug=yes} and @samp{--error-checking=all}. This will make your -XEmacs run somewhat slower, but you are a lot more likely to catch the -problem earlier (closer to its source). It makes it a lot easier to -determine what's going on with a debugger. +@item tooltalk +Support for building with Tooltalk. -@item -If it's not a true crash (@emph{i.e.}, XEmacs is hung, or a zombie -process), or it's inconvenient to run XEmacs again because XEmacs is -already running or is running in batch mode as part of a bunch of -scripts, you may be able to attach to the existing process with your -debugger. Most debuggers let you do this by substituting the process ID -for the core file when you invoke the debugger from the command line, or -by using the @code{attach} command or something similar. +@item tpu +DEC EDIT/TPU support. -@item -If you're able to run XEmacs under a debugger and reproduce the crash, -here are some things you can do: +@item tramp +Remote shell-based file editing. This is similar to EFS or Ange-FTP, +but works with rsh/ssh and rcp/scp. -@item -If XEmacs is hitting an assertion failure, put a breakpoint on -@code{assert_failed()}. +@item vc +Version Control for Free systems. -@item -If XEmacs is hitting some weird Lisp error that's causing it to crash -(e.g. during startup), put a breakpoint on @code{signal_1()}---this is -declared static in eval.c. +@item vc-cc +Version Control for ClearCase (UnFree) systems. -@item -If XEmacs is outputting lots of X errors, put a breakpoint on -@code{x_error_handler()}; that will tell you which call is causing them. +@item vhdl +Support for VHDL. -@item -Internally, you will probably see lots of variables that hold objects of -type @code{Lisp_Object}. These are references to Lisp objects. -Printing them out with the debugger probably won't be too -useful---you'll likely just see a number. To decode them, do this: +@item view-process +A Unix process browsing tool. -@example -call dp (OBJECT) -@end example +@item viper +VI emulation support. -where @var{OBJECT} is whatever you want to decode (it can be a variable, -a function call, etc.). This uses the Lisp printing routines to out a -readable representation on the TTY from which the xemacs process was -invoked. +@item vm +An Emacs mailer. -@item -If you want to get a Lisp backtrace showing the Lisp call -stack, do this: +@item w3 +A Web browser. -@example -call db () -@end example +@item x-symbol +Semi WYSIWYG for LaTeX, HTML, etc, using additional fonts. -@item -Using @code{dp} and @code{db} has two disadvantages - they can only be -used with a running (including hung or zombie) xemacs process, and they -do not display the internal C structure of a Lisp Object. Even if all -you've got is a core dump, all is not lost. +@item xemacs-base +Fundamental XEmacs support, you almost certainly need this. -If you're using GDB, there are some macros in the file -@file{src/.gdbinit} in the XEmacs source distribution that should make -it easier for you to decode Lisp objects. This file is automatically -read by gdb if gdb is run in the directory where xemacs was built, and -contains these useful macros to inspect the state of xemacs: +@item xemacs-devel +XEmacs Lisp developer support. This package contains utilities for +supporting Lisp development. It is a single-file package so it may be +tailored. -@table @code -@item pobj -Usage: pobj lisp_object @* -Print the internal C representation of a lisp object. +@item xlib +Emacs interface to X server. -@item xtype -Usage: xtype lisp_object @* -Print the Lisp type of a lisp object. +@item xslide +XSL editing support. -@item lbt -Usage: lbt @* -Print the current Lisp stack trace. -Requires a running xemacs process. (It works by calling the db -routine described above.) +@item xslt-process +A minor mode for (X)Emacs which allows running an XSLT processor on a +buffer. -@item ldp -Usage: ldp lisp_object @* -Print a Lisp Object value using the Lisp printer. -Requires a running xemacs process. (It works by calling the dp -routine described above.) +@item xwem +X Emacs Window Manager. -@item run-temacs -Usage: run-temacs @* -Run temacs interactively, like xemacs. -Use this with debugging tools (like purify) that cannot deal with dumping, -or when temacs builds successfully, but xemacs does not. +@item zenirc +ZENIRC IRC Client. +@end table -@item dump-temacs -Usage: dump-temacs @* -Run the dumping part of the build procedure. -Use when debugging temacs, not xemacs! -Use this when temacs builds successfully, but xemacs does not. +@subheading Mule Support (mule) -@item check-xemacs -Usage: check-xemacs @* -Run the test suite. Equivalent to 'make check'. +MULti-lingual Enhancement. Support for world scripts such as +Latin, Arabic, Cyrillic, Chinese, Japanese, Greek, Hebrew etc. +To use these packages your XEmacs must be compiled with Mule +support. -@item check-temacs -Usage: check-temacs @* -Run the test suite on temacs. Equivalent to 'make check-temacs'. -Use this with debugging tools (like purify) that cannot deal with dumping, -or when temacs builds successfully, but xemacs does not. -@end table +@table @asis +@item edict +MULE: Lisp Interface to EDICT, Kanji Dictionary. -If you are using Sun's @file{dbx} debugger, there is an equivalent file -@file{src/.dbxrc}, which defines the same commands for dbx. +@item egg-its +MULE: Wnn (4.2 and 6) support. SJ3 support. -@item -If you're using a debugger to get a C stack backtrace and you're seeing -stack traces with some of the innermost frames mangled, it may be due to -dynamic linking. (This happens especially under Linux.) Consider -reconfiguring with @samp{--dynamic=no}. Also, sometimes (again under -Linux), stack backtraces of core dumps will have the frame where the -fatal signal occurred mangled; if you can obtain a stack trace while -running the XEmacs process under a debugger, the stack trace should be -clean. +@item latin-unity +MULE: find single ISO 8859 character set to encode a buffer. -@email{1CMC3466@@ibm.mtsac.edu, Curtiss} suggests upgrading to ld.so -version 1.8 if dynamic linking and debugging is a problem on Linux. +@item latin-unity +Unify character sets in a buffer. When characters belong to disjoint +character sets, this attempts to translate the characters so +that they belong to one character set. If the buffer coding system is +not sufficient, this suggests different coding systems. -@item -If you're using a debugger to get a C stack backtrace and you're -getting a completely mangled and bogus stack trace, it's probably due to -one of the following: +@item leim +MULE: Quail. All non-English and non-Japanese language support. -@enumerate a -@item -Your executable has been stripped. Bad news. Tell your sysadmin not to -do this---it doesn't accomplish anything except to save a bit of disk -space, and makes debugging much much harder. +@item locale +MULE: Localized menubars and localized splash screens. -@item -Your stack is getting trashed. Debugging this is hard; you have to do a -binary-search type of narrowing down where the crash occurs, until you -figure out exactly which line is causing the problem. Of course, this -only works if the bug is highly reproducible. Also, in many cases if -you run XEmacs from the debugger, the debugger can protect the stack -somewhat. However, if the stack is being smashed, it is typically the -case that there is a wild pointer somewhere in the program, often quite -far from where the crash occurs. +@item lookup +Dictionary support. (This isn't an English dictionary program) -@item -If your stack trace has exactly one frame in it, with address 0x0, this -could simply mean that XEmacs attempted to execute code at that address, -e.g. through jumping to a null function pointer. Unfortunately, under -those circumstances, GDB under Linux doesn't know how to get a stack -trace. (Yes, this is the fourth Linux-related problem I've mentioned. I -have no idea why GDB under Linux is so bogus. Complain to the GDB -authors, or to comp.os.linux.development.system.) Again, you'll have to -use the narrowing-down process described above. +@item mule-base +MULE: Basic Mule support, required for building with Mule. -@item -You will get a Lisp backtrace output when XEmacs crashes, so you'll have -something useful. +@item mule-ucs +MULE: Extended coding systems (including Unicode) for XEmacs. -@end enumerate +@item mule-ucs +Extended coding systems (including Unicode) for XEmacs. -@item -If you compile with the newer gcc variants gcc-2.8 or egcs, you will -also need gdb 4.17 or above. Earlier releases of gdb can't handle the -debug information generated by the newer compilers. +@item skk +Another Japanese Language Input Method. Can be used without a +separate process running as a dictionary server. +@end table -@item -In versions of XEmacs before 21.2.27, @file{src/.gdbinit} was named -@file{src/gdbinit}. This had the disadvantage of not being sourced -automatically by gdb, so you had to set that up yourself. +@node Q1.7.3, Q1.7.4, Q1.7.2, Introduction +@unnumberedsubsec Q1.7.3: Do I need to have the packages to run XEmacs? -@item -If you are running Microsoft Windows, the the file @file{nt/README} for -further information about debugging XEmacs. +Strictly speaking, no. XEmacs will build and install just fine without +any packages installed. However, only the most basic editing functions +will be available with no packages installed, so installing packages is +an essential part of making your installed XEmacs _useful_. -@end itemize +@node Q1.7.4, Q1.8.1, Q1.7.3, Introduction +@unnumberedsubsec Q1.7.4: Is there a way to find which package has particular functionality? -@node Q2.1.16, Q2.1.17, Q2.1.15, Installation -@unnumberedsubsec Q2.1.16: XEmacs crashes in @code{strcat} on HP/UX 10 +If you want to find out which package contains the functionality you +are looking for, use @kbd{M-x package-get-package-provider}, and give it a +symbol that is likely to be in that package. -From the problems database (through -the former address http://support.mayfield.hp.com/): +For example, if some code you want to use has a @code{(require 'thingatpt)} +in it: @example -Problem Report: 5003302299 -Status: Open + M-x package-get-package-provider RET thingatpt RET +@end example -System/Model: 9000/700 -Product Name: HPUX S800 10.0X -Product Vers: 9245XB.10.00 +which will return something like: @samp{(fsf-compat "1.08").} -Description: strcat(3C) may read beyond -end of source string, can cause SIGSEGV +@unnumberedsec 1.8: Internationalization +@node Q1.8.1, Q1.8.2, Q1.7.4, Introduction +@unnumberedsubsec Q1.8.1: What is the status of internationalization support aka MULE (including Asian language support)? -*** PROBLEM TEXT *** -strcat(3C) may read beyond the source string onto an unmapped page, -causing a segmentation violation. -@end example +Both the stable and development versions of XEmacs include +internationalization support (aka MULE). MULE currently (21.4) works on +UNIX and Linux systems. It is possible to build with MULE on Windows +systems, but if you really need MULE on Windows, it is recommended that +you build and use the development (21.5) version, and deal with the +instability of the development tree. Binaries compiled without MULE +support run faster than MULE capable XEmacsen. -@node Q2.1.17, Q2.1.18, Q2.1.16, Installation -@unnumberedsubsec Q2.1.17: @samp{Marker does not point anywhere} +@node Q1.8.2, Q1.8.3, Q1.8.1, Introduction +@unnumberedsubsec Q1.8.2: How can I help with internationalization? -As with other errors, set @code{debug-on-error} to @code{t} to get the -backtrace when the error occurs. Specifically, two problems have been -reported (and fixed). +If you would like to help, you may want to join the +@email{xemacs-mule@@xemacs.org} mailing list. Especially needed are +people who speak/write languages other than English, who are willing to +use XEmacs/MULE regularly, and have some experience with Elisp. -@enumerate -@item -A problem with line-number-mode in XEmacs 19.14 affected a large number -of other packages. If you see this error message, turn off -line-number-mode. +Translations of the TUTORIAL and man page are welcome, and XEmacs does +support multilingual menus, but we have few current translations. -@item -A problem with some early versions of Gnus 5.4 caused this error. -Upgrade your Gnus. -@end enumerate +@xref{Q1.5.2, How do I become a Beta Tester?}. -@node Q2.1.18, Q2.1.19, Q2.1.17, Installation -@unnumberedsubsec Q2.1.18: XEmacs is outputting lots of X errors. +@node Q1.8.3, Q1.8.4, Q1.8.2, Introduction +@unnumberedsubsec Q1.8.3: How do I type non-ASCII characters? -If this is happening, we would very much like to know what's causing -them. To find this out, see @ref{Q2.1.15}. Try to get both a C and Lisp -backtrace, and send them to @email{xemacs-beta@@xemacs.org}. +@xref{Q3.0.6, How can you type in special characters in XEmacs?}, in +part 3 of this FAQ, for some simple methods that also work in non-MULE +builds of XEmacs (but only for one-octet coded character sets, and +mostly for ISO 8859/1). Many of the methods available for Cyrillic +(@pxref{Q1.8.7, How about Cyrillic modes?}) work without MULE. MULE +has more general capabilities. @xref{Q1.8.5, Please explain the +various input methods in MULE/XEmacs}. -@node Q2.1.19, Q2.1.20, Q2.1.18, Installation -@unnumberedsubsec Q2.1.19: XEmacs does not follow the local timezone. +@xref{Q4.0.8, How do I display non-ASCII characters?}, which covers +display of non-ASCII characters. -When using one of the prebuilt binaries many users have observed that -XEmacs uses the timezone under which it was built, but not the timezone -under which it is running. The solution is to add: +@node Q1.8.4, Q1.8.5, Q1.8.3, Introduction +@unnumberedsubsec Q1.8.4: Can XEmacs messages come out in a different language? -@lisp -(set-time-zone-rule "MET") -@end lisp +The message-catalog support was written but is badly bit-rotted. XEmacs +20 and 21 did @emph{not} support it, and early releases of XEmacs 22 +will not either. -to your @file{init.el}/@file{.emacs} or the @file{site-start.el} file if -you can. Replace @code{MET} with your local timezone. +However, menubar localization @emph{does} work. To enable it, add to +your @file{Emacs} file entries like this: -@node Q2.1.20, Q2.1.21, Q2.1.19, Installation -@unnumberedsubsec Q2.1.20: @samp{Symbol's function definition is void: hkey-help-show.} +@example +Emacs*XlwMenu.resourceLabels: True +Emacs*XlwMenu.file.labelString: Fichier +Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster oeffnen +@end example -This is a problem with a partially loaded hyperbole. Try adding: +The name of the resource is derived from the non-localized entry by +removing punctuation and capitalizing as above. -@lisp -(require 'hmouse-drv) -@end lisp +@node Q1.8.5, Q1.8.6, Q1.8.4, Introduction +@unnumberedsubsec Q1.8.5: Please explain the various input methods in MULE/XEmacs -where you load hyperbole and the problem should go away. +Mule supports a wide variety of input methods. There are three basic +classes: Lisp implementations, generic platform support, and library +interfaces. -@node Q2.1.21, Q2.1.22, Q2.1.20, Installation -@unnumberedsubsec Q2.1.21: [This question intentionally left blank] +@emph{Lisp implementations} include Quail, which provides table-driven input +methods for almost all the character sets that Mule supports (including +all of the ISO 8859 family, the Indic languages, Thai, and so on), and +SKK, for Japanese. (SKK also supports an interface to an external +"dictionary server" process.) Quail supports both typical "dead-key" +methods (eg, in the "latin-1-prefix" method, @kbd{" a} produces ä, LATIN +SMALL LETTER A WITH DIAERESIS), and the complex dictionary-based phonetic +methods used for Asian ideographic languages like Chinese. -@node Q2.1.22, Q2.1.23, Q2.1.21, Installation -@unnumberedsubsec Q2.1.22: XEmacs seems to take a really long time to do some things +Lisp implementations can be less powerful (but they are not perceptibly +inefficient), and of course are not portable to non-Emacs applications. +The incompatibility can be very annoying. On the other hand, they +require no special platform support or external libraries, so if you can +display the characters, Mule can input them for you and you can edit, +anywhere. -@email{dmoore@@ucsd.edu, David Moore} writes: +@emph{Generic platform support} is currently limited to the X Input +Method (XIM) framework, although support for MSIME (for MS Windows) is +planned, and IIIMF (Sun's Internet-Intranet Input Method Framework) +support is extremely desirable. XIM is enabled at build time by use of +the @samp{--with-xim} flag to @code{configure}. For use of XIM, see +your platform documentation. However, normally the input method you use +is specified via the @samp{LANG} and @samp{XMODIFIERS} environment +variables. -@quotation -Two things you can do: +Of course, input skills are portable across most applications. However, +especially in modern GUI systems the habit of using bucky bits has +fallen into sad disuse, and many XIM systems are poorly configured for +use with Emacs. For example, the kinput2 input manager (a separate +process providing an interface between Japanese dictionary servers such +as Canna and Wnn, and the application) tends to gobble up keystrokes +generating Meta characters. This means that to edit while using an XIM +input method, you must toggle the input method off every time you want +to use @kbd{M-f}. Your mileage may vary. -1) C level: +@emph{Library interfaces} are most common for Japanese, although Wnn +supports Chinese (traditional and simplified) and Korean. There are +Chinese and Korean input servers available, but we do not know of any +patches for XEmacs to use them directly. You can use them via +IM-enabled terminals, by manipulating the terminal coding systems. We +describe only the Japanese-oriented systems here. The advantage of +these systems is that they are very powerful, and on platforms where +they are available there is typically a wide range of applications that +support them. Thus your input skills are portable across applications. -When you see it going mad like this, you might want to use gdb from an -'xterm' to attach to the running process and get a stack trace. To do -this just run: +Mule provides built-in interfaces to the following input methods: Wnn4, +Wnn6, Canna, and SJ3. These can be configured at build time. There are +patches available (no URL, sorry) to support the SKK server, as well. +Wnn and SJ3 use the @code{egg} user interface. The interface for Canna +is specialized to Canna. -@example -gdb /path/to/xemacs/xemacs #### -@end example +Wnn supports Japanese, Chinese and Korean. It is made by OMRON and Kyôto +University. It is a powerful and complex system. Wnn4 is free and Wnn6 +is not. Wnn uses grammatical hints and probability of word association, +so in principle Wnn can be cleverer than other methods. -Where @code{####} is the process id of your xemacs, instead of -specifying the core. When gdb attaches, the xemacs will stop [1] and -you can type `where' in gdb to get a stack trace as usual. To get -things moving again, you can just type `quit' in gdb. It'll tell you -the program is running and ask if you want to quit anyways. Say 'y' and -it'll quit and have your emacs continue from where it was at. +Canna, made by NEC, supports only Japanese. It is a simple and powerful +system. Canna uses only grammar, but its grammar and dictionary are +quite sophisticated. So for standard modern Japanese, Canna seems +cleverer than Wnn4. In addition, the UNIX version of Canna is free (now +there is a Microsoft Windows version). -2) Lisp level: +SJ3, by Sony, supports only Japanese. -Turn on debug-on-quit early on. When you think things are going slow -hit C-g and it may pop you in the debugger so you can see what routine -is running. Press `c' to get going again. +Egg consists of following parts: -debug-on-quit doesn't work if something's turned on inhibit-quit or in -some other strange cases. -@end quotation +@enumerate +@item +Input character Translation System (ITS) layer. +It translates ASCII inputs to Kana/PinYin/Hangul characters. -@node Q2.1.23, Q2.1.24, Q2.1.22, Installation -@unnumberedsubsec Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later. +@item +Kana/PinYin/Hangul to Kanji transfer layer. +The interface layer to network Kana-Kanji server (Wnn and Sj3). +@end enumerate -Movemail used to work fine in 19.14 but has stopped working in 19.15 -and 20.x. I am using Linux. +These input methods are modal. They have a raw (alphabet) mode, a +phonetic input mode, and Kana-Kanji transfer mode. However there are +mode-less input methods for Egg and Canna. @samp{boiled-egg} is a +mode-less input method running on Egg. For Canna, @samp{canna.el} has a +tiny boiled-egg-like command, @code{(canna-boil)}, and there are some +boiled-egg-like utilities. -@email{steve@@xemacs.org, SL Baur} writes: +Much of this information was provided by @email{morioka@@jaist.ac.jp, +MORIOKA Tomohiko}. -@quotation -Movemail on Linux used to default to using flock file locking. With -19.15 and later versions it now defaults to using @code{.lock} file -locking. If this is not appropriate for your system, edit src/s/linux.h -and uncomment the line that reads: +@node Q1.8.6, Q1.8.7, Q1.8.5, Introduction +@unnumberedsubsec Q1.8.6: How do I portably code for MULE/XEmacs? -@example -#define MAIL_USE_FLOCK -@end example -@end quotation +MULE has evolved rapidly over the last few years, and the original third +party patch (for GNU Emacs 19), GNU Emacs 20+, and XEmacs 20+ have quite +different implementations. The APIs also vary although recent versions +of XEmacs have tended to converge to the GNU Emacs standard. -@node Q2.1.24, Q2.1.25, Q2.1.23, Installation -@unnumberedsubsec Q2.1.24: XEmacs won't start without network. +MULE implementations are going to continue to evolve. Both GNU Emacs +and XEmacs are working hard on Unicode support, which will involve new +APIs and probably variations on old ones. For XEmacs 22, the old ISO +2022-based system for recognizing encodings will be replaced by a much +more flexible system, which should improve accuracy of automatic coding +detections, but will also involve new APIs. -If XEmacs starts when you're on the network, but fails when you're not -on the network, you may be missing a "localhost" entry in your -@file{/etc/hosts} file. The file should contain an entry like: +@email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes: -@example -127.0.0.1 localhost -@end example +@quotation +The application implementor must write separate code for these mule +variants. [Please don't hesitate to report these variants to us; they +are not, strictly speaking, bugs, but they give third-party developers +the same kind of creepy-crawly feeling. We'll do what we can. -- Ed.] -Add that line, and XEmacs will be happy. +MULE and the next version of Emacs are similar but the symbols are very +different---requiring separate code as well. -@node Q2.1.25, , Q2.1.24, Installation -@unnumberedsubsec Q2.1.25:: After upgrading, XEmacs won't do `foo' any more! +Namely we must support 3 kinds of mule variants and 4 or 5 or 6 kinds of +emacs variants... (;_;) I'm shocked, so I wrote a wrapper package called +@code{emu} to provide a common interface. [There is an XEmacs package +of APEL which provides much more comprehensive coverage. Be careful, +however; APEL has problems of its own. -- Ed.] -You have been used to doing `foo', but now when you invoke it (or click -the toolbar button or select the menu item), nothing (or an error) -happens. The simplest explanation is that you are missing a package -that is essential to you. You can either track it down and install it -(there is a list of packages and brief descriptions of their contents in -@file{etc/PACKAGES}), or install the `Sumo Tarball' (@pxref{Q2.0.14}). +I have the following suggestions about dealing with mule variants: -@c #### should xref to XEmacs manual here +@itemize @bullet +@item +@code{(featurep 'mule)} @code{t} on all mule variants -@node Customization, Subsystems, Installation, Top -@unnumbered 3 Customization and Options +@item +@code{(boundp 'MULE)} is @code{t} on only MULE. Maybe the next version +of Emacs will not have this symbol. -This is part 3 of the XEmacs Frequently Asked Questions list. This -section is devoted to Customization and screen settings. +@item +MULE has a variable @code{mule-version}. Perhaps the next version of +Emacs will have this variable as well. +@end itemize -@menu -Customization---Emacs Lisp and @file{init.el}/@file{.emacs}: -* Q3.0.1:: What version of Emacs am I running? -* Q3.0.2:: How do I evaluate Elisp expressions? -* Q3.0.3:: @code{(setq tab-width 6)} behaves oddly. -* Q3.0.4:: How can I add directories to the @code{load-path}? -* Q3.0.5:: How to check if a lisp function is defined? -* Q3.0.6:: Can I force the output of @code{(face-list)} to a buffer? -* Q3.0.7:: Font selections don't get saved after @code{Save Options}. -* Q3.0.8:: How do I make a single minibuffer frame? -* Q3.0.9:: What is @code{Customize}? - -X Window System & Resources: -* Q3.1.1:: Where is a list of X resources? -* Q3.1.2:: How can I detect a color display? -* Q3.1.3:: [This question intentionally left blank] -* Q3.1.4:: [This question intentionally left blank] -* Q3.1.5:: How can I get the icon to just say @samp{XEmacs}? -* Q3.1.6:: How can I have the window title area display the full path? -* Q3.1.7:: @samp{xemacs -name junk} doesn't work? -* Q3.1.8:: @samp{-iconic} doesn't work. - -Textual Fonts & Colors: -* Q3.2.1:: How can I set color options from @file{init.el}/@file{.emacs}? -* Q3.2.2:: How do I set the text, menu and modeline fonts? -* Q3.2.3:: How can I set the colors when highlighting a region? -* Q3.2.4:: How can I limit color map usage? -* Q3.2.5:: My tty supports color, but XEmacs doesn't use them. -* Q3.2.6:: Can I have pixmap backgrounds in XEmacs? -* Q3.2.7:: How do I display non-ASCII characters? - -The Modeline: -* Q3.3.1:: How can I make the modeline go away? -* Q3.3.2:: How do you have XEmacs display the line number in the modeline? -* Q3.3.3:: How do I get XEmacs to put the time of day on the modeline? -* Q3.3.4:: How do I turn off current chapter from AUC TeX modeline? -* Q3.3.5:: How can one change the modeline color based on the mode used? - -3.4 Multiple Device Support: -* Q3.4.1:: How do I open a frame on another screen of my multi-headed display? -* Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How? - -3.5 The Keyboard: -* Q3.5.1:: How can I bind complex functions (or macros) to keys? -* Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers? -* Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down? -* Q3.5.4:: Globally binding @kbd{Delete}? -* Q3.5.5:: Scrolling one line at a time. -* Q3.5.6:: How to map @kbd{Help} key alone on Sun type4 keyboard? -* Q3.5.7:: How can you type in special characters in XEmacs? -* Q3.5.8:: [This question intentionally left blank] -* Q3.5.9:: How do I make the Delete key delete forward? -* Q3.5.10:: Can I turn on @dfn{sticky} modifier keys? -* Q3.5.11:: How do I map the arrow keys? - -The Cursor: -* Q3.6.1:: Is there a way to make the bar cursor thicker? -* Q3.6.2:: Is there a way to get back the old block cursor where the cursor covers the character in front of the point? -* Q3.6.3:: Can I make the cursor blink? - -The Mouse and Highlighting: -* Q3.7.1:: How can I turn off Mouse pasting? -* Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons? -* Q3.7.3:: Clicking the left button does not do anything in buffer list. -* Q3.7.4:: How can I get a list of buffers when I hit mouse button 3? -* Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool? -* Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is? -* Q3.7.7:: How do I select a rectangular region? -* Q3.7.8:: Why does @kbd{M-w} take so long? - -The Menubar and Toolbar: -* Q3.8.1:: How do I get rid of the menu (or menubar)? -* Q3.8.2:: Can I customize the basic menubar? -* Q3.8.3:: How do I control how many buffers are listed in the menu @code{Buffers} list? -* Q3.8.4:: Resources like @code{Emacs*menubar*font} are not working? -* Q3.8.5:: How can I bind a key to a function to toggle the toolbar? - -Scrollbars: -* Q3.9.1:: How can I disable the scrollbar? -* Q3.9.2:: How can one use resources to change scrollbar colors? -* Q3.9.3:: Moving the scrollbar can move the point; can I disable this? -* Q3.9.4:: How can I turn off automatic horizontal scrolling in specific modes? - -Text Selections: -* Q3.10.1:: How can I turn off or change highlighted selections? -* Q3.10.2:: How do I get that typing on an active region removes it? -* Q3.10.3:: Can I turn off the highlight during isearch? -* Q3.10.4:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? -* Q3.10.5:: The region disappears when I hit the end of buffer while scrolling. -* Q3.10.6:: Why is killing so slow? -@end menu +Following is a sample to distinguish mule variants: -@node Q3.0.1, Q3.0.2, Customization, Customization -@unnumberedsec 3.0: Customization -- Emacs Lisp and @file{init.el}/@file{.emacs} -@unnumberedsubsec Q3.0.1: What version of Emacs am I running? +@lisp +(if (featurep 'mule) + (cond ((boundp 'MULE) + ;; for original Mule + ) + ((string-match "XEmacs" emacs-version) + ;; for XEmacs with Mule + ) + (t + ;; for next version of Emacs + )) + ;; for old emacs variants + ) +@end lisp +@end quotation -How can @file{init.el}/@file{.emacs} determine which of the family of -Emacsen I am using? +@node Q1.8.7, Q1.8.8, Q1.8.6, Introduction +@unnumberedsubsec Q1.8.7: How about Cyrillic modes? -To determine if you are currently running GNU Emacs 18, GNU Emacs 19, -XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the -example given in @file{etc/sample.init.el} (@file{etc/sample.emacs} in -XEmacs versions prior to 21.4). There are other nifty things in there -as well! +@email{ilya@@math.ohio-state.edu, Ilya Zakharevich} writes: -For all new code, all you really need to do is: +@quotation +There is a cyrillic mode in the file @file{mysetup.zip} in +@iftex +@* +@end iftex +@uref{ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/}. This is a +modification to @email{ava@@math.jhu.ed, Valery Alexeev's} @file{russian.el} +which can be obtained from +@end quotation -@lisp -(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) -@end lisp +@uref{http://www.math.uga.edu/~valery/russian.el}. -@node Q3.0.2, Q3.0.3, Q3.0.1, Customization -@unnumberedsubsec Q3.0.2: How can I evaluate Emacs-Lisp expressions? +@email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes: -I know I can evaluate Elisp expressions from @code{*scratch*} buffer -with @kbd{C-j} after the expression. How do I do it from another -buffer? +@quotation +There is another cyrillic mode for both GNU Emacs and XEmacs by +@email{manin@@camelot.mssm.edu, Dmitrii +(Mitya) Manin} at +@iftex -Press @kbd{M-:} (the default binding of @code{eval-expression}), and -enter the expression to the minibuffer. +@end iftex +@uref{http://kulichki-lat.rambler.ru/centrolit/manin/cyr.el}. +@c Link above, <URL:http://camelot.mssm.edu/~manin/cyr.el> was dead. +@c Changed to russian host instead +@end quotation -@node Q3.0.3, Q3.0.4, Q3.0.2, Customization -@unnumberedsubsec Q3.0.3: @code{(setq tab-width 6)} behaves oddly. +@email{rebecca.ore@@op.net, Rebecca Ore} writes: -If you put @code{(setq tab-width 6)} in your -@file{init.el}/@file{.emacs} file it does not work! Is there a reason -for this? If you do it at the EVAL prompt it works fine!! How strange. +@quotation +The fullest resource I found on Russian language use (in and out of +XEmacs) is @uref{http://www.ibiblio.org/sergei/Software/Software.html} +@end quotation -Use @code{setq-default} instead, since @code{tab-width} is -all-buffer-local. +@node Q1.8.8, Q1.8.9, Q1.8.7, Introduction +@unnumberedsubsec Q1.8.8: Does XEmacs support Unicode? -@node Q3.0.4, Q3.0.5, Q3.0.3, Customization -@unnumberedsubsec Q3.0.4: How can I add directories to the @code{load-path}? +To get Unicode support, you need a Mule-enabled XEmacs. -Here are two ways to do that, one that puts your directories at the -front of the load-path, the other at the end: +21.5 has internal support for Unicode and supports it fully, although we +don't yet use it as the internal encoding. -@lisp -;;; Add things at the beginning of the load-path, do not add -;;; duplicate directories: -(pushnew "bar" load-path :test 'equal) +21.4 supports Unicode partially -- as an external encoding for files, +processes, and terminals, but without font support. @xref{Q1.8.9, How +does XEmacs display Unicode?}. To get Unicode support in 21.4, +install Mule-UCS from packages in the usual way, and put -(pushnew "foo" load-path :test 'equal) +@example +(require 'un-define) +(set-coding-priority-list '(utf-8)) +(set-coding-category-system 'utf-8 'utf-8) +@end example -;;; Add things at the end, unconditionally -(setq load-path (nconc load-path '("foo" "bar"))) -@end lisp +in your init file to enable the UTF-8 coding system. You may wish to +view the documentation of @code{set-coding-priority-list} if you find +that files that are not UTF-8 are being mis-recognized as UTF-8. -@email{keithh@@nortel.ca, keith (k.p.) hanlan} writes: +Install standard national fonts (not Unicode fonts) for all character +sets you use. @xref{Q1.8.9, How does XEmacs display Unicode??}. -@quotation -To add directories using Unix shell metacharacters use -@file{expand-file-name} like this: +Mule-UCS also supports 16-bit forms of Unicode (UTF-16). It does not +support 31-bit forms of Unicode (UTF-32 or UCS-4). -@lisp -(push (expand-file-name "~keithh/.emacsdir") load-path) -@end lisp -@end quotation +@node Q1.8.9, , Q1.8.8, Introduction +@unnumberedsubsec Q1.8.9: How does XEmacs display Unicode? -@node Q3.0.5, Q3.0.6, Q3.0.4, Customization -@unnumberedsubsec Q3.0.5: How to check if a lisp function is defined? +Mule doesn't have a Unicode charset internally, so there's nothing to +bind a Unicode registry to. It would not be straightforward to create, +either, because Unicode is not ISO 2022-compatible. You'd have to +translate it to multiple 96x96 pages. -Use the following elisp: +This means that Mule-UCS uses ordinary national fonts for display. This +is not really a problem, except for those languages that use the Unified +Han characters. The problem here is that Mule-UCS maps from Unicode +code points to national character sets in a deterministic way. By +default, this means that Japanese fonts are tried first, then Chinese, +then Korean. To change the priority ordering, use the command +`un-define-change-charset-order'. -@lisp -(fboundp 'foo) -@end lisp +It also means you can't use Unicode fonts directly, at least not without +extreme hackery. You can run -nw with (set-terminal-coding-system +'utf-8) if you really want a Unicode font for some reason. -It's almost always a mistake to test @code{emacs-version} or any similar -variables. +Real Unicode support will be introduced in XEmacs 22.0. -Instead, use feature-tests, such as @code{featurep}, @code{boundp}, -@code{fboundp}, or even simple behavioral tests, eg.: +@node Installation, Editing, Introduction, Top +@unnumbered 2 Installation and Troubleshooting -@lisp -(defvar foo-old-losing-code-p - (condition-case nil (progn (losing-code t) nil) - (wrong-number-of-arguments t))) -@end lisp +This is part 2 of the XEmacs Frequently Asked Questions list. This +section is devoted to Installation, Maintenance and Troubleshooting. -There is an incredible amount of broken code out there which could work -much better more often in more places if it did the above instead of -trying to divine its environment from the value of one variable. +@menu +2.0: Installation (General) +* Q2.0.1:: How do I build and install XEmacs? +* Q2.0.2:: Where do I find external libraries? +* Q2.0.3:: How do I specify the paths that XEmacs uses for finding files? +* Q2.0.4:: Running XEmacs without installing +* Q2.0.5:: XEmacs is too big + +2.1: Package Installation +* Q2.1.1:: How do I install the packages? +* Q2.1.2:: Can I install the packages individually? +* Q2.1.3:: Can I install the packages automatically? +* Q2.1.4:: Can I upgrade or remove packages? +* Q2.1.5:: Which packages to install? +* Q2.1.6:: Can you describe the package location process in more detail? +* Q2.1.7:: EFS fails with "500 AUTH not understood" + +2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW) +* Q2.2.1:: Libraries in non-standard locations +* Q2.2.2:: Why can't I strip XEmacs? +* Q2.2.3:: X11/bitmaps/gray (or other X11-related file) not found. + +2.3: Windows Installation (Windows, Cygwin, MinGW) +* Q2.3.1:: What exactly are all the different ways to build XEmacs under Windows? +* Q2.3.2:: What compiler/libraries do I need to compile XEmacs? +* Q2.3.3:: How do I compile the native port? +* Q2.3.4:: What do I need for Cygwin? +* Q2.3.5:: How do I compile under Cygwin? +* Q2.3.6:: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})? +* Q2.3.7:: How do I compile with X support? +* Q2.3.8:: Cygwin XEmacs won't start -- cygXpm-noX4.dll was not found (NEW) + +2.4: General Troubleshooting +* Q2.4.1:: How do I deal with bugs or with problems building, installing, or running? +* Q2.4.2:: Help! XEmacs just crashed on me! +* Q2.4.3:: XEmacs crashes and I compiled it myself. +* Q2.4.4:: How to debug an XEmacs problem with a debugger +* Q2.4.5:: I get a cryptic error message when trying to do something. +* Q2.4.6:: XEmacs hangs when I try to do something. +* Q2.4.7:: I get an error message when XEmacs is running in batch mode. +* Q2.4.8:: The keyboard or mouse is not working properly, or I have some other event-related problem. +* Q2.4.9:: @kbd{C-g} doesn't work for me. Is it broken? +* Q2.4.10:: How do I debug process-related problems? +* Q2.4.11:: XEmacs is outputting lots of X errors. +* Q2.4.12:: After upgrading, XEmacs won't do `foo' any more! + +2.5: Startup-Related Problems +* Q2.5.1:: XEmacs cannot connect to my X Terminal! +* Q2.5.2:: Startup problems related to paths or package locations. +* Q2.5.3:: XEmacs won't start without network. +* Q2.5.4:: Startup warnings about deducing proper fonts? +* Q2.5.5:: Warnings from incorrect key modifiers. +* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? +@end menu -@node Q3.0.6, Q3.0.7, Q3.0.5, Customization -@unnumberedsubsec Q3.0.6: Can I force the output of @code{(face-list)} to a buffer? +@unnumberedsec 2.0: Installation (General) -It would be good having it in a buffer, as the output of -@code{(face-list)} is too wide to fit to a minibuffer. - -Evaluate the expression in the @samp{*scratch*} buffer with point after -the rightmost paren and typing @kbd{C-j}. +@node Q2.0.1, Q2.0.2, Installation, Installation +@unnumberedsubsec Q2.0.1: How do I build and install XEmacs? -If the minibuffer smallness is the only problem you encounter, you can -simply press @kbd{C-h l} to get the former minibuffer contents in a -buffer. +See the file @file{etc/NEWS} for information on new features and other +user-visible changes since the last version of XEmacs. -@node Q3.0.7, Q3.0.8, Q3.0.6, Customization -@unnumberedsubsec Q3.0.7: Font selections in don't get saved after @code{Save Options}. +The file @file{INSTALL} in the top-level directory says how to bring +up XEmacs on Unix and Cygwin, once you have loaded the entire subtree +of this directory. -@email{mannj@@ll.mit.edu, John Mann} writes: +See the file @file{nt/README} for instructions on building XEmacs for +Microsoft Windows. -@quotation -You have to go to Options->Frame Appearance and unselect -@samp{Frame-Local Font Menu}. If this option is selected, font changes -are only applied to the @emph{current} frame and do @emph{not} get saved -when you save options. -@end quotation +@xref{Q2.1.1}, for the installation of (essential) add on packages. -Also, set the following in your @file{init.el}/@file{.emacs}: +@node Q2.0.2, Q2.0.3, Q2.0.1, Installation +@unnumberedsubsec Q2.0.2: Where do I find external libraries? -@lisp -(setq options-save-faces t) -@end lisp +All external libraries used by XEmacs can be found on the XEmacs web +site +@iftex +@* +@end iftex +@uref{http://www.xemacs.org/Download/optLibs.html}. -@node Q3.0.8, Q3.0.9, Q3.0.7, Customization -@unnumberedsubsec Q3.0.8: How do I get a single minibuffer frame? +The library versions available here are known to work with XEmacs. +(Newer versions will probably work as well but we can't guarantee it.) +We try to keep the libraries up-to-date but may not always succeed. +Check the above page for the canonical locations of the external libraries, +allowing you to download the latest, bleeding-edge versions. -@email{acs@@acm.org, Vin Shelton} writes: +@node Q2.0.3, Q2.0.4, Q2.0.2, Installation +@unnumberedsubsec Q2.0.3: How do I specify the paths that XEmacs uses for finding files? -@lisp -(setq initial-frame-plist '(minibuffer nil)) -(setq default-frame-plist '(minibuffer nil)) -(setq default-minibuffer-frame - (make-frame - '(minibuffer only - width 86 - height 1 - menubar-visible-p nil - default-toolbar-visible-p nil - name "minibuffer" - top -2 - left -2 - has-modeline-p nil))) -(frame-notice-user-settings) -@end lisp +You can specify what paths to use by using a number of different flags +when running configure. See the section MAKE VARIABLES in the top-level +file INSTALL in the XEmacs distribution for a listing of those flags. -@strong{Please note:} The single minibuffer frame may not be to everyone's -taste, and there any number of other XEmacs options settings that may -make it difficult or inconvenient to use. +Most of the time, however, the simplest fix is: @strong{do not} specify +paths as you might for GNU Emacs. XEmacs can generally determine the +necessary paths dynamically at run time. The only path that generally +needs to be specified is the root directory to install into. That can +be specified by passing the @code{--prefix} flag to configure. For a +description of the XEmacs install tree, please consult the @file{NEWS} +file. -@node Q3.0.9, Q3.1.1, Q3.0.8, Customization -@unnumberedsubsec Q3.0.9: What is @code{Customize}? +@node Q2.0.4, Q2.0.5, Q2.0.3, Installation +@unnumberedsubsec Q2.0.4: Running XEmacs without installing -Starting with XEmacs 20.2 there is new system 'Customize' for customizing -XEmacs options. +How can I just try XEmacs without installing it? -You can access @code{Customize} from the @code{Options} menu -or invoking one of customize commands by typing eg. -@kbd{M-x customize}, @kbd{M-x customize-face}, -@kbd{M-x customize-variable} or @kbd{M-x customize-apropos}. +XEmacs will run in place without requiring installation and copying of +the Lisp directories, and without having to specify a special build-time +flag. It's the copying of the Lisp directories that requires so much +space. XEmacs is largely written in Lisp. -Starting with XEmacs 20.3 there is also new `browser' mode for Customize. -Try it out with @kbd{M-x customize-browse} +A good method is to make a shell alias for xemacs: -@node Q3.1.1, Q3.1.2, Q3.0.9, Customization -@unnumberedsec 3.1: X Window System & Resources -@unnumberedsubsec Q3.1.1: Where is a list of X resources? +@example +alias xemacs=/src/xemacs-21.5/src/xemacs +@end example -Search through the @file{NEWS} file for @samp{X Resources}. A fairly -comprehensive list is given after it. +(You will obviously use whatever directory you downloaded the source +tree to instead of @file{/src/xemacs-21.5}). -In addition, an @file{app-defaults} file @file{etc/Emacs.ad} is -supplied, listing the defaults. The file @file{etc/sample.Xresources} -gives a different set of defaults that you might consider for -installation in your @file{~/.Xresources} file. It is nearly the same -as @file{etc/Emacs.ad}, but a few entries are altered. Be careful about -installing the contents of this file into your @file{.Xresources} (or -legacy @file{.Xdefaults}) file if you use GNU Emacs under X11 as well. +This will let you run XEmacs without massive copying. -@node Q3.1.2, Q3.1.3, Q3.1.1, Customization -@unnumberedsubsec Q3.1.2: How can I detect a color display? +@node Q2.0.5, Q2.1.1, Q2.0.4, Installation +@unnumberedsubsec Q2.0.5: XEmacs is too big -You can test the return value of the function @code{(device-class)}, as -in: +The space required by the installation directories can be +reduced dramatically if desired. Gzip all the .el files. Remove all +the packages you'll never want to use. Remove the TexInfo manuals. +Remove the Info (and use just hardcopy versions of the manual). Remove +most of the stuff in etc. Remove or gzip all the source code. Gzip or +remove the C source code. Configure it so that copies are not made of +the support lisp. -@lisp -(when (eq (device-class) 'color) - (set-face-foreground 'font-lock-comment-face "Grey") - (set-face-foreground 'font-lock-string-face "Red") - .... - ) -@end lisp +These are all Emacs Lisp source code and bytecompiled object code. You +may safely gzip everything named *.el here. You may remove any package +you don't use. @emph{Nothing bad will happen if you delete a package +that you do not use}. You must be sure you do not use it though, so be +conservative at first. -@node Q3.1.3, Q3.1.4, Q3.1.2, Customization -@unnumberedsubsec Q3.1.3: [This question intentionally left blank] +Any package with the possible exceptions of xemacs-base, and EFS are +candidates for removal. Ask yourself, @emph{Do I ever want to use this +package?} If the answer is no, then it is a candidate for removal. -@node Q3.1.4, Q3.1.5, Q3.1.3, Customization -@unnumberedsubsec Q3.1.4: [This question intentionally left blank] +First, gzip all the .el files. Then go about package by package and +start gzipping the .elc files. Then run XEmacs and do whatever it is +you normally do. If nothing bad happens, then remove the package. You +can remove a package via the PUI interface +(@code{M-x pui-list-packages}, then press @kbd{d} to mark the packages +you wish to delete, and then @kbd{x} to delete them. -@node Q3.1.5, Q3.1.6, Q3.1.4, Customization -@unnumberedsubsec Q3.1.5: How can I get the icon to just say @samp{XEmacs}? +Another method is to do @code{M-x package-get-delete-package}. -I'd like the icon to just say @samp{XEmacs}, and not include the name of -the current file in it. +@unnumberedsec 2.1: Package Installation -Add the following line to your @file{init.el}/@file{.emacs}: +@node Q2.1.1, Q2.1.2, Q2.0.5, Installation +@unnumberedsubsec Q2.1.1: How do I install the packages? -@lisp -(setq frame-icon-title-format "XEmacs") -@end lisp +There are three ways to install the packages. -@node Q3.1.6, Q3.1.7, Q3.1.5, Customization -@unnumberedsubsec Q3.1.6: How can I have the window title area display the full path? +@enumerate +@item +Manually, all at once, using the 'Sumo Tarball'. +@item +Manually, using individual package tarballs. +@item +Automatically, using the package tools from XEmacs. +@end enumerate -I'd like to have the window title area display the full directory/name -of the current buffer file and not just the name. +If you don't want to mess with the packages, it is easiest to just +grab them manually, all at once. (For the other two ways, +@xref{Q2.1.2}, and @xref{Q2.1.3}.) Download the file -Add the following line to your @file{init.el}/@file{.emacs}: +@file{xemacs-sumo.tar.gz} -@lisp -(setq frame-title-format "%S: %f") -@end lisp +For an XEmacs compiled with Mule you also need -A more sophisticated title might be: +@file{xemacs-mule-sumo.tar.gz} -@lisp -(setq frame-title-format - '("%S: " (buffer-file-name "%f" - (dired-directory dired-directory "%b")))) -@end lisp +These are in the @file{packages} directory on your XEmacs mirror +archive: @uref{ftp://ftp.xemacs.org/pub/xemacs/packages} or its +mirrors. N.B. They are called 'Sumo Tarballs' for good reason. They +are currently about 19MB and 4.5MB (gzipped) respectively. -That is, use the file name, or the dired-directory, or the buffer name. +Install them on Unix and Mac OS X using the shell/Terminal command -@node Q3.1.7, Q3.1.8, Q3.1.6, Customization -@unnumberedsubsec Q3.1.7: @samp{xemacs -name junk} doesn't work? +@code{cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -} -When I run @samp{xterm -name junk}, I get an xterm whose class name -according to xprop, is @samp{junk}. This is the way it's supposed to -work, I think. When I run @samp{xemacs -name junk} the class name is -not set to @samp{junk}. It's still @samp{emacs}. What does -@samp{xemacs -name} really do? The reason I ask is that my window -manager (fvwm) will make a window sticky and I use XEmacs to read my -mail. I want that XEmacs window to be sticky, without having to use the -window manager's function to set the window sticky. What gives? +Where @samp{$prefix} is what you gave to the @samp{--prefix} flag to +@file{configure}, and defaults to @file{/usr/local}. -@samp{xemacs -name} sets the application name for the program (that is, -the thing which normally comes from @samp{argv[0]}). Using @samp{-name} -is the same as making a copy of the executable with that new name. The -@code{WM_CLASS} property on each frame is set to the frame-name, and the -application-class. So, if you did @samp{xemacs -name FOO} and then -created a frame named @var{BAR}, you'd get an X window with WM_CLASS = -@code{( "BAR", "Emacs")}. However, the resource hierarchy for this -widget would be: +If you have GNU tar you can use: -@example -Name: FOO .shell .container .BAR -Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame -@end example +@code{cd $prefix/lib/xemacs ; tar zxvf <tarballname>} -instead of the default +If you have the packages somewhere nonstandard and don't want to bother +with @samp{$prefix} (for example, you're a developer and are compiling +the packages yourself, and want your own private copy of everything), +you can also directly specify this using @file{configure}. To do this +with 21.5 and above use the @samp{--with-package-prefix} parameter to +specify the directory under which you untarred the above tarballs. +Under 21.4 and previous you need to use @samp{--package-path}. Using +these options looks something like this: @example -Name: xemacs.shell .container .emacs -Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame + configure --package-path="~/.xemacs::/src/xemacs/site-packages:/src/xemacs/xemacs-packages:/src/xemacs/mule-packages" ... @end example +Under Windows, you need to place the above @samp{tar.gz} files in the +directory specified using the @samp{PACKAGE_PREFIX} value in +@file{nt/config.inc} and by default is @file{\Program Files\XEmacs}. +(To untar a @samp{tar.gz} file you will need to use a utility such as +WinZip, unless you have Cygwin or a similar environment installed, in +which case the above Unix shell command should work fine.) If you want +the packages somewhere else, just change @samp{PACKAGE_PREFIX}. + +Note that XEmacs finds the packages automatically anywhere underneath +the directory tree where it expects to find the packages. All you +need to do is put stuff there; you don't need to run any program to +tell XEmacs to find the packges, or do anything of that sort. + +However, XEmacs will only notice newly installed packages when it +starts up, so you will have to restart if you are already running +XEmacs. -It is arguable that the first element of WM_CLASS should be set to the -application-name instead of the frame-name, but I think that's less -flexible, since it does not give you the ability to have multiple frames -with different WM_CLASS properties. Another possibility would be for -the default frame name to come from the application name instead of -simply being @samp{emacs}. However, at this point, making that change -would be troublesome: it would mean that many users would have to make -yet another change to their resource files (since the default frame name -would suddenly change from @samp{emacs} to @samp{xemacs}, or whatever -the executable happened to be named), so we'd rather avoid it. - -To make a frame with a particular name use: +For more details, @xref{Startup Paths,,,xemacs, the XEmacs User's +Manual}, and @xref{Packages,,,xemacs, the XEmacs User's Manual}. -@lisp -(make-frame '((name . "the-name"))) -@end lisp +As the Sumo tarballs are not regenerated as often as the individual +packages, it is recommended that you use the automatic package tools +afterwards to pick up any recent updates. -@node Q3.1.8, Q3.2.1, Q3.1.7, Customization -@unnumberedsubsec Q3.1.8: @samp{-iconic} doesn't work. +@emph{NOTE}: For detailed information about how the package +hierarchies work, @xref{Package Overview,,,lispref, the XEmacs Lisp +Reference Manual}. -When I start up XEmacs using @samp{-iconic} it doesn't work right. -Using @samp{-unmapped} on the command line, and setting the -@code{initiallyUnmapped} X Resource don't seem to help much either... +@node Q2.1.2, Q2.1.3, Q2.1.1, Installation +@unnumberedsubsec Q2.1.2: Can I install the packages individually? -@email{ben@@xemacs.org, Ben Wing} writes: +Yes, you can download individual packages from the FTP site (@pxref{Q2.1.1}). Since packages are automatically noticed at startup, you just have to put them in the right place. -@quotation -Ugh, this stuff is such an incredible mess that I've about given up -getting it to work. The principal problem is numerous window-manager -bugs... -@end quotation +Note: If you are upgrading packages already installed, it's best to +remove the old package first (@pxref{Q2.1.4}). -@node Q3.2.1, Q3.2.2, Q3.1.8, Customization -@unnumberedsec 3.2: Textual Fonts & Colors -@unnumberedsubsec Q3.2.1: How can I set color options from @file{init.el}/@file{.emacs}? +For example if we are installing the @samp{xemacs-base} +package (version 1.48): -How can I set the most commonly used color options from my -@file{init.el}/@file{.emacs} instead of from my @file{.Xresources}? +@example + mkdir $prefix/lib/xemacs/xemacs-packages RET # if it does not exist yet + cd $prefix/lib/xemacs/xemacs-packages RET + gunzip -c /path/to/xemacs-base-1.48-pkg.tar.gz | tar xvf - RET +@end example -Like this: +Or if you have GNU tar, the last step can be: -@lisp -(set-face-background 'default "bisque") ; frame background -(set-face-foreground 'default "black") ; normal text -(set-face-background 'zmacs-region "red") ; When selecting w/ - ; mouse -(set-face-foreground 'zmacs-region "yellow") -(set-face-font 'default "*courier-bold-r*120-100-100*") -(set-face-background 'highlight "blue") ; Ie when selecting - ; buffers -(set-face-foreground 'highlight "yellow") -(set-face-background 'modeline "blue") ; Line at bottom - ; of buffer -(set-face-foreground 'modeline "white") -(set-face-font 'modeline "*bold-r-normal*140-100-100*") -(set-face-background 'isearch "yellow") ; When highlighting - ; while searching -(set-face-foreground 'isearch "red") -(setq x-pointer-foreground-color "black") ; Adds to bg color, - ; so keep black -(setq x-pointer-background-color "blue") ; This is color - ; you really - ; want ptr/crsr -@end lisp +@example + tar zxvf /path/to/xemacs-base-1.48-pkg.tar.gz RET +@end example -@node Q3.2.2, Q3.2.3, Q3.2.1, Customization -@unnumberedsubsec Q3.2.2: How do I set the text, menu and modeline fonts? +For MULE related packages, it is best to untar into the @samp{mule-packages} +hierarchy, i.e. for the @samp{mule-base} package, version 1.37: -Note that you should use @samp{Emacs.} and not @samp{Emacs*} when -setting face values. +@example + mkdir $prefix/lib/xemacs/mule-packages RET # if it does not exist yet + cd $prefix/lib/xemacs/mule-packages RET + gunzip -c /path/to/mule-base-1.37-pkg.tar.gz | tar xvf - RET +@end example -In @file{.Xresources}: +Or if you have GNU tar, the last step can be: @example -Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-* -Emacs*menubar*font: fixed -Emacs.modeline.attributeFont: fixed + tar zxvf /path/to/mule-base-1.37-pkg.tar.gz RET @end example -This is confusing because @samp{default} and @samp{modeline} are face -names, and can be found listed with all faces in the current mode by -using @kbd{M-x set-face-font (enter) ?}. They use the face-specific -resource @samp{attributeFont}. +@node Q2.1.3, Q2.1.4, Q2.1.2, Installation +@unnumberedsubsec Q2.1.3: Can I install the packages automatically? -On the other hand, @samp{menubar} is a normal X thing that uses the -resource @samp{font}. With Motif it @emph{may be} necessary to use -@samp{fontList} @emph{instead of} @samp{font}. In @emph{non-Motif} -configurations with Mule it @emph{is} necessary to use @samp{fontSet} -instead of @samp{font}. (Sorry, there just is no simple recipe here.) +XEmacs comes with some tools to make the periodic updating and +installing easier. It will notice if new packages or versions are +available and will fetch them from the FTP site. -@node Q3.2.3, Q3.2.4, Q3.2.2, Customization -@unnumberedsubsec Q3.2.3: How can I set the colors when highlighting a region? +Unfortunately this requires that a few packages are already in place. +You will have to install them by hand as above or use a SUMO tarball. +This requirement will hopefully go away in the future. The packages +you need are: -How can I set the background/foreground colors when highlighting a -region? +@example + efs - To fetch the files from the FTP site or mirrors. + xemacs-base - Needed by efs. +@end example -You can change the face @code{zmacs-region} either in your -@file{.Xresources}: +and optionally: @example -Emacs.zmacs-region.attributeForeground: firebrick -Emacs.zmacs-region.attributeBackground: lightseagreen + mailcrypt - For PGP verification of the package-index file. @end example -or in your @file{init.el}/@file{.emacs}: - -@lisp -(set-face-background 'zmacs-region "red") -(set-face-foreground 'zmacs-region "yellow") -@end lisp +After installing these by hand, fire up XEmacs and follow these +steps. -@node Q3.2.4, Q3.2.5, Q3.2.3, Customization -@unnumberedsubsec Q3.2.4: How can I limit color map usage? +@enumerate +@item +Choose a download site. +@itemize @bullet +@item +via menu: Tools -> Packages -> Set Download Site +@item +via keyb: M-x customize-variable RET package-get-remote RET +(put in the details of remote host and directory) +@end itemize -I'm using Netscape (or another color grabber like XEmacs); -is there any way to limit the number of available colors in the color map? +If the package tarballs _AND_ the package-index file are in a +local directory, you can: M-x pui-set-local-package-get-directory RET -Answer: No, but you can start Netscape before XEmacs, and it will use -the closest available color if the colormap is full. You can also limit -the number of colors Netscape uses, using the flags -mono, -ncols <#> or --install (for mono, limiting to <#> colors, or for using a private color -map). - -If you have the money, another solution would be to use a truecolor or -direct color video. +@item +Obtain a list of packages and display the list in a buffer named +"*Packages*". +@itemize @bullet +@item +menu: Tools -> Packages -> List & Install +@item +keyb: M-x pui-list-packages RET +@end itemize -@node Q3.2.5, Q3.2.6, Q3.2.4, Customization -@unnumberedsubsec Q3.2.5: My tty supports color, but XEmacs doesn't use them. +XEmacs will now connect to the remote site and download the +latest package-index file. -XEmacs tries to automatically determine whether your tty supports color, -but sometimes guesses wrong. In that case, you can make XEmacs Do The -Right Thing using this Lisp code: +The resulting buffer, "*Packages*" has brief instructions at the +end of the buffer. -@lisp -(if (eq 'tty (device-type)) - (set-device-class nil 'color)) -@end lisp +@item +Choose the packages you wish to install. +@itemize @bullet +@item +mouse: Click button 2 on the package name. +@item +keyb: RET on the package name +@end itemize -@node Q3.2.6, Q3.2.7, Q3.2.5, Customization -@unnumberedsubsec Q3.2.6: Can I have pixmap backgrounds in XEmacs? -@c New -@email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes: +@item +Make sure you have everything you need. +@itemize @bullet +@item +menu: Packages -> Add Required +@item +keyb: r +@end itemize -@quotation -There are several ways to do it. For example, you could specify a -default pixmap image to use in your @file{~/.Xresources}, e.g., +XEmacs will now search for packages that are required by the +ones that you have chosen to install and offer to select +those packages also. +For novices and gurus alike, this step can save your bacon. +It's easy to forget to install a critical package. -@example - Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm -@end example +@item +Download and install the packages. +@itemize @bullet +@item +menu: Packages -> Install/Remove Selected +@item +keyb: x +@end itemize +@end enumerate +@node Q2.1.4, Q2.1.5, Q2.1.3, Installation +@unnumberedsubsec Q2.1.4: Can I upgrade or remove packages? -and then reload ~/.Xresources and restart XEmacs. Alternatively, -since each face can have its own pixmap background, a better way -would be to set a face's pixmap within your XEmacs init file, e.g., +As the exact files and their locations contained in a package may +change it is recommended to remove a package first before installing a +new version. In order to facilitate removal each package contains an +pgkinfo/MANIFEST.pkgname file which list all the files belong to the +package. M-x package-admin-delete-binary-package RET can be used to +remove a package using this file. -@lisp - (set-face-background-pixmap 'default "/path/to/image.xpm") - (set-face-background-pixmap 'bold "/path/to/another_image.xpm") -@end lisp +Note that the interactive package tools included with XEmacs already do +this for you. -and so on. You can also do this interactively via @kbd{M-x edit-faces}. +@node Q2.1.5, Q2.1.6, Q2.1.4, Installation +@unnumberedsubsec Q2.1.5: Which packages to install? -@end quotation +Unless you are an advanced user, just install everything. -@node Q3.2.7, Q3.3.1, Q3.2.6, Customization -@unnumberedsubsec Q3.2.7: How do I display non-ASCII characters? -@c New +If you really want to install only what's absolutely needed, a good +minimal set of packages for XEmacs-latin1 would be -If you're using a Mule-enabled XEmacs, then display is automatic. If -you're not seeing the characters you expect, either (1) you don't have -appropriate fonts available or (2) XEmacs did not correctly detect the -coding system (@pxref{Recognize Coding, , , xemacs}). In case (1), -install fonts as is customary for your platform. In case (2), you -need to tell XEmacs explicitly what coding systems you're using. -@ref{Specify Coding, , , xemacs}. +@example +xemacs-base, xemacs-devel, c-support, cc-mode, debug, dired, efs, +edit-utils, fsf-compat, mail-lib, net-utils, os-utils, prog-modes, +text-modes, time, mailcrypt +@end example -If your XEmacs is not Mule-enabled, and for some reason getting a -Mule-enabled XEmacs seems like the wrong thing to do, all is not lost. -You can arrange it by brute force. In @file{event-Xt.c} (suppress the -urge to look in this file---play Doom instead, because you'll survive -longer), it is written: +If you are using the XEmacs package tools, don't forget to do: -@quotation -In a non-Mule world, a user can still have a multi-lingual editor, by -doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all -their Latin-2 buffers, etc. -@end quotation +@example + Packages -> Add Required +@end example -For the related problem of @emph{inputting} non-ASCII characters in a -non-Mule XEmacs, @xref{Q3.5.7}. +To make sure you have everything that the packages you have chosen to +install need. -@node Q3.3.1, Q3.3.2, Q3.2.7, Customization -@unnumberedsec 3.3: The Modeline -@unnumberedsubsec Q3.3.1: How can I make the modeline go away? +@xref{Q1.7.2}, for a description of the various packages. -@lisp -(set-specifier has-modeline-p nil) -@end lisp +@node Q2.1.6, Q2.1.7, Q2.1.5, Installation +@unnumberedsubsec Q2.1.6: Can you describe the package location process in more detail? -@c Starting with XEmacs 19.14 the modeline responds to mouse clicks, so if -@c you haven't liked or used the modeline in the past, you might want to -@c try the new version out. -@c -@node Q3.3.2, Q3.3.3, Q3.3.1, Customization -@unnumberedsubsec Q3.3.2: How do you have XEmacs display the line number in the modeline? +On startup XEmacs looks for packages in so-called package hierarchies. +Normally, there are three system wide hierarchies, like this: -Add the following line to your @file{init.el}/@file{.emacs} file to -display the line number: +@example +$prefix/lib/xemacs/xemacs-packages/ + Normal packages go here. -@lisp -(line-number-mode 1) -@end lisp +$prefix/lib/xemacs/mule-packages/ + Mule packages go here and are only searched by MULE-enabled XEmacsen. -Use the following to display the column number: +$prefix/lib/xemacs/site-packages/ + Local and 3rd party packages go here. +@end example -@lisp -(column-number-mode 1) -@end lisp +This is what you get when you untar the SUMO tarballs under +@file{$prefix/lib/xemacs}. -Or select from the @code{Options} menu -@iftex -@* -@end iftex -@code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode} -and/or -@iftex -@* -@end iftex -@code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode} +@file{$prefix} is specified using the @samp{--prefix} parameter to +@file{configure}, and defaults to @file{usr/local}. -Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. +If the package path is not explicitly specified, XEmacs looks for the +package directory @file{xemacs-packages} (and @file{mule-packages} and +@file{site-packages}) first under @samp{~/.xemacs}, then for a sister +directory @file{lib/xemacs-VERSION} of the directory in which the +XEmacs executable is located, then for a sister directory +@file{lib/xemacs}. The XEmacs executable (under Unix at least) is +installed by default in @file{/usr/local/bin}; this explains why +XEmacs in its default installation will find packages that you put +under @file{/usr/local/lib/xemacs}. -@node Q3.3.3, Q3.3.4, Q3.3.2, Customization -@unnumberedsubsec Q3.3.3: How do I get XEmacs to put the time of day on the modeline? +You can specify where exactly XEmacs looks for packages by using the +@samp{--with-package-prefix} or @samp{--with-package-path} parameters to +@file{configure} (or the equivalent settings in @file{config.inc}, under +Windows), or setting the @samp{EMACSPACKAGEPATH} environment variable +(which has the same format as @samp{--with-package-path}). @xref{Q2.1.1}. -Add the following line to your @file{init.el}/@file{.emacs} file to -display the time: +See @file{configure.usage} for more info about the format of these +@file{configure} parameters. -@lisp -(display-time) -@end lisp +In addition to the system wide packages, each user can have his own +packages installed under @file{~/.xemacs/}. If you want to install +packages there using the interactive tools, you need to set +@code{package-get-install-to-user-init-directory} to @code{t}. -See @code{Customize} from the @code{Options} menu for customization. +The site-packages hierarchy replaces the old @file{site-lisp} +directory. XEmacs no longer looks into a @file{site-lisp} directly by +default. A good place to put @file{site-start.el} would be in +@file{$prefix/lib/xemacs/site-packages/lisp/}. -@node Q3.3.4, Q3.3.5, Q3.3.3, Customization -@unnumberedsubsec Q3.3.4: How do I turn off current chapter from AUC TeX modeline? +@node Q2.1.7, Q2.2.1, Q2.1.6, Installation +@unnumberedsubsec Q2.1.7: EFS fails with "500 AUTH not understood" (NEW) -With AUC TeX, fast typing is hard because the current chapter, section -etc. are given in the modeline. How can I turn this off? +A typical error: FTP Error: USER request failed; 500 AUTH not understood. -It's not AUC TeX, it comes from @code{func-menu} in @file{func-menu.el}. +Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends +on comp.emacs.xemacs: -@c Add this code to your @file{init.el}/@file{.emacs} to turn it off: -@c -@c @lisp -@c (setq fume-display-in-modeline-p nil) -@c @end lisp -@c -@c Or just add a hook to @code{TeX-mode-hook} to turn it off only for TeX -@c mode: -@c -@c @lisp -@c (add-hook 'TeX-mode-hook -@c '(lambda () (setq fume-display-in-modeline-p nil))) -@c @end lisp -@c -@email{dhughes@@origin-at.co.uk, David Hughes} writes: + tell your ftp client to not attempt AUTH authentication (or do not + use FTP servers that don't understand AUTH) -@quotation -Try this; you'll still get the function name displayed in the modeline, -but it won't attempt to keep track when you modify the file. To refresh -when it gets out of synch, you simply need click on the @samp{Rescan -Buffer} option in the function-menu. +and notes that you need to add an element (often "-u") to +`efs-ftp-program-args'. Use M-x customize-variable, and verify the +needed flag with `man ftp' or other local documentation. -@lisp -(setq-default fume-auto-rescan-buffer-p nil) -@end lisp -@end quotation +@unnumberedsec 2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW) -@node Q3.3.5, Q3.4.1, Q3.3.4, Customization -@unnumberedsubsec Q3.3.5: How can one change the modeline color based on the mode used? +@node Q2.2.1, Q2.2.2, Q2.1.7, Installation +@unnumberedsubsec Q2.2.1: Libraries in non-standard locations -You can use something like the following: +If your libraries are in a non-standard location, you can specify the location +using the following flags to @file{configure}. Under 21.4 or earlier: -@lisp -(add-hook 'lisp-mode-hook - (lambda () - (set-face-background 'modeline "red" (current-buffer)))) -@end lisp +@example +--site-libraries=WHATEVER +--site-includes=WHATEVER +@end example -Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline -colors change from the default set in your @file{init.el}/@file{.emacs}. -The change will only be made in the buffer you just entered (which -contains the Lisp file you are editing) and will not affect the modeline -colors anywhere else. +Under 21.5 or later: -Notes: +@example +--with-site-libraries=WHATEVER +--with-site-includes=WHATEVER +@end example -@itemize @bullet +If you have multiple paths to specify, use the following syntax: -@item The hook is the mode name plus @code{-hook}. eg. c-mode-hook, -c++-mode-hook, emacs-lisp-mode-hook (used for your -@file{init.el}/@file{.emacs} or a @file{xx.el} file), -lisp-interaction-mode-hook (the @samp{*scratch*} buffer), -text-mode-hook, etc. +@example +--site-libraries='/path/one /path/two /path/etc' +@end example -@item -Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)}, -otherwise you will erase anything that anybody has already put on the -hook. +If the libraries and headers reside in the directories @samp{lib} and +@samp{include} of a common root (say @samp{/sw}) then both can be +specified with a single option: -@item -You can also do @code{(set-face-font 'modeline @var{font})}, -eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*" -(current-buffer))} if you wish the modeline font to vary based on the -current mode. -@end itemize +@example +--site-prefixes=WHATEVER +@end example -There are additional modeline faces, @code{modeline-buffer-id}, -@code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which -you may want to customize. +or for 21.5: -@node Q3.4.1, Q3.4.2, Q3.3.5, Customization -@unnumberedsec 3.4: Multiple Device Support -@unnumberedsubsec Q3.4.1: How do I open a frame on another screen of my multi-headed display? +@example +--with-site-prefixes=WHATEVER +@end example -Use the command @kbd{M-x make-frame-on-display}. This command is also -on the File menu in the menubar. +@node Q2.2.2, Q2.2.3, Q2.2.1, Installation +@unnumberedsubsec Q2.2.2: Why can't I strip XEmacs? -The command @code{make-frame-on-tty} also exists, which will establish a -connection to any tty-like device. Opening the TTY devices should be -left to @code{gnuclient}, though. +@email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes: -@node Q3.4.2, Q3.5.1, Q3.4.1, Customization -@unnumberedsubsec Q3.4.2: Can I really connect to a running XEmacs after calling up over a modem? How? +@quotation +Because of the way XEmacs (and every other Emacsen, AFAIK) is built. The +link gives you a bare-boned emacs (called temacs). temacs is then run, +preloading some of the lisp files. The result is then dumped into a new +executable, named xemacs, which will contain all of the preloaded lisp +functions and data. -Yes. Use @code{gnuclient -nw}. (Prior to 20.3, use the @code{gnuattach} -program supplied with XEmacs instead.) +Now, during the dump itself, the executable (code+data+symbols) is +written on disk using a special unexec() function. This function is +obviously heavily system dependent. And on some systems, it leads to an +executable which, although valid, cannot be stripped without damage. If +memory serves, this is especially the case for AIX binaries. On other +architectures it might work OK. -Also see @ref{Q5.0.12}. +The Right Way to strip the emacs binary is to strip temacs prior to +dumping xemacs. This will always work, although you can do that only if +you install from sources (as temacs is @file{not} part of the binary +kits). +@end quotation -@node Q3.5.1, Q3.5.2, Q3.4.2, Customization -@unnumberedsec 3.5: The Keyboard -@unnumberedsubsec Q3.5.1: How can I bind complex functions (or macros) to keys? +@email{nat@@nataa.fr.eu.org, Nat Makarevitch} writes: -As an example, say you want the @kbd{paste} key on a Sun keyboard to -insert the current Primary X selection at point. You can accomplish this -with: +@quotation +Here is the trick: -@lisp -(define-key global-map [f18] 'x-insert-selection) -@end lisp +@enumerate +@item +[ ./configure; make ] -However, this only works if there is a current X selection (the -selection will be highlighted). The functionality I like is for the -@kbd{paste} key to insert the current X selection if there is one, -otherwise insert the contents of the clipboard. To do this you need to -pass arguments to @code{x-insert-selection}. This is done by wrapping -the call in a 'lambda form: +@item +rm src/xemacs -@lisp -(global-set-key [f18] - (lambda () (interactive) (x-insert-selection t nil))) -@end lisp +@item +strip src/temacs -This binds the f18 key to a @dfn{generic} functional object. The -interactive spec is required because only interactive functions can be -bound to keys. +@item +make -For the FAQ example you could use: +@item +cp src/xemacs /usr/local/bin/xemacs -@lisp -(global-set-key [(control ?.)] - (lambda () (interactive) (scroll-up 1))) -(global-set-key [(control ?;)] - (lambda () (interactive) (scroll-up -1))) -@end lisp +@item +cp lib-src/DOC-19.16-XEmacs +@iftex +\ @* +@end iftex +/usr/local/lib/xemacs-19.16/i586-unknown-linuxaout +@end enumerate +@end quotation -This is fine if you only need a few functions within the lambda body. -If you're doing more it's cleaner to define a separate function as in -question 3.5.3 (@pxref{Q3.5.3}). +@node Q2.2.3, Q2.3.1, Q2.2.2, Installation +@unnumberedsubsec Q2.2.3: X11/bitmaps/gray (or other X11-related file) not found. -@node Q3.5.2, Q3.5.3, Q3.5.1, Customization -@unnumberedsubsec Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers? +The X11R6 distribution was monolithic, but the X11R7 distribution is +much more modular. Many OS distributions omit these bitmaps (assuming +nobody uses them, evidently). Your OS distribution should have a +developer's package containing these files, probably with a name +containing the string "bitmap". Known package names (you may need to +add an extension such as .deb or .rpm) include x11/xbitmaps (Ubuntu) +and xorg-x11-xbitmaps (Fedora Core 5). -Add the following line to your @file{init.el}/@file{.emacs} file: +@unnumberedsec 2.3: Windows Installation (Windows, Cygwin, MinGW) -@lisp -(setq next-line-add-newlines nil) -@end lisp +@node Q2.3.1, Q2.3.2, Q2.2.3, Installation +@unnumberedsubsec Q2.3.1: What exactly are all the different ways to build XEmacs under Windows? -This has been the default setting in XEmacs for some time. +XEmacs can be built in several ways in the MS Windows environment. -@node Q3.5.3, Q3.5.4, Q3.5.2, Customization -@unnumberedsubsec Q3.5.3: How do I bind C-. and C-; to scroll one line up and down? +The standard way is what we call the "native" port. It uses the Win32 +API and has no connection with X whatsoever -- it does not require X +libraries to build, nor does it require an X server to run. The native +port is the most reliable version and provides the best graphical +support. Almost all development is geared towards this version, and +there is little reason not to use it. -Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and -@email{wayne@@zen.cac.stratus.com, Wayne Newberry}) to @file{.emacs}: +The second way to build is the Cygwin port. It takes advantage of +Cygnus emulation library under Win32. @xref{Q1.2.5, What are Cygwin +and MinGW, and do I need them to run XEmacs?}, for more information. -@lisp -(defun scroll-up-one-line () - (interactive) - (scroll-up 1)) +A third way is the MinGW port. It uses the Cygwin environment to +build but does not require it at runtime. @xref{Q1.2.5, What are +Cygwin and MinGW, and do I need them to run XEmacs?}, for more +information. -(defun scroll-down-one-line () - (interactive) - (scroll-down 1)) +Finally, you might also be able to build the non-Cygwin, non-MinGW "X" +port. This was actually the first version of XEmacs that ran under MS +Windows, and although the code is still in XEmacs, it's essentially +orphaned and it's unlikely it will compile without a lot of work. If +you want an MS Windows versin of XEmacs that supports X, use the Cygwin +version. (The X support there is actively maintained, so that Windows +developers can test the X support in XEmacs.) -(global-set-key [(control ?.)] 'scroll-up-one-line) ; C-. -(global-set-key [(control ?;)] 'scroll-down-one-line) ; C-; -@end lisp +@node Q2.3.2, Q2.3.3, Q2.3.1, Installation +@unnumberedsubsec Q2.3.2: What compiler/libraries do I need to compile XEmacs? -The key point is that you can only bind simple functions to keys; you -can not bind a key to a function that you're also passing arguments to. -(@pxref{Q3.5.1} for a better answer). +You need Visual C++ 4.2, 5.0, or 6.0 for the native version. (We have +some beta testers currently trying to compile with VC.NET, aka version +7.0, but we can't yet report complete success.) For the Cygwin and +MinGW versions, you need the Cygwin environment, which comes with GCC, +the compiler used for those versions. @xref{Q1.2.5, What are Cygwin +and MinGW, and do I need them to run XEmacs?}, for more information on +Cygwin and MinGW. -@node Q3.5.4, Q3.5.5, Q3.5.3, Customization -@unnumberedsubsec Q3.5.4: Globally binding @kbd{Delete}? +@node Q2.3.3, Q2.3.4, Q2.3.2, Installation +@unnumberedsubsec Q2.3.3: How do I compile the native port? -I cannot manage to globally bind my @kbd{Delete} key to something other -than the default. How does one do this? +Please read the file @file{nt/README} in the XEmacs distribution, which +contains the full description. -Answer: The problem is that many modes explicitly bind @kbd{Delete}. To -get around this, try the following: +@node Q2.3.4, Q2.3.5, Q2.3.3, Installation +@unnumberedsubsec Q2.3.4: What do I need for Cygwin? -@lisp -(defun foo () - (interactive) - (message "You hit DELETE")) +You can find the Cygwin tools and compiler at: -(define-key key-translation-map 'delete 'redirected-delete) -(global-set-key 'redirected-delete 'foo) -@end lisp +@uref{http://www.cygwin.com/} -Also see @ref{Q3.5.10}. +Click on the @samp{Install or update now!} link, which will download a +file @file{setup.exe}, which you can use to download everything +else. (You will need to pick a mirror site; @samp{mirrors.rcn.net} is +probably the best.) You should go ahead and install everything -- +you'll get various ancillary libraries that XEmacs needs or likes, +e.g. XPM, PNG, JPEG, TIFF, etc. You can also get X Windows here, if you +want to compile under X. -@node Q3.5.5, Q3.5.6, Q3.5.4, Customization -@unnumberedsubsec Q3.5.5: Scrolling one line at a time. +If you want to compile without X, you will need the @file{xpm-nox} +library, which must be specifically selected in the Cygwin netinstaller; +it is not selected by default. The package has had various names. +Currently it is called @file{cygXpm-noX4.dll}. -Can the cursor keys scroll the screen a line at a time, rather than the -default half page jump? I tend it to find it disorienting. +@node Q2.3.5, Q2.3.6, Q2.3.4, Installation +@unnumberedsubsec Q2.3.5: How do I compile under Cygwin? -Try this: +Similar as on Unix; use the usual `configure' and `make' process. +Some problems to watch out for: -@lisp -(defun scroll-one-line-up (&optional arg) - "Scroll the selected window up (forward in the text) one line (or N lines)." - (interactive "p") - (scroll-up (or arg 1))) - -(defun scroll-one-line-down (&optional arg) - "Scroll the selected window down (backward in the text) one line (or N)." - (interactive "p") - (scroll-down (or arg 1))) - -(global-set-key [up] 'scroll-one-line-up) -(global-set-key [down] 'scroll-one-line-down) -@end lisp +@itemize @bullet +@item +make sure HOME is set. This controls where you +@file{init.el} file comes from; -The following will also work but will affect more than just the cursor -keys (i.e. @kbd{C-n} and @kbd{C-p}): +@item +@samp{CYGWIN} needs to be set to @samp{tty} for process support to work; -@lisp -(setq scroll-step 1) -@end lisp +@item +picking up some other grep or other UNIX-like tools can kill configure; -Starting with XEmacs-20.3 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...} or type -@kbd{M-x customize @key{RET} windows @key{RET}}. +@item +static heap too small, adjust @file{src/sheap-adjust.h} to a more positive +number; -@node Q3.5.6, Q3.5.7, Q3.5.5, Customization -@unnumberedsubsec Q3.5.6: How to map @kbd{Help} key alone on Sun type4 keyboard? +@item +(Unconfirmed) The Cygwin version doesn't understand +@file{//machine/path} type paths so you will need to manually mount a +directory of this form under a unix style directory for a build to work +on the directory; -The following works in GNU Emacs 19: +@item +If you're building @strong{WITHOUT} X11, don't forget to change symlinks +@file{/usr/lib/libXpm.a} and @file{/usr/lib/libXpm.dll.a} to point to +the non-X versions of these libraries. By default they point to the X +versions. So: -@lisp -(global-set-key [help] 'help-command);; Help -@end lisp +@example +/usr/lib/libXpm.a -> /usr/lib/libXpm-noX.a +/usr/lib/libXpm.dll.a -> /usr/lib/libXpm-noX.dll.a +@end example -The following works in XEmacs with the addition of shift: +(This advice may now be obsolete because of the availability of the +cygXpm-noX4.dll package from Cygwin. Send confirmation to +@email{faq@@xemacs.org}.) -@lisp -(global-set-key [(shift help)] 'help-command);; Help -@end lisp +@item +Other problems are listed in the @file{PROBLEMS} file, in the top-level +directory of the XEmacs sources. -But it doesn't work alone. This is in the file @file{PROBLEMS} which -should have come with your XEmacs installation: @emph{Emacs ignores the -@kbd{help} key when running OLWM}. +@end itemize -OLWM grabs the @kbd{help} key, and retransmits it to the appropriate -client using -@iftex -@* -@end iftex -@code{XSendEvent}. Allowing Emacs to react to synthetic -events is a security hole, so this is turned off by default. You can -enable it by setting the variable @code{x-allow-sendevents} to t. You -can also cause fix this by telling OLWM to not grab the help key, with -the null binding @code{OpenWindows.KeyboardCommand.Help:}. -@node Q3.5.7, Q3.5.8, Q3.5.6, Customization -@unnumberedsubsec Q3.5.7: How can you type in special characters in XEmacs? -@c Changed -One way is to use the package @code{x-compose}. Then you can use -sequences like @kbd{Compose " a} to get ä, etc. +@node Q2.3.6, Q2.3.7, Q2.3.5, Installation +@unnumberedsubsec Q2.3.6: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})? -Another way is to use the @code{iso-insert} package. Then you can use -sequences like @kbd{C-x 8 " a} to get ä, etc. +Similar to the method for Unix. Things to remember: -@email{glynn@@sensei.co.uk, Glynn Clements} writes: +@itemize @bullet +@item +Specify the target host on the command line for @file{./configure}, e.g. +@samp{./configure i586-pc-mingw32}. -@quotation -It depends upon your X server. +@item +Be sure that your build directory is mounted such that it has the +same path either as a cygwin path (@file{/build/xemacs}) or as a Windows +path (@file{c:\build\xemacs}). -Generally, the simplest way is to define a key as Multi_key with -xmodmap, e.g. -@c hey, show some respect, willya -- there's xkeycaps, isn't there? -- -@c chr ;) -@example - xmodmap -e 'keycode 0xff20 = Multi_key' -@end example +@item +Build @samp{gcc -mno-cygwin} versions of the extra libs, i.e. @file{libpng}, +@file{compface}, etc. -You will need to pick an appropriate keycode. Use xev to find out the -keycodes for each key. +@item +Specify the target location of the extra libs on the command line +to @file{configure}, e.g.for 21.4 or earlier +@samp{./configure --site-prefixes=/build/libs i586-pc-mingw32} and for +21.5 or later +@samp{./configure --with-site-prefixes=/build/libs i586-pc-mingw32}. +@end itemize -[NB: On a `Windows' keyboard, recent versions of XFree86 automatically -define the right `Windows' key as Multi_key'.] +@node Q2.3.7, Q2.3.8, Q2.3.6, Installation +@unnumberedsubsec Q2.3.7: How do I compile with X support? + +To compile under Cygwin, all you need to do is install XFree86, which +is available as part of the standard Cygwin installation. +@uref{http://www.cygwin.com/}. Once installed, @file{configure} +should automatically find the X libraries and compile with X support. + +As noted above, the non-Cygwin X support is basically orphaned, and +probably won't work. But if it want to try, it's described in +@file{nt/README} in some detail. Basically, you need to get X11 +libraries from @uref{http://ftp.x.org}, and compile them. If the +precompiled versions are available somewhere, we don't know of it. + +@node Q2.3.8, Q2.4.1, Q2.3.7, Installation +@unnumberedsubsec Q2.3.8: Cygwin XEmacs won't start -- cygXpm-noX4.dll was not found (NEW) + +The Cygwin binary distributed with the netinstaller uses an external DLL +to handle XPM images (such as toolbar buttons). You may get an error like -Once you have Multi_key defined, you can use e.g. @example - Multi a ' => á - Multi e " => ë - Multi c , => ç +This application has failed to start because cygXpm-noX4.dll was not found. +Re-installing the application may fix this problem. @end example -etc. +Andy Piper <andy@@xemacs.org> sez: -Also, recent versions of XFree86 define various AltGr-<key> -combinations as dead keys, i.e. @example - AltGr [ => dead_diaeresis - AltGr ] => dead_tilde - AltGr ; => dead_acute +cygXpm-noX4 is part of the cygwin distribution under libraries or +graphics, but is not installed by default. You need to run the +cygwin setup again and select this package. @end example -etc. -Running @samp{xmodmap -pk} will list all of the defined keysyms. -@end quotation - -For the related problem of @emph{displaying} non-ASCII characters in a -non-Mule XEmacs, @xref{Q3.2.7}. +Ie, reinstalling XEmacs won't help because it is not part of the XEmacs +distribution. -@node Q3.5.8, Q3.5.9, Q3.5.7, Customization -@unnumberedsubsec Q3.5.8: [This question intentionally left blank] +@unnumberedsec 2.4: General Troubleshooting -Obsolete question, left blank to avoid renumbering. +@node Q2.4.1, Q2.4.2, Q2.3.8, Installation +@unnumberedsubsec Q2.4.1: How do I deal with bugs or with problems building, installing, or running? -@node Q3.5.9, Q3.5.10, Q3.5.8, Customization -@unnumberedsubsec Q3.5.9: How do I make the Delete key delete forward? +The file @file{PROBLEMS} contains information on many common problems that +occur in building, installing and running XEmacs. -With XEmacs-20.2 use the @code{delbs} package: +Reports of bugs in XEmacs should be sent to +@email{xemacs-beta@@xemacs.org}. You can also post to the newsgroup +comp.emacs.xemacs (or equivalentlt, send to the mailing list +@email{xemacs@@xemacs.org}), but it is less likely that the developers +will see it in a timely fashion. @xref{Bugs,,, xemacs, the XEmacs +User's Manual}, for more information on how to report bugs. +@xref{Q1.4.2}, for more information on mailing lists relating to +XEmacs. -@lisp -(require 'delbs) -@end lisp +There are three ways to read the Bugs section. -This will give you the functions @code{delbs-enable-delete-forward} to -set things up, and @code{delbs-disable-delete-forward} to revert to -``normal'' behavior. Note that @code{delbackspace} package is obsolete. +@enumerate +@item +In a printed copy of the XEmacs manual. -Starting with XEmacs-20.3 better solution is to set variable -@code{delete-key-deletes-forward} to t. You can also change this with -Customize. Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Editing->Basics->Delete Key Deletes Forward} or -type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. +@item +With Info. First, start XEmacs. From the menu, select +@samp{Help->Info (Online Docs)->Info Contents} to enter Info, then +click on @samp{XEmacs}, then on @samp{Bugs}. Or, use the keyboard: do +@kbd{C-h i} to enter Info, then @kbd{m XEmacs RET} to get to the Emacs +manual, then @kbd{m Bugs RET} to get to the section on bugs. Or use +standalone Info in a like manner. (Standalone Info is part of the +Texinfo distribution, not part of the XEmacs distribution.) -Also see @ref{Q3.5.4}. +@item +By hand. Do +@example +cat info/xemacs* | more "+/^File: xemacs.info, Node: Bugs," +@end example +@end enumerate -@node Q3.5.10, Q3.5.11, Q3.5.9, Customization -@unnumberedsubsec Q3.5.10: Can I turn on @dfn{sticky} modifier keys? +@node Q2.4.2, Q2.4.3, Q2.4.1, Installation +@unnumberedsubsec Q2.4.2: Help! XEmacs just crashed on me! -Yes, with @code{(setq modifier-keys-are-sticky t)}. This will give the -effect of being able to press and release Shift and have the next -character typed come out in upper case. This will affect all the other -modifier keys like Control and Meta as well. +First of all, don't panic. Whenever XEmacs crashes, it tries extremely +hard to auto-save all of your files before dying. (The main time that +this will not happen is if the machine physically lost power or if you +killed the XEmacs process using @code{kill -9}). The next time you try +to edit those files, you will be informed that a more recent auto-save +file exists. You can use @kbd{M-x recover-file} to retrieve the +auto-saved version of the file. -@email{ben@@xemacs.org, Ben Wing} writes: +You can use the command @kbd{M-x recover-session} after a crash to pick +up where you left off. -@quotation -One thing about the sticky modifiers is that if you move the mouse out -of the frame and back in, it cancels all currently ``stuck'' modifiers. -@end quotation +Now, XEmacs is not perfect, and there may occasionally be times, or +particular sequences of actions, that cause it to crash. If you can +come up with a reproducible way of doing this (or even if you have a +pretty good memory of exactly what you were doing at the time), the +maintainers would be very interested in knowing about it. The best +way to report a bug is using @kbd{M-x report-emacs-bug} (or by +selecting @samp{Send Bug Report...} from the Help menu). If that +won't work (e.g. you can't get XEmacs working at all), send ordinary +mail to @email{xemacs-beta@@xemacs.org}. @emph{MAKE SURE} to include +the output from the crash, especially including the Lisp backtrace, as +well as the XEmacs configuration from @kbd{M-x describe-installation} +(or equivalently, the file @file{Installation} in the top of the build +tree). Note that the developers do @emph{not} usually follow +@samp{comp.emacs.xemacs} on a regular basis; thus, this is better for +general questions about XEmacs than bug reports. -@node Q3.5.11, Q3.6.1, Q3.5.10, Customization -@unnumberedsubsec Q3.5.11: How do I map the arrow keys? -@c New -Say you want to map @kbd{C-@key{right}} to forward-word: +If at all possible, include a C stack backtrace of the core dump that +was produced. This shows where exactly things went wrong, and makes +it much easier to diagnose problems. To do this under Unix and Mac OS +X, you need to locate the core file (it's called @file{core}, and is +usually sitting in the directory that you started XEmacs from, or your +home directory if that other directory was not writable). Then, go to +that directory and execute a command like: -@email{sds@@usa.net, Sam Steingold} writes: +@example +gdb `which xemacs` core +@end example -@quotation -@lisp -; both XEmacs and Emacs -(define-key global-map [(control right)] 'forward-word) -@end lisp -or -@lisp -; Emacs only -(define-key global-map [C-right] 'forward-word) -@end lisp -or -@lisp -; ver > 20, both -(define-key global-map (kbd "C-<right>") 'forward-word) -@end lisp -@end quotation +and then issue the command @samp{where} to get the stack backtrace. You +might have to use @code{dbx} or some similar debugger in place of +@code{gdb}. If you don't have any such debugger available, complain to +your system administrator. +It's possible that a core file didn't get produced or the stack trace +from gdb is garbage, in which case you're out of luck unless you can +reproduce the bug. A nonexistent core file can happen in some +circumstances on some operating systems, depending on what exactly +triggered the crash. It's also possible, however, that your limits +are set to turn them off. You may be able to reenable them using a +command like @samp{unlimit coredumpsize} or @samp{ulimit -c}. (To find +out how your limits are set, use the command @samp{limit}.) However, if +you didn't explicitly set your limits this way, go complain to your +system administrator and tell him not to disable core files by +default. + +A garbaged stack trace can happen for various reasons. Some versions +of gdb are broken on certain operating systems and aren't able to read +the core file. It's also possible that the stack got overwritten +during the crash. A very simple reason, however, is that your version +of XEmacs was compiled without debugging information or had the +debugging information stripped. A compilation with optimization can +also result in partly or completely garbaged stack trace. In such +cases, you will need to recompile XEmacs with debugging information +and without optimization; @xref{Q2.4.4, How to debug an XEmacs problem +with a debugger}. Note also that core files currently don't work at +all under Cygwin, and the only way to get a backtrace is to run XEmacs +from gdb. + +If you cannot get a backtrace from the core dump, but can reproduce +the problem, try running XEmacs under gdb. The goal is to get clean C +and Lisp backtraces and submit a bug report including full +configuration information as described above, as this will greatly +assist in the process of tracking down the bug. However, even partial +information is better than none. The process of getting backtraces +from gdb is described in detail in @ref{Q2.4.4, How to debug an XEmacs +problem with a debugger}. +If you're under Microsoft Windows, you're out of luck unless you happen +to have a debugging aid installed on your system, for example Visual +C++. In this case, the crash will result in a message giving you the +option to enter a debugger (for example, by pressing @samp{Cancel}). Do +this and locate the stack-trace window. (If your XEmacs was built +without debugging information, the stack trace may not be very useful.) -@node Q3.6.1, Q3.6.2, Q3.5.11, Customization -@unnumberedsec 3.6: The Cursor -@unnumberedsubsec Q3.6.1: Is there a way to make the bar cursor thicker? +When making a problem report make sure that: -I'd like to have the bar cursor a little thicker, as I tend to "lose" it -often. +@enumerate +@item +Report @strong{all} of the information output by XEmacs during the +crash. -For a 1 pixel bar cursor, use: +@item +You mention what O/S and Hardware you are running XEmacs on. -@lisp -(setq bar-cursor t) -@end lisp +@item +What version of XEmacs you are running. -For a 2 pixel bar cursor, use: +@item +What build options you are using. -@lisp -(setq bar-cursor 'anything-else) -@end lisp +@item +If the problem is related to graphics and you are running Unix or Mac +OS X, we will also need to know what version of the X Window System +you are running, and what window manager you are using. -Starting with XEmacs-20.3 you can also change these with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type -@kbd{M-x customize @key{RET} display @key{RET}}. +@item +If the problem happened on a TTY, please include the terminal type. -You can use a color to make it stand out better: +@item +Try very hard to get both C and Lisp backtraces, as described above. +@end enumerate -@example -Emacs*cursorColor: Red -@end example +Much of the information above is automatically generated by @kbd{M-x +report-emacs-bug}. Even more, and often useful, information can be +generated by redirecting the output of @code{make} and @code{make check} +to a file (@file{beta.err} is the default used by @code{build-report}), +and executing @kbd{M-x build-report}. -@node Q3.6.2, Q3.6.3, Q3.6.1, Customization -@unnumberedsubsec Q3.6.2: Is there a way to get back the block cursor? -@lisp -(setq bar-cursor nil) -@end lisp +@node Q2.4.3, Q2.4.4, Q2.4.2, Installation +@unnumberedsubsec Q2.4.3: XEmacs crashes and I compiled it myself. -Starting with XEmacs 20.3 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type -@kbd{M-x customize @key{RET} display @key{RET}}. +There have been a variety of reports of crashes due to compilers with +buggy optimizers. If you are compiling with optimization, consider +turning it off (@pxref{Q2.4.4, How to debug an XEmacs problem with a +debugger}) and recompiling. -@node Q3.6.3, Q3.7.1, Q3.6.2, Customization -@unnumberedsubsec Q3.6.3: Can I make the cursor blink? +Please see the @file{PROBLEMS} file that comes with XEmacs (it's in +the top-level source directory) to read what it says about your +platform. -Yes, like this: +If you compiled XEmacs 21.4 or ealier using @samp{--use-union-type}, or +21.5 or later using @samp{--enable-union-type} (or in either case used +the option @samp{USE_UNION_TYPE} in @file{config.inc} under Windows), +try recompiling again without it. The union type has been known to +trigger compiler errors in a number of cases. -@lisp -(blink-cursor-mode) -@end lisp +@node Q2.4.4, Q2.4.5, Q2.4.3, Installation +@unnumberedsubsec Q2.4.4: How to debug an XEmacs problem with a debugger -This function toggles between a steady cursor and a blinking cursor. -You may also set this mode from the menu bar by selecting @samp{Options -=> Frame Appearance => Blinking Cursor}. Remember to save options. +If XEmacs does crash on you, one of the most productive things you can +do to help get the bug fixed is to poke around a bit with the debugger. +Here are some hints: -@node Q3.7.1, Q3.7.2, Q3.6.3, Customization -@unnumberedsec 3.7: The Mouse and Highlighting -@unnumberedsubsec Q3.7.1: How can I turn off Mouse pasting? +@itemize @bullet +@item +First of all, if the crash is at all reproducible, consider very +strongly recompiling your XEmacs with debugging symbols and with no +optimization (e.g. with GCC use the compiler flags @samp{-g -O0} -- +that's an "oh" followed by a zero), and with the configure options +@samp{--debug=yes} and @samp{--error-checking=all} +(@samp{--enable-debug=yes} and @samp{--enable-error-checking=all} on +XEmacs 21.5 or later). This will make your XEmacs run somewhat slower, +but you are a lot more likely to catch the problem earlier (closer to +its source). It makes it a lot easier to determine what's going on with +a debugger. The way to control the compiler flags is with the +configuration option @samp{--cflags} (@samp{--with-cflags} in 21.5). If +you have a recent version of 21.5, you should use +@samp{--without-optimization} in preference to directly setting +@samp{--cflags}. -I keep hitting the middle mouse button by accident and getting stuff -pasted into my buffer so how can I turn this off? +@item +If it's not a true crash (@emph{i.e.}, XEmacs is hung, or a zombie +process), or it's inconvenient to run XEmacs again because XEmacs is +already running or is running in batch mode as part of a bunch of +scripts, you may be able to attach to the existing process with your +debugger. Under Unix and Mac OS X, the typical way to do this is to +first use some variant of the @samp{ps} command to figure out the +process ID of XEmacs, for example @samp{ps -auxww | grep xemacs} under +a BSD variant, @samp{ps -elf | grep xemacs} under Linux or System V, +or @samp{ps -aW | grep xemacs} under Cygwin. Then run -Here is an alternative binding, whereby the middle mouse button selects -(but does not cut) the expression under the mouse. Clicking middle on a -left or right paren will select to the matching one. Note that you can -use @code{define-key} or @code{global-set-key}. +@example +gdb /path/to/xemacs/xemacs #### +@end example -@lisp -(defun mouse-set-point-and-select (event) - "Sets the point at the mouse location, then marks following form" - (interactive "@@e") - (mouse-set-point event) - (mark-sexp 1)) -(define-key global-map [button2] 'mouse-set-point-and-select) -@end lisp +Where @code{####} is the process id of your XEmacs. (If you're not +sure, try using @samp{which xemacs}.) When gdb attaches, the xemacs +will stop and you can type @samp{where} in gdb to get a stack trace as +usual. To get things moving again, you can just type @samp{quit} in +gdb. It'll tell you the program is running and ask if you want to +quit anyways. Say @samp{y} and it'll quit and have your emacs +continue from where it was at. -@node Q3.7.2, Q3.7.3, Q3.7.1, Customization -@unnumberedsubsec Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons? +If you're running another debugger, a similar method may work, or you +may have to run the debugger first and then use the @code{attach} +command or something similar. -Use, for instance, @code{[(meta button1)]}. For example, here is a common -setting for Common Lisp programmers who use the bundled @code{ilisp} -package, whereby meta-button1 on a function name will find the file where -the function name was defined, and put you at that location in the source -file. +Under Microsoft Windows, use the menu item @samp{Build->Start +Debug->Attach to Process...} and select the XEmacs process from the list +given. -[Inside a function that gets called by the lisp-mode-hook and -ilisp-mode-hook] +@item +If you're able to run XEmacs under a debugger and reproduce the crash, +here are some things you can do: -@lisp -(local-set-key [(meta button1)] 'edit-definitions-lisp) -@end lisp +@item +If XEmacs is hitting an assertion failure, put a breakpoint on +@code{assert_failed()}. -@node Q3.7.3, Q3.7.4, Q3.7.2, Customization -@unnumberedsubsec Q3.7.3: Clicking the left button does not do anything in buffer list. +@item +If XEmacs is hitting some weird Lisp error that's causing it to crash +(e.g. during startup), put a breakpoint on @code{signal_1()}---this is +declared static in @file{eval.c}. -I do @kbd{C-x C-b} to get a list of buffers and the entries get -highlighted when I move the mouse over them but clicking the left mouse -does not do anything. +@item +If XEmacs is outputting lots of X errors, put a breakpoint on +@code{x_error_handler()}; that will tell you which call is causing +them. Note that the result may not be very useful by default because +X Windows normally operates asynchronously: A bunch of commands are +buffered up and then sent to the server all at once. This greatly +improves performance over a network but means that an error may not be +reported until the server receives the commands, which can be long +after XEmacs made the erroneous calls. For best results, you need to +make the X server synchronous before getting the backtrace. This can +be done by starting XEmacs with the @samp{-sync} option or executing +the Lisp code @code{(x-debug-mode t)}. -Use the middle mouse button. +@item +Internally, you will probably see lots of variables that hold objects of +type @code{Lisp_Object}. These are references to Lisp objects. +Printing them out with the debugger probably won't be too +useful---you'll likely just see a number. To decode them, do this: -@node Q3.7.4, Q3.7.5, Q3.7.3, Customization -@unnumberedsubsec Q3.7.4: How can I get a list of buffers when I hit mouse button 3? +@example +call debug_print (OBJECT) +@end example -The following code will replace the default popup on button3: +where @var{OBJECT} is whatever you want to decode (it can be a variable, +a function call, etc.). This uses the Lisp printing routines to out a +readable representation on the TTY from which the xemacs process was +invoked. -@lisp -(global-set-key [button3] 'popup-buffer-menu) -@end lisp +Under 21.5 and later, @code{dp} is defined as an easier-to-type equivalent +of @code{debug_print}. You can also try @code{dpa} if you can't see +the output from @code{debug_print} (this will return a string containing +the output), or use @code{debug_p3} if @code{debug_print} itself triggers +a crash (this is a less comprehensive but super-safe way to print out +a Lisp object). -@node Q3.7.5, Q3.7.6, Q3.7.4, Customization -@unnumberedsubsec Q3.7.5: Why does cut-and-paste not work between XEmacs and a cmdtool? +@item +If you want to get a Lisp backtrace showing the Lisp call +stack, do this: -We don't know. It's a bug. There does seem to be a work-around, -however. Try running xclipboard first. It appears to fix the problem -even if you exit it. (This should be mostly fixed in 19.13, but we -haven't yet verified that). +@example +call debug_backtrace () +@end example -@node Q3.7.6, Q3.7.7, Q3.7.5, Customization -@unnumberedsubsec Q3.7.6: How I can set XEmacs up so that it pastes where the text cursor is? +Under 21.5 and later, @code{db} is defined as an easier-to-type equivalent +of @code{debug_backtrace}. -By default XEmacs pastes X selections where the mouse pointer is. How -do I disable this? +@item +Using @code{debug_print} and @code{debug_backtrace} has two +disadvantages - they can only be used with a running (including hung +or zombie) xemacs process, and they do not display the internal C +structure of a Lisp Object. Even if all you've got is a core dump, +all is not lost. -Examine the function @code{mouse-yank}, by typing @kbd{C-h f mouse-yank -@key{RET}}. +If you're using GDB, there are some macros in the file +@file{src/.gdbinit} in the XEmacs source distribution that should make +it easier for you to decode Lisp objects. This file is automatically +read by gdb if gdb is run in the directory where xemacs was built, and +contains these useful macros to inspect the state of xemacs: -To get XEmacs to paste at the text cursor, add this your @file{init.el}/@file{.emacs}: +@table @code +@item pobj +Usage: pobj lisp_object @* +Print the internal C representation of a lisp object. -@lisp -(setq mouse-yank-at-point t) -@end lisp +@item xtype +Usage: xtype lisp_object @* +Print the Lisp type of a lisp object. -Starting with XEmacs-20.2 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Editing->Mouse->Yank At Point...} or type -@kbd{M-x customize @key{RET} mouse @key{RET}}. +@item lbt +Usage: lbt @* +Print the current Lisp stack trace. +Requires a running xemacs process. (It works by calling the db +routine described above.) -@node Q3.7.7, Q3.7.8, Q3.7.6, Customization -@unnumberedsubsec Q3.7.7: How do I select a rectangular region? +@item ldp +Usage: ldp lisp_object @* +Print a Lisp Object value using the Lisp printer. +Requires a running xemacs process. (It works by calling the dp +routine described above.) -Just select the region normally, then use the rectangle commands (e.g. -@code{kill-rectangle} on it. The region does not highlight as a -rectangle, but the commands work just fine. +@item run-temacs +Usage: run-temacs @* +Run temacs interactively, like xemacs. +Use this with debugging tools (like purify) that cannot deal with dumping, +or when temacs builds successfully, but xemacs does not. -To actually sweep out rectangular regions with the mouse you can use -@code{mouse-track-do-rectangle} which is assigned to @kbd{M-button1}. -Then use rectangle commands. +@item dump-temacs +Usage: dump-temacs @* +Run the dumping part of the build procedure. +Use when debugging temacs, not xemacs! +Use this when temacs builds successfully, but xemacs does not. -You can also do the following to change default behavior to sweep out -rectangular regions: +@item check-xemacs +Usage: check-xemacs @* +Run the test suite. Equivalent to 'make check'. -@lisp -(setq mouse-track-rectangle-p t) -@end lisp +@item check-temacs +Usage: check-temacs @* +Run the test suite on temacs. Equivalent to 'make check-temacs'. +Use this with debugging tools (like purify) that cannot deal with dumping, +or when temacs builds successfully, but xemacs does not. +@end table -Starting with XEmacs-20.2 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Editing->Mouse->Track Rectangle...} or type -@kbd{M-x customize @key{RET} mouse @key{RET}}. +If you are using Sun's @file{dbx} debugger, there is an equivalent file +@file{src/.dbxrc}, which defines the same commands for dbx. +@item +If you're using a debugger to get a C stack backtrace and you're seeing +stack traces with some of the innermost frames mangled, it may be due to +dynamic linking. (This happens especially under Linux.) Consider +reconfiguring with @samp{--dynamic=no} (@samp{--with-dynamic=no} in 21.5 +or later). Also, sometimes (again under Linux), stack backtraces of +core dumps will have the frame where the fatal signal occurred mangled; +if you can obtain a stack trace while running the XEmacs process under a +debugger, the stack trace should be clean. -@example - mouse-track-do-rectangle: (event) - -- an interactive compiled Lisp function. - Like `mouse-track' but selects rectangles instead of regions. -@end example +@email{1CMC3466@@ibm.mtsac.edu, Curtiss} suggests upgrading to ld.so +version 1.8 if dynamic linking and debugging is a problem on Linux. -@node Q3.7.8, Q3.8.1, Q3.7.7, Customization -@unnumberedsubsec Q3.7.8: Why does @kbd{M-w} take so long? +@item +If you're using a debugger to get a C stack backtrace and you're +getting a completely mangled and bogus stack trace, it's probably due to +one of the following: -It actually doesn't. It leaves the region visible for a second so that -you can see what area is being yanked. If you start working, though, it -will immediately complete its operation. In other words, it will only -delay for a second if you let it. +@enumerate a +@item +Your executable has been stripped. Bad news. Tell your sysadmin not to +do this---it doesn't accomplish anything except to save a bit of disk +space, and makes debugging much much harder. -@node Q3.8.1, Q3.8.2, Q3.7.8, Customization -@unnumberedsec 3.8: The Menubar and Toolbar -@unnumberedsubsec Q3.8.1: How do I get rid of the menu (or menubar)? +@item +Your stack is getting trashed. Debugging this is hard; you have to do a +binary-search type of narrowing down where the crash occurs, until you +figure out exactly which line is causing the problem. Of course, this +only works if the bug is highly reproducible. Also, in many cases if +you run XEmacs from the debugger, the debugger can protect the stack +somewhat. However, if the stack is being smashed, it is typically the +case that there is a wild pointer somewhere in the program, often quite +far from where the crash occurs. -@c If you are running XEmacs 19.13 or earlier, add this command to your -@c @file{init.el}/@file{.emacs}. -@c -@c @lisp -@c (set-menubar nil) -@c @end lisp -@c -@c Starting with XEmacs 19.14 the preferred method is: -@c -@lisp -(set-specifier menubar-visible-p nil) -@end lisp +@item +If your stack trace has exactly one frame in it, with address 0x0, this +could simply mean that XEmacs attempted to execute code at that address, +e.g. through jumping to a null function pointer. Unfortunately, under +those circumstances, GDB under Linux doesn't know how to get a stack +trace. (Yes, this is the fourth Linux-related problem I've mentioned. I +have no idea why GDB under Linux is so bogus. Complain to the GDB +authors, or to comp.os.linux.development.system.) Again, you'll have to +use the narrowing-down process described above. -@node Q3.8.2, Q3.8.3, Q3.8.1, Customization -@unnumberedsubsec Q3.8.2: Can I customize the basic menubar? +@item +You will get a Lisp backtrace output when XEmacs crashes, so you'll have +something useful. -For an extensive menubar, add this line to your @file{init.el}/@file{.emacs}: +@end enumerate -@lisp -(load "big-menubar") -@end lisp +@item +If you compile with the newer gcc variants gcc-2.8 or egcs, you will +also need gdb 4.17 or above. Earlier releases of gdb can't handle the +debug information generated by the newer compilers. -If you'd like to write your own, this file provides as good a set of -examples as any to start from. The file is located in edit-utils -package. +@item +In versions of XEmacs before 21.2.27, @file{src/.gdbinit} was named +@file{src/gdbinit}. This had the disadvantage of not being sourced +automatically by gdb, so you had to set that up yourself. -@node Q3.8.3, Q3.8.4, Q3.8.2, Customization -@unnumberedsubsec Q3.8.3: How do I control how many buffers are listed in the menu @code{Buffers List}? +@item +If you are running Microsoft Windows, the the file @file{nt/README} for +further information about debugging XEmacs. -Add the following to your @file{init.el}/@file{.emacs} (suit to fit): +@end itemize -@lisp -(setq buffers-menu-max-size 20) -@end lisp +@node Q2.4.5, Q2.4.6, Q2.4.4, Installation +@unnumberedsubsec Q2.4.5: I get a cryptic error message when trying to do something. -For no limit, use an argument of @samp{nil}. +When I try to use some particular option of some particular package, I +get a cryptic error message in the minibuffer. + +If the message went by too quickly, use @samp{Help->Recent Messages} +from the menubar (or type @kbd{C-h l}) to see recent messages. + +If you can't figure out what's going on, select +@samp{Options->Troubleshooting->Debug on Error} from the menubar (or +type @kbd{M-:} then @kbd{(setq debug-on-error t)}) then try and make +the error happen again. This will put in the debugger (you can get +out of this and continue what you were doing before by typing @kbd{c}) +and give you a backtrace that may be enlightening. If not, try +reading through this FAQ; if that fails, you could try posting to +@samp{comp.emacs.xemacs} (making sure to include the backtrace) and +someone may be able to help. If you can identify which XEmacs Lisp +source file the error is coming from you can get a more detailed stack +backtrace by doing the following: -Starting with XEmacs-20.3 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...} or -type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}. +@enumerate +@item +Visit the .el file in an XEmacs buffer. -@node Q3.8.4, Q3.8.5, Q3.8.3, Customization -@unnumberedsubsec Q3.8.4: Resources like @code{Emacs*menubar*font} are not working? +@item +Issue the command @kbd{M-x eval-current-buffer}. -I am trying to use a resource like @code{Emacs*menubar*font} to set the -font of the menubar but it's not working. +@item +Reproduce the error. +@end enumerate -In Motif, the use of @samp{font} resources is obsoleted in order to -support internationalization. If you are using the real Motif menubar, -this resource is not recognized at all; you have to say: +For more information on debugging Lisp code, @xref{Debugging,,, +lispref, XEmacs Lisp Reference Manual}. + +@node Q2.4.6, Q2.4.7, Q2.4.5, Installation +@unnumberedsubsec Q2.4.6: XEmacs hangs when I try to do something. + +XEmacs might just be slow; some operations take a long time. XEmacs +may also be waiting on a response from the network, for example when +you are trying to send mail. + +You can usually interrupt XEmacs by typing @kbd{C-g}. If not (for +example, Lisp code explicitly disabled this by setting +@code{inhibit-quit}), you can use the "critical quit" mechanism by +typing @kbd{Control-Shift-G}. This should also pop you into the +debugger and give you a backtrace, which can tell you where the +problem is (@pxref{Q2.4.4, How to debug an XEmacs problem with a +debugger}). (Note that setting @code{debug-on-quit} or selecting +@samp{Options->Troubleshooting->Debug on Quit} will also cause regular +@kbd{C-g} to enter the debugger and give you a backtrace.) + +If you can't interrupt XEmacs this way, or for some reason XEmacs is +not talking to the keyboard, you can try sending the @samp{SIGINT} +signal using the @samp{kill} command. + +If the Lisp backtrace isn't enlightening, or if XEmacs is so hung that +you can't interrupt it at all, you could try attaching to the process +and getting a C stack backtrace. @xref{Q2.4.4, How to debug an XEmacs +problem with a debugger}. + +@node Q2.4.7, Q2.4.8, Q2.4.6, Installation +@unnumberedsubsec Q2.4.7: I get an error message when XEmacs is running in batch mode. + +Typically this happens when you are trying to compile some Elisp code. +If you are doing this as part of XEmacs or the XEmacs packages, you +should automatically get a backtrace, which can help you determine the +source of the problem. In other cases, you can get equivalent results +by setting the environment variable @samp{XEMACSDEBUG} to @samp{(setq +stack-trace-on-error t load-always-display-messages t +load-ignore-out-of-date-elc-files t load-show-full-path-in-messages +t)} (this needs to be all on one line; to set an environment variable, +use @samp{export XEMACSDEBUG='FOO'} under @samp{bash}, @samp{zsh}, +etc. or @samp{setenv XEMACSDEBUG 'FOO'} under @samp{csh} and +@samp{tcsh}). @samp{XEMACSDEBUG} specifies Lisp code that will be +executed at startup time. + +If the backtrace is not sufficiently useful in helping you diagnose +the problem, you should consider using a debugger such as GDB. +@xref{Q2.4.4, How to debug an XEmacs problem with a debugger}. You +probably want to set a breakpoint on @code{signal_1}. Since such +errors often occur during compiling, which is often triggered by a +complex command run from a make suite, it may be easier to attach to +the process once it's running. + +Under Microsoft Windows (and perhaps other operating systems), there is +another useful trick you can do if you have configured with debugging +support (configure option @samp{--debug} (@samp{--with-debug} in 21.5) +or setting @samp{DEBUG_XEMACS} in @file{nt/config.inc}). Set the +environment variable @samp{XEMACSDEBUG} (as described above) to +@samp{(setq debug-on-error t)}. Then, when an error occurs +noninteractively, instead of trying to invoke the Lisp debugger (which +obviously won't work), XEmacs will break out to a C debugger using +@code{(force-debugging-signal t)}. @emph{NOTE}: This runs +@code{abort()}!!! (As well as and after executing INT 3 under MS +Windows, which should invoke a debugger if it's active.) This is +guaranteed to kill XEmacs! (But in this situation, XEmacs is about to +die anyway, and if no debugger is present, this will usefully dump +core.) + +@node Q2.4.8, Q2.4.9, Q2.4.7, Installation +@unnumberedsubsec Q2.4.8: The keyboard or mouse is not working properly, or I have some other event-related problem. + +XEmacs has various facilities for debugging event handling. + +First, try setting the variable @code{debug-emacs-events} to non-zero. +This will output various information showing which events are being +received and how they are being translated. This may show you, for +example, that a key command is getting intercepted using +@code{key-translation-map}; this problem can otherwise be very tricky +to debug. + +Under X, you can see exactly which events are being received from the +window system by setting @code{x-debug-events} to non-zero. (The value +@samp{1} gives you regular output, and @samp{2} gives you verbose +output, including all parameters.) + +A similar facility exists under MS Windows: Set +@code{debug-mswindows-events} to non-zero. (The value @samp{1} gives +you regular output. The value @samp{2} gives you verbose output, +including all parameters. The value @samp{3} gives you +super-gorily-detailed output.) + +@node Q2.4.9, Q2.4.10, Q2.4.8, Installation +@unnumberedsubsec Q2.4.9: @kbd{C-g} doesn't work for me. Is it broken? -@example -Emacs*menubar*fontList: FONT -@end example +@kbd{C-g} does work for most people in most circumstances. If it +doesn't, there are two possible explanations: -If you are using the Lucid menubar, for backward compatibility with -existing user configurations, the @samp{font} resource is recognized. -Since this is not supported by Motif itself, the code is a kludge and -the @samp{font} resource will be recognized only if the @samp{fontList} -resource resource is unset. This means that the resource +@enumerate +@item +XEmacs is hung in a way that prevents @kbd{C-g} from working. This +can happen when code is wrapped with a binding of @code{inhibit-quit} +to @code{t}; you should still be able interrupt XEmacs using "critical +quit". On the other hand, XEmacs may be seriously wedged. (If you're +lucky, sending @samp{SIGINT} to the XEmacs process will interrupt it.) +@xref{Q2.4.6, XEmacs hangs when I try to do something.}. -@example -*fontList: FONT -@end example +@item +@kbd{C-g} is indeed broken on your system. To test, try executing +@code{(while t)} from the @samp{*scratch*} buffer. If @kbd{C-g} +doesn't interrupt, then it's broken. This used to happen with systems +where @samp{SIGIO} was broken, but @samp{BROKEN_SIGIO} wasn't defined. +However, there may not be very many such systems nowadays. +@end enumerate -will override +@node Q2.4.10, Q2.4.11, Q2.4.9, Installation +@unnumberedsubsec Q2.4.10: How do I debug process-related problems? + +Under MS Windows, you can set the variable +@code{debug-mswindows-process-command-lines} to non-@samp{nil} to get +information on exactly what is getting passed to a process. This can +be useful in determining problems with quoting. (Under Unix, a process +receives each argument separately, but under MS Windows a single +command line is received, and arguments with spaces or other special +characters in them must be quoted. Unfortunately this means that each +process, potentially at least, has its own quoting conventions, and +the code to process quoting conventions in @file{cmd.exe}, the Visual +C++ startup code and the like is baroque and poorly documented. +XEmacs uses the variable +@code{mswindows-construct-process-command-line-alist} to construct a +command line from a list of arguments based on the command to be run, +but it is (and cannot be) a perfect solution.) + +@node Q2.4.11, Q2.4.12, Q2.4.10, Installation +@unnumberedsubsec Q2.4.11: XEmacs is outputting lots of X errors. -@example -Emacs*menubar*font: FONT -@end example +If this is happening, we would very much like to know what's causing +them. To find this out, see @ref{Q2.4.4, How to debug an XEmacs +problem with a debugger}. Try to get both a C and Lisp backtrace, and +send them along with the full error output to +@email{xemacs-beta@@xemacs.org}. + +@node Q2.4.12, Q2.5.1, Q2.4.11, Installation +@unnumberedsubsec Q2.4.12: After upgrading, XEmacs won't do `foo' any more! + +You have been used to doing `foo', but now when you invoke it (or +click the toolbar button or select the menu item), nothing (or an +error) happens. The simplest explanation is that you are missing a +package that is essential to you. You can either track it down and +install it (there is a list of packages and brief descriptions of +their contents in @file{etc/PACKAGES}), or install the `Sumo Tarball' +(@pxref{Q2.1.2, How do I figure out which packages to install?}). -even though the latter is more specific. +@c #### should xref to XEmacs manual here -In non-Motif configurations using @samp{--with-mule} and -@samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet} -resource @emph{instead of} the @code{font} resource. The backward -compatibility kludge was never implemented for non-Motif builds. -Example: +@unnumberedsec 2.5: Startup-Related Problems -@example -*fontSet: FONT -@end example +@node Q2.5.1, Q2.5.2, Q2.4.12, Installation +@unnumberedsubsec Q2.5.1: XEmacs cannot connect to my X Terminal! -@node Q3.8.5, Q3.9.1, Q3.8.4, Customization -@unnumberedsubsec Q3.8.5: How can I bind a key to a function to toggle the toolbar? +Help! I can not get XEmacs to display on my Envizex X-terminal! -Try something like: +Try setting the @code{DISPLAY} variable using the numeric IP address of +the host you are running XEmacs from. -@lisp -(defun my-toggle-toolbar () - (interactive) - (set-specifier default-toolbar-visible-p - (not (specifier-instance default-toolbar-visible-p)))) -(global-set-key "\C-xT" 'my-toggle-toolbar) -@end lisp +@node Q2.5.2, Q2.5.3, Q2.5.1, Installation +@unnumberedsubsec Q2.5.2 Startup problems related to paths or package locations. -There are redisplay bugs in 19.14 that may make the preceding result in -a messed-up display, especially for frames with multiple windows. You -may need to resize the frame before XEmacs completely realizes the -toolbar is really gone. +First of all, if XEmacs can't find the packages, check to make sure +that you put the packages in the right place, or that you told XEmacs +where to look for the packages when you compiled it. @xref{Q2.1.1}. -Thanks to @email{martin@@xemacs.org, Martin Buchholz} for the correct -code. +If something is still going wrong, or you get a startup warning about +not being able to deduce some paths, you can get detailed information +on the path-searching process at startup by setting the environment +variable @samp{EMACSDEBUGPATHS} to a non-null value. One thing to +look for if you're having package problems is the value of +@samp{configure-package-path}. This corresponds to what was compiled +into XEmacs using the @samp{--package-prefix} or @samp{--package-path} +parameter (@pxref{Q2.1.1}). If this has the value of @samp{nil}, +this means that no value was compiled into XEmacs using these parameters. -@node Q3.9.1, Q3.9.2, Q3.8.5, Customization -@unnumberedsec 3.9: Scrollbars -@unnumberedsubsec Q3.9.1: How can I disable the scrollbar? +@node Q2.5.3, Q2.5.4, Q2.5.2, Installation +@unnumberedsubsec Q2.5.3: XEmacs won't start without network. -To disable them for all frames, add the following line to -your @file{.Xresources}: +If XEmacs starts when you're on the network, but fails when you're not +on the network, you may be missing a "localhost" entry in your +@file{/etc/hosts} file. The file should contain an entry like: @example -Emacs.scrollBarWidth: 0 +127.0.0.1 localhost @end example -Or select from the @code{Options} menu @code{Frame Appearance->Scrollbars}. -Remember to save options. - -To turn the scrollbar off on a per-frame basis, use the following -function: +Add that line, and XEmacs will be happy. -@lisp -(set-specifier scrollbar-width 0 (selected-frame)) -@end lisp +@node Q2.5.4, Q2.5.5, Q2.5.3, Installation +@unnumberedsubsec Q2.5.4: Startup warnings about deducing proper fonts? -You can actually turn the scrollbars on at any level you want by -substituting for (selected-frame) in the above command. For example, to -turn the scrollbars off only in a single buffer: +How can I avoid the startup warnings about deducing proper fonts? -@lisp -(set-specifier scrollbar-width 0 (current-buffer)) -@end lisp -@c -@c In XEmacs versions prior to 19.14, you had to use the hairier construct: -@c -@c @lisp -@c (set-specifier scrollbar-width (cons (selected-frame) 0)) -@c @end lisp +This is highly dependent on your installation, but try with the +following font as your base font for XEmacs and see what it does: -@node Q3.9.2, Q3.9.3, Q3.9.1, Customization -@unnumberedsubsec Q3.9.2: How can one use resources to change scrollbar colors? +@format +-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 +@end format -Here's a recap of how to use resources to change your scrollbar colors: +More precisely, do the following in your resource file: -@example -! Motif scrollbars +@format +Emacs.default.attributeFont: \ +-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 +@end format -Emacs*XmScrollBar.Background: skyblue -Emacs*XmScrollBar.troughColor: lightgray +If you just don't want to see the @samp{*Warnings*} buffer at startup +time, you can set this: -! Athena scrollbars +@lisp +(setq display-warning-minimum-level 'error) +@end lisp -Emacs*Scrollbar.Foreground: skyblue -Emacs*Scrollbar.Background: lightgray -@end example +The buffer still exists; it just isn't in your face. -Note the capitalization of @code{Scrollbar} for the Athena widget. +@node Q2.5.5, Q2.5.6, Q2.5.4, Installation +@unnumberedsubsec Q2.5.5: Warnings from incorrect key modifiers. -@node Q3.9.3, Q3.9.4, Q3.9.2, Customization -@unnumberedsubsec Q3.9.3: Moving the scrollbar can move the point; can I disable this? +The following information comes from the @file{PROBLEMS} file that comes +with XEmacs. -When I move the scrollbar in an XEmacs window, it moves the point as -well, which should not be the default behavior. Is this a bug or a -feature? Can I disable it? +If you're having troubles with HP/UX it is because HP/UX defines the +modifiers wrong in X. Here is a shell script to fix the problem; be +sure that it is run after VUE configures the X server. -The current behavior is a feature, not a bug. Point remains at the same -buffer position as long as that position does not scroll off the screen. -In that event, point will end up in either the upper-left or lower-left -hand corner. +@example +#! /bin/sh +xmodmap 2> /dev/null - << EOF +keysym Alt_L = Meta_L +keysym Alt_R = Meta_R +EOF -This cannot be changed. +xmodmap - << EOF +clear mod1 +keysym Mode_switch = NoSymbol +add mod1 = Meta_L +keysym Meta_R = Mode_switch +add mod2 = Mode_switch +EOF +@end example -@node Q3.9.4, Q3.10.1, Q3.9.3, Customization -@unnumberedsubsec Q3.9.4: How can I turn off automatic horizontal scrolling in specific modes? +@node Q2.5.6, , Q2.5.5, Installation +@unnumberedsubsec Q2.5.6: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? -Do @code{(setq truncate-lines t)} in the mode-hooks for any modes -in which you want lines truncated. +Yes. -More precisely: If @code{truncate-lines} is nil, horizontal scrollbars -will never appear. Otherwise, they will appear only if the value of -@code{scrollbar-height} for that buffer/window/etc. is non-zero. If you -do +The console was there because @file{temacs} (and in turn, @file{xemacs}) +was a console application, and Windows typically creates a new +console for a console process unless the creating process requests that +one isn't created. This used to be fixed with @file{runemacs}, a small +Windows application that existed merely to start @file{xemacs}, stating +that it didn't want a console. -@lisp -(set-specifier scrollbar-height 0) -@end lisp +XEmacs 21.4 fixes this cleanly by the virtue of being a true "GUI" +application. The explanation of what that means is included for +educational value. -then horizontal scrollbars will not appear in truncated buffers unless -the package specifically asked for them. +When building an application to be run in a Win32 environment, you must +state which sub-system it is to run in. Valid subsystems include +"console" and "gui". The subsystem you use affects the run time +libraries linked into your application, the start up function that is +run before control is handed over to your application, the entry point +to your program, and how Windows normally invokes your program. (Console +programs automatically get a console created for them at startup if +their stdin/stdout don't point anywhere useful, which is the case when +run from the GUI. This is a stupid design, of course -- instead, the +console should get created only when the first I/O actually occurs! +GUI programs have an equally stupid design: When called from +@file{CMD.EXE}/@file{COMMAND.COM}, their stdin/stdout will be set to +point nowhere useful, even though the command shell has its own +stdin/stdout. It's as if someone who had learned a bit about stdio but +had no actual knowledge of interprocess communication designed the +scheme; unfortunately, the whole process-communication aspect of the +Win32 API is equally badly designed.) For example, the entry point for a +console app is "main" (which is what you'd expect for a C/C++ program), +but the entry point for a "gui" app is "WinMain". This confuses and +annoys a lot of programmers who've grown up on Unix systems, where the +kernel doesn't really care whether your application is a gui program or +not. -@node Q3.10.1, Q3.10.2, Q3.9.4, Customization -@unnumberedsec 3.10: Text Selections -@unnumberedsubsec Q3.10.1: How can I turn off or change highlighted selections? +For reasons not altogether clear, and are lost in the mists of time and +tradition, XEmacs on Win32 started out as a console application, and +therefore a console was automatically created for it. (It may have been +made a console application partly because a console is needed in some +circumstances, especially under Win95, to interrupt, terminate, or send +signals to a child process, and because of the bogosity mentioned above +with GUI programs and the standard command shell. Currently, XEmacs +just creates and immediately hides a console when necessary, and +works around the "no useful stdio" problem by creating its own console +window as necessary to display messages in.) -The @code{zmacs} mode allows for what some might call gratuitous -highlighting for selected regions (either by setting mark or by using -the mouse). This is the default behavior. To turn off, add the -following line to your @file{init.el}/@file{.emacs} file: +@node Editing, Display, Installation, Top +@unnumbered 3 Editing Functions -@lisp -(setq zmacs-regions nil) -@end lisp +This is part 3 of the XEmacs Frequently Asked Questions list. This +section is devoted to the editing-related capabilities of XEmacs (the +keyboard, mouse, buffers, text selections, etc.) and how to customize +them. -Starting with XEmacs-20.2 you can also change this with Customize. Select -from the @code{Options} menu @code{Advanced (Customize)->Emacs->Editing->Basics->Zmacs -Regions} or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. +@menu +3.0: The Keyboard +* Q3.0.1:: How can I customize the keyboard? +* Q3.0.2:: How can I bind complex functions (or macros) to keys? +* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down? +* Q3.0.4:: Globally binding @kbd{Delete}? +* Q3.0.5:: How to map @kbd{Help} key alone on Sun type4 keyboard? +* Q3.0.6:: How can you type in special characters in XEmacs? +* Q3.0.7:: Can I turn on @dfn{sticky} modifier keys? +* Q3.0.8:: How do I map the arrow keys? +* Q3.0.9:: HP Alt key as Meta. +* Q3.0.10:: Why does edt emulation not work? +* Q3.0.11:: How can I emulate VI and use it as my default mode? + +3.1: The Mouse +* Q3.1.1:: How can I turn off Mouse pasting? +* Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons? +* Q3.1.3:: Clicking the left button does not do anything in buffer list. +* Q3.1.4:: How can I get a list of buffers when I hit mouse button 3? +* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is? + +3.2: Buffers, Text Editing +* Q3.2.1:: Can I have the end of the buffer delimited in some way? +* Q3.2.2:: How do I insert today's date into a buffer? +* Q3.2.3:: How do I get a single minibuffer frame? +* Q3.2.4:: How can I enable auto-indent and/or Filladapt? +* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default? + +3.3: Text Selections +* Q3.3.1:: How do I select a rectangular region? +* Q3.3.2:: How can I turn off or change highlighted selections? +* Q3.3.3:: How do I cause typing on an active region to remove it? +* Q3.3.4:: Can I turn off the highlight during isearch? +* Q3.3.5:: Why is killing so slow? +* Q3.3.6:: Why does @kbd{M-w} take so long? + +3.4: Editing Source Code +* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode? +* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly? +@end menu -To change the face for selection, look at @code{Options->Customize} on -the menubar. +@unnumberedsec 3.0: The Keyboard -@node Q3.10.2, Q3.10.3, Q3.10.1, Customization -@unnumberedsubsec Q3.10.2: How do I get that typing on an active region removes it? +@node Q3.0.1, Q3.0.2, Editing, Editing +@unnumberedsubsec Q3.0.1: How can I customize the keyboard? -I want to change things so that if I select some text and start typing, -the typed text replaces the selected text, similar to Motif. +#### Write me. -You want to use something called @dfn{pending delete}. Pending delete -is what happens when you select a region (with the mouse or keyboard) -and you press a key to replace the selected region by the key you typed. -Usually backspace kills the selected region. +@node Q3.0.2, Q3.0.3, Q3.0.1, Editing +@unnumberedsubsec Q3.0.2: How can I bind complex functions (or macros) to keys? -To get this behavior, ensure that you have the @file{pc} package -installed, and add the following lines to your -@file{init.el}/@file{.emacs}: +As an example, say you want the @kbd{paste} key on a Sun keyboard to +insert the current Primary X selection at point. You can accomplish this +with: @lisp -(cond - ((fboundp 'turn-on-pending-delete) - (turn-on-pending-delete)) - ((fboundp 'pending-delete-on) - (pending-delete-on t))) +(define-key global-map [f18] 'x-insert-selection) @end lisp -Note that this will work with both Backspace and Delete. This code is a -tad more complicated than it has to be for XEmacs in order to make it -more portable. - -@node Q3.10.3, Q3.10.4, Q3.10.2, Customization -@unnumberedsubsec Q3.10.3: Can I turn off the highlight during isearch? - -I do not like my text highlighted while I am doing isearch as I am not -able to see what's underneath. How do I turn it off? - -Put the following in your @file{init.el}/@file{.emacs}: +However, this only works if there is a current X selection (the +selection will be highlighted). The functionality I like is for the +@kbd{paste} key to insert the current X selection if there is one, +otherwise insert the contents of the clipboard. To do this you need to +pass arguments to @code{x-insert-selection}. This is done by wrapping +the call in a 'lambda form: @lisp -(setq isearch-highlight nil) +(global-set-key [f18] + (lambda () (interactive) (x-insert-selection t nil))) @end lisp -Starting with XEmacs-20.2 you can also change this with Customize. Type -@kbd{M-x customize-variable @key{RET} isearch-highlight @key{RET}}. - -Note also that isearch-highlight affects query-replace and ispell. -Instead of disabling isearch-highlight you may find that a better -solution consists of customizing the @code{isearch} face. - -@node Q3.10.4, Q3.10.5, Q3.10.3, Customization -@unnumberedsubsec Q3.10.4: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? +This binds the f18 key to a @dfn{generic} functional object. The +interactive spec is required because only interactive functions can be +bound to keys. -Put this in your @code{.emacs}: +For the FAQ example you could use: @lisp -(setq zmacs-regions nil) +(global-set-key [(control ?.)] + (lambda () (interactive) (scroll-up 1))) +(global-set-key [(control ?;)] + (lambda () (interactive) (scroll-up -1))) @end lisp -@strong{Warning: This command turns off all region highlighting.} - -Also see @ref{Q3.10.1}. - -@node Q3.10.5, Q3.10.6, Q3.10.4, Customization -@unnumberedsubsec Q3.10.5: The region disappears when I hit the end of buffer while scrolling. +This is fine if you only need a few functions within the lambda body. +If you're doing more it's cleaner to define a separate function. +@xref{Q3.0.3, How do I bind C-. and C-; to scroll one line up and +down?}. -This has been fixed by default starting with XEmacs-20.3. +@node Q3.0.3, Q3.0.4, Q3.0.2, Editing +@unnumberedsubsec Q3.0.3: How do I bind C-. and C-; to scroll one line up and down? -With older versions you can turn this feature (if it indeed is a feature) -off like this: +Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and +@email{wayne@@zen.cac.stratus.com, Wayne Newberry}) to @file{.emacs}: @lisp -(defadvice scroll-up (around scroll-up freeze) - (interactive "_P") - (let ((zmacs-region-stays t)) - (if (interactive-p) - (condition-case nil - ad-do-it - (end-of-buffer (goto-char (point-max)))) - ad-do-it))) - -(defadvice scroll-down (around scroll-down freeze) - (interactive "_P") - (let ((zmacs-region-stays t)) - (if (interactive-p) - (condition-case nil - ad-do-it - (beginning-of-buffer (goto-char (point-min)))) - ad-do-it))) -@end lisp - -Thanks to @email{raman@@adobe.com, T. V. Raman} for assistance in deriving this -answer. +(defun scroll-up-one-line () + (interactive) + (scroll-up 1)) -@node Q3.10.6, , Q3.10.5, Customization -@unnumberedsubsec Q3.10.6: Why is killing so slow? +(defun scroll-down-one-line () + (interactive) + (scroll-down 1)) -This actually is an X Windows question, although you'll notice it with -keyboard operations as well as while using the GUI. Basically, there -are four ways to communicate interprogram via the X server: +(global-set-key [(control ?.)] 'scroll-up-one-line) ; C-. +(global-set-key [(control ?;)] 'scroll-down-one-line) ; C-; +@end lisp -@table @strong -@item Primary selection -a transient selection that gets replaced every time a new selection is made +The key point is that you can only bind simple functions to keys; you +can not bind a key to a function that you're also passing arguments +to. (@pxref{Q3.0.2, How can I bind complex functions (or macros) to +keys?} for a better answer). -@item Secondary selection -for "exchanging" with the primary selection +@node Q3.0.4, Q3.0.5, Q3.0.3, Editing +@unnumberedsubsec Q3.0.4: Globally binding @kbd{Delete}? -@item Cut buffers -a clipboard internal to the X server (deprecated) +I cannot manage to globally bind my @kbd{Delete} key to something other +than the default. How does one do this? -@item Clipboard selection -a selection with a notification protocol that allows a separate app to -manage the clipboard -@end table +Answer: The problem is that many modes explicitly bind @kbd{Delete}. To +get around this, try the following: -The cut buffers are deprecated because managing them is even more -inefficient than the clipboard notification protocol. The primary -selection works fine for many users and applications, but is not very -robust under intensive or sophisticated use. +@lisp +(defun foo () + (interactive) + (message "You hit DELETE")) -In Motif and MS Windows, a clipboard has become the primary means for -managing cut and paste. These means that "modern" applications tend to -be oriented toward a true clipboard, rather than the primary selection. -(On Windows, there is nothing equivalent to the primary selection.) -It's not that XEmacs doesn't support the simple primary selection -method, it's that more and more other applications don't. +(define-key key-translation-map 'delete 'redirected-delete) +(global-set-key 'redirected-delete 'foo) +@end lisp -So the slowdown occurs because XEmacs now engages in the clipboard -notification protocol on @emph{every} kill. This is especially slow on -Motif. +@node Q3.0.5, Q3.0.6, Q3.0.4, Editing +@unnumberedsubsec Q3.0.5: How to map @kbd{Help} key alone on Sun type4 keyboard? -With most people running most clients and server on the same host, and -many of the rest working over very fast communication, you may expect -that the situation is not going to improve. +The following works in GNU Emacs 19: -There are a number of workarounds. The most effective is to use a -special command to do selection ownership only when you intend to paste -to another application. Useful commands are @code{kill-primary-selection} -and @code{copy-primary-selection}. These work only on text selected -with the mouse (probably; experiment), and are bound by default to the -@kbd{Cut} and @kbd{Copy}, respectively, buttons on the toolbar. -@code{copy-primary-selection} is also bound to @kbd{C-Insert}. You can -yank the clipboard contents with @code{yank-primary-selection}, bound to -the @kbd{Paste} toolbar button and @kbd{Sh-Insert}. +@lisp +(global-set-key [help] 'help-command);; Help +@end lisp -If you are communicating by cut and paste with applications that use the -primary selection, then you can customize -@code{interprogram-cut-function} to @code{nil}, restoring the XEmacs -version 20 behavior. How can you tell if a program will support this? -Motifly-correct programs require the clipboard; you lose. For others, -only by trying it. You also need to customize the complementary -@code{interprogram-paste-function} to @code{nil}. (Otherwise -XEmacs-to-XEmacs pastes will not work correctly.) +The following works in XEmacs with the addition of shift: -You may get some relief on Motif by setting -@code{x-selection-strict-motif-ownership} to nil, but this means you will -only intermittently be able to paste XEmacs kills to Motif applications. +@lisp +(global-set-key [(shift help)] 'help-command);; Help +@end lisp -Thanks to Jeff Mincy and Glynn Clements for corrections. +But it doesn't work alone. This is in the file @file{PROBLEMS} which +should have come with your XEmacs installation: @emph{Emacs ignores the +@kbd{help} key when running OLWM}. -@node Subsystems, Miscellaneous, Customization, Top -@unnumbered 4 Major Subsystems +OLWM grabs the @kbd{help} key, and retransmits it to the appropriate +client using +@iftex +@* +@end iftex +@code{XSendEvent}. Allowing Emacs to react to synthetic +events is a security hole, so this is turned off by default. You can +enable it by setting the variable @code{x-allow-sendevents} to t. You +can also cause fix this by telling OLWM to not grab the help key, with +the null binding @code{OpenWindows.KeyboardCommand.Help:}. -This is part 4 of the XEmacs Frequently Asked Questions list. This -section is devoted to major XEmacs subsystems. +@node Q3.0.6, Q3.0.7, Q3.0.5, Editing +@unnumberedsubsec Q3.0.6: How can you type in special characters in XEmacs? +One way is to use the package @code{x-compose}. Then you can use +sequences like @kbd{Compose " a} to get ä, etc. -@menu -Reading Mail with VM: -* Q4.0.1:: How do I set up VM to retrieve remote mail using POP? -* Q4.0.2:: How do I get VM to filter mail for me? -* Q4.0.3:: How can I get VM to automatically check for new mail? -* Q4.0.4:: [This question intentionally left blank] -* Q4.0.5:: How do I get my outgoing mail archived? -* Q4.0.6:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? -* Q4.0.7:: Is there a mailing list or FAQ for VM? -* Q4.0.8:: Remote mail reading with VM. -* Q4.0.9:: rmail or VM gets an error incorporating new mail. -* Q4.0.10:: How do I make VM stay in a single frame? -* Q4.0.11:: How do I make VM or mh-e display graphical smilies? -* Q4.0.12:: Customization of VM not covered in the manual or here. - -Web browsing with W3: -* Q4.1.1:: What is W3? -* Q4.1.2:: How do I run W3 from behind a firewall? -* Q4.1.3:: Is it true that W3 supports style sheets and tables? - -Reading Netnews and Mail with Gnus: -* Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh! -* Q4.2.2:: [This question intentionally left blank] -* Q4.2.3:: How do I make Gnus stay within a single frame? -* Q4.2.4:: How do I customize the From: line? - -Other Mail & News: -* Q4.3.1:: How can I read and/or compose MIME messages? -* Q4.3.2:: What is TM and where do I get it? -* Q4.3.3:: Why isn't this @code{movemail} program working? -* Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems? -* Q4.3.5:: Where do I find pstogif (required by tm)? - -Sparcworks, EOS, and WorkShop: -* Q4.4.1:: What is SPARCworks, EOS, and WorkShop -* Q4.4.2:: How do I start the Sun Workshop support in XEmacs 21? - -Energize: -* Q4.5.1:: What is/was Energize? - -Infodock: -* Q4.6.1:: What is Infodock? - -Other Unbundled Packages: -* Q4.7.1:: What is AUC TeX? Where do you get it? -* Q4.7.2:: Are there any Emacs Lisp Spreadsheets? -* Q4.7.3:: [This question intentionally left blank] -* Q4.7.4:: Problems installing AUC TeX -* Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs? -* Q4.7.6:: Is there a MatLab mode? -* Q4.7.7:: Can I edit files on other hosts? -@end menu +Another way is to use the @code{iso-insert} package. Then you can use +sequences like @kbd{C-x 8 " a} to get ä, etc. -@node Q4.0.1, Q4.0.2, Subsystems, Subsystems -@unnumberedsec 4.0: Reading Mail with VM -@unnumberedsubsec Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP? +@email{glynn@@sensei.co.uk, Glynn Clements} writes: -Use @code{vm-spool-files}, like this for example: +@quotation +It depends upon your X server. -@lisp -(setq vm-spool-files '("/var/spool/mail/wing" - "netcom23.netcom.com:110:pass:wing:MYPASS")) -@end lisp +Generally, the simplest way is to define a key as Multi_key with +xmodmap, e.g. +@c hey, show some respect, willya -- there's xkeycaps, isn't there? -- +@c chr ;) +@example + xmodmap -e 'keycode 0xff20 = Multi_key' +@end example -Of course substitute your actual password for MYPASS. +You will need to pick an appropriate keycode. Use xev to find out the +keycodes for each key. -@node Q4.0.2, Q4.0.3, Q4.0.1, Subsystems -@unnumberedsubsec Q4.0.2: How do I get VM to filter mail for me? +[NB: On a `Windows' keyboard, recent versions of XFree86 automatically +define the right `Windows' key as Multi_key'.] -One possibility is to use procmail to split your mail before it gets to -VM. I prefer this personally, since there are many strange and -wonderful things one can do with procmail. Procmail may be found at -@uref{ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/}. +Once you have Multi_key defined, you can use e.g. +@example + Multi a ' => á + Multi e " => ë + Multi c , => ç +@end example -Also see the Mail Filtering FAQ at: -@iftex -@* -@end iftex -@uref{ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq}. -@c Link above, -@c <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html> -@c was dead. +etc. + +Also, recent versions of XFree86 define various AltGr-<key> +combinations as dead keys, i.e. +@example + AltGr [ => dead_diaeresis + AltGr ] => dead_tilde + AltGr ; => dead_acute +@end example +etc. + +Running @samp{xmodmap -pk} will list all of the defined keysyms. +@end quotation -@node Q4.0.3, Q4.0.4, Q4.0.2, Subsystems -@unnumberedsubsec Q4.0.3: How can I get VM to automatically check for new mail? +For the related problem of @emph{displaying} non-ASCII characters in a +non-Mule XEmacs, @xref{Q4.0.8, How do I display non-ASCII characters?}. -@email{turner@@lanl.gov, John Turner} writes: +@node Q3.0.7, Q3.0.8, Q3.0.6, Editing +@unnumberedsubsec Q3.0.7: Can I turn on @dfn{sticky} modifier keys? + +Yes, with @code{(setq modifier-keys-are-sticky t)}. This will give the +effect of being able to press and release Shift and have the next +character typed come out in upper case. This will affect all the other +modifier keys like Control and Meta as well. + +@email{ben@@xemacs.org, Ben Wing} writes: @quotation -Use the following: +One thing about the sticky modifiers is that if you move the mouse out +of the frame and back in, it cancels all currently ``stuck'' modifiers. +@end quotation + +@node Q3.0.8, Q3.0.9, Q3.0.7, Editing +@unnumberedsubsec Q3.0.8: How do I map the arrow keys? +@c New +Say you want to map @kbd{C-@key{right}} to forward-word: + +@email{sds@@usa.net, Sam Steingold} writes: +@quotation @lisp -(setq vm-auto-get-new-mail 60) +; both XEmacs and Emacs +(define-key global-map [(control right)] 'forward-word) +@end lisp +or +@lisp +; Emacs only +(define-key global-map [C-right] 'forward-word) +@end lisp +or +@lisp +; ver > 20, both +(define-key global-map (kbd "C-<right>") 'forward-word) @end lisp @end quotation -@node Q4.0.4, Q4.0.5, Q4.0.3, Subsystems -@unnumberedsubsec Q4.0.4: [This question intentionally left blank] +@node Q3.0.9, Q3.0.10, Q3.0.8, Editing +@unnumberedsubsec Q3.0.9: HP Alt key as Meta. -Obsolete question, left blank to avoid renumbering. +How can I make XEmacs recognize the Alt key of my HP workstation as a +Meta key? -@node Q4.0.5, Q4.0.6, Q4.0.4, Subsystems -@unnumberedsubsec Q4.0.5: How do I get my outgoing mail archived? +Put the following line into a file and load it with xmodmap(1) before +starting XEmacs: -@lisp -(setq mail-archive-file-name "~/outbox") -@end lisp +@example +remove Mod1 = Mode_switch +@end example -@node Q4.0.6, Q4.0.7, Q4.0.5, Subsystems -@unnumberedsubsec Q4.0.6: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? +@node Q3.0.10, Q3.0.11, Q3.0.9, Editing +@unnumberedsubsec Q3.0.10: Why does edt emulation not work? -Set @code{vm-reply-ignored-addresses} to a list, like +We don't know, but you can use tpu-edt emulation instead, which works +fine and is a little fancier than the standard edt emulation. To do +this, add the following line to your @file{init.el}: @lisp -(setq vm-reply-ignored-addresses - '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com" - "wing@@netcom.com" "wing@@xemacs.org")) +(tpu-edt) @end lisp -Note that each string is a regular expression. - -@node Q4.0.7, Q4.0.8, Q4.0.6, Subsystems -@unnumberedsubsec Q4.0.7: Is there a mailing list or FAQ for VM? +If you don't want it to replace @kbd{C-h} with an edt-style help menu +add this as well: -A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}. +@lisp +(global-set-key [(control h)] 'help-for-help) +@end lisp -VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug. +@node Q3.0.11, Q3.1.1, Q3.0.10, Editing +@unnumberedsubsec Q3.0.11: How can I emulate VI and use it as my default mode? -@node Q4.0.8, Q4.0.9, Q4.0.7, Subsystems -@unnumberedsubsec Q4.0.8: Remote mail reading with VM. +Our recommended VI emulator is viper. To make viper-mode the default, +add this to your @file{init.el}: -My mailbox lives at the office on a big honkin server. My regular INBOX -lives on my honkin desktop machine. I now can PPP to the office from -home which is far from honking... I'd like to be able to read mail at -home without storing it here and I'd like to use xemacs and VM at -home... Is there a recommended setup? +@lisp +(viper-mode) +@end lisp -@email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes: +@email{kifer@@CS.SunySB.EDU, Michael Kifer} writes: @quotation -There are several ways to do this. +This should be added as close to the top of @file{init.el} as you can get +it, otherwise some minor modes may not get viper-ized. +@end quotation -@enumerate -@item -Set your display to your home machine and run dxpc or one of the other X -compressors. +@unnumberedsec 3.1: The Mouse -@item -NFS mount your desktop machine on your home machine and modify your pop -command on your home machine to rsh to your desktop machine and actually -do the pop get's. +@node Q3.1.1, Q3.1.2, Q3.0.11, Editing +@unnumberedsubsec Q3.1.1: How can I turn off Mouse pasting? -@item -Run a POP server on your desktop machine as well and do a sort of two -tiered POP get. -@end enumerate -@end quotation +I keep hitting the middle mouse button by accident and getting stuff +pasted into my buffer so how can I turn this off? - @email{wmperry@@monolith.spry.com, William Perry} adds: +Here is an alternative binding, whereby the middle mouse button selects +(but does not cut) the expression under the mouse. Clicking middle on a +left or right paren will select to the matching one. Note that you can +use @code{define-key} or @code{global-set-key}. -@quotation -Or you could run a pop script periodically on your desktop machine, and -just use ange-ftp or NFS to get to your mailbox. I used to do this all -the time back at IU. -@end quotation +@lisp +(defun mouse-set-point-and-select (event) + "Sets the point at the mouse location, then marks following form" + (interactive "@@e") + (mouse-set-point event) + (mark-sexp 1)) +(define-key global-map [button2] 'mouse-set-point-and-select) +@end lisp -@node Q4.0.9, Q4.0.10, Q4.0.8, Subsystems -@unnumberedsubsec Q4.0.9: rmail or VM gets an error incorporating new mail. +@node Q3.1.2, Q3.1.3, Q3.1.1, Editing +@unnumberedsubsec Q3.1.2: How do I set control/meta/etc modifiers on mouse buttons? -Quoting the XEmacs PROBLEMS file: +Use, for instance, @code{[(meta button1)]}. For example, here is a common +setting for Common Lisp programmers who use the bundled @code{ilisp} +package, whereby meta-button1 on a function name will find the file where +the function name was defined, and put you at that location in the source +file. -@quotation -rmail and VM get new mail from @file{/usr/spool/mail/$USER} using a -program called @code{movemail}. This program interlocks with -@code{/bin/mail} using the protocol defined by @code{/bin/mail}. +[Inside a function that gets called by the lisp-mode-hook and +ilisp-mode-hook] -There are two different protocols in general use. One of them uses the -@code{flock} system call. The other involves creating a lock file; -@code{movemail} must be able to write in @file{/usr/spool/mail} in order -to do this. You control which one is used by defining, or not defining, -the macro @code{MAIL_USE_FLOCK} in @file{config.h} or the m- or s- file -it includes. +@lisp +(local-set-key [(meta button1)] 'edit-definitions-lisp) +@end lisp -@strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR -SYSTEM, YOU CAN LOSE MAIL!} - -If your system uses the lock file protocol, and fascist restrictions -prevent ordinary users from writing the lock files in -@file{/usr/spool/mail}, you may need to make @code{movemail} setgid to a -suitable group such as @samp{mail}. You can use these commands (as -root): - -@example -chgrp mail movemail -chmod 2755 movemail -@end example +@node Q3.1.3, Q3.1.4, Q3.1.2, Editing +@unnumberedsubsec Q3.1.3: Clicking the left button does not do anything in buffer list. -If your system uses the lock file protocol, and fascist restrictions -prevent ordinary users from writing the lock files in -@file{/usr/spool/mail}, you may need to make @code{movemail} setgid to a -suitable group such as @code{mail}. To do this, use the following -commands (as root) after doing the make install. - -@example -chgrp mail movemail -chmod 2755 movemail -@end example +I do @kbd{C-x C-b} to get a list of buffers and the entries get +highlighted when I move the mouse over them but clicking the left mouse +does not do anything. -Installation normally copies movemail from the build directory to an -installation directory which is usually under @file{/usr/local/lib}. -The installed copy of @code{movemail} is usually in the directory -@file{/usr/local/lib/emacs/VERSION/TARGET}. You must change the group -and mode of the installed copy; changing the group and mode of the build -directory copy is ineffective. -@end quotation +Use the middle mouse button. -@node Q4.0.10, Q4.0.11, Q4.0.9, Subsystems -@unnumberedsubsec Q4.0.10: How do I make VM stay in a single frame? +@node Q3.1.4, Q3.1.5, Q3.1.3, Editing +@unnumberedsubsec Q3.1.4: How can I get a list of buffers when I hit mouse button 3? -John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes: +The following code will replace the default popup on button3: -@quotation @lisp - ; Don't use multiple frames -(setq vm-frame-per-composition nil) -(setq vm-frame-per-folder nil) -(setq vm-frame-per-edit nil) -(setq vm-frame-per-summary nil) +(global-set-key [button3] 'popup-buffer-menu) @end lisp -@end quotation -@node Q4.0.11, Q4.0.12, Q4.0.10, Subsystems -@unnumberedsubsec Q4.0.11: How do I make VM or mh-e display graphical smilies? -@c Changed June -For mh-e use the following: +@node Q3.1.5, Q3.2.1, Q3.1.4, Editing +@unnumberedsubsec Q3.1.5: How can I set XEmacs up so that it pastes where the text cursor is? -@lisp -(add-hook 'mh-show-mode-hook '(lambda () - (smiley-region (point-min) - (point-max)))) -@end lisp +By default XEmacs pastes X selections where the mouse pointer is. How +do I disable this? -@email{bill@@carpenter.ORG, WJCarpenter} writes: -For VM use the following: -@lisp - (autoload 'smiley-region "smiley" nil t) - (add-hook 'vm-select-message-hook - '(lambda () - (smiley-region (point-min) - (point-max)))) -@end lisp +Examine the function @code{mouse-yank}, by typing @kbd{C-h f mouse-yank +@key{RET}}. + +To get XEmacs to paste at the text cursor, add this your @file{init.el}: -For tm use the following: @lisp -(autoload 'smiley-buffer "smiley" nil t) -(add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer) +(setq mouse-yank-at-point t) @end lisp -@node Q4.0.12, Q4.1.1, Q4.0.11, Subsystems -@unnumberedsubsec Q4.0.12: Customization of VM not covered in the manual, or here. +You can also change this with Customize. Select from the +@code{Options} menu @code{Advanced +(Customize)->Emacs->Editing->Mouse->Yank At Point...} or type @kbd{M-x +customize @key{RET} mouse @key{RET}}. -@email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes: - -@quotation -The meta-answer is to look into the file @file{vm-vars.el}, in the vm -directory of the lisp library. +@unnumberedsec 3.2: Buffers, Text Editing -@file{vm-vars.el} contains, initializes and carefully describes, with -examples of usage, the plethora of user options that @emph{fully} -control VM's behavior. +@node Q3.2.1, Q3.2.2, Q3.1.5, Editing +@unnumberedsubsec Q3.2.1: Can I have the end of the buffer delimited in some way? -Enter vm-vars, @code{forward-search} for toolbar, find the variables -that control the toolbar placement, appearance, existence, copy to your -@file{init.el}/@file{.emacs} or @file{.vm} and modify according to the -detailed instructions. +Say, with: @samp{[END]}? -The above also applies to all the various features of VM: search for -some keywords, maybe the first you conjure isn't appropriate, find the -appropriate variables, copy and experiment. -@end quotation +Try this: -@node Q4.1.1, Q4.1.2, Q4.0.12, Subsystems -@unnumberedsec 4.1: Web browsing with W3 -@unnumberedsubsec Q4.1.1: What is W3? +@lisp +(let ((ext (make-extent (point-min) (point-max)))) + (set-extent-property ext 'start-closed t) + (set-extent-property ext 'end-closed t) + (set-extent-property ext 'detachable nil) + (set-extent-end-glyph ext (make-glyph [string :data "[END]"]))) +@end lisp -W3 is an advanced graphical browser written in Emacs lisp that runs on -XEmacs. It has full support for cascaded style sheets, and more... +Since this is XEmacs, you can specify an icon to be shown on +window-system devices. To do so, change the @code{make-glyph} call to +something like this: -It has a home web page at -@uref{http://www.cs.indiana.edu/elisp/w3/docs.html}. +@lisp +(make-glyph '([xpm :file "~/something.xpm"] + [string :data "[END]"])) +@end lisp -@node Q4.1.2, Q4.1.3, Q4.1.1, Subsystems -@unnumberedsubsec Q4.1.2: How do I run W3 from behind a firewall? +You can inline the @sc{xpm} definition yourself by specifying +@code{:data} instead of @code{:file}. Here is such a full-featured +version that works on both X and TTY devices: -There is a long, well-written, detailed section in the W3 manual that -describes how to do this. Look in the section entitled "Firewalls". +@lisp +(let ((ext (make-extent (point-min) (point-max)))) + (set-extent-property ext 'start-closed t) + (set-extent-property ext 'end-closed t) + (set-extent-property ext 'detachable nil) + (set-extent-end-glyph ext (make-glyph '([xpm :data "\ +/* XPM */ +static char* eye = @{ +\"20 11 7 2\", +\"__ c None\" +\"_` c #7f7f7f\", +\"_a c #fefefe\", +\"_b c #7f0000\", +\"_c c #fefe00\", +\"_d c #fe0000\", +\"_e c #bfbfbf\", +\"___________`_`_`___b_b_b_b_________`____\", +\"_________`_`_`___b_c_c_c_b_b____________\", +\"_____`_`_`_e___b_b_c_c_c___b___b_______`\", +\"___`_`_e_a___b_b_d___b___b___b___b______\", +\"_`_`_e_a_e___b_b_d_b___b___b___b___b____\", +\"_`_`_a_e_a___b_b_d___b___b___b___b___b__\", +\"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\", +\"___`_`_e_a___b_b_b_d_c___b___b___d_b____\", +\"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\", +\"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\", +\"___`_____`_`_`_`___b_b_b_b_b_b__________\", +@} ;"] + [string :data "[END]"])))) +@end lisp -@node Q4.1.3, Q4.2.1, Q4.1.2, Subsystems -@unnumberedsubsec Q4.1.3: Is it true that W3 supports style sheets and tables? +Note that you might want to make this a function, and put it to a hook. +We leave that as an exercise for the reader. -Yes, and much more. W3, as distributed with the latest XEmacs is a -full-featured web browser. +@node Q3.2.2, Q3.2.3, Q3.2.1, Editing +@unnumberedsubsec Q3.2.2: How do I insert today's date into a buffer? -@node Q4.2.1, Q4.2.2, Q4.1.3, Subsystems -@unnumberedsec 4.2: Reading Netnews and Mail with Gnus -@unnumberedsubsec Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! +Like this: -The Gnus numbering issues are not meant for mere mortals to know them. -If you feel you @emph{must} enter the muddy waters of Gnus, visit the -excellent FAQ, maintained by Justin Sheehy, at: +@lisp +(insert (current-time-string)) +@end lisp -@example -@uref{http://www.ccs.neu.edu/software/contrib/gnus/} -@end example +@node Q3.2.3, Q3.2.4, Q3.2.2, Editing +@unnumberedsubsec Q3.2.3: How do I get a single minibuffer frame? -See also Gnus home page -@example -@uref{http://www.gnus.org/} -@end example +@email{acs@@acm.org, Vin Shelton} writes: -@node Q4.2.2, Q4.2.3, Q4.2.1, Subsystems -@unnumberedsubsec Q4.2.2: This question intentionally left blank. +@lisp +(setq initial-frame-plist '(minibuffer nil)) +(setq default-frame-plist '(minibuffer nil)) +(setq default-minibuffer-frame + (make-frame + '(minibuffer only + width 86 + height 1 + menubar-visible-p nil + default-toolbar-visible-p nil + name "minibuffer" + top -2 + left -2 + has-modeline-p nil))) +(frame-notice-user-settings) +@end lisp -Obsolete question, left blank to avoid renumbering. +@strong{Please note:} The single minibuffer frame may not be to everyone's +taste, and there any number of other XEmacs options settings that may +make it difficult or inconvenient to use. -@node Q4.2.3, Q4.2.4, Q4.2.2, Subsystems -@unnumberedsubsec Q4.2.3: How do I make Gnus stay within a single frame? +@node Q3.2.4, Q3.2.5, Q3.2.3, Editing +@unnumberedsubsec Q3.2.4: How can I enable auto-indent and/or Filladapt? -The toolbar code to start Gnus opens the new frame---and it's a feature -rather than a bug. If you don't like it, but would still like to click -on the seemly icon, use the following code: +Put the following line in your @file{init.el}: @lisp -(defun toolbar-news () - (gnus)) +(setq indent-line-function 'indent-relative-maybe) @end lisp -It will redefine the callback function of the icon to just call -@code{gnus}, without all the fancy frame stuff. +If you want to get fancy, try the @code{filladapt} package available +standard with XEmacs. Put this into your @file{init.el}: -@node Q4.2.4, Q4.3.1, Q4.2.3, Subsystems -@unnumberedsubsec Q4.2.4: How do I customize the From: line? +@lisp +(require 'filladapt) +(setq-default filladapt-mode t) +(add-hook 'c-mode-hook 'turn-off-filladapt-mode) +@end lisp -How do I change the @code{From:} line? I have set gnus-user-from-line -to -@example -Gail Gurman <gail.gurman@@sybase.com> -@end example -@noindent , but XEmacs Gnus doesn't use -it. Instead it uses -@example -Gail Mara Gurman @email{gailg@@deall} -@end example -@noindent and then complains -that it's incorrect. Also, as you perhaps can see, my Message-ID is -screwy. How can I change that? +This will enable Filladapt for all modes except C mode, where it doesn't +work well. To turn Filladapt on only in particular major modes, remove +the @code{(setq-default ...)} line and use +@code{turn-on-filladapt-mode}, like this: -@email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes: +@lisp +(add-hook 'text-mode-hook 'turn-on-filladapt-mode) +@end lisp -@quotation -Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or -@code{mail-host-address} to @samp{sybase.com}. -@end quotation +You can customize filling and adaptive filling with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Editing->Fill->Fill...} +or type @kbd{M-x customize @key{RET} fill @key{RET}}. -@node Q4.3.1, Q4.3.2, Q4.2.4, Subsystems -@unnumberedsec 4.3: Other Mail & News -@unnumberedsubsec Q4.3.1: How can I read and/or compose MIME messages? -@c Changed June +Note that well-behaving text-lookalike modes will run +@code{text-mode-hook} by default (e.g. that's what Message does). For +the nasty ones, you'll have to provide the @code{add-hook}s yourself. -VM supports MIME natively. +Please note that the @code{fa-extras} package is no longer useful. -You probably want to use the Tools for MIME (tm). @xref{Q4.3.2}, for -details. +@node Q3.2.5, Q3.3.1, Q3.2.4, Editing +@unnumberedsubsec Q3.2.5: How can I get XEmacs to come up in text/auto-fill mode by default? -@email{trey@@cs.berkeley.edu, Trey Jackson} has an Emacs & MIME web page at -@iftex -@* -@end iftex -@uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html}. +Try the following lisp in your @file{init.el}: +@lisp +(setq default-major-mode 'text-mode) +(add-hook 'text-mode-hook 'turn-on-auto-fill) +@end lisp -Another possibility is RMIME. You may find RMIME at -@iftex -@* -@end iftex -@uref{http://www.cinti.net/~rmoody/rmime/index.html}. +@strong{WARNING}: note that changing the value of +@code{default-major-mode} from @code{fundamental-mode} can break a large +amount of built-in code that expects newly created buffers to be in +@code{fundamental-mode}. (Changing from @code{fundamental-mode} to +@code{text-mode} might not wreak too much havoc, but changing to +something more exotic like a lisp-mode would break many Emacs packages). +Note that Emacs by default starts up in buffer @code{*scratch*} in +@code{initial-major-mode}, which defaults to +@code{lisp-interaction-mode}. Thus adding the following form to your +Emacs init file will cause the initial @code{*scratch*} buffer to be put +into auto-fill'ed @code{text-mode}: -@node Q4.3.2, Q4.3.3, Q4.3.1, Subsystems -@unnumberedsubsec Q4.3.2: What is TM and where do I get it? +@lisp +(setq initial-major-mode + (lambda () + (text-mode) + (turn-on-auto-fill))) +@end lisp -TM stands for @dfn{Tools for MIME} and not Tiny MIME. TM integrates -with all major XEmacs packages like Gnus (all flavors), VM, MH-E, and -mailcrypt. It provides totally transparent and trouble-free MIME -support. When appropriate a message will be decoded in place in an -XEmacs buffer. +Note that after your init file is loaded, if +@code{inhibit-startup-message} is @code{nil} (the default) and the +startup buffer is @code{*scratch*} then the startup message will be +inserted into @code{*scratch*}; it will be removed after a timeout by +erasing the entire @code{*scratch*} buffer. Keep in mind this default +usage of @code{*scratch*} if you desire any prior manipulation of +@code{*scratch*} from within your Emacs init file. In particular, +anything you insert into @code{*scratch*} from your init file will be +later erased. Also, if you change the mode of the @code{*scratch*} +buffer, be sure that this will not interfere with possible later +insertion of the startup message (e.g. if you put @code{*scratch*} into +a nonstandard mode that has automatic font lock rules, then the startup +message might get fontified in a strange foreign manner, e.g. as code in +some programming language). -TM now comes as a package with XEmacs 19.16 and XEmacs 20.2. +@unnumberedsec 3.3: Text Selections -TM was written by @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} and -@email{shuhei-k@@jaist.ac.jp, KOBAYASHI -Shuhei}. +@node Q3.3.1, Q3.3.2, Q3.2.5, Editing +@unnumberedsubsec Q3.3.1: How do I select a rectangular region? -It is based on the work of @email{umerin@@mse.kyutech.ac.jp, UMEDA -Masanobu}, the original writer of GNUS. +Just select the region normally, then use the rectangle commands (e.g. +@code{kill-rectangle} on it. The region does not highlight as a +rectangle, but the commands work just fine. -The following information is from the @file{README}: +To actually sweep out rectangular regions with the mouse you can use +@code{mouse-track-do-rectangle} which is assigned to @kbd{M-button1}. +Then use rectangle commands. -@dfn{tm} is a MIME package for GNU Emacs. -tm has following functions: +You can also do the following to change default behavior to sweep out +rectangular regions: -@itemize @bullet -@item MIME style multilingual header. -@item MIME message viewer (mime/viewer-mode). -@item MIME message composer (mime/editor-mode). -@item MIME extenders for mh-e, GNUS, RMAIL and VM. -@end itemize +@lisp +(setq mouse-track-rectangle-p t) +@end lisp -tm is available from following anonymous ftp sites: -@itemize @bullet -@comment @item @uref{ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/} (Japan). -@comment @item @uref{ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/} (Japan). -@comment @c The host above is unknown. -@comment @item @uref{ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/} (US). -@comment @item @uref{ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/} (US). -@item @uref{ftp://ftp.unicamp.br/pub/mail/mime/tm/} (Brasil). -@item @uref{ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/} (Germany). -@item @uref{ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/} (Germany). -@end itemize +You can also change this with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Editing->Mouse->Track Rectangle...} or type +@kbd{M-x customize @key{RET} mouse @key{RET}}. -Don't let the installation procedure & instructions stop you from trying -this package out---it's much simpler than it looks, and once installed, -trivial to use. -@email{youngs@@xemacs.org, Steve Youngs} writes: +@example + mouse-track-do-rectangle: (event) + -- an interactive compiled Lisp function. + Like `mouse-track' but selects rectangles instead of regions. +@end example -@quotation -All the major Emacs Lisp based MUAs (Gnus, MH-E, and VM) all do their -own thing when it comes to MIME so you won't need TM to get MIME support -in these packages. -@end quotation +@node Q3.3.2, Q3.3.3, Q3.3.1, Editing +@unnumberedsubsec Q3.3.2: How can I turn off or change highlighted selections? -@node Q4.3.3, Q4.3.4, Q4.3.2, Subsystems -@unnumberedsubsec Q4.3.3: Why isn't this @code{movemail} program working? +The @code{zmacs} mode allows for what some might call gratuitous +highlighting for selected regions (either by setting mark or by using +the mouse). This is the default behavior. To turn off, add the +following line to your @file{init.el} file: -Ben Wing @email{ben@@xemacs.org} writes: +@lisp +(setq zmacs-regions nil) +@end lisp -@quotation -It wasn't chown'ed/chmod'd correctly. -@end quotation +You can also change this with Customize. Select from the +@code{Options} menu +@code{Advanced (Customize)->Emacs->Editing->Basics->Zmacs Regions} +or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. -@node Q4.3.4, Q4.3.5, Q4.3.3, Subsystems -@unnumberedsubsec Q4.3.4: Movemail is also distributed by Netscape? Can that cause problems? +To change the face for selection, look at @code{Options->Advanced (Customize)} +on the menubar. -@email{steve@@xemacs.org, Steve Baur} writes: +@node Q3.3.3, Q3.3.4, Q3.3.2, Editing +@unnumberedsubsec Q3.3.3: How do I cause typing on an active region to remove it? -@quotation -Yes. Always use the movemail installed with your XEmacs. Failure to do -so can result in lost mail. -@end quotation +I want to change things so that if I select some text and start typing, +the typed text replaces the selected text, similar to Motif. -Please refer to @email{jwz@@jwz.org, Jamie Zawinski's} notes at -@iftex -@* -@end iftex -@uref{http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html}. -In particular, this document will show you how to make Netscape use the -version of movemail configured for your system by the person who built -XEmacs. +You want to use something called @dfn{pending delete}. Pending delete +is what happens when you select a region (with the mouse or keyboard) +and you press a key to replace the selected region by the key you typed. +Usually backspace kills the selected region. -@node Q4.3.5, Q4.4.1, Q4.3.4, Subsystems -@unnumberedsubsec Q4.3.5: Where do I find pstogif (required by tm)? +To get this behavior, ensure that you have the @file{pc} package +installed, and add the following lines to your +@file{init.el}: -pstogif is part of the latex2html package. +@lisp +(cond + ((fboundp 'turn-on-pending-delete) + (turn-on-pending-delete)) + ((fboundp 'pending-delete-on) + (pending-delete-on t))) +@end lisp -@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: +Note that this will work with both Backspace and Delete. This code is a +tad more complicated than it has to be for XEmacs in order to make it +more portable. -latex2html is best found at the CTAN hosts and their mirrors -in -@iftex -@* -@end iftex -@file{tex-archive/support/latex2html}. +@node Q3.3.4, Q3.3.5, Q3.3.3, Editing +@unnumberedsubsec Q3.3.4: Can I turn off the highlight during isearch? -CTAN hosts are: +I do not like my text highlighted while I am doing isearch as I am not +able to see what's underneath. How do I turn it off? -@itemize @bullet -@item @uref{ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/}. -@item @uref{ftp://ftp.dante.de/tex-archive/support/latex2html/}. -@end itemize +Put the following in your @file{init.el}: -There is a good mirror at ftp.cdrom.com; -@iftex -@* -@end iftex -@uref{ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/}. +@lisp +(setq isearch-highlight nil) +@end lisp -@node Q4.4.1, Q4.4.2, Q4.3.5, Subsystems -@unnumberedsec 4.4: Sparcworks, EOS, and WorkShop -@unnumberedsubsec Q4.4.1: What is SPARCworks, EOS, and WorkShop? +You can also change this with Customize. Type +@kbd{M-x customize-variable @key{RET} isearch-highlight @key{RET}}. -@email{turner@@lanl.gov, John Turner} writes: +Note also that isearch-highlight affects query-replace and ispell. +Instead of disabling isearch-highlight you may find that a better +solution consists of customizing the @code{isearch} face. -@quotation -SPARCworks is SunSoft's development environment, comprising compilers -(C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a debugger, and other -tools such as TeamWare (for configuration management), MakeTool, etc. -@end quotation +@node Q3.3.5, Q3.3.6, Q3.3.4, Editing +@unnumberedsubsec Q3.3.5: Why is killing so slow? -See @uref{http://www.sun.com/software/Developer-products/} -for more info. +This actually is an X Windows question, although you'll notice it with +keyboard operations as well as while using the GUI. Basically, there +are four ways to communicate interprogram via the X server: -EOS stands for "Era on SPARCworks", but I don't know what Era stands -for. +@table @strong +@item Primary selection +a transient selection that gets replaced every time a new selection is made -EOS is the integration of XEmacs with the SPARCworks debugger. It -allows one to use an XEmacs frame to view code (complete with -fontification, etc.), set breakpoints, print variables, etc., while -using the SPARCworks debugger. It works very well and I use it all the -time. +@item Secondary selection +for "exchanging" with the primary selection -@email{cthomp@@xemacs.org, Chuck Thompson} writes: +@item Cut buffers +a clipboard internal to the X server (deprecated) -@quotation -Era stood for "Emacs Rewritten Again". It was what we were calling the -modified version of Lucid Emacs for Sun when I was dragged, er, allowed -to work on this wonderful editor. -@end quotation +@item Clipboard selection +a selection with a notification protocol that allows a separate app to +manage the clipboard +@end table -@email{martin@@xemacs.org, Martin Buchholz} writes: +The cut buffers are deprecated because managing them is even more +inefficient than the clipboard notification protocol. The primary +selection works fine for many users and applications, but is not very +robust under intensive or sophisticated use. -@quotation -EOS is being replaced with a new graphical development environment -called Sun WorkShop, which is currently (07/96) in Alpha Test. For more -details, check out -@iftex -@* -@end iftex -@uref{http://www.sun.com/software/Products/Developer-products}. -@end quotation +In Motif and MS Windows, a clipboard has become the primary means for +managing cut and paste. These means that "modern" applications tend to +be oriented toward a true clipboard, rather than the primary selection. +(On Windows, there is nothing equivalent to the primary selection.) +It's not that XEmacs doesn't support the simple primary selection +method, it's that more and more other applications don't. -@node Q4.4.2, Q4.5.1, Q4.4.1, Subsystems -@unnumberedsubsec Q4.4.2: How do I start the Sun Workshop support in XEmacs 21? +So the slowdown occurs because XEmacs now engages in the clipboard +notification protocol on @emph{every} kill. This is especially slow on +Motif. -Add the switch ---with-workshop to the configure command when building -XEmacs and put the following in one of your startup files -(e.g. site-start.el or .emacs): +With most people running most clients and server on the same host, and +many of the rest working over very fast communication, you may expect +that the situation is not going to improve. -@lisp -(when (featurep 'tooltalk) - (load "tooltalk-macros") - (load "tooltalk-util") - (load "tooltalk-init")) -(when (featurep 'sparcworks) - (load "sunpro-init") - (load "ring") - (load "comint") - (load "annotations") - (sunpro-startup)) -@end lisp +There are a number of workarounds. The most effective is to use a +special command to do selection ownership only when you intend to paste +to another application. Useful commands are @code{kill-primary-selection} +and @code{copy-primary-selection}. These work only on text selected +with the mouse (probably; experiment), and are bound by default to the +@kbd{Cut} and @kbd{Copy}, respectively, buttons on the toolbar. +@code{copy-primary-selection} is also bound to @kbd{C-Insert}. You can +yank the clipboard contents with @code{yank-primary-selection}, bound to +the @kbd{Paste} toolbar button and @kbd{Sh-Insert}. -If you are not using the latest Workshop (5.0) you have to apply the -following patch: +If you are communicating by cut and paste with applications that use the +primary selection, then you can customize +@code{interprogram-cut-function} to @code{nil}, restoring the XEmacs +version 20 behavior. How can you tell if a program will support this? +Motifly-correct programs require the clipboard; you lose. For others, +only by trying it. You also need to customize the complementary +@code{interprogram-paste-function} to @code{nil}. (Otherwise +XEmacs-to-XEmacs pastes will not work correctly.) -@format ---- /opt/SUNWspro/lib/eserve.el.ORIG Fri May 14 15:23:26 1999 -+++ /opt/SUNWspro/lib/eserve.el Fri May 14 15:24:54 1999 -@@@@ -42,7 +42,7 @@@@ - (defvar running-xemacs nil "t if we're running XEmacs") - (defvar running-emacs nil "t if we're running GNU Emacs 19") +You may get some relief on Motif by setting +@code{x-selection-strict-motif-ownership} to nil, but this means you will +only intermittently be able to paste XEmacs kills to Motif applications. --(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version) -+(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version) - (setq running-xemacs t) - (setq running-emacs t)) -@end format +Thanks to Jeff Mincy and Glynn Clements for corrections. +@node Q3.3.6, Q3.4.1, Q3.3.5, Editing +@unnumberedsubsec Q3.3.6: Why does @kbd{M-w} take so long? +It actually doesn't. It leaves the region visible for a second so that +you can see what area is being yanked. If you start working, though, it +will immediately complete its operation. In other words, it will only +delay for a second if you let it. -@node Q4.5.1, Q4.6.1, Q4.4.2, Subsystems -@unnumberedsec 4.5: Energize -@unnumberedsubsec Q4.5.1: What is/was Energize? +@unnumberedsec 3.4: Editing Source Code -@email{gray@@meteor.harlequin.com, David N Gray} writes: -@quotation -The files in @file{lisp/energize} are to enable Emacs to interface with -the "Energize Programming System", a C and C++ development environment, -which was a product of Lucid, Inc. Tragically, Lucid went out of -business in 1994, so although Energize is still a great system, if you -don't already have it, there isn't any way to get it now. (Unless you -happen to be in Japan; INS Engineering may still be selling it there. -Tartan bought the rights to sell it in the rest of the world, but never -did so.) -@end quotation +@node Q3.4.1, Q3.4.2, Q3.3.6, Editing +@unnumberedsubsec Q3.4.1: I do not like cc-mode. How do I use the old c-mode? -@node Q4.6.1, Q4.7.1, Q4.5.1, Subsystems -@unnumberedsec 4.6: Infodock -@unnumberedsubsec Q4.6.1: What is Infodock? +Well, first off, consider if you really want to do this. cc-mode is +much more powerful than the old c-mode. If you're having trouble +getting your old offsets to work, try using @code{c-set-offset} instead. +You might also consider using the package @code{cc-compat}. -@uref{http://sourceforge.net/projects/infodock/, InfoDock} is an -integrated productivity toolset, mainly aimed at technical people, -hosted at SourceForge. +But, if you still insist, add the following lines to your @file{init.el}: -InfoDock is built atop the XEmacs variant of GNU Emacs and so has all of -the power of Emacs, but with an easier to use and more comprehensive -menu-based user interface. The bottom portion of this text describes -how it differs from XEmacs and GNU Emacs from the Free Software -Foundation. +@lisp +(fmakunbound 'c-mode) +(makunbound 'c-mode-map) +(fmakunbound 'c++-mode) +(makunbound 'c++-mode-map) +(makunbound 'c-style-alist) +(load-library "old-c-mode") +(load-library "old-c++-mode") +@end lisp -InfoDock is aimed at people who want a free, turn-key productivity -environment. Although InfoDock is customizable, it is not intended for -people who like basic versions of Emacs which need to be customized -extensively for local use; standard Emacs distributions are better for -such uses. InfoDock is for those people who want a complete, -pre-customized environment in one package, which they need not touch -more than once or twice a year to update to new revisions. +This must be done before any other reference is made to either c-mode or +c++-mode. -InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX, -and Intel Linux systems. It is intended for use on a color display, -although most features will work on monochrome monitors. Simply unpack -InfoDock according to the instructions in the ID-INSTALL file and you -are ready to run. +@node Q3.4.2, , Q3.4.1, Editing +@unnumberedsubsec Q3.4.2: How do you make XEmacs indent CL if-clauses correctly? -The InfoDock Manual is concise, yet sufficient as a user guide for users -who have never used an Emacs-type editor before. For users who are -already familiar with Emacs, it supplements the information in the GNU -Emacs Manual. +I'd like XEmacs to indent all the clauses of a Common Lisp @code{if} the +same amount instead of indenting the 3rd clause differently from the +first two. -InfoDock menus are much more extensive and more mature than standard -Emacs menus. Each menu offers a @samp{Manual} item which displays -documentation associated with the menu's functions. +The package @code{cl-indent} that comes with XEmacs sets up this kind +of indentation by default. @code{cl-indent} also knows about many +other CL-specific forms. To use @code{cl-indent}, one can do this: -@noindent -Four types of menubars are provided: -@enumerate -@item -An extensive menubar providing access to global InfoDock commands. -@item -Mode-specific menubars tailored to the current major mode. -@item -A simple menubar for basic editing to help novices get started with InfoDock. -@item -The standard XEmacs menubar. -@end enumerate +@lisp +(setq lisp-indent-function 'common-lisp-indent-function) +@end lisp -Most modes also include mode-specific popup menus. Additionally, region and -rectangle popup menus are included. +One can also customize @file{cl-indent.el} so it mimics the default +@code{if} indentation @code{then} indented more than the @code{else}. +Here's how: -@samp{Hyperbole}, the everyday information manager, is a core part of -InfoDock. This provides context-sensitive mouse keys, a rolodex-type -contact manager, programmable hypertext buttons, and an autonumbered -outliner with embedded hyperlink anchors. +@lisp +(put 'if 'common-lisp-indent-function '(nil nil &body)) +@end lisp -The @samp{OO-Browser}, a multi-language object-oriented code browser, is a -standard part of InfoDock. +@node Display, External Subsystems, Editing, Top +@unnumbered 4 Display Functions -InfoDock saves a more extensive set of user options than other Emacs -versions. +This is part 4 of the XEmacs Frequently Asked Questions list. This +section is devoted to the display-related capabilities of XEmacs +(fonts, colors, modeline, menubar, toolbar, scrollbar, etc.) and how +to customize them. -InfoDock inserts a useful file header in many file types, showing the -author, summary, and last modification time of each file. A summary -program can then be used to summarize all of the files in a directory, -for easy MANIFEST file creation. +@menu +4.0: Textual Fonts and Colors +* Q4.0.1:: How do I specify a font? +* Q4.0.2:: How do I set the text, menu and modeline fonts? +* Q4.0.3:: How can I set color options from @file{init.el}? +* Q4.0.4:: How can I set the colors when highlighting a region? +* Q4.0.5:: How can I limit color map usage? +* Q4.0.6:: My tty supports color, but XEmacs doesn't use them. +* Q4.0.7:: Can I have pixmap backgrounds in XEmacs? +* Q4.0.8:: How do I display non-ASCII characters? +* Q4.0.9:: Font selections in don't get saved after @code{Save Options}. + +4.1: Syntax Highlighting (Font Lock) +* Q4.1.1:: How can I do source code highlighting using font-lock? +* Q4.1.2:: How do I get @samp{More} Syntax Highlighting on by default? + +4.2: The Modeline +* Q4.2.1:: How can I make the modeline go away? +* Q4.2.2:: How do you have XEmacs display the line number in the modeline? +* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline? +* Q4.2.4:: How can I change the modeline color based on the mode used? + +4.3: The Cursor +* Q4.3.1:: Is there a way to make the bar cursor thicker? +* Q4.3.2:: Is there a way to get back the block cursor? +* Q4.3.3:: Can I make the cursor blink? + +4.4: The Menubar +* Q4.4.1:: How do I get rid of the menubar? +* Q4.4.2:: How can I customize the menubar? +* Q4.4.3:: How do I enable use of the keyboard (@kbd{Alt}) to access menu items? +* Q4.4.4:: How do I control how many buffers are listed in the menu @code{Buffers List}? +* Q4.4.5:: Resources like @code{Emacs*menubar*font} are not working? + +4.5: The Toolbar +* Q4.5.1:: How do I get rid of the toolbar? +* Q4.5.2:: How can I customize the toolbar? +* Q4.5.3:: How can I bind a key to a function to toggle the toolbar? +* Q4.5.4:: @samp{Can't instantiate image error...} in toolbar + +4.6: Scrollbars and Scrolling +* Q4.6.1:: How can I disable the scrollbar? +* Q4.6.2:: How can I change the scrollbar width? +* Q4.6.3:: How can I use resources to change scrollbar colors? +* Q4.6.4:: Moving the scrollbar can move the point; can I disable this? +* Q4.6.5:: Scrolling one line at a time. +* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes? +* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off? + +4.7: The Gutter Tabs, The Progress Bar, Widgets +* Q4.7.1:: How can I disable the gutter tabs? +* Q4.7.2:: How can I disable the progress bar? +* Q4.7.3:: There are bugs in the gutter or widgets. +* Q4.7.4:: How can I customize the gutter or gutter tabs? +@end menu -Your working set of buffers is automatically saved and restored (if you -answer yes to a prompt) between InfoDock sessions. +@unnumberedsec 4.0: Textual Fonts and Colors -Refined color choices for code highlighting are provided for both dark and -light background display frames. +@node Q4.0.1, Q4.0.2, Display, Display +@unnumberedsubsec Q4.0.1: How do I specify a font? -The @kbd{C-z} key prefix performs frame-based commands which parallel the -@kbd{C-x} key prefix for window-based commands. +#### Update me. -The Smart Menu system is included for producing command menus on dumb -terminals. - -Lisp libraries are better categorized according to function. - -Extensions and improvements to many areas of Emacs are included, such as: -paragraph filling, mail reading with Rmail, shell handling, outlining, code -highlighting and browsing, and man page browsing. - -InfoDock questions, answers and discussion should go to the mail list -@iftex -@* -@end iftex -@email{infodock@@infodock.com}. Use -@email{infodock-request@@infodock.com} to be added or removed from the -list. Always include your InfoDock version number when sending help -requests. +In 21.4 and above, you can use the @samp{Options} menu to change the font. +You can also do it in your init file, e.g. like this (for MS Windows): -InfoDock is available across the Internet via anonymous FTP. To get -it, first move to a directory into which you want the InfoDock archive -files placed. We will call this <DIST-DIR>. +@display + (set-face-font 'default "Lucida Console:Regular:10") + (set-face-font 'modeline "MS Sans Serif:Regular:10") +@end display -@example - cd <DIST-DIR> -@end example +@node Q4.0.2, Q4.0.3, Q4.0.1, Display +@unnumberedsubsec Q4.0.2: How do I set the text, menu and modeline fonts? -Ftp to ftp.xemacs.org (Internet Host ID = 128.174.252.16): +#### Update me. -@example - prompt> ftp ftp.xemacs.org -@end example +Note that you should use @samp{Emacs.} and not @samp{Emacs*} when +setting face values. -Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password. +In @file{.Xresources}: @example - Name (ftp.xemacs.org): anonymous - 331 Guest login ok, send your complete e-mail address as password. - Password: -<your-user-id>@@<your-domain> - 230 Guest login ok, access restrictions apply. +Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-* +Emacs*menubar*font: fixed +Emacs.modeline.attributeFont: fixed @end example -Move to the location of the InfoDock archives: +This is confusing because @samp{default} and @samp{modeline} are face +names, and can be found listed with all faces in the current mode by +using @kbd{M-x set-face-font (enter) ?}. They use the face-specific +resource @samp{attributeFont}. -@example - ftp> cd pub/infodock -@end example +On the other hand, @samp{menubar} is a normal X thing that uses the +resource @samp{font}. With Motif it @emph{may be} necessary to use +@samp{fontList} @emph{instead of} @samp{font}. In @emph{non-Motif} +configurations with Mule it @emph{is} necessary to use @samp{fontSet} +instead of @samp{font}. (Sorry, there just is no simple recipe here.) -Set your transfer mode to binary: +@node Q4.0.3, Q4.0.4, Q4.0.2, Display +@unnumberedsubsec Q4.0.3: How can I set color options from @file{init.el}? -@example - ftp> bin - 200 Type set to I. -@end example +How can I set the most commonly used color options from my +@file{init.el} instead of from my @file{.Xresources}? -Turn off prompting: +Like this: -@example - ftp> prompt - Interactive mode off. -@end example +@lisp +(set-face-background 'default "bisque") ; frame background +(set-face-foreground 'default "black") ; normal text +(set-face-background 'zmacs-region "red") ; When selecting w/ + ; mouse +(set-face-foreground 'zmacs-region "yellow") +(set-face-font 'default "*courier-bold-r*120-100-100*") +(set-face-background 'highlight "blue") ; Ie when selecting + ; buffers +(set-face-foreground 'highlight "yellow") +(set-face-background 'modeline "blue") ; Line at bottom + ; of buffer +(set-face-foreground 'modeline "white") +(set-face-font 'modeline "*bold-r-normal*140-100-100*") +(set-face-background 'isearch "yellow") ; When highlighting + ; while searching +(set-face-foreground 'isearch "red") +(setq x-pointer-foreground-color "black") ; Adds to bg color, + ; so keep black +(setq x-pointer-background-color "blue") ; This is color + ; you really + ; want ptr/crsr +@end lisp -Retrieve the InfoDock archives that you want, either by using a -@samp{get <file>} for each file you want or by using the following to -get a complete distribution, including all binaries: +@node Q4.0.4, Q4.0.5, Q4.0.3, Display +@unnumberedsubsec Q4.0.4: How can I set the colors when highlighting a region? -@example - ftp> mget ID-INSTALL - ftp> mget id-* -@end example +How can I set the background/foreground colors when highlighting a +region? -Close the FTP connection: +You can change the face @code{zmacs-region} either in your +@file{.Xresources}: @example - ftp> quit - 221 Goodbye. +Emacs.zmacs-region.attributeForeground: firebrick +Emacs.zmacs-region.attributeBackground: lightseagreen @end example -Read the @file{ID-INSTALL} file which you just retrieved for -step-by-step installation instructions. - -@node Q4.7.1, Q4.7.2, Q4.6.1, Subsystems -@unnumberedsec 4.7: Other Unbundled Packages -@unnumberedsubsec Q4.7.1: What is AUC TeX? Where do you get it? - -AUC TeX is a package written by @email{abraham@@dina.kvl.dk, Per Abrahamsen}. -Starting with XEmacs 19.16, AUC TeX is bundled with XEmacs. The -following information is from the @file{README} and website. +or in your @file{init.el}: -AUC TeX is an extensible package that supports writing and formatting -TeX files for most variants of GNU Emacs. Many different macro packages -are supported, including AMS TeX, LaTeX, and TeXinfo. +@lisp +(set-face-background 'zmacs-region "red") +(set-face-foreground 'zmacs-region "yellow") +@end lisp -The most recent version is always available by ftp at -@iftex -@* -@end iftex -@uref{ftp://sunsite.dk/packages/auctex/auctex.tar.gz}. +@node Q4.0.5, Q4.0.6, Q4.0.4, Display +@unnumberedsubsec Q4.0.5: How can I limit color map usage? -In case you don't have access to anonymous ftp, you can get it by an -email request to @email{ftpmail@@decwrl.dec.com}. +I'm using Netscape (or another color grabber like XEmacs); +is there any way to limit the number of available colors in the color map? -WWW users may want to check out the AUC TeX page at -@iftex -@* -@end iftex -@uref{http://sunsite.dk/auctex/}. +Answer: No, but you can start Netscape before XEmacs, and it will use +the closest available color if the colormap is full. You can also limit +the number of colors Netscape uses, using the flags -mono, -ncols <#> or +-install (for mono, limiting to <#> colors, or for using a private color +map). -@node Q4.7.2, Q4.7.3, Q4.7.1, Subsystems -@unnumberedsubsec Q4.7.2: Are there any Emacs Lisp Spreadsheets? +If you have the money, another solution would be to use a truecolor or +direct color video. -Yes. Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at -@iftex -@* -@end iftex -@uref{ftp://cs.nyu.edu/pub/local/fox/dismal/}. +@node Q4.0.6, Q4.0.7, Q4.0.5, Display +@unnumberedsubsec Q4.0.6: My tty supports color, but XEmacs doesn't use them. -@node Q4.7.3, Q4.7.4, Q4.7.2, Subsystems -@unnumberedsubsec Q4.7.3: [This question intentionally left blank] +XEmacs tries to automatically determine whether your tty supports color, +but sometimes guesses wrong. In that case, you can make XEmacs Do The +Right Thing using this Lisp code: -@node Q4.7.4, Q4.7.5, Q4.7.3, Subsystems -@unnumberedsubsec Q4.7.4: Problems installing AUC TeX. +@lisp +(if (eq 'tty (device-type)) + (set-device-class nil 'color)) +@end lisp -@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: +@node Q4.0.7, Q4.0.8, Q4.0.6, Display +@unnumberedsubsec Q4.0.7: Can I have pixmap backgrounds in XEmacs? +@c New +@email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes: @quotation -AUC TeX works fine on both stock Emacs and XEmacs has been doing so for -a very very long time. This is mostly due to the work of -@email{abraham@@dina.kvl.dk, Per Abrahamsen} (clap clap) in particular his @file{easymenu} -package. Which leads to what is probably the problem... -@end quotation - -Most problems with AUC TeX are one of two things: - -@itemize @bullet -@item -The TeX-lisp-directory in @file{tex-site.el} and the makefile don't -match. - -Fix: make sure you configure AUC TeX properly @strong{before} installing. - -@item -You have an old version of easymenu.el in your path. +There are several ways to do it. For example, you could specify a +default pixmap image to use in your @file{~/.Xresources}, e.g., -Fix: use @code{locate-library} and remove old versions to make sure it -@strong{only} finds the one that came with XEmacs. -@end itemize +@example + Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm +@end example -@node Q4.7.5, Q4.7.6, Q4.7.4, Subsystems -@unnumberedsubsec Q4.7.5: Is there a reason for an Emacs package not to be included in XEmacs? -The reason for an Emacs package not to be included in XEmacs is -usually one or more of the following: +and then reload ~/.Xresources and restart XEmacs. Alternatively, +since each face can have its own pixmap background, a better way +would be to set a face's pixmap within your XEmacs init file, e.g., -@enumerate -@item -The package has not been ported to XEmacs. This will typically happen -when it uses GNU-Emacs-specific features, which make it fail under -XEmacs. +@lisp + (set-face-background-pixmap 'default "/path/to/image.xpm") + (set-face-background-pixmap 'bold "/path/to/another_image.xpm") +@end lisp -Porting a package to XEmacs can range from a trivial amount of change to -a partial or full rewrite. Fortunately, the authors of modern packages -usually choose to support both Emacsen themselves. +and so on. You can also do this interactively via @kbd{M-x edit-faces}. -@item -The package has been decided not to be appropriate for XEmacs. It may -have an equivalent or better replacement within XEmacs, in which case -the developers may choose not to burden themselves with supporting an -additional package. +@end quotation -Each package bundled with XEmacs means more work for the maintainers, -whether they want it or not. If you are ready to take over the -maintenance responsibilities for the package you port, be sure to say -so---we will more likely include it. +@node Q4.0.8, Q4.0.9, Q4.0.7, Display +@unnumberedsubsec Q4.0.8: How do I display non-ASCII characters? +@c New -@item -The package simply hasn't been noted by the XEmacs development. If -that's the case, the messages like yours are very useful for attracting -our attention. +If you're using a Mule-enabled XEmacs, then display is automatic. If +you're not seeing the characters you expect, either (1) you don't have +appropriate fonts available or (2) XEmacs did not correctly detect the +coding system (@pxref{Recognize Coding, , , xemacs}). In case (1), +install fonts as is customary for your platform. In case (2), you +need to tell XEmacs explicitly what coding systems you're using. +@ref{Specify Coding, , , xemacs}. -@item -The package was noted by the developers, but they simply haven't yet -gotten around to including/porting it. Wait for the next release or, -even better, offer your help. It will be gladly accepted and -appreciated. -@end enumerate +If your XEmacs is not Mule-enabled, and for some reason getting a +Mule-enabled XEmacs seems like the wrong thing to do, all is not lost. +You can arrange it by brute force. In @file{event-Xt.c} (suppress the +urge to look in this file---play Doom instead, because you'll survive +longer), it is written: -@node Q4.7.6, Q4.7.7, Q4.7.5, Subsystems -@unnumberedsubsec Q4.7.5: Is there a MatLab mode? +@quotation +In a non-Mule world, a user can still have a multi-lingual editor, by +doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all +their Latin-2 buffers, etc. +@end quotation -Yes, a matlab mode and other items are available at the -@uref{ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons, -MathWorks' emacs_add_ons ftp directory}. +For the related problem of @emph{inputting} non-ASCII characters in a +non-Mule XEmacs, @xref{Q3.0.6, How can you type in special characters +in XEmacs?}. -@node Q4.7.7, , Q4.7.6, Subsystems -@unnumberedsubsec Q4.7.7: Can I edit files on other hosts? +@node Q4.0.9, Q4.1.1, Q4.0.8, Display +@unnumberedsubsec Q4.0.9: Font selections in don't get saved after @code{Save Options}. -Yes. Of course XEmacs can use any network file system (such as NFS or -Windows file sharing) you have available, and includes some -optimizations and safety features appropriate to those environments. +@email{mannj@@ll.mit.edu, John Mann} writes: -It is also possible to transparently edit files via FTP, ssh, or rsh. That -is, XEmacs makes a local copy using the transport in the background, and -automatically refreshes the remote original from that copy when you save -it. XEmacs also is capable of doing file system manipulations like -creating and removing directories and files. The FTP interface is -provided by the standard @samp{efs} package @ref{Top, EFS, , efs}. The -ssh/rsh interface is provided by the optional @samp{tramp} package -@ref{Top, TRAMP, , tramp}. +@quotation +You have to go to @samp{Options->Menubars} and unselect +@samp{Frame-Local Font Menu}. If this option is selected, font changes +are only applied to the @emph{current} frame and do @emph{not} get saved +when you save options. +@end quotation -@node Miscellaneous, MS Windows, Subsystems, Top -@unnumbered 5 The Miscellaneous Stuff +Also, set the following in your @file{init.el}: -This is part 5 of the XEmacs Frequently Asked Questions list. This -section is devoted to anything that doesn't fit neatly into the other -sections. +@lisp +(setq options-save-faces t) +@end lisp -@menu -Major & Minor Modes: -* Q5.0.1:: How can I do source code highlighting using font-lock? -* Q5.0.2:: I do not like cc-mode. How do I use the old c-mode? -* Q5.0.3:: How do I get @samp{More} Syntax Highlighting on by default? -* Q5.0.4:: How can I enable auto-indent and/or Filladapt? -* Q5.0.5:: How can I get XEmacs to come up in text/auto-fill mode by default? -* Q5.0.6:: How do I start up a second shell buffer? -* Q5.0.7:: Telnet from shell filters too much. -* Q5.0.8:: Why does edt emulation not work? -* Q5.0.9:: How can I emulate VI and use it as my default mode? -* Q5.0.10:: [This question intentionally left blank] -* Q5.0.11:: [This question intentionally left blank] -* Q5.0.12:: How do I disable gnuserv from opening a new frame? -* Q5.0.13:: How do I start gnuserv so that each subsequent XEmacs is a client? -* Q5.0.14:: Strange things are happening in Shell Mode. -* Q5.0.15:: Where do I get the latest CC Mode? -* Q5.0.16:: I find auto-show-mode disconcerting. How do I turn it off? -* Q5.0.17:: How can I get two instances of info? -* Q5.0.18:: [This question intentionally left blank] -* Q5.0.19:: Is there something better than LaTeX mode? -* Q5.0.20:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? - -Emacs Lisp Programming Techniques: -* Q5.1.1:: The difference in key sequences between XEmacs and GNU Emacs? -* Q5.1.2:: Can I generate "fake" keyboard events? -* Q5.1.3:: Could you explain @code{read-kbd-macro} in more detail? -* Q5.1.4:: What is the performance hit of @code{let}? -* Q5.1.5:: What is the recommended use of @code{setq}? -* Q5.1.6:: What is the typical misuse of @code{setq}? -* Q5.1.7:: I like the @code{do} form of cl, does it slow things down? -* Q5.1.8:: I like recursion, does it slow things down? -* Q5.1.9:: How do I put a glyph as annotation in a buffer? -* Q5.1.10:: @code{map-extents} won't traverse all of my extents! -* Q5.1.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time? - -Sound: -* Q5.2.1:: How do I turn off the sound? -* Q5.2.2:: How do I get funky sounds instead of a boring beep? -* Q5.2.3:: What's NAS, how do I get it? -* Q5.2.4:: Sunsite sounds don't play. - -Miscellaneous: -* Q5.3.1:: How do you make XEmacs indent CL if-clauses correctly? -* Q5.3.2:: [This question intentionally left blank] -* Q5.3.3:: How can I print WYSIWYG a font-locked buffer? -* Q5.3.4:: Getting @kbd{M-x lpr} to work with postscript printer. -* Q5.3.5:: How do I specify the paths that XEmacs uses for finding files? -* Q5.3.6:: [This question intentionally left blank] -* Q5.3.7:: Can I have the end of the buffer delimited in some way? -* Q5.3.8:: How do I insert today's date into a buffer? -* Q5.3.9:: Are only certain syntactic character classes available for abbrevs? -* Q5.3.10:: How can I get those oh-so-neat X-Face lines? -* Q5.3.11:: How do I add new Info directories? -* Q5.3.12:: What do I need to change to make printing work? -@end menu +@unnumberedsec 4.1: Syntax Highlighting (Font Lock) -@node Q5.0.1, Q5.0.2, Miscellaneous, Miscellaneous -@unnumberedsec 5.0: Major & Minor Modes -@unnumberedsubsec Q5.0.1: How can I do source code highlighting using font-lock? +@node Q4.1.1, Q4.1.2, Q4.0.9, Display +@unnumberedsubsec Q4.1.1: How can I do source code highlighting using font-lock? For most modes, font-lock is already set up and just needs to be turned on. This can be done by adding the line: @@ -5065,7 +5636,7 @@ on. This can be done by adding the line: (require 'font-lock) @end lisp -to your @file{init.el}/@file{.emacs}. (You can turn it on for the +to your @file{init.el}. (You can turn it on for the current buffer and session only by @kbd{M-x font-lock-mode}.) See the file @file{etc/sample.init.el} (@file{etc/sample.emacs} in XEmacs versions prior to 21.4) for more information. @@ -5077,1101 +5648,718 @@ versions prior to 21.4) for more information. See also @code{Syntax Highlighting} from the @code{Options} menu. Remember to save options. -@node Q5.0.2, Q5.0.3, Q5.0.1, Miscellaneous -@unnumberedsubsec Q5.0.2: I do not like cc-mode. How do I use the old c-mode? - -Well, first off, consider if you really want to do this. cc-mode is -much more powerful than the old c-mode. If you're having trouble -getting your old offsets to work, try using @code{c-set-offset} instead. -You might also consider using the package @code{cc-compat}. - -But, if you still insist, add the following lines to your @file{init.el}/@file{.emacs}: - -@lisp -(fmakunbound 'c-mode) -(makunbound 'c-mode-map) -(fmakunbound 'c++-mode) -(makunbound 'c++-mode-map) -(makunbound 'c-style-alist) -(load-library "old-c-mode") -(load-library "old-c++-mode") -@end lisp - -This must be done before any other reference is made to either c-mode or -c++-mode. - -@node Q5.0.3, Q5.0.4, Q5.0.2, Miscellaneous -@unnumberedsubsec Q5.0.3: How do I get @samp{More} Syntax Highlighting on by default? +@node Q4.1.2, Q4.2.1, Q4.1.1, Display +@unnumberedsubsec Q4.1.2: How do I get @samp{More} Syntax Highlighting on by default? -Use the following code in your @file{init.el}/@file{.emacs}: +Use the following code in your @file{init.el}: @lisp (setq-default font-lock-maximum-decoration t) @end lisp -@c In versions of XEmacs prior to 19.14, you had to use a kludgy solution -@c like this: -@c -@c @lisp -@c (setq c-font-lock-keywords c-font-lock-keywords-2 -@c c++-font-lock-keywords c++-font-lock-keywords-2 -@c lisp-font-lock-keywords lisp-font-lock-keywords-2) -@c @end lisp -@c -@c It will work for C, C++ and Lisp. -@c See also @code{Syntax Highlighting} from the @code{Options} menu. Remember to save options. -@node Q5.0.4, Q5.0.5, Q5.0.3, Miscellaneous -@unnumberedsubsec Q5.0.4: How can I enable auto-indent and/or Filladapt? +@unnumberedsec 4.2: The Modeline -Put the following line in your @file{init.el}/@file{.emacs}: +@node Q4.2.1, Q4.2.2, Q4.1.2, Display +@unnumberedsubsec Q4.2.1: How can I make the modeline go away? @lisp -(setq indent-line-function 'indent-relative-maybe) +(set-specifier has-modeline-p nil) @end lisp -If you want to get fancy, try the @code{filladapt} package available -standard with XEmacs. Put this into your @file{init.el}/@file{.emacs}: +@node Q4.2.2, Q4.2.3, Q4.2.1, Display +@unnumberedsubsec Q4.2.2: How do you have XEmacs display the line number in the modeline? + +Add the following line to your @file{init.el} file to +display the line number: @lisp -(require 'filladapt) -(setq-default filladapt-mode t) -(add-hook 'c-mode-hook 'turn-off-filladapt-mode) +(line-number-mode 1) @end lisp -This will enable Filladapt for all modes except C mode, where it doesn't -work well. To turn Filladapt on only in particular major modes, remove -the @code{(setq-default ...)} line and use -@code{turn-on-filladapt-mode}, like this: +Use the following to display the column number: @lisp -(add-hook 'text-mode-hook 'turn-on-filladapt-mode) +(column-number-mode 1) @end lisp -You can customize filling and adaptive filling with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Editing->Fill->Fill...} -or type @kbd{M-x customize @key{RET} fill @key{RET}}. - -Note that well-behaving text-lookalike modes will run -@code{text-mode-hook} by default (e.g. that's what Message does). For -the nasty ones, you'll have to provide the @code{add-hook}s yourself. +Or select from the @code{Options} menu +@iftex +@* +@end iftex +@code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode} +and/or +@iftex +@* +@end iftex +@code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode} -Please note that the @code{fa-extras} package is no longer useful. +Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. -@node Q5.0.5, Q5.0.6, Q5.0.4, Miscellaneous -@unnumberedsubsec Q5.0.5: How can I get XEmacs to come up in text/auto-fill mode by default? +@node Q4.2.3, Q4.2.4, Q4.2.2, Display +@unnumberedsubsec Q4.2.3: How do I get XEmacs to put the time of day on the modeline? -Try the following lisp in your @file{init.el}/@file{.emacs}: +Add the following line to your @file{init.el} file to +display the time: @lisp -(setq default-major-mode 'text-mode) -(setq text-mode-hook 'turn-on-auto-fill) +(display-time) @end lisp -@strong{WARNING}: note that changing the value of -@code{default-major-mode} from @code{fundamental-mode} can break a large -amount of built-in code that expects newly created buffers to be in -@code{fundamental-mode}. (Changing from @code{fundamental-mode} to -@code{text-mode} might not wreak too much havoc, but changing to -something more exotic like a lisp-mode would break many Emacs packages). +See @code{Customize} from the @code{Options} menu for customization. -Note that Emacs by default starts up in buffer @code{*scratch*} in -@code{initial-major-mode}, which defaults to -@code{lisp-interaction-mode}. Thus adding the following form to your -Emacs init file will cause the initial @code{*scratch*} buffer to be put -into auto-fill'ed @code{text-mode}: +@node Q4.2.4, Q4.3.1, Q4.2.3, Display +@unnumberedsubsec Q4.2.4: How can I change the modeline color based on the mode used? + +You can use something like the following: @lisp -(setq initial-major-mode - (lambda () - (text-mode) - (turn-on-auto-fill))) +(add-hook 'lisp-mode-hook + (lambda () + (set-face-background 'modeline "red" (current-buffer)))) @end lisp -Note that after your init file is loaded, if -@code{inhibit-startup-message} is @code{nil} (the default) and the -startup buffer is @code{*scratch*} then the startup message will be -inserted into @code{*scratch*}; it will be removed after a timeout by -erasing the entire @code{*scratch*} buffer. Keep in mind this default -usage of @code{*scratch*} if you desire any prior manipulation of -@code{*scratch*} from within your Emacs init file. In particular, -anything you insert into @code{*scratch*} from your init file will be -later erased. Also, if you change the mode of the @code{*scratch*} -buffer, be sure that this will not interfere with possible later -insertion of the startup message (e.g. if you put @code{*scratch*} into -a nonstandard mode that has automatic font lock rules, then the startup -message might get fontified in a strange foreign manner, e.g. as code in -some programming language). +Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline +colors change from the default set in your @file{init.el}. +The change will only be made in the buffer you just entered (which +contains the Lisp file you are editing) and will not affect the modeline +colors anywhere else. -@node Q5.0.6, Q5.0.7, Q5.0.5, Miscellaneous -@unnumberedsubsec Q5.0.6: How do I start up a second shell buffer? +Notes: -In the @code{*shell*} buffer: +@itemize @bullet -@lisp -M-x rename-buffer @key{RET} *shell-1* @key{RET} -M-x shell RET -@end lisp +@item The hook is the mode name plus @code{-hook}. eg. c-mode-hook, +c++-mode-hook, emacs-lisp-mode-hook (used for your +@file{init.el} or a @file{xx.el} file), +lisp-interaction-mode-hook (the @samp{*scratch*} buffer), +text-mode-hook, etc. -This will then start a second shell. The key is that no buffer named -@samp{*shell*} can exist. It might be preferable to use @kbd{M-x -rename-uniquely} to rename the @code{*shell*} buffer instead of @kbd{M-x -rename-buffer}. +@item +Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)}, +otherwise you will erase anything that anybody has already put on the +hook. -Alternately, you can set the variable @code{shell-multiple-shells}. -If the value of this variable is non-nil, each time shell mode is invoked, -a new shell is made +@item +You can also do @code{(set-face-font 'modeline @var{font})}, +eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*" +(current-buffer))} if you wish the modeline font to vary based on the +current mode. +@end itemize -@node Q5.0.7, Q5.0.8, Q5.0.6, Miscellaneous -@unnumberedsubsec Q5.0.7: Telnet from shell filters too much +There are additional modeline faces, @code{modeline-buffer-id}, +@code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which +you may want to customize. -I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke -and use a telnet session within it. Everything works fine except that -now all @samp{^M}'s are filtered out by Emacs. Fixes? +@unnumberedsec 4.3: The Cursor -Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather -than doing rsh or telnet within the local shell buffer. Starting with -XEmacs-20.3 you can also use @kbd{M-x ssh} to open secure remote session -if you have @code{ssh} installed. +@node Q4.3.1, Q4.3.2, Q4.2.4, Display +@unnumberedsubsec Q4.3.1: Is there a way to make the bar cursor thicker? -@node Q5.0.8, Q5.0.9, Q5.0.7, Miscellaneous -@unnumberedsubsec Q5.0.8: Why does edt emulation not work? +I'd like to have the bar cursor a little thicker, as I tend to "lose" it +often. -We don't know, but you can use tpu-edt emulation instead, which works -fine and is a little fancier than the standard edt emulation. To do -this, add the following line to your @file{init.el}/@file{.emacs}: +For a 1 pixel bar cursor, use: @lisp -(tpu-edt) +(setq bar-cursor t) @end lisp -If you don't want it to replace @kbd{C-h} with an edt-style help menu -add this as well: +For a 2 pixel bar cursor, use: @lisp -(global-set-key [(control h)] 'help-for-help) +(setq bar-cursor 'anything-else) @end lisp -@node Q5.0.9, Q5.0.10, Q5.0.8, Miscellaneous -@unnumberedsubsec Q5.0.9: How can I emulate VI and use it as my default mode? +You can also change these with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type +@kbd{M-x customize @key{RET} display @key{RET}}. + +You can use a color to make it stand out better: -Our recommended VI emulator is viper. To make viper-mode the default, -add this to your @file{init.el}/@file{.emacs}: +@example +Emacs*cursorColor: Red +@end example + +@node Q4.3.2, Q4.3.3, Q4.3.1, Display +@unnumberedsubsec Q4.3.2: Is there a way to get back the block cursor? @lisp -(viper-mode) +(setq bar-cursor nil) @end lisp -@email{kifer@@CS.SunySB.EDU, Michael Kifer} writes: - -@quotation -This should be added as close to the top of @file{init.el}/@file{.emacs} as you can get -it, otherwise some minor modes may not get viper-ized. -@end quotation +You can also change this with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type +@kbd{M-x customize @key{RET} display @key{RET}}. -@node Q5.0.10, Q5.0.11, Q5.0.9, Miscellaneous -@unnumberedsubsec Q5.0.10: [This question intentionally left blank] +@node Q4.3.3, Q4.4.1, Q4.3.2, Display +@unnumberedsubsec Q4.3.3: Can I make the cursor blink? -Obsolete question, left blank to avoid renumbering +Yes, like this: -@node Q5.0.11, Q5.0.12, Q5.0.10, Miscellaneous -@unnumberedsubsec Q5.0.11: [This question intentionally left blank] +@lisp +(blink-cursor-mode) +@end lisp -Obsolete question, left blank to avoid renumbering +This function toggles between a steady cursor and a blinking cursor. +You may also set this mode from the menu bar by selecting +@samp{Options->Display->Blinking Cursor}. Remember to save options. -@node Q5.0.12, Q5.0.13, Q5.0.11, Miscellaneous -@unnumberedsubsec Q5.0.12: How do I disable gnuserv from opening a new frame? +@unnumberedsec 4.4: The Menubar -If you set the @code{gnuserv-frame} variable to the frame that should be -used to display buffers that are pulled up, a new frame will not be -created. For example, you could put +@node Q4.4.1, Q4.4.2, Q4.3.3, Display +@unnumberedsubsec Q4.4.1: How do I get rid of the menubar? @lisp -(setq gnuserv-frame (selected-frame)) +(set-specifier menubar-visible-p nil) @end lisp -early on in your @file{init.el}/@file{.emacs}, to ensure that the first frame created -is the one used for your gnuserv buffers. +@node Q4.4.2, Q4.4.3, Q4.4.1, Display +@unnumberedsubsec Q4.4.2: How can I customize the menubar? -There is an option to set the gnuserv target to the current frame. See -@code{Options->Display->"Other Window" Location->Make Current Frame Gnuserv Target} +For an extensive menubar, add this line to your @file{init.el}: -Starting with XEmacs-20.3 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Gnuserv->Gnuserv Frame...} -or type @kbd{M-x customize @key{RET} gnuserv @key{RET}}. +@lisp +(load "big-menubar") +@end lisp + +If you'd like to write your own, this file provides as good a set of +examples as any to start from. The file is located in edit-utils +package. + +@node Q4.4.3, Q4.4.4, Q4.4.2, Display +@unnumberedsubsec Q4.4.3: How do I enable use of the keyboard (@kbd{Alt}) to access menu items? +#### Write me. -@node Q5.0.13, Q5.0.14, Q5.0.12, Miscellaneous -@unnumberedsubsec Q5.0.13: How do I start gnuserv so that each subsequent XEmacs is a client? +@node Q4.4.4, Q4.4.5, Q4.4.3, Display +@unnumberedsubsec Q4.4.4: How do I control how many buffers are listed in the menu @code{Buffers List}? -Put the following in your @file{init.el}/@file{.emacs} file to start the server: +Add the following to your @file{init.el} (suit to fit): @lisp -(gnuserv-start) +(setq buffers-menu-max-size 20) @end lisp -Start your first XEmacs as usual. After that, you can do: +For no limit, use an argument of @samp{nil}. + +You can also change this with Customize. Select from the +@code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...} +or type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}. + +@node Q4.4.5, Q4.5.1, Q4.4.4, Display +@unnumberedsubsec Q4.4.5: Resources like @code{Emacs*menubar*font} are not working? + +I am trying to use a resource like @code{Emacs*menubar*font} to set the +font of the menubar but it's not working. + +In Motif, the use of @samp{font} resources is obsoleted in order to +support internationalization. If you are using the real Motif menubar, +this resource is not recognized at all; you have to say: @example -gnuclient randomfilename +Emacs*menubar*fontList: FONT @end example -from the command line to get your existing XEmacs process to open a new -frame and visit randomfilename in that window. When you're done editing -randomfilename, hit @kbd{C-x #} to kill the buffer and get rid of the -frame. +If you are using the Lucid menubar, for backward compatibility with +existing user configurations, the @samp{font} resource is recognized. +Since this is not supported by Motif itself, the code is a kludge and +the @samp{font} resource will be recognized only if the @samp{fontList} +resource resource is unset. This means that the resource -See also man page of gnuclient. +@example +*fontList: FONT +@end example -@node Q5.0.14, Q5.0.15, Q5.0.13, Miscellaneous -@unnumberedsubsec Q5.0.14: Strange things are happening in Shell Mode. +will override -Sometimes (i.e. it's not repeatable, and I can't work out why it -happens) when I'm typing into shell mode, I hit return and only a -portion of the command is given to the shell, and a blank prompt is -returned. If I hit return again, the rest of the previous command is -given to the shell. +@example +Emacs*menubar*font: FONT +@end example -@email{martin@@xemacs.org, Martin Buchholz} writes: +even though the latter is more specific. -@quotation -There is a known problem with interaction between @code{csh} and the -@code{filec} option and XEmacs. You should add the following to your -@file{.cshrc}: +In non-Motif configurations using @samp{--with-mule} and +@samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet} +resource @emph{instead of} the @code{font} resource. The backward +compatibility kludge was never implemented for non-Motif builds. +Example: @example -if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec +*fontSet: FONT @end example -@end quotation -@node Q5.0.15, Q5.0.16, Q5.0.14, Miscellaneous -@unnumberedsubsec Q5.0.15: Where do I get the latest CC Mode? +@unnumberedsec 4.5: The Toolbar -@email{bwarsaw@@cnri.reston.va.us, Barry A. Warsaw} writes: +@node Q4.5.1, Q4.5.2, Q4.4.5, Display +@unnumberedsubsec Q4.5.1: How do I get rid of the toolbar? -@quotation -This can be had from @uref{http://www.python.org/emacs/}. -@end quotation +#### Write me. -@node Q5.0.16, Q5.0.17, Q5.0.15, Miscellaneous -@unnumberedsubsec Q5.0.16: I find auto-show-mode disconcerting. How do I turn it off? +@node Q4.5.2, Q4.5.3, Q4.5.1, Display +@unnumberedsubsec Q4.5.2: How can I customize the toolbar? -@code{auto-show-mode} controls whether or not a horizontal scrollbar -magically appears when a line is too long to be displayed. This is -enabled by default. To turn it off, put the following in your -@file{init.el}/@file{.emacs}: +#### Write me. + +@node Q4.5.3, Q4.5.4, Q4.5.2, Display +@unnumberedsubsec Q4.5.3: How can I bind a key to a function to toggle the toolbar? + +Try something like: @lisp -(setq auto-show-mode nil) -(setq-default auto-show-mode nil) +(defun my-toggle-toolbar () + (interactive) + (set-specifier default-toolbar-visible-p + (not (specifier-instance default-toolbar-visible-p)))) +(global-set-key "\C-xT" 'my-toggle-toolbar) @end lisp -@node Q5.0.17, Q5.0.18, Q5.0.16, Miscellaneous -@unnumberedsubsec Q5.0.17: How can I get two instances of info? +@ignore +@c Probably not relevant any more +There are redisplay bugs in 19.14 that may make the preceding result in +a messed-up display, especially for frames with multiple windows. You +may need to resize the frame before XEmacs completely realizes the +toolbar is really gone. +@end ignore -Before 21.4, you can't. The @code{info} package does not provide for -multiple info buffers. In 21.4, this should be fixed. #### how? +Thanks to @email{martin@@xemacs.org, Martin Buchholz} for the correct +code. -@node Q5.0.18, Q5.0.19, Q5.0.17, Miscellaneous -@unnumberedsubsec Q5.0.18: [This question intentionally left blank] +@node Q4.5.4, Q4.6.1, Q4.5.3, Display +@unnumberedsubsec Q4.5.4: @samp{Can't instantiate image error...} in toolbar -@node Q5.0.19, Q5.0.20, Q5.0.18, Miscellaneous -@unnumberedsubsec Q5.0.19: Is there something better than LaTeX mode? +@email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes: -@email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes: +I just installed the XEmacs (20.4-2) RPMS that I downloaded from +@uref{http://www.xemacs.org/}. Everything works fine, except that when +I place my mouse over the toolbar, it beeps and gives me this message: + +@example + Can't instantiate image (probably cached): + [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data + (16 16 <strange control characters> ... +@end example +@email{kyle_jones@@wonderworks.com, Kyle Jones} writes: @quotation -The standard TeX modes leave much to be desired, and are somewhat -leniently maintained. Serious TeX users use AUC TeX (@pxref{Q4.7.1}). +This is problem specific to some Chips and Technologies video +chips, when running XFree86. Putting + +@code{Option "sw_cursor"} + +in @file{XF86Config} gets rid of the problem. @end quotation -@node Q5.0.20, Q5.1.1, Q5.0.19, Miscellaneous -@unnumberedsubsec Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? +@unnumberedsec 4.6: Scrollbars and Scrolling + +@node Q4.6.1, Q4.6.2, Q4.5.4, Display +@unnumberedsubsec Q4.6.1: How can I disable the scrollbar? + +To disable them for all frames, add the following line to +your @file{.Xresources}: -@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: -@quotation -Here is one of the solutions, we have this in a script called -@file{etc/editclient.sh}. @example - #!/bin/sh - if gnuclient -batch -eval t >/dev/null 2>&1 - then - exec gnuclient $@{1+"$@@"@} - else - xemacs -unmapped -f gnuserv-start & - until gnuclient -batch -eval t >/dev/null 2>&1 - do - sleep 1 - done - exec gnuclient $@{1+"$@@"@} - fi +Emacs.scrollBarWidth: 0 @end example -Note that there is a known problem when running XEmacs and 'gnuclient --nw' on the same TTY. -@end quotation - -@node Q5.1.1, Q5.1.2, Q5.0.20, Miscellaneous -@unnumberedsec 5.1: Emacs Lisp Programming Techniques -@unnumberedsubsec Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs? - -@email{clerik@@naggum.no, Erik Naggum} writes; - -@quotation -Emacs has a legacy of keyboards that produced characters with modifier -bits, and therefore map a variety of input systems into this scheme even -today. XEmacs is instead optimized for X events. This causes an -incompatibility in the way key sequences are specified, but both Emacs -and XEmacs will accept a key sequence as a vector of lists of modifiers -that ends with a key, e.g., to bind @kbd{M-C-a}, you would say -@code{[(meta control a)]} in both Emacsen. XEmacs has an abbreviated -form for a single key, just (meta control a). Emacs has an abbreviated -form for the Control and the Meta modifiers to string-characters (the -ASCII characters), as in @samp{\M-\C-a}. XEmacs users need to be aware -that the abbreviated form works only for one-character key sequences, -while Emacs users need to be aware that the string-character is rather -limited. Specifically, the string-character can accommodate only 256 -different values, 128 of which have the Meta modifier and 128 of which -have not. In each of these blocks, only 32 characters have the Control -modifier. Whereas @code{[(meta control A)]} differs from @code{[(meta -control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A} -do not. Programmers are advised to use the full common form, both -because it is more readable and less error-prone, and because it is -supported by both Emacsen. -@end quotation - -Another (even safer) way to be sure of the key-sequences is to use the -@code{read-kbd-macro} function, which takes a string like @samp{C-c -<up>}, and converts it to the internal key representation of the Emacs -you use. The function is available both on XEmacs and GNU Emacs. - -@node Q5.1.2, Q5.1.3, Q5.1.1, Miscellaneous -@unnumberedsubsec Q5.1.2: Can I generate "fake" keyboard events? - -I wonder if there is an interactive function that can generate -@dfn{fake} keyboard events. This way, I could simply map them inside -XEmacs. +Or select @samp{Options->Display->Scrollbars}. +Remember to save options. -This seems to work: +To turn the scrollbar off on a per-frame basis, use the following +function: @lisp -(defun cg--generate-char-event (ch) - "Generate an event, as if ch has been typed" - (dispatch-event (character-to-event ch))) - -;; Backspace and Delete stuff -(global-set-key [backspace] - (lambda () (interactive) (cg--generate-char-event 127))) -(global-set-key [unknown_keysym_0x4] - (lambda () (interactive) (cg--generate-char-event 4))) +(set-specifier scrollbar-width 0 (selected-frame)) @end lisp -@node Q5.1.3, Q5.1.4, Q5.1.2, Miscellaneous -@unnumberedsubsec Q5.1.3: Could you explain @code{read-kbd-macro} in more detail? - -The @code{read-kbd-macro} function returns the internal Emacs -representation of a human-readable string (which is its argument). -Thus: +You can actually turn the scrollbars on at any level you want by +substituting for (selected-frame) in the above command. For example, to +turn the scrollbars off only in a single buffer: @lisp -(read-kbd-macro "C-c C-a") -@result{} [(control ?c) (control ?a)] - -(read-kbd-macro "C-c C-. <up>") -@result{} [(control ?c) (control ?.) up] +(set-specifier scrollbar-width 0 (current-buffer)) @end lisp -In GNU Emacs the same forms will be evaluated to what GNU Emacs -understands internally---the sequences @code{"\C-x\C-c"} and @code{[3 -67108910 up]}, respectively. - -The exact @dfn{human-readable} syntax is defined in the docstring of -@code{edmacro-mode}. I'll repeat it here, for completeness. - -@quotation -Format of keyboard macros during editing: - -Text is divided into @dfn{words} separated by whitespace. Except for -the words described below, the characters of each word go directly as -characters of the macro. The whitespace that separates words is -ignored. Whitespace in the macro must be written explicitly, as in -@kbd{foo @key{SPC} bar @key{RET}}. - -@itemize @bullet -@item -The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD}, -@kbd{ESC}, and @kbd{NUL} represent special control characters. The -words must be written in uppercase. +@node Q4.6.2, Q4.6.3, Q4.6.1, Display +@unnumberedsubsec Q4.6.2: How can I change the scrollbar width? -@item -A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or -@code{<f1>}, represents a function key. (Note that in the standard -configuration, the function key @code{<return>} and the control key -@key{RET} are synonymous.) You can use angle brackets on the words -@key{RET}, @key{SPC}, etc., but they are not required there. +#### Write me. -@item -Keys can be written by their @sc{ascii} code, using a backslash followed -by up to six octal digits. This is the only way to represent keys with -codes above \377. +@node Q4.6.3, Q4.6.4, Q4.6.2, Display +@unnumberedsubsec Q4.6.3: How can I use resources to change scrollbar colors? -@item -One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-} -(shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may -precede a character or key notation. For function keys, the prefixes -may go inside or outside of the brackets: @code{C-<down>} @equiv{} -@code{<C-down>}. The prefixes may be written in any order: @kbd{M-C-x} -@equiv{} @kbd{C-M-x}. +Here's a recap of how to use resources to change your scrollbar colors: -Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except -that the Meta prefix is allowed on a sequence of digits and optional -minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}. +@example +! Motif scrollbars -@item -The @code{^} notation for control characters also works: @kbd{^M} -@equiv{} @kbd{C-m}. +Emacs*XmScrollBar.Background: skyblue +Emacs*XmScrollBar.troughColor: lightgray -@item -Double angle brackets enclose command names: @code{<<next-line>>} is -shorthand for @kbd{M-x next-line @key{RET}}. +! Athena scrollbars -@item -Finally, @code{REM} or @code{;;} causes the rest of the line to be -ignored as a comment. -@end itemize +Emacs*Scrollbar.Foreground: skyblue +Emacs*Scrollbar.Background: lightgray +@end example -Any word may be prefixed by a multiplier in the form of a decimal number -and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>}, -and @code{10*foo} @equiv{} -@iftex -@* -@end iftex -@code{foofoofoofoofoofoofoofoofoofoo}. +Note the capitalization of @code{Scrollbar} for the Athena widget. -Multiple text keys can normally be strung together to form a word, but -you may need to add whitespace if the word would look like one of the -above notations: @code{; ; ;} is a keyboard macro with three semicolons, -but @code{;;;} is a comment. Likewise, @code{\ 1 2 3} is four keys but -@code{\123} is a single key written in octal, and @code{< right >} is -seven keys but @code{<right>} is a single function key. When in doubt, -use whitespace. -@end quotation +@node Q4.6.4, Q4.6.5, Q4.6.3, Display +@unnumberedsubsec Q4.6.4: Moving the scrollbar can move the point; can I disable this? -@node Q5.1.4, Q5.1.5, Q5.1.3, Miscellaneous -@unnumberedsubsec Q5.1.4: What is the performance hit of @code{let}? +When I move the scrollbar in an XEmacs window, it moves the point as +well, which should not be the default behavior. Is this a bug or a +feature? Can I disable it? -In most cases, not noticeable. Besides, there's no avoiding -@code{let}---you have to bind your local variables, after all. Some -pose a question whether to nest @code{let}s, or use one @code{let} per -function. I think because of clarity and maintenance (and possible -future implementation), @code{let}-s should be used (nested) in a way to -provide the clearest code. +The current behavior is a feature, not a bug. Point remains at the same +buffer position as long as that position does not scroll off the screen. +In that event, point will end up in either the upper-left or lower-left +hand corner. -@node Q5.1.5, Q5.1.6, Q5.1.4, Miscellaneous -@unnumberedsubsec Q5.1.5: What is the recommended use of @code{setq}? +This cannot be changed. -@itemize @bullet -@item Global variables +@node Q4.6.5, Q4.6.6, Q4.6.4, Display +@unnumberedsubsec Q4.6.5: Scrolling one line at a time. -You will typically @code{defvar} your global variable to a default -value, and use @code{setq} to set it later. +Can the cursor keys scroll the screen a line at a time, rather than the +default half page jump? I tend it to find it disorienting. -It is never a good practice to @code{setq} user variables (like -@code{case-fold-search}, etc.), as it ignores the user's choice -unconditionally. Note that @code{defvar} doesn't change the value of a -variable if it was bound previously. If you wish to change a -user-variable temporarily, use @code{let}: +Use the following: @lisp -(let ((case-fold-search nil)) - ... ; code with searches that must be case-sensitive - ...) +(setq scroll-step 1) @end lisp -You will notice the user-variables by their docstrings beginning with an -asterisk (a convention). +You can also change this with Customize. Select from the +@code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...} +or type @kbd{M-x customize @key{RET} windows @key{RET}}. -@item Local variables +@node Q4.6.6, Q4.6.7, Q4.6.5, Display +@unnumberedsubsec Q4.6.6: How can I turn off automatic horizontal scrolling in specific modes? -Bind them with @code{let}, which will unbind them (or restore their -previous value, if they were bound) after exiting from the @code{let} -form. Change the value of local variables with @code{setq} or whatever -you like (e.g. @code{incf}, @code{setf} and such). The @code{let} form -can even return one of its local variables. +Do @code{(setq truncate-lines t)} in the mode-hooks for any modes +in which you want lines truncated. -Typical usage: +More precisely: If @code{truncate-lines} is nil, horizontal scrollbars +will never appear. Otherwise, they will appear only if the value of +@code{scrollbar-height} for that buffer/window/etc. is non-zero. If you +do @lisp -;; iterate through the elements of the list returned by -;; `hairy-function-that-returns-list' -(let ((l (hairy-function-that-returns-list))) - (while l - ... do something with (car l) ... - (setq l (cdr l)))) +(set-specifier scrollbar-height 0) @end lisp -Another typical usage includes building a value simply to work with it. +then horizontal scrollbars will not appear in truncated buffers unless +the package specifically asked for them. -@lisp -;; Build the mode keymap out of the key-translation-alist -(let ((inbox (file-truename (expand-file-name box))) - (i 0)) - ... code dealing with inbox ... - inbox) -@end lisp +@node Q4.6.7, Q4.7.1, Q4.6.6, Display +@unnumberedsubsec Q4.6.7: I find auto-show-mode disconcerting. How do I turn it off? -This piece of code uses the local variable @code{inbox}, which becomes -unbound (or regains old value) after exiting the form. The form also -returns the value of @code{inbox}, which can be reused, for instance: +@code{auto-show-mode} controls whether or not a horizontal scrollbar +magically appears when a line is too long to be displayed. This is +enabled by default. To turn it off, put the following in your +@file{init.el}: @lisp -(setq foo-processed-inbox - (let .....)) +(setq auto-show-mode nil) +(setq-default auto-show-mode nil) @end lisp -@end itemize -@node Q5.1.6, Q5.1.7, Q5.1.5, Miscellaneous -@unnumberedsubsec Q5.1.6: What is the typical misuse of @code{setq} ? +@unnumberedsec 4.7: The Gutter Tabs, The Progress Bar, Widgets -A typical misuse is probably @code{setq}ing a variable that was meant to -be local. Such a variable will remain bound forever, never to be -garbage-collected. For example, the code doing: +@node Q4.7.1, Q4.7.2, Q4.6.7, Display +@unnumberedsubsec Q4.7.1: How can I disable the gutter tabs? -@lisp -(defun my-function (whatever) - (setq a nil) - ... build a large list ... - ... and exit ...) -@end lisp +#### Write me. -does a bad thing, as @code{a} will keep consuming memory, never to be -unbound. The correct thing is to do it like this: +@node Q4.7.2, Q4.7.3, Q4.7.1, Display +@unnumberedsubsec Q4.7.2: How can I disable the progress bar? -@lisp -(defun my-function (whatever) - (let (a) ; default initialization is to nil - ... build a large list ... - ... and exit, unbinding `a' in the process ...) -@end lisp +#### Write me. -Not only is this prettier syntactically, but it makes it possible for -Emacs to garbage-collect the objects which @code{a} used to reference. +@node Q4.7.3, Q4.7.4, Q4.7.2, Display +@unnumberedsubsec Q4.7.3: There are bugs in the gutter or widgets. -Note that even global variables should not be @code{setq}ed without -@code{defvar}ing them first, because the byte-compiler issues warnings. -The reason for the warning is the following: +#### Write me. -@lisp -(defun flurgoze nil) ; ok, global internal variable -... +@node Q4.7.4, , Q4.7.3, Display +@unnumberedsubsec Q4.7.4: How can I customize the gutter or gutter tabs? -(setq flurghoze t) ; ops! a typo, but semantically correct. - ; however, the byte-compiler warns. +#### Write me. -While compiling toplevel forms: -** assignment to free variable flurghoze -@end lisp +@node External Subsystems, Internet, Display, Top +@unnumbered 5 Interfacing with the Operating System and External Devices -@node Q5.1.7, Q5.1.8, Q5.1.6, Miscellaneous -@unnumberedsubsec Q5.1.7: I like the @code{do} form of cl, does it slow things down? +This is part 5 of the XEmacs Frequently Asked Questions list. This +section is devoted to the various ways that XEmacs interfaces with the +operating system, with other processes and with external devices such +as speakers and the printer. -It shouldn't. Here is what Dave Gillespie has to say about cl.el -performance: - -@quotation -Many of the advanced features of this package, such as @code{defun*}, -@code{loop}, and @code{setf}, are implemented as Lisp macros. In -byte-compiled code, these complex notations will be expanded into -equivalent Lisp code which is simple and efficient. For example, the -forms - -@lisp -(incf i n) -(push x (car p)) -@end lisp +@menu +5.0: X Window System and Resources +* Q5.0.1:: Where is a list of X resources? +* Q5.0.2:: How can I detect a color display? +* Q5.0.3:: How can I get the icon to just say @samp{XEmacs}? +* Q5.0.4:: How can I have the window title area display the full path? +* Q5.0.5:: @samp{xemacs -name junk} doesn't work? +* Q5.0.6:: @samp{-iconic} doesn't work. + +5.1: Microsoft Windows +* Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? +* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs? + +5.2: Printing +* Q5.2.1:: What do I need to change to make printing work? +* Q5.2.2:: How can I print WYSIWYG a font-locked buffer? +* Q5.2.3:: Getting @kbd{M-x lpr} to work with postscript printer. +* Q5.2.4:: Can you print under MS Windows? + +5.3: Sound +* Q5.3.1:: How do I turn off the sound? +* Q5.3.2:: How do I get funky sounds instead of a boring beep? +* Q5.3.3:: What are NAS and ESD (EsounD)? +* Q5.3.4:: Sunsite sounds don't play. + +5.4: Running an Interior Shell, Invoking Subprocesses +* Q5.4.1:: What is an interior shell? +* Q5.4.2:: How do I start up a second shell buffer? +* Q5.4.3:: Telnet from shell filters too much +* Q5.4.4:: Strange things are happening in Shell Mode. +* Q5.4.5:: XEmacs complains "No such file or directory, diff" +* Q5.4.6:: Cygwin error "fork_copy: linked dll/bss pass 0 failed" + +5.5: Multiple Device Support +* Q5.5.1:: How do I open a frame on another screen of my multi-headed display? +* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How? +* Q5.5.3:: How do I disable gnuserv from opening a new frame? +* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client? +* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? +@end menu -are expanded at compile-time to the Lisp forms +@unnumberedsec 5.0: X Window System and Resources -@lisp -(setq i (+ i n)) -(setcar p (cons x (car p))) -@end lisp +@node Q5.0.1, Q5.0.2, External Subsystems, External Subsystems +@unnumberedsubsec Q5.0.1: Where is a list of X resources? -which are the most efficient ways of doing these respective operations -in Lisp. Thus, there is no performance penalty for using the more -readable @code{incf} and @code{push} forms in your compiled code. +Search through the @file{NEWS} file for @samp{X Resources}. A fairly +comprehensive list is given after it. -@emph{Interpreted} code, on the other hand, must expand these macros -every time they are executed. For this reason it is strongly -recommended that code making heavy use of macros be compiled. (The -features labelled @dfn{Special Form} instead of @dfn{Function} in this -manual are macros.) A loop using @code{incf} a hundred times will -execute considerably faster if compiled, and will also garbage-collect -less because the macro expansion will not have to be generated, used, -and thrown away a hundred times. +In addition, an @file{app-defaults} file @file{etc/Emacs.ad} is +supplied, listing the defaults. The file @file{etc/sample.Xresources} +gives a different set of defaults that you might consider for +installation in your @file{~/.Xresources} file. It is nearly the same +as @file{etc/Emacs.ad}, but a few entries are altered. Be careful about +installing the contents of this file into your @file{.Xresources} (or +legacy @file{.Xdefaults}) file if you use GNU Emacs under X11 as well. -You can find out how a macro expands by using the @code{cl-prettyexpand} -function. -@end quotation +@node Q5.0.2, Q5.0.3, Q5.0.1, External Subsystems +@unnumberedsubsec Q5.0.2: How can I detect a color display? -@node Q5.1.8, Q5.1.9, Q5.1.7, Miscellaneous -@unnumberedsubsec Q5.1.8: I like recursion, does it slow things down? +You can test the return value of the function @code{(device-class)}, as +in: -Yes. Emacs byte-compiler cannot do much to optimize recursion. But -think well whether this is a real concern in Emacs. Much of the Emacs -slowness comes from internal mechanisms such as redisplay, or from the -fact that it is an interpreter. +@lisp +(when (eq (device-class) 'color) + (set-face-foreground 'font-lock-comment-face "Grey") + (set-face-foreground 'font-lock-string-face "Red") + .... + ) +@end lisp -Please try not to make your code much uglier to gain a very small speed -gain. It's not usually worth it. +@node Q5.0.3, Q5.0.4, Q5.0.2, External Subsystems +@unnumberedsubsec Q5.0.3: How can I get the icon to just say @samp{XEmacs}? -@node Q5.1.9, Q5.1.10, Q5.1.8, Miscellaneous -@unnumberedsubsec Q5.1.9: How do I put a glyph as annotation in a buffer? +I'd like the icon to just say @samp{XEmacs}, and not include the name of +the current file in it. -Here is a solution that will insert the glyph annotation at the -beginning of buffer: +Add the following line to your @file{init.el}: @lisp -(make-annotation (make-glyph '([FORMAT :file FILE] - [string :data "fallback-text"])) - (point-min) - 'text - (current-buffer)) +(setq frame-icon-title-format "XEmacs") @end lisp -Replace @samp{FORMAT} with an unquoted symbol representing the format of -the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.) -Instead of @samp{FILE}, use the image file name -(e.g. -@iftex -@* -@end iftex -@file{/usr/local/lib/xemacs-21.4/etc/recycle.xpm}). - -You can turn this to a function (that optionally prompts you for a file -name), and inserts the glyph at @code{(point)} instead of -@code{(point-min)}. - -@node Q5.1.10, Q5.1.11, Q5.1.9, Miscellaneous -@unnumberedsubsec Q5.1.10: @code{map-extents} won't traverse all of my extents! +@node Q5.0.4, Q5.0.5, Q5.0.3, External Subsystems +@unnumberedsubsec Q5.0.4: How can I have the window title area display the full path? -I tried to use @code{map-extents} to do an operation on all the extents -in a region. However, it seems to quit after processing a random number -of extents. Is it buggy? +I'd like to have the window title area display the full directory/name +of the current buffer file and not just the name. -No. The documentation of @code{map-extents} states that it will iterate -across the extents as long as @var{function} returns @code{nil}. -Unexperienced programmers often forget to return @code{nil} explicitly, -which results in buggy code. For instance, the following code is -supposed to delete all the extents in a buffer, and issue as many -@samp{fubar!} messages. +Add the following line to your @file{init.el}: @lisp -(map-extents (lambda (ext ignore) - (delete-extent ext) - (message "fubar!"))) +(setq frame-title-format "%S: %f") @end lisp -Instead, it will delete only the first extent, and stop right there -- -because @code{message} will return a non-nil value. The correct code -is: +A more sophisticated title might be: @lisp -(map-extents (lambda (ext ignore) - (delete-extent ext) - (message "fubar!") - nil)) +(setq frame-title-format + '("%S: " (buffer-file-name "%f" + (dired-directory dired-directory "%b")))) @end lisp -@node Q5.1.11, Q5.2.1, Q5.1.10, Miscellaneous -@unnumberedsubsec Q5.1.11: My elisp program is horribly slow. Is there -an easy way to find out where it spends time? -@c New +That is, use the file name, or the dired-directory, or the buffer name. -@email{hniksic@@xemacs.org, Hrvoje Niksic} writes: -@quotation -Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence}, -press a key (say @key{RET} in the Gnus Group buffer), and get the -results using @kbd{M-x profile-results}. It should give you an idea of -where the time is being spent. -@end quotation +@node Q5.0.5, Q5.0.6, Q5.0.4, External Subsystems +@unnumberedsubsec Q5.0.5: @samp{xemacs -name junk} doesn't work? -@node Q5.2.1, Q5.2.2, Q5.1.11, Miscellaneous -@unnumberedsubsec Q5.2.1: How do I turn off the sound? +When I run @samp{xterm -name junk}, I get an xterm whose class name +according to xprop, is @samp{junk}. This is the way it's supposed to +work, I think. When I run @samp{xemacs -name junk} the class name is +not set to @samp{junk}. It's still @samp{emacs}. What does +@samp{xemacs -name} really do? The reason I ask is that my window +manager (fvwm) will make a window sticky and I use XEmacs to read my +mail. I want that XEmacs window to be sticky, without having to use the +window manager's function to set the window sticky. What gives? -Add the following line to your @file{init.el}/@file{.emacs}: +@samp{xemacs -name} sets the application name for the program (that is, +the thing which normally comes from @samp{argv[0]}). Using @samp{-name} +is the same as making a copy of the executable with that new name. The +@code{WM_CLASS} property on each frame is set to the frame-name, and the +application-class. So, if you did @samp{xemacs -name FOO} and then +created a frame named @var{BAR}, you'd get an X window with WM_CLASS = +@code{( "BAR", "Emacs")}. However, the resource hierarchy for this +widget would be: -@lisp -(setq bell-volume 0) -(setq sound-alist nil) -@end lisp +@example +Name: FOO .shell .container .BAR +Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame +@end example -That will make your XEmacs totally silent---even the default ding sound -(TTY beep on TTY-s) will be gone. +instead of the default -Starting with XEmacs 20.2 you can also change these with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Sound->Sound...} or type -@kbd{M-x customize @key{RET} sound @key{RET}}. +@example +Name: xemacs.shell .container .emacs +Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame +@end example -@node Q5.2.2, Q5.2.3, Q5.2.1, Miscellaneous -@unnumberedsubsec Q5.2.2: How do I get funky sounds instead of a boring beep? +It is arguable that the first element of WM_CLASS should be set to the +application-name instead of the frame-name, but I think that's less +flexible, since it does not give you the ability to have multiple frames +with different WM_CLASS properties. Another possibility would be for +the default frame name to come from the application name instead of +simply being @samp{emacs}. However, at this point, making that change +would be troublesome: it would mean that many users would have to make +yet another change to their resource files (since the default frame name +would suddenly change from @samp{emacs} to @samp{xemacs}, or whatever +the executable happened to be named), so we'd rather avoid it. -Make sure your XEmacs was compiled with sound support, and then put this -in your @file{init.el}/@file{.emacs}: +To make a frame with a particular name use: @lisp -(load-default-sounds) +(make-frame '((name . "the-name"))) @end lisp -@c The sound support in XEmacs 19.14 was greatly improved over previous -@c versions. -@c -@node Q5.2.3, Q5.2.4, Q5.2.2, Miscellaneous -@unnumberedsubsec Q5.2.3: What's NAS, how do I get it? - -@xref{Q2.0.3}, for an explanation of the @dfn{Network Audio System}. +@node Q5.0.6, Q5.1.1, Q5.0.5, External Subsystems +@unnumberedsubsec Q5.0.6: @samp{-iconic} doesn't work. -@node Q5.2.4, Q5.3.1, Q5.2.3, Miscellaneous -@unnumberedsubsec Q5.2.4: Sunsite sounds don't play. - -I'm having some trouble with sounds I've downloaded from sunsite. They -play when I run them through @code{showaudio} or cat them directly to -@file{/dev/audio}, but XEmacs refuses to play them. +When I start up XEmacs using @samp{-iconic} it doesn't work right. +Using @samp{-unmapped} on the command line, and setting the +@code{initiallyUnmapped} X Resource don't seem to help much either... -@email{gutschk@@uni-muenster.de, Markus Gutschke} writes: +@email{ben@@xemacs.org, Ben Wing} writes: @quotation -[Many of] These files have an (erroneous) 24byte header that tells about -the format that they have been recorded in. If you cat them to -@file{/dev/audio}, the header will be ignored and the default behavior -for /dev/audio will be used. This happens to be 8kHz uLaw. It is -probably possible to fix the header by piping through @code{sox} and -passing explicit parameters for specifying the sampling format; you then -need to perform a 'null' conversion from SunAudio to SunAudio. +Ugh, this stuff is such an incredible mess that I've about given up +getting it to work. The principal problem is numerous window-manager +bugs... @end quotation -@node Q5.3.1, Q5.3.2, Q5.2.4, Miscellaneous -@unnumberedsec 5.3: Miscellaneous -@unnumberedsubsec Q5.3.1: How do you make XEmacs indent CL if-clauses correctly? +@unnumberedsec 5.1: Microsoft Windows -I'd like XEmacs to indent all the clauses of a Common Lisp @code{if} the -same amount instead of indenting the 3rd clause differently from the -first two. +@node Q5.1.1, Q5.1.2, Q5.0.6, External Subsystems +@unnumberedsubsec Q5.1.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? -One way is to add, to @file{init.el}/@file{.emacs}: +In his flavor of Emacs 20, Richard Stallman has renamed all the @samp{win32-*} +symbols to @samp{w32-*}. Does XEmacs do the same? -@lisp -(put 'if 'lisp-indent-function nil) -@end lisp +We consider such a move counter-productive, thus we do not use the +@samp{w32} prefix. (His rather questionable justification was that he +did not consider Windows to be a "winning" platform.) However, the name +@samp{Win32} is not particularly descriptive outside the Windows world, +and using just @samp{windows-} would be too generic. So we chose a +compromise, the prefix @samp{mswindows-} for Windows-related variables +and functions. -However, note that the package @code{cl-indent} that comes with -XEmacs sets up this kind of indentation by default. @code{cl-indent} -also knows about many other CL-specific forms. To use @code{cl-indent}, -one can do this: +Thus all the XEmacs variables and functions directly related to either +the Windows GUI or OS are prefixed @samp{mswindows-} (except for a +couple of debugging variables, prefixed @samp{debug-mswindows-}). From +an architectural perspective, however, we believe that this is mostly a +non-issue because there should be a very small number of +window-systems-specific variables anyway. Whenever possible, we try to +provide generic interfaces that apply to all window systems. -@lisp -(load "cl-indent") -(setq lisp-indent-function (function common-lisp-indent-function)) -@end lisp +@c not true: +@c The user variables +@c that share functionality with existing NT Emacs variables are be named +@c with our convention, but we provide the GNU Emacs names as +@c compatibility aliases. -One can also customize @file{cl-indent.el} so it mimics the default -@code{if} indentation @code{then} indented more than the @code{else}. -Here's how: +@node Q5.1.2, Q5.2.1, Q5.1.1, External Subsystems +@unnumberedsubsec Q5.1.2: How do I get Windows Explorer to associate a file type with XEmacs? -@lisp -(put 'if 'common-lisp-indent-function '(nil nil &body)) -@end lisp +@unnumberedsubsubsec Associating a new file type with XEmacs. -Also, a new version (1.2) of @file{cl-indent.el} was posted to -comp.emacs.xemacs on 12/9/94. This version includes more documentation -than previous versions. This may prove useful if you need to customize -any indent-functions. +In Explorer select @samp{View->Options->File Types}, press @samp{[New +Type...]} and fill in the dialog box, e.g.: -@node Q5.3.2, Q5.3.3, Q5.3.1, Miscellaneous -@unnumberedsubsec Q5.3.2: [This question intentionally left blank] +@example + Description of type: Emacs Lisp source + Associated extension: el + Content Type (MIME): text/plain +@end example -Obsolete question, left blank to avoid renumbering. +then press @samp{[New...]} and fill in the @samp{Action} dialog box as +follows: -@node Q5.3.3, Q5.3.4, Q5.3.2, Miscellaneous -@unnumberedsubsec Q5.3.3: How can I print WYSIWYG a font-locked buffer? +@example + Action: + Open -Font-lock looks nice. How can I print (WYSIWYG) the highlighted -document? + Application used to perform action: + D:\Full\path\for\xemacs.exe "%1" -The package @code{ps-print}, which is now included with XEmacs, provides -the ability to do this. The source code contains complete instructions -on its use, in -@file{$prefix/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print.el}, -being the default location of an installed ps-print package. + [x] Use DDE -@node Q5.3.4, Q5.3.5, Q5.3.3, Miscellaneous -@unnumberedsubsec Q5.3.4: Getting @kbd{M-x lpr} to work with postscript printer. + DDE Message: + open("%1") -My printer is a Postscript printer and @code{lpr} only works for -Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x -lpr-buffer} to work? + Application: + <leave blank> -Put something like this in your @file{init.el}/@file{.emacs}: + DDE Application Not Running: + <leave blank> -@lisp -(setq lpr-command "a2ps") -(setq lpr-switches '("-p" "-1")) -@end lisp + Topic: + <leave blank> +@end example -If you don't use a2ps to convert ASCII to postscript (why not, it's -free?), replace with the command you do use. Note also that some -versions of a2ps require a @samp{-Pprinter} to ensure spooling. - -@node Q5.3.5, Q5.3.6, Q5.3.4, Miscellaneous -@unnumberedsubsec Q5.3.5: How do I specify the paths that XEmacs uses for finding files? - -You can specify what paths to use by using a number of different flags -when running configure. See the section MAKE VARIABLES in the top-level -file INSTALL in the XEmacs distribution for a listing of those flags. - -Most of the time, however, the simplest fix is: @strong{do not} specify -paths as you might for GNU Emacs. XEmacs can generally determine the -necessary paths dynamically at run time. The only path that generally -needs to be specified is the root directory to install into. That can -be specified by passing the @code{--prefix} flag to configure. For a -description of the XEmacs install tree, please consult the @file{NEWS} -file. - -@node Q5.3.6, Q5.3.7, Q5.3.5, Miscellaneous -@unnumberedsubsec Q5.3.6: [This question intentionally left blank] - -Obsolete question, left blank to avoid renumbering. - -@node Q5.3.7, Q5.3.8, Q5.3.6, Miscellaneous -@unnumberedsubsec Q5.3.7: Can I have the end of the buffer delimited in some way? - -Say, with: @samp{[END]}? - -Try this: - -@lisp -(let ((ext (make-extent (point-min) (point-max)))) - (set-extent-property ext 'start-closed t) - (set-extent-property ext 'end-closed t) - (set-extent-property ext 'detachable nil) - (set-extent-end-glyph ext (make-glyph [string :data "[END]"]))) -@end lisp - -Since this is XEmacs, you can specify an icon to be shown on -window-system devices. To do so, change the @code{make-glyph} call to -something like this: - -@lisp -(make-glyph '([xpm :file "~/something.xpm"] - [string :data "[END]"])) -@end lisp - -You can inline the @sc{xpm} definition yourself by specifying -@code{:data} instead of @code{:file}. Here is such a full-featured -version that works on both X and TTY devices: - -@lisp -(let ((ext (make-extent (point-min) (point-max)))) - (set-extent-property ext 'start-closed t) - (set-extent-property ext 'end-closed t) - (set-extent-property ext 'detachable nil) - (set-extent-end-glyph ext (make-glyph '([xpm :data "\ -/* XPM */ -static char* eye = @{ -\"20 11 7 2\", -\"__ c None\" -\"_` c #7f7f7f\", -\"_a c #fefefe\", -\"_b c #7f0000\", -\"_c c #fefe00\", -\"_d c #fe0000\", -\"_e c #bfbfbf\", -\"___________`_`_`___b_b_b_b_________`____\", -\"_________`_`_`___b_c_c_c_b_b____________\", -\"_____`_`_`_e___b_b_c_c_c___b___b_______`\", -\"___`_`_e_a___b_b_d___b___b___b___b______\", -\"_`_`_e_a_e___b_b_d_b___b___b___b___b____\", -\"_`_`_a_e_a___b_b_d___b___b___b___b___b__\", -\"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\", -\"___`_`_e_a___b_b_b_d_c___b___b___d_b____\", -\"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\", -\"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\", -\"___`_____`_`_`_`___b_b_b_b_b_b__________\", -@} ;"] - [string :data "[END]"])))) -@end lisp - -Note that you might want to make this a function, and put it to a hook. -We leave that as an exercise for the reader. - -@node Q5.3.8, Q5.3.9, Q5.3.7, Miscellaneous -@unnumberedsubsec Q5.3.8: How do I insert today's date into a buffer? - -Like this: - -@lisp -(insert (current-time-string)) -@end lisp - -@node Q5.3.9, Q5.3.10, Q5.3.8, Miscellaneous -@unnumberedsubsec Q5.3.9: Are only certain syntactic character classes available for abbrevs? - -@email{gutschk@@uni-muenster.de, Markus Gutschke} writes: - -@quotation -Yes, abbrevs only expands word-syntax strings. While XEmacs does not -prevent you from defining (e.g. with @kbd{C-x a g} or @kbd{C-x a l}) -abbrevs that contain special characters, it will refuse to expand -them. So you need to ensure, that the abbreviation contains letters and -digits only. This means that @samp{xd}, @samp{d5}, and @samp{5d} are -valid abbrevs, but @samp{&d}, and @samp{x d} are not. - -If this sounds confusing to you, (re-)read the online documentation for -abbrevs (@kbd{C-h i m XEmacs @key{RET} m Abbrevs @key{RET}}), and then come back and -read this question/answer again. -@end quotation - -Starting with XEmacs 20.3 this restriction has been lifted. - -@node Q5.3.10, Q5.3.11, Q5.3.9, Miscellaneous -@unnumberedsubsec Q5.3.10: How can I get those oh-so-neat X-Face lines? - -Firstly there is an ftp site which describes X-faces and has the -associated tools mentioned below, at -@uref{ftp://ftp.cs.indiana.edu:/pub/faces/}. - -Then the steps are - -@enumerate -@item -Create 48x48x1 bitmap with your favorite tool - -@item -Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc., -and then compile the face. - -@item -@example -cat file.xbm | xbm2ikon |compface > file.face -@end example - -@item -Then be sure to quote things that are necessary for emacs strings: - -@example -cat ./file.face | sed 's/\\/\\\\/g' -@iftex -\ @* -@end iftex -| sed 's/\"/\\\"/g' > ./file.face.quoted -@end example - -@item -Then set up emacs to include the file as a mail header - there were a -couple of suggestions here---either something like: - -@lisp -(setq mail-default-headers - "X-Face: @email{Ugly looking text string here}") -@end lisp - -Or, alternatively, as: - -@lisp -(defun mail-insert-x-face () - (save-excursion - (goto-char (point-min)) - (search-forward mail-header-separator) - (beginning-of-line) - (insert "X-Face:") - (insert-file-contents "~/.face"))) - -(add-hook 'mail-setup-hook 'mail-insert-x-face) -@end lisp -@end enumerate - -However, 2 things might be wrong: - -Some versions of pbmtoicon produces some header lines that is not -expected by the version of compface that I grabbed. So I found I had to -include a @code{tail +3} in the pipeline like this: - -@example -cat file.xbm | xbm2ikon | tail +3 |compface > file.face -@end example - -Some people have also found that if one uses the @code{(insert-file)} -method, one should NOT quote the face string using the sed script . - -It might also be helpful to use @email{stig@@hackvan.com, Stig's} script -(included in the compface distribution at XEmacs.org) to do the -conversion. -@comment For convenience xbm2xface is available for anonymous FTP at -@comment @uref{ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl}. - -Contributors for this item: - -Paul Emsley, -Ricardo Marek, -Amir J. Katz, -Glen McCort, -Heinz Uphoff, -Peter Arius, -Paul Harrison, and -Vegard Vesterheim - -@node Q5.3.11, Q5.3.12, Q5.3.10, Miscellaneous -@unnumberedsubsec Q5.3.11: How do I add new Info directories? - -You use something like: - -@lisp -(setq Info-directory-list (cons - (expand-file-name "~/info") - Info-default-directory-list)) -@end lisp - -@email{davidm@@prism.kla.com, David Masterson} writes: - -@quotation -Emacs Info and XEmacs Info do many things differently. If you're trying to -support a number of versions of Emacs, here are some notes to remember: - -@enumerate -@item -Emacs Info scans @code{Info-directory-list} from right-to-left while -XEmacs Info reads it from left-to-right, so append to the @emph{correct} -end of the list. +@unnumberedsubsubsec Associating an existing file type with XEmacs. -@item -Use @code{Info-default-directory-list} to initialize -@code{Info-directory-list} @emph{if} it is available at startup, but not -all Emacsen define it. +In Explorer select @samp{View->Options->File Types}. Click on the file +type in the list and press @samp{[Edit...]}. If the file type already +has an @samp{Open} action, double click on it and fill in the +@samp{Action} dialog box as described above; otherwise create a new +action. -@item -Emacs Info looks for a standard @file{dir} file in each of the -directories scanned from #1 and magically concatenates them together. +If the file type has more than one action listed, you probably want to +make the @samp{Open} action that you just edited the default by clicking on +it and pressing @samp{Set Default}. -@item -XEmacs Info looks for a @file{localdir} file (which consists of just the -menu entries from a @file{dir} file) in each of the directories scanned -from #1 (except the first), does a simple concatenation of them, and -magically attaches the resulting list to the end of the menu in the -@file{dir} file in the first directory. -@end enumerate +Note for Windows 2000 users: Under Windows 2000, get to @samp{File Types} +using @samp{Control Panel->Folder Options->File Types}. -Another alternative is to convert the documentation to HTML with -texi2html and read it from a web browser like Lynx or W3. -@end quotation +@unnumberedsec 5.2: Printing -@node Q5.3.12, , Q5.3.11, Miscellaneous -@unnumberedsubsec Q5.3.12: What do I need to change to make printing work? +@node Q5.2.1, Q5.2.2, Q5.1.2, External Subsystems +@unnumberedsubsec Q5.2.1: What do I need to change to make printing work? For regular printing there are two variables that can be customized. @@ -6214,720 +6402,1848 @@ NOTE: It is an undocumented limitation in XEmacs that postscript printing (the @code{Pretty Print Buffer} menu item) @strong{requires} a window system environment. It cannot be used outside of X11. -@node MS Windows, Current Events, Miscellaneous, Top -@unnumbered 6 XEmacs on MS Windows +@node Q5.2.2, Q5.2.3, Q5.2.1, External Subsystems +@unnumberedsubsec Q5.2.2: How can I print WYSIWYG a font-locked buffer? -This is part 6 of the XEmacs Frequently Asked Questions list, written by -Hrvoje Niksic and others. This section is devoted to the MS Windows -port of XEmacs. +Font-lock looks nice. How can I print (WYSIWYG) the highlighted +document? -@menu -General Info -* Q6.0.1:: What is the status of the XEmacs port to Windows? -* Q6.0.2:: What flavors of MS Windows are supported? The list name implies NT only. -* Q6.0.3:: Are binaries available? -* Q6.0.4:: Can I build XEmacs on MS Windows with X support? Do I need to? -* Q6.0.5:: I'd like to help out. What do I do? -* Q6.0.6:: What are Cygwin and MinGW, and do I need them to run XEmacs? -* Q6.0.7:: What exactly are all the different ways to build XEmacs under Windows? - -Building XEmacs on MS Windows: -* Q6.1.1:: What compiler/libraries do I need to compile XEmacs? -* Q6.1.2:: How do I compile the native port? -* Q6.1.3:: What do I need for Cygwin? -* Q6.1.4:: How do I compile under Cygwin? -* Q6.1.5:: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})? -* Q6.1.6:: I decided to run with X. Where do I get an X server? -* Q6.1.7:: How do I compile with X support? - -Customization and User Interface: -* Q6.2.1:: How does the port cope with differences in the Windows user interface? -* Q6.2.2:: How do I change fonts in XEmacs on MS Windows? -* Q6.2.3:: Where do I put my @file{init.el}/@file{.emacs} file? -* Q6.2.4:: How do I get Windows Explorer to associate a file type with XEmacs? -* Q6.2.5:: Is it possible to print from XEmacs? - -Miscellaneous: -* Q6.3.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? -* Q6.3.2:: What are the differences between the various MS Windows emacsen? -* Q6.3.3:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? -* Q6.3.4:: What is the porting team doing at the moment? - -Troubleshooting: -* Q6.4.1:: XEmacs won't start on Windows. -* Q6.4.2:: Why do I get a blank toolbar on Windows 95? -* Q6.4.3:: XEmacs complains "No such file or directory, diff" +The package @code{ps-print}, which is now included with XEmacs, provides +the ability to do this. The source code contains complete instructions +on its use, in +@file{$prefix/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print.el}, +being the default location of an installed ps-print package. -@end menu +@node Q5.2.3, Q5.2.4, Q5.2.2, External Subsystems +@unnumberedsubsec Q5.2.3: Getting @kbd{M-x lpr} to work with postscript printer. -@node Q6.0.1, Q6.0.2, MS Windows, MS Windows -@unnumberedsec 6.0: General Info -@unnumberedsubsec Q6.0.1: What is the status of the XEmacs port to Windows? +My printer is a Postscript printer and @code{lpr} only works for +Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x +lpr-buffer} to work? -Is XEmacs really ported to MS Windows? What is the status of the port? +Put something like this in your @file{init.el}: -Beginning with release 21.0, XEmacs has worked under MS Windows. A -group of dedicated developers actively maintains and improves the -Windows-specific portions of the code. The mailing list at -@email{xemacs-nt@@xemacs.org} is dedicated to that effort (please use -the -request address to subscribe). (Despite its name, XEmacs actually -works on all versions of Windows.) +@lisp +(setq lpr-command "a2ps") +(setq lpr-switches '("-p" "-1")) +@end lisp -As of May 2001, XEmacs on MS Windows is stable and full-featured, and -has been so for a year or more -- in fact, some features, such as -printing, actually work better on Windows than native Unix. However, -the internationalization (Mule) support does not work -- although this -is being actively worked on. +If you don't use a2ps to convert ASCII to postscript (why not, it's +free?), replace with the command you do use. Note also that some +versions of a2ps require a @samp{-Pprinter} to ensure spooling. +@node Q5.2.4, Q5.3.1, Q5.2.3, External Subsystems +@unnumberedsubsec Q5.2.4: Can you print under MS Windows? -@node Q6.0.2, Q6.0.3, Q6.0.1, MS Windows -@unnumberedsubsec Q6.0.2: What flavors of MS Windows are supported? The list name implies NT only. +As of 21.4, printing works on Windows, using simply +@samp{File->Print BUFFER...}, and can be configured with +@samp{File->Page Setup...}. -The list name is misleading, as XEmacs supports and has been compiled on -Windows 95, Windows 98, Windows NT, Windows 2000, Windows ME, Windows -XP, and all newer versions of Windows. The MS Windows-specific code is -based on Microsoft Win32 API, and will not work on MS Windows 3.x or on -MS-DOS. +Prior to 21.4, there is no built-in support, but there are some clever +hacks out there. If you know how, please let us know and we'll put it +here. -XEmacs also supports the Cygwin and MinGW development and runtime -environments, where it also uses native Windows code for graphical -features. +@unnumberedsec 5.3: Sound +@node Q5.3.1, Q5.3.2, Q5.2.4, External Subsystems +@unnumberedsubsec Q5.3.1: How do I turn off the sound? -@node Q6.0.3, Q6.0.4, Q6.0.2, MS Windows -@unnumberedsubsec Q6.0.3: Are binaries available? +Add the following line to your @file{init.el}: -Binaries are available at @uref{http://www.xemacs.org/Download/win32/} -for the native and Cygwin MS Windows versions of 21.4, and the native -version of 21.1. +@lisp +(setq bell-volume 0) +(setq sound-alist nil) +@end lisp -The 21.4 binaries use a modified version of the Cygwin installer. Run -the provided @file{setup.exe}, and follow the instructions. +That will make your XEmacs totally silent---even the default ding sound +(TTY beep on TTY-s) will be gone. +You can also change these with Customize. Select from the +@code{Options} menu @code{Advanced +(Customize)->Emacs->Environment->Sound->Sound...} or type @kbd{M-x +customize @key{RET} sound @key{RET}}. -@node Q6.0.4, Q6.0.5, Q6.0.3, MS Windows -@unnumberedsubsec Q6.0.4: Can I build XEmacs on MS Windows with X support? Do I need to? -Yes, you can, but no you do not need to. In fact, we recommend that you -use a native-GUI version unless you have a specific need for an X -version. +@node Q5.3.2, Q5.3.3, Q5.3.1, External Subsystems +@unnumberedsubsec Q5.3.2: How do I get funky sounds instead of a boring beep? -@node Q6.0.5, Q6.0.6, Q6.0.4, MS Windows -@unnumberedsubsec Q6.0.5: I'd like to help out. What do I do? +Make sure your XEmacs was compiled with sound support, and then put this +in your @file{init.el}: -It depends on the knowledge and time you possess. If you are a -programmer, try to build XEmacs and see if you can improve it. -Windows-specific improvements like integration with established -Windows environments are especially sought after. +@lisp +(load-default-sounds) +@end lisp -Otherwise, you can still help by downloading the binaries, using -XEmacs as your everyday editor and reporting bugs you find to the -mailing list. +@node Q5.3.3, Q5.3.4, Q5.3.2, External Subsystems +@unnumberedsubsec Q5.3.3: What are NAS and ESD (EsounD)? -Another area where we need help is the documentation: We need good -documentation for building XEmacs and for using it. This FAQ is a -small step in that direction. +@dfn{Network Audio System} (NAS) is a client-server sound library for X. -@node Q6.0.6, Q6.0.7, Q6.0.5, MS Windows -@unnumberedsubsec Q6.0.6: What are Cygwin and MinGW, and do I need them to run XEmacs? +@uref{http://radscan.com/nas.html}. -To answer the second part of the question: No, you, you don't need -Cygwin or MinGW to build or to run XEmacs. But if you have them and -want to use them, XEmacs supports these environments. +To build XEmacs with it, use the @file{configure} flag +@samp{--with-sound=nas} (@samp{--enable-sound=nas} in 21.5 or later). -(One important reason to support Cygwin is that it lets the MS Windows -developers test out their code in a Unix environment without actually -having to have a Unix machine around. For this reason alone, Cygwin -support is likely to remain supported for a long time in XEmacs. Same -goes for the X support under Cygwin, for the same reasons. MinGW -support, on the other hand, depends on volunteers to keep it up to date; -but this is generally not hard.) +@dfn{Enlightened Sound Daemon} (ESD or EsounD) is yet another sound system. -Cygwin is a set of tools providing Unix-like API on top of Win32. -It makes it easy to port large Unix programs without significant -changes to their source code. It is a development environment as well -as a runtime environment. +@uref{http://www.tux.org/~ricdude/EsounD.html}. -When built with Cygwin, XEmacs supports all display types -- TTY, X & -Win32 GUI, and can be built with support for all three simultaneously. -If you build with Win32 GUI support then the Cygwin version uses the -majority of the Windows-specific code, which is mostly related to -display. If you want to build with X support you need X libraries (and -an X server to display XEmacs on); see @ref{Q6.1.4}. TTY and Win32 GUI -require no additional libraries beyond what comes standard with Cygwin. +To build XEmacs with it, use the @file{configure} flag +@samp{--with-sound=esd} (@samp{--enable-sound=esd} in 21.5 or later). -The advantages of the Cygwin version are that it integrates well with -the Cygwin environment for existing Cygwin users; uses configure so -building with different features is very easy; and actively supports X & -TTY. Furthermore, the entire Cygwin environment and compiler are free, -whereas Visual C++ costs money. +You can specify support for both with a flag like +@samp{--with-sound=nas,esd} (@samp{--enable-sound=nas,esd} in 21.5 or +later). -The disadvantage is that it requires the whole Cygwin environment, -whereas the native port requires only a suitable MS Windows compiler. -Also, it follows the Unix filesystem and process model very closely -(some will undoubtedly view this as an advantage). +@node Q5.3.4, Q5.4.1, Q5.3.3, External Subsystems +@unnumberedsubsec Q5.3.4: Sunsite sounds don't play. -See @uref{http://sources.redhat.com/cygwin/} for more information on -Cygwin. +I'm having some trouble with sounds I've downloaded from sunsite. They +play when I run them through @code{showaudio} or cat them directly to +@file{/dev/audio}, but XEmacs refuses to play them. -MinGW is a collection of header files and import libraries that allow -one to use GCC under the Cygwin environment to compile and produce -exactly the same native Win32 programs that you can using Visual C++. -Programs compiled with MinGW make use of the standard Microsoft runtime -library @file{MSVCRT.DLL}, present on all Windows systems, and look, -feel, and act like a standard Visual-C-produced application. (The only -difference is the compiler.) This means that, unlike a -standardly-compiled Cygwin application, no extra runtime support -(e.g. Cygwin's @file{cygwin1.dll}) is required. This, along with the -fact that GCC is free (and works in a nice Unix-y way in a nice Unix-y -environment, for those die-hard Unix hackers out there), is the main -advantage of MinGW. It is also potentially faster than Cygwin because -it has less overhead when calling Windows, but you lose the POSIX -emulation layer, which makes Unix programs harder to port. (But this is -irrelevant for XEmacs since it's already ported to Win32.) +@email{gutschk@@uni-muenster.de, Markus Gutschke} writes: -See @uref{http://www.mingw.org/} for more information on MinGW. +@quotation +[Many of] These files have an (erroneous) 24byte header that tells about +the format that they have been recorded in. If you cat them to +@file{/dev/audio}, the header will be ignored and the default behavior +for /dev/audio will be used. This happens to be 8kHz uLaw. It is +probably possible to fix the header by piping through @code{sox} and +passing explicit parameters for specifying the sampling format; you then +need to perform a 'null' conversion from SunAudio to SunAudio. +@end quotation -@node Q6.0.7, Q6.1.1, Q6.0.6, MS Windows -@unnumberedsubsec Q6.0.7: What exactly are all the different ways to build XEmacs under Windows? +@unnumberedsec 5.4: Running an Interior Shell, Invoking Subprocesses -XEmacs can be built in several ways in the MS Windows environment. +@node Q5.4.1, Q5.4.2, Q5.3.4, External Subsystems +@unnumberedsubsec Q5.4.1: What is an interior shell? -The standard way is what we call the "native" port. It uses the Win32 -API and has no connection with X whatsoever -- it does not require X -libraries to build, nor does it require an X server to run. The native -port is the most reliable version and provides the best graphical -support. Almost all development is geared towards this version, and -there is little reason not to use it. +#### Write me. -The second way to build is the Cygwin port. It takes advantage of -Cygnus emulation library under Win32. @xref{Q6.0.6}, for more -information. +@node Q5.4.2, Q5.4.3, Q5.4.1, External Subsystems +@unnumberedsubsec Q5.4.2: How do I start up a second shell buffer? -A third way is the MinGW port. It uses the Cygwin environment to build -but does not require it at runtime. @xref{Q6.0.6}, for more -information. +In the @code{*shell*} buffer: -Finally, you might also be able to build the non-Cygwin, non-MinGW "X" -port. This was actually the first version of XEmacs that ran under MS -Windows, and although the code is still in XEmacs, it's essentially -orphaned and it's unlikely it will compile without a lot of work. If -you want an MS Windows versin of XEmacs that supports X, use the Cygwin -version. (The X support there is actively maintained, so that Windows -developers can test the X support in XEmacs.) +@lisp +M-x rename-buffer @key{RET} *shell-1* @key{RET} +M-x shell RET +@end lisp + +This will then start a second shell. The key is that no buffer named +@samp{*shell*} can exist. It might be preferable to use @kbd{M-x +rename-uniquely} to rename the @code{*shell*} buffer instead of @kbd{M-x +rename-buffer}. +Alternately, you can set the variable @code{shell-multiple-shells}. +If the value of this variable is non-nil, each time shell mode is invoked, +a new shell is made -@node Q6.1.1, Q6.1.2, Q6.0.7, MS Windows -@unnumberedsec 6.1: Building XEmacs on MS Windows -@unnumberedsubsec Q6.1.1: What compiler/libraries do I need to compile XEmacs? +@node Q5.4.3, Q5.4.4, Q5.4.2, External Subsystems +@unnumberedsubsec Q5.4.3: Telnet from shell filters too much -You need Visual C++ 4.2, 5.0, or 6.0 for the native version. (We have -some beta testers currently trying to compile with VC.NET, aka version -7.0, but we can't yet report complete success.) For the Cygwin and MinGW -versions, you need the Cygwin environment, which comes with GCC, the -compiler used for those versions. @xref{Q6.0.6}, for more information -on Cygwin and MinGW. +I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke +and use a telnet session within it. Everything works fine except that +now all @samp{^M}'s are filtered out by Emacs. Fixes? -@node Q6.1.2, Q6.1.3, Q6.1.1, MS Windows -@unnumberedsubsec Q6.1.2: How do I compile the native port? +Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather +than doing rsh or telnet within the local shell buffer. You can also +use @kbd{M-x ssh} to open secure remote session if you have @code{ssh} +installed. -Please read the file @file{nt/README} in the XEmacs distribution, which -contains the full description. +@node Q5.4.4, Q5.4.5, Q5.4.3, External Subsystems +@unnumberedsubsec Q5.4.4: Strange things are happening in Shell Mode. -@node Q6.1.3, Q6.1.4, Q6.1.2, MS Windows -@unnumberedsubsec Q6.1.3: What do I need for Cygwin? +Sometimes (i.e. it's not repeatable, and I can't work out why it +happens) when I'm typing into shell mode, I hit return and only a +portion of the command is given to the shell, and a blank prompt is +returned. If I hit return again, the rest of the previous command is +given to the shell. -You can find the Cygwin tools and compiler at: +@email{martin@@xemacs.org, Martin Buchholz} writes: -@uref{http://sources.redhat.com/cygwin/} +@quotation +There is a known problem with interaction between @code{csh} and the +@code{filec} option and XEmacs. You should add the following to your +@file{.cshrc}: -Click on the @samp{Install now!} link, which will download a file -@file{setup.exe}, which you can use to download everything else. (You -will need to pick a mirror site; @samp{mirrors.rcn.net} is probably the -best.) You should go ahead and install everything -- you'll get various -ancillary libraries that XEmacs needs or likes, e.g. XPM, PNG, JPEG, -TIFF, etc. +@example +if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec +@end example +@end quotation -If you want to compile under X, you will also need the X libraries; see -@ref{Q6.1.6}. +@node Q5.4.5, Q5.4.6, Q5.4.4, External Subsystems +@unnumberedsubsec Q5.4.5: XEmacs complains "No such file or directory, diff" -If you want to compile without X, you will need the @file{xpm-nox} -library, which must be specifically selected in the Cygwin netinstaller; -it is not selected by default. The package has had various names. -Currently it is called @file{cygXpm-noX4.dll}. +or "ispell" or other commands that seem related to whatever you just +tried to do (M-x ediff or M-$, for example). +There are a large number of common (in the sense that "everyone has +these, they really do") Unix utilities that are not provided with +XEmacs. The GNU Project's implementations are available for Windows in +the the Cygwin distribution (@uref{http://www.cygwin.com/}), which also +provides a complete Unix emulation environment (and thus makes ports of +Unix utilities nearly trivial). Another implementation is that from +MinGW (@uref{http://www.mingw.org/msys.shtml}). If you know of others, +please let us know! -@node Q6.1.4, Q6.1.5, Q6.1.3, MS Windows -@unnumberedsubsec Q6.1.4: How do I compile under Cygwin? +@node Q5.4.6, Q5.5.1, Q5.4.5, External Subsystems +@unnumberedsubsec Q5.4.6: Cygwin error "fork_copy: linked dll/bss pass 0 failed" -Similar as on Unix; use the usual `configure' and `make' process. -Some problems to watch out for: +If you are getting an error like -@itemize @bullet -@item -make sure HOME is set. This controls where you -@file{init.el}/@file{.emacs} file comes from; +@example +17797832 [main] bash 3468 fork_copy: linked dll/bss pass 0 failed, +0x675000..0x6756A0, done 0, windows pid 2708, Win 32 error 487 +bash: fork: resource temporarily unavailable +@end example -@item -CYGWIN needs to be set to tty for process support to work, e.g. CYGWIN=tty; +when trying to run bash using @kbd{M-x shell}, then you need to rebase +your Cygwin DLL's. This is a known problem with Cygwin. To fix: +@enumerate @item -picking up some other grep or other UNIX-like tools can kill configure; - +Download the @file{rebase} utility from Cygwin setup (it's under +@samp{System}). @item -static heap too small, adjust @file{src/sheap-adjust.h} to a more positive -number; - +Kill @strong{all} of your Cygwin processes, including all of your +shells and all background processes. Use @code{ps -a} to list all the +processes you need to kill. @item -(Unconfirmed) The Cygwin version doesn't understand -@file{//machine/path} type paths so you will need to manually mount a -directory of this form under a unix style directory for a build to work -on the directory; - +From a DOS prompt, run @file{ash} (@strong{not} @file{bash}, +@file{tcsh} or @file{zsh}). Do not try to be clever and @code{exec +/bin/ash} from your last shell; it won't work. @item -If you're building @strong{WITHOUT} X11, don't forget to change symlinks -@file{/usr/lib/libXpm.a} and @file{/usr/lib/libXpm.dll.a} to point to -the non-X versions of these libraries. By default they point to the X -versions. So: +Type @code{/bin/rebaseall -v}. +@end enumerate + +The problem should now be fixed -- at least, until you install another +Cygwin package with DLL's, in which case you may have to repeat the +procedure. + +@unnumberedsec 5.5: Multiple Device Support + +@node Q5.5.1, Q5.5.2, Q5.4.6, External Subsystems +@unnumberedsubsec Q5.5.1: How do I open a frame on another screen of my multi-headed display? + +Use the command @kbd{M-x make-frame-on-display}. This command is also +on the File menu in the menubar. + +The command @code{make-frame-on-tty} also exists, which will establish a +connection to any tty-like device. Opening the TTY devices should be +left to @code{gnuclient}, though. + +@node Q5.5.2, Q5.5.3, Q5.5.1, External Subsystems +@unnumberedsubsec Q5.5.2: Can I really connect to a running XEmacs after calling up over a modem? How? + +Yes. Use @code{gnuclient -nw}. + +Also see @ref{Q5.5.3, How do I disable gnuserv from opening a new frame?}. + +@node Q5.5.3, Q5.5.4, Q5.5.2, External Subsystems +@unnumberedsubsec Q5.5.3: How do I disable gnuserv from opening a new frame? + +If you set the @code{gnuserv-frame} variable to the frame that should be +used to display buffers that are pulled up, a new frame will not be +created. For example, you could put + +@lisp +(setq gnuserv-frame (selected-frame)) +@end lisp + +early on in your @file{init.el}, to ensure that the first frame created +is the one used for your gnuserv buffers. + +There is an option to set the gnuserv target to the current frame. See +@code{Options->Display->"Other Window" Location->Make Current Frame Gnuserv Target} + +You can also change this with Customize. Select from the +@code{Options} menu @code{Advanced +(Customize)->Emacs->Environment->Gnuserv->Gnuserv Frame...} or type +@kbd{M-x customize @key{RET} gnuserv @key{RET}}. + + +@node Q5.5.4, Q5.5.5, Q5.5.3, External Subsystems +@unnumberedsubsec Q5.5.4: How do I start gnuserv so that each subsequent XEmacs is a client? + +Put the following in your @file{init.el} file to start the server: + +@lisp +(gnuserv-start) +@end lisp + +Start your first XEmacs as usual. After that, you can do: @example -/usr/lib/libXpm.a -> /usr/lib/libXpm-noX.a -/usr/lib/libXpm.dll.a -> /usr/lib/libXpm-noX.dll.a +gnuclient randomfilename @end example -(This advice may now be obsolete because of the availability of the -cygXpm-noX4.dll package from Cygwin. Send confirmation to -@email{faq@@xemacs.org}.) +from the command line to get your existing XEmacs process to open a new +frame and visit randomfilename in that window. When you're done editing +randomfilename, hit @kbd{C-x #} to kill the buffer and get rid of the +frame. -@item -Other problems are listed in the @file{PROBLEMS} file, in the top-level -directory of the XEmacs sources. +See also man page of gnuclient. + +@node Q5.5.5, , Q5.5.4, External Subsystems +@unnumberedsubsec Q5.5.5: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? + +@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: +@quotation +Here is one of the solutions, we have this in a script called +@file{etc/editclient.sh}. +@example + #!/bin/sh + if gnuclient -batch -eval t >/dev/null 2>&1 + then + exec gnuclient $@{1+"$@@"@} + else + xemacs -unmapped -f gnuserv-start & + until gnuclient -batch -eval t >/dev/null 2>&1 + do + sleep 1 + done + exec gnuclient $@{1+"$@@"@} + fi +@end example + +Note that there is a known problem when running XEmacs and 'gnuclient +-nw' on the same TTY. +@end quotation + +@node Internet, Advanced, External Subsystems, Top +@unnumbered 6 Connecting to the Internet + +This is part 6 of the XEmacs Frequently Asked Questions list. This +section is devoted connecting to the Internet. + +@menu +6.0: General Mail and News +* Q6.0.1:: What are the various packages for reading mail? +* Q6.0.2:: How can I send mail? +* Q6.0.3:: How do I get my outgoing mail archived? +* Q6.0.4:: How can I read and/or compose MIME messages? +* Q6.0.5:: How do I customize the From line? +* Q6.0.6:: How do I get my MUA to filter mail for me? +* Q6.0.7:: Remote mail reading with an MUA. +* Q6.0.8:: An MUA gets an error incorporating new mail. +* Q6.0.9:: Why isn't @file{movemail} working? +* Q6.0.10:: How do I make my MUA display graphical smilies? +* Q6.0.11:: How can I get those oh-so-neat X-Face lines? + +6.1: Reading Mail with VM +* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP? +* Q6.1.2:: How can I get VM to automatically check for new mail? +* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? +* Q6.1.4:: Is there a mailing list or FAQ for VM? +* Q6.1.5:: How do I make VM stay in a single frame? +* Q6.1.6:: Customization of VM not covered in the manual, or here. + +6.2: Reading Netnews and Mail with Gnus +* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! +* Q6.2.2:: How do I make Gnus stay within a single frame? + +6.3: FTP Access +* Q6.3.1:: Can I edit files on other hosts? +* Q6.3.2:: What is EFS? + +6.4: Web Browsing with W3 +* Q6.4.1:: What is W3? +* Q6.4.2:: How do I run W3 from behind a firewall? +* Q6.4.3:: Is it true that W3 supports style sheets and tables? +@end menu + +@unnumberedsec 6.0: General Mail and News + +@node Q6.0.1, Q6.0.2, Internet, Internet +@unnumberedsubsec Q6.0.1: What are the various packages for reading mail? + +#### Write me. + +@node Q6.0.2, Q6.0.3, Q6.0.1, Internet +@unnumberedsubsec Q6.0.2: How can I send mail? + +Under Unix and Mac OS X, the @samp{sendmail} package is normally used +for this. +#### Write me. + +Under Windows, you need to use @samp{smtpmail}, which communicates +directly with the mail server, as there is no @file{sendmail} program +running. To get it working, use code like the following in your +@file{init.el} file: + +@lisp + ;; Get mail working under Windows. + (setq message-send-mail-function 'smtpmail-send-it) ; for message/Gnus + (setq send-mail-function 'smtpmail-send-it) ; for C-x m, etc. + ;; the following ensures that mail problems can be debugged: it logs a trace + ;; of the SMTP conversation to *trace of SMTP session to <somewhere>*. + (setq smtpmail-debug-info t) + ;; Substitute your info here. + ;(setq user-mail-address "ben@@xemacs.org") + ;(setq user-full-name "Ben Wing") + ;(setq smtpmail-default-smtp-server "smtp.myserver.myisp.com") + ;; The following two aren't completely necessary but may help. + ;(setq smtpmail-local-domain "666.com") + ;(setq smtpmail-sendto-domain "666.com") + ;; If your SMTP server requires a username/password to authenticate, as + ;; many do nowadays, set them like this: + ;(setq smtpmail-auth-credentials ; or use ~/.authinfo + ; '(("smtp.myserver.myisp.com" 25 "USER@@SOMEWHERE" "PASSWORD"))) + + ;; Other possibilities for getting smtpmail to work: + ;; + ;; If for some reason you need to authenticate using the STARTTLS protocol + ;; (don't look into this unless you know what it is), use + ;; (setq smtpmail-starttls-credentials + ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) + ;; Requires external program + ;; ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz. + ;; See http://www.ietf.org/rfc/rfc2246.txt, + ;; http://www.ietf.org/rfc/rfc2487.txt +@end lisp + +The lines you need to care about are those that set +@code{user-mail-address}, @code{user-full-name}, +@code{smtpmail-default-smtp-server}, and +@code{smtpmail-auth-credentials}. You need to set these with, +respectively, your email address, your full name, the SMTP server you +use for outgoing mail, and the username and password you need to log +in to your SMTP server. (If for some reason your SMTP server doesn't +require logging in to send mail, don't uncomment this last line.) + +The other settings may be useful in specific cases, but you should know what +you're doing before enabling them. + +@node Q6.0.3, Q6.0.4, Q6.0.2, Internet +@unnumberedsubsec Q6.0.3: How do I get my outgoing mail archived? + +@lisp +(setq mail-archive-file-name "~/outbox") +@end lisp + +@node Q6.0.4, Q6.0.5, Q6.0.3, Internet +@unnumberedsubsec Q6.0.4: How can I read and/or compose MIME messages? + +VM, MH-E and GNUS support MIME natively. Other MUAs may or may not +have MIME support; refer to their documentation and other resources, +such as web pages and mailing lists. Packages like SEMI/WEMI may be +useful in connection with MUAs like mew and Wanderlust. + +@node Q6.0.5, Q6.0.6, Q6.0.4, Internet +@unnumberedsubsec Q6.0.5: How do I customize the From line? + +How do I change the @samp{From:} line? I have set gnus-user-from-line +to +@example +Gail Gurman <gail.gurman@@sybase.com> +@end example +@noindent , but XEmacs Gnus doesn't use +it. [This should apply to all MUA's. --ed] Instead it uses +@example +Gail Mara Gurman @email{gailg@@deall} +@end example +@noindent and then complains +that it's incorrect. Also, as you perhaps can see, my Message-ID is +screwy. How can I change that? + +@email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes: + +@quotation +Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or +@code{mail-host-address} to @samp{sybase.com}. +@end quotation + +@node Q6.0.6, Q6.0.7, Q6.0.5, Internet +@unnumberedsubsec Q6.0.6: How do I get my MUA to filter mail for me? + +One possibility is to use procmail to split your mail before it gets to +the MUA. I prefer this personally, since there are many strange and +wonderful things one can do with procmail. Procmail may be found at +@uref{http://www.procmail.org/}. + +Also see the Mail Filtering FAQ at: +@iftex +@* +@end iftex +@uref{http://www.faqs.org/faqs/mail/filtering-faq/}. + +@node Q6.0.7, Q6.0.8, Q6.0.6, Internet +@unnumberedsubsec Q6.0.7: Remote mail reading with an MUA. + +My mailbox lives at the office on a big honkin server. My regular INBOX +lives on my honkin desktop machine. I now can PPP to the office from +home which is far from honking... I'd like to be able to read mail at +home without storing it here and I'd like to use xemacs and the MUA at +home... Is there a recommended setup? + +@email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes: + +@quotation +There are several ways to do this. + +@enumerate +@item +Set your display to your home machine and run dxpc or one of the other X +compressors. + +@item +NFS mount your desktop machine on your home machine and modify your pop +command on your home machine to rsh to your desktop machine and actually +do the pop get's. + +@item +Run a POP server on your desktop machine as well and do a sort of two +tiered POP get. +@end enumerate +@end quotation + +@email{wmperry@@monolith.spry.com, William Perry} adds: + +@quotation +Or you could run a pop script periodically on your desktop machine, and +just use ange-ftp or NFS to get to your mailbox. I used to do this all +the time back at IU. +@end quotation + +@node Q6.0.8, Q6.0.9, Q6.0.7, Internet +@unnumberedsubsec Q6.0.8: An MUA gets an error incorporating new mail. + +rmail and VM, and probably other MUA's as well, get new mail from +your mailbox (called @file{/var/mail/$USER} or @file{/var/spool/mail/$USER} +or something similar) using a program called @code{movemail}. +This program interlocks with @code{/bin/mail} using the protocol +defined by @code{/bin/mail}. + +There are various different protocols in general use, which you need to +specify using the @samp{--mail-locking} option +(@samp{--with-mail-locking} in 21.5 or later) to @file{configure}: + +@table @samp +@item lockf +POSIX file locking with @code{lockf()} +@item flock +BSD file locking with @code{flock()} +@item dot +To manipulate mail file @file{foo}, first create file @file{foo.lock} +@item locking +Use @code{locking()}, Microsoft's renamed @code{flock()} +@item mmdf +Use @code{lk_open()} and @code{lk_close()} as defined by the Multi-channel +Memo Distribution Facility +@item pop +Retrieve mail using POP (the Post Office Protocol). This is the +default for Cygwin/MinGW. +@end table + +@strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR +SYSTEM, YOU CAN LOSE MAIL!} + +Usually the value is correctly determined automatically: +@file{configure} tries to detect the method in use, and defaults exist +on systems for which this doesn't work. + +However, if you run into problems incorporating new mail, it may be +because an incorrect method is being used. + +If your system uses the lock file protocol, and permissions are set +so that ordinary users cannot write lock files in the mail spool +directory, you may need to make @file{movemail} setgid to a +suitable group such as @samp{mail}. You can use these commands (as +root): + +@example +chgrp mail movemail +chmod 2755 movemail +@end example + +If you are using the @samp{pop} locking method, @file{movemail} must +be setuid root. + +Installation normally copies movemail from the build directory to an +installation directory which is usually under @file{/usr/local/lib}. +The installed copy of @file{movemail} is usually in the directory +@file{/usr/local/lib/xemacs-VERSION/TARGET} (for example, +@file{/usr/local/lib/xemacs-21.4.15/i686-pc-cygwin}). You must change +the group and mode of the installed copy; changing the group and mode +of the build directory copy is ineffective. + +@node Q6.0.9, Q6.0.10, Q6.0.8, Internet +@unnumberedsubsec Q6.0.9: Why isn't @file{movemail} working? + +@xref{Q6.0.8}. + +Note also that older versions of Mozilla came with a @file{movemail} +program that is @strong{not} compatible with XEmacs. Do not use it. +Always use the @file{movemail} installed with your XEmacs. Failure to +do so can result in lost mail. + +@node Q6.0.10, Q6.0.11, Q6.0.9, Internet +@unnumberedsubsec Q6.0.10: How do I make my MUA display graphical smilies? +For mh-e use the following: + +@lisp +(add-hook 'mh-show-mode-hook '(lambda () + (smiley-region (point-min) + (point-max)))) +@end lisp + +@email{bill@@carpenter.ORG, WJCarpenter} writes: +For VM use the following: +@lisp + (autoload 'smiley-region "smiley" nil t) + (add-hook 'vm-select-message-hook + '(lambda () + (smiley-region (point-min) + (point-max)))) +@end lisp + +For tm use the following: +@lisp +(autoload 'smiley-buffer "smiley" nil t) +(add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer) +@end lisp + +@node Q6.0.11, Q6.1.1, Q6.0.10, Internet +@unnumberedsubsec Q6.0.11: How can I get those oh-so-neat X-Face lines? + +Firstly there is an ftp site which describes X-faces and has the +associated tools mentioned below, at +@uref{http://ftp.cs.indiana.edu/pub/faces/}. + +Then the steps are + +@enumerate +@item +Create 48x48x1 bitmap with your favorite tool + +@item +Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc., +and then compile the face. + +@item +@example +cat file.xbm | xbm2ikon |compface > file.face +@end example + +@item +Then be sure to quote things that are necessary for emacs strings: + +@example +cat ./file.face | sed 's/\\/\\\\/g' +@iftex +\ @* +@end iftex +| sed 's/\"/\\\"/g' > ./file.face.quoted +@end example + +@item +Then set up emacs to include the file as a mail header - there were a +couple of suggestions here---either something like: + +@lisp +(setq mail-default-headers + "X-Face: @email{Ugly looking text string here}") +@end lisp + +Or, alternatively, as: + +@lisp +(defun mail-insert-x-face () + (save-excursion + (goto-char (point-min)) + (search-forward mail-header-separator) + (beginning-of-line) + (insert "X-Face:") + (insert-file-contents "~/.face"))) + +(add-hook 'mail-setup-hook 'mail-insert-x-face) +@end lisp +@end enumerate + +However, 2 things might be wrong: + +Some versions of pbmtoicon produces some header lines that is not +expected by the version of compface that I grabbed. So I found I had to +include a @code{tail +3} in the pipeline like this: + +@example +cat file.xbm | xbm2ikon | tail +3 |compface > file.face +@end example + +Some people have also found that if one uses the @code{(insert-file)} +method, one should NOT quote the face string using the sed script . + +It might also be helpful to use @email{stig@@hackvan.com, Stig's} script +xbm2face (included in the compface distribution at XEmacs.org) to do the +conversion. + +Contributors for this item: + +Paul Emsley, +Ricardo Marek, +Amir J. Katz, +Glen McCort, +Heinz Uphoff, +Peter Arius, +Paul Harrison, and +Vegard Vesterheim + +@unnumberedsec 6.1: Reading Mail with VM + +@node Q6.1.1, Q6.1.2, Q6.0.11, Internet +@unnumberedsubsec Q6.1.1: How do I set up VM to retrieve mail from a remote site using POP? + +Use @code{vm-spool-files}, like this for example: + +@lisp +(setq vm-spool-files '("/var/spool/mail/wing" + "netcom23.netcom.com:110:pass:wing:MYPASS")) +@end lisp + +Of course substitute your actual password for MYPASS. + +@node Q6.1.2, Q6.1.3, Q6.1.1, Internet +@unnumberedsubsec Q6.1.2: How can I get VM to automatically check for new mail? + +@email{turner@@lanl.gov, John Turner} writes: + +@quotation +Use the following: + +@lisp +(setq vm-auto-get-new-mail 60) +@end lisp +@end quotation + +@node Q6.1.3, Q6.1.4, Q6.1.2, Internet +@unnumberedsubsec Q6.1.3: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? + +Set @code{vm-reply-ignored-addresses} to a list, like + +@lisp +(setq vm-reply-ignored-addresses + '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com" + "wing@@netcom.com" "wing@@xemacs.org")) +@end lisp + +Note that each string is a regular expression. + +@node Q6.1.4, Q6.1.5, Q6.1.3, Internet +@unnumberedsubsec Q6.1.4: Is there a mailing list or FAQ for VM? + +A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}. + +VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug. + +@node Q6.1.5, Q6.1.6, Q6.1.4, Internet +@unnumberedsubsec Q6.1.5: How do I make VM stay in a single frame? + +John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes: + +@quotation +@lisp + ; Don't use multiple frames +(setq vm-frame-per-composition nil) +(setq vm-frame-per-folder nil) +(setq vm-frame-per-edit nil) +(setq vm-frame-per-summary nil) +@end lisp +@end quotation + +@node Q6.1.6, Q6.2.1, Q6.1.5, Internet +@unnumberedsubsec Q6.1.6: Customization of VM not covered in the manual, or here. + +@email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes: + +@quotation +The meta-answer is to look into the file @file{vm-vars.el}, in the vm +directory of the lisp library. + +@file{vm-vars.el} contains, initializes and carefully describes, with +examples of usage, the plethora of user options that @emph{fully} +control VM's behavior. + +Enter vm-vars, @code{forward-search} for toolbar, find the variables +that control the toolbar placement, appearance, existence, copy to your +@file{init.el} or @file{.vm} and modify according to the +detailed instructions. + +The above also applies to all the various features of VM: search for +some keywords, maybe the first you conjure isn't appropriate, find the +appropriate variables, copy and experiment. +@end quotation + +@unnumberedsec 6.2: Reading Netnews and Mail with Gnus + +@node Q6.2.1, Q6.2.2, Q6.1.6, Internet +@unnumberedsubsec Q6.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! + +The Gnus numbering issues are not meant for mere mortals to know them. +If you feel you @emph{must} enter the muddy waters of Gnus, visit the +excellent FAQ, maintained by Justin Sheehy, at: + +@example +@uref{http://my.gnus.org/FAQ/} +@end example + +See also Gnus home page +@example +@uref{http://www.gnus.org/} +@end example + +@node Q6.2.2, Q6.3.1, Q6.2.1, Internet +@unnumberedsubsec Q6.2.2: How do I make Gnus stay within a single frame? + +The toolbar code to start Gnus opens the new frame---and it's a feature +rather than a bug. If you don't like it, but would still like to click +on the seemly icon, use the following code: + +@lisp +(defun toolbar-news () + (gnus)) +@end lisp + +It will redefine the callback function of the icon to just call +@code{gnus}, without all the fancy frame stuff. + +@unnumberedsec 6.3: FTP Access + +@node Q6.3.1, Q6.3.2, Q6.2.2, Internet +@unnumberedsubsec Q6.3.1: Can I edit files on other hosts? + +Yes. Of course XEmacs can use any network file system (such as NFS or +Windows file sharing) you have available, and includes some +optimizations and safety features appropriate to those environments. + +It is also possible to transparently edit files via FTP, ssh, or rsh. That +is, XEmacs makes a local copy using the transport in the background, and +automatically refreshes the remote original from that copy when you save +it. XEmacs also is capable of doing file system manipulations like +creating and removing directories and files. The FTP interface is +provided by the standard @samp{efs} package @ref{Top, EFS, , efs}. The +ssh/rsh interface is provided by the optional @samp{tramp} package +@ref{Top, TRAMP, , tramp}. + +@node Q6.3.2, Q6.4.1, Q6.3.1, Internet +@unnumberedsubsec Q6.3.2: What is EFS? + +#### Write me. + +@unnumberedsec 6.4: Web Browsing with W3 + +@node Q6.4.1, Q6.4.2, Q6.3.2, Internet +@unnumberedsubsec Q6.4.1: What is W3? + +W3 is an advanced graphical browser written in Emacs lisp that runs on +XEmacs. It has full support for cascaded style sheets, and more... + +It has a home web page at +@uref{http://www.cs.indiana.edu/elisp/w3/docs.html}. + +@node Q6.4.2, Q6.4.3, Q6.4.1, Internet +@unnumberedsubsec Q6.4.2: How do I run W3 from behind a firewall? + +There is a long, well-written, detailed section in the W3 manual that +describes how to do this. Look in the section entitled "Firewalls". + +@node Q6.4.3, , Q6.4.2, Internet +@unnumberedsubsec Q6.4.3: Is it true that W3 supports style sheets and tables? + +Yes, and much more. W3, as distributed with the latest XEmacs is a +full-featured web browser. + +@node Advanced, Other Packages, Internet, Top +@unnumbered 7 Advanced Customization Using XEmacs Lisp + +This is part 7 of the XEmacs Frequently Asked Questions list. This +section is devoted to advanced customization using XEmacs Lisp. + +@menu +7.0: Emacs Lisp and @file{init.el} +* Q7.0.1:: What version of Emacs am I running? +* Q7.0.2:: How can I evaluate Emacs-Lisp expressions? +* Q7.0.3:: @code{(setq tab-width 6)} behaves oddly. +* Q7.0.4:: How can I add directories to the @code{load-path}? +* Q7.0.5:: How to check if a lisp function is defined? +* Q7.0.6:: Can I force the output of @code{(face-list)} to a buffer? + +7.1: Emacs Lisp Programming Techniques +* Q7.1.1:: What is the difference in key sequences between XEmacs and GNU Emacs? +* Q7.1.2:: Can I generate "fake" keyboard events? +* Q7.1.3:: Could you explain @code{read-kbd-macro} in more detail? +* Q7.1.4:: What is the performance hit of @code{let}? +* Q7.1.5:: What is the recommended use of @code{setq}? +* Q7.1.6:: What is the typical misuse of @code{setq}? +* Q7.1.7:: I like the @code{do} form of cl, does it slow things down? +* Q7.1.8:: I like recursion, does it slow things down? +* Q7.1.9:: How do I put a glyph as annotation in a buffer? +* Q7.1.10:: @code{map-extents} won't traverse all of my extents! +* Q7.1.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time? + +7.2: Mathematics +* Q7.2.1:: What are bignums, ratios, and bigfloats in Lisp? +* Q7.2.2:: XEmacs segfaults when I use very big numbers! +* Q7.2.3:: Bignums are really slow! +* Q7.2.4:: Equal bignums don't compare as equal! What gives? +@end menu + +@unnumberedsec 7.0: Emacs Lisp and @file{init.el} + +@node Q7.0.1, Q7.0.2, Advanced, Advanced +@unnumberedsubsec Q7.0.1: What version of Emacs am I running? + +How can @file{init.el} determine which of the family of +Emacsen I am using? + +To determine if you are currently running GNU Emacs 18, GNU Emacs 19, +XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the +example given in @file{etc/sample.init.el} (@file{etc/sample.emacs} in +XEmacs versions prior to 21.4). There are other nifty things in there +as well! + +For all new code, all you really need to do is: + +@lisp +(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) +@end lisp + +@node Q7.0.2, Q7.0.3, Q7.0.1, Advanced +@unnumberedsubsec Q7.0.2: How can I evaluate Emacs-Lisp expressions? + +I know I can evaluate Elisp expressions from @code{*scratch*} buffer +with @kbd{C-j} after the expression. How do I do it from another +buffer? + +Press @kbd{M-:} (the default binding of @code{eval-expression}), and +enter the expression to the minibuffer. + +@node Q7.0.3, Q7.0.4, Q7.0.2, Advanced +@unnumberedsubsec Q7.0.3: @code{(setq tab-width 6)} behaves oddly. + +If you put @code{(setq tab-width 6)} in your +@file{init.el} file it does not work! Is there a reason +for this? If you do it at the EVAL prompt it works fine!! How strange. + +Use @code{setq-default} instead, since @code{tab-width} is +all-buffer-local. + +@node Q7.0.4, Q7.0.5, Q7.0.3, Advanced +@unnumberedsubsec Q7.0.4: How can I add directories to the @code{load-path}? + +Here are two ways to do that, one that puts your directories at the +front of the load-path, the other at the end: + +@lisp +;;; Add things at the beginning of the load-path, do not add +;;; duplicate directories: +(pushnew "bar" load-path :test 'equal) + +(pushnew "foo" load-path :test 'equal) + +;;; Add things at the end, unconditionally +(setq load-path (nconc load-path '("foo" "bar"))) +@end lisp + +@email{keithh@@nortel.ca, keith (k.p.) hanlan} writes: + +@quotation +To add directories using Unix shell metacharacters use +@file{expand-file-name} like this: + +@lisp +(push (expand-file-name "~keithh/.emacsdir") load-path) +@end lisp +@end quotation + +@node Q7.0.5, Q7.0.6, Q7.0.4, Advanced +@unnumberedsubsec Q7.0.5: How to check if a lisp function is defined? + +Use the following elisp: + +@lisp +(fboundp 'foo) +@end lisp + +It's almost always a mistake to test @code{emacs-version} or any similar +variables. + +Instead, use feature-tests, such as @code{featurep}, @code{boundp}, +@code{fboundp}, or even simple behavioral tests, eg.: + +@lisp +(defvar foo-old-losing-code-p + (condition-case nil (progn (losing-code t) nil) + (wrong-number-of-arguments t))) +@end lisp + +There is an incredible amount of broken code out there which could work +much better more often in more places if it did the above instead of +trying to divine its environment from the value of one variable. + +@node Q7.0.6, Q7.1.1, Q7.0.5, Advanced +@unnumberedsubsec Q7.0.6: Can I force the output of @code{(face-list)} to a buffer? + +It would be good having it in a buffer, as the output of +@code{(face-list)} is too wide to fit to a minibuffer. + +Evaluate the expression in the @samp{*scratch*} buffer with point after +the rightmost paren and typing @kbd{C-j}. + +If the minibuffer smallness is the only problem you encounter, you can +simply press @kbd{C-h l} to get the former minibuffer contents in a +buffer. + +@unnumberedsec 7.1: Emacs Lisp Programming Techniques + +@node Q7.1.1, Q7.1.2, Q7.0.6, Advanced +@unnumberedsubsec Q7.1.1: What is the difference in key sequences between XEmacs and GNU Emacs? + +@email{clerik@@naggum.no, Erik Naggum} writes; + +@quotation +Emacs has a legacy of keyboards that produced characters with modifier +bits, and therefore map a variety of input systems into this scheme even +today. XEmacs is instead optimized for X events. This causes an +incompatibility in the way key sequences are specified, but both Emacs +and XEmacs will accept a key sequence as a vector of lists of modifiers +that ends with a key, e.g., to bind @kbd{M-C-a}, you would say +@code{[(meta control a)]} in both Emacsen. XEmacs has an abbreviated +form for a single key, just (meta control a). Emacs has an abbreviated +form for the Control and the Meta modifiers to string-characters (the +ASCII characters), as in @samp{\M-\C-a}. XEmacs users need to be aware +that the abbreviated form works only for one-character key sequences, +while Emacs users need to be aware that the string-character is rather +limited. Specifically, the string-character can accommodate only 256 +different values, 128 of which have the Meta modifier and 128 of which +have not. In each of these blocks, only 32 characters have the Control +modifier. Whereas @code{[(meta control A)]} differs from @code{[(meta +control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A} +do not. Programmers are advised to use the full common form, both +because it is more readable and less error-prone, and because it is +supported by both Emacsen. +@end quotation + +Another (even safer) way to be sure of the key-sequences is to use the +@code{read-kbd-macro} function, which takes a string like @samp{C-c +<up>}, and converts it to the internal key representation of the Emacs +you use. The function is available both on XEmacs and GNU Emacs. + +@node Q7.1.2, Q7.1.3, Q7.1.1, Advanced +@unnumberedsubsec Q7.1.2: Can I generate "fake" keyboard events? + +I wonder if there is an interactive function that can generate +@dfn{fake} keyboard events. This way, I could simply map them inside +XEmacs. + +This seems to work: + +@lisp +(defun cg--generate-char-event (ch) + "Generate an event, as if ch has been typed" + (dispatch-event (character-to-event ch))) + +;; Backspace and Delete stuff +(global-set-key [backspace] + (lambda () (interactive) (cg--generate-char-event 127))) +(global-set-key [unknown_keysym_0x4] + (lambda () (interactive) (cg--generate-char-event 4))) +@end lisp + +@node Q7.1.3, Q7.1.4, Q7.1.2, Advanced +@unnumberedsubsec Q7.1.3: Could you explain @code{read-kbd-macro} in more detail? + +The @code{read-kbd-macro} function returns the internal Emacs +representation of a human-readable string (which is its argument). +Thus: + +@lisp +(read-kbd-macro "C-c C-a") +@result{} [(control ?c) (control ?a)] + +(read-kbd-macro "C-c C-. <up>") +@result{} [(control ?c) (control ?.) up] +@end lisp + +In GNU Emacs the same forms will be evaluated to what GNU Emacs +understands internally---the sequences @code{"\C-x\C-c"} and @code{[3 +67108910 up]}, respectively. + +The exact @dfn{human-readable} syntax is defined in the docstring of +@code{edmacro-mode}. I'll repeat it here, for completeness. + +@quotation +Format of keyboard macros during editing: + +Text is divided into @dfn{words} separated by whitespace. Except for +the words described below, the characters of each word go directly as +characters of the macro. The whitespace that separates words is +ignored. Whitespace in the macro must be written explicitly, as in +@kbd{foo @key{SPC} bar @key{RET}}. + +@itemize @bullet +@item +The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD}, +@kbd{ESC}, and @kbd{NUL} represent special control characters. The +words must be written in uppercase. + +@item +A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or +@code{<f1>}, represents a function key. (Note that in the standard +configuration, the function key @code{<return>} and the control key +@key{RET} are synonymous.) You can use angle brackets on the words +@key{RET}, @key{SPC}, etc., but they are not required there. + +@item +Keys can be written by their @sc{ascii} code, using a backslash followed +by up to six octal digits. This is the only way to represent keys with +codes above \377. + +@item +One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-} +(shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may +precede a character or key notation. For function keys, the prefixes +may go inside or outside of the brackets: @code{C-<down>} @equiv{} +@code{<C-down>}. The prefixes may be written in any order: @kbd{M-C-x} +@equiv{} @kbd{C-M-x}. + +Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except +that the Meta prefix is allowed on a sequence of digits and optional +minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}. + +@item +The @code{^} notation for control characters also works: @kbd{^M} +@equiv{} @kbd{C-m}. + +@item +Double angle brackets enclose command names: @code{<<next-line>>} is +shorthand for @kbd{M-x next-line @key{RET}}. + +@item +Finally, @code{REM} or @code{;;} causes the rest of the line to be +ignored as a comment. +@end itemize + +Any word may be prefixed by a multiplier in the form of a decimal number +and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>}, +and @code{10*foo} @equiv{} +@iftex +@* +@end iftex +@code{foofoofoofoofoofoofoofoofoofoo}. + +Multiple text keys can normally be strung together to form a word, but +you may need to add whitespace if the word would look like one of the +above notations: @code{; ; ;} is a keyboard macro with three semicolons, +but @code{;;;} is a comment. Likewise, @code{\ 1 2 3} is four keys but +@code{\123} is a single key written in octal, and @code{< right >} is +seven keys but @code{<right>} is a single function key. When in doubt, +use whitespace. +@end quotation + +@node Q7.1.4, Q7.1.5, Q7.1.3, Advanced +@unnumberedsubsec Q7.1.4: What is the performance hit of @code{let}? + +In most cases, not noticeable. Besides, there's no avoiding +@code{let}---you have to bind your local variables, after all. Some +pose a question whether to nest @code{let}s, or use one @code{let} per +function. I think because of clarity and maintenance (and possible +future implementation), @code{let}-s should be used (nested) in a way to +provide the clearest code. + +@node Q7.1.5, Q7.1.6, Q7.1.4, Advanced +@unnumberedsubsec Q7.1.5: What is the recommended use of @code{setq}? + +@itemize @bullet +@item Global variables + +You will typically @code{defvar} your global variable to a default +value, and use @code{setq} to set it later. + +It is never a good practice to @code{setq} user variables (like +@code{case-fold-search}, etc.), as it ignores the user's choice +unconditionally. Note that @code{defvar} doesn't change the value of a +variable if it was bound previously. If you wish to change a +user-variable temporarily, use @code{let}: + +@lisp +(let ((case-fold-search nil)) + ... ; code with searches that must be case-sensitive + ...) +@end lisp + +You will notice the user-variables by their docstrings beginning with an +asterisk (a convention). + +@item Local variables + +Bind them with @code{let}, which will unbind them (or restore their +previous value, if they were bound) after exiting from the @code{let} +form. Change the value of local variables with @code{setq} or whatever +you like (e.g. @code{incf}, @code{setf} and such). The @code{let} form +can even return one of its local variables. + +Typical usage: + +@lisp +;; iterate through the elements of the list returned by +;; `hairy-function-that-returns-list' +(let ((l (hairy-function-that-returns-list))) + (while l + ... do something with (car l) ... + (setq l (cdr l)))) +@end lisp + +Another typical usage includes building a value simply to work with it. + +@lisp +;; Build the mode keymap out of the key-translation-alist +(let ((inbox (file-truename (expand-file-name box))) + (i 0)) + ... code dealing with inbox ... + inbox) +@end lisp + +This piece of code uses the local variable @code{inbox}, which becomes +unbound (or regains old value) after exiting the form. The form also +returns the value of @code{inbox}, which can be reused, for instance: + +@lisp +(setq foo-processed-inbox + (let .....)) +@end lisp +@end itemize + +@node Q7.1.6, Q7.1.7, Q7.1.5, Advanced +@unnumberedsubsec Q7.1.6: What is the typical misuse of @code{setq}? + +A typical misuse is probably @code{setq}ing a variable that was meant to +be local. Such a variable will remain bound forever, never to be +garbage-collected. For example, the code doing: + +@lisp +(defun my-function (whatever) + (setq a nil) + ... build a large list ... + ... and exit ...) +@end lisp + +does a bad thing, as @code{a} will keep consuming memory, never to be +unbound. The correct thing is to do it like this: + +@lisp +(defun my-function (whatever) + (let (a) ; default initialization is to nil + ... build a large list ... + ... and exit, unbinding `a' in the process ...) +@end lisp + +Not only is this prettier syntactically, but it makes it possible for +Emacs to garbage-collect the objects which @code{a} used to reference. + +Note that even global variables should not be @code{setq}ed without +@code{defvar}ing them first, because the byte-compiler issues warnings. +The reason for the warning is the following: + +@lisp +(defun flurgoze nil) ; ok, global internal variable +... + +(setq flurghoze t) ; ops! a typo, but semantically correct. + ; however, the byte-compiler warns. + +While compiling toplevel forms: +** assignment to free variable flurghoze +@end lisp + +@node Q7.1.7, Q7.1.8, Q7.1.6, Advanced +@unnumberedsubsec Q7.1.7: I like the @code{do} form of cl, does it slow things down? + +It shouldn't. Here is what Dave Gillespie has to say about cl.el +performance: + +@quotation +Many of the advanced features of this package, such as @code{defun*}, +@code{loop}, and @code{setf}, are implemented as Lisp macros. In +byte-compiled code, these complex notations will be expanded into +equivalent Lisp code which is simple and efficient. For example, the +forms + +@lisp +(incf i n) +(push x (car p)) +@end lisp + +are expanded at compile-time to the Lisp forms + +@lisp +(setq i (+ i n)) +(setcar p (cons x (car p))) +@end lisp + +which are the most efficient ways of doing these respective operations +in Lisp. Thus, there is no performance penalty for using the more +readable @code{incf} and @code{push} forms in your compiled code. -@end itemize +@emph{Interpreted} code, on the other hand, must expand these macros +every time they are executed. For this reason it is strongly +recommended that code making heavy use of macros be compiled. (The +features labelled @dfn{Special Form} instead of @dfn{Function} in this +manual are macros.) A loop using @code{incf} a hundred times will +execute considerably faster if compiled, and will also garbage-collect +less because the macro expansion will not have to be generated, used, +and thrown away a hundred times. +You can find out how a macro expands by using the @code{cl-prettyexpand} +function. +@end quotation -@node Q6.1.5, Q6.1.6, Q6.1.4, MS Windows -@unnumberedsubsec Q6.1.5: How do I compile using MinGW (aka @samp{the -mno-cygwin flag to gcc})? +@node Q7.1.8, Q7.1.9, Q7.1.7, Advanced +@unnumberedsubsec Q7.1.8: I like recursion, does it slow things down? -Similar to the method for Unix. Things to remember: +Yes. The Emacs byte-compiler cannot do much to optimize recursion. But +think well whether this is a real concern in Emacs. Much of the Emacs +slowness comes from internal mechanisms such as redisplay, or from the +fact that it is an interpreter. -@itemize @bullet -@item -Specify the target host on the command line for @file{./configure}, e.g. -@samp{./configure i586-pc-mingw32}. +Please try not to make your code much uglier to gain a very small speed +gain. It's not usually worth it. -@item -Be sure that your build directory is mounted such that it has the -same path either as a cygwin path (@file{/build/xemacs}) or as a Windows -path (@file{c:\build\xemacs}). +@node Q7.1.9, Q7.1.10, Q7.1.8, Advanced +@unnumberedsubsec Q7.1.9: How do I put a glyph as annotation in a buffer? -@item -Build @samp{gcc -mno-cygwin} versions of the extra libs, i.e. @file{libpng}, -@file{compface}, etc. +Here is a solution that will insert the glyph annotation at the +beginning of buffer: -@item -Specify the target location of the extra libs on the command line -to @file{configure}, e.g. -@samp{./configure --site-prefixes=/build/libs i586-pc-mingw32}. -@end itemize +@lisp +(make-annotation (make-glyph '([FORMAT :file FILE] + [string :data "fallback-text"])) + (point-min) + 'text + (current-buffer)) +@end lisp +Replace @samp{FORMAT} with an unquoted symbol representing the format of +the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.) +Instead of @samp{FILE}, use the image file name +(e.g. +@iftex +@* +@end iftex +@file{/usr/local/lib/xemacs-21.4/etc/recycle.xpm}). -@node Q6.1.6, Q6.1.7, Q6.1.5, MS Windows -@unnumberedsubsec Q6.1.6: I decided to run with X. Where do I get an X server? +You can turn this to a function (that optionally prompts you for a file +name), and inserts the glyph at @code{(point)} instead of +@code{(point-min)}. -As of May 2001, we are recommending that you use the port of XFree86 to -Cygwin. This has recently stabilized, and will undoubtedly soon make -most other MS Windows X servers obsolete. It is what the Windows -developers use to test the MS Windows X support. +@node Q7.1.10, Q7.1.11, Q7.1.9, Advanced +@unnumberedsubsec Q7.1.10: @code{map-extents} won't traverse all of my extents! -To install, go to @uref{http://xfree86.cygwin.com/}. There is a -detailed description on that site of exactly how to install it. This -installation also provides the libraries, include files, and other stuff -needed for development; a large collection of internationalized fonts; -the standard X utilities (xterm, twm, etc.) -- in a word, the works. +I tried to use @code{map-extents} to do an operation on all the extents +in a region. However, it seems to quit after processing a random number +of extents. Is it buggy? -NOTE: As of late May 2001, there is a bug in the file -@file{startxwin.bat}, used to start X Windows. It passes the option -@samp{-engine -4} to the X server, which is bogus -- you need to edit -the file and change it to @samp{-engine 4}. +No. The documentation of @code{map-extents} states that it will iterate +across the extents as long as @var{function} returns @code{nil}. +Unexperienced programmers often forget to return @code{nil} explicitly, +which results in buggy code. For instance, the following code is +supposed to delete all the extents in a buffer, and issue as many +@samp{fubar!} messages. +@lisp +(map-extents (lambda (ext ignore) + (delete-extent ext) + (message "fubar!"))) +@end lisp -@node Q6.1.7, Q6.2.1, Q6.1.6, MS Windows -@unnumberedsubsec Q6.1.7: How do I compile with X support? +Instead, it will delete only the first extent, and stop right there -- +because @code{message} will return a non-nil value. The correct code +is: -To compile under Cygwin, all you need to do is install XFree86 -(@pxref{Q6.1.6}). Once installed, @file{configure} should automatically -find the X libraries and compile with X support. +@lisp +(map-extents (lambda (ext ignore) + (delete-extent ext) + (message "fubar!") + nil)) +@end lisp -As noted above, the non-Cygwin X support is basically orphaned, and -probably won't work. But if it want to try, it's described in -@file{nt/README} in some detail. Basically, you need to get X11 -libraries from ftp.x.org, and compile them. If the precompiled versions -are available somewhere, we don't know of it. +@node Q7.1.11, Q7.2.1, Q7.1.10, Advanced +@unnumberedsubsec Q7.1.11: My elisp program is horribly slow. Is there an easy way to find out where it spends time? +@c New +@email{hniksic@@xemacs.org, Hrvoje Niksic} writes: +@quotation +Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence}, +press a key (say @key{RET} in the Gnus Group buffer), and get the +results using @kbd{M-x profile-results}. It should give you an idea of +where the time is being spent. +@end quotation -@node Q6.2.1, Q6.2.2, Q6.1.7, MS Windows -@unnumberedsec 6.2: Customization and User Interface -@unnumberedsubsec Q6.2.1: How does the port cope with differences in the Windows user interface? +@unnumberedsec 7.2: Mathematics -The XEmacs (and Emacs in general) user interface is pretty different -from what is expected of a typical MS Windows program. How does the MS -Windows port cope with it? +@node Q7.2.1, Q7.2.2, Q7.1.11, Advanced +@unnumberedsubsec Q7.2.1: What are bignums, ratios, and bigfloats in Lisp? -As a general rule, we follow native MS Windows conventions as much as -possible. 21.4 is a fairly complete Windows application, supporting -native printing, system file dialog boxes, tool tips, etc. In cases -where there's a clear UI conflict, we currently use normal Unix XEmacs -behavior by default, but make sure the MS Windows "look and feel" (mark -via shift-arrow, self-inserting deletes region, Alt selects menu items, -etc.) is easily configurable (respectively: using the variable -@code{shifted-motion-keys-select-region} in 21.4 and above [it's in fact -the default in these versions], or the @file{pc-select} package; using -the @file{pending-del} package; and setting the variable -@code{menu-accelerator-enabled} to @code{menu-force} in 21.4 and above). -In fact, if you use the sample @file{init.el} file as your init file, -you will get all these behaviors automatically turned on. +Thanks to @email{james@@xemacs.org, Jerry James}, XEmacs 21.5.18 and +later can use the capabilities of multiple-precision libraries that may +be available for your platform. The GNU Multiple Precision (GMP) and +BSD Multiple Precision (MP) libraries are partially supported. GMP +gives you @dfn{bignums} (arbitrary precision integers), @dfn{ratios} +(arbitrary precision fractions), and @dfn{bigfloats} (arbitrary +precision floating point numbers). GNU MP is better-supported by XEmacs +at the time of writing (2004-04-06). BSD MP support does not include +ratios or bigfloats, and it throws errors that aren't understood. -In future versions, some of these features might be turned on by -default in the MS Windows environment. +In most cases, bignum support should be transparent to users and Lisp +programmers. A bignum-enabled XEmacs will automatically convert from +fixnums to bignums and back in pure integer arithmetic, and for GNU MP, +from floats to bigfloats. (Bigfloats must be explicitly coerced to +other types, even if they are exactly representable by less precise +types.) The Lisp reader and printer have been enhanced to handle +bignums, as have the mathematical functions. Rationals (fixnums, +bignums, and ratios) are printed using the @samp{%d}, @samp{%o}, +@samp{%x}, and @samp{%u} format conversions. The read syntax for ratios +is @samp{3/5}. +User-visible changes in behavior include (in probable order of annoyance) -@node Q6.2.2, Q6.2.3, Q6.2.1, MS Windows -@unnumberedsubsec Q6.2.2: How do I change fonts in XEmacs on MS Windows? +@itemize +@item +Arithmetic can cause a segfault, depending on your MP library +@ref{Q7.2.2, XEmacs segfaults when I use very big numbers!}. -In 21.4 and above, you can use the "Options" menu to change the font. -You can also do it in your init file, e.g. like this: +@item +Terminology is not Common-Lisp-conforming. For example, ``integer'' for +Emacs Lisp means what Common Lisp calls ``fixnum''. This issue is being +investigated, but the use of ``integer'' for fixnum is pervasive and may +cause backward-compatibility and GNU-Emacs-compatibility problems. -@display - (set-face-font 'default "Lucida Console:Regular:10") - (set-face-font 'modeline "MS Sans Serif:Regular:10") -@end display +@item +Many operations that used to cause a range error now succeed, with +intermediate results and return values coerced to bignums as needed. +@item +An atom with ratio read syntax now returns a number, not a symbol. -@node Q6.2.3, Q6.2.4, Q6.2.2, MS Windows -@unnumberedsubsec Q6.2.3: Where do I put my @file{init.el}/@file{.emacs} file? +@item +The @samp{%u} format conversion will now give an error if its argument +is negative. (Without MP, it prints a number which Lisp can't read.) +@end itemize -@file{init.el} is the name of the init file starting with 21.4, and is -located in the subdirectory @file{.xemacs/} of your home directory. In -prior versions, the init file is called @file{.emacs} and is located in -your home directory. Your home directory under Windows is determined by -the @samp{HOME} environment variable. If this is not set, it defaults to -@samp{C:\}. +@emph{Surgeon General's Warning}: The automatic conversions cannot be +disabled at runtime. New functions have been added which produce +ratios, so there should be few surprises with type conflicts, but they +can't be ruled out. ``Arbitrary'' precision means precisely what it +says. If you work with extremely large numbers, your machine may +arbitrarily decide to hand you an unpleasant surprise rather than a +bignum @ref{Q7.2.2, XEmacs segfaults when I use very big numbers!}. -To set this variable, modify @file{AUTOEXEC.BAT} under Windows 95/98, or -select @samp{Control Panel->System->Advanced->Environment Variables...} -under Windows NT/2000. +To configure with GNU MP, add @samp{--use-number-lib=gmp} +(@samp{--enable-bignum=gmp} in 21.5 or later) to your invocation of +@file{configure}. For BSD MP, use @samp{--use-number-lib=mp} +(@samp{--enable-bignum=mp} for 21.5). +If you would like to help with bignum support, especially on BSD MP, +please subscribe to the @uref{http://www.xemacs.org/Lists/#xemacs-beta, +XEmacs Beta mailing list}, and book up on @file{number-gmp.h} and +@file{number-mp.h}. Jerry has promised to write internals documentation +eventually, but if your skills run more to analysis and documentation +than to writing new code, feel free to fill in the gap! -@node Q6.2.4, Q6.2.5, Q6.2.3, MS Windows -@unnumberedsubsec Q6.2.4: How do I get Windows Explorer to associate a file type with XEmacs? -@unnumberedsubsubsec Associating a new file type with XEmacs. +@node Q7.2.2, Q7.2.3, Q7.2.1, Advanced +@unnumberedsubsec Q7.2.2: XEmacs segfaults when I use very big numbers! -In Explorer select @samp{View/Options/File Types}, press @samp{[New -Type...]} and fill in the dialog box, e.g.: +GMP by default allocates temporaries on the stack. If you run out of +stack space, you're dead; there is no way that we know of to reliably +detect this condition, because @samp{alloca} is typically implemented to +be @emph{fast} rather than robust. If you just need a little more +oomph, use a bigger stack (@emph{e.g.}, the @file{ulimit -s} command in +bash(1)). If you want robustness at the cost of speed, configure GMP +with @samp{--disable-alloca} and rebuild the GMP library. -@example - Description of type: Emacs Lisp source - Associated extension: el - Content Type (MIME): text/plain -@end example +We do not know whether BSD MP uses @samp{alloca} or not. Please send +any information you have as a bug report (@kbd{M-x report-xemacs-bug +@key{RET}}), which will give us platform information. (We do know that +BSD MP implementations vary across vendors, but how much, we do not know +yet.) -then press @samp{[New...]} and fill in the @samp{Action} dialog box as -follows: -@example - Action: - Open +@node Q7.2.3, Q7.2.4, Q7.2.2, Advanced +@unnumberedsubsec Q7.2.3: Bignums are really slow! - Application used to perform action: - D:\Full\path\for\xemacs.exe "%1" +Many Linux distributions compile all their packages for the i386, and +this is costly. An optimized version can give you two or three orders +of magnitude better performance for a Pentium III or IV. (Yes, really. +See @uref{http://www.swox.com/gmp/gmp-speed.html}.) - [x] Use DDE - DDE Message: - open("%1") +@node Q7.2.4, , Q7.2.3, Advanced +@unnumberedsubsec Q7.2.4: Equal bignums don't compare as equal! What gives? - Application: - <leave blank> +Ah, Grasshopper, I see you are using @code{(eq x y)}. The Bodhisattva +CLTL2 warned of the illusion that equal numbers would be @samp{eq}! +Meditate on the deeper truths of @samp{eql}, in which numbers of the same +type which have equal values compare equal, and @samp{=}, which does any +necessary type coercions before comparing for equality. - DDE Application Not Running: - <leave blank> +Yeah, yeah, it has always worked for integer types, because fixnums and +characters have an immediate representation. Sorry about that; +arbitrary precision obviously requires consing new objects because the +objects are ``large'' and of variable size, and the definition of +@samp{eq} does not permit different objects to compare as equal. - Topic: - <leave blank> -@end example +@node Other Packages, Current Events, Advanced, Top +@unnumbered 8 Other External Packages -@unnumberedsubsubsec Associating an existing file type with XEmacs. +This is part 8 of the XEmacs Frequently Asked Questions list. This +section is devoted to miscellaneous external packages not covered +elsewhere in XEmacs. -In Explorer select @samp{View/Options/File Types}. Click on the file -type in the list and press @samp{[Edit...]}. If the file type already -has an @samp{Open} action, double click on it and fill in the -@samp{Action} dialog box as described above; otherwise create a new -action. +@menu +8.0: TeX +* Q8.0.1:: Is there something better than LaTeX mode? +* Q8.0.2:: What is AUCTeX? Where do you get it? +* Q8.0.3:: Problems installing AUCTeX. +* Q8.0.4:: How do I turn off current chapter from AUCTeX modeline? + +8.1: Other Unbundled Packages +* Q8.1.1:: Is there a reason for an Emacs package not to be included in XEmacs? +* Q8.1.2:: Are there any Emacs Lisp Spreadsheets? +* Q8.1.3:: Is there a MatLab mode? + +8.2: Environments Built Around XEmacs +* Q8.2.1:: What are SPARCworks, EOS, and WorkShop? +* Q8.2.2:: How do I start the Sun Workshop support in XEmacs 21? +* Q8.2.3:: What is/was Energize? +* Q8.2.4:: What is Infodock? +@end menu -If the file type has more than one action listed, you probably want to -make the @samp{Open} action that you just edited the default by clicking on -it and pressing @samp{Set Default}. +@unnumberedsec 8.0: TeX -Note for Windows 2000 users: Under Windows 2000, get to @samp{File Types} -using @samp{Control Panel->Folder Options->File Types}. +@node Q8.0.1, Q8.0.2, Other Packages, Other Packages +@unnumberedsubsec Q8.0.1: Is there something better than LaTeX mode? +@email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes: -@node Q6.2.5, Q6.3.1, Q6.2.4, MS Windows -@unnumberedsubsec Q6.2.5: Is it possible to print from XEmacs? +@quotation +The standard TeX modes leave much to be desired, and are somewhat +leniently maintained. Serious TeX users use AUCTeX (@pxref{Q8.0.2, +What is AUCTeX? Where do you get it?}). +@end quotation -As of 21.4, printing works on Windows, using simply @samp{File->Print}, -and can be configured with @samp{File->Page Setup}. +@node Q8.0.2, Q8.0.3, Q8.0.1, Other Packages +@unnumberedsubsec Q8.0.2: What is AUCTeX? Where do you get it? + +AUCTeX is a complex and sophisticated editing package dedicated to TeX +and related text formatting languages, including LaTeX and Texinfo. +It provides support for running TeX on a file or part of a file, +include files, and of course shortcuts for entering common TeX macros, +LaTeX environments, etc, and for fontlock. + +AUCTeX is a standard package provided by XEmacs. You can get it as +usual through the @kbd{M-x list-packages} interface. It is also +included in the (non-Mule) SUMO package. The AUCTeX XEmacs package is +maintained by Uwe Brauer <GET MAIL ADDRESS>. + +AUCTeX is extremely complicated, and its developers primarily +use GNU Emacs. Not all features of the bleeding edge version +of AUCTeX are immediately ported to XEmacs; if you need +these, you may be better off getting the most recent versions +from the GNU AUCTeX project on @uref{http://savannah.gnu.org}. + +@node Q8.0.3, Q8.0.4, Q8.0.2, Other Packages +@unnumberedsubsec Q8.0.3: Problems installing AUCTeX. -Prior to 21.4, there is no built-in support, but there are some clever -hacks out there. If you know how, please let us know and we'll put it -here. +@email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: +@quotation +AUCTeX works fine on both stock Emacs and XEmacs has been doing so for +a very very long time. This is mostly due to the work of +@email{abraham@@dina.kvl.dk, Per Abrahamsen} (clap clap) in particular his @file{easymenu} +package. Which leads to what is probably the problem... +@end quotation -@node Q6.3.1, Q6.3.2, Q6.2.5, MS Windows -@unnumberedsec 6.3: Miscellaneous -@unnumberedsubsec Q6.3.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? +Most problems with AUCTeX are one of two things: -In his flavor of Emacs 20, Richard Stallman has renamed all the @samp{win32-*} -symbols to @samp{w32-*}. Does XEmacs do the same? +@itemize @bullet +@item +The TeX-lisp-directory in @file{tex-site.el} and the makefile don't +match. -We consider such a move counter-productive, thus we do not use the -@samp{w32} prefix. (His rather questionable justification was that he -did not consider Windows to be a "winning" platform.) However, the name -@samp{Win32} is not particularly descriptive outside the Windows world, -and using just @samp{windows-} would be too generic. So we chose a -compromise, the prefix @samp{mswindows-} for Windows-related variables -and functions. +Fix: make sure you configure AUCTeX properly @strong{before} installing. -Thus all the XEmacs variables and functions directly related to either -the Windows GUI or OS are prefixed @samp{mswindows-} (except for a -couple of debugging variables, prefixed @samp{debug-mswindows-}). From -an architectural perspective, however, we believe that this is mostly a -non-issue because there should be a very small number of -window-systems-specific variables anyway. Whenever possible, we try to -provide generic interfaces that apply to all window systems. +@item +You have an old version of easymenu.el in your path. -@c not true: -@c The user variables -@c that share functionality with existing NT Emacs variables are be named -@c with our convention, but we provide the GNU Emacs names as -@c compatibility aliases. +Fix: use @code{locate-library} and remove old versions to make sure it +@strong{only} finds the one that came with XEmacs. +@end itemize +@node Q8.0.4, Q8.1.1, Q8.0.3, Other Packages +@unnumberedsubsec Q8.0.4: How do I turn off current chapter from AUCTeX modeline? -@node Q6.3.2, Q6.3.3, Q6.3.1, MS Windows -@unnumberedsubsec Q6.3.2: What are the differences between the various MS Windows emacsen? +With AUCTeX, fast typing is hard because the current chapter, section +etc. are given in the modeline. How can I turn this off? -XEmacs, Win-Emacs, DOS Emacs, NT Emacs, this is all very confusing. -Could you briefly explain the differences between them? +It's not AUCTeX, it comes from @code{func-menu} in @file{func-menu.el}. -Here is a recount of various Emacs versions running on MS Windows: +@c Add this code to your @file{init.el} to turn it off: +@c +@c @lisp +@c (setq fume-display-in-modeline-p nil) +@c @end lisp +@c +@c Or just add a hook to @code{TeX-mode-hook} to turn it off only for TeX +@c mode: +@c +@c @lisp +@c (add-hook 'TeX-mode-hook +@c '(lambda () (setq fume-display-in-modeline-p nil))) +@c @end lisp +@c +@email{dhughes@@origin-at.co.uk, David Hughes} writes: -@itemize @bullet +@quotation +Try this; you'll still get the function name displayed in the modeline, +but it won't attempt to keep track when you modify the file. To refresh +when it gets out of synch, you simply need click on the @samp{Rescan +Buffer} option in the function-menu. -@item -XEmacs +@lisp +(setq-default fume-auto-rescan-buffer-p nil) +@end lisp +@end quotation -@itemize @minus +@unnumberedsec 8.1: Other Unbundled Packages -@item -Beginning with XEmacs 19.12, XEmacs' architecture was redesigned -in such a way to allow clean support of multiple window systems. At -this time the TTY support was added, making X and TTY the first two -"window systems" supported by XEmacs. The 19.12 design is the basis for -the current native MS Windows code. +@node Q8.1.1, Q8.1.2, Q8.0.4, Other Packages +@unnumberedsubsec Q8.1.1: Is there a reason for an Emacs package not to be included in XEmacs? -@item -Some time during 1997, David Hobley (soon joined by Marc Paquette) -imported some of the NT-specific portions of GNU Emacs, making XEmacs -with X support compile under Windows NT, and creating the "X" port. +The reason for an Emacs package not to be included in XEmacs is +usually one or more of the following: -@item -Several months later, Jonathan Harris sent out initial patches to use -the Win32 API, thus creating the native port. Since then, various -people have contributed, including Kirill M. Katsnelson (contributed -support for menubars, subprocesses and network, as well as loads of -other code), Andy Piper (ported XEmacs to Cygwin environment, -contributed Windows unexec, Windows-specific glyphs and toolbars code, -and more), Ben Wing (loads of improvements; primary MS Windows developer -since 2000), Jeff Sparkes (contributed scrollbars support) and many -others. -@end itemize +@enumerate +@item +The package has not been ported to XEmacs. This will typically happen +when it uses GNU-Emacs-specific features, which make it fail under +XEmacs. + +Porting a package to XEmacs can range from a trivial amount of change to +a partial or full rewrite. Fortunately, the authors of modern packages +usually choose to support both Emacsen themselves. @item -NT Emacs +The package has been decided not to be appropriate for XEmacs. It may +have an equivalent or better replacement within XEmacs, in which case +the developers may choose not to burden themselves with supporting an +additional package. -@itemize @minus +Each package bundled with XEmacs means more work for the maintainers, +whether they want it or not. If you are ready to take over the +maintenance responsibilities for the package you port, be sure to say +so---we will more likely include it. @item -NT Emacs is a version of GNU Emacs modified to compile and run under MS -Windows 95 and NT using the native Win32 API. As such, it is close in -spirit to the XEmacs "native" port. +The package simply hasn't been noted by the XEmacs development. If +that's the case, the messages like yours are very useful for attracting +our attention. @item -NT Emacs has been written by Geoff Voelker, and more information can be -found at +The package was noted by the developers, but they simply haven't yet +gotten around to including/porting it. Wait for the next release or, +even better, offer your help. It will be gladly accepted and +appreciated. +@end enumerate + +@node Q8.1.2, Q8.1.3, Q8.1.1, Other Packages +@unnumberedsubsec Q8.1.2: Are there any Emacs Lisp Spreadsheets? + +Yes. Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at @iftex @* @end iftex -@uref{http://www.gnu.org/software/emacs/windows/ntemacs.html}. -@end itemize +@uref{http://acs.ist.psu.edu/dismal/dismal.html}. -@item -Win-Emacs +@node Q8.1.3, Q8.2.1, Q8.1.2, Other Packages +@unnumberedsubsec Q8.1.3: Is there a MatLab mode? -@itemize @minus +Yes, a matlab mode and other items are available at the +@uref{http://www.mathworks.com/matlabcentral/files/104/matlab.el}. -@item -Win-Emacs was a port of Lucid Emacs 19.6 to MS Windows using X -compatibility libraries. Win-Emacs was written by Ben Wing. The MS -Windows code never made it back to Lucid Emacs, and its creator (Pearl -Software) has long since gone out of business. -@end itemize +@unnumberedsec 8.2: Environments Built Around XEmacs -@item -GNU Emacs for DOS +@node Q8.2.1, Q8.2.2, Q8.1.3, Other Packages +@unnumberedsubsec Q8.2.1: What are SPARCworks, EOS, and WorkShop? -@itemize @minus +SPARCworks was a development environment from Sun (circa 1993-1996) +and consisted of compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and +Pascal), a debugger, and other tools such as TeamWare (for +configuration management), MakeTool, etc. -@item -GNU Emacs features support for MS-DOS and DJGPP (D.J. Delorie's DOS -port of GCC). Such an Emacs is heavily underfeatured, because it does -not support long file names, lacks proper subprocesses support, and -is far too big compared with typical DOS editors. -@end itemize +EOS is the integration of XEmacs with the SPARCworks debugger. It +allows one to use an XEmacs frame to view code (complete with +fontification, etc.), set breakpoints, print variables, etc., while +using the SPARCworks debugger. -@item -GNU Emacs compiled with Win32 +EOS stands for "Era on SPARCworks"; Era stood for "Emacs Rewritten +Again" and was the name used by Sun for its modified version of Lucid +Emacs (later XEmacs) in the early-mid 90's. This is documented in +more detail in the history section of the XEmacs About page. -@itemize @minus +EOS was replaced around 1996 with a newer graphical development +environment called Sun WorkShop. The current status of this is +unknown. -@item -Starting with version 19.30, it has been possible to compile GNU Emacs -under MS Windows using the DJGPP compiler and X libraries. The result -is very similar to GNU Emacs compiled under MS DOS, only it works -somewhat better because it runs in 32-bit mode, makes use of all the -system memory, supports long file names, etc. -@end itemize +@node Q8.2.2, Q8.2.3, Q8.2.1, Other Packages +@unnumberedsubsec Q8.2.2: How do I start the Sun Workshop support in XEmacs 21? -@end itemize +Add the switch ---with-workshop to the configure command when building +XEmacs and put the following in one of your startup files +(e.g. site-start.el or .emacs): +@lisp +(when (featurep 'tooltalk) + (load "tooltalk-macros") + (load "tooltalk-util") + (load "tooltalk-init")) +(when (featurep 'sparcworks) + (load "sunpro-init") + (load "ring") + (load "comint") + (load "annotations") + (sunpro-startup)) +@end lisp -@node Q6.3.3, Q6.3.4, Q6.3.2, MS Windows -@unnumberedsubsec Q6.3.3: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? +If you are not using the latest Workshop (5.0) you have to apply the +following patch: -Yes. +@format +--- /opt/SUNWspro/lib/eserve.el.ORIG Fri May 14 15:23:26 1999 ++++ /opt/SUNWspro/lib/eserve.el Fri May 14 15:24:54 1999 +@@@@ -42,7 +42,7 @@@@ + (defvar running-xemacs nil "t if we're running XEmacs") + (defvar running-emacs nil "t if we're running GNU Emacs 19") -The console was there because @file{temacs} (and in turn, @file{xemacs}) -was a console application, and Windows typically creates a new -console for a console process unless the creating process requests that -one isn't created. This used to be fixed with @file{runemacs}, a small -Windows application that existed merely to start @file{xemacs}, stating -that it didn't want a console. +-(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version) ++(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version) + (setq running-xemacs t) + (setq running-emacs t)) +@end format -XEmacs 21.4 fixes this cleanly by the virtue of being a true "GUI" -application. The explanation of what that means is included for -educational value. +@node Q8.2.3, Q8.2.4, Q8.2.2, Other Packages +@unnumberedsubsec Q8.2.3: What is/was Energize? -When building an application to be run in a Win32 environment, you must -state which sub-system it is to run in. Valid subsystems include -"console" and "gui". The subsystem you use affects the run time -libraries linked into your application, the start up function that is -run before control is handed over to your application, the entry point -to your program, and how Windows normally invokes your program. (Console -programs automatically get a console created for them at startup if -their stdin/stdout don't point anywhere useful, which is the case when -run from the GUI. This is a stupid design, of course -- instead, the -console should get created only when the first I/O actually occurs! -GUI programs have an equally stupid design: When called from -@file{CMD.EXE}/@file{COMMAND.COM}, their stdin/stdout will be set to -point nowhere useful, even though the command shell has its own -stdin/stdout. It's as if someone who had learned a bit about stdio but -had no actual knowledge of interprocess communication designed the -scheme; unfortunately, the whole process-communication aspect of the -Win32 API is equally badly designed.) For example, the entry point for a -console app is "main" (which is what you'd expect for a C/C++ program), -but the entry point for a "gui" app is "WinMain". This confuses and -annoys a lot of programmers who've grown up on Unix systems, where the -kernel doesn't really care whether your application is a gui program or -not. +The "Energize Programming System" was a C and C++ development environment +sold by Lucid, Inc. It was the reason why Lucid Emacs, now XEmacs, was +created in the first place. Unfortunately, Lucid went out of business in +1994. The rights to sell it in Japan were purchased by INS +Engineering (which briefly employed Stig Hackvan aka Jonathan +Stigelman to work on Japanese support for XEmacs, in late 1994 and +early 1995) and Tartan bought the rights to sell it in the rest of the +world. However, INS is not selling Energize at this point and may or +may not have ever done so; Tartan certainly never did. -For reasons not altogether clear, and are lost in the mists of time and -tradition, XEmacs on Win32 started out as a console application, and -therefore a console was automatically created for it. (It may have been -made a console application partly because a console is needed in some -circumstances, especially under Win95, to interrupt, terminate, or send -signals to a child process, and because of the bogosity mentioned above -with GUI programs and the standard command shell. Currently, XEmacs -just creates and immediately hides a console when necessary, and -works around the "no useful stdio" problem by creating its own console -window as necessary to display messages in.) +@node Q8.2.4, , Q8.2.3, Other Packages +@unnumberedsubsec Q8.2.4: What is Infodock? + +@uref{http://sourceforge.net/projects/infodock/, InfoDock} is an +integrated productivity toolset, mainly aimed at technical people, +hosted at SourceForge. +InfoDock is built atop the XEmacs variant of GNU Emacs and so has all of +the power of Emacs, but with an easier to use and more comprehensive +menu-based user interface. The bottom portion of this text describes +how it differs from XEmacs and GNU Emacs from the Free Software +Foundation. -@node Q6.3.4, Q6.4.1, Q6.3.3, MS Windows -@unnumberedsubsec Q6.3.4: What is the porting team doing at the moment? +InfoDock is aimed at people who want a free, turn-key productivity +environment. Although InfoDock is customizable, it is not intended for +people who like basic versions of Emacs which need to be customized +extensively for local use; standard Emacs distributions are better for +such uses. InfoDock is for those people who want a complete, +pre-customized environment in one package, which they need not touch +more than once or twice a year to update to new revisions. -(as of June 2001) +InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX, +and Intel Linux systems. It is intended for use on a color display, +although most features will work on monochrome monitors. Simply unpack +InfoDock according to the instructions in the ID-INSTALL file and you +are ready to run. -The porting team is continuing work on the MS Windows-specific code. -Major projects are the development of Mule (internationalization) -support for Windows and the improvement of the widget support (better -support for dialog boxes, buttons, edit fields, and similar UI -elements). +The InfoDock Manual is concise, yet sufficient as a user guide for users +who have never used an Emacs-type editor before. For users who are +already familiar with Emacs, it supplements the information in the GNU +Emacs Manual. +InfoDock menus are much more extensive and more mature than standard +Emacs menus. Each menu offers a @samp{Manual} item which displays +documentation associated with the menu's functions. +@noindent +Four types of menubars are provided: +@enumerate +@item +An extensive menubar providing access to global InfoDock commands. +@item +Mode-specific menubars tailored to the current major mode. +@item +A simple menubar for basic editing to help novices get started with InfoDock. +@item +The standard XEmacs menubar. +@end enumerate -@node Q6.4.1, Q6.4.2, Q6.3.4, MS Windows -@unnumberedsec 6.3: Troubleshooting -@unnumberedsubsec Q6.4.1 XEmacs won't start on Windows. +Most modes also include mode-specific popup menus. Additionally, region and +rectangle popup menus are included. -XEmacs relies on a process called "dumping" to generate a working -executable. Under MS-Windows this process effectively fixes the memory -addresses of information in the executable. When XEmacs starts up it tries -to reserve these memory addresses so that the dumping process can be -reversed -- putting the information back at the correct addresses. -Unfortunately some .DLLs (for instance the soundblaster driver) occupy -memory addresses that can conflict with those needed by the dumped XEmacs -executable. In this instance XEmacs will fail to start without any -explanation. Note that this is extremely machine specific. +@samp{Hyperbole}, the everyday information manager, is a core part of +InfoDock. This provides context-sensitive mouse keys, a rolodex-type +contact manager, programmable hypertext buttons, and an autonumbered +outliner with embedded hyperlink anchors. -21.1.10 includes a fix for this that makes more intelligent guesses -about which memory addresses will be free, and this should cure the -problem for most people. 21.4 implements "portable dumping", which -eliminates the problem altogether. We recommend you use the 21.4 -binaries, but you can use the 21.1 binaries if you are very paranoid -about stability. @xref{Q6.0.3}. +The @samp{OO-Browser}, a multi-language object-oriented code browser, is a +standard part of InfoDock. -@node Q6.4.2, Q6.4.3, Q6.4.1, MS Windows -@unnumberedsubsec Q6.4.2 Why do I get a blank toolbar on Windows 95? +InfoDock saves a more extensive set of user options than other Emacs +versions. -You need at least version 4.71 of the system file @file{comctl32.dll}. -The updated version is supplied with Internet Explorer 4 and later but if -you are avoiding IE you can also download it from the Microsoft web -site. Go into support and search for @file{comctl32.dll}. The download -is a self-installing executable. +InfoDock inserts a useful file header in many file types, showing the +author, summary, and last modification time of each file. A summary +program can then be used to summarize all of the files in a directory, +for easy MANIFEST file creation. -@node Q6.4.3, , Q6.4.2, MS Windows -@unnumberedsubsec Q6.4.3 XEmacs complains "No such file or directory, diff" +Your working set of buffers is automatically saved and restored (if you +answer yes to a prompt) between InfoDock sessions. -or "ispell" or other commands that seem related to whatever you just -tried to do (M-x ediff or M-$, for example). +Refined color choices for code highlighting are provided for both dark and +light background display frames. -There are a large number of common (in the sense that "everyone has -these, they really do") Unix utilities that are not provided with -XEmacs. The GNU Project's implementations are available for Windows in -the the Cygwin distribution (@uref{http://www.cygwin.com/}), which also -provides a complete Unix emulation environment (and thus makes ports of -Unix utilities nearly trivial). Another implementation is that from -MinGW (@uref{http://www.mingw.org/msys.shtml}). If you know of others, -please let us know! +The @kbd{C-z} key prefix performs frame-based commands which parallel the +@kbd{C-x} key prefix for window-based commands. +The Smart Menu system is included for producing command menus on dumb +terminals. +Lisp libraries are better categorized according to function. -@node Current Events, Legacy Versions, MS Windows, Top -@unnumbered 7 What the Future Holds +Extensions and improvements to many areas of Emacs are included, such as: +paragraph filling, mail reading with Rmail, shell handling, outlining, code +highlighting and browsing, and man page browsing. -This is part 7 of the XEmacs Frequently Asked Questions list. This +InfoDock questions, answers and discussion should go to the mail list +@iftex +@* +@end iftex +@email{infodock@@infodock.com}. Use +@email{infodock-request@@infodock.com} to be added or removed from the +list. Always include your InfoDock version number when sending help +requests. + +@node Current Events, Legacy Versions, Other Packages, Top +@unnumbered 9 What the Future Holds + +This is part 9 of the XEmacs Frequently Asked Questions list. This section will change frequently, and (in theory) should contain any interesting items that have transpired recently. (But in practice it's not getting updated like this.) @@ -6942,24 +8258,25 @@ menu. Information on older versions of XEmacs can be find in @file{ONEWS} in the same directory, or @file{OONEWS} for really old versions. - @menu -* Q7.0.1:: What new features will be in XEmacs soon? -* Q7.0.2:: What's new in XEmacs 21.4? -* Q7.0.3:: What's new in XEmacs 21.1? -* Q7.0.4:: What's new in XEmacs 20.4? -* Q7.0.5:: What's new in XEmacs 20.3? -* Q7.0.6:: What's new in XEmacs 20.2? +9.0: Changes +* Q9.0.1:: What new features will be in XEmacs soon? +* Q9.0.2:: What's new in XEmacs 21.4? +* Q9.0.3:: What's new in XEmacs 21.1? +* Q9.0.4:: What's new in XEmacs 20.4? +* Q9.0.5:: What's new in XEmacs 20.3? +* Q9.0.6:: What's new in XEmacs 20.2? @end menu -@node Q7.0.1, Q7.0.2, Current Events, Current Events -@unnumberedsec 7.0: Changes -@unnumberedsubsec Q7.0.1: What new features will be in XEmacs soon? +@unnumberedsec 9.0: Changes -Not yet written. +@node Q9.0.1, Q9.0.2, Current Events, Current Events +@unnumberedsubsec Q9.0.1: What new features will be in XEmacs soon? + +#### Write me. -@node Q7.0.2, Q7.0.3, Q7.0.1, Current Events -@unnumberedsubsec Q7.0.2: What's new in XEmacs 21.4? +@node Q9.0.2, Q9.0.3, Q9.0.1, Current Events +@unnumberedsubsec Q9.0.2: What's new in XEmacs 21.4? 21.4 was the "stable" version of the 21.2 series, which was considered "experimental" throughout its life; thus there were no "official" @@ -7004,7 +8321,11 @@ XEmacs support for menu accelerators has been much improved. Default menubar improvements. (Default menubar has many new commands and better organization. The font-menu is now available under MS Windows.) @item -Dialog box improvements, including a real file dialog box. (XEmacs now has a proper file dialog box under MS Windows (and GTK)! The old clunky file dialog box is improved. Keyboard traversal now works correctly in MS Windows dialog boxes. There is a Search dialog box available from Edit->Find...) +Dialog box improvements, including a real file dialog box. (XEmacs now +has a proper file dialog box under MS Windows (and GTK)! The old +clunky file dialog box is improved. Keyboard traversal now works +correctly in MS Windows dialog boxes. There is a Search dialog box +available from @samp{Edit->Find...}) @item New buffer tabs. @item @@ -7076,11 +8397,11 @@ Not yet written. @c @itemize @bullet @c @end itemize -@node Q7.0.3, Q7.0.4, Q7.0.2, Current Events -@unnumberedsubsec Q7.0.3: What's new in XEmacs 21.1? +@node Q9.0.3, Q9.0.4, Q9.0.2, Current Events +@unnumberedsubsec Q9.0.3: What's new in XEmacs 21.1? 21.1 was the "stable" version of "experimental" 21.0 series. -@xref{Q7.0.2}. +@xref{Q9.0.2, What's new in XEmacs 21.4?}. The following lists summarizes the essential changes made in this version. For a fuller list, see the @file{NEWS} in the @file{etc} @@ -7092,9 +8413,10 @@ directory of the XEmacs distribution, or use @kbd{C-h n} or the @itemize @bullet @item -XEmacs is now supported under Microsoft Windows 95/98 and Windows NT -operating systems. To discuss Windows-specific issues, subscribe to the -mailing list at @email{xemacs-nt-request@@xemacs.org}. +XEmacs is now supported under Microsoft Windows 95/98 and Windows +NT/2000/XP operating systems. To discuss Windows-specific issues, +subscribe to the mailing list at +@email{xemacs-winnt-request@@xemacs.org}. @item XEmacs has been unbundled into constituent installable packages. @@ -7214,14 +8536,14 @@ longer on the load-path by default. @end itemize -@node Q7.0.4, Q7.0.5, Q7.0.3, Current Events -@unnumberedsubsec Q7.0.4: What's new in XEmacs 20.4? +@node Q9.0.4, Q9.0.5, Q9.0.3, Current Events +@unnumberedsubsec Q9.0.4: What's new in XEmacs 20.4? XEmacs 20.4 is a bugfix release with no user-visible changes. @c Filled in from NEWS file of 20.5-b33 -@node Q7.0.5, Q7.0.6, Q7.0.4, Current Events -@unnumberedsubsec Q7.0.5: What's new in XEmacs 20.3? +@node Q9.0.5, Q9.0.6, Q9.0.4, Current Events +@unnumberedsubsec Q9.0.5: What's new in XEmacs 20.3? XEmacs 20.3 was released in November 1997. It contains many bugfixes, and a number of new features, including Autoconf 2 based configuration, @@ -7240,8 +8562,8 @@ the default) is definitely faster than XEmacs 19.16. XEmacs 20.3 is the first non-beta v20 release, and will be the basis for all further development. -@node Q7.0.6, , Q7.0.5, Current Events -@unnumberedsubsec Q7.0.6: What's new in XEmacs 20.2? +@node Q9.0.6, , Q9.0.5, Current Events +@unnumberedsubsec Q9.0.6: What's new in XEmacs 20.2? The biggest changes in 20.2 include integration of EFS (the next generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a @@ -7256,25 +8578,26 @@ considered unstable. For older news, see the file @file{ONEWS} in the @file{etc} directory of the XEmacs distribution. +@node Legacy Versions, , Current Events, Top +@unnumbered 10 New information about old XEmacsen - -@node Legacy Versions, , Current Events, Top -@unnumbered 8 New information about old XEmacsen - -This is part 8 of the XEmacs Frequently Asked Questions list. It will +This is part 10 of the XEmacs Frequently Asked Questions list. It will occasionally be updated to reflect new information about versions which are no longer being revised by the XEmacs Project. The primary purpose is advice on compatibility of older XEmacsen with new packages and updated versions of packages, but bug fixes (which will not be applied to released XEmacsen, but users can apply themselves) are also accepted. - @menu -* Q8.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. +10.0: XEmacs 21.1 +* Q10.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. +* Q10.0.2:: XEmacs won't start on Windows in XEmacs 21.1. @end menu -@node Q8.0.1, , , Legacy Versions -@unnumberedsubsec Q8.0.1: Gnus 5.10 won't display smileys in XEmacs 21.1. +@unnumberedsec 10.0: XEmacs 21.1 + +@node Q10.0.1, Q10.0.2, Legacy Versions, Legacy Versions +@unnumberedsubsec Q10.0.1: Gnus 5.10 won't display smileys in XEmacs 21.1. @email{eeide@@cs.utah.edu, Eric Eide} wrote: @@ -7311,5 +8634,24 @@ The image-mode stuff is gone from format-alist in the 21.4 branch, praise be. @end quotation +@node Q10.0.2, , Q10.0.1, Legacy Versions +@unnumberedsubsec Q10.0.2: XEmacs won't start on Windows in XEmacs 21.1. + +XEmacs relies on a process called "dumping" to generate a working +executable. Under MS-Windows this process effectively fixes the memory +addresses of information in the executable. When XEmacs starts up it tries +to reserve these memory addresses so that the dumping process can be +reversed -- putting the information back at the correct addresses. +Unfortunately some .DLLs (for instance the soundblaster driver) occupy +memory addresses that can conflict with those needed by the dumped XEmacs +executable. In this instance XEmacs will fail to start without any +explanation. Note that this is extremely machine specific. + +21.1.10 includes a fix for this that makes more intelligent guesses +about which memory addresses will be free, and this should cure the +problem for most people. 21.4 implements "portable dumping", which +eliminates the problem altogether. We recommend you use the 21.4 +binaries, but you can use the 21.1 binaries if you are very paranoid +about stability. @xref{Q1.1.2, Are binaries available?}. @bye diff --git a/modules/ldap/eldap.c b/modules/ldap/eldap.c index e9bdf0c..4e89cb4 100644 --- a/modules/ldap/eldap.c +++ b/modules/ldap/eldap.c @@ -35,6 +35,13 @@ Boston, MA 02111-1307, USA. */ #include "eldap.h" #include <lber.h> +/* #### NEEDS REWRITE! + Thanks to Mats Lidell <matsl@xemacs.org> for the report & patch: + <871wgnqunm.fsf@spencer.lidell.homelinux.net> + "See http://www.openldap.org/faq/data/cache/1278.html. + Temporary workaround would be use the deprecated interface. Long term + solution is a rewrite." */ +#define LDAP_DEPRECATED 1 #include <ldap.h> #ifdef HAVE_NS_LDAP diff --git a/netinstall/ChangeLog b/netinstall/ChangeLog index dcdfabf..33afe7b 100644 --- a/netinstall/ChangeLog +++ b/netinstall/ChangeLog @@ -1,3 +1,19 @@ +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + 2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released diff --git a/nt/ChangeLog b/nt/ChangeLog index e729b8a..a527cd3 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,63 @@ +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2007-09-27 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: Don't set package-get-always-update. + +2007-09-25 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: Put comment wrapper around site-start.el changes and + remove those changes on uninstall. Enable ftp.xemacs.org for + package retrieval and set the ftp path. + +2007-09-19 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: Various updates: Add support for 21.5; add easypg. + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-03-04 Vin Shelton <acs@xemacs.org> + + * config.inc.samp: Comment out PACKAGE_PREFIX. + * xemacs.mak: Do not set a value for PACKAGE_PATH unless + PACKAGE_PATH or PACKAGE_PREFIX was specified in config.inc. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: Erase old code. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: 21.4.19 version. No registry fiddling, please. + Package root is now found automatically. + +2005-12-27 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: 21.4.19-pre1 version + Remove registry key for EMACSPACKAGEPATH. + Install by default to c:\Program Files\XEmacs. + +2005-12-17 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: Move packages out of version-specific location. + Removed CRs. + +2005-12-15 Vin Shelton <acs@xemacs.org> + + * XEmacs.iss: Created for generating winoze setup kits. + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + 2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released diff --git a/nt/XEmacs.iss b/nt/XEmacs.iss new file mode 100644 index 0000000..b31c915 --- /dev/null +++ b/nt/XEmacs.iss @@ -0,0 +1,420 @@ +; This script generates an installation kit for a Windows-native XEmacs, 21.4 and 21.5. +; This script runs with Inno Setup version 5.1.6, see http://www.jrsoftware.org/ for more info. +; This script requires the Inno Setup pre-processor. +; +; Version History +; 2007-09-26 Vin Shelton <acs@xemacs.org> Remove setting of package-get-always-update and miscellaneous cleanup. +; 2007-09-25 Vin Shelton <acs@xemacs.org> Put comment wrapper around site-start.el changes and remove them on uninstall. +; Enable ftp.xemacs.org for packages and set path to ftp.exe in site-start.el. +; 2007-09-06 Vin Shelton <acs@xemacs.org> Added easypg. +; 2006-04-06 Vin Shelton <acs@xemacs.org> Changed defaults for ExecSrc and PkgSrc. +; Don't set 'Start in' property. +; 2006-04-02 Vin Shelton <acs@xemacs.org> Set 'Start in' property for shortcuts to 'My Documents' directory. +; 2006-03-03 Vin Shelton <acs@xemacs.org> Support for 21.5. Added packages as separate components. +; 2006-01-28 Vin Shelton <acs@xemacs.org> Erase unused registry code. +; 2006-01-26 Vin Shelton <acs@xemacs.org> Don't append XEmacs binary directory to system path. +; 2006-01-21 Vin Shelton <acs@xemacs.org> Append XEmacs binary directory to system path; this is not currently deleted on uninstall. +; Get built kit from C:\XEmacs-built. +; 2005-12-26 Vin Shelton <acs@xemacs.org> Packages are now installed directly into {app}\xemacs-packages, etc. As of 21.4.19, the package root is found automatically, so EMACSPACKAGEPATH is no longer necessary. +; 2005-12-17 Vin Shelton <acs@xemacs.org> Move packages out of the version-specific tree. +; 2005-12-13 Vin Shelton <acs@xemacs.org> Created. + +; Allow undefined identifiers, e.g. 'KitName' +#pragma parseroption -u+ + +;#define QUICKIE_TEST + +#ifndef XEmacsVersion + #define XEmacsVersion "21.4.20" +#endif +;#define KitName "-2" +#ifndef ExecSrc + #define ExecSrc "installed" +#endif +#ifndef PkgSrc + #define PkgSrc "packages" +#endif + +[Setup] +AllowNoIcons=yes +AppName=XEmacs +AppVerName=XEmacs {#XEmacsVersion} +AppPublisher=XEmacs Development Team +AppPublisherURL=http://www.xemacs.org +AppSupportURL=http://www.xemacs.org +AppUpdatesURL=http://www.xemacs.org +Compression=lzma +DefaultDirName={pf}\XEmacs +DefaultGroupName=XEmacs +InfoBeforeFile=ReadMe-{#XEmacsVersion} +OutputDir=. +OutputBaseFilename=XEmacs_Setup_{#XEmacsVersion}{#KitName} +SolidCompression=yes +UninstallFilesDir={app}/XEmacs-{#XEmacsVersion} + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Messages] +StatusRunProgram=Unpacking selected packages... + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +; Always installed +Source: "{#ExecSrc}\XEmacs-{#XEmacsVersion}\*"; DestDir: "{app}\XEmacs-{#XEmacsVersion}"; Flags: ignoreversion recursesubdirs +Source: "{#PkgSrc}\efs-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion +Source: "{#PkgSrc}\xemacs-base-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion +; minitar.exe and unpack.cmd are used to unpack the packages +Source: "{#ExecSrc}\XEmacs-{#XEmacsVersion}\i586-pc-win32\minitar.exe"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion +Source: "unpack.cmd"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion +Source: "{#PkgSrc}\package-index.LATEST.gpg"; DestDir: "{app}"; +#ifndef QUICKIE_TEST +; Recommended +Source: "{#PkgSrc}\c-support-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: c_support; Flags: ignoreversion +Source: "{#PkgSrc}\cc-mode-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: cc_mode; Flags: ignoreversion +Source: "{#PkgSrc}\debug-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: debug; Flags: ignoreversion +Source: "{#PkgSrc}\dired-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: dired; Flags: ignoreversion +Source: "{#PkgSrc}\ecb-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ecb; Flags: ignoreversion +Source: "{#PkgSrc}\edebug-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: edebug; Flags: ignoreversion +Source: "{#PkgSrc}\ediff-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ediff; Flags: ignoreversion +Source: "{#PkgSrc}\edit-utils-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: edit_utils; Flags: ignoreversion +Source: "{#PkgSrc}\eieio-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: eieio; Flags: ignoreversion +Source: "{#PkgSrc}\fsf-compat-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: fsf_compat; Flags: ignoreversion +Source: "{#PkgSrc}\mail-lib-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mail_lib; Flags: ignoreversion +Source: "{#PkgSrc}\net-utils-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: net_utils; Flags: ignoreversion +Source: "{#PkgSrc}\os-utils-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: os_utils; Flags: ignoreversion +Source: "{#PkgSrc}\pc-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: pc; Flags: ignoreversion +Source: "{#PkgSrc}\perl-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: perl_modes; Flags: ignoreversion +Source: "{#PkgSrc}\prog-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: prog_modes; Flags: ignoreversion +Source: "{#PkgSrc}\semantic-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: semantic; Flags: ignoreversion +Source: "{#PkgSrc}\sh-script-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sh_script; Flags: ignoreversion +Source: "{#PkgSrc}\sounds-wav-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sounds_wav; Flags: ignoreversion +Source: "{#PkgSrc}\speedbar-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: speedbar; Flags: ignoreversion +Source: "{#PkgSrc}\texinfo-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: texinfo; Flags: ignoreversion +Source: "{#PkgSrc}\text-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: text_modes; Flags: ignoreversion +Source: "{#PkgSrc}\time-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: time; Flags: ignoreversion +Source: "{#PkgSrc}\xemacs-devel-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xemacs_devel; Flags: ignoreversion +; Optional +Source: "{#PkgSrc}\auctex-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: auctex; Flags: ignoreversion +Source: "{#PkgSrc}\bbdb-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: bbdb; Flags: ignoreversion +Source: "{#PkgSrc}\calc-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: calc; Flags: ignoreversion +Source: "{#PkgSrc}\easypg-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: easypg; Flags: ignoreversion +Source: "{#PkgSrc}\ecrypto-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ecrypto; Flags: ignoreversion +Source: "{#PkgSrc}\elib-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: elib; Flags: ignoreversion +Source: "{#PkgSrc}\emerge-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: emerge; Flags: ignoreversion +Source: "{#PkgSrc}\eshell-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: eshell; Flags: ignoreversion +Source: "{#PkgSrc}\footnote-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: footnote; Flags: ignoreversion +Source: "{#PkgSrc}\fortran-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: fortran_modes; Flags: ignoreversion +Source: "{#PkgSrc}\gnus-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: gnus; Flags: ignoreversion +Source: "{#PkgSrc}\hm--html-menus-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: hm__html_menus; Flags: ignoreversion +Source: "{#PkgSrc}\ibuffer-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ibuffer; Flags: ignoreversion +Source: "{#PkgSrc}\igrep-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: igrep; Flags: ignoreversion +Source: "{#PkgSrc}\ispell-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ispell; Flags: ignoreversion +Source: "{#PkgSrc}\jde-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: jde; Flags: ignoreversion +Source: "{#PkgSrc}\mailcrypt-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mailcrypt; Flags: ignoreversion +Source: "{#PkgSrc}\mh-e-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mh_e; Flags: ignoreversion +Source: "{#PkgSrc}\mmm-mode-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: mmm_mode; Flags: ignoreversion +Source: "{#PkgSrc}\pcl-cvs-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: pcl_cvs; Flags: ignoreversion +Source: "{#PkgSrc}\pcomplete-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: pcomplete; Flags: ignoreversion +Source: "{#PkgSrc}\ps-print-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ps_print; Flags: ignoreversion +Source: "{#PkgSrc}\psgml-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: psgml; Flags: ignoreversion +Source: "{#PkgSrc}\python-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: python_modes; Flags: ignoreversion +Source: "{#PkgSrc}\re-builder-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: re_builder; Flags: ignoreversion +Source: "{#PkgSrc}\reftex-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: reftex; Flags: ignoreversion +Source: "{#PkgSrc}\ruby-modes-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: ruby_modes; Flags: ignoreversion +Source: "{#PkgSrc}\sasl-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sasl; Flags: ignoreversion +Source: "{#PkgSrc}\scheme-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: scheme; Flags: ignoreversion +Source: "{#PkgSrc}\sgml-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sgml; Flags: ignoreversion +Source: "{#PkgSrc}\sieve-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: sieve; Flags: ignoreversion +Source: "{#PkgSrc}\supercite-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: supercite; Flags: ignoreversion +Source: "{#PkgSrc}\textools-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: textools; Flags: ignoreversion +Source: "{#PkgSrc}\tramp-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: tramp; Flags: ignoreversion +Source: "{#PkgSrc}\vc-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: vc; Flags: ignoreversion +Source: "{#PkgSrc}\vhdl-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: vhdl; Flags: ignoreversion +Source: "{#PkgSrc}\viper-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: viper; Flags: ignoreversion +Source: "{#PkgSrc}\vm-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: vm; Flags: ignoreversion +Source: "{#PkgSrc}\w3-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: w3; Flags: ignoreversion +Source: "{#PkgSrc}\x-symbol-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: x_symbol; Flags: ignoreversion +Source: "{#PkgSrc}\xetla-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xetla; Flags: ignoreversion +Source: "{#PkgSrc}\xslide-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xslide; Flags: ignoreversion +Source: "{#PkgSrc}\xslt-process-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Components: xslt_process; Flags: ignoreversion +#endif // ifndef QUICKIE_TEST +#ifdef MULE +Source: "{#PkgSrc}\latin-euro-standards-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: latin_euro_standards; Flags: ignoreversion +Source: "{#PkgSrc}\latin-unity-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: latin_unity; Flags: ignoreversion +Source: "{#PkgSrc}\locale-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: locale; Flags: ignoreversion +Source: "{#PkgSrc}\lookup-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: lookup; Flags: ignoreversion +Source: "{#PkgSrc}\mule-base-*-pkg.tar"; DestDir: "{app}\mule-packages"; Components: mule_base; Flags: ignoreversion +#endif + +[Types] +Name: "recommended"; Description: "Recommended installation" +Name: "complete"; Description: "Install XEmacs {#XEmacsVersion} and all packages" +Name: "minimal"; Description: "Minimalist installation" +Name: "custom"; Description: "Custom installation"; Flags: iscustom + +[Components] +Name: "base"; Description: "XEmacs {#XEmacsVersion} executable and essential support files"; Types: complete minimal recommended custom; Flags: fixed +Name: "auctex"; Description: "auctex: Basic TeX/LaTeX support"; Types: complete custom +Name: "bbdb"; Description: "bbdb: The Big Brother Data Base"; Types: complete custom +Name: "c_support"; Description: "c-support: Basic single-file add-ons for editing C code"; Types: complete recommended custom +Name: "calc"; Description: "calc: Emacs calculator"; Types: complete custom +Name: "cc_mode"; Description: "cc-mode: C, C++, etc language support"; Types: complete recommended custom +Name: "debug"; Description: "debug: GUD, gdb, dbx debugging support"; Types: complete recommended custom +Name: "dired"; Description: "dired: Manage file systems"; Types: complete recommended custom +Name: "ecb"; Description: "ecb: Emacs source code browser"; Types: complete recommended custom +Name: "easypg"; Description: "easypg: GnuPG interface for Emacs"; Types: complete custom +Name: "ecrypto"; Description: "ecrypto: Crypto functionality in Emacs Lisp"; Types: complete custom +Name: "edebug"; Description: "edebug: An Emacs Lisp debugger"; Types: complete recommended custom +Name: "ediff"; Description: "ediff: Interface over GNU patch"; Types: complete recommended custom +Name: "edit_utils"; Description: "edit-utils: Miscellaneous editor extensions, you probably need this"; Types: complete minimal recommended custom +Name: "efs"; Description: "efs: Edit files on other computers"; Types: complete minimal recommended custom; Flags: fixed +Name: "eieio"; Description: "eieio: Enhanced Implementation of Emacs Interpreted Objects"; Types: complete recommended custom +Name: "elib"; Description: "elib: Portable Emacs Lisp utilities library"; Types: complete custom +Name: "emerge"; Description: "emerge: Another interface over GNU patch"; Types: complete custom +Name: "eshell"; Description: "eshell: Command shell implemented in Emacs Lisp"; Types: complete custom +Name: "footnote"; Description: "footnote: Footnoting in mail message editing modes"; Types: complete custom +Name: "fortran_modes"; Description: "fortran-modes: Fortran support"; Types: complete custom +Name: "fsf_compat"; Description: "fsf-compat: FSF Emacs compatibility files"; Types: complete recommended custom +Name: "gnus"; Description: "gnus: The Gnus Newsreader and Mailreader"; Types: complete custom +Name: "hm__html_menus"; Description: "hm--html-menus: HTML editing"; Types: complete custom +Name: "ibuffer"; Description: "ibuffer: Advanced replacement for buffer-menu"; Types: complete custom +Name: "igrep"; Description: "igrep: Enhanced front-end for Grep"; Types: complete custom +Name: "ispell"; Description: "ispell: Spell-checking with GNU ispell"; Types: complete custom +Name: "jde"; Description: "jde: Integrated Development Environment for Java"; Types: complete custom +#ifdef MULE +Name: "latin_euro_standards"; Description: "latin-euro-standards: Support for the Latin character sets (MULE)"; Types: complete recommended custom +Name: "latin_unity"; Description: "latin-unity: Find single ISO 8859 character set to encode a buffer (MULE)"; Types: complete recommended custom +Name: "locale"; Description: "locale: Localized menubars and localized splash screens (MULE)"; Types: complete recommended custom +Name: "lookup"; Description: "lookup: Dictionary support (MULE)"; Types: complete recommended custom +#endif +Name: "mail_lib"; Description: "mail-lib: Fundamental lisp files for providing email support"; Types: complete recommended custom +Name: "mailcrypt"; Description: "mailcrypt: Support for messaging encryption with PGP"; Types: complete custom +Name: "mh_e"; Description: "mh-e: Interface to the MH Mail System"; Types: complete custom +Name: "mmm_mode"; Description: "mmm-mode: Multiple major modes in a single buffer"; Types: complete custom +#ifdef MULE +Name: "mule_base"; Description: "mule-base: Basic MULE support"; Types: complete recommended custom +#endif +Name: "net_utils"; Description: "net-utils: Miscellaneous Networking Utilities"; Types: complete recommended custom +Name: "os_utils"; Description: "os-utils: Miscellaneous O/S utilities"; Types: complete recommended custom +Name: "pc"; Description: "pc: PC style interface emulation"; Types: complete recommended custom +Name: "pcl_cvs"; Description: "pcl-cvs: CVS frontend"; Types: complete custom +Name: "pcomplete"; Description: "pcomplete: Provides programmatic completion"; Types: complete custom +Name: "perl_modes"; Description: "perl-modes: Perl support"; Types: complete recommended custom +Name: "prog_modes"; Description: "prog-modes: Support for various programming languages"; Types: complete recommended custom +Name: "ps_print"; Description: "ps-print: Printing functions and utilities"; Types: complete custom +Name: "psgml"; Description: "psgml: Validated HTML/SGML editing"; Types: complete custom +Name: "python_modes"; Description: "python-modes: Python support"; Types: complete custom +Name: "re_builder"; Description: "re-builder: Build regular expressions"; Types: complete custom +Name: "reftex"; Description: "reftex: LaTeX cross-references and citations"; Types: complete custom +Name: "ruby_modes"; Description: "ruby-modes: Ruby support"; Types: complete custom +Name: "sasl"; Description: "sasl: Simple Authentication and Security Layer (SASL) library"; Types: complete custom +Name: "scheme"; Description: "scheme: Front-end support for Inferior Scheme"; Types: complete custom +Name: "semantic"; Description: "semantic: Semantic bovinator (Yacc/Lex for XEmacs)"; Types: complete recommended custom +Name: "sgml"; Description: "sgml: SGML/Linuxdoc-SGML editing"; Types: complete custom +Name: "sh_script"; Description: "sh-script: Support for editing shell scripts"; Types: complete recommended custom +Name: "sieve"; Description: "sieve: Manage Sieve email filtering scripts"; Types: complete custom +Name: "sounds_wav"; Description: "sounds-wav: XEmacs Microsoft sound files"; Types: complete recommended custom +Name: "speedbar"; Description: "speedbar: Provides a separate frame with convenient references"; Types: complete recommended custom +Name: "supercite"; Description: "supercite: Citation tool for news & mail messages"; Types: complete custom +Name: "texinfo"; Description: "texinfo: XEmacs TeXinfo support"; Types: complete minimal recommended custom +Name: "text_modes"; Description: "text-modes: Miscellaneous support for editing text files"; Types: complete recommended custom +Name: "textools"; Description: "textools: Miscellaneous TeX support"; Types: complete custom +Name: "time"; Description: "time: Display time & date on the modeline"; Types: complete recommended custom +Name: "tramp"; Description: "tramp: Remote shell-based file editing"; Types: complete custom +Name: "vc"; Description: "vc: Version Control for Free systems"; Types: complete custom +Name: "vhdl"; Description: "vhdl: Support for VHDL"; Types: complete custom +Name: "viper"; Description: "viper: VI emulation support"; Types: complete custom +Name: "vm"; Description: "vm: An Emacs mailer"; Types: complete custom +Name: "w3"; Description: "w3: A Web browser"; Types: complete custom +Name: "x_symbol"; Description: "x-symbol: Semi WYSIWYG for LaTeX and HTML"; Types: complete custom +Name: "xemacs_base"; Description: "xemacs-base: Basic XEmacs support"; Types: complete minimal recommended custom; Flags: fixed +Name: "xemacs_devel"; Description: "xemacs-devel: Emacs Lisp developer support"; Types: complete recommended custom +Name: "xetla"; Description: "xetla: XEmacs support for GNU/arch (tla)"; Types: complete custom +Name: "xslide"; Description: "xslide: XSL editing support"; Types: complete custom +Name: "xslt_process"; Description: "xslt-process: XSLT processing support"; Types: complete custom + +[INI] + +[Icons] +Name: "{group}\XEmacs-{#XEmacsVersion}"; Filename: "{app}\XEmacs-{#XEmacsVersion}\i586-pc-win32\xemacs.exe" +Name: "{group}\{cm:UninstallProgram,XEmacs-{#XEmacsVersion}}"; Filename: "{uninstallexe}" +; WorkingDir corresponds to the 'Start in' property. +Name: "{userdesktop}\XEmacs-{#XEmacsVersion}"; Filename: "{app}\XEmacs-{#XEmacsVersion}\i586-pc-win32\xemacs.exe"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\XEmacs-{#XEmacsVersion}"; Filename: "{app}\XEmacs-{#XEmacsVersion}\i586-pc-win32\xemacs.exe"; Tasks: quicklaunchicon + +[Run] +; Unpack and delete the package tarballs +Filename: "{app}\xemacs-packages\unpack.cmd"; WorkingDir: "{app}\xemacs-packages"; Flags: runhidden; AfterInstall: AfterInstall + +[UninstallDelete] + +[Code] +Const + SiteStartFooter = ';;; End of XEmacs_Setup addition' + #10; + SiteStartHeader = #10 + ';;; Lines added by XEmacs_Setup' + #10; + SubKeyName = 'Software\XEmacs\XEmacs'; + ValueName = 'EMACSPACKAGEPATH'; + +// Internal Declarations +procedure AfterInstall(); forward; +procedure CleanupPackagePath(); forward; +procedure CreateSiteStart(); forward; +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); forward; +procedure RemovePackagePathSetting(RootKey: Integer); forward; +procedure RemoveSiteStartModifications(); forward; + + +procedure AfterInstall(); +begin + CreateSiteStart; + CleanupPackagePath; +end; + +procedure CleanupPackagePath(); +begin + RemovePackagePathSetting(HKEY_CURRENT_USER); + RemovePackagePathSetting(HKEY_LOCAL_MACHINE); +end; + +// Create a site-start.el file to allow easy package downloading +procedure CreateSiteStart(); +var + Contents: String; + FtpExe: String; + HeaderRequired, FooterRequired: Boolean; + InsertPos: Integer; + InstallBase: String; + Payload: String; + SiteStart: String; +begin + + // Here's what we're going to add to lisp\site-start.el: + // ;;; Lines added by XEmacs_Setup + // (setq package-get-package-index-file-location "C:/Program Files/XEmacs") + // (setq package-get-remote '("ftp.xemacs.org" "pub/xemacs/packages")) + // (setq efs-ftp-program-name "C:/WINDOWS/system32/ftp.exe") + // ;;; End of XEmacs_Setup addition + + SiteStart := ExpandConstant('{app}') + '\site-packages'; + CreateDir(SiteStart); + SiteStart := SiteStart + '\lisp'; + CreateDir(SiteStart); + SiteStart := SiteStart + '\site-start.el'; + + // Optimize for the most common cases: either site-start.el does not contain anything related to XEmacs setup + // or site-start.el contains the entire text verbatim. + + // Convert separators from backslash to slash + InstallBase := ExpandConstant('{app}'); + StringChange(InstallBase, '\', '/'); + FtpExe := ExpandConstant('{syswow64}') + '\ftp.exe'; + StringChange(FtpExe, '\', '/'); + Payload := '(setq package-get-package-index-file-location "' + InstallBase + '")' + #10 + + '(setq package-get-remote ' + Chr(39) + '("ftp.xemacs.org" "pub/xemacs/packages"))' + #10 + '(setq efs-ftp-program-name "' + FtpExe + '")' + #10; + + // File is non-existant - write header, payload and footer + if NOT LoadStringFromFile(SiteStart, Contents) then + begin + SaveStringToFile(SiteStart, SiteStartHeader + Payload + SiteStartFooter, False); + end else + begin + + // Pos > 0 indicates that the full text already appears verbatim in the site-start.el file, so do nothing in that case + if Pos(SiteStartHeader + Payload + SiteStartFooter, Contents) = 0 then + begin + FooterRequired := True; + HeaderRequired := True; + InsertPos := Pos(SiteStartHeader, Contents); + if InsertPos > 0 then + begin + HeaderRequired := False + InsertPos := Pos(SiteStartFooter, Contents); + if InsertPos > 0 then + begin + FooterRequired := False; + end else + begin + InsertPos := Length(Contents); + end; + end; + + if InsertPos = 0 then InsertPos := 1; + + if HeaderRequired then + begin + Insert(SiteStartHeader, Contents, InsertPos); + InsertPos := InsertPos + Length(SiteStartHeader); + end; + Insert(Payload, Contents, InsertPos); + InsertPos := InsertPos + Length(Payload); + + if FooterRequired then + Insert(SiteStartFooter, Contents, InsertPos); + + SaveStringToFile(SiteStart, Contents, False); + end; + end; +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + case CurUninstallStep of + usUninstall: + begin + RemoveSiteStartModifications; + end; + end; +end; + +procedure RemovePackagePathSetting(RootKey: Integer); +var + RootKeyName: String; + Value: String; +begin + RootKeyName := 'Unknown Root'; + case RootKey of + HKEY_CURRENT_USER: + RootKeyName := 'HKEY_CURRENT_USER'; + HKEY_LOCAL_MACHINE: + RootKeyName := 'HKEY_LOCAL_MACHINE'; + end; + // Check to see if the key exists in the specified registry root + if RegQueryStringValue(RootKey, SubKeyName, ValueName, Value) then + begin + // Allow the user to delete it + if MsgBox('Do you want to delete the registry key ' + RootKeyName + '\' + SubKeyName + '\' + ValueName + '?' #13 'Currently this key has the value "' + Value + '".' #13#13 'If you do not delete this registry key, then the packages installed from this setup kit will not be found when XEmacs runs.' #13, mbConfirmation, MB_YESNO) = IDYES then + begin + RegDeleteValue(RootKey, SubKeyName, ValueName); + end; + end; +end; + + +procedure RemoveSiteStartModifications(); +var + Contents: String; + Footer, Header: Integer; + SiteStart: String; +begin + SiteStart := ExpandConstant('{app}') + '\site-packages\lisp\site-start.el'; + if LoadStringFromFile(SiteStart, Contents) then + begin + Header := Pos(SiteStartHeader, Contents); + if Header > 0 then + begin + Footer := Pos(SiteStartFooter, Contents); + if (Footer > 0) AND (Footer > Header) then + begin + Footer := Footer + Length(SiteStartFooter); + Delete(Contents, Header, Footer-Header); + SaveStringToFile(SiteStart, Contents, False); + end; + end; + end; +end; + diff --git a/nt/config.inc.samp b/nt/config.inc.samp index bd49704..397dac7 100644 --- a/nt/config.inc.samp +++ b/nt/config.inc.samp @@ -4,7 +4,8 @@ INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING) -PACKAGE_PREFIX=c:\Program Files\XEmacs +# Set this if your packages are installed in an unusal place. +#PACKAGE_PREFIX=c:\Program Files\XEmacs ############################################################################ diff --git a/nt/xemacs.mak b/nt/xemacs.mak index e1f5ad5..13a88d9 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -108,17 +108,24 @@ INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING) !if !defined(HAVE_MULE) HAVE_MULE=0 !endif + +# If PACKAGE_PATH was defined, use it. If PACKAGE_PATH was not defined, +# but PACKAGE_PREFIX was, use PACKAGE_PREFIX to generate a package path. +# If neither PACKAGE_PATH nor PACKAGE_PREFIX was defined, +# do not define a package path. !if !defined(PACKAGE_PATH) -! if !defined(PACKAGE_PREFIX) -PACKAGE_PREFIX=c:\Program Files\XEmacs -! endif -! if $(HAVE_MULE) +! if defined(PACKAGE_PREFIX) +! if $(HAVE_MULE) PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\mule-packages;$(PACKAGE_PREFIX)\xemacs-packages -! else +! else PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages +! endif ! endif !endif +!if defined(PACKAGE_PATH) PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)" +!endif + !if !defined(HAVE_MS_WINDOWS) HAVE_MS_WINDOWS=1 !endif @@ -541,8 +548,10 @@ CONFIG_VALUES = $(LIB_SRC)\config.values !endif !if [echo LISPDIR>>$(CONFIG_VALUES) && echo "$(MAKEDIR:\=\\)\\$(LISP:\=\\)">>$(CONFIG_VALUES)] !endif +!if defined(PATH_PACKAGEPATH) # PATH_PACKAGEPATH is already a quoted string. -!if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)] +! if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)] +! endif !endif # Inferred rule @@ -875,8 +884,10 @@ TEMACS_CPP_FLAGS=-c \ $(EMACS_BETA_VERSION) \ $(EMACS_PATCH_LEVEL) \ -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \ - -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \ - -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\" +!if defined(PATH_PACKAGEPATH) + -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\" \ +!endif + -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" !if $(HAVE_X_WINDOWS) TEMACS_X_OBJS=\ @@ -1363,7 +1374,11 @@ docfile :: $(DOC) $(DOC): $(LIB_SRC)\make-docfile.exe $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(DOC_SRC8) $(DOC_SRC9) $(DOC_SRC10) $(DOC_SRC11) if exist $(DOC) del $(DOC) +!if defined(PACKAGE_PATH) set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) +!else + set EMACSBOOTSTRAPLOADPATH=$(LISP) +!endif set EMACSBOOTSTRAPMODULEPATH=$(MODULES) $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1) @@ -1379,7 +1394,11 @@ $(DOC): $(LIB_SRC)\make-docfile.exe $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SR $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC11) update-elc: +!if defined(PACKAGE_PATH) set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) +!else + set EMACSBOOTSTRAPLOADPATH=$(LISP) +!endif set EMACSBOOTSTRAPMODULEPATH=$(MODULES) $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\update-elc.el @@ -1393,7 +1412,11 @@ $(TEMACS_DIR)\NEEDTODUMP : $(PROGNAME) : $(TEMACS) $(TEMACS_DIR)\NEEDTODUMP @echo >$(TEMACS_DIR)\SATISFIED cd $(TEMACS_DIR) +!if defined(PACKAGE_PATH) set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) +!else + set EMACSBOOTSTRAPLOADPATH=$(LISP) +!endif set EMACSBOOTSTRAPMODULEPATH=$(MODULES) $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\loadup.el dump !if $(USE_PORTABLE_DUMPER) @@ -1435,6 +1458,7 @@ install: all @xcopy /e /q $(XEMACS)\etc "$(INSTALL_DIR)\etc\" @xcopy /e /q $(XEMACS)\info "$(INSTALL_DIR)\info\" @xcopy /e /q $(XEMACS)\lisp "$(INSTALL_DIR)\lisp\" +!if defined(PACKAGE_PREFIX) @echo Making skeleton package tree in $(PACKAGE_PREFIX) ... @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\site-packages\" $(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder" @@ -1442,6 +1466,7 @@ install: all $(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder" @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\" $(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder" +!endif $(DEL) PlaceHolder mostlyclean: @@ -1525,7 +1550,9 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) configured for `$(EMACS_CONFI Using compiler "$(CC) $(CFLAGS)". !endif Installing XEmacs in "$(INSTALL_DIR:\=\\)". +!if defined(PATH_PACKAGEPATH) Package path is $(PATH_PACKAGEPATH). +!endif !if $(INFODOCK) Building InfoDock. !endif diff --git a/src/ChangeLog b/src/ChangeLog index f6a39d7..15cabab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5902,6 +5902,300 @@ (Vcharset_thai_tis620): Likewise. (Vcharset_katakana_jisx0201): Likewise. +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2007-08-14 Marcus Crestani <crestani@xemacs.org> + + * s/sol2.h: Fix for GCC lossage not needed with SunOS 5.10. + +2007-02-17 Stephen J. Turnbull <stephen@xemacs.org> + + * glyphs-eimage.c (png_instantiate_unwind): Avoid recursion. + (png_instantiate): Initialize setjmp_buffer early, and avoid + recursive entry to error handler. + +2007-06-23 Stephen J. Turnbull <stephen@xemacs.org> + + * linuxplay.c (linux_play_data_or_file): More 64-bit tweaking, and + a typo fix. + +2007-05-12 Aidan Kehoe <kehoea@parhasard.net> + + * event-Xt.c (x_reset_modifier_mapping): + * event-gtk.c (gtk_reset_modifier_mapping): + Zero out the device's modifier map once we've freed it, to prevent + a double free on a re-entrant call. + +2007-05-17 Vin Shelton <acs@xemacs.org> + + * linuxplay.c (linux_play_data_or_file): Fix playing sound on + 64-bit linux. Patch from Hans de Graaff. + +2007-05-02 Vin Shelton <acs@xemacs.org> + + * dumper.c (pdump): Don't close pdump_fd (already closed by + fclose() call. Patch from Steve Higham. + * callproc.c (Fold_call_process_internal): Don't close fd1 if it's + already closed. Patch inspired by Steve Higham. + +2007-05-01 Vin Shelton <acs@xemacs.org> + + * nt.c (mswindows_stat): Tie _S_IEXEC permission to read access. + (mswindows_fstat): Ditto. + * sysfile.h: Under Windows, define X_OK to be the same as R_OK. + +2007-02-08 Adrian Aichner <adrian@xemacs.org> + + * postgresql.c: Update Steve Baur's email address by his request. + * postgresql.h: Ditto. + +2007-01-04 Vin Shelton <acs@xemacs.org> + + * fileio.c (check_writable): Check old-style readonly bit only for + non-directories. + +2006-12-25 Benson I. Margulies <benson@dchbk.us> + + * src/fileio.c (check_writable): + Cope with the fact that the read-only attribute trumps Windows NTFS + ACLS. + + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-12-08 Nelson Ferreira <njsf@sxemacs.org> + + * src/fns.c (XMALLOC_OR_ALLOCA,free_malloced_ptr,XMALLOC_UNBIND): + relocated the definitions to be used sooner in file. + (concat,plists_differ,mapcar1,Fmapconcat,Fmapcar): Use + XMALLOC_OR_ALLOCA macro instead of alloca to prevent stack + overflow. + +2006-11-29 Aidan Kehoe <kehoea@parhasard.net> + + * sound.c (init_native_sound): + Only X11 and GTK devices can possibly not be on the console of the + associated machine. Fixes a crash when init_native_sound is called + on a msprinter device. + +2006-11-14 Stephen J. Turnbull <stephen@xemacs.org> + + * buffer.c (buffer-file-name): Document invariant. + (buffer-file-truename): Sync wording to buffer-file-name. + Thanks to Nelson Ferreira <nelson.ferreira@ieee.org> for report + and discussion. + +2006-11-19 Benson Margulies <benson@dchbk.us> + + * fileio.c: Add code to use full Win32 API to check for write + access. Win32 has the general design policy that you aren't + supposed to ask this question, since security checks change + depending on asynchronous processes. Nonetheless, there is a way, + by acting as if we are a server doing interpretive access + control. + +2006-07-31 Aidan Kehoe <kehoea@parhasard.net> + + * bytecode.c: Use xnew_array instead of alloca. + +2006-07-04 Vin Shelton <acs@xemacs.org> + + * redisplay-msw.c: Fix tiny, but crucial typo. + +2006-06-22 Jerry James <james@xemacs.org> + + * EmacsShell-sub.c (ChangeManaged): + * device-x.c (x_IO_error_handler): Do not dereference d if it is + NULL. + * dgif_lib.c (DGifCloseFile): Do not dereference GifFile before + checking if it is NULL. Also fix a memory leak. + * dialog-x.c (dbox_selection_callback): Ensure f is non-NULL, then + dereference it, not the other way around. + * dumper.c (pdump_register_object): Fix off-by-one array bounds + overflow check. + * dumper.c (pdump_register_struct): Ditto. + * editfns.c (Ftemp_directory): Don't let a copy from (long) path + to (short) warnpath overflow warnpath. + * extents.c (detach_all_extents): Call extent_list_delete_all with + a non-NULL parameter only. + * glyphs-widget.c (widget_query_geometry): Guard against possibly + NULL width and height. + * input-method-xlib.c (XIM_SetGeometry): Do not dereference f or + xic before checking if they are NULL. + * keymap.c (where_is_recursive_mapper): Don't throw away the newly + allocated array. + * md5.c (Fmd5): Check whether Lstream_read encountered an error. + * nas.c (Err): Fix a memory leak. + * redisplay-gtk.c (gtk_output_display_block): Fix a Dynarr leak. + Don't create the buffer if there is nothing to do. + * redisplay-msw.c (mswindows_output_display_block): Ditto. + * redisplay-output.c (redisplay_output_layout): Ditto. + * redisplay-tty.c (tty_output_display_block): Ditto. + * redisplay-x.c (x_output_display_block): Ditto. + * scrollbar-gtk.c (gtk_free_scrollbar_instance): Do not + dereference instance->scrollbar_data if it is NULL. + * scrollbar-x.c (x_free_scrollbar_instance): Ditto. + * scrollbar-msw.c (mswindows_free_scrollbar_instance): Ditto, but + for sb->scrollbar_data. + * sound.c (init_native_sound): Avoid a buffer overflow by + allocating a buffer with the appropriate size. + +2006-05-08 Stephen J. Turnbull <stephen@xemacs.org> + + * EmacsShell-sub.c (RootGeometryManager): + Change garbage to useful messages under DEBUG_GEOMETRY_MANAGEMENT. + Based on a suggestion by Francois L'Archeveque. + +2006-03-21 Malcolm Purvis <malcolmp@xemacs.org> + + * regex.c: Bump INIT_FAILURE_ALLOC and re_max_failures to the + current values found in GNU Emacs. + +2006-03-17 Vin Shelton <acs@xemacs.org> + + * dialog-msw.c (handle_directory_dialog_box): Don't declare + Q_title here. LOCAL_FILE_FORMAT_TO_TSTR requires an lvalue. + + * glyphs-msw.c (read_bitmap_data): change 'initialized' to + 'hex_initialized' because it conflicts with 'initialized' in + lisp.h. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2006-01-20 Rick Rankin <rrankin1424-xemacs@yahoo.com> + + * sysdir.h: Workaround missing d_ino field from 'struct dirent'. + +2005-12-24 Aidan Kehoe <kehoea@parhasard.net> + + * objects-gtk.c (MAX_FONT_COUNT): Increase MAX_FONT_COUNT from + 5000 to INT_MAX. + +2005-12-05 Dr. Volker Zell <Dr.Volker.Zell@oracle.com> + + * database.c: Suppress compiler warning under Cygwin. + * database.c: Removed __FreeBSD__ check, should be handled by + HAVE_U_xxx_T defines. + +2005-12-18 Malcolm Purvis <malcolmp@xemacs.org> + + * console.c (stuff_buffered_input): Compile body only if + HAVE_TTY. + +2005-05-10 Aidan Kehoe <kehoea@parhasard.net> + + * callproc.c: #include sysdir.h, so that any appropriate Mule + magic happens with the chdir() call when calling a subprocess. + +2005-12-06 Aidan Kehoe <kehoea@parhasard.net> + + * mule-ccl.c (POSSIBLE_LEADING_BYTE_P): Add. + * mule-ccl.c: Check that a character set exists before using it + to create a character. + +2005-12-06 Vin Shelton <acs@xemacs.org> + + * objects-x.c (MAX_FONT_COUNT): Increase MAX_FONT_COUNT from 5000 + to INT_MAX. + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + +2005-11-27 Kean Johnston <kean@armory.com> + + * redisplay-tty.c (set_tty_modes): + (reset_tty_modes): disable auto-margins if the terminal supports + them. + (init_tty_for_redisplay): fix cursor shape. + +2005-04-05 Aidan Kehoe <kehoea@parhasard.net> + + * mule-ccl.c (ccl_driver): Calculate the charset and position code + for control-1 characters properly, both when reading multibyte + characters and writing them. + +2005-03-12 Aidan Kehoe <kehoea@parhasard.net> + + * config.h.in: Make HAVE_XTREGISTERDRAWABLE available. + * select-x.c (x_reply_selection_request): Use it; fix the bug we + were seeing with incremental selection transfer failing. + +2005-11-26 Vin Shelton <acs@xemacs.org> + + * callproc.c (Fold_call_process_internal): Create the buffer if it + does not already exist. The original patch came from Ben Wing in + http://list-archive.xemacs.org/xemacs-patches/200205/msg00117.html + +2002-05-13 Adrian Aichner <adrian@xemacs.org> + + * callproc.c: Process-related docstring improvements spurred by + Norbert Koch. + +2005-11-25 Vin Shelton <acs@xemacs.org> + + * depend: Regenerated. + +2005-07-11 Malcolm Purvis <malcolmp@xemacs.org> + + * glyphs-gtk.c: Rename a local static variable because gcc 4.0 + says it clashes with a global with the same name. + +2005-07-11 Atanu Ghosh <atanu@icsi.berkeley.edu> + + * sysdll.c (dll_open): Under MacOS X return NULL under the + filename is NULL. Fixes problems finding local symbols under 10.4 + (Tiger) + +2005-11-15 Dr. Volker Zell <Dr.Volker.Zell@oracle.com> + + * config.h.in: New HAVE_U_INT*_T defines. + + * database.c: Only use u_int*_t typedefs if not already + defined. + +2005-04-07 15:08 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> + + * src/process-unix.c (unix_open_network_stream): moved + 'portbuf' buffer out of an inner block as it is used in the + entire function. With gcc4, the stack may get corrupted + after leaving this block. This patches adjusts the size of + the used buffer also; static '128' bytes are far too much + currently and might not suffice for future architectures + (e.g. for 512 bit ones ;)). Instead of, use only the really + required space (max octets * ln(256)/ln(10) chars + space + for '\0' and the sign) + +2005-04-08 Aidan Kehoe <kehoea@parhasard.net> + + * callproc.c: Include sysdir.h, so any necessary Mule processing + is done on the current directory name before starting a new + process. + +2005-04-06 Stephen J. Turnbull <stephen@xemacs.org> + + * chartab.c (Fchar_table_p): + (Fget_range_char_table): + (Fput_char_table): + (Fmap_char_table): + Describe range representation and fix typo. + +2005-02-12 Vin Shelton <acs@xemacs.org> + + * emacs.c (shut_down_emacs): Advise users to send email to the + xemacs-beta list instead of crashes@xemacs.org. + +2005-02-03 David Evers <extsw@appliedgenerics.com> + + * process-unix.c (unix_send_process): Flush the last chunk, even + when the pipe is blocked. + 2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released diff --git a/src/EmacsShell-sub.c b/src/EmacsShell-sub.c index 81c538a..1a59ac3 100644 --- a/src/EmacsShell-sub.c +++ b/src/EmacsShell-sub.c @@ -335,11 +335,16 @@ RootGeometryManager (Widget gw, result == XtGeometryAlmost ? "XtGeometryAlmost" : "XtGeometryDone"); if (reply->request_mode & CWWidth) - printf ("width returned;"); + printf ("width returned was %d%s", + reply->width, + reply->request_mode & CWHeight ? "; " : ".\n"); if (reply->request_mode & CWHeight) - printf ("height returned;"); - printf ("\n"); - printf (" resulting shell size: %d %d\n", reply->width, reply->height); + printf ("height returned was %d.\n", reply->height); + /* #### does this also need to depend on the result? + With XtGeometryYes there doesn't seem to be a useful reply object. */ + printf (" resulting shell size: %d %d\n", + reply->request_mode & CWWidth ? reply->width : w->core.width, + reply->request_mode & CWHeight ? reply->height : w->core.height); printf ("----------\n"); fflush (stdout); #endif @@ -366,11 +371,11 @@ ChangeManaged (Widget wid) for (i = 0; i < w->composite.num_children; i++) { if (XtIsManaged(w->composite.children[i])) { child = w->composite.children[i]; + update_size_hints_internal (w, child->core.width, + child->core.height); break; } } - - update_size_hints_internal (w, child->core.width, child->core.height); } /* call the real ChangeManaged */ diff --git a/src/buffer.c b/src/buffer.c index 2487541..e7f8a4c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2841,6 +2841,8 @@ It may not be a list of functions. DEFVAR_BUFFER_LOCAL ("buffer-file-name", filename /* Name of file visited in current buffer, or nil if not visiting a file. Each buffer has its own value of this variable. +Code that changes this variable must maintain the invariant +`(equal buffer-file-truename (file-truename buffer-file-name))'. */ ); #if 0 /* FSFmacs */ @@ -2853,12 +2855,11 @@ Each buffer has its own value of this variable. #endif /* FSFmacs */ DEFVAR_BUFFER_LOCAL ("buffer-file-truename", file_truename /* -The real name of the file visited in the current buffer, -or nil if not visiting a file. This is the result of passing -buffer-file-name to the `file-truename' function. Every buffer has -its own value of this variable. This variable is automatically -maintained by the functions that change the file name associated -with a buffer. +The real name of the file visited in the current buffer, or nil if not +visiting a file. This is the result of passing `buffer-file-name' to the +`file-truename' function. Every buffer has its own value of this variable. +Code that changes the file name associated with a buffer maintains the +invariant `(equal buffer-file-truename (file-truename buffer-file-name))'. */ ); DEFVAR_BUFFER_LOCAL ("buffer-auto-save-file-name", auto_save_file_name /* diff --git a/src/bytecode.c b/src/bytecode.c index fa6b469..72f5d62 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1624,7 +1624,7 @@ optimize_byte_code (/* in */ int from; int to; }; - struct jump * const jumps = alloca_array (struct jump, comfy_size); + struct jump * const jumps = xnew_array (struct jump, comfy_size); struct jump *jumps_ptr = jumps; Opbyte *program_ptr = program; @@ -1868,6 +1868,7 @@ optimize_byte_code (/* in */ /* *program_ptr++ = 0; */ *program_length = program_ptr - program; + xfree(jumps); } /* Optimize the byte code and store the optimized program, only diff --git a/src/callproc.c b/src/callproc.c index 9b39b48..8272ca9 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -47,7 +47,9 @@ Boston, MA 02111-1307, USA. */ #include "systime.h" #include "sysproc.h" +#include "sysdir.h" #include "sysfile.h" /* Always include after sysproc.h */ +#include "sysdir.h" #include "syssignal.h" /* Always include before systty.h */ #include "systty.h" @@ -169,6 +171,8 @@ Arguments are The program's input comes from file INFILE (nil means `/dev/null'). Insert output in BUFFER before point; t means current buffer; nil for BUFFER means discard it; 0 means discard and don't wait. +If BUFFER is a string, then find or create a buffer with that name, +then insert the output in that buffer, before point. BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, REAL-BUFFER says what to do with standard output, as above, while STDERR-FILE says what to do with standard error in the child. @@ -288,7 +292,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you || ZEROP (buffer))) { Lisp_Object spec_buffer = buffer; - buffer = Fget_buffer (buffer); + buffer = Fget_buffer_create (buffer); /* Mention the buffer name for a better error message. */ if (NILP (buffer)) CHECK_BUFFER (spec_buffer); @@ -395,9 +399,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you } #endif } - /* Close STDERR into the parent process. We no longer need it. */ - if (fd_error >= 0) - close (fd_error); #else /* not WIN32_NATIVE */ pid = fork (); @@ -416,17 +417,18 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you child_setup (filefd, fd1, fd_error, new_argv, (char *) XSTRING_DATA (current_dir)); } - if (fd_error >= 0) - close (fd_error); - #endif /* not WIN32_NATIVE */ environ = save_environ; + /* Close STDERR into the parent process. We no longer need it. */ + if (fd_error >= 0) + close (fd_error); + /* Close most of our fd's, but not fd[0] since we will use that to read input from. */ close (filefd); - if (fd1 >= 0) + if ((fd1 >= 0) && (fd1 != fd_error)) close (fd1); } diff --git a/src/chartab.c b/src/chartab.c index 04c48a3..22313a1 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -4,7 +4,7 @@ Copyright (C) 1995, 1996 Ben Wing. Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. - Copyright (C) 1999,2000,2001,2002,2003,2004,2005 MORIOKA Tomohiko + Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006 MORIOKA Tomohiko This file is part of XEmacs. @@ -1721,15 +1721,17 @@ once per character). When Mule support exists, the types of ranges that can be assigned values are --- all characters +-- all characters (represented by t) -- an entire charset --- a single row in a two-octet charset +-- a single row in a two-octet charset (represented by a vector of two + elements: a two-octet charset and a row number; the row must be an + integer, not a character) -- a single character When Mule support is not present, the types of ranges that can be assigned values are --- all characters +-- all characters (represented by t) -- a single character To create a char table, use `make-char-table'. @@ -2231,8 +2233,11 @@ Find value for CHARACTER in CHAR-TABLE. } DEFUN ("get-range-char-table", Fget_range_char_table, 2, 3, 0, /* -Find value for a range in CHAR-TABLE. +Find value for RANGE in CHAR-TABLE. If there is more than one value, return MULTI (defaults to nil). + +Valid values for RANGE are single characters, charsets, a row in a +two-octet charset, and all characters. See `put-char-table'. */ (range, char_table, multi)) { @@ -2627,8 +2632,9 @@ one of the following: -- t (all characters are affected) -- A charset (only allowed when Mule support is present) --- A vector of two elements: a two-octet charset and a row number - (only allowed when Mule support is present) +-- A vector of two elements: a two-octet charset and a row number; the row + must be an integer, not a character (only allowed when Mule support is + present) -- A single character VALUE must be a value appropriate for the type of CHAR-TABLE. @@ -3103,8 +3109,8 @@ slow_map_char_table_fun (struct chartab_range *range, } DEFUN ("map-char-table", Fmap_char_table, 2, 3, 0, /* -Map FUNCTION over entries in CHAR-TABLE, calling it with two args, -each key and value in the table. +Map FUNCTION over CHAR-TABLE until it returns non-nil; return that value. +FUNCTION is called with two arguments, each key and entry in the table. RANGE specifies a subrange to map over and is in the same format as the RANGE argument to `put-range-table'. If omitted or t, it defaults to @@ -4170,12 +4176,18 @@ Load values of ATTRIBUTE into database file. #endif /* HAVE_CHISE */ DEFUN ("map-char-attribute", Fmap_char_attribute, 2, 3, 0, /* -Map FUNCTION over entries in ATTRIBUTE, calling it with two args, -each key and value in the table. +Map FUNCTION over ATTRIBUTE until it returns non-nil; return that value. +FUNCTION is called with two arguments, each key and entry in the table. -RANGE specifies a subrange to map over and is in the same format as -the RANGE argument to `put-range-table'. If omitted or t, it defaults to +RANGE specifies a subrange to map over. If omitted or t, it defaults to the entire table. + +Both RANGE and the keys passed to FUNCTION are in the same format as the +RANGE argument to `put-char-table'. N.B. This function does NOT map over +all characters in RANGE, but over the subranges that have been assigned to. +Thus this function is most suitable for searching a char-table, or for +populating one char-table based on the contents of another. The current +implementation does not coalesce ranges all of whose values are the same. */ (function, attribute, range)) { diff --git a/src/config.h.in b/src/config.h.in index bbeaf78..2a68db3 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -205,6 +205,7 @@ void *alloca (); #undef THIS_IS_X11R6 #undef HAVE_XCONVERTCASE +#undef HAVE_XTREGISTERDRAWABLE #undef HAVE_BALLOON_HELP @@ -422,6 +423,15 @@ void *alloca (); /* Compile in support for DBM databases? May require libgdbm or libdbm. */ #undef HAVE_DBM +/* Define to 1 if the system has the type `u_int8_t'. */ +#undef HAVE_U_INT8_T +/* Define to 1 if the system has the type `u_int16_t'. */ +#undef HAVE_U_INT16_T +/* Define to 1 if the system has the type `u_int32_t'. */ +#undef HAVE_U_INT32_T +/* Define to 1 if the system has the type `u_int64_t'. */ +#undef HAVE_U_INT64_T + /* Compile in support for Berkeley DB style databases? May require libdb. */ #undef HAVE_BERKELEY_DB /* Full #include file path for Berkeley DB's db.h */ diff --git a/src/console-tty.h b/src/console-tty.h index ba05621..cf9dd84 100644 --- a/src/console-tty.h +++ b/src/console-tty.h @@ -82,6 +82,8 @@ struct tty_console character info */ unsigned int flow_control :1; /* Nonzero means use ^S/^Q as cretinous flow control. */ + unsigned int auto_margins :1; /* Nonzero means terminal wraps when + writing to the last column */ int standout_width; /* # of spaces printed when change to standout mode */ int underline_width; /* # of spaces printed when @@ -175,6 +177,9 @@ struct tty_console const char *keypad_off; /* rmkx, ke */ const char *orig_pair; /* op, op */ + + const char *disable_auto_margins; /* rmam, RA */ + const char *enable_auto_margins; /* smam, SA */ } sd; /* costs of various operations */ diff --git a/src/console.c b/src/console.c index 789a477..0840f8a 100644 --- a/src/console.c +++ b/src/console.c @@ -882,7 +882,7 @@ void stuff_buffered_input (Lisp_Object stuffstring) { /* stuff_char works only in BSD, versions 4.2 and up. */ -#if defined (BSD) +#if defined (BSD) && defined(HAVE_TTY) if (!CONSOLEP (Vcontrolling_terminal) || !CONSOLE_LIVE_P (XCONSOLE (Vcontrolling_terminal))) return; @@ -908,7 +908,7 @@ stuff_buffered_input (Lisp_Object stuffstring) stuff_char (XCONSOLE (Vcontrolling_terminal), *kbd_fetch_ptr++); } # endif -#endif /* BSD */ +#endif /* BSD && HAVE_TTY */ } DEFUN ("suspend-console", Fsuspend_console, 0, 1, "", /* diff --git a/src/database.c b/src/database.c index 3e70dc3..2edbee4 100644 --- a/src/database.c +++ b/src/database.c @@ -43,13 +43,21 @@ Boston, MA 02111-1307, USA. */ /* glibc 2.1 doesn't have this problem with DB 2.x */ #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) #ifdef HAVE_INTTYPES_H +#ifndef __BIT_TYPES_DEFINED__ #define __BIT_TYPES_DEFINED__ +#endif #include <inttypes.h> -#ifndef __FreeBSD__ +#if !HAVE_U_INT8_T typedef uint8_t u_int8_t; +#endif +#if !HAVE_U_INT16_T typedef uint16_t u_int16_t; +#endif +#if !HAVE_U_INT32_T typedef uint32_t u_int32_t; +#endif #ifdef WE_DONT_NEED_QUADS +#if !HAVE_U_INT64_T typedef uint64_t u_int64_t; #endif #endif /* WE_DONT_NEED_QUADS */ diff --git a/src/depend b/src/depend index b765434..118e708 100644 --- a/src/depend +++ b/src/depend @@ -91,13 +91,14 @@ blocktype.o: $(LISP_H) blocktype.h buffer.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h conslots.h console.h database.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h process.h redisplay.h scrollbar.h select.h specifier.h syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h database.h elhash.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h syntax.h callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h database.h elhash.h events.h insdel.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h systime.h window.h winslots.h -callproc.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h database.h elhash.h file-coding.h insdel.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h nt.h process.h redisplay.h scrollbar.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h window.h winslots.h +callproc.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h database.h elhash.h file-coding.h insdel.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h ndir.h nt.h process.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h window.h winslots.h casefiddle.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h database.h elhash.h insdel.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h syntax.h casetab.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h database.h elhash.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h chartab.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h database.h elhash.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h syntax.h cm.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-tty.h console.h database.h device.h elhash.h frame.h frameslots.h glyphs.h gui.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h syssignal.h systty.h toolbar.h window.h winslots.h cmdloop.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h conslots.h console.h database.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h cmds.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h database.h elhash.h insdel.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h syntax.h +concord.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h database.h elhash.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h sysfile.h console-stream.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-stream.h console-tty.h console.h database.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h console.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-tty.h console.h database.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h data.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h database.h elhash.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h sysfloat.h syssignal.h diff --git a/src/device-x.c b/src/device-x.c index 17ef7e2..540e407 100644 --- a/src/device-x.c +++ b/src/device-x.c @@ -1161,8 +1161,10 @@ x_IO_error_handler (Display *disp) Xlib might just decide to exit(). So we mark the offending console for deletion and throw to top level. */ if (d) - enqueue_magic_eval_event (io_error_delete_device, dev); - DEVICE_X_BEING_DELETED (d) = 1; + { + enqueue_magic_eval_event (io_error_delete_device, dev); + DEVICE_X_BEING_DELETED (d) = 1; + } Fthrow (Qtop_level, Qnil); return 0; /* not reached */ diff --git a/src/dgif_lib.c b/src/dgif_lib.c index 6d91c90..df67571 100644 --- a/src/dgif_lib.c +++ b/src/dgif_lib.c @@ -366,10 +366,11 @@ void DGifGetExtensionNext(GifFileType *GifFile, GifByteType **Extension) ******************************************************************************/ int DGifCloseFile(GifFileType *GifFile) { - GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private; + GifFilePrivateType *Private; if (GifFile == NULL) return -1; + Private = (GifFilePrivateType *)GifFile->Private; if (!IS_READABLE(Private)) { /* This file was NOT open for reading: */ @@ -930,7 +931,10 @@ ColorMapObject *MakeMapObject(int ColorCount, GifColorType *ColorMap) Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType)); if (Object->Colors == (GifColorType *)NULL) + { + free (Object); return((ColorMapObject *)NULL); + } Object->ColorCount = ColorCount; Object->BitsPerPixel = BitSize(ColorCount); diff --git a/src/dialog-msw.c b/src/dialog-msw.c index 954a27a..0ddcc6a 100644 --- a/src/dialog-msw.c +++ b/src/dialog-msw.c @@ -42,7 +42,9 @@ Lisp_Object Qdialog_box_error; static Lisp_Object Q_initial_directory; static Lisp_Object Q_initial_filename; static Lisp_Object Q_filter_list; +/* Declared in general-slots.h static Lisp_Object Q_title; +*/ static Lisp_Object Q_allow_multi_select; static Lisp_Object Q_create_prompt_on_nonexistent; static Lisp_Object Q_overwrite_prompt; @@ -400,7 +402,7 @@ handle_directory_dialog_box (struct frame *f, Lisp_Object keys) bi.lpfn = handle_directory_proc; LOCAL_FILE_FORMAT_TO_TSTR (Fexpand_file_name (build_string (""), Qnil), - (char*)pd.fname); + pd.fname); { EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys) diff --git a/src/dialog-x.c b/src/dialog-x.c index a6dcd2d..9b32e5a 100644 --- a/src/dialog-x.c +++ b/src/dialog-x.c @@ -105,7 +105,7 @@ dbox_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) ourselves. */ #ifdef EXTERNAL_WIDGET /* #### Not sure if this special case is necessary. */ - if (!FRAME_X_EXTERNAL_WINDOW_P (f) && f) + if (f && !FRAME_X_EXTERNAL_WINDOW_P (f)) #else if (f) #endif diff --git a/src/dumper.c b/src/dumper.c index e0b4ad8..9e93d09 100644 --- a/src/dumper.c +++ b/src/dumper.c @@ -570,7 +570,7 @@ pdump_register_object (Lisp_Object obj) if (imp->description) { int me = depth++; - if (me>65536) + if (me>=65536) { stderr_out ("Backtrace overflow, loop ?\n"); ABORT (); @@ -605,7 +605,7 @@ pdump_register_struct (const void *data, { int me = depth++; int i; - if (me>65536) + if (me>=65536) { stderr_out ("Backtrace overflow, loop ?\n"); ABORT (); @@ -1071,7 +1071,8 @@ pdump (void) pdump_dump_root_objects (); fclose (pdump_out); - close (pdump_fd); + /* pdump_fd is already closed by the preceding fclose call + close (pdump_fd); */ free (pdump_buf); diff --git a/src/editfns.c b/src/editfns.c index ca314b9..8ad18f5 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -644,14 +644,17 @@ On Unix it is obtained from TMPDIR, with /tmp as the default. } else { - strcpy(path, getenv("HOME")); strncat(path, "/tmp/", _POSIX_PATH_MAX); + path[5 + _POSIX_PATH_MAX] = '\0'; + strncpy(path, getenv("HOME"), 5 + _POSIX_PATH_MAX); + strncat(path, "/tmp/", 5 + _POSIX_PATH_MAX); if (stat(path, &st) < 0 && errno == ENOENT) { int fd; - char warnpath[1+_POSIX_PATH_MAX]; + char warnpath[6+_POSIX_PATH_MAX]; mkdir(path, 0700); /* ignore retvals */ - strcpy(warnpath, path); - strncat(warnpath, ".created_by_xemacs", _POSIX_PATH_MAX); + warnpath[_POSIX_PATH_MAX] = '\0'; + strncpy(warnpath, path, 5 + _POSIX_PATH_MAX); + strncat(warnpath, ".created_by_xemacs", 5 + _POSIX_PATH_MAX); if ((fd = open(warnpath, O_WRONLY|O_CREAT, 0644)) > 0) { write(fd, "XEmacs created this directory because /tmp/<yourname> was unavailable -- \nPlease check !\n", 89); diff --git a/src/emacs.c b/src/emacs.c index 17101d2..e4335cb 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -3086,7 +3086,7 @@ shut_down_emacs (int sig, Lisp_Object stuff, int no_auto_save) #else "Please report this bug by invoking M-x report-emacs-bug,\n" "or by selecting `Send Bug Report' from the Help menu. If necessary, send\n" - "ordinary email to `crashes@xemacs.org'. *MAKE SURE* to include the XEmacs\n" + "ordinary email to `xemacs-beta@xemacs.org'. *MAKE SURE* to include the XEmacs\n" "configuration from M-x describe-installation, or equivalently the file\n" "Installation in the top of the build tree.\n" #endif diff --git a/src/event-Xt.c b/src/event-Xt.c index 31dd6c6..ccfde91 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -461,7 +461,14 @@ x_reset_modifier_mapping (struct device *d) xd->lock_interpretation = 0; if (xd->x_modifier_keymap) - XFreeModifiermap (xd->x_modifier_keymap); + { + XFreeModifiermap (xd->x_modifier_keymap); + /* Set it to NULL in case we receive two MappingModifier events in a + row, and the second is processed during some CHECK_QUITs within + x_reset_key_mapping. If that happens, XFreeModifierMap will be + called twice on the same map, and we crash. */ + xd->x_modifier_keymap = NULL; + } x_reset_key_mapping (d); diff --git a/src/extents.c b/src/extents.c index ced0424..be980e9 100644 --- a/src/extents.c +++ b/src/extents.c @@ -1175,11 +1175,12 @@ detach_all_extents (Lisp_Object object) set_extent_start (e, -1); set_extent_end (e, -1); } + + /* But we need to clear all the lists containing extents or + havoc will result. */ + extent_list_delete_all (data->extents); } - /* But we need to clear all the lists containing extents or - havoc will result. */ - extent_list_delete_all (data->extents); soe_invalidate (object); } } diff --git a/src/fileio.c b/src/fileio.c index f2b20c3..64adf94 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -57,7 +57,13 @@ Boston, MA 02111-1307, USA. */ #define WIN32_FILENAMES #ifdef WIN32_NATIVE #include "nt.h" +#include <aclapi.h> #endif /* WIN32_NATIVE */ +#ifdef CYGWIN +#include <w32api/aclapi.h> +#endif + + #define IS_DRIVE(x) isalpha (x) /* Need to lower-case the drive letter, or else expanded filenames will sometimes compare inequal, because @@ -2267,11 +2273,86 @@ check_executable (char *filename) #endif /* not WIN32_NATIVE */ } + + /* Return nonzero if file FILENAME exists and can be written. */ static int check_writable (const char *filename) { +#if defined(WIN32_NATIVE) || defined(CYGWIN) +#ifdef CYGWIN + char filename_buffer[PATH_MAX]; +#endif + // Since this has to work for a directory, we can't just call 'CreateFile' + PSECURITY_DESCRIPTOR pDesc; /* Must be freed with LocalFree */ + /* these need not be freed, they point into pDesc */ + PSID psidOwner; + PSID psidGroup; + PACL pDacl; + PACL pSacl; + /* end of insides of descriptor */ + DWORD error; + DWORD attributes; + HANDLE tokenHandle; + GENERIC_MAPPING genericMapping; + DWORD accessMask; + PRIVILEGE_SET PrivilegeSet; + DWORD dwPrivSetSize = sizeof( PRIVILEGE_SET ); + BOOL fAccessGranted = FALSE; + DWORD dwAccessAllowed; + +#ifdef CYGWIN + cygwin_conv_to_full_win32_path(filename, filename_buffer); + filename = filename_buffer; +#endif + + // First check for a normal file with the old-style readonly bit + attributes = GetFileAttributes(filename); + if (FILE_ATTRIBUTE_READONLY == (attributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_READONLY))) + return 0; + + /* Win32 prototype lacks const. */ + error = GetNamedSecurityInfo((LPTSTR)filename, SE_FILE_OBJECT, + DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION, + &psidOwner, &psidGroup, &pDacl, &pSacl, &pDesc); + if (error != ERROR_SUCCESS) { // FAT? + attributes = GetFileAttributes(filename); + return (attributes & FILE_ATTRIBUTE_DIRECTORY) || (0 == (attributes & FILE_ATTRIBUTE_READONLY)); + } + + genericMapping.GenericRead = FILE_GENERIC_READ; + genericMapping.GenericWrite = FILE_GENERIC_WRITE; + genericMapping.GenericExecute = FILE_GENERIC_EXECUTE; + genericMapping.GenericAll = FILE_ALL_ACCESS; + + if (!ImpersonateSelf(SecurityDelegation)) { + return 0; + } + if (!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &tokenHandle)) { + return 0; + } + + accessMask = GENERIC_WRITE; + MapGenericMask(&accessMask, &genericMapping); + + if (!AccessCheck(pDesc, tokenHandle, accessMask, &genericMapping, + &PrivilegeSet, // receives privileges used in check + &dwPrivSetSize, // size of PrivilegeSet buffer + &dwAccessAllowed, // receives mask of allowed access rights + &fAccessGranted)) + { + DWORD oops = GetLastError(); + CloseHandle(tokenHandle); + RevertToSelf(); + LocalFree(pDesc); + return 0; + } + CloseHandle(tokenHandle); + RevertToSelf(); + LocalFree(pDesc); + return fAccessGranted == TRUE; +#else #ifdef HAVE_EACCESS return (eaccess (filename, W_OK) >= 0); #else @@ -2282,6 +2363,7 @@ check_writable (const char *filename) but would lose for directories. */ return (access (filename, W_OK) >= 0); #endif +#endif } DEFUN ("file-exists-p", Ffile_exists_p, 1, 1, 0, /* diff --git a/src/fns.c b/src/fns.c index 266783b..9b38b1b 100644 --- a/src/fns.c +++ b/src/fns.c @@ -50,6 +50,42 @@ Boston, MA 02111-1307, USA. */ #include "lstream.h" #include "opaque.h" + + +static Lisp_Object free_malloced_ptr(Lisp_Object unwind_obj) +{ + void *ptr = (void *)get_opaque_ptr(unwind_obj); + xfree(ptr); + free_opaque_ptr(unwind_obj); + return Qnil; +} + +/* Don't use alloca for regions larger than this, lest we overflow + the stack. */ +#define MAX_ALLOCA 65536 + +/* We need to setup proper unwinding, because there is a number of + ways these functions can blow up, and we don't want to have memory + leaks in those cases. */ +#define XMALLOC_OR_ALLOCA(ptr, len, type) do { \ + size_t XOA_len = (len); \ + if (XOA_len > MAX_ALLOCA ) { \ + ptr = xnew_array (type, XOA_len); \ + record_unwind_protect (free_malloced_ptr, \ + make_opaque_ptr ((void *)ptr)); \ + } \ + else \ + ptr = alloca_array (type, XOA_len); \ +} while (0) + +#define XMALLOC_UNBIND(ptr, len, speccount) do { \ + if ((len) > MAX_ALLOCA) \ + unbind_to (speccount, Qnil); \ +} while (0) + + + + /* NOTE: This symbol is also used in lread.c */ #define FEATUREP_SYNTAX @@ -605,6 +641,8 @@ concat (int nargs, Lisp_Object *args, Bufbyte *string_result = 0; Bufbyte *string_result_ptr = 0; struct gcpro gcpro1; + int speccount = specpdl_depth(); + Charcount total_length; /* The modus operandi in Emacs is "caller gc-protects args". However, concat is called many times in Emacs on freshly @@ -622,7 +660,7 @@ concat (int nargs, Lisp_Object *args, the result in the returned string's `string-translatable' property. */ #endif if (target_type == c_string) - args_mse = alloca_array (struct merge_string_extents_struct, nargs); + XMALLOC_OR_ALLOCA(args_mse, nargs, struct merge_string_extents_struct); /* In append, the last arg isn't treated like the others */ if (last_special && nargs > 0) @@ -671,7 +709,7 @@ concat (int nargs, Lisp_Object *args, /* Charcount is a misnomer here as we might be dealing with the length of a vector or list, but emphasizes that we're not dealing with Bytecounts in strings */ - Charcount total_length; + /* Charcount total_length; */ for (argnum = 0, total_length = 0; argnum < nargs; argnum++) { @@ -687,8 +725,11 @@ concat (int nargs, Lisp_Object *args, { case c_cons: if (total_length == 0) + { /* In append, if all but last arg are nil, return last arg */ + XMALLOC_UNBIND(args_mse, nargs, speccount); RETURN_UNGCPRO (last_tail); + } val = Fmake_list (make_int (total_length), Qnil); break; case c_vector: @@ -708,7 +749,9 @@ concat (int nargs, Lisp_Object *args, realloc()ing in order to make the char fit properly. O(N^2) yuckage. */ val = Qnil; - string_result = (Bufbyte *) alloca (total_length * MAX_EMCHAR_LEN); + XMALLOC_OR_ALLOCA( string_result, + total_length * MAX_EMCHAR_LEN, + Bufbyte ); string_result_ptr = string_result; break; default: @@ -821,6 +864,8 @@ concat (int nargs, Lisp_Object *args, args_mse[argnum].entry_offset, 0, args_mse[argnum].entry_length); } + XMALLOC_UNBIND(string_result, total_length * MAX_EMCHAR_LEN, speccount); + XMALLOC_UNBIND(args_mse, nargs, speccount); } if (!NILP (prev)) @@ -1841,6 +1886,7 @@ plists_differ (Lisp_Object a, Lisp_Object b, int nil_means_not_present, Lisp_Object *keys, *vals; char *flags; Lisp_Object rest; + int speccount = specpdl_depth(); if (NILP (a) && NILP (b)) return 0; @@ -1852,9 +1898,9 @@ plists_differ (Lisp_Object a, Lisp_Object b, int nil_means_not_present, lb = XINT (Flength (b)); m = (la > lb ? la : lb); fill = 0; - keys = alloca_array (Lisp_Object, m); - vals = alloca_array (Lisp_Object, m); - flags = alloca_array (char, m); + XMALLOC_OR_ALLOCA(keys, m, Lisp_Object); + XMALLOC_OR_ALLOCA(vals, m, Lisp_Object); + XMALLOC_OR_ALLOCA(flags, m, char); /* First extract the pairs from A. */ for (rest = a; !NILP (rest); rest = XCDR (XCDR (rest))) @@ -1899,10 +1945,17 @@ plists_differ (Lisp_Object a, Lisp_Object b, int nil_means_not_present, if (flags [i] == 0) goto MISMATCH; + + XMALLOC_UNBIND(flags, m, speccount); + XMALLOC_UNBIND(vals, m, speccount); + XMALLOC_UNBIND(keys, m, speccount); /* Ok. */ return 0; MISMATCH: + XMALLOC_UNBIND(flags, m, speccount); + XMALLOC_UNBIND(vals, m, speccount); + XMALLOC_UNBIND(keys, m, speccount); return 1; } @@ -2996,8 +3049,12 @@ mapcar1 (size_t leni, Lisp_Object *vals, { /* The string data of `sequence' might be relocated during GC. */ Bytecount slen = XSTRING_LENGTH (sequence); - Bufbyte *p = alloca_array (Bufbyte, slen); - Bufbyte *end = p + slen; + Bufbyte *p = NULL; + Bufbyte *end = NULL; + int speccount = specpdl_depth(); + + XMALLOC_OR_ALLOCA(p, slen, Bufbyte); + end = p + slen; memcpy (p, XSTRING_DATA (sequence), slen); @@ -3008,6 +3065,7 @@ mapcar1 (size_t leni, Lisp_Object *vals, result = Ffuncall (2, args); if (vals) vals[gcpro1.nvars++] = result; } + XMALLOC_UNBIND(p, slen, speccount); } else if (BIT_VECTORP (sequence)) { @@ -3039,12 +3097,14 @@ may be a list, a vector, a bit vector, or a string. { EMACS_INT len = XINT (Flength (sequence)); Lisp_Object *args; + Lisp_Object result; EMACS_INT i; EMACS_INT nargs = len + len - 1; + int speccount = specpdl_depth(); if (len == 0) return build_string (""); - args = alloca_array (Lisp_Object, nargs); + XMALLOC_OR_ALLOCA(args, nargs, Lisp_Object); mapcar1 (len, args, function, sequence); @@ -3054,7 +3114,9 @@ may be a list, a vector, a bit vector, or a string. for (i = 1; i < nargs; i += 2) args[i] = separator; - return Fconcat (nargs, args); + result = Fconcat(nargs, args); + XMALLOC_UNBIND(args, nargs, speccount); + return result; } DEFUN ("mapcar", Fmapcar, 2, 2, 0, /* @@ -3065,11 +3127,17 @@ SEQUENCE may be a list, a vector, a bit vector, or a string. (function, sequence)) { size_t len = XINT (Flength (sequence)); - Lisp_Object *args = alloca_array (Lisp_Object, len); + Lisp_Object *args = NULL; + Lisp_Object result; + int speccount = specpdl_depth(); + + XMALLOC_OR_ALLOCA(args, len, Lisp_Object); mapcar1 (len, args, function, sequence); - return Flist (len, args); + result = Flist(len, args); + XMALLOC_UNBIND(args, len, speccount); + return result; } DEFUN ("mapvector", Fmapvector, 2, 2, 0, /* @@ -3572,38 +3640,6 @@ base64_decode_1 (Lstream *istream, Bufbyte *to, Charcount *ccptr) #undef ADVANCE_INPUT_IGNORE_NONBASE64 #undef STORE_BYTE -static Lisp_Object -free_malloced_ptr (Lisp_Object unwind_obj) -{ - void *ptr = (void *)get_opaque_ptr (unwind_obj); - xfree (ptr); - free_opaque_ptr (unwind_obj); - return Qnil; -} - -/* Don't use alloca for regions larger than this, lest we overflow - the stack. */ -#define MAX_ALLOCA 65536 - -/* We need to setup proper unwinding, because there is a number of - ways these functions can blow up, and we don't want to have memory - leaks in those cases. */ -#define XMALLOC_OR_ALLOCA(ptr, len, type) do { \ - size_t XOA_len = (len); \ - if (XOA_len > MAX_ALLOCA) \ - { \ - ptr = xnew_array (type, XOA_len); \ - record_unwind_protect (free_malloced_ptr, \ - make_opaque_ptr ((void *)ptr)); \ - } \ - else \ - ptr = alloca_array (type, XOA_len); \ -} while (0) - -#define XMALLOC_UNBIND(ptr, len, speccount) do { \ - if ((len) > MAX_ALLOCA) \ - unbind_to (speccount, Qnil); \ -} while (0) DEFUN ("base64-encode-region", Fbase64_encode_region, 2, 3, "r", /* Base64-encode the region between START and END. diff --git a/src/glyphs-eimage.c b/src/glyphs-eimage.c index 3974bc0..c786271 100644 --- a/src/glyphs-eimage.c +++ b/src/glyphs-eimage.c @@ -847,7 +847,13 @@ png_instantiate_unwind (Lisp_Object unwind_obj) free_opaque_ptr (unwind_obj); if (data->png_ptr) - png_destroy_read_struct (&(data->png_ptr), &(data->info_ptr), (png_infopp)NULL); + { + /* ensure we can't get here again */ + png_structp tmp = data->png_ptr; + data->png_ptr = NULL; + png_destroy_read_struct (&tmp, &(data->info_ptr), (png_infopp)NULL); + } + if (data->instream) fclose (data->instream); @@ -871,24 +877,36 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, png_structp png_ptr; png_infop info_ptr; + xzero (unwind); + record_unwind_protect (png_instantiate_unwind, make_opaque_ptr (&unwind)); + + if (setjmp (png_err_stct.setjmp_buffer)) + { + /* Something blew up: + just display the error (cleanup happens in the unwind) */ + signal_image_error_2 ("Error decoding PNG", + build_string(png_err_stct.err_str), + instantiator); + } + /* Initialize all PNG structures */ - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, (void*)&png_err_stct, + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, + (void *) &png_err_stct, png_error_func, png_warning_func); if (!png_ptr) signal_image_error ("Error obtaining memory for png_read", instantiator); + unwind.png_ptr = png_ptr; + info_ptr = png_create_info_struct (png_ptr); if (!info_ptr) { + unwind.png_ptr = NULL; /* avoid re-calling png_destroy_read_struct + when unwinding */ png_destroy_read_struct (&png_ptr, (png_infopp)NULL, (png_infopp)NULL); signal_image_error ("Error obtaining memory for png_read", instantiator); } - - xzero (unwind); - unwind.png_ptr = png_ptr; unwind.info_ptr = info_ptr; - record_unwind_protect (png_instantiate_unwind, make_opaque_ptr (&unwind)); - /* This code is a mixture of stuff from Ben's GIF/JPEG stuff from this file, example.c from the libpng 0.81 distribution, and the pngtopnm sources. -WMP- @@ -897,16 +915,6 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, and is no longer usable for previous versions. jh */ - /* Set the jmp_buf return context for png_error ... if this returns !0, then - we ran into a problem somewhere, and need to clean up after ourselves. */ - if (setjmp (png_err_stct.setjmp_buffer)) - { - /* Something blew up: just display the error (cleanup happens in the unwind) */ - signal_image_error_2 ("Error decoding PNG", - build_string(png_err_stct.err_str), - instantiator); - } - /* Initialize the IO layer and read in header information */ { Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); diff --git a/src/glyphs-gtk.c b/src/glyphs-gtk.c index d33e8d0..83fe167 100644 --- a/src/glyphs-gtk.c +++ b/src/glyphs-gtk.c @@ -2999,7 +2999,7 @@ complex_vars_of_glyphs_gtk (void) /* shared data for the image read/parse logic */ static short hexTable[256]; /* conversion value */ -static int initialized = FALSE; /* easier to fill in at run time */ +static int hexTable_initialized = FALSE; /* easier to fill in at run time */ /* * Table index for the hex values. Initialized once, first time. @@ -3032,7 +3032,7 @@ static void initHexTable() hexTable['}'] = -1; hexTable['\n'] = -1; hexTable['\t'] = -1; - initialized = TRUE; + hexTable_initialized = TRUE; } /* @@ -3089,7 +3089,7 @@ int read_bitmap_data (fstream, width, height, datap, x_hot, y_hot) #define Xmalloc(size) malloc(size) /* first time initialization */ - if (initialized == FALSE) initHexTable(); + if (hexTable_initialized == FALSE) initHexTable(); /* error cleanup and return macro */ #define RETURN(code) { if (data) free (data); return code; } diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 34fc84f..72902aa 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -1460,7 +1460,7 @@ in this Software without prior written authorization from the X Consortium. /* shared data for the image read/parse logic */ static short hexTable[256]; /* conversion value */ -static int initialized = FALSE; /* easier to fill in at run time */ +static int hex_initialized = FALSE; /* easier to fill in at run time */ /* * Table index for the hex values. Initialized once, first time. @@ -1494,7 +1494,7 @@ initHexTable (void) hexTable['}'] = -1; hexTable['\n'] = -1; hexTable['\t'] = -1; - initialized = TRUE; + hex_initialized = TRUE; } /* @@ -1557,7 +1557,7 @@ int read_bitmap_data (FILE* fstream, unsigned int *width, #define Xmalloc(size) malloc(size) /* first time initialization */ - if (initialized == FALSE) initHexTable(); + if (hex_initialized == FALSE) initHexTable(); /* error cleanup and return macro */ #define RETURN(code) { if (data) free (data); return code; } diff --git a/src/glyphs-widget.c b/src/glyphs-widget.c index c3e78b4..988e594 100644 --- a/src/glyphs-widget.c +++ b/src/glyphs-widget.c @@ -558,20 +558,20 @@ widget_query_geometry (Lisp_Object image_instance, IMAGE_INSTANCE_WIDGET_FACE (ii), &w, &h, 0, domain); /* Adjust the size for borders. */ - if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii)) + if (width && IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii)) *width = w + 2 * widget_instance_border_width (ii); - if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)) + if (height && IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)) *height = h + 2 * widget_instance_border_width (ii); } } /* Finish off with dynamic sizing. */ - if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii))) + if (width && !NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii))) { dynamic_width = Feval (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)); if (INTP (dynamic_width)) *width = XINT (dynamic_width); } - if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii))) + if (height && !NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii))) { dynamic_height = Feval (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)); if (INTP (dynamic_height)) diff --git a/src/input-method-xlib.c b/src/input-method-xlib.c index 30b3072..8a1f3ca 100644 --- a/src/input-method-xlib.c +++ b/src/input-method-xlib.c @@ -426,13 +426,18 @@ XIM_init_frame (struct frame *f) void XIM_SetGeometry (struct frame *f) { - XIC xic = FRAME_X_XIC (f); - XIMStyle style = FRAME_X_XIC_STYLE (f); + XIC xic; + XIMStyle style; XRectangle area; - if (!xic || !f) + if (!f) + return; + + xic = FRAME_X_XIC (f); + if (!xic) return; + style = FRAME_X_XIC_STYLE (f); if (style & XIMStatusArea) { /* Place Status Area in bottom right corner */ diff --git a/src/keymap.c b/src/keymap.c index 101a4a8..3752f0f 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -3663,6 +3663,8 @@ where_is_recursive_mapper (Lisp_Object map, void *arg) struct key_data *new = xnew_array (struct key_data, size); memcpy ((void *)new, (const void *)c->keys_so_far, c->keys_so_far_total_size * sizeof (struct key_data)); + xfree (c->keys_so_far); + c->keys_so_far = new; } else XREALLOC_ARRAY (c->keys_so_far, struct key_data, size); diff --git a/src/linuxplay.c b/src/linuxplay.c index 9b702a0..4108a19 100644 --- a/src/linuxplay.c +++ b/src/linuxplay.c @@ -290,8 +290,9 @@ static int linux_play_data_or_file(int fd,unsigned char *data, fmtType ffmt; int fmt,speed,tracks; unsigned char *pptr,*optr,*cptr,*sptr; - int wrtn,rrtn,crtn,prtn; - unsigned char sndbuf[SNDBUFSZ]; + int wrtn, crtn; + size_t prtn, rrtn; + unsigned char sndbuf[SNDBUFSZ]; /* We need to read at least the header information before we can start doing anything */ @@ -338,9 +339,9 @@ static int linux_play_data_or_file(int fd,unsigned char *data, device; repeat until all data has been processed */ rrtn = length; do { - for (pptr = data; (prtn = parsesndfile((void **)&pptr,(size_t *)&rrtn, + for (pptr = data; (prtn = parsesndfile((void **)&pptr, &rrtn, (void **)&optr)) > 0; ) - for (cptr = optr; (crtn = sndcnv((void **)&cptr,(size_t *) &prtn, + for (cptr = optr; (crtn = sndcnv((void **)&cptr, &prtn, (void **)&sptr)) > 0; ) { for (;;) { if ((wrtn = write(audio_fd,sptr,crtn)) < 0) { diff --git a/src/md5.c b/src/md5.c index 608ba7b..ec1337c 100644 --- a/src/md5.c +++ b/src/md5.c @@ -581,7 +581,7 @@ file-coding or Mule support. Otherwise, they are ignored. Bufbyte tempbuf[1024]; /* some random amount */ Lstream_data_count size_in_bytes = Lstream_read (XLSTREAM (instream), tempbuf, sizeof (tempbuf)); - if (!size_in_bytes) + if (size_in_bytes <= 0) break; /* Process the bytes. */ diff --git a/src/mule-ccl.c b/src/mule-ccl.c index a1a4083..fccab69 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -833,6 +833,9 @@ static int stack_idx_of_map_multiple; } \ } while (0) +#define POSSIBLE_LEADING_BYTE_P(leading_byte) \ + ((leading_byte > MIN_LEADING_BYTE) && \ + (leading_byte - MIN_LEADING_BYTE) < NUM_LEADING_BYTES) /* Set C to the character code made from CHARSET and CODE. This is like MAKE_CHAR but check the validity of CHARSET and CODE. If they @@ -1297,6 +1300,16 @@ ccl_driver (struct ccl_program *ccl, reg[rrr] = i; reg[RRR] = LEADING_BYTE_ASCII; } + /* Previously, these next two elses were reversed in order, + which should have worked fine, but is more fragile than + this order. */ + else if (LEADING_BYTE_CONTROL_1 == i) + { + if (src >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = i; + reg[rrr] = (*src++ - 0xA0); + } else if (i <= MAX_LEADING_BYTE_OFFICIAL_1) { if (src >= src_end) @@ -1304,6 +1317,13 @@ ccl_driver (struct ccl_program *ccl, reg[RRR] = i; reg[rrr] = (*src++ & 0x7F); } + else if (LEADING_BYTE_CONTROL_1 == i) + { + if (src >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = i; + reg[rrr] = (*src++ - 0xA0); + } else if (i <= MAX_LEADING_BYTE_OFFICIAL_2) { if ((src + 1) >= src_end) @@ -1353,15 +1373,29 @@ ccl_driver (struct ccl_program *ccl, #ifndef UTF2000 case CCL_WriteMultibyteChar2: i = reg[RRR]; /* charset */ - if (i == LEADING_BYTE_ASCII) + if (i == LEADING_BYTE_ASCII) i = reg[rrr] & 0xFF; - else if (XCHARSET_DIMENSION (CHARSET_BY_LEADING_BYTE (i)) == 1) - i = (((i - FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7) - | (reg[rrr] & 0x7F)); - else if (i < MAX_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]; + else if (LEADING_BYTE_CONTROL_1 == i) + i = ((reg[rrr] & 0xFF) - 0xA0); + else if (POSSIBLE_LEADING_BYTE_P(i) && + !NILP(CHARSET_BY_LEADING_BYTE(i))) + { + if (XCHARSET_DIMENSION (CHARSET_BY_LEADING_BYTE (i)) == 1) + i = (((i - FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7) + | (reg[rrr] & 0x7F)); + else if (i < MAX_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]; + } + else + { + /* No charset we know about; use U+3012 GETA MARK */ + i = MAKE_CHAR + (CHARSET_BY_LEADING_BYTE(LEADING_BYTE_JAPANESE_JISX0208), + 34, 46); + } CCL_WRITE_CHAR (i); @@ -1421,7 +1455,6 @@ ccl_driver (struct ccl_program *ccl, for (;i < j;i++) { - size = XVECTOR (Vcode_conversion_map_vector)->size; point = XINT (ccl_prog[ic++]); if (point >= size) continue; diff --git a/src/nas.c b/src/nas.c index 3249218..a0a5ddb 100644 --- a/src/nas.c +++ b/src/nas.c @@ -751,7 +751,7 @@ SndOpenDataForReading (const char *data, /* Stuff taken from wave.c from NAS. Just like snd files, NAS can't read wave data from memory, so these functions do that for us. */ -#define Err() { return NULL; } +#define Err() { free (wi); return NULL; } #define readFourcc(_f) dread(_f, sizeof(RIFF_FOURCC), 1) #define cmpID(_x, _y) \ strncmp((char *) (_x), (char *) (_y), sizeof(RIFF_FOURCC)) diff --git a/src/nt.c b/src/nt.c index 566f4f0..1e26fbb 100644 --- a/src/nt.c +++ b/src/nt.c @@ -1449,9 +1449,9 @@ mswindows_fstat (int desc, struct stat * buf) /* determine rwx permissions */ if (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) - permission = _S_IREAD; + permission = _S_IREAD | _S_IEXEC; else - permission = _S_IREAD | _S_IWRITE; + permission = _S_IREAD | _S_IEXEC |_S_IWRITE; if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) permission |= _S_IEXEC; @@ -1638,22 +1638,12 @@ mswindows_stat (const char * path, struct stat * buf) /* determine rwx permissions */ if (wfd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) - permission = _S_IREAD; + permission = _S_IREAD | _S_IEXEC; else - permission = _S_IREAD | _S_IWRITE; + permission = _S_IREAD | _S_IEXEC |_S_IWRITE; if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) permission |= _S_IEXEC; - else - { - char * p = strrchr (name, '.'); - if (p != NULL && - (stricmp (p, ".exe") == 0 || - stricmp (p, ".com") == 0 || - stricmp (p, ".bat") == 0 || - stricmp (p, ".cmd") == 0)) - permission |= _S_IEXEC; - } buf->st_mode |= permission | (permission >> 3) | (permission >> 6); diff --git a/src/objects-gtk.c b/src/objects-gtk.c index 72fde7c..64bd305 100644 --- a/src/objects-gtk.c +++ b/src/objects-gtk.c @@ -481,7 +481,7 @@ vars_of_objects_gtk (void) #include <X11/Xatom.h> /* Unbounded, for sufficiently small values of infinity... */ -#define MAX_FONT_COUNT 5000 +#define MAX_FONT_COUNT INT_MAX #ifdef MULE /* find a font spec that matches font spec FONT and also matches @@ -529,7 +529,7 @@ gtk_find_charset_font (Lisp_Object device, Lisp_Object font, Lisp_Object charset #endif /* MULE */ /* Unbounded, for sufficiently small values of infinity... */ -#define MAX_FONT_COUNT 5000 +#define MAX_FONT_COUNT INT_MAX static int valid_font_name_p (Display *dpy, char *name) diff --git a/src/objects-x.c b/src/objects-x.c index 2868f94..25a19c9 100644 --- a/src/objects-x.c +++ b/src/objects-x.c @@ -681,7 +681,7 @@ truename_via_random_props (Display *dpy, XFontStruct *font) } /* Unbounded, for sufficiently small values of infinity... */ -#define MAX_FONT_COUNT 5000 +#define MAX_FONT_COUNT INT_MAX static Extbyte * truename_via_XListFonts (Display *dpy, Extbyte *font_name) diff --git a/src/postgresql.c b/src/postgresql.c index 66807a3..34b608e 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -3,8 +3,8 @@ Copyright (C) 2000 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. - Author: SL Baur <steve@beopen.com> - Maintainer: SL Baur <steve@beopen.com> + Author: SL Baur <steve@xemacs.org> + Maintainer: SL Baur <steve@xemacs.org> Please send patches to this file to me first before submitting them to xemacs-patches. diff --git a/src/postgresql.h b/src/postgresql.h index acfda83..79e99b5 100644 --- a/src/postgresql.h +++ b/src/postgresql.h @@ -3,8 +3,8 @@ Copyright (C) 2000 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. - Author: SL Baur <steve@beopen.com> - Maintainer: SL Baur <steve@beopen.com> + Author: SL Baur <steve@xemacs.org> + Maintainer: SL Baur <steve@xemacs.org> Please send patches to this file to me first before submitting them to xemacs-patches. diff --git a/src/process-unix.c b/src/process-unix.c index 424246f..05b5046 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -1293,26 +1293,38 @@ unix_send_process (Lisp_Object proc, struct lstream* lstream) Bufbyte chunkbuf[512]; Bytecount chunklen; - while (1) + do { Lstream_data_count writeret; chunklen = Lstream_read (lstream, chunkbuf, 512); - if (chunklen <= 0) - break; /* perhaps should ABORT() if < 0? - This should never happen. */ old_sigpipe = (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); - /* Lstream_write() will never successfully write less than - the amount sent in. In the worst case, it just buffers - the unwritten data. */ - writeret = Lstream_write (XLSTREAM (DATA_OUTSTREAM(p)), chunkbuf, - chunklen); - signal (SIGPIPE, old_sigpipe); - if (writeret < 0) - /* This is a real error. Blocking errors are handled - specially inside of the filedesc stream. */ - report_file_error ("writing to process", list1 (proc)); + if (chunklen > 0) + { + int save_errno; + + /* Lstream_write() will never successfully write less than + the amount sent in. In the worst case, it just buffers + the unwritten data. */ + writeret = Lstream_write (XLSTREAM (DATA_OUTSTREAM(p)), chunkbuf, + chunklen); + save_errno = errno; + signal (SIGPIPE, old_sigpipe); + errno = save_errno; + if (writeret < 0) + /* This is a real error. Blocking errors are handled + specially inside of the filedesc stream. */ + report_file_error ("writing to process", list1 (proc)); + } + else + { + /* Need to make sure that everything up to and including the + last chunk is flushed, even when the pipe is currently + blocked. */ + Lstream_flush (XLSTREAM (DATA_OUTSTREAM(p))); + signal (SIGPIPE, old_sigpipe); + } while (Lstream_was_blocked_p (XLSTREAM (p->pipe_outstream))) { /* Buffer is full. Wait, accepting input; @@ -1327,7 +1339,9 @@ unix_send_process (Lisp_Object proc, struct lstream* lstream) Lstream_flush (XLSTREAM (p->pipe_outstream)); signal (SIGPIPE, old_sigpipe); } + /* Perhaps should abort() if < 0? This should never happen. */ } + while (chunklen > 0); } else { /* We got here from a longjmp() from the SIGPIPE handler */ @@ -1670,13 +1684,13 @@ unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object servic volatile int xerrno = 0; volatile int failed_connect = 0; char *ext_host; + char portbuf[sizeof(long)*3 + 2]; /* * Caution: service can either be a string or int. * Convert to a C string for later use by getaddrinfo. */ if (INTP (service)) { - char portbuf[128]; snprintf (portbuf, sizeof (portbuf), "%ld", (long) XINT (service)); portstring = portbuf; port = htons ((unsigned short) XINT (service)); diff --git a/src/redisplay-gtk.c b/src/redisplay-gtk.c index 3e792de..7560803 100644 --- a/src/redisplay-gtk.c +++ b/src/redisplay-gtk.c @@ -294,7 +294,7 @@ gtk_output_display_block (struct window *w, struct display_line *dl, int block, int cursor_width, int cursor_height) { struct frame *f = XFRAME (w->frame); - Emchar_dynarr *buf = Dynarr_new (Emchar); + Emchar_dynarr *buf; Lisp_Object window; struct display_block *db = Dynarr_atp (dl->display_blocks, block); @@ -326,7 +326,7 @@ gtk_output_display_block (struct window *w, struct display_line *dl, int block, if (end < 0) end = Dynarr_length (rba); - Dynarr_reset (buf); + buf = Dynarr_new (Emchar); while (elt < end) { diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index e2a2552..5e7e9e5 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -1044,7 +1044,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b int cursor_width, int cursor_height) { struct frame *f = XFRAME (w->frame); - Emchar_dynarr *buf = Dynarr_new (Emchar); + Emchar_dynarr *buf; Lisp_Object window; struct display_block *db = Dynarr_atp (dl->display_blocks, block); @@ -1071,7 +1071,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b if (end < 0) end = Dynarr_length (rba); - Dynarr_reset (buf); + buf = Dynarr_new (Emchar); while (elt < end) { diff --git a/src/redisplay-output.c b/src/redisplay-output.c index 7b1c46f..f61e238 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -1317,7 +1317,7 @@ redisplay_output_layout (Lisp_Object domain, { Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); Lisp_Object rest, window = DOMAIN_WINDOW (domain); - Charc_dynarr *buf = Dynarr_new (Charc); + Charc_dynarr *buf; struct window *w = XWINDOW (window); struct device *d = DOMAIN_XDEVICE (domain); int layout_height, layout_width; @@ -1334,6 +1334,8 @@ redisplay_output_layout (Lisp_Object domain, if (!redisplay_normalize_glyph_area (db, dga)) return; + buf = Dynarr_new (Charc); + /* Highly dodgy optimization. We want to only output the whole layout if we really have to. */ if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p) diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 849d974..6dc7d63 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -196,7 +196,7 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, int cursor_height) { struct frame *f = XFRAME (w->frame); - Charc_dynarr *buf = Dynarr_new (Charc); + Charc_dynarr *buf; struct display_block *db = Dynarr_atp (dl->display_blocks, block); rune_dynarr *rba = db->runes; @@ -222,7 +222,7 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, if (end < 0) end = Dynarr_length (rba); - Dynarr_reset (buf); + buf = Dynarr_new (Charc); while (elt < end && Dynarr_atp (rba, elt)->xpos < start_pixpos) { @@ -863,6 +863,9 @@ set_tty_modes (struct console *c) OUTPUT1_IF (c, TTY_SD (c).init_motion); OUTPUT1_IF (c, TTY_SD (c).cursor_visible); OUTPUT1_IF (c, TTY_SD (c).keypad_on); + + if (TTY_FLAGS (c).auto_margins) + OUTPUT1_IF (c, TTY_SD (c).disable_auto_margins); } /***************************************************************************** @@ -881,6 +884,9 @@ reset_tty_modes (struct console *c) OUTPUT1_IF (c, TTY_SD (c).cursor_normal); OUTPUT1_IF (c, TTY_SD (c).end_motion); + if (TTY_FLAGS (c).auto_margins) + OUTPUT1_IF (c, TTY_SD (c).enable_auto_margins); + { Lisp_Object frm = CONSOLE_SELECTED_FRAME (c); @@ -1184,12 +1190,14 @@ init_tty_for_redisplay (struct device *d, char *terminal_type) TTY_SD (c).audio_bell = "\07"; } - TTY_SD (c).cursor_visible = tgetstr ("ve", &bufptr); - TTY_SD (c).cursor_normal = tgetstr ("vs", &bufptr); + TTY_SD (c).cursor_visible = tgetstr ("vs", &bufptr); + TTY_SD (c).cursor_normal = tgetstr ("ve", &bufptr); TTY_SD (c).init_motion = tgetstr ("ti", &bufptr); TTY_SD (c).end_motion = tgetstr ("te", &bufptr); TTY_SD (c).keypad_on = tgetstr ("ks", &bufptr); TTY_SD (c).keypad_off = tgetstr ("ke", &bufptr); + TTY_SD (c).disable_auto_margins = tgetstr ("RA", &bufptr); + TTY_SD (c).enable_auto_margins = tgetstr ("SA", &bufptr); /* @@ -1202,6 +1210,7 @@ init_tty_for_redisplay (struct device *d, char *terminal_type) TTY_FLAGS (c).memory_below_frame = tgetflag ("db"); TTY_FLAGS (c).standout_width = tgetnum ("sg"); TTY_FLAGS (c).underline_width = tgetnum ("ug"); + TTY_FLAGS (c).auto_margins = tgetflag ("am"); if (TTY_FLAGS (c).standout_width == -1) TTY_FLAGS (c).standout_width = 0; diff --git a/src/redisplay-x.c b/src/redisplay-x.c index b6a89ba..f2acc68 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -327,7 +327,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, int cursor_width, int cursor_height) { struct frame *f = XFRAME (w->frame); - Charc_dynarr *buf = Dynarr_new (Charc); + Charc_dynarr *buf; Lisp_Object window; struct display_block *db = Dynarr_atp (dl->display_blocks, block); @@ -354,7 +354,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, if (end < 0) end = Dynarr_length (rba); - Dynarr_reset (buf); + buf = Dynarr_new (Charc); while (elt < end) { diff --git a/src/regex.c b/src/regex.c index c6f6f36..6f27ce8 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1146,7 +1146,7 @@ static const char *re_error_msgid[] = when matching. If this number is exceeded, we allocate more space, so it is not a hard limit. */ #ifndef INIT_FAILURE_ALLOC -#define INIT_FAILURE_ALLOC 5 +#define INIT_FAILURE_ALLOC 20 #endif /* Roughly the maximum number of failure points on the stack. Would be @@ -1156,9 +1156,9 @@ static const char *re_error_msgid[] = #if defined (MATCH_MAY_ALLOCATE) || defined (REGEX_MALLOC) /* 4400 was enough to cause a crash on Alpha OSF/1, whose default stack limit is 2mb. */ -int re_max_failures = 20000; +int re_max_failures = 40000; #else -int re_max_failures = 2000; +int re_max_failures = 4000; #endif union fail_stack_elt diff --git a/src/s/sol2.h b/src/s/sol2.h index be814d7..aa9e4e4 100644 --- a/src/s/sol2.h +++ b/src/s/sol2.h @@ -11,7 +11,7 @@ #endif /* Fix understandable GCC lossage on Solaris 2.6 */ -#if defined(__GNUC__) && OS_RELEASE >= 506 && !defined(NOT_C_CODE) +#if defined(__GNUC__) && OS_RELEASE >= 506 && OS_RELEASE < 510 && !defined(NOT_C_CODE) /* GCC va_list munging is a little messed up */ #define __GNUC_VA_LIST diff --git a/src/scrollbar-gtk.c b/src/scrollbar-gtk.c index cf98b64..ca3d615 100644 --- a/src/scrollbar-gtk.c +++ b/src/scrollbar-gtk.c @@ -57,14 +57,16 @@ gtk_inhibit_scrollbar_slider_size_change (void) static void gtk_free_scrollbar_instance (struct scrollbar_instance *instance) { - if (SCROLLBAR_GTK_WIDGET (instance)) + if (instance->scrollbar_data) { - gtk_widget_hide_all (SCROLLBAR_GTK_WIDGET (instance)); - gtk_widget_destroy (SCROLLBAR_GTK_WIDGET (instance)); - } + if (SCROLLBAR_GTK_WIDGET (instance)) + { + gtk_widget_hide_all (SCROLLBAR_GTK_WIDGET (instance)); + gtk_widget_destroy (SCROLLBAR_GTK_WIDGET (instance)); + } - if (instance->scrollbar_data) - xfree (instance->scrollbar_data); + xfree (instance->scrollbar_data); + } } /* A device method. */ diff --git a/src/scrollbar-msw.c b/src/scrollbar-msw.c index fac374a..8af6692 100644 --- a/src/scrollbar-msw.c +++ b/src/scrollbar-msw.c @@ -83,9 +83,11 @@ mswindows_create_scrollbar_instance (struct frame *f, int vertical, static void mswindows_free_scrollbar_instance (struct scrollbar_instance *sb) { - DestroyWindow (SCROLLBAR_MSW_HANDLE (sb)); if (sb->scrollbar_data) - xfree (sb->scrollbar_data); + { + DestroyWindow (SCROLLBAR_MSW_HANDLE (sb)); + xfree (sb->scrollbar_data); + } } static void diff --git a/src/scrollbar-x.c b/src/scrollbar-x.c index 53d4c24..b7b193b 100644 --- a/src/scrollbar-x.c +++ b/src/scrollbar-x.c @@ -71,19 +71,21 @@ x_inhibit_scrollbar_slider_size_change (void) static void x_free_scrollbar_instance (struct scrollbar_instance *instance) { - if (SCROLLBAR_X_NAME (instance)) - xfree (SCROLLBAR_X_NAME (instance)); - - if (SCROLLBAR_X_WIDGET (instance)) + if (instance->scrollbar_data) { - if (XtIsManaged (SCROLLBAR_X_WIDGET (instance))) - XtUnmanageChild (SCROLLBAR_X_WIDGET (instance)); + if (SCROLLBAR_X_NAME (instance)) + xfree (SCROLLBAR_X_NAME (instance)); - lw_destroy_all_widgets (SCROLLBAR_X_ID (instance)); - } + if (SCROLLBAR_X_WIDGET (instance)) + { + if (XtIsManaged (SCROLLBAR_X_WIDGET (instance))) + XtUnmanageChild (SCROLLBAR_X_WIDGET (instance)); - if (instance->scrollbar_data) - xfree (instance->scrollbar_data); + lw_destroy_all_widgets (SCROLLBAR_X_ID (instance)); + } + + xfree (instance->scrollbar_data); + } } /* A device method. */ diff --git a/src/select-x.c b/src/select-x.c index bb26cc5..2ab3161 100644 --- a/src/select-x.c +++ b/src/select-x.c @@ -509,14 +509,41 @@ x_reply_selection_request (XSelectionRequestEvent *event, int format, } else { +#ifndef HAVE_XTREGISTERDRAWABLE + invalid_operation("Copying that much data requires X11R6.", Qunbound); +#else /* Send an INCR selection. */ int prop_id; + Widget widget = FRAME_X_TEXT_WIDGET (XFRAME(DEVICE_SELECTED_FRAME(d))); if (x_window_to_frame (d, window)) /* #### debug */ error ("attempt to transfer an INCR to ourself!"); #if 0 stderr_out ("\nINCR %d\n", bytes_remaining); #endif + /* Tell Xt not to drop PropertyNotify events that arrive for the + target window, rather, pass them to us. This would be a hack, but + the Xt selection routines are broken for our purposes--we can't + pass them callbacks from Lisp, for example. Let's call it a + workaround. + + The call to wait_for_property_change means we can break out of that + function, switch to another frame on the same display (which will + be another Xt widget), select a huge amount of text, and have the + same (foreign) app ask for another incremental selection + transfer. Programming like X11 made sense, would mean that, in that + case, XtRegisterDrawable is called twice with different widgets. + + Since the results of calling XtRegisterDrawable when the drawable + is already registered with another widget are undefined, we want to + avoid that--so, only call it when XtWindowToWidget returns NULL, + which it will only do with a valid Window if it's not already + registered. */ + if (NULL == XtWindowToWidget(display, window)) + { + XtRegisterDrawable(display, (Drawable)window, widget); + } + prop_id = expect_property_change (display, window, reply.property, PropertyDelete); @@ -560,10 +587,14 @@ x_reply_selection_request (XSelectionRequestEvent *event, int format, stderr_out (" INCR done\n"); #endif if (! waiting_for_other_props_on_window (display, window)) - XSelectInput (display, window, 0L); + { + XSelectInput (display, window, 0L); + XtUnregisterDrawable(display, (Drawable)window); + } XChangeProperty (display, window, reply.property, type, format, PropModeReplace, data, 0); +#endif /* HAVE_XTREGISTERDRAWABLE */ } } diff --git a/src/sound.c b/src/sound.c index acb272b..ec7e9e3 100644 --- a/src/sound.c +++ b/src/sound.c @@ -467,7 +467,7 @@ init_nas_sound (struct device *d) static void init_native_sound (struct device *d) { - if (DEVICE_TTY_P (d) || DEVICE_STREAM_P (d) || DEVICE_MSWINDOWS_P(d)) + if (!(DEVICE_X_P(d) || DEVICE_GTK_P(d))) DEVICE_ON_CONSOLE_P (d) = 1; #ifdef HAVE_X_WINDOWS else @@ -517,7 +517,7 @@ init_native_sound (struct device *d) DEVICE_ON_CONSOLE_P (d) = 0; else { - char hn [255]; + char *hn = alloca_array (char, strlen (h->h_name) + 1); struct hostent *l; strcpy (hn, h->h_name); l = gethostbyname (localname); diff --git a/src/sysdir.h b/src/sysdir.h index 0139a8d..a123909 100644 --- a/src/sysdir.h +++ b/src/sysdir.h @@ -59,7 +59,11 @@ Boston, MA 02111-1307, USA. */ Since applying strlen to the name always works, we'll just do that. */ #define NAMLEN(p) strlen (p->d_name) -#define DIRENTRY_NONEMPTY(p) ((p)->d_ino) +#ifdef __CYGWIN__ +# define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != '\0') +#else +# define DIRENTRY_NONEMPTY(p) ((p)->d_ino) +#endif /* encapsulation: directory calls */ diff --git a/src/sysdll.c b/src/sysdll.c index 679e515..c9e28c0 100644 --- a/src/sysdll.c +++ b/src/sysdll.c @@ -263,11 +263,23 @@ dll_handle dll_open (const char *fname) { NSObjectFileImage file; - NSObjectFileImageReturnCode ret = - NSCreateObjectFileImageFromFile(fname, &file); + NSObjectFileImageReturnCode ret; + + /* + * MacOS X dll support is for bundles, not the current executable, so return + * NULL is this case. However, dll_function() uses a special hack where a + * NULL handle can be used to find executable symbols. This satisfies the + * needs of ui-gtk.c but is not a general solution. + */ + if (fname == NULL) + return NULL; + + ret = NSCreateObjectFileImageFromFile(fname, &file); + if (ret != NSObjectFileImageSuccess) { return NULL; } + return (dll_handle)NSLinkModule(file, fname, NSLINKMODULE_OPTION_BINDNOW | NSLINKMODULE_OPTION_PRIVATE | diff --git a/src/sysfile.h b/src/sysfile.h index 25c009d..d9d3deb 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -261,14 +261,20 @@ Boston, MA 02111-1307, USA. */ #endif /* The following definitions are needed under Windows, at least */ -#ifndef X_OK -# define X_OK 1 -#endif - #ifndef R_OK # define R_OK 4 #endif +/* Under native Windows, there is no concept of execute permission, + so redefine execute permissions to be the same as read permission */ +#ifndef X_OK +# ifdef WIN32_NATIVE +# define X_OK R_OK +# else +# define X_OK 1 +# endif +#endif + #ifndef W_OK # define W_OK 2 #endif diff --git a/src/unexelf.c b/src/unexelf.c index 9fdc974..6ac9844 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -475,7 +475,7 @@ typedef struct { # include <sys/exec_elf.h> #endif -#if defined(__FreeBSD__) && (defined(__alpha__) || defined(__amd64__)) +#if defined(__FreeBSD__) && (defined(__alpha__) || defined(_LP64)) # ifdef __STDC__ # define ElfW(type) Elf64_##type # else diff --git a/tests/ChangeLog b/tests/ChangeLog index dbaa581..380e70e 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,45 @@ +2007-10-07 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.21 is released + +2007-06-22 Stephen J. Turnbull <stephen@xemacs.org> + + * automated/mule-tests.el (buffer-modified-p): Test after revert. + +2006-12-09 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.20 is released + +2006-06-24 Stephen J. Turnbull <stephen@xemacs.org> + + * automated/test-harness.el (Silence-Message): New macro. + * automated/mule-tests.el: Use it. + * automated/region-tests.el: Use it. + * automated/tag-tests.el: Use it. + +2006-06-24 Stephen J. Turnbull <stephen@xemacs.org> + + * automated/test-harness.el: Improve handling of unexpected errors. + +2006-01-28 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.19 is released + +2005-12-08 Stephen J. Turnbull <stephen@xemacs.org> + + * automated/syntax-tests.el (backward-up-list): New test. + Thanks to Zacjev Evgeny for report, Aidan Kehoe for reproduction. + +2005-05-10 Aidan Kehoe <kehoea@parhasard.net> + + * automated/mule-tests.el: Test that starting a process in a + non-Latin-1 directory preserves the current directory, which it + didn't, previous to 21.4.17 + +2005-12-03 Vin Shelton <acs@xemacs.org> + + * XEmacs 21.4.18 is released + 2005-02-06 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.17 is released diff --git a/tests/automated/mule-tests.el b/tests/automated/mule-tests.el index c3eaffb..4001f1b 100644 --- a/tests/automated/mule-tests.el +++ b/tests/automated/mule-tests.el @@ -78,6 +78,35 @@ the Assert macro checks for correctness." ;; once compiled, for no good reason. (test-chars t) +;;---------------------------------------------------------------- +;; Test that revert-buffer resets the modiff +;; Bug reported 2007-06-20 <200706201902.32191.scop@xemacs.org>. +;; Fixed 2007-06-22 <18043.2793.611745.734215@parhasard.net>. +;;---------------------------------------------------------------- + +;; #### need a temp file name but this will do for now +(let ((test-file-name (expand-file-name "~/test-revert-buffer-resets-modiff")) + revert-buffer-function + kill-buffer-hook) ; paranoia + (find-file test-file-name) + (erase-buffer) + (insert "a string\n") + (save-buffer 0) + (insert "more text\n") + (revert-buffer t t) + ;; Just "find-file" with autodetect coding didn't fail for me, but it does + ;; fail under test harness. Still we'll redo the test with an explicit + ;; coding system just in case. + (Assert (not (buffer-modified-p))) + (kill-buffer nil) + (when (find-coding-system 'utf-8) + (find-file test-file-name 'utf-8) + (insert "more text\n") + (revert-buffer t t) + (Assert (not (buffer-modified-p))) + (kill-buffer nil)) + (delete-file test-file-name)) + ;;----------------------------------------------------------------- ;; Test string modification functions that modify the length of a char. ;;----------------------------------------------------------------- @@ -301,8 +330,7 @@ the Assert macro checks for correctness." (name1 (make-temp-name prefix)) (name2 (make-temp-name prefix)) (file-name-coding-system 'iso-8859-2)) - ;; This is how you suppress output from `message', called by `write-region' - (flet ((append-message (&rest args) ())) + (Silence-Message (Assert (not (equal name1 name2))) ;; Kludge to handle Mac OS X which groks only UTF-8. (cond ((eq system-type 'darwin) @@ -320,6 +348,27 @@ the Assert macro checks for correctness." (Assert (equal (file-truename name1) name1))) (ignore-file-errors (delete-file name1) (delete-file name2)))) + ;; Is a non-Latin-1 directory name preserved for call-process? + (when (and + ;; The bug should manifest itself on Windows, but I've no access + ;; to a Windows machine to verify that any test works. + (eq directory-sep-char ?/) + ;; file-name-coding-system on Darwin is _always_ UTF-8--the system + ;; enforces this--which coding system we don't have available in + ;; 21.4, outside of packages. I could jump through lots of hoops to + ;; have the test work anyway, but I'm not really into that right + ;; now. + (not (eq system-type 'darwin))) + (let ((process-coding-system-alist '((".*" . iso-8859-1))) + (file-name-coding-system 'iso-8859-1) + default-directory) + (make-directory (concat (temp-directory) "/\260\354")) + (setq file-name-coding-system 'euc-jp) + (setq default-directory (format "%s/%c/" (temp-directory) + (make-char 'japanese-jisx0208 48 108))) + (Assert (equal (shell-command-to-string "pwd") + (format "%s/\260\354\n" (temp-directory)))) + (delete-directory default-directory))) ;; Add many more file operation tests here... diff --git a/tests/automated/syntax-tests.el b/tests/automated/syntax-tests.el index 1ebb9f1..62e2978 100644 --- a/tests/automated/syntax-tests.el +++ b/tests/automated/syntax-tests.el @@ -155,3 +155,42 @@ ;; this last used to crash (parse-partial-sexp point (point-max))))) + +;; Test backward-up-list +;; Known-Bug: report = Evgeny Zacjev ca 2005-12-01, confirm = Aidan Kehoe + +(with-temp-buffer + ;; We are now using the standard syntax table. Thus there's no need to + ;; worry about a bogus syntax setting, eg, in a Gnus Article buffer the + ;; bug doesn't manifest. + + ;; value of point to the immediate left of this character + ;; 0 1 2 + ;; 1234 56789 012 34567 890 12 3456 7 + (insert "a ( \"b (c\" (\"defg\") \")\") h\n") + + ;; #### This test should check *every* position. + (flet ((backward-up-list-moves-point-from-to (start expected-end) + (goto-char start) + (backward-up-list 1) + (= (point) expected-end))) + (Known-Bug-Expect-Failure + ;; Evgeny's case + (Assert (backward-up-list-moves-point-from-to 16 12))) + (Assert (backward-up-list-moves-point-from-to 19 12)) + (Assert (backward-up-list-moves-point-from-to 20 3)) + (Known-Bug-Expect-Failure + (Assert (backward-up-list-moves-point-from-to 22 3))) + (Known-Bug-Expect-Failure + (Assert (backward-up-list-moves-point-from-to 23 3))) + (Assert (backward-up-list-moves-point-from-to 24 3)) + ;; This is maybe a little tricky, since we don't expect the position + ;; check to happen -- so use an illegal expected position + ;; I don't think there's any other way for this to fail that way, + ;; barring hardware error.... + (Check-Error-Message syntax-error + "Unbalanced parentheses" + (backward-up-list-moves-point-from-to 25 nil)) + ;; special-case check that point didn't move + (Assert (= (point) 25)))) + diff --git a/tests/automated/tag-tests.el b/tests/automated/tag-tests.el index 89e5ad6..75f5d5b 100644 --- a/tests/automated/tag-tests.el +++ b/tests/automated/tag-tests.el @@ -68,20 +68,23 @@ If FILENAME is omitted, the printname of FEATURE is used as the file name. (let ((tags-always-exact t)) ;; Search for the tag "mystruct"; this should succeed - (find-tag "mystruct") + (Silence-Message + (find-tag "mystruct")) (Assert (eq (point) 2)) ;; Search again. The search should fail, based on the patch that ;; Sven Grundmann submitted for 21.4.16. (Check-Error-Message error "No more entries matching mystruct" - (tags-loop-continue))) + (Silence-Message + (tags-loop-continue)))) (let ((tags-always-exact nil)) ;; Search for the definition of "require". Until the etags.el upgrade ;; from 21.5 in 21.4.16, this test would fail. (condition-case nil - (find-tag "require") + (Silence-Message + (find-tag "require")) (t t)) (Assert (eq (point) 52))) diff --git a/tests/automated/test-harness.el b/tests/automated/test-harness.el index 6e8d632..ac31824 100644 --- a/tests/automated/test-harness.el +++ b/tests/automated/test-harness.el @@ -38,6 +38,14 @@ ;;; Implementation-Incomplete-Expect-Failure wrapper macros to mark them. ;;; A lot of the tests we run push limits; suppress Ebola message with the ;;; Ignore-Ebola wrapper macro. +;;; Some noisy code will call `message'. Output from `message' can be +;;; suppressed with the Silence-Message macro. Functions that are known to +;;; issue messages include `write-region', `find-tag', `tag-loop-continue', +;;; `insert', and `mark-whole-buffer'. N.B. The Silence-Message macro +;;; currently does not suppress the newlines printed by `message'. +;;; Definitely do not use Silence-Message with Check-Message. +;;; In general it should probably only be used on code that prepares for a +;;; test, not on tests. ;;; ;;; You run the tests using M-x test-emacs-test-file, ;;; or $(EMACS) -batch -l .../test-harness.el -f batch-test-emacs file ... @@ -45,6 +53,23 @@ (require 'bytecomp) +(defvar unexpected-test-suite-failures 0 + "Cumulative number of unexpected failures since test-harness was loaded. + +\"Unexpected failures\" are those caught by a generic handler established +outside of the test context. As such they involve an abort of the test +suite for the file being tested. + +They often occur during preparation of a test or recording of the results. +For example, an executable used to generate test data might not be present +on the system, or a system error might occur while reading a data file.") + +(defvar unexpected-test-suite-failure-files nil + "List of test files causing unexpected failures.") + +;; Declared for dynamic scope; _do not_ initialize here. +(defvar unexpected-test-file-failures) + (defvar test-harness-test-compiled nil "Non-nil means the test code was compiled before execution.") @@ -134,6 +159,7 @@ The output file's name is made by appending `c' to the end of FILENAME." (setq body (cons (read buffer) body))) (end-of-file nil) (error + (incf unexpected-test-file-failures) (princ (format "Unexpected error %S reading forms from buffer\n" error-info)))) `(lambda () @@ -144,7 +170,6 @@ The output file's name is made by appending `c' to the end of FILENAME." (defvar missing-message-failures) (defvar other-failures) - (defvar unexpected-test-suite-failure) (defvar trick-optimizer) ,@(nreverse body)))) @@ -158,6 +183,7 @@ The output file's name is made by appending `c' to the end of FILENAME." (wrong-error-failures 0) (missing-message-failures 0) (other-failures 0) + (unexpected-test-file-failures 0) ;; #### perhaps this should be a defvar, and output at the very end ;; OTOH, this way AC types can use a null EMACSPACKAGEPATH to find @@ -165,7 +191,6 @@ The output file's name is made by appending `c' to the end of FILENAME." (skipped-test-reasons (make-hash-table :test 'equal)) (trick-optimizer nil) - (unexpected-test-suite-failure nil) (debug-on-error t) (pass-stream nil)) (with-output-to-temp-buffer "*Test-Log*" @@ -267,7 +292,7 @@ BODY is a sequence of expressions and may contain several tests." ,quoted-body ',expected-error error-info) (incf wrong-error-failures))))) - + ;; Do not use this with Silence-Message. (defmacro Check-Message (expected-message-regexp &rest body) (Skip-Test-Unless (fboundp 'defadvice) "can't defadvice" @@ -299,6 +324,10 @@ BODY is a sequence of expressions and may contain several tests." (incf other-failures))) (ad-unadvise 'message))))) + ;; #### Perhaps this should override `message' itself, too? + (defmacro Silence-Message (&rest body) + `(flet ((append-message (&rest args) ())) ,@body)) + (defmacro Ignore-Ebola (&rest body) `(let ((debug-issue-ebola-notices -42)) ,@body)) @@ -313,7 +342,7 @@ BODY is a sequence of expressions and may contain several tests." (condition-case error-info (funcall (test-harness-read-from-buffer inbuffer)) (error - (setq unexpected-test-suite-failure t) + (incf unexpected-test-file-failures) (princ (format "Unexpected error %S while executing interpreted code\n" error-info)) (message "Unexpected error %S while executing interpreted code." error-info) @@ -334,6 +363,7 @@ BODY is a sequence of expressions and may contain several tests." (condition-case error-info (if code (funcall code)) (error + (incf unexpected-test-file-failures) (princ (format "Unexpected error %S while executing byte-compiled code\n" error-info)) (message "Unexpected error %S while executing byte-compiled code." error-info) @@ -376,7 +406,11 @@ BODY is a sequence of expressions and may contain several tests." (cons (list filename passes total) test-harness-file-results-alist)) (message "%s" summary-msg)) - (when unexpected-test-suite-failure + (when (> unexpected-test-file-failures 0) + (setq unexpected-test-suite-failure-files + (cons filename unexpected-test-suite-failure-files)) + (setq unexpected-test-suite-failures + (+ unexpected-test-suite-failures unexpected-test-file-failures)) (message "Test suite execution failed unexpectedly.")) (fmakunbound 'Assert) (fmakunbound 'Check-Error) @@ -503,7 +537,23 @@ For example, invoke \"xemacs -batch -f batch-test-emacs tests/*.el\"" (/ (* 100 nsucc) ntest)) (message test-harness-null-summary-template (concat basename ":"))) - (setq results (cdr results)))))) + (setq results (cdr results))))) + (when (> unexpected-test-suite-failures 0) + (message "\n***** There %s %d unexpected test suite %s in %s:" + (if (= unexpected-test-suite-failures 1) "was" "were") + unexpected-test-suite-failures + (if (= unexpected-test-suite-failures 1) "failure" "failures") + (if (= (length unexpected-test-suite-failure-files) 1) + "file" + "files")) + (while unexpected-test-suite-failure-files + (let ((line (pop unexpected-test-suite-failure-files))) + (while (and (< (length line) 61) + unexpected-test-suite-failure-files) + (setq line + (concat line " " + (pop unexpected-test-suite-failure-files)))) + (message line))))) (message "\nDone") (kill-emacs (if error 1 0)))) diff --git a/version.sh b/version.sh index 6833ad4..8e1fc9a 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta= emacs_major_version=21 emacs_minor_version=4 -emacs_beta_version=17 -xemacs_codename="Jumbo Shrimp" +emacs_beta_version=21 +xemacs_codename="Educational Television" emacs_kit_version= infodock_major_version=4 infodock_minor_version=0 -- 1.7.10.4